@umbraco-ui/uui 1.15.0-rc.0 → 1.16.0-rc.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/custom-elements.json +43 -0
- package/dist/uui.min.js +60 -64
- package/dist/uui.min.js.map +1 -1
- package/package.json +85 -85
- package/vscode-html-custom-data.json +26 -14
package/dist/uui.min.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
(function(n,Te){typeof exports=="object"&&typeof module<"u"?Te(exports):typeof define=="function"&&define.amd?define(["exports"],Te):(n=typeof globalThis<"u"?globalThis:n||self,Te(n.uui={}))})(this,function(n){"use strict";/**
|
|
1
|
+
(function(n,Te){typeof exports=="object"&&typeof module<"u"?Te(exports):typeof define=="function"&&define.amd?define(["exports"],Te):(n=typeof globalThis<"u"?globalThis:n||self,Te(n.uui={}))})(this,(function(n){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const Te=window,
|
|
5
|
+
*/const Te=window,Ro=Te.ShadowRoot&&(Te.ShadyCSS===void 0||Te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fo=Symbol(),Dn=new WeakMap;let Vn=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Fo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ro&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Dn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Dn.set(t,e))}return e}toString(){return this.cssText}};const Ne=i=>new Vn(typeof i=="string"?i:i+"",void 0,Fo),b=(i,...e)=>{const t=i.length===1?i[0]:e.reduce(((r,o,s)=>r+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[s+1]),i[0]);return new Vn(t,i,Fo)},Nl=(i,e)=>{Ro?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((t=>{const r=document.createElement("style"),o=Te.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,i.appendChild(r)}))},jn=Ro?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return Ne(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Go;const Bi=window,Hn=Bi.trustedTypes,Bl=Hn?Hn.emptyScript:"",Rn=Bi.reactiveElementPolyfillSupport,Wo={toAttribute(i,e){switch(e){case Boolean:i=i?Bl:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Fn=(i,e)=>e!==i&&(e==e||i==i),qo={attribute:!0,type:String,converter:Wo,reflect:!1,hasChanged:Fn},Ko="finalized";let bt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const o=this._$Ep(r,t);o!==void 0&&(this._$Ev.set(o,r),e.push(o))})),e}static createProperty(e,t=qo){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,r,t);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(o){const s=this[e];this[t]=o,this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||qo}static finalize(){if(this.hasOwnProperty(Ko))return!1;this[Ko]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,r=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of r)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)t.unshift(jn(o))}else e!==void 0&&t.push(jn(e));return t}static _$Ep(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach((t=>t(this)))}addController(e){var t,r;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)===null||r===void 0||r.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Nl(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach((t=>{var r;return(r=t.hostConnected)===null||r===void 0?void 0:r.call(t)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach((t=>{var r;return(r=t.hostDisconnected)===null||r===void 0?void 0:r.call(t)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=qo){var o;const s=this.constructor._$Ep(e,r);if(s!==void 0&&r.reflect===!0){const a=(((o=r.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?r.converter:Wo).toAttribute(t,r.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,t){var r;const o=this.constructor,s=o._$Ev.get(e);if(s!==void 0&&this._$El!==s){const a=o.getPropertyOptions(s),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?a.converter:Wo;this._$El=s,this[s]=c.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,r){let o=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||Fn)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),r.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,r))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((o,s)=>this[s]=o)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(e=this._$ES)===null||e===void 0||e.forEach((o=>{var s;return(s=o.hostUpdate)===null||s===void 0?void 0:s.call(o)})),this.update(r)):this._$Ek()}catch(o){throw t=!1,this._$Ek(),o}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach((r=>{var o;return(o=r.hostUpdated)===null||o===void 0?void 0:o.call(r)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach(((t,r)=>this._$EO(r,this[r],t))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};bt[Ko]=!0,bt.elementProperties=new Map,bt.elementStyles=[],bt.shadowRootOptions={mode:"open"},Rn?.({ReactiveElement:bt}),((Go=Bi.reactiveElementVersions)!==null&&Go!==void 0?Go:Bi.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,ti=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var Xo;const Di=window,mt=Di.trustedTypes,Gn=mt?mt.createPolicy("lit-html",{createHTML:i=>i}):void 0,Yo="$lit$",Be=`lit$${(Math.random()+"").slice(9)}$`,Wn="?"+Be,Dl=`<${Wn}>`,Ke=document,Jt=()=>Ke.createComment(""),ei=i=>i===null||typeof i!="object"&&typeof i!="function",qn=Array.isArray,Vl=i=>qn(i)||typeof i?.[Symbol.iterator]=="function",Zo=`[
|
|
14
|
+
\f\r]`,ti=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kn=/-->/g,Xn=/>/g,Xe=RegExp(`>|${Zo}(?:([^\\s"'>=/]+)(${Zo}*=${Zo}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Yn=/'/g,Zn=/"/g,Qn=/^(?:script|style|textarea|title)$/i,Jn=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),u=Jn(1),v=Jn(2),Y=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),es=new WeakMap,Ye=Ke.createTreeWalker(Ke,129,null,!1);function ts(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gn!==void 0?Gn.createHTML(e):e}const jl=(i,e)=>{const t=i.length-1,r=[];let o,s=e===2?"<svg>":"",a=ti;for(let c=0;c<t;c++){const h=i[c];let d,g,f=-1,U=0;for(;U<h.length&&(a.lastIndex=U,g=a.exec(h),g!==null);)U=a.lastIndex,a===ti?g[1]==="!--"?a=Kn:g[1]!==void 0?a=Xn:g[2]!==void 0?(Qn.test(g[2])&&(o=RegExp("</"+g[2],"g")),a=Xe):g[3]!==void 0&&(a=Xe):a===Xe?g[0]===">"?(a=o??ti,f=-1):g[1]===void 0?f=-2:(f=a.lastIndex-g[2].length,d=g[1],a=g[3]===void 0?Xe:g[3]==='"'?Zn:Yn):a===Zn||a===Yn?a=Xe:a===Kn||a===Xn?a=ti:(a=Xe,o=void 0);const x=a===Xe&&i[c+1].startsWith("/>")?" ":"";s+=a===ti?h+Dl:f>=0?(r.push(d),h.slice(0,f)+Yo+h.slice(f)+Be+x):h+Be+(f===-2?(r.push(void 0),c):x)}return[ts(i,s+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let Qo=class Ml{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,a=0;const c=e.length-1,h=this.parts,[d,g]=jl(e,t);if(this.el=Ml.createElement(d,r),Ye.currentNode=this.el.content,t===2){const f=this.el.content,U=f.firstChild;U.remove(),f.append(...U.childNodes)}for(;(o=Ye.nextNode())!==null&&h.length<c;){if(o.nodeType===1){if(o.hasAttributes()){const f=[];for(const U of o.getAttributeNames())if(U.endsWith(Yo)||U.startsWith(Be)){const x=g[a++];if(f.push(U),x!==void 0){const I=o.getAttribute(x.toLowerCase()+Yo).split(Be),L=/([.?@])?(.*)/.exec(x);h.push({type:1,index:s,name:L[2],strings:I,ctor:L[1]==="."?Rl:L[1]==="?"?Gl:L[1]==="@"?Wl:ji})}else h.push({type:6,index:s})}for(const U of f)o.removeAttribute(U)}if(Qn.test(o.tagName)){const f=o.textContent.split(Be),U=f.length-1;if(U>0){o.textContent=mt?mt.emptyScript:"";for(let x=0;x<U;x++)o.append(f[x],Jt()),Ye.nextNode(),h.push({type:2,index:++s});o.append(f[U],Jt())}}}else if(o.nodeType===8)if(o.data===Wn)h.push({type:2,index:s});else{let f=-1;for(;(f=o.data.indexOf(Be,f+1))!==-1;)h.push({type:7,index:s}),f+=Be.length-1}s++}}static createElement(e,t){const r=Ke.createElement("template");return r.innerHTML=e,r}};function vt(i,e,t=i,r){var o,s,a,c;if(e===Y)return e;let h=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const d=ei(e)?void 0:e._$litDirective$;return h?.constructor!==d&&((s=h?._$AO)===null||s===void 0||s.call(h,!1),d===void 0?h=void 0:(h=new d(i),h._$AT(i,t,r)),r!==void 0?((a=(c=t)._$Co)!==null&&a!==void 0?a:c._$Co=[])[r]=h:t._$Cl=h),h!==void 0&&(e=vt(i,h._$AS(i,e.values),h,r)),e}let Hl=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:o}=this._$AD,s=((t=e?.creationScope)!==null&&t!==void 0?t:Ke).importNode(r,!0);Ye.currentNode=s;let a=Ye.nextNode(),c=0,h=0,d=o[0];for(;d!==void 0;){if(c===d.index){let g;d.type===2?g=new Vi(a,a.nextSibling,this,e):d.type===1?g=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(g=new ql(a,this,e)),this._$AV.push(g),d=o[++h]}c!==d?.index&&(a=Ye.nextNode(),c++)}return Ye.currentNode=Ke,s}v(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},Vi=class Tl{constructor(e,t,r,o){var s;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=o,this._$Cp=(s=o?.isConnected)===null||s===void 0||s}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=vt(this,e,t),ei(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==Y&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Vl(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==E&&ei(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ke.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Qo.createElement(ts(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===s)this._$AH.v(r);else{const a=new Hl(s,this),c=a.u(this.options);a.v(r),this.$(c),this._$AH=a}}_$AC(e){let t=es.get(e.strings);return t===void 0&&es.set(e.strings,t=new Qo(e)),t}T(e){qn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,o=0;for(const s of e)o===t.length?t.push(r=new Tl(this.k(Jt()),this.k(Jt()),this,this.options)):r=t[o],r._$AI(s),o++;o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},ji=class{constructor(e,t,r,o,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,o){const s=this.strings;let a=!1;if(s===void 0)e=vt(this,e,t,0),a=!ei(e)||e!==this._$AH&&e!==Y,a&&(this._$AH=e);else{const c=e;let h,d;for(e=s[0],h=0;h<s.length-1;h++)d=vt(this,c[r+h],t,h),d===Y&&(d=this._$AH[h]),a||(a=!ei(d)||d!==this._$AH[h]),d===E?e=E:e!==E&&(e+=(d??"")+s[h+1]),this._$AH[h]=d}a&&!o&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Rl=class extends ji{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}};const Fl=mt?mt.emptyScript:"";let Gl=class extends ji{constructor(){super(...arguments),this.type=4}j(e){e&&e!==E?this.element.setAttribute(this.name,Fl):this.element.removeAttribute(this.name)}},Wl=class extends ji{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){var r;if((e=(r=vt(this,e,t,0))!==null&&r!==void 0?r:E)===Y)return;const o=this._$AH,s=e===E&&o!==E||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==E&&(o===E||s);s&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}},ql=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){vt(this,e)}};const Kl={I:Vi},is=Di.litHtmlPolyfillSupport;is?.(Qo,Vi),((Xo=Di.litHtmlVersions)!==null&&Xo!==void 0?Xo:Di.litHtmlVersions=[]).push("2.8.0");const Xl=(i,e,t)=>{var r,o;const s=(r=t?.renderBefore)!==null&&r!==void 0?r:e;let a=s._$litPart$;if(a===void 0){const c=(o=t?.renderBefore)!==null&&o!==void 0?o:null;s._$litPart$=a=new Vi(e.insertBefore(Jt(),c),c,void 0,t??{})}return a._$AI(i),a};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var er
|
|
19
|
+
*/var Jo,er;let m=class extends bt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Xl(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Y}};m.finalized=!0,m._$litElement$=!0,(Jo=globalThis.litElementHydrateSupport)===null||Jo===void 0||Jo.call(globalThis,{LitElement:m});const os=globalThis.litElementPolyfillSupport;os?.({LitElement:m}),((er=globalThis.litElementVersions)!==null&&er!==void 0?er:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Yl=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},Zl=(i,e,t)=>{e.constructor.createProperty(t,i)};function l(i){return(e,t)=>t!==void 0?Zl(i,e,t):Yl(i,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const
|
|
31
|
+
*/const tr=({finisher:i,descriptor:e})=>(t,r)=>{var o;if(r===void 0){const s=(o=t.originalKey)!==null&&o!==void 0?o:t.key,a=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(t.key)}:{...t,key:s};return i!=null&&(a.finisher=function(c){i(c,s)}),a}{const s=t.constructor;e!==void 0&&Object.defineProperty(t,r,e(r)),i?.(s,r)}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/function S(i,e){return
|
|
35
|
+
*/function S(i,e){return tr({descriptor:t=>({get(){var o,s;return(s=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(i))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0})})}/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
39
|
+
*/function Ql(i){return tr({descriptor:e=>({get(){var t,r;return(r=(t=this.renderRoot)===null||t===void 0?void 0:t.querySelectorAll(i))!==null&&r!==void 0?r:[]},enumerable:!0,configurable:!0})})}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/var
|
|
43
|
+
*/var ir;const Jl=((ir=window.HTMLSlotElement)===null||ir===void 0?void 0:ir.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function De(i){const{slot:e,selector:t}=i??{};return tr({descriptor:r=>({get(){var o;const s="slot"+(e?`[name=${e}]`:":not([name])"),a=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(s),c=a!=null?Jl(a,i):[];return t?c.filter((h=>h.matches(t))):c},enumerable:!0,configurable:!0})})}var eu=`.uui-h1,
|
|
44
44
|
.uui-h2,
|
|
45
45
|
.uui-h3,
|
|
46
46
|
.uui-h4,
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
margin-top: var(--uui-size-layout-1,24px);
|
|
240
240
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
241
241
|
}
|
|
242
|
-
`;const vt=Ne(Jl),eu=b`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,tu=Ne("uui-blink 0.9s infinite both"),iu=b`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`,ou=Ne("pulse 0.8s ease-in-out infinite both"),ru=b`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,nu=Ne("uui-horizontal-shake 600ms ease backwards");let rr=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Ye=class extends rr{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},ii=class extends rr{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var su=Object.defineProperty,au=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&su(e,t,o),o};const lu=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return au([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var uu=Object.defineProperty,os=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&uu(e,t,o),o};const cu=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"display: none"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return os([l({type:String})],t.prototype,"label"),os([y()],t.prototype,"_labelSlotHasContent"),t};var hu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,rs=(i,e,t,r)=>{for(var o=r>1?void 0:r?du(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hu(e,t,o),o};const pu=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const c=a.tagName;return c==="A"||c==="BUTTON"||c==="INPUT"||c==="TEXTAREA"||c==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new ii(ii.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new ii(ii.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return rs([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),rs([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var bu=Object.defineProperty,mu=Object.getOwnPropertyDescriptor,vu=(i,e,t,r)=>{for(var o=mu(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&bu(e,t,o),o};const gu=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return vu([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};var fu=Object.defineProperty,yu=Object.getOwnPropertyDescriptor,Ze=(i,e,t,r)=>{for(var o=r>1?void 0:r?yu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fu(e,t,o),o};const wu=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],Uu=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const c={flagKey:o,getMessageMethod:s,checkMethod:a,weight:wu.indexOf(o)};return this.#r.push(c),this.#r.sort((h,d)=>h.weight>d.weight?1:d.weight>h.weight?-1:0),c}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(Ye.INVALID,()=>{this._runValidators()}),o.addEventListener(Ye.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(c=>c.checkMethod()?(this.#e[c.flagKey]=!0,o=c.getMessageMethod(),!0):!1),o||this.#o.some(c=>{let h;for(h in c.validity)if(h!=="valid"&&c.validity[h])return this.#e[h]=!0,o=c.validationMessage,s??=c,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new Ye(Ye.VALID)):this.dispatchEvent(new Ye(Ye.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Ze([l({type:String})],t.prototype,"name",2),Ze([l()],t.prototype,"value",1),Ze([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Ze([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Ze([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Ze([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Ze([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t};let _u=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const $u=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},ku=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,c=s.left+a.scrollX,h=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const g=d.pageX-c,f=d.pageY-h;e?.onMove&&e.onMove(g,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},Eu=(i,e,t)=>Math.min(Math.max(i,e),t),xu=(i,e,t)=>t+e-i,Iu=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},ns=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function Cu(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var Su=Object.defineProperty,Pu=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Su(e,t,o),o};const Au=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=ns(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return Pu([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};function zu(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}const Lu=["default","primary","secondary","outline","placeholder"],Ou=["default","positive","warning","danger","invalid"],Mu=["h1","h2","h3","h4","h5","h6"];function p(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}var Tu=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIButtonGroupElement=class extends m{render(){return u`<slot></slot>`}},n.UUIButtonGroupElement.styles=[b`:host{display:inline-flex;align-items:stretch}::slotted(*){--uui-button-border-radius:0;flex-grow:1}::slotted([look=outline]:not(:first-child)){--uui-button-merge-border-left:1}::slotted([look=placeholder]:not(:first-child)){--uui-button-merge-border-left:1}::slotted(:first-child){--uui-button-border-radius:var(--uui-border-radius,3px) 0 0 var(--uui-border-radius,3px)}::slotted(:last-child){--uui-button-border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0}::slotted(:hover){z-index:1}`],n.UUIButtonGroupElement=Tu([p("uui-button-group")],n.UUIButtonGroupElement);var Nu=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,b`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:2;--uui-button-padding-right-factor:2}::slotted([look=outline]),::slotted([look=placeholder]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1}::slotted(uui-button[look=outline]:first-child),::slotted(uui-button[look=placeholder]:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:1.5}::slotted(uui-button[look=outline]:last-child),::slotted(uui-button[look=placeholder]:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:1.5}::slotted(uui-button[look=outline]:first-child:last-child),::slotted(uui-button[look=placeholder]:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}`],n.UUIActionBarElement=Nu([p("uui-action-bar")],n.UUIActionBarElement);var Bu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,Di=(i,e,t,r)=>{for(var o=r>1?void 0:r?Du(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Bu(e,t,o),o};n.UUIAvatarGroupElement=class extends m{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>${this._isLimitExceeded()?u`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}`}},n.UUIAvatarGroupElement.styles=[b`:host{display:inline-flex;align-items:center;padding-left:3px;padding-right:3px}::slotted(uui-avatar){margin-left:-.2em;margin-right:-.2em;border:.1em solid var(--uui-avatar-border-color)}#overflow-indication{margin-left:6px}`],Di([De({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),Di([y()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),Di([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=Di([p("uui-avatar-group")],n.UUIAvatarGroupElement);var Vu=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?ju(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vu(e,t,o),o};n.UUIAvatarElement=class extends m{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this.name=""}get _initials(){return this.initials?.substring(0,3)||this.createInitials(this.name)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=[...e.matchAll(/(?:^|\s)(.)/g)].map(o=>o[1]).join("");return r?.length?(t=r[0].charAt(0),r.length>1&&(t+=r[r.length-1].charAt(0)),t.toUpperCase()):t}renderImage(){return u`<img src="${this.imgSrc}" srcset="${this.imgSrcset}" alt="${this._initials}" title="${this.name}">`}render(){return u`${this.imgSrc?this.renderImage():""} ${this.imgSrc?"":this._initials}<slot></slot>`}},n.UUIAvatarElement.styles=[b`:host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;overflow:hidden;border-radius:50%;font-weight:700;-webkit-font-smoothing:subpixel-antialiased;width:calc(2em + 4px);height:calc(2em + 4px);user-select:none;aspect-ratio:1;background-color:var(--uui-palette-spanish-pink,#f5c1bc);color:var(--uui-palette-space-cadet,#1b264f)}:host([overflow]){overflow:unset}img{object-fit:cover;height:100%;width:100%;overflow:hidden;border-radius:50%}`],gt([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),gt([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),gt([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),gt([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",2),gt([l({type:String})],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=gt([p("uui-avatar")],n.UUIAvatarElement);var Hu=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,Vi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ru(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Hu(e,t,o),o};n.UUIBadgeElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return u`<slot></slot>`}},n.UUIBadgeElement.styles=[b`:host{position:var(--uui-badge-position,absolute);display:flex;justify-content:center;align-items:center;padding:var(--uui-size-1,3px) var(--uui-size-2,6px);inset:var(--uui-badge-inset,-8px -8px auto auto);text-align:center;font-size:var(--uui-badge-font-size,var(--uui-type-small-size,12px));font-weight:900;line-height:1;margin-right:0;min-width:var(--uui-size-8,24px);min-height:var(--uui-size-8,24px);box-sizing:border-box;border-radius:var(--uui-size-4,12px);border:1px solid transparent}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(
|
|
242
|
+
`;const gt=Ne(eu),tu=b`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,iu=Ne("uui-blink 0.9s infinite both"),ou=b`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`,ru=Ne("pulse 0.8s ease-in-out infinite both"),nu=b`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,su=Ne("uui-horizontal-shake 600ms ease backwards");let or=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Ze=class extends or{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},ii=class extends or{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var au=Object.defineProperty,lu=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&au(e,t,o),o};const uu=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return lu([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var cu=Object.defineProperty,rs=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&cu(e,t,o),o};const hu=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"display: none"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return rs([l({type:String})],t.prototype,"label"),rs([y()],t.prototype,"_labelSlotHasContent"),t};var du=Object.defineProperty,pu=Object.getOwnPropertyDescriptor,ns=(i,e,t,r)=>{for(var o=r>1?void 0:r?pu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&du(e,t,o),o};const bu=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const c=a.tagName;return c==="A"||c==="BUTTON"||c==="INPUT"||c==="TEXTAREA"||c==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new ii(ii.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new ii(ii.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return ns([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),ns([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var mu=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,gu=(i,e,t,r)=>{for(var o=vu(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&mu(e,t,o),o};const fu=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return gu([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};var yu=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,Qe=(i,e,t,r)=>{for(var o=r>1?void 0:r?wu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&yu(e,t,o),o};const Uu=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],_u=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const c={flagKey:o,getMessageMethod:s,checkMethod:a,weight:Uu.indexOf(o)};return this.#r.push(c),this.#r.sort((h,d)=>h.weight>d.weight?1:d.weight>h.weight?-1:0),c}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(Ze.INVALID,()=>{this._runValidators()}),o.addEventListener(Ze.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(c=>c.checkMethod()?(this.#e[c.flagKey]=!0,o=c.getMessageMethod(),!0):!1),o||this.#o.some(c=>{let h;for(h in c.validity)if(h!=="valid"&&c.validity[h])return this.#e[h]=!0,o=c.validationMessage,s??=c,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new Ze(Ze.VALID)):this.dispatchEvent(new Ze(Ze.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Qe([l({type:String})],t.prototype,"name",2),Qe([l()],t.prototype,"value",1),Qe([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Qe([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Qe([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Qe([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Qe([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t};let $u=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const ku=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},Eu=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,c=s.left+a.scrollX,h=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const g=d.pageX-c,f=d.pageY-h;e?.onMove&&e.onMove(g,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},xu=(i,e,t)=>Math.min(Math.max(i,e),t),Iu=(i,e,t)=>t+e-i,Cu=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},ss=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function Su(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var Pu=Object.defineProperty,Au=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Pu(e,t,o),o};const zu=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=ss(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return Au([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};function Lu(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}const Ou=["default","primary","secondary","outline","placeholder"],Mu=["default","positive","warning","danger","invalid"],Tu=["h1","h2","h3","h4","h5","h6"];function p(i,e){return t=>{if(!(i.indexOf("-")>0)){console.error(`${i} is not a valid custom element name. A custom element name should consist of at least two words separated by a hyphen.`);return}window.customElements.get(i)||window.customElements.define(i,t,e)}}var Nu=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIButtonGroupElement=class extends m{render(){return u`<slot></slot>`}},n.UUIButtonGroupElement.styles=[b`:host{display:inline-flex;align-items:stretch}::slotted(*){--uui-button-border-radius:0;flex-grow:1}::slotted([look=outline]:not(:first-child)){--uui-button-merge-border-left:1}::slotted([look=placeholder]:not(:first-child)){--uui-button-merge-border-left:1}::slotted(:first-child){--uui-button-border-radius:var(--uui-border-radius,3px) 0 0 var(--uui-border-radius,3px)}::slotted(:last-child){--uui-button-border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0}::slotted(:hover){z-index:1}`],n.UUIButtonGroupElement=Nu([p("uui-button-group")],n.UUIButtonGroupElement);var Bu=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,b`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:2;--uui-button-padding-right-factor:2}::slotted([look=outline]),::slotted([look=placeholder]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1}::slotted(uui-button[look=outline]:first-child),::slotted(uui-button[look=placeholder]:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:1.5}::slotted(uui-button[look=outline]:last-child),::slotted(uui-button[look=placeholder]:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:1.5}::slotted(uui-button[look=outline]:first-child:last-child),::slotted(uui-button[look=placeholder]:first-child:last-child){--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}`],n.UUIActionBarElement=Bu([p("uui-action-bar")],n.UUIActionBarElement);var Du=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Hi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Du(e,t,o),o};n.UUIAvatarGroupElement=class extends m{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(e){e.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((e,t)=>{e.style.display=t<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>${this._isLimitExceeded()?u`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}`}},n.UUIAvatarGroupElement.styles=[b`:host{display:inline-flex;align-items:center;padding-left:3px;padding-right:3px}::slotted(uui-avatar){margin-left:-.2em;margin-right:-.2em;border:.1em solid var(--uui-avatar-border-color)}#overflow-indication{margin-left:6px}`],Hi([De({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),Hi([y()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),Hi([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=Hi([p("uui-avatar-group")],n.UUIAvatarGroupElement);var ju=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,ft=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ju(e,t,o),o};n.UUIAvatarElement=class extends m{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this.name=""}get _initials(){return this.initials?.substring(0,3)||this.createInitials(this.name)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=[...e.matchAll(/(?:^|\s)(.)/g)].map(o=>o[1]).join("");return r?.length?(t=r[0].charAt(0),r.length>1&&(t+=r[r.length-1].charAt(0)),t.toUpperCase()):t}renderImage(){return u`<img src="${this.imgSrc}" srcset="${this.imgSrcset}" alt="${this._initials}" title="${this.name}">`}render(){return u`${this.imgSrc?this.renderImage():""} ${this.imgSrc?"":this._initials}<slot></slot>`}},n.UUIAvatarElement.styles=[b`:host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;overflow:hidden;border-radius:50%;font-weight:700;-webkit-font-smoothing:subpixel-antialiased;width:calc(2em + 4px);height:calc(2em + 4px);user-select:none;aspect-ratio:1;background-color:var(--uui-palette-spanish-pink,#f5c1bc);color:var(--uui-palette-space-cadet,#1b264f)}:host([overflow]){overflow:unset}img{object-fit:cover;height:100%;width:100%;overflow:hidden;border-radius:50%}`],ft([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),ft([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),ft([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),ft([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",2),ft([l({type:String})],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=ft([p("uui-avatar")],n.UUIAvatarElement);var Ru=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,Ri=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ru(e,t,o),o};n.UUIBadgeElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return u`<slot></slot>`}},n.UUIBadgeElement.styles=[b`:host{position:var(--uui-badge-position,absolute);display:flex;justify-content:center;align-items:center;padding:var(--uui-size-1,3px) var(--uui-size-2,6px);inset:var(--uui-badge-inset,-8px -8px auto auto);text-align:center;font-size:var(--uui-badge-font-size,var(--uui-type-small-size,12px));font-weight:900;line-height:1;margin-right:0;min-width:var(--uui-size-8,24px);min-height:var(--uui-size-8,24px);box-sizing:border-box;border-radius:var(--uui-size-4,12px);border:1px solid transparent}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(
|
|
243
243
|
28,
|
|
244
244
|
35,
|
|
245
245
|
59
|
|
@@ -255,27 +255,27 @@
|
|
|
255
255
|
191,
|
|
256
256
|
33,
|
|
257
257
|
78
|
|
258
|
-
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}::slotted(uui-icon){margin-left:-.2em;margin-right:-.2em}@keyframes --uui-badge-bounce{0%{transform:translateY(0)}20%{transform:translateY(-6px)}40%{transform:translateY(0)}55%{transform:translateY(-3px)}70%{transform:translateY(0)}100%{transform:translateY(0)}}:host([attention]){animation-duration:1.4s;animation-iteration-count:infinite;animation-name:--uui-badge-bounce;animation-timing-function:ease}@media (prefers-reduced-motion){:host([attention]){animation:none}}`],Vi([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),Vi([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),Vi([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=Vi([p("uui-badge")],n.UUIBadgeElement);var Fu=Object.defineProperty,Gu=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Fu(e,t,o),o};const oi=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Gu([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var Wu=Object.defineProperty,ss=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Wu(e,t,o),o};const me=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"display: none"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return ss([l({type:String})],t.prototype,"label"),ss([y()],t.prototype,"_labelSlotHasContent"),t};let qu=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},ji=class extends qu{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Ku=Object.defineProperty,Xu=Object.getOwnPropertyDescriptor,as=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ku(e,t,o),o};const ft=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const c=a.tagName;return c==="A"||c==="BUTTON"||c==="INPUT"||c==="TEXTAREA"||c==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new ji(ji.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new ji(ji.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return as([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),as([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Yu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Qu=(i,e,t,r)=>{for(var o=Zu(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Yu(e,t,o),o};const Hi=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return Qu([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};let ls=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},yt=class extends ls{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Sm=class extends ls{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Ju=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,Qe=(i,e,t,r)=>{for(var o=r>1?void 0:r?ec(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ju(e,t,o),o};const tc=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],ve=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const c={flagKey:o,getMessageMethod:s,checkMethod:a,weight:tc.indexOf(o)};return this.#r.push(c),this.#r.sort((h,d)=>h.weight>d.weight?1:d.weight>h.weight?-1:0),c}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(yt.INVALID,()=>{this._runValidators()}),o.addEventListener(yt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(c=>c.checkMethod()?(this.#e[c.flagKey]=!0,o=c.getMessageMethod(),!0):!1),o||this.#o.some(c=>{let h;for(h in c.validity)if(h!=="valid"&&c.validity[h])return this.#e[h]=!0,o=c.validationMessage,s??=c,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new yt(yt.VALID)):this.dispatchEvent(new yt(yt.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Qe([l({type:String})],t.prototype,"name",2),Qe([l()],t.prototype,"value",1),Qe([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Qe([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Qe([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Qe([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Qe([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},ic=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var oc=Object.defineProperty,rc=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&oc(e,t,o),o};const nc=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=ic(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return rc([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};let P=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Ri=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},wt=class extends P{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}},nr=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var sc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,Ut=(i,e,t,r)=>{for(var o=r>1?void 0:r?ac(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sc(e,t,o),o};let ne=class extends ve(me("",m),""){constructor(e="checkbox"){super(),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keydown",this.#e)}get value(){return this._value}set value(e){const t=super.value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}#e(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),t.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),t.addEventListener("mouseup",()=>{r=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new nr(nr.CHANGE))}render(){return u`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled||this.readonly}" .checked="${this.checked}" .indeterminate="${this.indeterminate}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}static{this.styles=[b`:host{display:inline-block}label{position:relative;cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}:host([readonly]) label{cursor:default}input{position:absolute;height:0;width:0;opacity:0}:host([label-position=left]) label{flex-direction:row-reverse}:host([label-position=top]) label{gap:var(--uui-size-half-base-unit);flex-direction:column-reverse}:host([label-position=bottom]) label{gap:var(--uui-size-half-base-unit);flex-direction:column}:host([disabled]) label{cursor:not-allowed;opacity:.5}.label{display:block}span.label:empty{display:none}`]}};Ut([l({type:String,attribute:"label-position",reflect:!0})],ne.prototype,"labelPosition",2),Ut([l({type:Boolean})],ne.prototype,"checked",1),Ut([l({type:Boolean,reflect:!0})],ne.prototype,"indeterminate",2),Ut([l({type:Boolean,reflect:!0})],ne.prototype,"disabled",2),Ut([l({type:Boolean,reflect:!0})],ne.prototype,"readonly",2),Ut([S("#input")],ne.prototype,"_input",2);/**
|
|
258
|
+
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}::slotted(uui-icon){margin-left:-.2em;margin-right:-.2em}@keyframes --uui-badge-bounce{0%{transform:translateY(0)}20%{transform:translateY(-6px)}40%{transform:translateY(0)}55%{transform:translateY(-3px)}70%{transform:translateY(0)}100%{transform:translateY(0)}}:host([attention]){animation-duration:1.4s;animation-iteration-count:infinite;animation-name:--uui-badge-bounce;animation-timing-function:ease}@media (prefers-reduced-motion){:host([attention]){animation:none}}`],Ri([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),Ri([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),Ri([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=Ri([p("uui-badge")],n.UUIBadgeElement);var Gu=Object.defineProperty,Wu=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Gu(e,t,o),o};const oi=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Wu([l({type:Boolean,reflect:!0})],e.prototype,"active"),e};var qu=Object.defineProperty,as=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&qu(e,t,o),o};const me=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}firstUpdated(o){super.firstUpdated(o),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return u`${this._labelSlotHasContent===!1?u`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"display: none"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return as([l({type:String})],t.prototype,"label"),as([y()],t.prototype,"_labelSlotHasContent"),t};let Ku=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Fi=class extends Ku{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var Xu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,ls=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yu(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xu(e,t,o),o};const yt=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.#e=this,this.#i=o=>{o.code!=="Space"&&o.code!=="Enter"||o.composedPath().indexOf(this.#e)===0&&this.#t(o)},this.#t=o=>{if((this._selectable||this.deselectable&&this.selected)===!1)return;const s=o.composedPath();this.#e===this&&s.some(a=>{const c=a.tagName;return c==="A"||c==="BUTTON"||c==="INPUT"||c==="TEXTAREA"||c==="SELECT"})||s.indexOf(this.#e)!==-1&&(o.type==="keydown"&&o.preventDefault(),this.#r())},this.addEventListener("click",this.#t),this.addEventListener("keydown",this.#i)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;o!==r&&(this._selectable=r,this.#e===this&&this.#e.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o))}#e;get selectableTarget(){return this.#e}set selectableTarget(r){const o=this.#e;o.removeAttribute("tabindex"),o.removeEventListener("click",this.#t),o.removeEventListener("keydown",this.#i),this.#e=r,this.#e===this&&this.#e.setAttribute("tabindex",this._selectable?"0":"-1"),r.addEventListener("click",this.#t),r.addEventListener("keydown",this.#i)}#i;#t;#r(){this.selectable&&(this.deselectable===!1?this.#o():this.selected?this.#n():this.#o())}#o(){if(!this.selectable)return;const r=new Fi(Fi.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}#n(){if(!this.deselectable)return;const r=new Fi(Fi.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}}return ls([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),ls([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Zu=Object.defineProperty,Qu=Object.getOwnPropertyDescriptor,Ju=(i,e,t,r)=>{for(var o=Qu(e,t),s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&Zu(e,t,o),o};const Gi=i=>{class e extends i{constructor(){super(...arguments),this._selectOnly=!1}get selectOnly(){return this._selectOnly}set selectOnly(r){const o=this._selectOnly;this._selectOnly=r,this.requestUpdate("selectOnly",o)}}return Ju([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly"),e};let us=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},wt=class extends us{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Pm=class extends us{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};var ec=Object.defineProperty,tc=Object.getOwnPropertyDescriptor,Je=(i,e,t,r)=>{for(var o=r>1?void 0:r?tc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ec(e,t,o),o};const ic=["customError","valueMissing","badInput","typeMismatch","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort"],ve=(i,e)=>{class t extends i{constructor(...o){super(...o),this.name="",this.#e={},this._pristine=!1,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this.#i=e,this.#t=null,this.#r=[],this.#o=[],this.#s=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.pristine=!0,this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1,this.checkValidity()})}static{this.formAssociated=!0}get value(){return this.#i}set value(o){const s=this.#i;this.#i=o,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this.#i??null),this.requestUpdate("value",s)}#e;set pristine(o){this._pristine!==o&&(this._pristine=o,o?this.setAttribute("pristine",""):this.removeAttribute("pristine"),this.#a())}get pristine(){return this._pristine}#i;#t;#r;#o;hasValue(){return this.value!==this.getDefaultValue()}focusFirstInvalidElement(){const o=this.#o.find(s=>s.validity.valid===!1);o?"focusFirstInvalidElement"in o?o.focusFirstInvalidElement():o.focus():this.focus()}disconnectedCallback(){super.disconnectedCallback(),this.#n()}#n(){this.#t&&this.#t.removeEventListener("submit",this.#s)}addValidator(o,s,a){const c={flagKey:o,getMessageMethod:s,checkMethod:a,weight:ic.indexOf(o)};return this.#r.push(c),this.#r.sort((h,d)=>h.weight>d.weight?1:d.weight>h.weight?-1:0),c}removeValidator(o){const s=this.#r.indexOf(o);s!==-1&&this.#r.splice(s,1)}addFormControlElement(o){this.#o.push(o),o.addEventListener(wt.INVALID,()=>{this._runValidators()}),o.addEventListener(wt.VALID,()=>{this._runValidators()}),this._pristine===!1&&(o.checkValidity(),this._runValidators())}setCustomValidity(o){this._customValidityObject&&this.removeValidator(this._customValidityObject),o!=null&&o!==""&&(this._customValidityObject=this.addValidator("customError",()=>o,()=>!0)),this._runValidators()}_runValidators(){this.#e={};let o,s;this.#r.some(c=>c.checkMethod()?(this.#e[c.flagKey]=!0,o=c.getMessageMethod(),!0):!1),o||this.#o.some(c=>{let h;for(h in c.validity)if(h!=="valid"&&c.validity[h])return this.#e[h]=!0,o=c.validationMessage,s??=c,!0;return!1});const a=Object.values(this.#e).includes(!0);this.#e.valid=!a,this._internals.setValidity(this.#e,o,s??this.getFormElement()??void 0),this.#a()}#a(){this._pristine!==!0&&(this.#e.valid?this.dispatchEvent(new wt(wt.VALID)):this.dispatchEvent(new wt(wt.INVALID)))}updated(o){super.updated(o),this._runValidators()}#s;submit(){this.#t?.requestSubmit()}formAssociatedCallback(){this.#n(),this.#t=this._internals.form,this.#t&&(this.#t.hasAttribute("submit-invalid")&&(this.pristine=!1),this.#t.addEventListener("submit",this.#s))}formResetCallback(){this.pristine=!0,this.value=this.getInitialValue()??this.getDefaultValue()}getDefaultValue(){return e}getInitialValue(){return this.getAttribute("value")}checkValidity(){this.pristine=!1,this._runValidators();for(const o in this.#o)if(this.#o[o].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this.#e}get validationMessage(){return this._internals?.validationMessage}}return Je([l({type:String})],t.prototype,"name",2),Je([l()],t.prototype,"value",1),Je([l({type:Boolean,reflect:!0,attribute:"pristine"})],t.prototype,"pristine",1),Je([l({type:Boolean,reflect:!0})],t.prototype,"required",2),Je([l({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),Je([l({type:Boolean,reflect:!0})],t.prototype,"error",2),Je([l({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},oc=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var rc=Object.defineProperty,nc=(i,e,t,r)=>{for(var o=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(e,t,o)||o);return o&&rc(e,t,o),o};const sc=i=>{class e extends i{constructor(...r){super(...r),this.#e=!1,this._togglePopover=()=>{if(!this.popoverContainerElement)return;const o=oc(this,"id",this.popoverContainerElement);o&&(this.#e?o.hidePopover():o.showPopover())},this.#i=o=>{requestAnimationFrame(()=>{this.#e=o.detail.newState==="open"})},this.addEventListener("uui-popover-before-toggle",this.#i)}#e;#i}return nc([l({type:String,attribute:"popovertarget"})],e.prototype,"popoverContainerElement"),e};let P=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},Wi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}static{this.VALID="valid"}static{this.INVALID="invalid"}},Ut=class extends P{static{this.SELECTED="selected"}static{this.DESELECTED="deselected"}constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}},rr=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,_t=(i,e,t,r)=>{for(var o=r>1?void 0:r?lc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ac(e,t,o),o};let ae=class extends ve(me("",m),""){constructor(e="checkbox"){super(),this._value="",this.labelPosition="right",this._checked=!1,this.indeterminate=!1,this.disabled=!1,this.readonly=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keydown",this.#e)}get value(){return this._value}set value(e){const t=super.value;this._value=e,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",t)}getFormElement(){return this._input}#e(e){e.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(e){super.firstUpdated(e);const t=this.shadowRoot?.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),t.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),t.addEventListener("mouseup",()=>{r=!1})}async focus(){await this.updateComplete,this._input.focus()}async click(){await this.updateComplete,this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.indeterminate=this._input.indeterminate,this.dispatchEvent(new rr(rr.CHANGE))}render(){return u`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled||this.readonly}" .checked="${this.checked}" .indeterminate="${this.indeterminate}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}static{this.styles=[b`:host{display:inline-block}label{position:relative;cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}:host([readonly]) label{cursor:default}input{position:absolute;height:0;width:0;opacity:0}:host([label-position=left]) label{flex-direction:row-reverse}:host([label-position=top]) label{gap:var(--uui-size-half-base-unit);flex-direction:column-reverse}:host([label-position=bottom]) label{gap:var(--uui-size-half-base-unit);flex-direction:column}:host([disabled]) label{cursor:not-allowed;opacity:.5}.label{display:block}span.label:empty{display:none}`]}};_t([l({type:String,attribute:"label-position",reflect:!0})],ae.prototype,"labelPosition",2),_t([l({type:Boolean})],ae.prototype,"checked",1),_t([l({type:Boolean,reflect:!0})],ae.prototype,"indeterminate",2),_t([l({type:Boolean,reflect:!0})],ae.prototype,"disabled",2),_t([l({type:Boolean,reflect:!0})],ae.prototype,"readonly",2),_t([S("#input")],ae.prototype,"_input",2);/**
|
|
259
259
|
* @license
|
|
260
260
|
* Copyright 2020 Google LLC
|
|
261
261
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
262
|
-
*/const
|
|
262
|
+
*/const cs=Symbol.for(""),uc=i=>{if(i?.r===cs)return i?._$litStatic$},hs=i=>({_$litStatic$:i,r:cs}),ds=new Map,cc=i=>(e,...t)=>{const r=t.length;let o,s;const a=[],c=[];let h,d=0,g=!1;for(;d<r;){for(h=e[d];d<r&&(s=t[d],(o=uc(s))!==void 0);)h+=o+e[++d],g=!0;d!==r&&c.push(s),a.push(h),d++}if(d===r&&a.push(e[r]),g){const f=a.join("$$lit$$");(e=ds.get(f))===void 0&&(a.raw=a,ds.set(f,e=a)),t=c}return i(e,...t)},ps=cc(u);var hc=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,et=(i,e,t,r)=>{for(var o=r>1?void 0:r?dc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hc(e,t,o),o};function nr(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}n.UUIBoxElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineVariantTag="h5",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=nr(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=nr(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=nr(e.target)}}set headlineVariant(e){this._headlineVariantTag=e}get headlineVariant(){return this._headlineVariantTag}renderHeader(){return ps`<div
|
|
263
263
|
id="header"
|
|
264
264
|
class="uui-text"
|
|
265
265
|
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
266
|
-
<${
|
|
266
|
+
<${hs(this._headlineVariantTag)}
|
|
267
267
|
id="headline"
|
|
268
268
|
class="uui-h5"
|
|
269
269
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
270
270
|
${this.headline}
|
|
271
271
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
272
|
-
</${
|
|
272
|
+
</${hs(this._headlineVariantTag)}>
|
|
273
273
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
274
274
|
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
275
|
-
</div>`}render(){return
|
|
275
|
+
</div>`}render(){return ps`
|
|
276
276
|
${this.renderHeader()}
|
|
277
277
|
<slot></slot>
|
|
278
|
-
`}},n.UUIBoxElement.styles=[
|
|
278
|
+
`}},n.UUIBoxElement.styles=[gt,b`
|
|
279
279
|
:host {
|
|
280
280
|
display: block;
|
|
281
281
|
border: var(--uui-box-border-width, 0) solid
|
|
@@ -305,19 +305,19 @@
|
|
|
305
305
|
display: block;
|
|
306
306
|
margin-left: auto;
|
|
307
307
|
}
|
|
308
|
-
`],
|
|
308
|
+
`],et([l({type:String})],n.UUIBoxElement.prototype,"headline",2),et([l({attribute:"headline-variant"})],n.UUIBoxElement.prototype,"headlineVariant",1),et([y()],n.UUIBoxElement.prototype,"_headlineVariantTag",2),et([y()],n.UUIBoxElement.prototype,"_headlineSlotHasContent",2),et([y()],n.UUIBoxElement.prototype,"_headerSlotHasContent",2),et([y()],n.UUIBoxElement.prototype,"_headerActionsSlotHasContent",2),n.UUIBoxElement=et([p("uui-box")],n.UUIBoxElement);var pc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,sr=(i,e,t,r)=>{for(var o=r>1?void 0:r?bc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pc(e,t,o),o};n.UUIBreadcrumbItemElement=class extends m{constructor(){super(...arguments),this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}renderLinkAndSeparator(){const e=this.href?u`<a id="link" href="${this.href}"><slot></slot></a>`:u`<span id="link"><slot></slot></span>`;return u`${e}<span part="separator"></span>`}renderCurrent(){return u`<span id="last-item"><slot></slot></span>`}render(){return u`${this.lastItem?this.renderCurrent():this.renderLinkAndSeparator()}`}},n.UUIBreadcrumbItemElement.styles=[b`:host{font-size:var(--uui-type-small-size,12px);color:currentColor}a,a:visited{color:currentColor}a:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}a:focus{color:var(--uui-color-focus,#3879ff)}[part=separator]::after{content:'/';speak:never;position:relative;top:1px;margin:-3px 1px 0;color:var(--uui-color-border,#d8d7d9)}#last-item,#link{padding:0 4px;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`],sr([l()],n.UUIBreadcrumbItemElement.prototype,"href",2),sr([l({type:Boolean,attribute:"last-item"})],n.UUIBreadcrumbItemElement.prototype,"lastItem",2),n.UUIBreadcrumbItemElement=sr([p("uui-breadcrumb-item")],n.UUIBreadcrumbItemElement);var mc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,bs=(i,e,t,r)=>{for(var o=r>1?void 0:r?vc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&mc(e,t,o),o};n.UUIBreadcrumbsElement=class extends m{elementIsBreadcrumbItem(e){return e instanceof n.UUIBreadcrumbItemElement}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label","breadcrumb"),this.setAttribute("role","navigation")}handleSlotChange(){if(this.slotNodes.length>0){const e=this.slotNodes[this.slotNodes.length-1];e.setAttribute("aria-current","page"),this.elementIsBreadcrumbItem(e)&&(e.lastItem=!0)}}render(){return u`<ol id="breadcrumbs-list"><slot @slotchange="${this.handleSlotChange}"></slot></ol>`}},n.UUIBreadcrumbsElement.styles=[b`:host{display:flex}#breadcrumbs-list{display:flex;list-style-type:decimal;margin-block-start:0;margin-block-end:0;margin-inline-start:0;margin-inline-end:0;padding-inline-start:0}`],bs([De({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],n.UUIBreadcrumbsElement.prototype,"slotNodes",2),n.UUIBreadcrumbsElement=bs([p("uui-breadcrumbs")],n.UUIBreadcrumbsElement);const gc=b`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,fc=Ne("uui-blink 0.9s infinite both"),yc=b`@keyframes pulse{0%{-webkit-transform:translate(-50%,-50%) scale(.2);transform:translate(-50%,-50%) scale(.2);opacity:.9}80%{-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:0}100%{-webkit-transform:translate(-50%,-50%) scale(2.2);transform:translate(-50%,-50%) scale(2.2);opacity:0}}`;Ne("pulse 0.8s ease-in-out infinite both");const qi=b`@keyframes uui-horizontal-shake{10%,90%{transform:translateX(-1px)}20%,80%{transform:translateX(1px)}30%,50%,70%{transform:translateX(-2px)}40%,60%{transform:translateX(2px)}}`,Ki=Ne("uui-horizontal-shake 600ms ease backwards");/**
|
|
309
309
|
* @license
|
|
310
310
|
* Copyright 2017 Google LLC
|
|
311
311
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
312
|
-
*/const
|
|
312
|
+
*/const le={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},$t=i=>(...e)=>({_$litDirective$:i,values:e});let kt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
313
313
|
* @license
|
|
314
314
|
* Copyright 2018 Google LLC
|
|
315
315
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
316
|
-
*/const
|
|
316
|
+
*/const ms="important",wc=" !"+ms,ke=$t(class extends kt{constructor(i){var e;if(super(i),i.type!==le.ATTRIBUTE||i.name!=="style"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce(((e,t)=>{const r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(i,[e]){const{style:t}=i.element;if(this.ht===void 0){this.ht=new Set;for(const r in e)this.ht.add(r);return this.render(e)}this.ht.forEach((r=>{e[r]==null&&(this.ht.delete(r),r.includes("-")?t.removeProperty(r):t[r]="")}));for(const r in e){const o=e[r];if(o!=null){this.ht.add(r);const s=typeof o=="string"&&o.endsWith(wc);r.includes("-")||s?t.setProperty(r,s?o.slice(0,-11):o,s?ms:""):t[r]=o}}return Y}});/**
|
|
317
317
|
* @license
|
|
318
318
|
* Copyright 2018 Google LLC
|
|
319
319
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
320
|
-
*/const w=i=>i??E;let lr=class extends P{static{this.CLICK="click"}constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};var wc=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,ms=i=>{throw TypeError(i)},et=(i,e,t,r)=>{for(var o=r>1?void 0:r?Uc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&wc(e,t,o),o},_c=(i,e,t)=>e.has(i)||ms("Cannot "+t),$c=(i,e,t)=>e.has(i)?ms("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Wi=(i,e,t)=>(_c(i,e,"access private method"),t),kt,ur,vs,gs;n.UUIButtonInlineCreateElement=class extends m{constructor(){super(...arguments),$c(this,kt),this._position=0,this.vertical=!1}_onMouseMove(e){this._position=(this.vertical?e.offsetY:e.offsetX)-5}_handleClick(e){e.preventDefault(),e.stopImmediatePropagation(),e.target?.blur?.(),this.dispatchEvent(new lr(lr.CLICK))}render(){return this.href?Wi(this,kt,vs).call(this):Wi(this,kt,gs).call(this)}},kt=new WeakSet,ur=function(){return u`<div id="plus" style="${ke({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}"><svg id="plus-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z"/></svg></div>`},vs=function(){return u`<a id="button-wrapper" @mousemove="${this._onMouseMove}" href="${w(this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" aria-label="${this.label?this.label:"create new element"}">${Wi(this,kt,ur).call(this)}</a>`},gs=function(){return u`<button id="button-wrapper" @mousemove="${this._onMouseMove}" @click="${this._handleClick}" aria-label="${this.label?this.label:"create new element"}">${Wi(this,kt,ur).call(this)}</button>`},n.UUIButtonInlineCreateElement.styles=[vc,b`:host{display:flex;position:relative;z-index:1}:host(:not([vertical])){height:20px;width:100%;margin:-10px 0}:host([vertical]){height:100%;width:20px;margin:0 -10px}#button-wrapper{display:flex;justify-content:center;align-items:center;position:absolute;z-index:1;outline:0;transition:opacity .24s;display:inline-flex;width:100%;border:none;height:100%;padding:0;text-decoration:none;background:0 0;color:currentColor;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;opacity:0}:host(:focus) #button-wrapper,:host(:focus-within) #button-wrapper,:host(:hover) #button-wrapper{opacity:1}:host(:focus) #button-wrapper:before,:host(:focus-within) #button-wrapper:before,:host(:hover) #button-wrapper:before{animation:${gc};background-color:var(--uui-color-interactive-emphasis,#3544b1);border-color:var(--uui-color-surface,#fff)!important}#button-wrapper:before{content:'';position:absolute;right:0;left:0;height:2px;background-color:transparent;border-top:1px solid transparent;border-bottom:1px solid transparent;border-radius:2px;pointer-events:none;transition:background-color 720ms ease-out,border-color 240ms}:host(:not([vertical])) #button-wrapper:before{top:50%;transform:translateY(-50%)}:host([vertical]) #button-wrapper:before{height:100%;width:2px;left:50%;transform:translateX(-50%);border-top:none;border-bottom:none;border-left:1px solid transparent;border-right:1px solid transparent}:host(:not([vertical]):not(:hover)) #plus:not(:focus){left:calc(50% - 2px)!important}:host([vertical]:not(:hover)) #plus:not(:focus){top:calc(50% - 2px)!important}#plus{position:absolute;display:flex;justify-content:center;align-items:center;pointer-events:none;box-sizing:border-box;width:28px;height:28px;border-radius:3em;font-size:14px;border:2px solid var(--uui-color-interactive-emphasis,#3544b1);color:var(--uui-color-interactive-emphasis,#3544b1);background-color:var(--uui-color-surface,#fff);opacity:0;transform:scale(0);transition:transform 240ms ease-in,opacity 240ms,left .1s linear 150ms,top .1s linear 150ms}:host(:focus) #plus,:host(:focus-within) #plus,:host(:hover) #plus{opacity:1;transform:scale(1);transition:transform 240ms cubic-bezier(.175,.885,.32,1.275),opacity 80ms,box-shadow 240ms cubic-bezier(.175,.885,.32,1.275);box-shadow:0 0 0 2px var(--uui-color-surface,#fff)}:host(:not([vertical])) #plus{margin-left:-18px}:host([vertical]) #plus{left:-4px;margin-top:-18px}#button-wrapper:focus #plus{border:2px solid var(--uui-color-focus,#3879ff);color:var(--uui-color-focus,#3879ff)}#plus-icon{width:50%;fill:currentColor}#button-wrapper:active #plus{transform:scale(1.1)}`],et([y()],n.UUIButtonInlineCreateElement.prototype,"_position",2),et([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),et([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),et([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"href",2),et([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"target",2),et([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"rel",2),n.UUIButtonInlineCreateElement=et([p("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let kc=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const _=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},fs=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,c=s.left+a.scrollX,h=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const g=d.pageX-c,f=d.pageY-h;e?.onMove&&e.onMove(g,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},A=(i,e,t)=>Math.min(Math.max(i,e),t),ys=(i,e,t)=>t+e-i,Ec=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function xc(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`;const qi=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`;const Ic=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`;const Cc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`;const Sc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`;const cr=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`;const Pc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`;const Ac=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`;const zc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,Lc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`;const Oc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;var Mc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,ws=i=>{throw TypeError(i)},ae=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Mc(e,t,o),o},Us=(i,e,t)=>e.has(i)||ws("Cannot "+t),Nc=(i,e,t)=>(Us(i,e,"read from private field"),e.get(i)),Bc=(i,e,t)=>e.has(i)?ws("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Dc=(i,e,t,r)=>(Us(i,e,"write to private field"),e.set(i,t),t),Ki;n.UUIButtonElement=class extends ve(me("",nc(m))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,Bc(this,Ki),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(Nc(this,Ki)),(this.state==="success"||this.state==="failed")&&Dc(this,Ki,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":_(this,"uui-loader-circle"),e=u`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":_(this,"uui-icon"),e=u`<uui-icon name="check" .fallback="${qi.strings[0]}"></uui-icon>`;break;case"failed":_(this,"uui-icon"),e=u`<uui-icon name="wrong" .fallback="${Oc.strings[0]}"></uui-icon>`;break;default:return E}return u`<div id="state">${e}</div>`}render(){return this.href?u`<a id="button" aria-label="${w(this.label)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button id="button" type="${this.type}" ?disabled="${this.disabled}" aria-label="${w(this.label)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}},Ki=new WeakMap,n.UUIButtonElement.styles=[Fi,b`:host{position:relative;display:inline-flex;margin-left:calc(var(--uui-button-merge-border-left,0) * -1px);--uui-button-padding-left-factor:3;--uui-button-padding-right-factor:3;--uui-button-padding-top-factor:1;--uui-button-padding-bottom-factor:1;min-height:var(--uui-button-height,var(--uui-size-11,33px));max-height:100%;cursor:pointer;text-align:center;font-size:var(--uui-button-font-size,inherit);font-weight:var(--uui-button-font-weight,500);transition:background-color 80ms,border-color 80ms,color 80ms}:host([compact]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1;--uui-button-padding-top-factor:0;--uui-button-padding-bottom-factor:0}.label{line-height:1;transition:opacity 120ms;display:flex;gap:var(--uui-size-1,3px);align-items:center}:host([state]:not([state=''])) .label{opacity:0}#state{position:absolute;opacity:0;animation-name:fadeIn;animation-delay:40ms;animation-duration:360ms;animation-fill-mode:forwards;display:flex;justify-content:center;width:100%;height:100%;align-items:center}#button{width:100%;background-color:transparent;color:inherit;font-size:inherit;border-radius:inherit;font-family:inherit;font-weight:inherit;text-align:inherit;border:none;cursor:inherit;display:inline-flex;align-items:center;justify-content:var(--uui-button-content-align,center);text-decoration:none;color:currentColor;line-height:inherit;border-width:var(--uui-button-border-width,1px);border-style:solid;border-radius:var(--uui-button-border-radius,var(--uui-border-radius,3px));cursor:pointer;padding:calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));box-shadow:none;transition:var(--uui-button-transition,none)}#button:focus-visible{outline:2px solid var(--color-emphasis)}a:not([href]):active,button[disabled]:active{animation:${Gi}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}#icon-check,#icon-wrong{display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}:host(:not([color]):not([look=primary])),:host([color='']:not([look=primary])),:host([color=default]:not([look=primary])){--uui-button-contrast-hover:var(--uui-color-default-emphasis,#3544b1)}:host([color=warning][look=outline]) #button,:host([color=warning][look=placeholder]) #button{--uui-button-contrast-hover:var(--color-standalone)}#button{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(
|
|
320
|
+
*/const w=i=>i??E;let ar=class extends P{static{this.CLICK="click"}constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};var Uc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,vs=i=>{throw TypeError(i)},tt=(i,e,t,r)=>{for(var o=r>1?void 0:r?_c(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Uc(e,t,o),o},$c=(i,e,t)=>e.has(i)||vs("Cannot "+t),kc=(i,e,t)=>e.has(i)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Xi=(i,e,t)=>($c(i,e,"access private method"),t),Et,lr,gs,fs;n.UUIButtonInlineCreateElement=class extends m{constructor(){super(...arguments),kc(this,Et),this._position=0,this.vertical=!1}_onMouseMove(e){this._position=(this.vertical?e.offsetY:e.offsetX)-5}_handleClick(e){e.preventDefault(),e.stopImmediatePropagation(),e.target?.blur?.(),this.dispatchEvent(new ar(ar.CLICK))}render(){return this.href?Xi(this,Et,gs).call(this):Xi(this,Et,fs).call(this)}},Et=new WeakSet,lr=function(){return u`<div id="plus" style="${ke({left:this.vertical?"":this._position+"px",top:this.vertical?this._position+"px":""})}"><svg id="plus-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M420.592 214.291H296.104V89.804h-83.102v124.487H88.518v83.104h124.484v124.488h83.102V297.395h124.488z"/></svg></div>`},gs=function(){return u`<a id="button-wrapper" @mousemove="${this._onMouseMove}" href="${w(this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" aria-label="${this.label?this.label:"create new element"}">${Xi(this,Et,lr).call(this)}</a>`},fs=function(){return u`<button id="button-wrapper" @mousemove="${this._onMouseMove}" @click="${this._handleClick}" aria-label="${this.label?this.label:"create new element"}">${Xi(this,Et,lr).call(this)}</button>`},n.UUIButtonInlineCreateElement.styles=[gc,b`:host{display:flex;position:relative;z-index:1}:host(:not([vertical])){height:20px;width:100%;margin:-10px 0}:host([vertical]){height:100%;width:20px;margin:0 -10px}#button-wrapper{display:flex;justify-content:center;align-items:center;position:absolute;z-index:1;outline:0;transition:opacity .24s;display:inline-flex;width:100%;border:none;height:100%;padding:0;text-decoration:none;background:0 0;color:currentColor;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;opacity:0}:host(:focus) #button-wrapper,:host(:focus-within) #button-wrapper,:host(:hover) #button-wrapper{opacity:1}:host(:focus) #button-wrapper:before,:host(:focus-within) #button-wrapper:before,:host(:hover) #button-wrapper:before{animation:${fc};background-color:var(--uui-color-interactive-emphasis,#3544b1);border-color:var(--uui-color-surface,#fff)!important}#button-wrapper:before{content:'';position:absolute;right:0;left:0;height:2px;background-color:transparent;border-top:1px solid transparent;border-bottom:1px solid transparent;border-radius:2px;pointer-events:none;transition:background-color 720ms ease-out,border-color 240ms}:host(:not([vertical])) #button-wrapper:before{top:50%;transform:translateY(-50%)}:host([vertical]) #button-wrapper:before{height:100%;width:2px;left:50%;transform:translateX(-50%);border-top:none;border-bottom:none;border-left:1px solid transparent;border-right:1px solid transparent}:host(:not([vertical]):not(:hover)) #plus:not(:focus){left:calc(50% - 2px)!important}:host([vertical]:not(:hover)) #plus:not(:focus){top:calc(50% - 2px)!important}#plus{position:absolute;display:flex;justify-content:center;align-items:center;pointer-events:none;box-sizing:border-box;width:28px;height:28px;border-radius:3em;font-size:14px;border:2px solid var(--uui-color-interactive-emphasis,#3544b1);color:var(--uui-color-interactive-emphasis,#3544b1);background-color:var(--uui-color-surface,#fff);opacity:0;transform:scale(0);transition:transform 240ms ease-in,opacity 240ms,left .1s linear 150ms,top .1s linear 150ms}:host(:focus) #plus,:host(:focus-within) #plus,:host(:hover) #plus{opacity:1;transform:scale(1);transition:transform 240ms cubic-bezier(.175,.885,.32,1.275),opacity 80ms,box-shadow 240ms cubic-bezier(.175,.885,.32,1.275);box-shadow:0 0 0 2px var(--uui-color-surface,#fff)}:host(:not([vertical])) #plus{margin-left:-18px}:host([vertical]) #plus{left:-4px;margin-top:-18px}#button-wrapper:focus #plus{border:2px solid var(--uui-color-focus,#3879ff);color:var(--uui-color-focus,#3879ff)}#plus-icon{width:50%;fill:currentColor}#button-wrapper:active #plus{transform:scale(1.1)}`],tt([y()],n.UUIButtonInlineCreateElement.prototype,"_position",2),tt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),tt([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),tt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"href",2),tt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"target",2),tt([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"rel",2),n.UUIButtonInlineCreateElement=tt([p("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let Ec=class{constructor(e,t){this._callback=e,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(t)}setDuration(e){this._duration=e,this._timerId!==null&&this.restart()}start(){this._timerId===null&&this.resume()}restart(){this._remaining=this._duration,this.resume()}pause(){this._timerId!==null&&(window.clearTimeout(this._timerId),this._timerId=null,this._remaining!==null&&(this._remaining-=Date.now()-this._startTime))}resume(){this._timerId!==null&&window.clearTimeout(this._timerId),this._remaining===null&&(this._remaining=this._duration),this._startTime=Date.now(),this._timerId=window.setTimeout(this._onComplete,this._remaining)}destroy(){this.pause()}};const _=(i,e,t=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(e)||console.warn(`%c ${i.nodeName} requires ${e} element to be registered!`,"font-weight: bold;",t,i)},ys=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,c=s.left+a.scrollX,h=s.top+a.scrollY;let d;if("TouchEvent"in window&&o instanceof TouchEvent)d=o.touches[0];else if(o instanceof MouseEvent)d=o;else return;const g=d.pageX-c,f=d.pageY-h;e?.onMove&&e.onMove(g,f)}function r(){document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r),e?.onStop&&e.onStop()}document.addEventListener("pointermove",t,{passive:!0}),document.addEventListener("pointerup",r),e?.initialEvent&&t(e.initialEvent)},A=(i,e,t)=>Math.min(Math.max(i,e),t),ws=(i,e,t)=>t+e-i,xc=(i,e,t)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(e)&&r.getAttribute(e)===t,s=r.querySelector(`[${e}="${t}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${e}="${t}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function Ic(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`;const Yi=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`;const Cc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`;const Sc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`;const Pc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`;const ur=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`;const Ac=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`;const zc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`;const Lc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,Oc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`;v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`;const Mc=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;var Tc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Us=i=>{throw TypeError(i)},ee=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Tc(e,t,o),o},_s=(i,e,t)=>e.has(i)||Us("Cannot "+t),Bc=(i,e,t)=>(_s(i,e,"read from private field"),e.get(i)),Dc=(i,e,t)=>e.has(i)?Us("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Vc=(i,e,t,r)=>(_s(i,e,"write to private field"),e.set(i,t),t),Zi;n.UUIButtonElement=class extends ve(me("",sc(m))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.title="",Dc(this,Zi),this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}async focus(){await this.updateComplete,this._button.focus()}async blur(){await this.updateComplete,this._button.blur()}async click(){await this.updateComplete,this._button.click()}_onHostClick(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}if(this._internals?.form)switch(this.type){case"reset":this._internals.form.reset();break;case"button":break;default:this._internals.form.requestSubmit?this._internals.form.requestSubmit():this._internals.form.dispatchEvent(new SubmitEvent("submit"));break}this._togglePopover()}updated(e){super.updated(e),e.has("state")&&(clearTimeout(Bc(this,Zi)),(this.state==="success"||this.state==="failed")&&Vc(this,Zi,setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":_(this,"uui-loader-circle"),e=u`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":_(this,"uui-icon"),e=u`<uui-icon name="check" .fallback="${Yi.strings[0]}"></uui-icon>`;break;case"failed":_(this,"uui-icon"),e=u`<uui-icon name="wrong" .fallback="${Mc.strings[0]}"></uui-icon>`;break;default:return E}return u`<div id="state">${e}</div>`}render(){return this.href?u`<a id="button" aria-label="${w(this.label)}" title="${w(this.title===""?void 0:this.title)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button id="button" type="${this.type}" ?disabled="${this.disabled}" aria-label="${w(this.label)}" title="${w(this.title===""?void 0:this.title)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}},Zi=new WeakMap,n.UUIButtonElement.styles=[qi,b`:host{position:relative;display:inline-flex;margin-left:calc(var(--uui-button-merge-border-left,0) * -1px);--uui-button-padding-left-factor:3;--uui-button-padding-right-factor:3;--uui-button-padding-top-factor:1;--uui-button-padding-bottom-factor:1;min-height:var(--uui-button-height,var(--uui-size-11,33px));max-height:100%;cursor:pointer;text-align:center;font-size:var(--uui-button-font-size,inherit);font-weight:var(--uui-button-font-weight,500);transition:background-color 80ms,border-color 80ms,color 80ms}:host([compact]){--uui-button-padding-left-factor:1;--uui-button-padding-right-factor:1;--uui-button-padding-top-factor:0;--uui-button-padding-bottom-factor:0}.label{line-height:1;transition:opacity 120ms;display:flex;gap:var(--uui-size-1,3px);align-items:center}:host([state]:not([state=''])) .label{opacity:0}#state{position:absolute;opacity:0;animation-name:fadeIn;animation-delay:40ms;animation-duration:360ms;animation-fill-mode:forwards;display:flex;justify-content:center;width:100%;height:100%;align-items:center}#button{width:100%;background-color:transparent;color:inherit;font-size:inherit;border-radius:inherit;font-family:inherit;font-weight:inherit;text-align:inherit;border:none;cursor:inherit;display:inline-flex;align-items:center;justify-content:var(--uui-button-content-align,center);text-decoration:none;color:currentColor;line-height:inherit;border-width:var(--uui-button-border-width,1px);border-style:solid;border-radius:var(--uui-button-border-radius,var(--uui-border-radius,3px));cursor:pointer;padding:calc(var(--uui-size-2,6px) * var(--uui-button-padding-top-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-right-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-bottom-factor)) calc(var(--uui-size-2,6px) * var(--uui-button-padding-left-factor));box-shadow:none;transition:var(--uui-button-transition,none)}#button:focus-visible{outline:2px solid var(--uui-focus-outline-color,var(--color-emphasis))}a:not([href]):active,button[disabled]:active{animation:${Ki}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}#icon-check,#icon-wrong{display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}:host(:not([color]):not([look=primary])),:host([color='']:not([look=primary])),:host([color=default]:not([look=primary])){--uui-button-contrast-hover:var(--uui-color-default-emphasis,#3544b1)}:host([color=warning][look=outline]) #button,:host([color=warning][look=placeholder]) #button{--uui-button-contrast-hover:var(--color-standalone)}#button{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(
|
|
321
321
|
28,
|
|
322
322
|
35,
|
|
323
323
|
59
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
226,
|
|
350
350
|
60,
|
|
351
351
|
107
|
|
352
|
-
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host([disabled]) #button{--color:var(--uui-color-disabled,#f3f3f5);--color-standalone:var(--uui-color-disabled-contrast,#c4c4c4);--color-emphasis:var(--uui-color-disabled,#f3f3f5);--color-contrast:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent)}:host(:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,transparent)}:host([look=primary]) #button{background-color:var(--uui-button-background-color,var(--color));color:var(--uui-button-contrast,var(--color-contrast));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=primary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--color-emphasis));color:var(--uui-button-contrast-hover,var(--color-contrast));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=primary]) #button:focus-visible{outline-offset:2px}:host([look=primary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=secondary]) #button{background-color:var(--uui-button-background-color,var(--uui-color-surface-alt,#f3f3f5));color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=secondary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=secondary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=outline]) #button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2));font-weight:var(--uui-button-font-weight,700)}:host([look=outline]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=outline][disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}:host([look=placeholder]) #button{border-style:dashed;background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2))}:host([look=placeholder]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=placeholder][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}`],ae([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),ae([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),ae([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),ae([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),ae([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),ae([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),ae([l({type:String})],n.UUIButtonElement.prototype,"href",2),ae([l({type:String})],n.UUIButtonElement.prototype,"target",2),ae([l({type:String})],n.UUIButtonElement.prototype,"rel",2),ae([S("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=ae([p("uui-button")],n.UUIButtonElement);let ri=class extends P{constructor(){super(...arguments),this.text=null}static{this.COPIED="copied"}static{this.COPYING="copying"}};var Vc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,_s=i=>{throw TypeError(i)},Xi=(i,e,t,r)=>{for(var o=r>1?void 0:r?jc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vc(e,t,o),o},$s=(i,e,t)=>e.has(i)||_s("Cannot "+t),hr=(i,e,t)=>($s(i,e,"read from private field"),t?t.call(i):e.get(i)),ks=(i,e,t)=>e.has(i)?_s("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Hc=(i,e,t,r)=>($s(i,e,"write to private field"),e.set(i,t),t),ni,dr;n.UUIButtonCopyTextElement=class extends n.UUIButtonElement{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,ks(this,ni),ks(this,dr,async()=>{this.state="waiting";let e=this.text;if(this.copyFrom){const r=document.getElementById(this.copyFrom);if(r)"value"in r?e=r.value:e=r.textContent??r.innerText??"";else{console.error(`Element ID ${this.copyFrom} not found to copy from`),this.state="failed";return}}const t=new ri(ri.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const r=new ri(ri.COPIED);r.text=e,this.dispatchEvent(r),Hc(this,ni,setTimeout(()=>{this.state="success"},this.animationStateDelay))}catch(r){this.state="failed",console.error("Error copying to clipboard",r)}}),_(this,"uui-icon"),this.addEventListener("click",hr(this,dr))}disconnectedCallback(){super.disconnectedCallback(),hr(this,ni)&&clearTimeout(hr(this,ni))}renderLabel(){return u`<slot class="label"><uui-icon name="copy"></uui-icon></slot>`}},ni=new WeakMap,dr=new WeakMap,n.UUIButtonCopyTextElement.styles=n.UUIButtonElement.styles,Xi([l({type:String})],n.UUIButtonCopyTextElement.prototype,"text",2),Xi([l({type:String,attribute:"copy-from"})],n.UUIButtonCopyTextElement.prototype,"copyFrom",2),Xi([l({type:Number,attribute:"animation-state-delay"})],n.UUIButtonCopyTextElement.prototype,"animationStateDelay",2),n.UUIButtonCopyTextElement=Xi([p("uui-button-copy-text")],n.UUIButtonCopyTextElement);var Rc=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUICheckboxElement=class extends ne{renderCheckbox(){return u`<div id="ticker"><div id="icon-check">${this.indeterminate?Ac:qi}</div></div>`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...ne.styles,Fi,b`:host{--uui-checkbox-size:18px}#ticker{position:relative;grid-area:'input';display:flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:var(--uui-checkbox-size);height:var(--uui-checkbox-size);border-radius:var(--uui-checkbox-border-radius,var(--uui-border-radius,3px));color:var(--uui-toggle-color,var(--uui-color-selected-contrast,#fff));background-color:var(--uui-toggle-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-checkbox-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-checkbox-size) * .7)}label:hover input:not([disabled])+#ticker{border-color:var(--uui-checkbox-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}label:focus #ticker{border-color:var(--uui-checkbox-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked:not([disabled])+#ticker,input:indeterminate:not([disabled])+#ticker{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker,label:hover input:indeterminate:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#ticker,label:focus input:indeterminate+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-check{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:fill 120ms,opacity 120ms;color:var(--uui-color-selected-contrast,#fff);opacity:0}#ticker::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:calc(var(--uui-checkbox-border-radius,var(--uui-border-radius,3px)) * .5);background-color:var(--uui-color-selected,#3544b1);transition:transform 120ms ease,opacity 120ms,background-color 120ms;transform:scale(0);opacity:0}label:hover input:checked:not([disabled])+#ticker::before,label:hover input:indeterminate:not([disabled])+#ticker::before{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before,input:indeterminate+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check,input:indeterminate+#ticker #icon-check{opacity:1}label:focus input:checked+#ticker,label:focus input:indeterminate+#ticker{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:focus+#ticker{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled],[readonly])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([disabled],[readonly])) label:active input:indeterminate+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:focus input:indeterminate+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine]):invalid) label:hover input:indeterminate:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) #ticker,:host(:not([pristine])[internals-invalid]) label:focus input:checked+#ticker,:host(:not([pristine])[internals-invalid]) label:focus input:indeterminate+#ticker,:host(:not([pristine])[internals-invalid]) label:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) label:hover input:indeterminate:not([disabled])+#ticker{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}:host([disabled]) #ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:checked+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:indeterminate+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker::before{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #ticker{animation:${Gi}}:host([disabled]) input:checked+#ticker #icon-check,:host([disabled]) input:indeterminate+#ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],n.UUICheckboxElement=Rc([p("uui-checkbox")],n.UUICheckboxElement);let si=class extends P{static{this.OPEN="open"}};var Fc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,Et=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Fc(e,t,o),o};n.UUICardElement=class extends Hi(ft(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new si(si.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new si(si.OPEN)))}renderCheckbox(){if(this.selectable)return u`<uui-checkbox id="select-checkbox" label="select" tabindex="-1" ?checked="${this.selected}" @click="${e=>e.stopPropagation()}" @change="${()=>this.click()}"></uui-checkbox>`}render(){return u`<slot id="open-part"></slot><div id="select-border"></div>`}},n.UUICardElement.styles=[vt,b`:host{position:relative;display:flex;width:100%;justify-content:center;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));border-radius:var(--uui-border-radius,3px);min-height:var(--uui-layout-medium);background-color:var(--uui-color-surface,#fff);--uui-card-border-width:3px;transition:box-shadow .1s ease-out}:host([selectable]:focus-visible){outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width)}:host() *{outline-color:var(--uui-color-focus,#3879ff)}:host([error])::before{content:'';position:absolute;pointer-events:none;inset:0;width:100%;height:100%;z-index:1;box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-invalid,#d42054);border-radius:var(--uui-border-radius,3px)}button{font-size:inherit;font-family:inherit;border:0;padding:0;background-color:transparent;text-align:left;color:var(--uui-color-text,#060606)}a{text-decoration:none;color:inherit;line-height:initial}a:focus,button:focus{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([selectable]) #select-border{position:absolute;z-index:2;top:-2px;left:-2px;right:-2px;bottom:-2px;pointer-events:none;opacity:0;transition:opacity 120ms}:host([selectable]) #select-border::after{content:'';position:absolute;width:100%;height:100%;box-sizing:border-box;border:2px solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + 2px);box-shadow:0 0 4px 0 var(--uui-color-selected,#3544b1),inset 0 0 2px 0 var(--uui-color-selected,#3544b1)}:host([selected]) #select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border{opacity:.33}:host([selectable][selected]:hover) #select-border{opacity:.8}:host([selectable]:not([selected])) #open-part:hover+#select-border{opacity:0}:host([selectable][selected]) #open-part:hover+#select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border::after{animation:not-selected--hover 1.2s infinite}@keyframes not-selected--hover{0%,100%{opacity:.66}50%{opacity:1}}:host([selectable][selected]:hover) #select-border::after{animation:selected--hover 1.4s infinite}@keyframes selected--hover{0%,100%{opacity:1}50%{opacity:.66}}:host([selectable]) #open-part:hover+#select-border::after{animation:none}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}#select-checkbox{position:absolute;top:var(--uui-size-4,12px);left:var(--uui-size-4,12px);opacity:0;transition:opacity 120ms;z-index:3}#select-checkbox[checked],:host(:focus) #select-checkbox,:host(:focus-within) #select-checkbox,:host(:hover) #select-checkbox{opacity:1}`],Et([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),Et([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),Et([l({type:String})],n.UUICardElement.prototype,"href",2),Et([l({type:String})],n.UUICardElement.prototype,"target",2),Et([l({type:String})],n.UUICardElement.prototype,"rel",2),n.UUICardElement=Et([p("uui-card")],n.UUICardElement);var Wc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,Es=i=>{throw TypeError(i)},Yi=(i,e,t,r)=>{for(var o=r>1?void 0:r?qc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wc(e,t,o),o},Kc=(i,e,t)=>e.has(i)||Es("Cannot "+t),Xc=(i,e,t)=>e.has(i)?Es("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ai=(i,e,t)=>(Kc(i,e,"access private method"),t),tt,xs,Is,Cs,pr;n.UUICardBlockTypeElement=class extends n.UUICardElement{constructor(){super(...arguments),Xc(this,tt),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return u`${ai(this,tt,Cs).call(this)} ${this.href?ai(this,tt,Is).call(this):ai(this,tt,xs).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},tt=new WeakSet,xs=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" class="uui-text" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${ai(this,tt,pr).call(this)}</button>`},Is=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" class="uui-text" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${ai(this,tt,pr).call(this)}</a>`},Cs=function(){return u`<div id="portrait"><slot></slot></div>`},pr=function(){return u`<div id="content"><span title="${this.name}" id="name">${this.name}</span> <small title="${w(this.description)}">${this.description}<slot name="description"></slot></small></div>`},n.UUICardBlockTypeElement.styles=[...n.UUICardElement.styles,b`:host{background-color:var(--uui-color-surface-alt,#f3f3f5)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#portrait{display:flex;justify-content:center;min-height:150px;max-height:150px;width:100%;margin-bottom:var(--uui-size-layout-2,30px)}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;max-width:100%;max-height:100%;font-size:var(--uui-size-8,24px)}#open-part{position:absolute;z-index:1;inset:0;color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #name{text-decoration:underline}#open-part #name,#open-part small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}#content{position:relative;display:flex;flex-direction:column;width:100%;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;text-align:left;word-break:break-word;padding-top:var(--uui-size-space-3,9px)}#content::before{content:'';position:absolute;inset:0;z-index:-1;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);pointer-events:none;opacity:.96}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}:host([selectable]) #open-part{inset:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host(:not([selectable])) #content{padding:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host([selectable]) #content::before{inset:calc(var(--uui-size-space-3,9px) * -1) calc(var(--uui-size-space-4,12px) * -1);top:0}`],Yi([l({type:String})],n.UUICardBlockTypeElement.prototype,"name",2),Yi([l({type:String})],n.UUICardBlockTypeElement.prototype,"description",2),Yi([l({type:String,attribute:"background"})],n.UUICardBlockTypeElement.prototype,"background",1),n.UUICardBlockTypeElement=Yi([p("uui-card-block-type")],n.UUICardBlockTypeElement);var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Ss=i=>{throw TypeError(i)},Zi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Yc(e,t,o),o},Qc=(i,e,t)=>e.has(i)||Ss("Cannot "+t),Jc=(i,e,t)=>e.has(i)?Ss("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Qi=(i,e,t)=>(Qc(i,e,"access private method"),t),xt,br,Ps,As;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),Jc(this,xt),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
352
|
+
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host([disabled]) #button{--color:var(--uui-color-disabled,#f3f3f5);--color-standalone:var(--uui-color-disabled-contrast,#c4c4c4);--color-emphasis:var(--uui-color-disabled,#f3f3f5);--color-contrast:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent)}:host(:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,transparent)}:host([look=primary]) #button{background-color:var(--uui-button-background-color,var(--color));color:var(--uui-button-contrast,var(--color-contrast));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=primary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--color-emphasis));color:var(--uui-button-contrast-hover,var(--color-contrast));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=primary]) #button:focus-visible{outline-offset:2px}:host([look=primary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=secondary]) #button{background-color:var(--uui-button-background-color,var(--uui-color-surface-alt,#f3f3f5));color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,transparent);font-weight:var(--uui-button-font-weight,700)}:host([look=secondary]:hover) #button{background-color:var(--uui-button-background-color-hover,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover,transparent)}:host([look=secondary][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-contrast));border-color:var(--uui-button-border-color-disabled,var(--color))}:host([look=outline]) #button{background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2));font-weight:var(--uui-button-font-weight,700)}:host([look=outline]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=outline][disabled]) #button{background-color:var(--uui-button-background-color-disabled,transparent);color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}:host([look=placeholder]) #button{border-style:dashed;background-color:var(--uui-button-background-color,transparent);color:var(--uui-button-contrast,var(--color-standalone));border-color:var(--uui-button-border-color,var(--uui-color-border-standalone,#c2c2c2))}:host([look=placeholder]:not([disabled]):hover) #button{background-color:var(--uui-button-background-color-hover,transparent);color:var(--uui-button-contrast-hover,var(--color-standalone));border-color:var(--uui-button-border-color-hover)}:host([look=placeholder][disabled]) #button{background-color:var(--uui-button-background-color-disabled,var(--color));color:var(--uui-button-contrast-disabled,var(--color-standalone));border-color:var(--uui-button-border-color-disabled,var(--color-standalone))}`],ee([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),ee([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),ee([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),ee([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),ee([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),ee([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),ee([l({type:String})],n.UUIButtonElement.prototype,"href",2),ee([l({type:String})],n.UUIButtonElement.prototype,"target",2),ee([l({type:String})],n.UUIButtonElement.prototype,"rel",2),ee([l({type:String})],n.UUIButtonElement.prototype,"title",2),ee([S("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=ee([p("uui-button")],n.UUIButtonElement);let ri=class extends P{constructor(){super(...arguments),this.text=null}static{this.COPIED="copied"}static{this.COPYING="copying"}};var jc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,$s=i=>{throw TypeError(i)},Qi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&jc(e,t,o),o},ks=(i,e,t)=>e.has(i)||$s("Cannot "+t),cr=(i,e,t)=>(ks(i,e,"read from private field"),t?t.call(i):e.get(i)),Es=(i,e,t)=>e.has(i)?$s("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Rc=(i,e,t,r)=>(ks(i,e,"write to private field"),e.set(i,t),t),ni,hr;n.UUIButtonCopyTextElement=class extends n.UUIButtonElement{constructor(){super(),this.text="",this.copyFrom="",this.animationStateDelay=250,Es(this,ni),Es(this,hr,async()=>{this.state="waiting";let e=this.text;if(this.copyFrom){const r=document.getElementById(this.copyFrom);if(r)"value"in r?e=r.value:e=r.textContent??r.innerText??"";else{console.error(`Element ID ${this.copyFrom} not found to copy from`),this.state="failed";return}}const t=new ri(ri.COPYING);t.text=e,this.dispatchEvent(t),t.text!=null&&(e=t.text);try{await navigator.clipboard.writeText(e);const r=new ri(ri.COPIED);r.text=e,this.dispatchEvent(r),Rc(this,ni,setTimeout(()=>{this.state="success"},this.animationStateDelay))}catch(r){this.state="failed",console.error("Error copying to clipboard",r)}}),_(this,"uui-icon"),this.addEventListener("click",cr(this,hr))}disconnectedCallback(){super.disconnectedCallback(),cr(this,ni)&&clearTimeout(cr(this,ni))}renderLabel(){return u`<slot class="label"><uui-icon name="copy"></uui-icon></slot>`}},ni=new WeakMap,hr=new WeakMap,n.UUIButtonCopyTextElement.styles=n.UUIButtonElement.styles,Qi([l({type:String})],n.UUIButtonCopyTextElement.prototype,"text",2),Qi([l({type:String,attribute:"copy-from"})],n.UUIButtonCopyTextElement.prototype,"copyFrom",2),Qi([l({type:Number,attribute:"animation-state-delay"})],n.UUIButtonCopyTextElement.prototype,"animationStateDelay",2),n.UUIButtonCopyTextElement=Qi([p("uui-button-copy-text")],n.UUIButtonCopyTextElement);var Fc=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUICheckboxElement=class extends ae{renderCheckbox(){return u`<div id="ticker"><div id="icon-check">${this.indeterminate?zc:Yi}</div></div>`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...ae.styles,qi,b`:host{--uui-checkbox-size:18px}#ticker{position:relative;grid-area:'input';display:flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;width:var(--uui-checkbox-size);height:var(--uui-checkbox-size);border-radius:var(--uui-checkbox-border-radius,var(--uui-border-radius,3px));color:var(--uui-toggle-color,var(--uui-color-selected-contrast,#fff));background-color:var(--uui-toggle-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-checkbox-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-checkbox-size) * .7)}label:hover input:not([disabled])+#ticker{border-color:var(--uui-checkbox-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}label:focus #ticker{border-color:var(--uui-checkbox-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-checkbox-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked:not([disabled])+#ticker,input:indeterminate:not([disabled])+#ticker{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker,label:hover input:indeterminate:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#ticker,label:focus input:indeterminate+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-check{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:fill 120ms,opacity 120ms;color:var(--uui-color-selected-contrast,#fff);opacity:0}#ticker::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:calc(var(--uui-checkbox-border-radius,var(--uui-border-radius,3px)) * .5);background-color:var(--uui-color-selected,#3544b1);transition:transform 120ms ease,opacity 120ms,background-color 120ms;transform:scale(0);opacity:0}label:hover input:checked:not([disabled])+#ticker::before,label:hover input:indeterminate:not([disabled])+#ticker::before{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before,input:indeterminate+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check,input:indeterminate+#ticker #icon-check{opacity:1}label:focus input:checked+#ticker,label:focus input:indeterminate+#ticker{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:focus+#ticker{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled],[readonly])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([disabled],[readonly])) label:active input:indeterminate+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:focus input:indeterminate+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine]):invalid) label:hover input:indeterminate:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) #ticker,:host(:not([pristine])[internals-invalid]) label:focus input:checked+#ticker,:host(:not([pristine])[internals-invalid]) label:focus input:indeterminate+#ticker,:host(:not([pristine])[internals-invalid]) label:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker,:host(:not([pristine])[internals-invalid]) label:hover input:indeterminate:not([disabled])+#ticker{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}:host([disabled]) #ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:checked+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) input:indeterminate+#ticker{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker::before{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #ticker{animation:${Ki}}:host([disabled]) input:checked+#ticker #icon-check,:host([disabled]) input:indeterminate+#ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],n.UUICheckboxElement=Fc([p("uui-checkbox")],n.UUICheckboxElement);let si=class extends P{static{this.OPEN="open"}};var Gc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,xt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Gc(e,t,o),o};n.UUICardElement=class extends Gi(yt(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new si(si.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new si(si.OPEN)))}renderCheckbox(){if(this.selectable)return u`<uui-checkbox id="select-checkbox" label="select" tabindex="-1" ?checked="${this.selected}" @click="${e=>e.stopPropagation()}" @change="${()=>this.click()}"></uui-checkbox>`}render(){return u`<slot id="open-part"></slot><div id="select-border"></div>`}},n.UUICardElement.styles=[gt,b`:host{position:relative;display:flex;width:100%;justify-content:center;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));border-radius:var(--uui-border-radius,3px);min-height:var(--uui-layout-medium);background-color:var(--uui-color-surface,#fff);--uui-card-border-width:3px;transition:box-shadow .1s ease-out}:host([selectable]:focus-visible){outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width)}:host() *{outline-color:var(--uui-color-focus,#3879ff)}:host([error])::before{content:'';position:absolute;pointer-events:none;inset:0;width:100%;height:100%;z-index:1;box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-invalid,#d42054);border-radius:var(--uui-border-radius,3px)}button{font-size:inherit;font-family:inherit;border:0;padding:0;background-color:transparent;text-align:left;color:var(--uui-color-text,#060606)}a{text-decoration:none;color:inherit;line-height:initial}a:focus,button:focus{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([selectable]) #select-border{position:absolute;z-index:2;top:-2px;left:-2px;right:-2px;bottom:-2px;pointer-events:none;opacity:0;transition:opacity 120ms}:host([selectable]) #select-border::after{content:'';position:absolute;width:100%;height:100%;box-sizing:border-box;border:2px solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + 2px);box-shadow:0 0 4px 0 var(--uui-color-selected,#3544b1),inset 0 0 2px 0 var(--uui-color-selected,#3544b1)}:host([selected]) #select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border{opacity:.33}:host([selectable][selected]:hover) #select-border{opacity:.8}:host([selectable]:not([selected])) #open-part:hover+#select-border{opacity:0}:host([selectable][selected]) #open-part:hover+#select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border::after{animation:not-selected--hover 1.2s infinite}@keyframes not-selected--hover{0%,100%{opacity:.66}50%{opacity:1}}:host([selectable][selected]:hover) #select-border::after{animation:selected--hover 1.4s infinite}@keyframes selected--hover{0%,100%{opacity:1}50%{opacity:.66}}:host([selectable]) #open-part:hover+#select-border::after{animation:none}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}#select-checkbox{position:absolute;top:var(--uui-size-4,12px);left:var(--uui-size-4,12px);opacity:0;transition:opacity 120ms;z-index:3}#select-checkbox[checked],:host(:focus) #select-checkbox,:host(:focus-within) #select-checkbox,:host(:hover) #select-checkbox{opacity:1}`],xt([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),xt([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),xt([l({type:String})],n.UUICardElement.prototype,"href",2),xt([l({type:String})],n.UUICardElement.prototype,"target",2),xt([l({type:String})],n.UUICardElement.prototype,"rel",2),n.UUICardElement=xt([p("uui-card")],n.UUICardElement);var qc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,xs=i=>{throw TypeError(i)},Ji=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&qc(e,t,o),o},Xc=(i,e,t)=>e.has(i)||xs("Cannot "+t),Yc=(i,e,t)=>e.has(i)?xs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ai=(i,e,t)=>(Xc(i,e,"access private method"),t),it,Is,Cs,Ss,dr;n.UUICardBlockTypeElement=class extends n.UUICardElement{constructor(){super(...arguments),Yc(this,it),this.name=""}get background(){}set background(e){this.style.backgroundColor=e??""}render(){return u`${ai(this,it,Ss).call(this)} ${this.href?ai(this,it,Cs).call(this):ai(this,it,Is).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},it=new WeakSet,Is=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" class="uui-text" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${ai(this,it,dr).call(this)}</button>`},Cs=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" class="uui-text" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${ai(this,it,dr).call(this)}</a>`},Ss=function(){return u`<div id="portrait"><slot></slot></div>`},dr=function(){return u`<div id="content"><span title="${this.name}" id="name">${this.name}</span> <small title="${w(this.description)}">${this.description}<slot name="description"></slot></small></div>`},n.UUICardBlockTypeElement.styles=[...n.UUICardElement.styles,b`:host{background-color:var(--uui-color-surface-alt,#f3f3f5)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#portrait{display:flex;justify-content:center;min-height:150px;max-height:150px;width:100%;margin-bottom:var(--uui-size-layout-2,30px)}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;max-width:100%;max-height:100%;font-size:var(--uui-size-8,24px)}#open-part{position:absolute;z-index:1;inset:0;color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #name{text-decoration:underline}#open-part #name,#open-part small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}#content{position:relative;display:flex;flex-direction:column;width:100%;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;text-align:left;word-break:break-word;padding-top:var(--uui-size-space-3,9px)}#content::before{content:'';position:absolute;inset:0;z-index:-1;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);pointer-events:none;opacity:.96}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}:host([selectable]) #open-part{inset:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host(:not([selectable])) #content{padding:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host([selectable]) #content::before{inset:calc(var(--uui-size-space-3,9px) * -1) calc(var(--uui-size-space-4,12px) * -1);top:0}`],Ji([l({type:String})],n.UUICardBlockTypeElement.prototype,"name",2),Ji([l({type:String})],n.UUICardBlockTypeElement.prototype,"description",2),Ji([l({type:String,attribute:"background"})],n.UUICardBlockTypeElement.prototype,"background",1),n.UUICardBlockTypeElement=Ji([p("uui-card-block-type")],n.UUICardBlockTypeElement);var Zc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,Ps=i=>{throw TypeError(i)},eo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qc(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zc(e,t,o),o},Jc=(i,e,t)=>e.has(i)||Ps("Cannot "+t),eh=(i,e,t)=>e.has(i)?Ps("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),to=(i,e,t)=>(Jc(i,e,"access private method"),t),It,pr,As,zs;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),eh(this,It),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
353
353
|
xmlns="http://www.w3.org/2000/svg"
|
|
354
354
|
viewBox="0 0 24 24"
|
|
355
355
|
fill="none"
|
|
@@ -360,19 +360,19 @@
|
|
|
360
360
|
id="icon">
|
|
361
361
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
362
362
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
363
|
-
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return _(this,"uui-icon"),u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small><slot id="default"></slot>`}render(){return u`${this.href?Qi(this,xt,As).call(this):Qi(this,xt,Ps).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},xt=new WeakSet,br=function(){return u`<span id="content" class="uui-text"><span id="item"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}</span><div title="${this.name}" id="name">${this.name}<slot name="name"></slot></div></span>${this.renderDetail()}</span>`},Ps=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${Qi(this,xt,br).call(this)}</button>`},As=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${Qi(this,xt,br).call(this)}</a>`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,b`:host{min-width:250px;flex-direction:column;justify-content:space-between}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name]){display:block;margin:var(--uui-size-1,3px);margin-top:var(--uui-size-3,9px)}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:calc(2 * var(--uui-size-3,9px))}#open-part{display:flex;position:relative;align-items:center;cursor:pointer;flex-grow:1;padding:var(--uui-size-space-4,12px) var(--uui-size-space-5,18px)}#open-part #name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}#content{align-self:stretch;display:flex;flex-direction:column}#item{position:relative;display:flex;align-self:stretch;line-height:normal;align-items:center;margin-top:var(--uui-size-1,3px)}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}:host([selectable]) #open-part{padding:0;margin:var(--uui-size-space-4,12px) var(--uui-size-space-5,18px)}:host([disabled]) #name{pointer-events:none}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #default{color:var(--uui-color-interactive-emphasis,#3544b1)}#select-checkbox{top:var(--uui-size-5,15px);left:var(--uui-size-6,18px)}`],Zi([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),Zi([l({type:String})],n.UUICardContentNodeElement.prototype,"detail",2),Zi([y()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=Zi([p("uui-card-content-node")],n.UUICardContentNodeElement);var eh=Object.defineProperty,th=Object.getOwnPropertyDescriptor,zs=i=>{throw TypeError(i)},li=(i,e,t,r)=>{for(var o=r>1?void 0:r?th(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&eh(e,t,o),o},ih=(i,e,t)=>e.has(i)||zs("Cannot "+t),oh=(i,e,t)=>e.has(i)?zs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ji=(i,e,t)=>(ih(i,e,"access private method"),t),It,Ls,Os,mr;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),oh(this,It),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?u`<uui-symbol-folder id="entity-symbol"></uui-symbol-folder>`:u`<uui-symbol-file id="entity-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return u`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?Ji(this,It,Os).call(this):Ji(this,It,Ls).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},It=new WeakSet,Ls=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${Ji(this,It,mr).call(this)}</button>`},Os=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${Ji(this,It,mr).call(this)}</a>`},mr=function(){return u`<div id="content" class="uui-text"><span id="name" title="${this.name}">${this.name}</span> <small id="detail">${this.detail}<slot name="detail"></slot></small></div>`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,b`#entity-symbol{align-self:center;width:60%;margin-bottom:var(--uui-size-layout-1,24px);padding:var(--uui-size-space-6,24px)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%;pointer-events:none}#open-part{position:absolute;z-index:1;inset:0;color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end}:host([disabled]) #open-part{pointer-events:none;color:var(--uui-color-contrast-disabled)}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #name{text-decoration:underline}#open-part #name{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}#content{position:relative;display:flex;flex-direction:column;font-family:inherit;box-sizing:border-box;text-align:left;word-break:break-word;padding-top:var(--uui-size-space-3,9px)}#content::before{content:'';position:absolute;inset:0;z-index:-1;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);pointer-events:none;opacity:.96}#detail{opacity:.6}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}:host([selectable]) #open-part{inset:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host(:not([selectable])) #content{padding:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host([selectable]) #content::before{inset:calc(var(--uui-size-space-3,9px) * -1) calc(var(--uui-size-space-4,12px) * -1);top:0}`],li([l({type:String})],n.UUICardMediaElement.prototype,"name",2),li([l({type:String})],n.UUICardMediaElement.prototype,"detail",2),li([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),li([y()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=li([p("uui-card-media")],n.UUICardMediaElement);var rh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,Ms=i=>{throw TypeError(i)},vr=(i,e,t,r)=>{for(var o=r>1?void 0:r?nh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&rh(e,t,o),o},sh=(i,e,t)=>e.has(i)||Ms("Cannot "+t),ah=(i,e,t)=>e.has(i)?Ms("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),eo=(i,e,t)=>(sh(i,e,"access private method"),t),Ct,Ts,Ns,gr;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),ah(this,Ct),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=xc(e.target)}}connectedCallback(){super.connectedCallback(),_(this,"uui-avatar")}render(){return u`${this.href?eo(this,Ct,Ns).call(this):eo(this,Ct,Ts).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},Ct=new WeakSet,Ts=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<div id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${eo(this,Ct,gr).call(this)}</div>`},Ns=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${eo(this,Ct,gr).call(this)}</a>`},gr=function(){return u`<div id="content">${this._avatarSlotHasContent?E:u`<uui-avatar class="avatar" name="${this.name}" size="m"></uui-avatar>`}<slot name="avatar" class="avatar" @slotchange="${this._avatarSlotChanged}"></slot><span title="${this.name}">${this.name}</span><slot></slot></div>`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,b`:host{min-width:250px}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:var(--uui-size-6,18px)}::slotted(*){text-align:center}slot[name=tag]{position:absolute;top:6px;right:6px;display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-space-4,12px);right:var(--uui-size-space-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#open-part{cursor:pointer;flex-grow:1;padding:var(--uui-size-space-5,18px) var(--uui-size-space-4,12px)}:host([disabled]) #open-part{pointer-events:none}#open-part:hover #content{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #content>span{text-decoration:underline}:host([selectable]) #open-part{padding:0;margin:var(--uui-size-space-5,18px) var(--uui-size-space-4,12px)}#content{display:flex;flex-direction:column;position:relative;align-items:center;margin:0 0 3px 0;height:100%}#content>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;vertical-align:center;margin-top:3px;font-weight:700;overflow-wrap:anywhere}.avatar{font-size:1.5em;margin-top:var(--uui-size-space-1,3px);margin-bottom:var(--uui-size-space-2,6px)}`],vr([l({type:String})],n.UUICardUserElement.prototype,"name",2),vr([y()],n.UUICardUserElement.prototype,"_avatarSlotHasContent",2),n.UUICardUserElement=vr([p("uui-card-user")],n.UUICardUserElement);var lh=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,Bs=(i,e,t,r)=>{for(var o=r>1?void 0:r?uh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&lh(e,t,o),o};n.UUICaretElement=class extends m{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUICaretElement.styles=[b`:host{display:inline-block;width:12px;vertical-align:middle}svg{transform-origin:50% 50%;transition:transform .1s cubic-bezier(.1,0,.9,1)}`],Bs([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=Bs([p("uui-caret")],n.UUICaretElement);/**
|
|
363
|
+
</svg>`}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return _(this,"uui-icon"),u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small><slot id="default"></slot>`}render(){return u`${this.href?to(this,It,zs).call(this):to(this,It,As).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},It=new WeakSet,pr=function(){return u`<span id="content" class="uui-text"><span id="item"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""}</span><div title="${this.name}" id="name">${this.name}<slot name="name"></slot></div></span>${this.renderDetail()}</span>`},As=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${to(this,It,pr).call(this)}</button>`},zs=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${to(this,It,pr).call(this)}</a>`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,b`:host{min-width:250px;flex-direction:column;justify-content:space-between}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name]){display:block;margin:var(--uui-size-1,3px);margin-top:var(--uui-size-3,9px)}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:calc(2 * var(--uui-size-3,9px))}#open-part{display:flex;position:relative;align-items:center;cursor:pointer;flex-grow:1;padding:var(--uui-size-space-4,12px) var(--uui-size-space-5,18px)}#open-part #name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}#content{align-self:stretch;display:flex;flex-direction:column}#item{position:relative;display:flex;align-self:stretch;line-height:normal;align-items:center;margin-top:var(--uui-size-1,3px)}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}:host([selectable]) #open-part{padding:0;margin:var(--uui-size-space-4,12px) var(--uui-size-space-5,18px)}:host([disabled]) #name{pointer-events:none}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #default{color:var(--uui-color-interactive-emphasis,#3544b1)}#select-checkbox{top:var(--uui-size-5,15px);left:var(--uui-size-6,18px)}`],eo([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),eo([l({type:String})],n.UUICardContentNodeElement.prototype,"detail",2),eo([y()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=eo([p("uui-card-content-node")],n.UUICardContentNodeElement);var th=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,Ls=i=>{throw TypeError(i)},li=(i,e,t,r)=>{for(var o=r>1?void 0:r?ih(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&th(e,t,o),o},oh=(i,e,t)=>e.has(i)||Ls("Cannot "+t),rh=(i,e,t)=>e.has(i)?Ls("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),io=(i,e,t)=>(oh(i,e,"access private method"),t),Ct,Os,Ms,br;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),rh(this,Ct),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}queryPreviews(e){this.hasPreview=e.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?u`<uui-symbol-folder id="entity-symbol"></uui-symbol-folder>`:u`<uui-symbol-file id="entity-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return u`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?io(this,Ct,Ms).call(this):io(this,Ct,Os).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},Ct=new WeakSet,Os=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<button id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${io(this,Ct,br).call(this)}</button>`},Ms=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${io(this,Ct,br).call(this)}</a>`},br=function(){return u`<div id="content" class="uui-text"><span id="name" title="${this.name}">${this.name}</span> <small id="detail">${this.detail}<slot name="detail"></slot></small></div>`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,b`#entity-symbol{align-self:center;width:60%;margin-bottom:var(--uui-size-layout-1,24px);padding:var(--uui-size-space-6,24px)}slot[name=tag]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2}slot[name=actions]{position:absolute;top:var(--uui-size-4,12px);right:var(--uui-size-4,12px);display:flex;justify-content:right;z-index:2;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}slot:not([name])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%;pointer-events:none}#open-part{position:absolute;z-index:1;inset:0;color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;display:flex;flex-direction:column;justify-content:flex-end}:host([disabled]) #open-part{pointer-events:none;color:var(--uui-color-contrast-disabled)}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #name{text-decoration:underline}#open-part #name{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}#content{position:relative;display:flex;flex-direction:column;font-family:inherit;box-sizing:border-box;text-align:left;word-break:break-word;padding-top:var(--uui-size-space-3,9px)}#content::before{content:'';position:absolute;inset:0;z-index:-1;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);pointer-events:none;opacity:.96}#detail{opacity:.6}:host([image]:not([image='']):hover,[image]:not([image='']):focus,[image]:not([image='']):focus-within,[selected][image]:not([image='']),[error][image]:not([image=''])) #open-part{opacity:1;transition-duration:120ms;transition-delay:0s}:host([selectable]) #open-part{inset:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host(:not([selectable])) #content{padding:var(--uui-size-space-3,9px) var(--uui-size-space-4,12px)}:host([selectable]) #content::before{inset:calc(var(--uui-size-space-3,9px) * -1) calc(var(--uui-size-space-4,12px) * -1);top:0}`],li([l({type:String})],n.UUICardMediaElement.prototype,"name",2),li([l({type:String})],n.UUICardMediaElement.prototype,"detail",2),li([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),li([y()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=li([p("uui-card-media")],n.UUICardMediaElement);var nh=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,Ts=i=>{throw TypeError(i)},mr=(i,e,t,r)=>{for(var o=r>1?void 0:r?sh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&nh(e,t,o),o},ah=(i,e,t)=>e.has(i)||Ts("Cannot "+t),lh=(i,e,t)=>e.has(i)?Ts("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),oo=(i,e,t)=>(ah(i,e,"access private method"),t),St,Ns,Bs,vr;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),lh(this,St),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=Ic(e.target)}}connectedCallback(){super.connectedCallback(),_(this,"uui-avatar")}render(){return u`${this.href?oo(this,St,Bs).call(this):oo(this,St,Ns).call(this)}<div id="select-border"></div>${this.selectable?this.renderCheckbox():E}<slot name="tag"></slot><slot name="actions"></slot>`}},St=new WeakSet,Ns=function(){const i=this.disabled?void 0:this.selectOnly?-1:0;return u`<div id="open-part" tabindex="${w(i)}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}">${oo(this,St,vr).call(this)}</div>`},Bs=function(){const i=this.disabled?void 0:this.selectOnly?-1:0,e=this.target==="_blank"?"noopener noreferrer":void 0;return u`<a id="open-part" tabindex="${w(i)}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||e)}">${oo(this,St,vr).call(this)}</a>`},vr=function(){return u`<div id="content">${this._avatarSlotHasContent?E:u`<uui-avatar class="avatar" name="${this.name}" size="m"></uui-avatar>`}<slot name="avatar" class="avatar" @slotchange="${this._avatarSlotChanged}"></slot><span title="${this.name}">${this.name}</span><slot></slot></div>`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,b`:host{min-width:250px}slot:not([name])::slotted(*){font-size:var(--uui-type-small-size,12px);line-height:var(--uui-size-6,18px)}::slotted(*){text-align:center}slot[name=tag]{position:absolute;top:6px;right:6px;display:flex;justify-content:right}slot[name=actions]{position:absolute;top:var(--uui-size-space-4,12px);right:var(--uui-size-space-4,12px);display:flex;justify-content:right;opacity:0;transition:opacity 120ms}:host(:focus) slot[name=actions],:host(:focus-within) slot[name=actions],:host(:hover) slot[name=actions]{opacity:1}#open-part{cursor:pointer;flex-grow:1;padding:var(--uui-size-space-5,18px) var(--uui-size-space-4,12px)}:host([disabled]) #open-part{pointer-events:none}#open-part:hover #content{color:var(--uui-color-interactive-emphasis,#3544b1)}#open-part:hover #content>span{text-decoration:underline}:host([selectable]) #open-part{padding:0;margin:var(--uui-size-space-5,18px) var(--uui-size-space-4,12px)}#content{display:flex;flex-direction:column;position:relative;align-items:center;margin:0 0 3px 0;height:100%}#content>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;vertical-align:center;margin-top:3px;font-weight:700;overflow-wrap:anywhere}.avatar{font-size:1.5em;margin-top:var(--uui-size-space-1,3px);margin-bottom:var(--uui-size-space-2,6px)}`],mr([l({type:String})],n.UUICardUserElement.prototype,"name",2),mr([y()],n.UUICardUserElement.prototype,"_avatarSlotHasContent",2),n.UUICardUserElement=mr([p("uui-card-user")],n.UUICardUserElement);var uh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,Ds=(i,e,t,r)=>{for(var o=r>1?void 0:r?ch(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&uh(e,t,o),o};n.UUICaretElement=class extends m{constructor(){super(),this.open=!1,console.error("\xB4uui-caret\xB4 is deprecated, please use \xB4uui-symbol-expand\xB4 or \xB4uui-symbol-sort\xB4")}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUICaretElement.styles=[b`:host{display:inline-block;width:12px;vertical-align:middle}svg{transform-origin:50% 50%;transition:transform .1s cubic-bezier(.1,0,.9,1)}`],Ds([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=Ds([p("uui-caret")],n.UUICaretElement);/**
|
|
364
364
|
* @license
|
|
365
365
|
* Copyright 2018 Google LLC
|
|
366
366
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
367
|
-
*/const fr=_t(class extends $t{constructor(i){var e;if(super(i),i.type!==se.ATTRIBUTE||i.name!=="class"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(e=>i[e]).join(" ")+" "}update(i,[e]){var t,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!(!((t=this.nt)===null||t===void 0)&&t.has(s))&&this.it.add(s);return this.render(e)}const o=i.element.classList;this.it.forEach(s=>{s in e||(o.remove(s),this.it.delete(s))});for(const s in e){const a=!!e[s];a===this.it.has(s)||!((r=this.nt)===null||r===void 0)&&r.has(s)||(a?(o.add(s),this.it.add(s)):(o.remove(s),this.it.delete(s)))}return Y}});var ch={grad:.9,turn:360,rad:360/(2*Math.PI)},Ee=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},V=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ee=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Ds=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Vs=function(i){return{r:ee(i.r,0,255),g:ee(i.g,0,255),b:ee(i.b,0,255),a:ee(i.a)}},yr=function(i){return{r:V(i.r),g:V(i.g),b:V(i.b),a:V(i.a,3)}},hh=/^#([0-9a-f]{3,8})$/i,to=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},js=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},Hs=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},Rs=function(i){return{h:Ds(i.h),s:ee(i.s,0,100),l:ee(i.l,0,100),a:ee(i.a)}},Fs=function(i){return{h:V(i.h),s:V(i.s),l:V(i.l),a:V(i.a,3)}},Gs=function(i){return Hs((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},ui=function(i){return{h:(e=js(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},dh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ph=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ws={string:[[function(i){var e=hh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?V(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?V(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=bh.exec(i)||mh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Vs({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=dh.exec(i)||ph.exec(i);if(!e)return null;var t,r,o=Rs({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(ch[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Gs(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Ee(e)&&Ee(t)&&Ee(r)?Vs({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Ee(e)||!Ee(t)||!Ee(r))return null;var a=Rs({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return Gs(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ee(e)||!Ee(t)||!Ee(r))return null;var a=function(c){return{h:Ds(c.h),s:ee(c.s,0,100),v:ee(c.v,0,100),a:ee(c.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return Hs(a)},"hsv"]]},qs=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},vh=function(i){return typeof i=="string"?qs(i.trim(),Ws.string):typeof i=="object"&&i!==null?qs(i,Ws.object):[null,void 0]},wr=function(i,e){var t=ui(i);return{h:t.h,s:ee(t.s+100*e,0,100),l:t.l,a:t.a}},Ur=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Ks=function(i,e){var t=ui(i);return{h:t.h,s:t.s,l:ee(t.l+100*e,0,100),a:t.a}},Xs=function(){function i(e){this.parsed=vh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return V(Ur(this.rgba),2)},i.prototype.isDark=function(){return Ur(this.rgba)<.5},i.prototype.isLight=function(){return Ur(this.rgba)>=.5},i.prototype.toHex=function(){return e=yr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?to(V(255*s)):"","#"+to(t)+to(r)+to(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return yr(this.rgba)},i.prototype.toRgbString=function(){return e=yr(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return Fs(ui(this.rgba))},i.prototype.toHslString=function(){return e=Fs(ui(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=js(this.rgba),{h:V(e.h),s:V(e.s),v:V(e.v),a:V(e.a,3)};var e},i.prototype.invert=function(){return te({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),te(wr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),te(wr(this.rgba,-e))},i.prototype.grayscale=function(){return te(wr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),te(Ks(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),te(Ks(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?te({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):V(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=ui(this.rgba);return typeof e=="number"?te({h:e,s:t.s,l:t.l,a:t.a}):V(t.h)},i.prototype.isEqual=function(e){return this.toHex()===te(e).toHex()},i}(),te=function(i){return i instanceof Xs?i:new Xs(i)};let _r=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var gh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,ge=(i,e,t,r)=>{for(var o=r>1?void 0:r?fh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&gh(e,t,o),o};n.UUIColorAreaElement=class extends m{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.disabled=!1,this.readonly=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000"}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=te(e);if(r.isValid()){const{h:o,s,l:a,a:c}=r.toHsl();o!==0&&(this.hue=o),this.lightness=a,this.saturation=s,this.brightness=this.getBrightness(a),this.alpha=c*100}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled||this.readonly)return;const t=this.shadowRoot.querySelector(".color-area"),r=t.querySelector(".color-area__handle"),{width:o,height:s}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,fs(t,{onMove:(a,c)=>{isNaN(a)||isNaN(c)||(this.saturation=A(a/o*100,0,100),this.brightness=A(100-c/s*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=A(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=A(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=A(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=A(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return A(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return A((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=te({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new _r(_r.CHANGE))}getHexString(e,t,r,o=100){const s=te(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return u`<div part="grid" class="color-area" style="${ke({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${fr({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${ke({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}" role="application" tabindex="${w(this.disabled?void 0:"0")}" aria-label="HSB" @keydown="${this.handleGridKeyDown}"></span></div>`}},n.UUIColorAreaElement.styles=[b`:host{display:inline-block;width:280px;height:200px}:host([disabled]){cursor:not-allowed}:host([disabled]) .color-area{user-select:none;pointer-events:none;opacity:.55}:host([readonly]){pointer-events:none;cursor:default}.color-area{position:relative;height:100%;width:100%;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);box-sizing:border-box;cursor:crosshair;forced-color-adjust:none}.color-area__handle{position:absolute;width:var(--uui-color-area-grid-handle-size,16px);height:var(--uui-color-area-grid-handle-size,16px);border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);border:solid 2px #fff;margin-top:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);margin-left:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);transition:150ms transform;box-sizing:inherit}.color-area__handle--dragging{cursor:none;transform:scale(1.5)}.color-area__handle--empty{display:none}`],ge([y()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"readonly",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),ge([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),n.UUIColorAreaElement=ge([p("uui-color-area")],n.UUIColorAreaElement);/**
|
|
367
|
+
*/const gr=$t(class extends kt{constructor(i){var e;if(super(i),i.type!==le.ATTRIBUTE||i.name!=="class"||((e=i.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){var t,r;if(this.it===void 0){this.it=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in e)e[s]&&!(!((t=this.nt)===null||t===void 0)&&t.has(s))&&this.it.add(s);return this.render(e)}const o=i.element.classList;this.it.forEach((s=>{s in e||(o.remove(s),this.it.delete(s))}));for(const s in e){const a=!!e[s];a===this.it.has(s)||!((r=this.nt)===null||r===void 0)&&r.has(s)||(a?(o.add(s),this.it.add(s)):(o.remove(s),this.it.delete(s)))}return Y}});var hh={grad:.9,turn:360,rad:360/(2*Math.PI)},Ee=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},V=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},te=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Vs=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},js=function(i){return{r:te(i.r,0,255),g:te(i.g,0,255),b:te(i.b,0,255),a:te(i.a)}},fr=function(i){return{r:V(i.r),g:V(i.g),b:V(i.b),a:V(i.a,3)}},dh=/^#([0-9a-f]{3,8})$/i,ro=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Hs=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},Rs=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},Fs=function(i){return{h:Vs(i.h),s:te(i.s,0,100),l:te(i.l,0,100),a:te(i.a)}},Gs=function(i){return{h:V(i.h),s:V(i.s),l:V(i.l),a:V(i.a,3)}},Ws=function(i){return Rs((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},ui=function(i){return{h:(e=Hs(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},ph=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qs={string:[[function(i){var e=dh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?V(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?V(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=mh.exec(i)||vh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:js({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=ph.exec(i)||bh.exec(i);if(!e)return null;var t,r,o=Fs({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(hh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Ws(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Ee(e)&&Ee(t)&&Ee(r)?js({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Ee(e)||!Ee(t)||!Ee(r))return null;var a=Fs({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return Ws(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ee(e)||!Ee(t)||!Ee(r))return null;var a=(function(c){return{h:Vs(c.h),s:te(c.s,0,100),v:te(c.v,0,100),a:te(c.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return Rs(a)},"hsv"]]},Ks=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},gh=function(i){return typeof i=="string"?Ks(i.trim(),qs.string):typeof i=="object"&&i!==null?Ks(i,qs.object):[null,void 0]},yr=function(i,e){var t=ui(i);return{h:t.h,s:te(t.s+100*e,0,100),l:t.l,a:t.a}},wr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Xs=function(i,e){var t=ui(i);return{h:t.h,s:t.s,l:te(t.l+100*e,0,100),a:t.a}},Ys=(function(){function i(e){this.parsed=gh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return V(wr(this.rgba),2)},i.prototype.isDark=function(){return wr(this.rgba)<.5},i.prototype.isLight=function(){return wr(this.rgba)>=.5},i.prototype.toHex=function(){return e=fr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?ro(V(255*s)):"","#"+ro(t)+ro(r)+ro(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return fr(this.rgba)},i.prototype.toRgbString=function(){return e=fr(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return Gs(ui(this.rgba))},i.prototype.toHslString=function(){return e=Gs(ui(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=Hs(this.rgba),{h:V(e.h),s:V(e.s),v:V(e.v),a:V(e.a,3)};var e},i.prototype.invert=function(){return ie({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),ie(yr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ie(yr(this.rgba,-e))},i.prototype.grayscale=function(){return ie(yr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ie(Xs(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ie(Xs(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?ie({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):V(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=ui(this.rgba);return typeof e=="number"?ie({h:e,s:t.s,l:t.l,a:t.a}):V(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ie(e).toHex()},i})(),ie=function(i){return i instanceof Ys?i:new Ys(i)};let Ur=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var fh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,ge=(i,e,t,r)=>{for(var o=r>1?void 0:r?yh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fh(e,t,o),o};n.UUIColorAreaElement=class extends m{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.disabled=!1,this.readonly=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000"}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=ie(e);if(r.isValid()){const{h:o,s,l:a,a:c}=r.toHsl();o!==0&&(this.hue=o),this.lightness=a,this.saturation=s,this.brightness=this.getBrightness(a),this.alpha=c*100}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled||this.readonly)return;const t=this.shadowRoot.querySelector(".color-area"),r=t.querySelector(".color-area__handle"),{width:o,height:s}=t.getBoundingClientRect();r.focus(),e.preventDefault(),e.stopPropagation(),this.isDraggingGridHandle=!0,ys(t,{onMove:(a,c)=>{isNaN(a)||isNaN(c)||(this.saturation=A(a/o*100,0,100),this.brightness=A(100-c/s*100,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())},onStop:()=>this.isDraggingGridHandle=!1,initialEvent:e})}handleGridKeyDown(e){if(this.disabled)return;const t=e.shiftKey?10:1;e.key==="ArrowLeft"&&(e.preventDefault(),this.saturation=A(this.saturation-t,0,100),this.syncValues()),e.key==="ArrowRight"&&(e.preventDefault(),this.saturation=A(this.saturation+t,0,100),this.syncValues()),e.key==="ArrowUp"&&(e.preventDefault(),this.brightness=A(this.brightness+t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),e.key==="ArrowDown"&&(e.preventDefault(),this.brightness=A(this.brightness-t,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(e){return A(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return A((200-this.saturation)*e/100*5/10,0,100)}syncValues(){const e=ie({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new Ur(Ur.CHANGE))}getHexString(e,t,r,o=100){const s=ie(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}render(){const e=this.saturation,t=100-this.brightness;return u`<div part="grid" class="color-area" style="${ke({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${gr({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${ke({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}" role="application" tabindex="${w(this.disabled?void 0:"0")}" aria-label="HSB" @keydown="${this.handleGridKeyDown}"></span></div>`}},n.UUIColorAreaElement.styles=[b`:host{display:inline-block;width:280px;height:200px}:host([disabled]){cursor:not-allowed}:host([disabled]) .color-area{user-select:none;pointer-events:none;opacity:.55}:host([readonly]){pointer-events:none;cursor:default}.color-area{position:relative;height:100%;width:100%;background-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);box-sizing:border-box;cursor:crosshair;forced-color-adjust:none}.color-area__handle{position:absolute;width:var(--uui-color-area-grid-handle-size,16px);height:var(--uui-color-area-grid-handle-size,16px);border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);border:solid 2px #fff;margin-top:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);margin-left:calc(var(--uui-color-area-grid-handle-size,16px)/ -2);transition:150ms transform;box-sizing:inherit}.color-area__handle--dragging{cursor:none;transform:scale(1.5)}.color-area__handle--empty{display:none}`],ge([y()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"readonly",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),ge([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),ge([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),n.UUIColorAreaElement=ge([p("uui-color-area")],n.UUIColorAreaElement);/**
|
|
368
368
|
* @license
|
|
369
369
|
* Copyright 2020 Google LLC
|
|
370
370
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
371
|
-
*/const{I:
|
|
371
|
+
*/const{I:wh}=Kl,Zs=i=>i.strings===void 0,Qs=()=>document.createComment(""),ci=(i,e,t)=>{var r;const o=i._$AA.parentNode,s=e===void 0?i._$AB:e._$AA;if(t===void 0){const a=o.insertBefore(Qs(),s),c=o.insertBefore(Qs(),s);t=new wh(a,c,i,i.options)}else{const a=t._$AB.nextSibling,c=t._$AM,h=c!==i;if(h){let d;(r=t._$AQ)===null||r===void 0||r.call(t,i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==c._$AU&&t._$AP(d)}if(a!==s||h){let d=t._$AA;for(;d!==a;){const g=d.nextSibling;o.insertBefore(d,s),d=g}}}return t},ot=(i,e,t=i)=>(i._$AI(e,t),i),Uh={},Js=(i,e=Uh)=>i._$AH=e,_h=i=>i._$AH,_r=i=>{var e;(e=i._$AP)===null||e===void 0||e.call(i,!1,!0);let t=i._$AA;const r=i._$AB.nextSibling;for(;t!==r;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
372
372
|
* @license
|
|
373
373
|
* Copyright 2020 Google LLC
|
|
374
374
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
375
|
-
*/const _h=_t(class extends $t{constructor(i){if(super(i),i.type!==se.PROPERTY&&i.type!==se.ATTRIBUTE&&i.type!==se.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ys(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===Y||e===E)return e;const t=i.element,r=i.name;if(i.type===se.PROPERTY){if(e===t[r])return Y}else if(i.type===se.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Y}else if(i.type===se.ATTRIBUTE&&t.getAttribute(r)===e+"")return Y;return Qs(i),e}});var $h={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},j=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},ie=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},Js=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ea=function(i){return{r:ie(i.r,0,255),g:ie(i.g,0,255),b:ie(i.b,0,255),a:ie(i.a)}},kr=function(i){return{r:j(i.r),g:j(i.g),b:j(i.b),a:j(i.a,3)}},kh=/^#([0-9a-f]{3,8})$/i,io=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ta=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},ia=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},oa=function(i){return{h:Js(i.h),s:ie(i.s,0,100),l:ie(i.l,0,100),a:ie(i.a)}},ra=function(i){return{h:j(i.h),s:j(i.s),l:j(i.l),a:j(i.a,3)}},na=function(i){return ia((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},hi=function(i){return{h:(e=ta(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Eh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ih=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ch=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Er={string:[[function(i){var e=kh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?j(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?j(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Ih.exec(i)||Ch.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ea({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Eh.exec(i)||xh.exec(i);if(!e)return null;var t,r,o=oa({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*($h[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return na(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return xe(e)&&xe(t)&&xe(r)?ea({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!xe(e)||!xe(t)||!xe(r))return null;var a=oa({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return na(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!xe(e)||!xe(t)||!xe(r))return null;var a=function(c){return{h:Js(c.h),s:ie(c.s,0,100),v:ie(c.v,0,100),a:ie(c.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return ia(a)},"hsv"]]},sa=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Sh=function(i){return typeof i=="string"?sa(i.trim(),Er.string):typeof i=="object"&&i!==null?sa(i,Er.object):[null,void 0]},xr=function(i,e){var t=hi(i);return{h:t.h,s:ie(t.s+100*e,0,100),l:t.l,a:t.a}},Ir=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},aa=function(i,e){var t=hi(i);return{h:t.h,s:t.s,l:ie(t.l+100*e,0,100),a:t.a}},oo=function(){function i(e){this.parsed=Sh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return j(Ir(this.rgba),2)},i.prototype.isDark=function(){return Ir(this.rgba)<.5},i.prototype.isLight=function(){return Ir(this.rgba)>=.5},i.prototype.toHex=function(){return e=kr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?io(j(255*s)):"","#"+io(t)+io(r)+io(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return kr(this.rgba)},i.prototype.toRgbString=function(){return e=kr(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return ra(hi(this.rgba))},i.prototype.toHslString=function(){return e=ra(hi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=ta(this.rgba),{h:j(e.h),s:j(e.s),v:j(e.v),a:j(e.a,3)};var e},i.prototype.invert=function(){return le({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),le(xr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),le(xr(this.rgba,-e))},i.prototype.grayscale=function(){return le(xr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),le(aa(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),le(aa(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?le({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):j(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=hi(this.rgba);return typeof e=="number"?le({h:e,s:t.s,l:t.l,a:t.a}):j(t.h)},i.prototype.isEqual=function(e){return this.toHex()===le(e).toHex()},i}(),le=function(i){return i instanceof oo?i:new oo(i)},la=[],Ph=function(i){i.forEach(function(e){la.indexOf(e)<0&&(e(oo,Er),la.push(e))})};function Ah(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var s={};i.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,h,d=r[this.toHex()];if(d)return d;if(a?.closest){var g=this.toRgb(),f=1/0,U="black";if(!s.length)for(var x in t)s[x]=new i(t[x]).toRgb();for(var I in t){var L=(c=g,h=s[I],Math.pow(c.r-h.r,2)+Math.pow(c.g-h.g,2)+Math.pow(c.b-h.b,2));L<f&&(f=L,U=I)}return U}},e.string.push([function(a){var c=a.toLowerCase(),h=c==="transparent"?"#0000":t[c];return h?new i(h).toRgb():null},"name"])}let di=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var zh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,N=(i,e,t,r)=>{for(var o=r>1?void 0:r?Lh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&zh(e,t,o),o};Ph([Ah]);const ua="EyeDropper"in window;n.UUIColorPickerElement=class extends me("label",m){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=le("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-icon-registry-essential"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-button-group"),_(this,"uui-color-swatches"),_(this,"uui-color-swatch"),_(this,"uui-color-area"),_(this,"uui-color-slider"),_(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:s,g:a,b:c}=this._colord.toRgb(),{h,s:d,l:g}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),U=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${s}, ${a}, ${c})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${h}, ${d}%, ${g}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${h}, ${d}%, ${g}%)`);case"hsva":return this.setLetterCase(`hsva(${h}, ${d}%, ${f}%, ${U})`);default:return""}}getBrightness(e){return A(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return A((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(r)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(t)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(r)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){ua&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=100,this.inputValue="",this._value=e,this.dispatchEvent(new di(di.CHANGE)),!0;const t=new oo(e),{h:r,s:o,l:s,a}=t.toHsl();this.hue=r,this.saturation=o,this.lightness=s,this.alpha=this.opacity?a*100:100;const c=e;return c&&c.h&&(this.hue=c.h),this._colord=t,this._syncValues(),this.dispatchEvent(new di(di.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const s=le(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return u`<div class="${fr({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}" aria-disabled="${this.disabled?"true":"false"}"><uui-color-area .value="${this.value}" .hue="${Math.round(this.hue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider hide-value-label label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleHueChange}"></uui-color-slider>${this.opacity?u`<uui-color-slider label="alpha" class="opacity-slider" .value="${Math.round(this.alpha)}" type="opacity" .color="${this.getHexString(this.hue,this.saturation,this.lightness)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleAlphaChange}"></uui-color-slider>`:""}</div><button type="button" part="preview" class="color-picker__preview color-picker__transparent-bg" title="Copy" aria-label="Copy" style="${ke({"--preview-color":e})}" @click="${this.handleCopy}"></button></div><div class="color-picker__user-input" aria-live="polite"><uui-input label="label" type="text" part="input" name="${this.name}" autocomplete="off" autocapitalize="off" spellcheck="false" .value="${_h(this.inputValue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @keydown="${this.handleInputKeyDown}" @change="${this.handleInputChange}"></uui-input><uui-button-group>${this.noFormatToggle?"":u`<uui-button label="Toggle color format" @click="${this.handleFormatToggle}" class="color-picker__toggle-format" ?disabled="${this.disabled}" compact="compact"><span>${this.format}</span></uui-button>`} ${ua?u`<uui-button label="Select a color" ?disabled="${this.disabled||this.readonly}" @click="${this.handleEyeDropper}" compact="compact"><uui-icon-registry-essential><uui-icon name="colorpicker"></uui-icon></uui-icon-registry-essential></uui-button>`:""}</uui-button-group></div>${this._renderSwatches()}</div>`}_renderSwatches(){return this.swatches?.length?u`<uui-color-swatches id="swatches" class="color-picker__swatches" label="Swatches" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleColorSwatchChange}">${this.swatches.map(e=>u`<uui-color-swatch label="${e}" .value="${e}"></uui-color-swatch>`)}</uui-color-swatches>`:E}_renderPreviewButton(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return u`<button type="button" part="trigger" aria-label="${this.label||"Open Color picker"}" class="${fr({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}" style="${ke({"--preview-color":e})}" ?disabled="${this.disabled}" aria-haspopup="true" aria-expanded="false" popovertarget="color-picker-popover"></button><uui-popover-container id="color-picker-popover">${this._renderColorPicker()}</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},n.UUIColorPickerElement.styles=[b`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;color:var(--uui-color-text,#060606);display:block;width:var(--uui-color-picker-width,280px)}:host>button{cursor:pointer}uui-popover-container{width:inherit}.color-picker{width:100%;background-color:var(--uui-color-surface,#fff);user-select:none;border:solid 1px var(--uui-color-border,#d8d7d9)}.color-picker__user-input{display:flex;padding:0 .75rem .75rem .75rem}.color-picker__user-input uui-button{border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-left:none}.color-picker__preview,.color-picker__trigger{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;position:relative;width:2.25rem;height:2.25rem;border:none;border-radius:50%;background:0 0}.color-picker__preview{cursor:copy;margin-left:.75rem;border-radius:50%}.color-picker__trigger[disabled]{cursor:not-allowed;opacity:.5}.color-picker__preview::before,.color-picker__trigger::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__transparent-bg{border:1px solid var(--uui-color-border,#d8d7d9);background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-picker__preview-color--copied{animation:pulse .75s}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--uui-palette-space-cadet-light,#26356e)}70%{box-shadow:0 0 0 .5rem transparent}100%{box-shadow:0 0 0 0 transparent}}.color-picker__controls{padding:.75rem;display:flex;align-items:center}.color-picker__sliders{flex:1 1 auto}uui-color-slider:not(:last-of-type){margin-bottom:1rem}.color-picker__toggle-format{min-width:45px;--uui-button-font-size:0.8rem}.color-picker__toggle-format>span{text-transform:uppercase}uui-color-swatches{border-top:solid 1px var(--uui-color-border,#d8d7d9);padding:.75rem}button[slot=trigger]{border-radius:50%;cursor:pointer;width:36px;height:36px}uui-input{font-size:.85rem;box-sizing:content-box;flex:1}uui-color-area{width:100%}`],N([S('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),N([S(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),N([S("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),N([y()],n.UUIColorPickerElement.prototype,"inputValue",2),N([y()],n.UUIColorPickerElement.prototype,"hue",2),N([y()],n.UUIColorPickerElement.prototype,"saturation",2),N([y()],n.UUIColorPickerElement.prototype,"lightness",2),N([y()],n.UUIColorPickerElement.prototype,"alpha",2),N([y()],n.UUIColorPickerElement.prototype,"_colord",2),N([l()],n.UUIColorPickerElement.prototype,"value",1),N([l()],n.UUIColorPickerElement.prototype,"format",2),N([l()],n.UUIColorPickerElement.prototype,"name",2),N([l()],n.UUIColorPickerElement.prototype,"size",2),N([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),N([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"readonly",2),N([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),N([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=N([p("uui-color-picker")],n.UUIColorPickerElement);var Oh={grad:.9,turn:360,rad:360/(2*Math.PI)},Ie=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},H=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},oe=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},ca=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ha=function(i){return{r:oe(i.r,0,255),g:oe(i.g,0,255),b:oe(i.b,0,255),a:oe(i.a)}},Cr=function(i){return{r:H(i.r),g:H(i.g),b:H(i.b),a:H(i.a,3)}},Mh=/^#([0-9a-f]{3,8})$/i,ro=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},da=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},pa=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},ba=function(i){return{h:ca(i.h),s:oe(i.s,0,100),l:oe(i.l,0,100),a:oe(i.a)}},ma=function(i){return{h:H(i.h),s:H(i.s),l:H(i.l),a:H(i.a,3)}},va=function(i){return pa((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},pi=function(i){return{h:(e=da(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Th=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ga={string:[[function(i){var e=Mh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?H(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?H(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Bh.exec(i)||Dh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ha({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Th.exec(i)||Nh.exec(i);if(!e)return null;var t,r,o=ba({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Oh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return va(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Ie(e)&&Ie(t)&&Ie(r)?ha({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=ba({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return va(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=function(c){return{h:ca(c.h),s:oe(c.s,0,100),v:oe(c.v,0,100),a:oe(c.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return pa(a)},"hsv"]]},fa=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Vh=function(i){return typeof i=="string"?fa(i.trim(),ga.string):typeof i=="object"&&i!==null?fa(i,ga.object):[null,void 0]},Sr=function(i,e){var t=pi(i);return{h:t.h,s:oe(t.s+100*e,0,100),l:t.l,a:t.a}},Pr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},ya=function(i,e){var t=pi(i);return{h:t.h,s:t.s,l:oe(t.l+100*e,0,100),a:t.a}},Ar=function(){function i(e){this.parsed=Vh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return H(Pr(this.rgba),2)},i.prototype.isDark=function(){return Pr(this.rgba)<.5},i.prototype.isLight=function(){return Pr(this.rgba)>=.5},i.prototype.toHex=function(){return e=Cr(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?ro(H(255*s)):"","#"+ro(t)+ro(r)+ro(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Cr(this.rgba)},i.prototype.toRgbString=function(){return e=Cr(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return ma(pi(this.rgba))},i.prototype.toHslString=function(){return e=ma(pi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=da(this.rgba),{h:H(e.h),s:H(e.s),v:H(e.v),a:H(e.a,3)};var e},i.prototype.invert=function(){return Ce({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),Ce(Sr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ce(Sr(this.rgba,-e))},i.prototype.grayscale=function(){return Ce(Sr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Ce(ya(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Ce(ya(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?Ce({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):H(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=pi(this.rgba);return typeof e=="number"?Ce({h:e,s:t.s,l:t.l,a:t.a}):H(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Ce(e).toHex()},i}(),Ce=function(i){return i instanceof Ar?i:new Ar(i)};let zr=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var jh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,ue=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&jh(e,t,o),o};n.UUIColorSliderElement=class extends me("label",m){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.readonly=!1,this.disabled=!1,this.hideValueLabel=!1}willUpdate(e){if(e.has("type")&&(this.type==="hue"?this.max=360:this.type==="saturation"?this.max=100:this.type==="lightness"?this.max=100:this.type==="opacity"&&(this.max=this.max??100),this.precision=this.precision??1,this.color)){const t=new Ar(this.color),{h:r,s:o,l:s}=t.toHsl(),{r:a,g:c,b:h}=t.toRgb(),d=this.type==="saturation"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, 0%, ${s}%), hsl(${r}, 100%, ${s}%))`:this.type==="lightness"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, ${o}%, 0%), hsl(${r}, ${o}%, 100%))`:null,g=this.type==="opacity"?`linear-gradient(to ${this.vertical?"top":"right"}, transparent 0%, rgba(${a}, ${c}, ${h}, ${this.max}%) 100%)`:null;this.style.setProperty("--uui-slider-background-image",d),this.style.setProperty("--uui-slider-hue-color",g)}}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||this.readonly||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),fs(this.container,{onMove:(o,s)=>{this.vertical?this.value=ys(A(s/r*this.max,this.min,this.max),this.min,this.max):this.value=A(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||this.readonly||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=A(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=A(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=A(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=A(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new zr(zr.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/ys(this.value,this.min,this.max):this.max/this.value)}render(){return u`<div part="slider" id="color-slider" role="slider" aria-label="${this.label}" aria-orientation="${this.vertical?"vertical":"horizontal"}" aria-valuemin="${Math.round(this.min)}" aria-valuemax="${Math.round(this.max)}" aria-valuenow="${Math.round(this.value)}" @click="${this.handleClick}" @mousedown="${this.handleDrag}" @touchstart="${this.handleDrag}" @keydown="${this.handleKeyDown}">${this.type==="opacity"?u`<div id="current-hue" style="${ke({backgroundImage:"var(--uui-slider-hue-color)"})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.cssPropCurrentValue}" tabindex="${w(this.disabled?void 0:"0")}"></span></div>${this.hideValueLabel?null:Math.round(this.value)}`}},n.UUIColorSliderElement.styles=[b`:host{--uui-slider-height:15px;--uui-slider-handle-size:17px;--uui-slider-background-image:#fff;--uui-slider-background-size:100%;--uui-slider-background-position:top left;display:block}:host([type=hue]){--uui-slider-background-image:linear-gradient(
|
|
375
|
+
*/const $h=$t(class extends kt{constructor(i){if(super(i),i.type!==le.PROPERTY&&i.type!==le.ATTRIBUTE&&i.type!==le.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Zs(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===Y||e===E)return e;const t=i.element,r=i.name;if(i.type===le.PROPERTY){if(e===t[r])return Y}else if(i.type===le.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return Y}else if(i.type===le.ATTRIBUTE&&t.getAttribute(r)===e+"")return Y;return Js(i),e}});var kh={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},j=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},oe=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},ea=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},ta=function(i){return{r:oe(i.r,0,255),g:oe(i.g,0,255),b:oe(i.b,0,255),a:oe(i.a)}},$r=function(i){return{r:j(i.r),g:j(i.g),b:j(i.b),a:j(i.a,3)}},Eh=/^#([0-9a-f]{3,8})$/i,no=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ia=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},oa=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},ra=function(i){return{h:ea(i.h),s:oe(i.s,0,100),l:oe(i.l,0,100),a:oe(i.a)}},na=function(i){return{h:j(i.h),s:j(i.s),l:j(i.l),a:j(i.a,3)}},sa=function(i){return oa((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},hi=function(i){return{h:(e=ia(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},xh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ih=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ch=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kr={string:[[function(i){var e=Eh.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?j(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?j(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Ch.exec(i)||Sh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:ta({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=xh.exec(i)||Ih.exec(i);if(!e)return null;var t,r,o=ra({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(kh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return sa(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return xe(e)&&xe(t)&&xe(r)?ta({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!xe(e)||!xe(t)||!xe(r))return null;var a=ra({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return sa(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!xe(e)||!xe(t)||!xe(r))return null;var a=(function(c){return{h:ea(c.h),s:oe(c.s,0,100),v:oe(c.v,0,100),a:oe(c.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return oa(a)},"hsv"]]},aa=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},Ph=function(i){return typeof i=="string"?aa(i.trim(),kr.string):typeof i=="object"&&i!==null?aa(i,kr.object):[null,void 0]},Er=function(i,e){var t=hi(i);return{h:t.h,s:oe(t.s+100*e,0,100),l:t.l,a:t.a}},xr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},la=function(i,e){var t=hi(i);return{h:t.h,s:t.s,l:oe(t.l+100*e,0,100),a:t.a}},so=(function(){function i(e){this.parsed=Ph(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return j(xr(this.rgba),2)},i.prototype.isDark=function(){return xr(this.rgba)<.5},i.prototype.isLight=function(){return xr(this.rgba)>=.5},i.prototype.toHex=function(){return e=$r(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?no(j(255*s)):"","#"+no(t)+no(r)+no(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return $r(this.rgba)},i.prototype.toRgbString=function(){return e=$r(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return na(hi(this.rgba))},i.prototype.toHslString=function(){return e=na(hi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=ia(this.rgba),{h:j(e.h),s:j(e.s),v:j(e.v),a:j(e.a,3)};var e},i.prototype.invert=function(){return ue({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),ue(Er(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),ue(Er(this.rgba,-e))},i.prototype.grayscale=function(){return ue(Er(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),ue(la(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),ue(la(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?ue({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):j(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=hi(this.rgba);return typeof e=="number"?ue({h:e,s:t.s,l:t.l,a:t.a}):j(t.h)},i.prototype.isEqual=function(e){return this.toHex()===ue(e).toHex()},i})(),ue=function(i){return i instanceof so?i:new so(i)},ua=[],Ah=function(i){i.forEach(function(e){ua.indexOf(e)<0&&(e(so,kr),ua.push(e))})};function zh(i,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in t)r[t[o]]=o;var s={};i.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,h,d=r[this.toHex()];if(d)return d;if(a?.closest){var g=this.toRgb(),f=1/0,U="black";if(!s.length)for(var x in t)s[x]=new i(t[x]).toRgb();for(var I in t){var L=(c=g,h=s[I],Math.pow(c.r-h.r,2)+Math.pow(c.g-h.g,2)+Math.pow(c.b-h.b,2));L<f&&(f=L,U=I)}return U}},e.string.push([function(a){var c=a.toLowerCase(),h=c==="transparent"?"#0000":t[c];return h?new i(h).toRgb():null},"name"])}let di=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Lh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,N=(i,e,t,r)=>{for(var o=r>1?void 0:r?Oh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Lh(e,t,o),o};Ah([zh]);const ca="EyeDropper"in window;n.UUIColorPickerElement=class extends me("label",m){constructor(){super(...arguments),this._value="",this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=ue("hsl(0, 0%, 0%)"),this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.readonly=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}set value(e){this.value!==e&&this.setColor(e),this._value=e}get value(){return this._value}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-icon-registry-essential"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-button-group"),_(this,"uui-color-swatches"),_(this,"uui-color-swatch"),_(this,"uui-color-area"),_(this,"uui-color-slider"),_(this,"uui-popover-container")}getFormattedValue(e){const t=this.opacity?`${e}a`:e,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:s,g:a,b:c}=this._colord.toRgb(),{h,s:d,l:g}=this._colord.toHsl(),{v:f}=this._colord.toHsv(),U=this._colord.alpha();switch(t){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${s}, ${a}, ${c})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${h}, ${d}%, ${g}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${h}, ${d}%, ${g}%)`);case"hsva":return this.setLetterCase(`hsva(${h}, ${d}%, ${f}%, ${U})`);default:return""}}getBrightness(e){return A(-1*(200*e/(this.saturation-200)),0,100)}getLightness(e){return A((200-this.saturation)*e/100*5/10,0,100)}handleFormatToggle(){const e=["hex","rgb","hsl","hsv"],t=(e.indexOf(this.format)+1)%e.length;this.format=e[t],this._syncValues()}handleAlphaChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(t.value)/100};this.setColor(r)}handleHueChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t={h:e.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(t)}handleGridChange(e){e.stopPropagation(),this._swatches?.resetSelection();const t=e.target,r={h:this.hue,s:t.saturation,l:t.lightness,a:this.alpha/100};this.setColor(r)}handleInputChange(e){e.stopImmediatePropagation(),this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue)}handleInputKeyDown(e){e.stopImmediatePropagation(),e.key==="Enter"&&(this._swatches?.resetSelection(),this.inputValue=this._input.value,this.setColor(this.inputValue),setTimeout(()=>this._input.select()))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;this.setColor(t.value)}handleCopy(){navigator.clipboard.writeText(this._input.value).then(()=>{this._previewButton.classList.add("color-picker__preview-color--copied"),this._previewButton.addEventListener("animationend",()=>{this._previewButton.classList.remove("color-picker__preview-color--copied")})})}handleEyeDropper(){ca&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){if(e===this.value)return;if(!e)return this.alpha=100,this.inputValue="",this._value=e,this.dispatchEvent(new di(di.CHANGE)),!0;const t=new so(e),{h:r,s:o,l:s,a}=t.toHsl();this.hue=r,this.saturation=o,this.lightness=s,this.alpha=this.opacity?a*100:100;const c=e;return c&&c.h&&(this.hue=c.h),this._colord=t,this._syncValues(),this.dispatchEvent(new di(di.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const s=ue(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this._value=this.inputValue}_renderColorPicker(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return u`<div class="${gr({"color-picker":!0,"color-picker--inline":this.inline,"color-picker--disabled":this.disabled})}" aria-disabled="${this.disabled?"true":"false"}"><uui-color-area .value="${this.value}" .hue="${Math.round(this.hue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider hide-value-label label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleHueChange}"></uui-color-slider>${this.opacity?u`<uui-color-slider label="alpha" class="opacity-slider" .value="${Math.round(this.alpha)}" type="opacity" .color="${this.getHexString(this.hue,this.saturation,this.lightness)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleAlphaChange}"></uui-color-slider>`:""}</div><button type="button" part="preview" class="color-picker__preview color-picker__transparent-bg" title="Copy" aria-label="Copy" style="${ke({"--preview-color":e})}" @click="${this.handleCopy}"></button></div><div class="color-picker__user-input" aria-live="polite"><uui-input label="label" type="text" part="input" name="${this.name}" autocomplete="off" autocapitalize="off" spellcheck="false" .value="${$h(this.inputValue)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @keydown="${this.handleInputKeyDown}" @change="${this.handleInputChange}"></uui-input><uui-button-group>${this.noFormatToggle?"":u`<uui-button label="Toggle color format" @click="${this.handleFormatToggle}" class="color-picker__toggle-format" ?disabled="${this.disabled}" compact="compact"><span>${this.format}</span></uui-button>`} ${ca?u`<uui-button label="Select a color" ?disabled="${this.disabled||this.readonly}" @click="${this.handleEyeDropper}" compact="compact"><uui-icon-registry-essential><uui-icon name="colorpicker"></uui-icon></uui-icon-registry-essential></uui-button>`:""}</uui-button-group></div>${this._renderSwatches()}</div>`}_renderSwatches(){return this.swatches?.length?u`<uui-color-swatches id="swatches" class="color-picker__swatches" label="Swatches" ?disabled="${this.disabled}" ?readonly="${this.readonly}" @change="${this.handleColorSwatchChange}">${this.swatches.map(e=>u`<uui-color-swatch label="${e}" .value="${e}"></uui-color-swatch>`)}</uui-color-swatches>`:E}_renderPreviewButton(){const e=this.value?`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`:"transparent";return u`<button type="button" part="trigger" aria-label="${this.label||"Open Color picker"}" class="${gr({"color-picker__trigger":!0,"color-dropdown__trigger--disabled":this.disabled,"color-dropdown__trigger--small":this.size==="small","color-dropdown__trigger--medium":this.size==="medium","color-dropdown__trigger--large":this.size==="large","color-picker__transparent-bg":!0})}" style="${ke({"--preview-color":e})}" ?disabled="${this.disabled}" aria-haspopup="true" aria-expanded="false" popovertarget="color-picker-popover"></button><uui-popover-container id="color-picker-popover">${this._renderColorPicker()}</uui-popover-container>`}render(){return this.inline?this._renderColorPicker():this._renderPreviewButton()}},n.UUIColorPickerElement.styles=[b`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;color:var(--uui-color-text,#060606);display:block;width:var(--uui-color-picker-width,280px)}:host>button{cursor:pointer}uui-popover-container{width:inherit}.color-picker{width:100%;background-color:var(--uui-color-surface,#fff);user-select:none;border:solid 1px var(--uui-color-border,#d8d7d9)}.color-picker__user-input{display:flex;padding:0 .75rem .75rem .75rem}.color-picker__user-input uui-button{border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-left:none}.color-picker__preview,.color-picker__trigger{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;position:relative;width:2.25rem;height:2.25rem;border:none;border-radius:50%;background:0 0}.color-picker__preview{cursor:copy;margin-left:.75rem;border-radius:50%}.color-picker__trigger[disabled]{cursor:not-allowed;opacity:.5}.color-picker__preview::before,.color-picker__trigger::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__transparent-bg{border:1px solid var(--uui-color-border,#d8d7d9);background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-picker__preview-color--copied{animation:pulse .75s}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--uui-palette-space-cadet-light,#26356e)}70%{box-shadow:0 0 0 .5rem transparent}100%{box-shadow:0 0 0 0 transparent}}.color-picker__controls{padding:.75rem;display:flex;align-items:center}.color-picker__sliders{flex:1 1 auto}uui-color-slider:not(:last-of-type){margin-bottom:1rem}.color-picker__toggle-format{min-width:45px;--uui-button-font-size:0.8rem}.color-picker__toggle-format>span{text-transform:uppercase}uui-color-swatches{border-top:solid 1px var(--uui-color-border,#d8d7d9);padding:.75rem}button[slot=trigger]{border-radius:50%;cursor:pointer;width:36px;height:36px}uui-input{font-size:.85rem;box-sizing:content-box;flex:1}uui-color-area{width:100%}`],N([S('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),N([S(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),N([S("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),N([y()],n.UUIColorPickerElement.prototype,"inputValue",2),N([y()],n.UUIColorPickerElement.prototype,"hue",2),N([y()],n.UUIColorPickerElement.prototype,"saturation",2),N([y()],n.UUIColorPickerElement.prototype,"lightness",2),N([y()],n.UUIColorPickerElement.prototype,"alpha",2),N([y()],n.UUIColorPickerElement.prototype,"_colord",2),N([l()],n.UUIColorPickerElement.prototype,"value",1),N([l()],n.UUIColorPickerElement.prototype,"format",2),N([l()],n.UUIColorPickerElement.prototype,"name",2),N([l()],n.UUIColorPickerElement.prototype,"size",2),N([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),N([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),N([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"readonly",2),N([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),N([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=N([p("uui-color-picker")],n.UUIColorPickerElement);var Mh={grad:.9,turn:360,rad:360/(2*Math.PI)},Ie=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},H=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},re=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},ha=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},da=function(i){return{r:re(i.r,0,255),g:re(i.g,0,255),b:re(i.b,0,255),a:re(i.a)}},Ir=function(i){return{r:H(i.r),g:H(i.g),b:H(i.b),a:H(i.a,3)}},Th=/^#([0-9a-f]{3,8})$/i,ao=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},pa=function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=Math.max(e,t,r),a=s-Math.min(e,t,r),c=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(c<0?c+6:c),s:s?a/s*100:0,v:s/255*100,a:o}},ba=function(i){var e=i.h,t=i.s,r=i.v,o=i.a;e=e/360*6,t/=100,r/=100;var s=Math.floor(e),a=r*(1-t),c=r*(1-(e-s)*t),h=r*(1-(1-e+s)*t),d=s%6;return{r:255*[r,c,a,a,h,r][d],g:255*[h,r,r,c,a,a][d],b:255*[a,a,h,r,r,c][d],a:o}},ma=function(i){return{h:ha(i.h),s:re(i.s,0,100),l:re(i.l,0,100),a:re(i.a)}},va=function(i){return{h:H(i.h),s:H(i.s),l:H(i.l),a:H(i.a,3)}},ga=function(i){return ba((t=(e=i).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},pi=function(i){return{h:(e=pa(i)).h,s:(o=(200-(t=e.s))*(r=e.v)/100)>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,t,r,o},Nh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fa={string:[[function(i){var e=Th.exec(i);return e?(i=e[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?H(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?H(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Dh.exec(i)||Vh.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:da({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(i){var e=Nh.exec(i)||Bh.exec(i);if(!e)return null;var t,r,o=ma({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Mh[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ga(o)},"hsl"]],object:[[function(i){var e=i.r,t=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return Ie(e)&&Ie(t)&&Ie(r)?da({r:Number(e),g:Number(t),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var e=i.h,t=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=ma({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return ga(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!Ie(e)||!Ie(t)||!Ie(r))return null;var a=(function(c){return{h:ha(c.h),s:re(c.s,0,100),v:re(c.v,0,100),a:re(c.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return ba(a)},"hsv"]]},ya=function(i,e){for(var t=0;t<e.length;t++){var r=e[t][0](i);if(r)return[r,e[t][1]]}return[null,void 0]},jh=function(i){return typeof i=="string"?ya(i.trim(),fa.string):typeof i=="object"&&i!==null?ya(i,fa.object):[null,void 0]},Cr=function(i,e){var t=pi(i);return{h:t.h,s:re(t.s+100*e,0,100),l:t.l,a:t.a}},Sr=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},wa=function(i,e){var t=pi(i);return{h:t.h,s:t.s,l:re(t.l+100*e,0,100),a:t.a}},Pr=(function(){function i(e){this.parsed=jh(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return H(Sr(this.rgba),2)},i.prototype.isDark=function(){return Sr(this.rgba)<.5},i.prototype.isLight=function(){return Sr(this.rgba)>=.5},i.prototype.toHex=function(){return e=Ir(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?ao(H(255*s)):"","#"+ao(t)+ao(r)+ao(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Ir(this.rgba)},i.prototype.toRgbString=function(){return e=Ir(this.rgba),t=e.r,r=e.g,o=e.b,(s=e.a)<1?"rgba("+t+", "+r+", "+o+", "+s+")":"rgb("+t+", "+r+", "+o+")";var e,t,r,o,s},i.prototype.toHsl=function(){return va(pi(this.rgba))},i.prototype.toHslString=function(){return e=va(pi(this.rgba)),t=e.h,r=e.s,o=e.l,(s=e.a)<1?"hsla("+t+", "+r+"%, "+o+"%, "+s+")":"hsl("+t+", "+r+"%, "+o+"%)";var e,t,r,o,s},i.prototype.toHsv=function(){return e=pa(this.rgba),{h:H(e.h),s:H(e.s),v:H(e.v),a:H(e.a,3)};var e},i.prototype.invert=function(){return Ce({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},i.prototype.saturate=function(e){return e===void 0&&(e=.1),Ce(Cr(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ce(Cr(this.rgba,-e))},i.prototype.grayscale=function(){return Ce(Cr(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Ce(wa(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Ce(wa(this.rgba,-e))},i.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},i.prototype.alpha=function(e){return typeof e=="number"?Ce({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):H(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=pi(this.rgba);return typeof e=="number"?Ce({h:e,s:t.s,l:t.l,a:t.a}):H(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Ce(e).toHex()},i})(),Ce=function(i){return i instanceof Pr?i:new Pr(i)};let Ar=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Hh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,ce=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Hh(e,t,o),o};n.UUIColorSliderElement=class extends me("label",m){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.readonly=!1,this.disabled=!1,this.hideValueLabel=!1}willUpdate(e){if(e.has("type")&&(this.type==="hue"?this.max=360:this.type==="saturation"?this.max=100:this.type==="lightness"?this.max=100:this.type==="opacity"&&(this.max=this.max??100),this.precision=this.precision??1,this.color)){const t=new Pr(this.color),{h:r,s:o,l:s}=t.toHsl(),{r:a,g:c,b:h}=t.toRgb(),d=this.type==="saturation"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, 0%, ${s}%), hsl(${r}, 100%, ${s}%))`:this.type==="lightness"?`linear-gradient(to ${this.vertical?"top":"right"}, hsl(${r}, ${o}%, 0%), hsl(${r}, ${o}%, 100%))`:null,g=this.type==="opacity"?`linear-gradient(to ${this.vertical?"top":"right"}, transparent 0%, rgba(${a}, ${c}, ${h}, ${this.max}%) 100%)`:null;this.style.setProperty("--uui-slider-background-image",d),this.style.setProperty("--uui-slider-hue-color",g)}}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||this.readonly||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),ys(this.container,{onMove:(o,s)=>{this.vertical?this.value=ws(A(s/r*this.max,this.min,this.max),this.min,this.max):this.value=A(o/t*this.max,this.min,this.max),this.syncValues()},initialEvent:e})}handleClick(e){this.disabled||this.readonly||(this.value=this.getValueFromMousePosition(e),this.syncValues())}handleKeyDown(e){const t=e.shiftKey?10:1;e.key==="ArrowLeft"?(e.preventDefault(),this.value=A(this.value-t,this.min,this.max),this.syncValues()):e.key==="ArrowRight"?(e.preventDefault(),this.value=A(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowUp"?(e.preventDefault(),this.value=A(this.value+t,this.min,this.max),this.syncValues()):e.key==="ArrowDown"?(e.preventDefault(),this.value=A(this.value-t,this.min,this.max),this.syncValues()):e.key==="Home"?(e.preventDefault(),this.value=this.min,this.syncValues()):e.key==="End"&&(e.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(e){return this.vertical?this.getValueFromYCoordinate(e.clientY):this.getValueFromXCoordinate(e.clientX)}getValueFromTouchPosition(e){return this.vertical?this.getValueFromYCoordinate(e.touches[0].clientY):this.getValueFromXCoordinate(e.touches[0].clientX)}getValueFromXCoordinate(e){const{left:t,width:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}getValueFromYCoordinate(e){const{top:t,height:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((e-t)/r*this.max),this.min,this.max)}roundToPrecision(e){const t=1/this.precision;return Math.ceil(e*t)/t}syncValues(){this.dispatchEvent(new Ar(Ar.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/ws(this.value,this.min,this.max):this.max/this.value)}render(){return u`<div part="slider" id="color-slider" role="slider" aria-label="${this.label}" aria-orientation="${this.vertical?"vertical":"horizontal"}" aria-valuemin="${Math.round(this.min)}" aria-valuemax="${Math.round(this.max)}" aria-valuenow="${Math.round(this.value)}" @click="${this.handleClick}" @mousedown="${this.handleDrag}" @touchstart="${this.handleDrag}" @keydown="${this.handleKeyDown}">${this.type==="opacity"?u`<div id="current-hue" style="${ke({backgroundImage:"var(--uui-slider-hue-color)"})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.cssPropCurrentValue}" tabindex="${w(this.disabled?void 0:"0")}"></span></div>${this.hideValueLabel?null:Math.round(this.value)}`}},n.UUIColorSliderElement.styles=[b`:host{--uui-slider-height:15px;--uui-slider-handle-size:17px;--uui-slider-background-image:#fff;--uui-slider-background-size:100%;--uui-slider-background-position:top left;display:block}:host([type=hue]){--uui-slider-background-image:linear-gradient(
|
|
376
376
|
to right,
|
|
377
377
|
rgb(255, 0, 0) 0%,
|
|
378
378
|
rgb(255, 255, 0) 17%,
|
|
@@ -390,29 +390,25 @@
|
|
|
390
390
|
rgb(0, 0, 255) 67%,
|
|
391
391
|
rgb(255, 0, 255) 83%,
|
|
392
392
|
rgb(255, 0, 0) 100%
|
|
393
|
-
)}:host([type=opacity]){--uui-slider-background-image:linear-gradient(
|
|
394
|
-
45deg,
|
|
395
|
-
var(--uui-palette-grey,#c4c4c4) 25%,
|
|
396
|
-
transparent 25%
|
|
397
|
-
),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, var(--uui-palette-grey,#c4c4c4) 25%, transparent 25%);--uui-slider-background-size:10px 10px;--uui-slider-background-position:0 0,0 0,-5px -5px,5px 5px}#color-slider{position:relative;background-image:var(--uui-slider-background-image);background-size:var(--uui-slider-background-size);background-position:var(--uui-slider-background-position);border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);width:100%;height:var(--uui-slider-height)}:host([vertical]) #color-slider{width:var(--uui-slider-height);height:300px}:host([disabled]){cursor:not-allowed}:host([disabled]) #color-slider{user-select:none;pointer-events:none;opacity:.55}:host([readonly]){cursor:default}:host([readonly]) #color-slider{pointer-events:none}#color-slider__handle{position:absolute;top:calc(50% - var(--uui-slider-handle-size)/ 2);width:var(--uui-slider-handle-size);height:var(--uui-slider-handle-size);background-color:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);margin-left:calc(var(--uui-slider-handle-size)/ -2);left:var(--current-value,0)}:host([vertical]) #color-slider__handle{left:unset;top:var(--current-value,100%);margin-left:-1px;margin-top:calc(var(--uui-slider-handle-size)/ -2)}::slotted(:first-child){border-radius:3px;position:absolute;top:0;left:0;width:100%;height:100%}#current-hue{border-radius:3px;position:absolute;inset:0}`],ue([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),ue([l()],n.UUIColorSliderElement.prototype,"color",2),ue([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),ue([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),ue([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),ue([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),ue([l({type:Number})],n.UUIColorSliderElement.prototype,"value",2),ue([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"readonly",2),ue([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),ue([l({type:Boolean,attribute:"hide-value-label",reflect:!0})],n.UUIColorSliderElement.prototype,"hideValueLabel",2),n.UUIColorSliderElement=ue([p("uui-color-slider")],n.UUIColorSliderElement);/**
|
|
393
|
+
)}:host([type=opacity]){--uui-slider-background-image:linear-gradient(45deg, var(--uui-palette-grey,#c4c4c4) 25%, transparent 25%),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, transparent 75%, var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg, var(--uui-palette-grey,#c4c4c4) 25%, transparent 25%);--uui-slider-background-size:10px 10px;--uui-slider-background-position:0 0,0 0,-5px -5px,5px 5px}#color-slider{position:relative;background-image:var(--uui-slider-background-image);background-size:var(--uui-slider-background-size);background-position:var(--uui-slider-background-position);border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);width:100%;height:var(--uui-slider-height)}:host([vertical]) #color-slider{width:var(--uui-slider-height);height:300px}:host([disabled]){cursor:not-allowed}:host([disabled]) #color-slider{user-select:none;pointer-events:none;opacity:.55}:host([readonly]){cursor:default}:host([readonly]) #color-slider{pointer-events:none}#color-slider__handle{position:absolute;top:calc(50% - var(--uui-slider-handle-size)/ 2);width:var(--uui-slider-handle-size);height:var(--uui-slider-handle-size);background-color:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25);margin-left:calc(var(--uui-slider-handle-size)/ -2);left:var(--current-value,0)}:host([vertical]) #color-slider__handle{left:unset;top:var(--current-value,100%);margin-left:-1px;margin-top:calc(var(--uui-slider-handle-size)/ -2)}::slotted(:first-child){border-radius:3px;position:absolute;top:0;left:0;width:100%;height:100%}#current-hue{border-radius:3px;position:absolute;inset:0}`],ce([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),ce([l()],n.UUIColorSliderElement.prototype,"color",2),ce([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),ce([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),ce([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),ce([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),ce([l({type:Number})],n.UUIColorSliderElement.prototype,"value",2),ce([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"readonly",2),ce([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),ce([l({type:Boolean,attribute:"hide-value-label",reflect:!0})],n.UUIColorSliderElement.prototype,"hideValueLabel",2),n.UUIColorSliderElement=ce([p("uui-color-slider")],n.UUIColorSliderElement);/**
|
|
398
394
|
* @license
|
|
399
395
|
* Copyright 2017 Google LLC
|
|
400
396
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
401
|
-
*/const bi=(i,e)=>{var t,r;const o=i._$AN;if(o===void 0)return!1;for(const s of o)(r=(t=s)._$AO)===null||r===void 0||r.call(t,e,!1),bi(s,e);return!0},no=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},wa=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),Gh(e)}};function Rh(i){this._$AN!==void 0?(no(this),this._$AM=i,wa(this)):this._$AM=i}function Fh(i,e=!1,t=0){const r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(r))for(let s=t;s<r.length;s++)bi(r[s],!1),no(r[s]);else r!=null&&(bi(r,!1),no(r));else bi(this,i)}const Gh=i=>{var e,t,r,o;i.type==se.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=Fh),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=Rh))};let Wh=class extends $t{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),wa(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,o;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)===null||r===void 0||r.call(this):(o=this.disconnected)===null||o===void 0||o.call(this)),t&&(bi(this,e),no(this))}setValue(e){if(Ys(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};const Lr=new WeakMap,so=_t(class extends Wh{render(i){return E}update(i,[e]){var t;const r=e!==this.G;return r&&this.G!==void 0&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=e,this.dt=(t=i.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=i.element)),E}ot(i){var e;if(typeof this.G=="function"){const t=(e=this.dt)!==null&&e!==void 0?e:globalThis;let r=Lr.get(t);r===void 0&&(r=new WeakMap,Lr.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.dt,void 0),r.set(this.G,i),i!==void 0&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,e,t;return typeof this.G=="function"?(e=Lr.get((i=this.dt)!==null&&i!==void 0?i:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var qh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Ua=i=>{throw TypeError(i)},St=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&qh(e,t,o),o},Xh=(i,e,t)=>e.has(i)||Ua("Cannot "+t),Yh=(i,e,t)=>e.has(i)?Ua("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Zh=(i,e,t)=>(Xh(i,e,"access private method"),t),Or,_a;n.UUIColorSwatchElement=class extends me("label",ft(oi(m))){constructor(){super(),Yh(this,Or),this.disabled=!1,this.readonly=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){return this._value??""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){(e.has("disabled")||e.has("readonly"))&&this.selectable&&(this.selectable=!this.disabled&&!this.readonly,this.deselectable=!this.disabled&&!this.readonly),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}focus(e){this.selectableTarget?.focus(e)}render(){return u`<button id="swatch" ${so(Zh(this,Or,_a))} aria-label="${this.label}" ?disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background:var(--uui-swatch-color,${this.color??this.value})"></div><div class="color-swatch__check" style="color:var(--uui-swatch-color,${this.color??this.value})">${qi}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?u`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:E}},Or=new WeakSet,_a=function(i){this.selectableTarget=i||this},n.UUIColorSwatchElement.styles=[b`:host{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:box-shadow .1s ease-out;flex-direction:column}*,:host(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(:focus-within:not([disabled])){outline:0}:host(:focus:not([disabled])) #swatch{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-swatch-border-width,1px);outline-style:solid;outline-offset:var(--uui-swatch-border-width,1px)}:host([selectable]) #swatch{cursor:pointer}:host([disabled]){cursor:not-allowed;opacity:.5}:host([readonly]){cursor:default}#swatch{cursor:inherit;outline:0;background:0 0;border:none;padding:0;margin:0;text-align:left;border-radius:3px}:host(:not([selectable])) #swatch:focus{outline:0}:host([selectable]) #swatch::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-swatch-border-width,1px) * -1);width:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));height:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));box-sizing:border-box;border:var(--uui-swatch-border-width,2px) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-swatch-border-width,1px));transition:opacity .1s ease-out;opacity:0}:host([selectable]:not([disabled]):hover) #swatch::after{opacity:.33}:host([selectable][selected]:not([disabled]):hover) #swatch::after{opacity:.66}:host([selectable][selected]:not([disabled])) #swatch::after{opacity:1}.color-swatch{position:relative;width:var(--uui-swatch-size,25px);height:var(--uui-swatch-size,25px);border-radius:3px;display:flex;flex-direction:column;justify-content:center;align-items:center}:host([show-label]) .color-swatch{width:120px;height:50px}.color-swatch.color-swatch--transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-swatch__color{width:100%;height:100%;border:1px solid rgba(0,0,0,.125);border-radius:inherit;box-sizing:border-box}:host([show-label]) .color-swatch__color{border-radius:3px 3px 0 0}.color-swatch__check{position:absolute;vertical-align:middle;width:calc(var(--uui-swatch-size,25px)/ 2);height:calc(var(--uui-swatch-size,25px)/ 2);line-height:0;filter:invert(1) grayscale(1) contrast(9);pointer-events:none;opacity:0}:host([selected]) .color-swatch__check{opacity:1}.label,slot[name=label]::slotted(*){font-size:var(--uui-size-4,12px)}.color-swatch__label{max-width:120px;box-sizing:border-box;padding:var(--uui-size-space-1,3px) var(--uui-size-space-2,6px);line-height:1.5;display:flex;flex-direction:column;background:#fff;border:1px solid var(--uui-color-border,#d8d7d9);border-radius:0 0 3px 3px;font-size:var(--uui-size-4,12px)}.color-swatch__label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}`],St([l()],n.UUIColorSwatchElement.prototype,"value",1),St([l()],n.UUIColorSwatchElement.prototype,"color",1),St([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),St([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"readonly",2),St([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=St([p("uui-color-swatch")],n.UUIColorSwatchElement);let mi=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,vi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Qh(e,t,o),o};n.UUIColorSwatchesElement=class extends me("label",m){constructor(){super(),this.value="",this.disabled=!1,this.readonly=!1,this._onSelected=e=>{const t=e.target;this._swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new mi(mi.CHANGE)))},this._onDeselected=e=>{const t=e.target;this._swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new mi(mi.CHANGE))))},this.addEventListener(wt.SELECTED,this._onSelected),this.addEventListener(wt.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this._swatches||this._swatches.length===0||this._swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.readonly&&e.setAttribute("readonly",""),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this._swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIColorSwatchesElement.styles=[b`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],vi([l()],n.UUIColorSwatchesElement.prototype,"value",2),vi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),vi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"readonly",2),vi([De({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"_swatches",2),n.UUIColorSwatchesElement=vi([p("uui-color-swatches")],n.UUIColorSwatchesElement);let ce=class extends P{static{this.CHANGE="change"}static{this.INNER_SLOT_CHANGE="inner-slot-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ed=Object.defineProperty,td=Object.getOwnPropertyDescriptor,$a=i=>{throw TypeError(i)},Ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?td(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ed(e,t,o),o},id=(i,e,t)=>e.has(i)||$a("Cannot "+t),od=(i,e,t)=>e.has(i)?$a("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ka=(i,e,t)=>(id(i,e,"access private method"),t),ao,Mr;n.UUIComboboxListElement=class extends m{constructor(){super(...arguments),od(this,ao),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{ka(this,ao,Mr).call(this),this._updateSelection(),this.dispatchEvent(new ce(ce.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new ce(ce.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new ce(ce.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{if(!(this._options.length<=0))switch(e.key){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),this._getActiveElement?.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(wt.SELECTED,this._onSelected),this.addEventListener(wt.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(wt.SELECTED,this._onSelected),this.removeEventListener(wt.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(e=>e.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(e=>e.value===this._activeElementValue)}_goToIndex(e){if(this._options.length===0)return;e=Math.min(Math.max(e,0),this._options.length-1);const t=this._options[e];this._activeElementValue=t.value,ka(this,ao,Mr).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>`}},ao=new WeakSet,Mr=function(){for(let e=0;e<this._activeOptions.length;e++)this._activeOptions[e].active=!1;const i=this._getActiveElement;i?i.active=!0:this._goToIndex(0)},n.UUIComboboxListElement.styles=[b`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Ve([l()],n.UUIComboboxListElement.prototype,"value",1),Ve([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Ve([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Ve([De({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Ve([De({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Ve([y()],n.UUIComboboxListElement.prototype,"_value",2),Ve([y()],n.UUIComboboxListElement.prototype,"_activeElementValue",2),n.UUIComboboxListElement=Ve([p("uui-combobox-list")],n.UUIComboboxListElement);var rd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,Pt=(i,e,t,r)=>{for(var o=r>1?void 0:r?nd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&rd(e,t,o),o};n.UUIComboboxListOptionElement=class extends ft(oi(m)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){return this._value?this._value:this.textContent?.trim()||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){return this._displayValue?this._displayValue:this.textContent?.trim()||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return u`<slot></slot>`}},n.UUIComboboxListOptionElement.styles=[b`:host{position:relative;cursor:pointer;margin:1px var(--uui-size-2,6px);border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px;padding:var(--uui-size-1,3px);padding-left:var(--uui-size-2,6px)}:host(:first-child){margin-top:6px}:host(:last-child){margin-bottom:6px}:host([selected]):host([active])::after{display:block;content:'';position:absolute;inset:0;outline:var(--uui-color-surface,#fff) solid 2px;outline-offset:-4px}:host(:hover){background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]){cursor:auto;color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]:hover){background-color:var(--uui-color-disabled,#f3f3f5)}:host([active]){outline-color:var(--uui-color-focus,#3879ff)}:host([selected]){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected,#3544b1)}:host([selected]:hover){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([selected][disabled]){color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}`],Pt([y()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),Pt([y()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),Pt([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),Pt([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),Pt([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=Pt([p("uui-combobox-list-option")],n.UUIComboboxListOptionElement);let he=class extends P{static{this.SEARCH="search"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var sd=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,Ea=i=>{throw TypeError(i)},G=(i,e,t,r)=>{for(var o=r>1?void 0:r?ad(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sd(e,t,o),o},Tr=(i,e,t)=>e.has(i)||Ea("Cannot "+t),k=(i,e,t)=>(Tr(i,e,"read from private field"),t?t.call(i):e.get(i)),F=(i,e,t)=>e.has(i)?Ea("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),xa=(i,e,t,r)=>(Tr(i,e,"write to private field"),e.set(i,t),t),lo=(i,e,t)=>(Tr(i,e,"access private method"),t),Z,At,zt,Ia,gi,uo,co,ho,Nr,po,bo,Br,mo,Lt,Dr,vo,go,Vr,fo;n.UUIComboboxElement=class extends ve(m,""){constructor(){super(...arguments),F(this,zt),this.closeLabel="Close",this.disabled=!1,this.hideExpandSymbol=!1,this.readonly=!1,this.placeholder="",F(this,Z),F(this,At),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,F(this,gi,()=>{this._isPhone=k(this,At).matches}),F(this,co,()=>requestAnimationFrame(()=>this._input.focus())),F(this,ho,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||k(this,Lt).call(this)})),F(this,Nr,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new he(he.SEARCH)),k(this,mo).call(this)}),F(this,po,()=>{this.value&&this.value!==k(this,Z)?.value&&lo(this,zt,uo).call(this)}),F(this,bo,()=>{this.value=k(this,Z)?.value||"",this.search=this.value?this.search:"",k(this,Lt).call(this),this.dispatchEvent(new he(he.CHANGE))}),F(this,Br,()=>{this.readonly||(this.open=!this.open)}),F(this,mo,()=>{this.open||this.readonly||(this.open=!0)}),F(this,Lt,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new he(he.SEARCH)))}),F(this,Dr,e=>{this.open===!1&&e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.key==="ArrowUp"||e.key==="ArrowDown")&&k(this,mo).call(this),(e.key==="Escape"||e.key==="Enter")&&k(this,Lt).call(this)}),F(this,vo,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._input.value=this._displayValue,this._input.focus(),this.dispatchEvent(new he(he.SEARCH)),this.dispatchEvent(new he(he.CHANGE)))}),F(this,go,()=>u`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" .placeholder="${this.placeholder}" autocomplete="off" .disabled="${this.disabled}" .readonly="${this.readonly}" popovertarget="combobox-popover" @click="${k(this,Br)}" @input="${k(this,Nr)}" @keydown="${k(this,Dr)}"><slot name="input-prepend" slot="prepend"></slot>${k(this,Vr).call(this)} ${this.hideExpandSymbol?E:u`<div id="expand-symbol-wrapper" slot="append"><uui-symbol-expand .open="${this._isOpen}"></uui-symbol-expand></div>`}<slot name="input-append" slot="append"></slot></uui-input>`),F(this,Vr,()=>this.disabled||this.readonly?E:u`<uui-button id="clear-button" @click="${k(this,vo)}" @keydown="${k(this,vo)}" label="clear" slot="append" compact="compact" style="height:100%" tabindex="${this.value||this.search?"":"-1"}" class="${this.value||this.search?"visible":""}"><uui-icon name="remove" .fallback="${cr.strings[0]}"></uui-icon></uui-button>`),F(this,fo,()=>u`<div id="dropdown"><uui-scroll-container tabindex="-1" id="scroll-container"><slot @slotchange="${lo(this,zt,Ia)}"></slot></uui-scroll-container></div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&lo(this,zt,uo).call(this)}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}get open(){return this._isOpen}set open(e){const t=e;this._isOpen=e;const r=this._comboboxPopoverElement;if(r)if(e){const o=this._input.offsetWidth;r.style.setProperty("--popover-width",`${o}px`),r.showPopover()}else r.hidePopover();this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",k(this,ho)),this.addEventListener("mousedown",k(this,co)),xa(this,At,window.matchMedia("(max-width: 600px)")),k(this,gi).call(this),k(this,At).addEventListener("change",k(this,gi)),_(this,"uui-icon"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-combobox-list"),_(this,"uui-scroll-container"),_(this,"uui-popover-container"),_(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",k(this,ho)),this.removeEventListener("mousedown",k(this,co)),k(this,At).removeEventListener("change",k(this,gi))}getFormElement(){return this._input}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}render(){return this._isPhone&&this.open?u`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${k(this,Lt)}">${this.closeLabel}</uui-button>${k(this,go).call(this)} ${k(this,fo).call(this)}</div>`:u`${k(this,go).call(this)}<uui-popover-container id="combobox-popover" popover="manual" placement="bottom-end">${k(this,fo).call(this)}</uui-popover-container>`}},Z=new WeakMap,At=new WeakMap,zt=new WeakSet,Ia=function(){k(this,Z)&&(k(this,Z).removeEventListener(ce.CHANGE,k(this,bo)),k(this,Z).removeEventListener(ce.INNER_SLOT_CHANGE,k(this,po)));const i=this._comboboxListElements?.[0];i&&(xa(this,Z,i),k(this,Z).for=this,k(this,Z).addEventListener(ce.CHANGE,k(this,bo)),k(this,Z).addEventListener(ce.INNER_SLOT_CHANGE,k(this,po))),this.updateComplete.then(()=>{lo(this,zt,uo).call(this)})},gi=new WeakMap,uo=function(){k(this,Z)&&(k(this,Z).value=this.value,requestAnimationFrame(()=>this._displayValue=k(this,Z).displayValue||""))},co=new WeakMap,ho=new WeakMap,Nr=new WeakMap,po=new WeakMap,bo=new WeakMap,Br=new WeakMap,mo=new WeakMap,Lt=new WeakMap,Dr=new WeakMap,vo=new WeakMap,go=new WeakMap,Vr=new WeakMap,fo=new WeakMap,n.UUIComboboxElement.styles=[b`:host{display:inline-flex}#combobox-input{width:100%;border-radius:var(--uui-size-1,3px)}#combobox-popover{width:var(--uui-dropdown-width,var(--popover-width,inherit))}#scroll-container{overflow-y:auto;width:100%;max-height:var(--uui-combobox-popover-max-height,500px)}#expand-symbol-wrapper{height:100%;padding-right:var(--uui-size-space-3,9px);display:flex;justify-content:center}#clear-button{opacity:0;transition:opacity 80ms}:host(:not([disabled]):not([readonly]):focus-within) #clear-button.visible,:host(:not([disabled]):not([readonly]):hover) #clear-button.visible{opacity:1}#dropdown{overflow:hidden;z-index:-1;background-color:var(--uui-combobox-popover-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-color-border,#d8d7d9);border-radius:var(--uui-border-radius,3px);width:100%;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23))}:host([disabled]) #caret{fill:var(--uui-color-disabled-contrast,#c4c4c4)}#phone-wrapper{position:fixed;inset:0;display:flex;flex-direction:column;z-index:1;font-size:1.1em}#phone-wrapper #dropdown{display:flex}#phone-wrapper #combobox-input{height:var(--uui-size-16,48px)}#phone-wrapper>uui-button{height:var(--uui-size-14,42px);width:100%}#phone-wrapper #scroll-container{max-height:unset}`],G([l({attribute:"value",reflect:!0})],n.UUIComboboxElement.prototype,"value",1),G([l({type:String})],n.UUIComboboxElement.prototype,"search",1),G([l({type:Boolean})],n.UUIComboboxElement.prototype,"open",1),G([l({type:String,attribute:"close-label"})],n.UUIComboboxElement.prototype,"closeLabel",2),G([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),G([l({type:Boolean,reflect:!1,attribute:"hide-expand-symbol"})],n.UUIComboboxElement.prototype,"hideExpandSymbol",2),G([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"readonly",2),G([l()],n.UUIComboboxElement.prototype,"placeholder",2),G([S("#combobox-input")],n.UUIComboboxElement.prototype,"_input",2),G([S("#combobox-popover")],n.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),G([De({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),G([y()],n.UUIComboboxElement.prototype,"_displayValue",2),G([y()],n.UUIComboboxElement.prototype,"_search",2),G([y()],n.UUIComboboxElement.prototype,"_isPhone",2),G([y()],n.UUIComboboxElement.prototype,"_isOpen",2),n.UUIComboboxElement=G([p("uui-combobox")],n.UUIComboboxElement);var ld=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,jr=(i,e,t,r)=>{for(var o=r>1?void 0:r?ud(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ld(e,t,o),o};n.UUIDialogLayoutElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return u`<h3 style="${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h3>`}renderContent(){return u`<slot></slot>`}renderActions(){return u`<slot id="actions" name="actions"></slot>`}render(){return u`${this.renderHeadline()} ${this.renderContent()} ${this.renderActions()}`}},n.UUIDialogLayoutElement.styles=[b`:host{display:block;padding:var(--uui-size-10,30px) var(--uui-size-14,42px);color:var(--uui-color-text,#060606)}#actions{margin-top:var(--uui-size-8,24px);display:flex;justify-content:end;gap:var(--uui-size-4,12px)}`],jr([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),jr([y()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=jr([p("uui-dialog-layout")],n.UUIDialogLayoutElement);var cd=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIDialogElement=class extends m{render(){return u`<slot></slot>`}},n.UUIDialogElement.styles=[b`:host{position:relative;display:block;max-width:580px;color:var(--uui-color-text,#060606);background-color:var(--uui-dialog-background-color,var(--uui-color-surface,#fff));box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22));border-radius:var(--uui-dialog-border-radius,calc(var(--uui-border-radius,3px) * 2))}`],n.UUIDialogElement=cd([p("uui-dialog")],n.UUIDialogElement);var hd=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,Ca=(i,e,t,r)=>{for(var o=r>1?void 0:r?dd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hd(e,t,o),o};n.UUISymbolFileDropzoneElement=class extends m{constructor(){super(...arguments),this.error=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="upload-icon"><path d="${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"}"/></svg>`}},n.UUISymbolFileDropzoneElement.styles=[b`:host{display:flex;flex-direction:column;align-items:center;justify-content:center}#upload-icon{fill:var(--uui-color-default,#1b264f);width:100px;transition:fill .3s ease;position:relative;z-index:2}:host([error]) #upload-icon{fill:var(--uui-color-invalid,#d42054)}`],Ca([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=Ca([p("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);let fi=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var pd=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,Ot=(i,e,t,r)=>{for(var o=r>1?void 0:r?bd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pd(e,t,o),o};n.UUIFileDropzoneElement=class extends me("",m){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.disallowFolderUpload=!1,this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const r=[],o=[];e.split(",").forEach(s=>{s=s.trim().toLowerCase(),/[a-z]+\/[a-z*]/s.test(s)?r.push(s):o.push(s.replace(/^\./,""))}),this._acceptedMimeTypes=r,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}async _getAllEntries(e){const t=[...e],r=[],o=[];for(const s of t){if(s?.kind!=="file")continue;const a=this._getEntry(s);if(a)if(a.isDirectory){if(!this.disallowFolderUpload&&this.multiple){const c=await this._mkdir(a);r.push(c)}}else{const c=s.getAsFile();if(!c)continue;this._isAccepted(c)&&o.push(c)}}return{files:o,folders:r}}_getEntry(e){let t=null;return"webkitGetAsEntry"in e?t=e.webkitGetAsEntry():"getAsEntry"in e&&(t=e.getAsEntry()),t}async _mkdir(e){const t=e.createReader(),r=[],o=[],s=a=>new Promise((c,h)=>{a.readEntries(async d=>{if(!d.length){c();return}for(const g of d)if(g.isFile){const f=await this._getAsFile(g);this._isAccepted(f)&&o.push(f)}else if(g.isDirectory){const f=await this._mkdir(g);r.push(f)}await s(a),c()},h)});return await s(t),{folderName:e.name,folders:r,files:o}}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),r=e.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o of this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("*","")))return!0;return!1}async _getAsFile(e){return new Promise((t,r)=>e.file(t,r))}async _onDrop(e){e.preventDefault(),this._dropzone.classList.remove("hover");const t=e.dataTransfer?.items;if(t){const r=await this._getAllEntries(t);if(this.multiple===!1&&r.files.length&&(r.files=[r.files[0]],r.folders=[]),!r.files.length&&!r.folders.length)return;this.dispatchEvent(new fi(fi.CHANGE,{detail:r}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.multiple===!1&&e.length>1&&e.splice(1,e.length-1);const t=e.filter(r=>this._isAccepted(r));t.length&&this.dispatchEvent(new fi(fi.CHANGE,{detail:{files:t,folders:[]}}))}render(){return u`<div id="dropzone"><uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>${this.renderLabel()} <input @click="${e=>e.stopImmediatePropagation()}" id="input" type="file" accept="${this.accept}" ?multiple="${this.multiple}" @change="${this._onFileInputChange}" aria-label="${this.label}"><slot></slot></div>`}},n.UUIFileDropzoneElement.styles=[b`#dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;box-sizing:border-box;width:100%;height:100%;padding:var(--uui-size-4,12px);border:3px solid transparent;margin:-3px;backdrop-filter:blur(2px)}#dropzone.hover{border-color:var(--uui-color-default,#1b264f)}#dropzone.hover::before{content:'';position:absolute;inset:0;opacity:.2;border-color:var(--uui-color-default,#1b264f);background-color:var(--uui-color-default,#1b264f)}#symbol{color:var(--uui-color-default,#1b264f);max-width:100%;max-height:100%}#input{position:absolute;width:0;height:0;opacity:0;display:none}`],Ot([S("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),Ot([S("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),Ot([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),Ot([l({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],n.UUIFileDropzoneElement.prototype,"disallowFolderUpload",2),Ot([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=Ot([p("uui-file-dropzone")],n.UUIFileDropzoneElement);let md=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const s=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let a=-1;const c=10**r;do e/=o,++a;while(Math.round(Math.abs(e)*c)/c>=o&&a<s.length-1);return e.toFixed(r)+" "+s[a]}};var vd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,fe=(i,e,t,r)=>{for(var o=r>1?void 0:r?gd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&vd(e,t,o),o};n.UUIFilePreviewElement=class extends m{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(r=>{this._src=r})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-file-thumbnail"),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?u`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?u`<uui-symbol-file-thumbnail .src="${this._src}" .alt="${this._name}" id="file-symbol"></uui-symbol-file-thumbnail>`:u`<uui-symbol-file id="file-symbol" .type="${this._extension}"></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return u`<span id="file-name" class="${this._url?"has-source":""}" @click="${()=>this._url?this._openSource():""}" @keydown="${()=>""}"><span id="file-name-start">${e}</span> <span id="file-name-end">${t}</span></span>`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return u`<slot id="actions" name="actions"></slot>${this._fileTypeTemplate()}<div id="file-info">${this._renderLongName()} <span id="file-size">${this._size&&!this._isDirectory?u`${md.humanFileSize(this._size,!0)}`:""}</span></div>`}},n.UUIFilePreviewElement.styles=[b`:host{position:relative;display:grid;grid-template-rows:100px 50px;width:150px;height:150px;box-sizing:border-box;aspect-ratio:1;color:var(--uui-color-text,#060606)}:host(:hover) slot[name=actions]::slotted(*){opacity:1}slot[name=actions]::slotted(*){position:absolute;top:8px;right:8px;max-width:100%;height:32px;font-size:13px;opacity:0;z-index:1;transition:opacity 150ms}#file-symbol{aspect-ratio:1/1;margin:auto;max-width:100%;max-height:100%}#file-info{min-width:0;display:flex;text-align:center;flex-direction:column;font-size:1rem}#file-name{display:flex;justify-content:center}#file-name-start{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#file-name-end{white-space:nowrap}#file-size{opacity:.6}.has-source:hover{text-decoration:underline;cursor:pointer}`],fe([y()],n.UUIFilePreviewElement.prototype,"_name",2),fe([y()],n.UUIFilePreviewElement.prototype,"_url",2),fe([y()],n.UUIFilePreviewElement.prototype,"_extension",2),fe([y()],n.UUIFilePreviewElement.prototype,"_src",2),fe([y()],n.UUIFilePreviewElement.prototype,"_size",2),fe([y()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),fe([y()],n.UUIFilePreviewElement.prototype,"_file",2),fe([y()],n.UUIFilePreviewElement.prototype,"_isImage",2),fe([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=fe([p("uui-file-preview")],n.UUIFilePreviewElement);var fd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,yo=(i,e,t,r)=>{for(var o=r>1?void 0:r?yd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fd(e,t,o),o};n.UUIFormLayoutItemElement=class extends m{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),_(this,"uui-form-validation-message")}render(){return u`<div id="label" style="${this._labelSlotHasContent?"":"display: none"}"><slot name="label" @slotchange="${this._labelSlotChanged}"></slot></div><div id="description" style="${this._descriptionSlotHasContent||this.description!==null?"":"display: none"}">${this.description}<slot name="description" @slotchange="${this._descriptionSlotChanged}"></slot></div><uui-form-validation-message><slot></slot><slot name="message" slot="message"></slot></uui-form-validation-message>`}},n.UUIFormLayoutItemElement.styles=[b`:host{position:relative;display:block;margin-top:var(--uui-size-space-5,18px);margin-bottom:var(--uui-size-space-5,18px)}#label{margin-top:-5px;margin-bottom:5px}#description{color:var(--uui-color-disabled-contrast,#c4c4c4);font-size:var(--uui-type-small-size,12px)}#label+#description{margin-top:-8px;min-height:8px}`],yo([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),yo([y()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),yo([y()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=yo([p("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
397
|
+
*/const bi=(i,e)=>{var t,r;const o=i._$AN;if(o===void 0)return!1;for(const s of o)(r=(t=s)._$AO)===null||r===void 0||r.call(t,e,!1),bi(s,e);return!0},lo=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},Ua=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),Wh(e)}};function Fh(i){this._$AN!==void 0?(lo(this),this._$AM=i,Ua(this)):this._$AM=i}function Gh(i,e=!1,t=0){const r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(r))for(let s=t;s<r.length;s++)bi(r[s],!1),lo(r[s]);else r!=null&&(bi(r,!1),lo(r));else bi(this,i)}const Wh=i=>{var e,t,r,o;i.type==le.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=Gh),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=Fh))};let qh=class extends kt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Ua(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,o;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)===null||r===void 0||r.call(this):(o=this.disconnected)===null||o===void 0||o.call(this)),t&&(bi(this,e),lo(this))}setValue(e){if(Zs(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};const zr=new WeakMap,uo=$t(class extends qh{render(i){return E}update(i,[e]){var t;const r=e!==this.G;return r&&this.G!==void 0&&this.ot(void 0),(r||this.rt!==this.lt)&&(this.G=e,this.dt=(t=i.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=i.element)),E}ot(i){var e;if(typeof this.G=="function"){const t=(e=this.dt)!==null&&e!==void 0?e:globalThis;let r=zr.get(t);r===void 0&&(r=new WeakMap,zr.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.dt,void 0),r.set(this.G,i),i!==void 0&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,e,t;return typeof this.G=="function"?(e=zr.get((i=this.dt)!==null&&i!==void 0?i:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var Kh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,_a=i=>{throw TypeError(i)},Pt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xh(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Kh(e,t,o),o},Yh=(i,e,t)=>e.has(i)||_a("Cannot "+t),Zh=(i,e,t)=>e.has(i)?_a("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Qh=(i,e,t)=>(Yh(i,e,"access private method"),t),Lr,$a;n.UUIColorSwatchElement=class extends me("label",yt(oi(m))){constructor(){super(),Zh(this,Lr),this.disabled=!1,this.readonly=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){return this._value??""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get color(){return this._color}set color(e){const t=this._color;this._color=e,this.requestUpdate("color",t)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(e){(e.has("disabled")||e.has("readonly"))&&this.selectable&&(this.selectable=!this.disabled&&!this.readonly,this.deselectable=!this.disabled&&!this.readonly),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}focus(e){this.selectableTarget?.focus(e)}render(){return u`<button id="swatch" ${uo(Qh(this,Lr,$a))} aria-label="${this.label}" ?disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background:var(--uui-swatch-color,${this.color??this.value})"></div><div class="color-swatch__check" style="color:var(--uui-swatch-color,${this.color??this.value})">${Yi}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?u`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:E}},Lr=new WeakSet,$a=function(i){this.selectableTarget=i||this},n.UUIColorSwatchElement.styles=[b`:host{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:box-shadow .1s ease-out;flex-direction:column}*,:host(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(:focus-within:not([disabled])){outline:0}:host(:focus:not([disabled])) #swatch{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-swatch-border-width,1px);outline-style:solid;outline-offset:var(--uui-swatch-border-width,1px)}:host([selectable]) #swatch{cursor:pointer}:host([disabled]){cursor:not-allowed;opacity:.5}:host([readonly]){cursor:default}#swatch{cursor:inherit;outline:0;background:0 0;border:none;padding:0;margin:0;text-align:left;border-radius:3px}:host(:not([selectable])) #swatch:focus{outline:0}:host([selectable]) #swatch::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-swatch-border-width,1px) * -1);width:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));height:calc(100% + calc(var(--uui-swatch-border-width,1px) * 2));box-sizing:border-box;border:var(--uui-swatch-border-width,2px) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-swatch-border-width,1px));transition:opacity .1s ease-out;opacity:0}:host([selectable]:not([disabled]):hover) #swatch::after{opacity:.33}:host([selectable][selected]:not([disabled]):hover) #swatch::after{opacity:.66}:host([selectable][selected]:not([disabled])) #swatch::after{opacity:1}.color-swatch{position:relative;width:var(--uui-swatch-size,25px);height:var(--uui-swatch-size,25px);border-radius:3px;display:flex;flex-direction:column;justify-content:center;align-items:center}:host([show-label]) .color-swatch{width:120px;height:50px}.color-swatch.color-swatch--transparent-bg{background-image:linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,transparent 75%,var(--uui-palette-grey,#c4c4c4) 75%),linear-gradient(45deg,var(--uui-palette-grey,#c4c4c4) 25%,transparent 25%);background-size:10px 10px;background-position:0 0,0 0,-5px -5px,5px 5px}.color-swatch__color{width:100%;height:100%;border:1px solid rgba(0,0,0,.125);border-radius:inherit;box-sizing:border-box}:host([show-label]) .color-swatch__color{border-radius:3px 3px 0 0}.color-swatch__check{position:absolute;vertical-align:middle;width:calc(var(--uui-swatch-size,25px)/ 2);height:calc(var(--uui-swatch-size,25px)/ 2);line-height:0;filter:invert(1) grayscale(1) contrast(9);pointer-events:none;opacity:0}:host([selected]) .color-swatch__check{opacity:1}.label,slot[name=label]::slotted(*){font-size:var(--uui-size-4,12px)}.color-swatch__label{max-width:120px;box-sizing:border-box;padding:var(--uui-size-space-1,3px) var(--uui-size-space-2,6px);line-height:1.5;display:flex;flex-direction:column;background:#fff;border:1px solid var(--uui-color-border,#d8d7d9);border-radius:0 0 3px 3px;font-size:var(--uui-size-4,12px)}.color-swatch__label strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}`],Pt([l()],n.UUIColorSwatchElement.prototype,"value",1),Pt([l()],n.UUIColorSwatchElement.prototype,"color",1),Pt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),Pt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"readonly",2),Pt([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=Pt([p("uui-color-swatch")],n.UUIColorSwatchElement);let mi=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Jh=Object.defineProperty,ed=Object.getOwnPropertyDescriptor,vi=(i,e,t,r)=>{for(var o=r>1?void 0:r?ed(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Jh(e,t,o),o};n.UUIColorSwatchesElement=class extends me("label",m){constructor(){super(),this.value="",this.disabled=!1,this.readonly=!1,this._onSelected=e=>{const t=e.target;this._swatches.includes(t)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new mi(mi.CHANGE)))},this._onDeselected=e=>{const t=e.target;this._swatches.includes(t)&&(this._activeElement===t&&(this._activeElement=void 0),this._selectedElement===t&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new mi(mi.CHANGE))))},this.addEventListener(Ut.SELECTED,this._onSelected),this.addEventListener(Ut.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(e){this.__activeElement&&(this.__activeElement.active=!1),e&&(e.active=!0,this.__activeElement=e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(e){e.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this._swatches||this._swatches.length===0||this._swatches.forEach(e=>{e.setAttribute("aria-checked","false"),e.setAttribute("role","radio"),this.disabled?e.setAttribute("disabled",""):e.setAttribute("selectable","selectable"),this.readonly&&e.setAttribute("readonly",""),this.value!==""&&e.value===this.value&&(e.selected=!0,e.setAttribute("aria-checked","true"),this._selectedElement=e,this._activeElement=this._selectedElement)})}resetSelection(){this._swatches.forEach(e=>{e.selected=!1,e.active=!1,e.selectable=!e.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIColorSwatchesElement.styles=[b`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],vi([l()],n.UUIColorSwatchesElement.prototype,"value",2),vi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),vi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"readonly",2),vi([De({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"_swatches",2),n.UUIColorSwatchesElement=vi([p("uui-color-swatches")],n.UUIColorSwatchesElement);let he=class extends P{static{this.CHANGE="change"}static{this.INNER_SLOT_CHANGE="inner-slot-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var td=Object.defineProperty,id=Object.getOwnPropertyDescriptor,ka=i=>{throw TypeError(i)},Ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?id(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&td(e,t,o),o},od=(i,e,t)=>e.has(i)||ka("Cannot "+t),rd=(i,e,t)=>e.has(i)?ka("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ea=(i,e,t)=>(od(i,e,"access private method"),t),co,Or;n.UUIComboboxListElement=class extends m{constructor(){super(...arguments),rd(this,co),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{Ea(this,co,Or).call(this),this._updateSelection(),this.dispatchEvent(new he(he.INNER_SLOT_CHANGE))},this._onSelected=e=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new he(he.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new he(he.CHANGE)))},this._moveIndex=e=>{const t=Math.min(Math.max(this._getActiveIndex+e,0),this._options.length-1);this._goToIndex(t)},this._onKeyDown=e=>{if(!(this._options.length<=0))switch(e.code){case"ArrowUp":e.preventDefault(),e.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":e.preventDefault(),e.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{e.preventDefault(),this._goToIndex(0);break}case"Enter":{e.preventDefault(),this._getActiveElement?.click();break}case"Space":{e.preventDefault(),e.stopPropagation(),this._getActiveElement?.click();break}case"End":{e.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(e){if(this._value===e)return;const t=this._value;this._value=e,this._updateSelection(),this.requestUpdate("value",t)}get for(){return this._for}set for(e){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=e,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(Ut.SELECTED,this._onSelected),this.addEventListener(Ut.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Ut.SELECTED,this._onSelected),this.removeEventListener(Ut.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const e of this._options)e.value===this._value?(this.displayValue=e.displayValue||"",e.selected=!0):e.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(e=>e.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(e=>e.value===this._activeElementValue)}_goToIndex(e){if(this._options.length===0)return;e=Math.min(Math.max(e,0),this._options.length-1);const t=this._options[e];this._activeElementValue=t.value,Ea(this,co,Or).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>`}},co=new WeakSet,Or=function(){for(let e=0;e<this._activeOptions.length;e++)this._activeOptions[e].active=!1;const i=this._getActiveElement;i?i.active=!0:this._goToIndex(0)},n.UUIComboboxListElement.styles=[b`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Ve([l()],n.UUIComboboxListElement.prototype,"value",1),Ve([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Ve([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Ve([De({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Ve([De({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Ve([y()],n.UUIComboboxListElement.prototype,"_value",2),Ve([y()],n.UUIComboboxListElement.prototype,"_activeElementValue",2),n.UUIComboboxListElement=Ve([p("uui-combobox-list")],n.UUIComboboxListElement);var nd=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,At=(i,e,t,r)=>{for(var o=r>1?void 0:r?sd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&nd(e,t,o),o};n.UUIComboboxListOptionElement=class extends yt(oi(m)){constructor(){super(),this._disabled=!1,this._displayValue="",this.selectable=!0,this.deselectable=!1}get value(){return this._value?this._value:this.textContent?.trim()||""}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t)}get displayValue(){return this._displayValue?this._displayValue:this.textContent?.trim()||""}set displayValue(e){const t=this._displayValue;this._displayValue=e,this.requestUpdate("displayValue",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.selectable=!this._disabled,this.requestUpdate("disabled",t)}render(){return u`<slot></slot>`}},n.UUIComboboxListOptionElement.styles=[b`:host{position:relative;cursor:pointer;margin:1px var(--uui-size-2,6px);border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px;padding:var(--uui-size-1,3px);padding-left:var(--uui-size-2,6px)}:host(:first-child){margin-top:6px}:host(:last-child){margin-bottom:6px}:host([selected]):host([active])::after{display:block;content:'';position:absolute;inset:0;outline:var(--uui-color-surface,#fff) solid 2px;outline-offset:-4px}:host(:hover){background-color:var(--uui-color-surface-emphasis,#fafafa);color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]){cursor:auto;color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]:hover){background-color:var(--uui-color-disabled,#f3f3f5)}:host([active]){outline-color:var(--uui-color-focus,#3879ff)}:host([selected]){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected,#3544b1)}:host([selected]:hover){color:var(--uui-color-selected-contrast,#fff);background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([selected][disabled]){color:var(--uui-color-disabled-contrast,#c4c4c4);background-color:var(--uui-color-disabled,#f3f3f5)}`],At([y()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),At([y()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),At([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),At([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),At([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=At([p("uui-combobox-list-option")],n.UUIComboboxListOptionElement);let de=class extends P{static{this.SEARCH="search"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,xa=i=>{throw TypeError(i)},G=(i,e,t,r)=>{for(var o=r>1?void 0:r?ld(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ad(e,t,o),o},Mr=(i,e,t)=>e.has(i)||xa("Cannot "+t),k=(i,e,t)=>(Mr(i,e,"read from private field"),t?t.call(i):e.get(i)),F=(i,e,t)=>e.has(i)?xa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ia=(i,e,t,r)=>(Mr(i,e,"write to private field"),e.set(i,t),t),ho=(i,e,t)=>(Mr(i,e,"access private method"),t),Z,zt,Lt,Ca,gi,po,bo,mo,Tr,vo,go,Nr,fi,Ot,Br,fo,yo,Dr,wo;n.UUIComboboxElement=class extends ve(m,""){constructor(){super(...arguments),F(this,Lt),this.closeLabel="Close",this.disabled=!1,this.hideExpandSymbol=!1,this.readonly=!1,this.placeholder="",F(this,Z),F(this,zt),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,F(this,gi,()=>{this._isPhone=k(this,zt).matches}),F(this,bo,()=>requestAnimationFrame(()=>this._input.focus())),F(this,mo,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||k(this,Ot).call(this)})),F(this,Tr,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new de(de.SEARCH)),k(this,fi).call(this)}),F(this,vo,()=>{this.value&&this.value!==k(this,Z)?.value&&ho(this,Lt,po).call(this)}),F(this,go,()=>{this.value=k(this,Z)?.value||"",this.search=this.value?this.search:"",k(this,Ot).call(this),this.dispatchEvent(new de(de.CHANGE))}),F(this,Nr,()=>{this.readonly||(this.open=!this.open)}),F(this,fi,()=>{this.open||this.readonly||(this.open=!0)}),F(this,Ot,()=>{this.open&&(this.open=!1,this.search="",this._input.value=this._displayValue,this.dispatchEvent(new de(de.SEARCH)))}),F(this,Br,e=>{if(this.open===!1&&e.code==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.code==="ArrowUp"||e.code==="ArrowDown")&&k(this,fi).call(this),e.code==="Space"){if(this._isOpen)return;e.preventDefault(),e.stopImmediatePropagation(),k(this,fi).call(this)}(e.code==="Escape"||e.code==="Enter")&&k(this,Ot).call(this)}),F(this,fo,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._input.value=this._displayValue,this._input.focus(),this.dispatchEvent(new de(de.SEARCH)),this.dispatchEvent(new de(de.CHANGE)))}),F(this,yo,()=>u`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" .placeholder="${this.placeholder}" autocomplete="off" .disabled="${this.disabled}" .readonly="${this.readonly}" popovertarget="combobox-popover" @click="${k(this,Nr)}" @input="${k(this,Tr)}" @keydown="${k(this,Br)}"><slot name="input-prepend" slot="prepend"></slot>${k(this,Dr).call(this)} ${this.hideExpandSymbol?E:u`<div id="expand-symbol-wrapper" slot="append"><uui-symbol-expand .open="${this._isOpen}"></uui-symbol-expand></div>`}<slot name="input-append" slot="append"></slot></uui-input>`),F(this,Dr,()=>this.disabled||this.readonly?E:u`<uui-button id="clear-button" @click="${k(this,fo)}" @keydown="${k(this,fo)}" label="clear" slot="append" compact="compact" style="height:100%" tabindex="${this.value||this.search?"":"-1"}" class="${this.value||this.search?"visible":""}"><uui-icon name="remove" .fallback="${ur.strings[0]}"></uui-icon></uui-button>`),F(this,wo,()=>u`<div id="dropdown"><uui-scroll-container tabindex="-1" id="scroll-container"><slot @slotchange="${ho(this,Lt,Ca)}"></slot></uui-scroll-container></div>`)}get value(){return super.value}set value(e){super.value=e,typeof e=="string"&&ho(this,Lt,po).call(this)}get search(){return this._search}set search(e){if(this.search===e)return;const t=this._search;this._search=e,this.requestUpdate("search",t)}get open(){return this._isOpen}set open(e){const t=e;this._isOpen=e;const r=this._comboboxPopoverElement;if(r)if(e){const o=this._input.offsetWidth;r.style.setProperty("--popover-width",`${o}px`),r.showPopover()}else r.hidePopover();this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",k(this,mo)),this.addEventListener("mousedown",k(this,bo)),Ia(this,zt,window.matchMedia("(max-width: 600px)")),k(this,gi).call(this),k(this,zt).addEventListener("change",k(this,gi)),_(this,"uui-icon"),_(this,"uui-input"),_(this,"uui-button"),_(this,"uui-combobox-list"),_(this,"uui-scroll-container"),_(this,"uui-popover-container"),_(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",k(this,mo)),this.removeEventListener("mousedown",k(this,bo)),k(this,zt).removeEventListener("change",k(this,gi))}getFormElement(){return this._input}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}render(){return this._isPhone&&this.open?u`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${k(this,Ot)}">${this.closeLabel}</uui-button>${k(this,yo).call(this)} ${k(this,wo).call(this)}</div>`:u`${k(this,yo).call(this)}<uui-popover-container id="combobox-popover" popover="manual" placement="bottom-end">${k(this,wo).call(this)}</uui-popover-container>`}},Z=new WeakMap,zt=new WeakMap,Lt=new WeakSet,Ca=function(){k(this,Z)&&(k(this,Z).removeEventListener(he.CHANGE,k(this,go)),k(this,Z).removeEventListener(he.INNER_SLOT_CHANGE,k(this,vo)));const i=this._comboboxListElements?.[0];i&&(Ia(this,Z,i),k(this,Z).for=this,k(this,Z).addEventListener(he.CHANGE,k(this,go)),k(this,Z).addEventListener(he.INNER_SLOT_CHANGE,k(this,vo))),this.updateComplete.then(()=>{ho(this,Lt,po).call(this)})},gi=new WeakMap,po=function(){k(this,Z)&&(k(this,Z).value=this.value,requestAnimationFrame(()=>this._displayValue=k(this,Z).displayValue||""))},bo=new WeakMap,mo=new WeakMap,Tr=new WeakMap,vo=new WeakMap,go=new WeakMap,Nr=new WeakMap,fi=new WeakMap,Ot=new WeakMap,Br=new WeakMap,fo=new WeakMap,yo=new WeakMap,Dr=new WeakMap,wo=new WeakMap,n.UUIComboboxElement.styles=[b`:host{display:inline-flex}#combobox-input{width:100%;border-radius:var(--uui-size-1,3px)}#combobox-popover{width:var(--uui-dropdown-width,var(--popover-width,inherit))}#scroll-container{overflow-y:auto;width:100%;max-height:var(--uui-combobox-popover-max-height,500px)}#expand-symbol-wrapper{height:100%;padding-right:var(--uui-size-space-3,9px);display:flex;justify-content:center}#clear-button{opacity:0;transition:opacity 80ms}:host(:not([disabled]):not([readonly]):focus-within) #clear-button.visible,:host(:not([disabled]):not([readonly]):hover) #clear-button.visible{opacity:1}#dropdown{overflow:hidden;z-index:-1;background-color:var(--uui-combobox-popover-background-color,var(--uui-color-surface,#fff));border:1px solid var(--uui-color-border,#d8d7d9);border-radius:var(--uui-border-radius,3px);width:100%;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23))}:host([disabled]) #caret{fill:var(--uui-color-disabled-contrast,#c4c4c4)}#phone-wrapper{position:fixed;inset:0;display:flex;flex-direction:column;z-index:1;font-size:1.1em}#phone-wrapper #dropdown{display:flex}#phone-wrapper #combobox-input{height:var(--uui-size-16,48px)}#phone-wrapper>uui-button{height:var(--uui-size-14,42px);width:100%}#phone-wrapper #scroll-container{max-height:unset}`],G([l({attribute:"value",reflect:!0})],n.UUIComboboxElement.prototype,"value",1),G([l({type:String})],n.UUIComboboxElement.prototype,"search",1),G([l({type:Boolean})],n.UUIComboboxElement.prototype,"open",1),G([l({type:String,attribute:"close-label"})],n.UUIComboboxElement.prototype,"closeLabel",2),G([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),G([l({type:Boolean,reflect:!1,attribute:"hide-expand-symbol"})],n.UUIComboboxElement.prototype,"hideExpandSymbol",2),G([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"readonly",2),G([l()],n.UUIComboboxElement.prototype,"placeholder",2),G([S("#combobox-input")],n.UUIComboboxElement.prototype,"_input",2),G([S("#combobox-popover")],n.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),G([De({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),G([y()],n.UUIComboboxElement.prototype,"_displayValue",2),G([y()],n.UUIComboboxElement.prototype,"_search",2),G([y()],n.UUIComboboxElement.prototype,"_isPhone",2),G([y()],n.UUIComboboxElement.prototype,"_isOpen",2),n.UUIComboboxElement=G([p("uui-combobox")],n.UUIComboboxElement);var ud=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,Vr=(i,e,t,r)=>{for(var o=r>1?void 0:r?cd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ud(e,t,o),o};n.UUIDialogLayoutElement=class extends m{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return u`<h3 style="${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h3>`}renderContent(){return u`<slot></slot>`}renderActions(){return u`<slot id="actions" name="actions"></slot>`}render(){return u`${this.renderHeadline()} ${this.renderContent()} ${this.renderActions()}`}},n.UUIDialogLayoutElement.styles=[b`:host{display:block;padding:var(--uui-size-10,30px) var(--uui-size-14,42px);color:var(--uui-color-text,#060606)}#actions{margin-top:var(--uui-size-8,24px);display:flex;justify-content:end;gap:var(--uui-size-4,12px)}`],Vr([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),Vr([y()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=Vr([p("uui-dialog-layout")],n.UUIDialogLayoutElement);var hd=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIDialogElement=class extends m{render(){return u`<slot></slot>`}},n.UUIDialogElement.styles=[b`:host{position:relative;display:block;max-width:580px;color:var(--uui-color-text,#060606);background-color:var(--uui-dialog-background-color,var(--uui-color-surface,#fff));box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22));border-radius:var(--uui-dialog-border-radius,calc(var(--uui-border-radius,3px) * 2))}`],n.UUIDialogElement=hd([p("uui-dialog")],n.UUIDialogElement);var dd=Object.defineProperty,pd=Object.getOwnPropertyDescriptor,Sa=(i,e,t,r)=>{for(var o=r>1?void 0:r?pd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&dd(e,t,o),o};n.UUISymbolFileDropzoneElement=class extends m{constructor(){super(...arguments),this.error=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" id="upload-icon"><path d="${this.error?"M254.501 38.16c-120.308 0-217.838 97.53-217.838 217.838 0 120.31 97.53 217.838 217.838 217.838 120.31 0 217.838-97.528 217.838-217.838 0-120.308-97.528-217.838-217.838-217.838zm151.667 217.838c0 29.861-8.711 57.708-23.671 81.209L173.293 128.002c23.499-14.961 51.345-23.67 81.208-23.67 83.629.001 151.667 68.037 151.667 151.666zm-303.332 0c0-29.859 8.71-57.707 23.67-81.204l209.201 209.201c-23.498 14.96-51.346 23.671-81.206 23.671-83.632 0-151.665-68.04-151.665-151.668z":"M206.491 364.184h99.013V223.676h92.922L255.997 51.111 113.575 223.676h92.916zM85.043 398.311h341.912v62.578H85.043z"}"/></svg>`}},n.UUISymbolFileDropzoneElement.styles=[b`:host{display:flex;flex-direction:column;align-items:center;justify-content:center}#upload-icon{fill:var(--uui-color-default,#1b264f);width:100px;transition:fill .3s ease;position:relative;z-index:2}:host([error]) #upload-icon{fill:var(--uui-color-invalid,#d42054)}`],Sa([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=Sa([p("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);let yi=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var bd=Object.defineProperty,md=Object.getOwnPropertyDescriptor,Mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?md(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&bd(e,t,o),o};n.UUIFileDropzoneElement=class extends me("",m){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",this.disallowFolderUpload=!1,this.multiple=!1,this.addEventListener("dragenter",this._onDragEnter,!1),this.addEventListener("dragleave",this._onDragLeave,!1),this.addEventListener("dragover",this._onDragOver,!1),this.addEventListener("drop",this._onDrop,!1)}set accept(e){if(e){const r=[],o=[];e.split(",").forEach(s=>{s=s.trim().toLowerCase(),/[a-z]+\/[a-z*]/s.test(s)?r.push(s):o.push(s.replace(/^\./,""))}),this._acceptedMimeTypes=r,this._acceptedFileExtensions=o}else this._acceptedMimeTypes=[],this._acceptedFileExtensions=[];const t=this._accept;this._accept=e,this.requestUpdate("accept",t)}get accept(){return this._accept}browse(){this._input.click()}async _getAllEntries(e){const t=[...e],r=[],o=[];for(const s of t){if(s?.kind!=="file")continue;const a=this._getEntry(s);if(a)if(a.isDirectory){if(!this.disallowFolderUpload&&this.multiple){const c=await this._mkdir(a);r.push(c)}}else{const c=s.getAsFile();if(!c)continue;this._isAccepted(c)&&o.push(c)}}return{files:o,folders:r}}_getEntry(e){let t=null;return"webkitGetAsEntry"in e?t=e.webkitGetAsEntry():"getAsEntry"in e&&(t=e.getAsEntry()),t}async _mkdir(e){const t=e.createReader(),r=[],o=[],s=a=>new Promise((c,h)=>{a.readEntries(async d=>{if(!d.length){c();return}for(const g of d)if(g.isFile){const f=await this._getAsFile(g);this._isAccepted(f)&&o.push(f)}else if(g.isDirectory){const f=await this._mkdir(g);r.push(f)}await s(a),c()},h)});return await s(t),{folderName:e.name,folders:r,files:o}}_isAccepted(e){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const t=e.type.toLowerCase(),r=e.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o of this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("*","")))return!0;return!1}async _getAsFile(e){return new Promise((t,r)=>e.file(t,r))}async _onDrop(e){e.preventDefault(),this._dropzone.classList.remove("hover");const t=e.dataTransfer?.items;if(t){const r=await this._getAllEntries(t);if(this.multiple===!1&&r.files.length&&(r.files=[r.files[0]],r.folders=[]),!r.files.length&&!r.folders.length)return;this.dispatchEvent(new yi(yi.CHANGE,{detail:r}))}}_onDragOver(e){e.preventDefault()}_onDragEnter(e){this._dropzone.classList.add("hover"),e.preventDefault()}_onDragLeave(e){this._dropzone.classList.remove("hover"),e.preventDefault()}_onFileInputChange(){const e=this._input.files?Array.from(this._input.files):[];this.multiple===!1&&e.length>1&&e.splice(1,e.length-1);const t=e.filter(r=>this._isAccepted(r));t.length&&this.dispatchEvent(new yi(yi.CHANGE,{detail:{files:t,folders:[]}}))}render(){return u`<div id="dropzone"><uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>${this.renderLabel()} <input @click="${e=>e.stopImmediatePropagation()}" id="input" type="file" accept="${this.accept}" ?multiple="${this.multiple}" @change="${this._onFileInputChange}" aria-label="${this.label}"><slot></slot></div>`}},n.UUIFileDropzoneElement.styles=[b`#dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;box-sizing:border-box;width:100%;height:100%;padding:var(--uui-size-4,12px);border:3px solid transparent;margin:-3px;backdrop-filter:blur(2px)}#dropzone.hover{border-color:var(--uui-color-default,#1b264f)}#dropzone.hover::before{content:'';position:absolute;inset:0;opacity:.2;border-color:var(--uui-color-default,#1b264f);background-color:var(--uui-color-default,#1b264f)}#symbol{color:var(--uui-color-default,#1b264f);max-width:100%;max-height:100%}#input{position:absolute;width:0;height:0;opacity:0;display:none}`],Mt([S("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),Mt([S("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),Mt([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),Mt([l({type:Boolean,reflect:!0,attribute:"disallow-folder-upload"})],n.UUIFileDropzoneElement.prototype,"disallowFolderUpload",2),Mt([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=Mt([p("uui-file-dropzone")],n.UUIFileDropzoneElement);let vd=class{static humanFileSize(e,t=!1,r=1){const o=t?1e3:1024;if(Math.abs(e)<o)return e+" B";const s=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let a=-1;const c=10**r;do e/=o,++a;while(Math.round(Math.abs(e)*c)/c>=o&&a<s.length-1);return e.toFixed(r)+" "+s[a]}};var gd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,fe=(i,e,t,r)=>{for(var o=r>1?void 0:r?fd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&gd(e,t,o),o};n.UUIFilePreviewElement=class extends m{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(e){const t=this._file;e instanceof File&&(this._name=e.name.split(".")[0],this._extension=e.name.split(".")[1],this._isDirectory=!1,this._size=e.size,this._isFileAnImage(e)&&(this._isImage=!0,this._getThumbnail(e).then(r=>{this._src=r})),this.requestUpdate("file",t))}connectedCallback(){super.connectedCallback(),_(this,"uui-symbol-file-thumbnail"),_(this,"uui-symbol-folder"),_(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?u`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?u`<uui-symbol-file-thumbnail .src="${this._src}" .alt="${this._name}" id="file-symbol"></uui-symbol-file-thumbnail>`:u`<uui-symbol-file id="file-symbol" .type="${this._extension}"></uui-symbol-file>`}_renderLongName(){const e=this._name.substring(0,this._name.length-6),t=this._name.substring(this._name.length-6,this._name.length);return u`<span id="file-name" class="${this._url?"has-source":""}" @click="${()=>this._url?this._openSource():""}" @keydown="${()=>""}"><span id="file-name-start">${e}</span> <span id="file-name-end">${t}</span></span>`}_isFileAnImage(e){return e?e.type.split("/")[0]==="image":!1}async _getThumbnail(e){return await new Promise(t=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)}})}render(){return u`<slot id="actions" name="actions"></slot>${this._fileTypeTemplate()}<div id="file-info">${this._renderLongName()} <span id="file-size">${this._size&&!this._isDirectory?u`${vd.humanFileSize(this._size,!0)}`:""}</span></div>`}},n.UUIFilePreviewElement.styles=[b`:host{position:relative;display:grid;grid-template-rows:100px 50px;width:150px;height:150px;box-sizing:border-box;aspect-ratio:1;color:var(--uui-color-text,#060606)}:host(:hover) slot[name=actions]::slotted(*){opacity:1}slot[name=actions]::slotted(*){position:absolute;top:8px;right:8px;max-width:100%;height:32px;font-size:13px;opacity:0;z-index:1;transition:opacity 150ms}#file-symbol{aspect-ratio:1/1;margin:auto;max-width:100%;max-height:100%}#file-info{min-width:0;display:flex;text-align:center;flex-direction:column;font-size:1rem}#file-name{display:flex;justify-content:center}#file-name-start{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#file-name-end{white-space:nowrap}#file-size{opacity:.6}.has-source:hover{text-decoration:underline;cursor:pointer}`],fe([y()],n.UUIFilePreviewElement.prototype,"_name",2),fe([y()],n.UUIFilePreviewElement.prototype,"_url",2),fe([y()],n.UUIFilePreviewElement.prototype,"_extension",2),fe([y()],n.UUIFilePreviewElement.prototype,"_src",2),fe([y()],n.UUIFilePreviewElement.prototype,"_size",2),fe([y()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),fe([y()],n.UUIFilePreviewElement.prototype,"_file",2),fe([y()],n.UUIFilePreviewElement.prototype,"_isImage",2),fe([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=fe([p("uui-file-preview")],n.UUIFilePreviewElement);var yd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,Uo=(i,e,t,r)=>{for(var o=r>1?void 0:r?wd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&yd(e,t,o),o};n.UUIFormLayoutItemElement=class extends m{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=e=>{this._labelSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=e=>{this._descriptionSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),_(this,"uui-form-validation-message")}render(){return u`<div id="label" style="${this._labelSlotHasContent?"":"display: none"}"><slot name="label" @slotchange="${this._labelSlotChanged}"></slot></div><div id="description" style="${this._descriptionSlotHasContent||this.description!==null?"":"display: none"}">${this.description}<slot name="description" @slotchange="${this._descriptionSlotChanged}"></slot></div><uui-form-validation-message><slot></slot><slot name="message" slot="message"></slot></uui-form-validation-message>`}},n.UUIFormLayoutItemElement.styles=[b`:host{position:relative;display:block;margin-top:var(--uui-size-space-5,18px);margin-bottom:var(--uui-size-space-5,18px)}#label{margin-top:-5px;margin-bottom:5px}#description{color:var(--uui-color-disabled-contrast,#c4c4c4);font-size:var(--uui-type-small-size,12px)}#label+#description{margin-top:-8px;min-height:8px}`],Uo([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),Uo([y()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),Uo([y()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=Uo([p("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
402
398
|
* @license
|
|
403
399
|
* Copyright 2017 Google LLC
|
|
404
400
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
405
|
-
*/const
|
|
401
|
+
*/const Pa=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},jr=$t(class extends kt{constructor(i){if(super(i),i.type!==le.CHILD)throw Error("repeat() can only be used in text expressions")}ct(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const o=[],s=[];let a=0;for(const c of i)o[a]=r?r(c,a):a,s[a]=t(c,a),a++;return{values:s,keys:o}}render(i,e,t){return this.ct(i,e,t).values}update(i,[e,t,r]){var o;const s=_h(i),{values:a,keys:c}=this.ct(e,t,r);if(!Array.isArray(s))return this.ut=c,a;const h=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],d=[];let g,f,U=0,x=s.length-1,I=0,L=a.length-1;for(;U<=x&&I<=L;)if(s[U]===null)U++;else if(s[x]===null)x--;else if(h[U]===c[I])d[I]=ot(s[U],a[I]),U++,I++;else if(h[x]===c[L])d[L]=ot(s[x],a[L]),x--,L--;else if(h[U]===c[L])d[L]=ot(s[U],a[L]),ci(i,d[L+1],s[U]),U++,L--;else if(h[x]===c[I])d[I]=ot(s[x],a[I]),ci(i,s[U],s[x]),x--,I++;else if(g===void 0&&(g=Pa(c,I,L),f=Pa(h,U,x)),g.has(h[U]))if(g.has(h[x])){const X=f.get(c[I]),Oe=X!==void 0?s[X]:null;if(Oe===null){const Me=ci(i,s[U]);ot(Me,a[I]),d[I]=Me}else d[I]=ot(Oe,a[I]),ci(i,s[U],Oe),s[X]=null;I++}else _r(s[x]),x--;else _r(s[U]),U++;for(;I<=L;){const X=ci(i,d[L+1]);ot(X,a[I]),d[I++]=X}for(;U<=x;){const X=s[U++];X!==null&&_r(X)}return this.ut=c,Js(i,d),Y}});/**
|
|
406
402
|
* @license
|
|
407
403
|
* Copyright 2017 Google LLC
|
|
408
404
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
409
|
-
*/class Rr extends $t{constructor(e){if(super(e),this.et=E,e.type!==se.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===E||e==null)return this.ft=void 0,this.et=e;if(e===Y)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Rr.directiveName="unsafeHTML",Rr.resultType=1;const wo=_t(Rr);var wd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,Pa=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ud(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&wd(e,t,o),o};n.UUIFormValidationMessageElement=class extends m{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=e=>{const t=e.composedPath()[0];t.pristine===!1?this._messages.set(t,t.validationMessage):this._messages.delete(t),this.requestUpdate("_messages")},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate("_messages")},this.for===null&&(this.for=this)}get for(){return this._for}set for(e){let t=null;typeof e=="string"?t=this.getRootNode()?.getElementById(e):e instanceof HTMLElement&&(t=e);const r=t??this,o=this._for;o!==r&&(o!==null&&(o.removeEventListener(Ri.INVALID,this._onControlInvalid),o.removeEventListener(Ri.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(Ri.INVALID,this._onControlInvalid),this._for.addEventListener(Ri.VALID,this._onControlValid))}render(){return u`<slot></slot><div id="messages">${Hr(this._messages,e=>u`<div>${wo(e[1])}</div>`)}<slot name="message"></slot></div>`}},n.UUIFormValidationMessageElement.styles=[b`#messages{color:var(--uui-color-invalid-standalone,#bf214e)}`],Pa([l({reflect:!1,attribute:!0})],n.UUIFormValidationMessageElement.prototype,"for",1),n.UUIFormValidationMessageElement=Pa([p("uui-form-validation-message")],n.UUIFormValidationMessageElement);var _d=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIFormElement=class extends m{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(e){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const t=e.target.assignedNodes({flatten:!0}).filter(r=>r instanceof HTMLFormElement);this._formElement=t.length>0?t[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(e){if(e.target===null)return;const t=e.target;if(!t.checkValidity()){t.setAttribute("submit-invalid","");return}t.removeAttribute("submit-invalid")}_onReset(e){e.target!==null&&e.target.removeAttribute("submit-invalid")}render(){return u`<slot @slotchange="${this._onSlotChanged}"></slot>`}},n.UUIFormElement=_d([p("uui-form")],n.UUIFormElement);let yi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t}),this.icon=null}static{this.ICON_REQUEST="icon-request"}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};var $d=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,ot=(i,e,t,r)=>{for(var o=r>1?void 0:r?kd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&$d(e,t,o),o};n.UUIIconElement=class extends m{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new yi(yi.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?u`<slot name="fallback"></slot>`:u`${wo(this.fallback)}`:this._nameSvg!==null?u`${wo(this._nameSvg)}`:this.svg!==null?u`${wo(this.svg)}`:u`<slot></slot>`}},n.UUIIconElement.styles=[b`:host{vertical-align:text-bottom;display:inline-flex;align-items:center;justify-content:center;width:1.125em;height:1.125em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor);width:100%}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],ot([y()],n.UUIIconElement.prototype,"_nameSvg",2),ot([l()],n.UUIIconElement.prototype,"label",2),ot([l()],n.UUIIconElement.prototype,"name",1),ot([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),ot([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),ot([y()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=ot([p("uui-icon")],n.UUIIconElement);let Fr=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},Gr=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(yi.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(yi.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new Fr(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Fr}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var Ed=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,Aa=(i,e,t,r)=>{for(var o=r>1?void 0:r?xd(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ed(e,t,o),o};n.UUIIconRegistryElement=class extends m{constructor(){super(),this._icons={},this._registry=new Gr,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return u`<slot></slot>`}},Aa([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=Aa([p("uui-icon-registry")],n.UUIIconRegistryElement);const Id=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,Cd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,Sd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,Pd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`,Ad=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,zd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,Ld=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,Od=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,Md=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`,Td=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,Nd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,Bd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,Dd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,Vd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,jd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,Hd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,Rd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,Fd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`,Gd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,Wd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`,qd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`,Kd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`,Xd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,Yd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,Zd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`,Qd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,Jd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`,ep=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`,tp=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,ip=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`,op=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`,rp=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;let za=class extends Gr{constructor(){super(),this.defineIcon("add",Id.strings[0]),this.defineIcon("alert",Cd.strings[0]),this.defineIcon("attachment",Sd.strings[0]),this.defineIcon("calendar",Pd.strings[0]),this.defineIcon("check",Ad.strings[0]),this.defineIcon("clipboard",zd.strings[0]),this.defineIcon("code",Ld.strings[0]),this.defineIcon("colorpicker",Od.strings[0]),this.defineIcon("copy",Md.strings[0]),this.defineIcon("delete",Td.strings[0]),this.defineIcon("document",Nd.strings[0]),this.defineIcon("download",Bd.strings[0]),this.defineIcon("edit",Dd.strings[0]),this.defineIcon("favorite",Vd.strings[0]),this.defineIcon("folder",jd.strings[0]),this.defineIcon("forbidden",Hd.strings[0]),this.defineIcon("info",Rd.strings[0]),this.defineIcon("link",Fd.strings[0]),this.defineIcon("lock",Gd.strings[0]),this.defineIcon("pause",Wd.strings[0]),this.defineIcon("picture",qd.strings[0]),this.defineIcon("play",Kd.strings[0]),this.defineIcon("remove",Xd.strings[0]),this.defineIcon("search",Yd.strings[0]),this.defineIcon("see",Zd.strings[0]),this.defineIcon("settings",Qd.strings[0]),this.defineIcon("subtract",Jd.strings[0]),this.defineIcon("sync",ep.strings[0]),this.defineIcon("unlock",tp.strings[0]),this.defineIcon("unsee",ip.strings[0]),this.defineIcon("wand",op.strings[0]),this.defineIcon("wrong",rp.strings[0])}};var np=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new za}},n.UUIIconRegistryEssentialElement=np([p("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var sp=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,Mt=(i,e,t,r)=>{for(var o=r>1?void 0:r?ap(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&sp(e,t,o),o};n.UUIInputFileElement=class extends ve(m){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-file-dropzone"),_(this,"uui-button"),_(this,"uui-action-bar"),_(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],s=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=s;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,s),this._updateFileWrappers([s]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const s=o instanceof File;r.append(this.name,s?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return u`<uui-file-preview .file="${e}"><uui-action-bar slot="actions"><uui-button @click="${()=>this._removeFile(t)}" color="danger" label="${`Delete ${e.name}`}"><uui-icon name="delete" .fallback="${Ic.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return u`${Hr(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return u`<uui-file-dropzone id="dropzone" ?multiple="${this.multiple}" .accept="${this.accept}" @change="${this._handleFilesChange}" label="Drop files here"></uui-file-dropzone><div id="files">${this._renderFiles()} ${this._files.length===0||this.multiple?u`<uui-button @click="${this._handleClick}" id="add-button" look="placeholder" label="Add"></uui-button>`:E}</div>`}},n.UUIInputFileElement.styles=[b`:host{width:100%;height:100%;position:relative;display:flex;box-sizing:border-box;border:1px solid var(--uui-color-border,#d8d7d9)}#input{position:absolute;width:0;height:0;opacity:0;display:none}#files{display:grid;box-sizing:border-box;justify-items:center;width:100%;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-rows:min-content;gap:16px;padding:16px;overflow:auto;max-height:100%}#dropzone{display:none;position:absolute;inset:0;z-index:10;justify-content:center;align-items:center}#add-button{width:150px;height:150px;display:flex;padding:16px;box-sizing:border-box;justify-content:center;align-items:stretch}`],Mt([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),Mt([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),Mt([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),Mt([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),Mt([y()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=Mt([p("uui-input-file")],n.UUIInputFileElement);let wi=class extends P{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var lp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,La=i=>{throw TypeError(i)},R=(i,e,t,r)=>{for(var o=r>1?void 0:r?up(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&lp(e,t,o),o},cp=(i,e,t)=>e.has(i)||La("Cannot "+t),hp=(i,e,t)=>e.has(i)?La("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),dp=(i,e,t)=>(cp(i,e,"access private method"),t),Wr,Oa;n.UUIInputElement=class extends ve(me("",m),""){constructor(){super(),hp(this,Wr),this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum length exceeded (${t}/${e} characters)`,this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="text",this.tabIndex=0,this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",dp(this,Wr,Oa)),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&String(this.value).length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&String(this.value).length>this.maxlength),this.updateComplete.then(()=>{this.addFormControlElement(this._input)})}get type(){return this._type}set type(e){this._type=e}async blur(){await this.updateComplete,this._input.blur()}async focus(){await this.updateComplete,this._input.focus()}async select(){await this.updateComplete,this._input.select()}getFormElement(){return this.shadowRoot?.querySelector("input")}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new wi(wi.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new wi(wi.CHANGE))}renderPrepend(){return u`<slot name="prepend"></slot>`}renderAppend(){return u`<slot name="append"></slot>`}render(){return u`${this.renderPrepend()} ${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()} ${this.renderAppend()}`}renderInputWithAutoWidth(){return u`<div id="control">${this.renderInput()}${this.renderAutoWidthBackground()}</div>`}renderInput(){return u`<input id="input" .type="${this.type}" .value="${this.value}" .name="${this.name}" pattern="${w(this.pattern)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" spellcheck="${this.spellcheck}" autocomplete="${w(this.autocomplete)}" placeholder="${w(this.placeholder)}" aria-label="${w(this.label)}" inputmode="${w(this.inputMode)}" ?disabled="${this.disabled}" ?autofocus="${this.autofocus}" ?required="${this.required}" ?readonly="${this.readonly}" tabindex="${w(this.tabIndex)}" @input="${this.onInput}" @change="${this.onChange}">`}renderAutoWidthBackground(){return u`<div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return u`${this.value.length>0?this.value:this.placeholder}`}},Wr=new WeakSet,Oa=function(i){this.type!=="color"&&i.key=="Enter"&&this.submit()},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[b`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;color:var(--uui-color-text,#060606);color-scheme:var(--uui-color-scheme,normal);box-sizing:border-box;background-color:var(--uui-input-background-color,var(--uui-color-surface,#fff));border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-radius:var(--uui-border-radius,3px);--uui-button-height:100%;--auto-width-text-margin-right:0;--auto-width-text-margin-left:0}#control{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:center;flex-grow:1}#auto{border:0 1px solid transparent;visibility:hidden;white-space:pre;z-index:-1;height:0;padding:0 var(--uui-size-space-3,9px);margin:0 var(--auto-width-text-margin-right) 0 var(--auto-width-text-margin-left)}:host([auto-width]) #input{width:10px;min-width:100%}:host(:hover){border-color:var(--uui-input-border-color-hover,var(--uui-color-border-standalone,#c2c2c2))}:host(:focus-within){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:focus){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1))}:host([disabled]){background-color:var(--uui-input-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input{-webkit-text-fill-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([readonly]){background-color:var(--uui-input-background-color-readonly,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2))}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border-color:var(--uui-color-invalid,#d42054)}input{font-family:inherit;padding:1px var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:var(--uui-border-radius,3px);box-sizing:border-box;border:none;background:0 0;width:100%;height:inherit;text-align:inherit;outline:0}input[type=password]::-ms-reveal{display:none}input[type=color]{width:30px;padding:0;border:none}slot[name=append],slot[name=prepend]{display:flex;align-items:center;line-height:1;height:100%}::slotted(uui-input),::slotted(uui-input-lock){height:100%;--uui-input-border-width:0}`],R([l()],n.UUIInputElement.prototype,"min",2),R([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),R([l({attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),R([l()],n.UUIInputElement.prototype,"max",2),R([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),R([l({attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),R([l({type:Number})],n.UUIInputElement.prototype,"step",2),R([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),R([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),R([l()],n.UUIInputElement.prototype,"placeholder",2),R([l()],n.UUIInputElement.prototype,"autocomplete",2),R([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),R([l({type:String})],n.UUIInputElement.prototype,"type",1),R([l({attribute:"inputmode"})],n.UUIInputElement.prototype,"inputMode",2),R([l({type:String})],n.UUIInputElement.prototype,"pattern",2),R([l({type:Number,reflect:!1,attribute:"tabindex"})],n.UUIInputElement.prototype,"tabIndex",2),R([S("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=R([p("uui-input")],n.UUIInputElement);let qr=class extends P{static{this.LOCK_CHANGE="lock-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var pp=Object.defineProperty,bp=Object.getOwnPropertyDescriptor,Ma=i=>{throw TypeError(i)},Uo=(i,e,t,r)=>{for(var o=r>1?void 0:r?bp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pp(e,t,o),o},Ta=(i,e,t)=>e.has(i)||Ma("Cannot "+t),mp=(i,e,t)=>(Ta(i,e,"read from private field"),t?t.call(i):e.get(i)),vp=(i,e,t)=>e.has(i)?Ma("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),gp=(i,e,t,r)=>(Ta(i,e,"write to private field"),e.set(i,t),t),_o;n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),vp(this,_o,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){gp(this,_o,e),this.tabIndex=e?-1:0}get locked(){return mp(this,_o)}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new qr(qr.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?u`<uui-icon name="lock" .fallback="${Cc.strings[0]}"></uui-icon>`:u`<uui-icon name="unlock" .fallback="${zc.strings[0]}"></uui-icon>`}renderPrepend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?this.unlockLabel:this.lockLabel}">${this.renderIcon()}</uui-button>`}},_o=new WeakMap,n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,b`#lock{height:100%;--uui-button-padding-left-factor:0.75;--uui-button-padding-right-factor:0.75;font-size:12px}:host([locked]) #input{cursor:not-allowed;opacity:.55}`],Uo([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",1),Uo([l({type:String,reflect:!1,attribute:"unlock-label"})],n.UUIInputLockElement.prototype,"unlockLabel",2),Uo([l({type:String,reflect:!1,attribute:"lock-label"})],n.UUIInputLockElement.prototype,"lockLabel",2),n.UUIInputLockElement=Uo([p("uui-input-lock")],n.UUIInputLockElement);var fp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,Kr=(i,e,t,r)=>{for(var o=r>1?void 0:r?yp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fp(e,t,o),o};n.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){this.passwordType=e}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?u`<uui-icon name="see" .fallback="${Pc.strings[0]}"></uui-icon>`:u`<uui-icon name="unsee" .fallback="${Lc.strings[0]}"></uui-icon>`}renderAppend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onPasswordToggle}" compact="compact" label="${this.passwordType==="password"?"Show password":"Hide password"}" id="eye">${this.renderIcon()}</uui-button>`}},n.UUIInputPasswordElement.styles=[...n.UUIInputElement.styles,b`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],Kr([y()],n.UUIInputPasswordElement.prototype,"passwordType",2),Kr([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=Kr([p("uui-input-password")],n.UUIInputPasswordElement);var wp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyboardShortcutElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[b`:host{display:inline-block;font-family:inherit;font-size:var(--uui-size-4,12px);color:var(--uui-color-text,#060606)}::slotted(:first-child)uui-key{margin-left:0}::slotted(:last-child)uui-key{margin-right:0}`],n.UUIKeyboardShortcutElement=wp([p("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var Up=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyElement.styles=[b`:host{background:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border,#d8d7d9);font-family:inherit;font-size:var(--uui-type-small-size,12px);color:var(--uui-color-text,#060606);border-radius:5px;margin:0 5px;padding:5px 7px;box-sizing:border-box;user-select:none;text-transform:lowercase}`],n.UUIKeyElement=Up([p("uui-key")],n.UUIKeyElement);var _p=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,$o=(i,e,t,r)=>{for(var o=r>1?void 0:r?$p(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&_p(e,t,o),o};n.UUILabelElement=class extends m{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){return typeof this.for=="string"?this.getRootNode()?.getElementById(this.for)||null:this.for||null}render(){return u`<slot></slot>${this.required?u`<div id="required">*</div>`:""}`}},n.UUILabelElement.styles=[b`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],$o([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),$o([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),$o([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=$o([p("uui-label")],n.UUILabelElement);var kp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,Xr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ep(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&kp(e,t,o),o};n.UUILoaderBarElement=class extends m{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=A(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return u`${this.progress?u`<div id="bar" style="max-width:${this.progress.toString()}"></div>`:""}<div id="bar-anim" class="${this.progress?"":"animate"}" style="animation-duration:${this.animationDuration}"></div><div id="bar-background"></div>`}},n.UUILoaderBarElement.styles=[b`:host{position:relative;display:block;width:100%;height:4px;overflow:hidden;color:var(--uui-color-default,#1b264f)}#bar,#bar-anim,#bar-background{position:absolute;inset:0;height:100%}#bar,#bar-background{background:currentColor}#bar{transition:max-width 120ms ease}#bar-background{opacity:.3}#bar-anim{transform:scaleX(.4);animation:bar-loading 1s infinite linear;background:linear-gradient(-90deg,#fff 0,#fff 25%,transparent 100%)}#bar-anim.animate{background:linear-gradient(-90deg,currentColor 0,currentColor 25%,transparent 100%)}@keyframes bar-loading{0%{transform-origin:-175% 0}100%{transform-origin:175% 0}}`],Xr([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),Xr([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=Xr([p("uui-loader-bar")],n.UUILoaderBarElement);var xp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,Yr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ip(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&xp(e,t,o),o};n.UUILoaderCircleElement=class extends m{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?u`<span id="progress-display">${this.progress}</span>`:""}render(){return u`<svg id="spinner" class="${this.progress?"":"animate"}" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle id="bg" cx="50%" cy="50%" r="16"/><g><circle id="circle" cx="50%" cy="50%" r="16" style="${ke(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}},n.UUILoaderCircleElement.styles=[b`:host{vertical-align:middle;line-height:0;overflow:hidden;display:inline-flex;justify-content:center;align-items:center;position:relative;width:1em;height:1em;color:var(--uui-color-default,#1b264f)}#spinner{width:100%;height:100%}#spinner g{transform-origin:50% 50%;animation:18s linear infinite spinner-animation}#spinner.animate g{animation:.8s linear infinite spinner-animation}@keyframes spinner-animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#spinner.animate #circle{animation:1.4s ease-in infinite circle-animation}@keyframes circle-animation{0%{stroke-dashoffset:-55}38%{stroke-dashoffset:-88}100%{stroke-dashoffset:-55}}svg circle{fill:transparent;stroke:currentColor;stroke-width:6px}#bg{opacity:.5}#circle{stroke-linecap:round;stroke-dasharray:0 0;transform-origin:50% 50%;transform:rotate(-90deg);transition:stroke-dasharray 120ms ease}#progress-display{position:absolute;left:0;top:50%;right:0;stroke:currentColor;transform:translateY(-50%);font-size:.3em;font-weight:700;text-align:center;padding-top:.09em}`],Yr([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),Yr([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=Yr([p("uui-loader-circle")],n.UUILoaderCircleElement);var Cp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUILoaderElement=class extends m{render(){return u`<div></div><div></div><div></div>`}},n.UUILoaderElement.styles=[b`:host{color:var(--uui-color-default,#1b264f)}div{display:inline-block;width:var(--uui-size-2,6px);height:var(--uui-size-2,6px);border:2px solid currentColor;border-radius:100%;animation:loaderAnimation 1.4s infinite}div:nth-child(1n){animation-delay:0s}div:nth-child(2n){animation-delay:.15s}div:nth-child(3n){animation-delay:.3s}@keyframes loaderAnimation{0%{transform:scale(.5);background-color:currentColor}50%{transform:scale(1);background-color:transparent}100%{transform:scale(.5);background-color:currentColor}}`],n.UUILoaderElement=Cp([p("uui-loader")],n.UUILoaderElement);let Tt=class extends P{static{this.SHOW_CHILDREN="show-children"}static{this.HIDE_CHILDREN="hide-children"}static{this.CLICK_LABEL="click-label"}};var Sp=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,Na=i=>{throw TypeError(i)},de=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Sp(e,t,o),o},Ap=(i,e,t)=>e.has(i)||Na("Cannot "+t),zp=(i,e,t)=>e.has(i)?Na("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ba=(i,e,t)=>(Ap(i,e,"access private method"),t),ko,Zr;n.UUIMenuItemElement=class extends Hi(ft(oi(me("label",m)))){constructor(){super(...arguments),zp(this,ko),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.caretLabel="Reveal the underlying items",this.iconSlotHasContent=!1,this._labelButtonChanged=e=>{this.selectableTarget=e||this},this._iconSlotChanged=e=>{this.iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const e=this.showChildren?Tt.HIDE_CHILDREN:Tt.SHOW_CHILDREN,t=new Tt(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),_(this,"uui-symbol-expand"),_(this,"uui-loader-bar")}async focus(){await this.updateComplete,this.shadowRoot?.querySelector("#label-button")?.focus?.()}_renderLabelInside(){return u`<slot name="icon" id="icon" style="${this.iconSlotHasContent?"":"display: none;"}" @slotchange="${this._iconSlotChanged}"></slot>${this.renderLabel()}<slot name="badge" id="badge"></slot>`}_renderLabelAsAnchor(){return this.disabled?u`<span id="label-button" ${so(this._labelButtonChanged)}>${this._renderLabelInside()}</span>`:u`<a id="label-button" ${so(this._labelButtonChanged)} href="${w(this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" @click="${Ba(this,ko,Zr)}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</a>`}_renderLabelAsButton(){return u`<button id="label-button" ${so(this._labelButtonChanged)} @click="${Ba(this,ko,Zr)}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</button>`}render(){return u`<div id="menu-item" aria-label="menuitem" role="menuitem">${this.hasChildren?u`<button id="caret-button" aria-label="${this.caretLabel}" @click="${this._onCaretClicked}"><uui-symbol-expand aria-hidden="true" ?open="${this.showChildren}"></uui-symbol-expand></button>`:""} ${this.href&&this.selectOnly!==!0&&this.selectable!==!0?this._renderLabelAsAnchor():this._renderLabelAsButton()}<div id="label-button-background"></div><slot id="actions-container" name="actions"></slot>${this.loading?u`<uui-loader-bar id="loader"></uui-loader-bar>`:""}</div>${this.showChildren?u`<slot></slot>`:""}`}},ko=new WeakSet,Zr=function(){if(this.selectOnly)return;const i=new Tt(Tt.CLICK_LABEL);this.dispatchEvent(i)},n.UUIMenuItemElement.styles=[b`:host{box-sizing:border-box;display:block;--uui-menu-item-child-indent:calc(var(--uui-menu-item-indent, 0) + 1);user-select:none;--flat-structure-reversed:calc(
|
|
405
|
+
*/class Hr extends kt{constructor(e){if(super(e),this.et=E,e.type!==le.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===E||e==null)return this.ft=void 0,this.et=e;if(e===Y)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Hr.directiveName="unsafeHTML",Hr.resultType=1;const _o=$t(Hr);var Ud=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,Aa=(i,e,t,r)=>{for(var o=r>1?void 0:r?_d(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ud(e,t,o),o};n.UUIFormValidationMessageElement=class extends m{constructor(){super(),this._for=null,this._messages=new Map,this._onControlInvalid=e=>{const t=e.composedPath()[0];t.pristine===!1?this._messages.set(t,t.validationMessage):this._messages.delete(t),this.requestUpdate("_messages")},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate("_messages")},this.for===null&&(this.for=this)}get for(){return this._for}set for(e){let t=null;typeof e=="string"?t=this.getRootNode()?.getElementById(e):e instanceof HTMLElement&&(t=e);const r=t??this,o=this._for;o!==r&&(o!==null&&(o.removeEventListener(Wi.INVALID,this._onControlInvalid),o.removeEventListener(Wi.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(Wi.INVALID,this._onControlInvalid),this._for.addEventListener(Wi.VALID,this._onControlValid))}render(){return u`<slot></slot><div id="messages">${jr(this._messages,e=>u`<div>${_o(e[1])}</div>`)}<slot name="message"></slot></div>`}},n.UUIFormValidationMessageElement.styles=[b`#messages{color:var(--uui-color-invalid-standalone,#bf214e)}`],Aa([l({reflect:!1,attribute:!0})],n.UUIFormValidationMessageElement.prototype,"for",1),n.UUIFormValidationMessageElement=Aa([p("uui-form-validation-message")],n.UUIFormValidationMessageElement);var $d=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIFormElement=class extends m{constructor(){super(...arguments),this._formElement=null}getFormElement(){return this._formElement}_onSlotChanged(e){this._formElement&&(this._formElement.removeEventListener("submit",this._onSubmit),this._formElement.removeEventListener("reset",this._onReset));const t=e.target.assignedNodes({flatten:!0}).filter(r=>r instanceof HTMLFormElement);this._formElement=t.length>0?t[0]:null,this._formElement&&(this._formElement.setAttribute("novalidate",""),this._formElement.addEventListener("submit",this._onSubmit),this._formElement.addEventListener("reset",this._onReset))}_onSubmit(e){if(e.target===null)return;const t=e.target;if(!t.checkValidity()){t.setAttribute("submit-invalid","");return}t.removeAttribute("submit-invalid")}_onReset(e){e.target!==null&&e.target.removeAttribute("submit-invalid")}render(){return u`<slot @slotchange="${this._onSlotChanged}"></slot>`}},n.UUIFormElement=$d([p("uui-form")],n.UUIFormElement);let wi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t}),this.icon=null}static{this.ICON_REQUEST="icon-request"}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};var kd=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,rt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ed(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&kd(e,t,o),o};n.UUIIconElement=class extends m{constructor(){super(...arguments),this._name=null,this._retrievedNameIcon=!1,this._nameSvg=null,this.label="",this.svg=null,this.fallback=null,this._useFallback=!1}get name(){return this._name}set name(e){this._name=e,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const e=new wi(wi.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(e),e.icon!==null?(this._retrievedNameIcon=!0,e.icon.then(t=>{this._useFallback=!1,this._nameSvg=t})):(this._retrievedNameIcon=!1,this._useFallback=!0)}}connectedCallback(){super.connectedCallback(),this._retrievedNameIcon===!1&&this.requestIcon()}disconnectedCallback(){this._retrievedNameIcon=!1}firstUpdated(){this._retrievedNameIcon===!1&&this.requestIcon(),typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}render(){return this._useFallback===!0?this.fallback===null?u`<slot name="fallback"></slot>`:u`${_o(this.fallback)}`:this._nameSvg!==null?u`${_o(this._nameSvg)}`:this.svg!==null?u`${_o(this.svg)}`:u`<slot></slot>`}},n.UUIIconElement.styles=[b`:host{vertical-align:text-bottom;display:inline-flex;align-items:center;justify-content:center;width:1.125em;height:1.125em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor);width:100%}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],rt([y()],n.UUIIconElement.prototype,"_nameSvg",2),rt([l()],n.UUIIconElement.prototype,"label",2),rt([l()],n.UUIIconElement.prototype,"name",1),rt([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),rt([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),rt([y()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=rt([p("uui-icon")],n.UUIIconElement);let Rr=class{constructor(e){this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),e&&this.resolve(e)}set svg(e){this.resolve(e)}},Fr=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(wi.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(wi.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new Rr(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new Rr}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var xd=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,za=(i,e,t,r)=>{for(var o=r>1?void 0:r?Id(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&xd(e,t,o),o};n.UUIIconRegistryElement=class extends m{constructor(){super(),this._icons={},this._registry=new Fr,this._registry.attach(this)}get icons(){return this._icons}set icons(e){this._icons=e,this._registry&&Object.entries(this._icons).forEach(([t,r])=>this._registry.defineIcon(t,r))}get registry(){return this._registry}set registry(e){this.registry&&this.registry.detach(this),e.attach(this),this._registry=e}render(){return u`<slot></slot>`}},za([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=za([p("uui-icon-registry")],n.UUIIconRegistryElement);const Cd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>`,Sd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>`,Pd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>`,Ad=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/><path d="M8 18h.01"/><path d="M12 18h.01"/><path d="M16 18h.01"/></svg>`,zd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>`,Ld=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/></svg>`,Od=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`,Md=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 1-1h3l9-9"/><path d="M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/></svg>`,Td=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 2H8.6c-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8c.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1V6.5L15.5 2z"/><path d="M3 7.6v12.8c0 .4.2.8.5 1.1.3.3.7.5 1.1.5h9.8"/><path d="M15 2v5h5"/></svg>`,Nd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>`,Bd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>`,Dd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>`,Vd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>`,jd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,Hd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/><path d="M2 10h20"/></svg>`,Rd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`,Fd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`,Gd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`,Wd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>`,qd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="4" height="16" x="6" y="4"/><rect width="4" height="16" x="14" y="4"/></svg>`,Kd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`,Xd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>`,Yd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>`,Zd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>`,Qd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>`,Jd=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,ep=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>`,tp=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>`,ip=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>`,op=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/></svg>`,rp=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h0"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg>`,np=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>`;let La=class extends Fr{constructor(){super(),this.defineIcon("add",Cd.strings[0]),this.defineIcon("alert",Sd.strings[0]),this.defineIcon("attachment",Pd.strings[0]),this.defineIcon("calendar",Ad.strings[0]),this.defineIcon("check",zd.strings[0]),this.defineIcon("clipboard",Ld.strings[0]),this.defineIcon("code",Od.strings[0]),this.defineIcon("colorpicker",Md.strings[0]),this.defineIcon("copy",Td.strings[0]),this.defineIcon("delete",Nd.strings[0]),this.defineIcon("document",Bd.strings[0]),this.defineIcon("download",Dd.strings[0]),this.defineIcon("edit",Vd.strings[0]),this.defineIcon("favorite",jd.strings[0]),this.defineIcon("folder",Hd.strings[0]),this.defineIcon("forbidden",Rd.strings[0]),this.defineIcon("info",Fd.strings[0]),this.defineIcon("link",Gd.strings[0]),this.defineIcon("lock",Wd.strings[0]),this.defineIcon("pause",qd.strings[0]),this.defineIcon("picture",Kd.strings[0]),this.defineIcon("play",Xd.strings[0]),this.defineIcon("remove",Yd.strings[0]),this.defineIcon("search",Zd.strings[0]),this.defineIcon("see",Qd.strings[0]),this.defineIcon("settings",Jd.strings[0]),this.defineIcon("subtract",ep.strings[0]),this.defineIcon("sync",tp.strings[0]),this.defineIcon("unlock",ip.strings[0]),this.defineIcon("unsee",op.strings[0]),this.defineIcon("wand",rp.strings[0]),this.defineIcon("wrong",np.strings[0])}};var sp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new La}},n.UUIIconRegistryEssentialElement=sp([p("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var ap=Object.defineProperty,lp=Object.getOwnPropertyDescriptor,Tt=(i,e,t,r)=>{for(var o=r>1?void 0:r?lp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ap(e,t,o),o};n.UUIInputFileElement=class extends ve(m){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=e=>{let t=[];for(const r of e)this.multiple?t.push(r):t=[r];this._files=t},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return super.value}set value(e){if(super.value=e,e instanceof FormData){const t=this.multiple?e.getAll(this.name):[e.get(this.name)];this._updateFileWrappers(t);return}if(e instanceof File){this._updateFileWrappers([e]);return}}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-file-dropzone"),_(this,"uui-button"),_(this,"uui-action-bar"),_(this,"uui-file-preview")}getFormElement(){return this._dropZone}async blur(){await this.updateComplete,this._dropzone.blur()}async focus(){await this.updateComplete,this._dropzone.focus()}async click(){await this.updateComplete,this._dropzone.browse()}_handleClick(e){e.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(e){const t=e.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=t[0],s=o instanceof File?o:await this._getFile(o);if(this.value instanceof File){this.value=s;return}if(this.value instanceof FormData){this.value.delete(this.name),this.value.append(this.name,s),this._updateFileWrappers([s]);return}}let r=this.value;if(t.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of t){const s=o instanceof File;r.append(this.name,s?o:await this._getFile(o))}this.value=r}async _getFile(e){return await new Promise((t,r)=>e.file(t,r))}_removeFile(e){const t=this._files[e];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==t);if(r.length===0)this.value="";else{this.value.delete(this.name);for(const o of r)this.value.append(this.name,o)}this._updateFileWrappers(r)}this.value instanceof File&&(this.value="",this._updateFileWrappers([]))}_setShowDropzone(e){e?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(e,t){return u`<uui-file-preview .file="${e}"><uui-action-bar slot="actions"><uui-button @click="${()=>this._removeFile(t)}" color="danger" label="${`Delete ${e.name}`}"><uui-icon name="delete" .fallback="${Cc.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return u`${jr(this._files,e=>e.name+e.size,(e,t)=>this._renderFileItem(e,t))}`}render(){return u`<uui-file-dropzone id="dropzone" ?multiple="${this.multiple}" .accept="${this.accept}" @change="${this._handleFilesChange}" label="Drop files here"></uui-file-dropzone><div id="files">${this._renderFiles()} ${this._files.length===0||this.multiple?u`<uui-button @click="${this._handleClick}" id="add-button" look="placeholder" label="Add"></uui-button>`:E}</div>`}},n.UUIInputFileElement.styles=[b`:host{width:100%;height:100%;position:relative;display:flex;box-sizing:border-box;border:1px solid var(--uui-color-border,#d8d7d9)}#input{position:absolute;width:0;height:0;opacity:0;display:none}#files{display:grid;box-sizing:border-box;justify-items:center;width:100%;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-rows:min-content;gap:16px;padding:16px;overflow:auto;max-height:100%}#dropzone{display:none;position:absolute;inset:0;z-index:10;justify-content:center;align-items:center}#add-button{width:150px;height:150px;display:flex;padding:16px;box-sizing:border-box;justify-content:center;align-items:stretch}`],Tt([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),Tt([S("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),Tt([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),Tt([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),Tt([y()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=Tt([p("uui-input-file")],n.UUIInputFileElement);let Ui=class extends P{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var up=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,Oa=i=>{throw TypeError(i)},R=(i,e,t,r)=>{for(var o=r>1?void 0:r?cp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&up(e,t,o),o},hp=(i,e,t)=>e.has(i)||Oa("Cannot "+t),dp=(i,e,t)=>e.has(i)?Oa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),pp=(i,e,t)=>(hp(i,e,"access private method"),t),Gr,Ma;n.UUIInputElement=class extends ve(me("",m),""){constructor(){super(),dp(this,Gr),this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum length exceeded (${t}/${e} characters)`,this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="text",this.tabIndex=0,this._type="text",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",pp(this,Gr,Ma)),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&String(this.value).length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&String(this.value).length>this.maxlength),this.updateComplete.then(()=>{this.addFormControlElement(this._input)})}get type(){return this._type}set type(e){this._type=e}async blur(){await this.updateComplete,this._input.blur()}async focus(){await this.updateComplete,this._input.focus()}async select(){await this.updateComplete,this._input.select()}getFormElement(){return this.shadowRoot?.querySelector("input")}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new Ui(Ui.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Ui(Ui.CHANGE))}renderPrepend(){return u`<slot name="prepend"></slot>`}renderAppend(){return u`<slot name="append"></slot>`}render(){return u`${this.renderPrepend()} ${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()} ${this.renderAppend()}`}renderInputWithAutoWidth(){return u`<div id="control">${this.renderInput()}${this.renderAutoWidthBackground()}</div>`}renderInput(){return u`<input id="input" .type="${this.type}" .value="${this.value}" .name="${this.name}" pattern="${w(this.pattern)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" spellcheck="${this.spellcheck}" autocomplete="${w(this.autocomplete)}" placeholder="${w(this.placeholder)}" aria-label="${w(this.label)}" inputmode="${w(this.inputMode)}" ?disabled="${this.disabled}" ?autofocus="${this.autofocus}" ?required="${this.required}" ?readonly="${this.readonly}" tabindex="${w(this.tabIndex)}" @input="${this.onInput}" @change="${this.onChange}">`}renderAutoWidthBackground(){return u`<div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return u`${this.value.length>0?this.value:this.placeholder}`}},Gr=new WeakSet,Ma=function(i){this.type!=="color"&&i.key=="Enter"&&this.submit()},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[b`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;color:var(--uui-color-text,#060606);color-scheme:var(--uui-color-scheme,normal);box-sizing:border-box;background-color:var(--uui-input-background-color,var(--uui-color-surface,#fff));border:var(--uui-input-border-width,1px) solid var(--uui-input-border-color,var(--uui-color-border,#d8d7d9));border-radius:var(--uui-border-radius,3px);--uui-button-height:100%;--auto-width-text-margin-right:0;--auto-width-text-margin-left:0}#control{position:relative;display:flex;flex-direction:column;align-items:stretch;justify-content:center;flex-grow:1}#auto{border:0 1px solid transparent;visibility:hidden;white-space:pre;z-index:-1;height:0;padding:0 var(--uui-size-space-3,9px);margin:0 var(--auto-width-text-margin-right) 0 var(--auto-width-text-margin-left)}:host([auto-width]) #input{width:10px;min-width:100%}:host(:hover){border-color:var(--uui-input-border-color-hover,var(--uui-color-border-standalone,#c2c2c2))}:host(:focus-within){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1));outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:focus){border-color:var(--uui-input-border-color-focus,var(--uui-color-border-emphasis,#a1a1a1))}:host([disabled]){background-color:var(--uui-input-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input{-webkit-text-fill-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([readonly]){background-color:var(--uui-input-background-color-readonly,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-input-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2))}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border-color:var(--uui-color-invalid,#d42054)}input{font-family:inherit;padding:1px var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:var(--uui-border-radius,3px);box-sizing:border-box;border:none;background:0 0;width:100%;height:inherit;text-align:inherit;outline:0}input[type=password]::-ms-reveal{display:none}input[type=color]{width:30px;padding:0;border:none}slot[name=append],slot[name=prepend]{display:flex;align-items:center;line-height:1;height:100%}::slotted(uui-input),::slotted(uui-input-lock){height:100%;--uui-input-border-width:0}`],R([l()],n.UUIInputElement.prototype,"min",2),R([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),R([l({attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),R([l()],n.UUIInputElement.prototype,"max",2),R([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),R([l({attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),R([l({type:Number})],n.UUIInputElement.prototype,"step",2),R([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),R([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),R([l()],n.UUIInputElement.prototype,"placeholder",2),R([l()],n.UUIInputElement.prototype,"autocomplete",2),R([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),R([l({type:String})],n.UUIInputElement.prototype,"type",1),R([l({attribute:"inputmode"})],n.UUIInputElement.prototype,"inputMode",2),R([l({type:String})],n.UUIInputElement.prototype,"pattern",2),R([l({type:Number,reflect:!1,attribute:"tabindex"})],n.UUIInputElement.prototype,"tabIndex",2),R([S("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=R([p("uui-input")],n.UUIInputElement);let Wr=class extends P{static{this.LOCK_CHANGE="lock-change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var bp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,Ta=i=>{throw TypeError(i)},$o=(i,e,t,r)=>{for(var o=r>1?void 0:r?mp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&bp(e,t,o),o},Na=(i,e,t)=>e.has(i)||Ta("Cannot "+t),vp=(i,e,t)=>(Na(i,e,"read from private field"),t?t.call(i):e.get(i)),gp=(i,e,t)=>e.has(i)?Ta("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),fp=(i,e,t,r)=>(Na(i,e,"write to private field"),e.set(i,t),t),ko;n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),gp(this,ko,!0),this.unlockLabel="Unlock input",this.lockLabel="Lock input",this.readonly=!0,this.tabIndex=-1}set locked(e){fp(this,ko,e),this.tabIndex=e?-1:0}get locked(){return vp(this,ko)}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked,this.pristine=!1,this.dispatchEvent(new Wr(Wr.LOCK_CHANGE)),this.locked||this._input?.focus()}renderIcon(){return this.locked===!0?u`<uui-icon name="lock" .fallback="${Sc.strings[0]}"></uui-icon>`:u`<uui-icon name="unlock" .fallback="${Lc.strings[0]}"></uui-icon>`}renderPrepend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?this.unlockLabel:this.lockLabel}">${this.renderIcon()}</uui-button>`}},ko=new WeakMap,n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,b`#lock{height:100%;--uui-button-padding-left-factor:0.75;--uui-button-padding-right-factor:0.75;font-size:12px}:host([locked]) #input{cursor:not-allowed;opacity:.55}`],$o([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",1),$o([l({type:String,reflect:!1,attribute:"unlock-label"})],n.UUIInputLockElement.prototype,"unlockLabel",2),$o([l({type:String,reflect:!1,attribute:"lock-label"})],n.UUIInputLockElement.prototype,"lockLabel",2),n.UUIInputLockElement=$o([p("uui-input-lock")],n.UUIInputLockElement);var yp=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,qr=(i,e,t,r)=>{for(var o=r>1?void 0:r?wp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&yp(e,t,o),o};n.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){this.passwordType=e}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),_(this,"uui-icon"),_(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?u`<uui-icon name="see" .fallback="${Ac.strings[0]}"></uui-icon>`:u`<uui-icon name="unsee" .fallback="${Oc.strings[0]}"></uui-icon>`}renderAppend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onPasswordToggle}" compact="compact" label="${this.passwordType==="password"?"Show password":"Hide password"}" id="eye">${this.renderIcon()}</uui-button>`}},n.UUIInputPasswordElement.styles=[...n.UUIInputElement.styles,b`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],qr([y()],n.UUIInputPasswordElement.prototype,"passwordType",2),qr([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=qr([p("uui-input-password")],n.UUIInputPasswordElement);var Up=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyboardShortcutElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[b`:host{display:inline-block;font-family:inherit;font-size:var(--uui-size-4,12px);color:var(--uui-color-text,#060606)}::slotted(:first-child)uui-key{margin-left:0}::slotted(:last-child)uui-key{margin-right:0}`],n.UUIKeyboardShortcutElement=Up([p("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var _p=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIKeyElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyElement.styles=[b`:host{background:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border,#d8d7d9);font-family:inherit;font-size:var(--uui-type-small-size,12px);color:var(--uui-color-text,#060606);border-radius:5px;margin:0 5px;padding:5px 7px;box-sizing:border-box;user-select:none;text-transform:lowercase}`],n.UUIKeyElement=_p([p("uui-key")],n.UUIKeyElement);var $p=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,Eo=(i,e,t,r)=>{for(var o=r>1?void 0:r?kp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&$p(e,t,o),o};n.UUILabelElement=class extends m{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const e=this.getForElement();e&&(e.focus(),e.click())}getForElement(){return typeof this.for=="string"?this.getRootNode()?.getElementById(this.for)||null:this.for||null}render(){return u`<slot></slot>${this.required?u`<div id="required">*</div>`:""}`}},n.UUILabelElement.styles=[b`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],Eo([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),Eo([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),Eo([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=Eo([p("uui-label")],n.UUILabelElement);var Ep=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,Kr=(i,e,t,r)=>{for(var o=r>1?void 0:r?xp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ep(e,t,o),o};n.UUILoaderBarElement=class extends m{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=A(e,0,100),this.requestUpdate("progress",t)}get animationDuration(){return this._animationDuration}set animationDuration(e){const t=this._animationDuration;this._animationDuration=e>=0?e:1,this.requestUpdate("animationDuration",t)}render(){return u`${this.progress?u`<div id="bar" style="max-width:${this.progress.toString()}"></div>`:""}<div id="bar-anim" class="${this.progress?"":"animate"}" style="animation-duration:${this.animationDuration}"></div><div id="bar-background"></div>`}},n.UUILoaderBarElement.styles=[b`:host{position:relative;display:block;width:100%;height:4px;overflow:hidden;color:var(--uui-color-default,#1b264f)}#bar,#bar-anim,#bar-background{position:absolute;inset:0;height:100%}#bar,#bar-background{background:currentColor}#bar{transition:max-width 120ms ease}#bar-background{opacity:.3}#bar-anim{transform:scaleX(.4);animation:bar-loading 1s infinite linear;background:linear-gradient(-90deg,#fff 0,#fff 25%,transparent 100%)}#bar-anim.animate{background:linear-gradient(-90deg,currentColor 0,currentColor 25%,transparent 100%)}@keyframes bar-loading{0%{transform-origin:-175% 0}100%{transform-origin:175% 0}}`],Kr([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),Kr([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=Kr([p("uui-loader-bar")],n.UUILoaderBarElement);var Ip=Object.defineProperty,Cp=Object.getOwnPropertyDescriptor,Xr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ip(e,t,o),o};n.UUILoaderCircleElement=class extends m{constructor(){super(...arguments),this.progress=0,this.showProgress=!1,this._resizeObserver=new ResizeObserver(()=>this.onResize()),this._isLarge=!1}_circleStyle(){return this.progress?{strokeDasharray:`${this.progress} 100`}:{strokeDasharray:"100 100"}}firstUpdated(){this._resizeObserver.observe(this)}disconnectedCallback(){this._resizeObserver.disconnect()}onResize(){const e=this.clientHeight>=30;this._isLarge!=e&&(this._isLarge=e,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?u`<span id="progress-display">${this.progress}</span>`:""}render(){return u`<svg id="spinner" class="${this.progress?"":"animate"}" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle id="bg" cx="50%" cy="50%" r="16"/><g><circle id="circle" cx="50%" cy="50%" r="16" style="${ke(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}},n.UUILoaderCircleElement.styles=[b`:host{vertical-align:middle;line-height:0;overflow:hidden;display:inline-flex;justify-content:center;align-items:center;position:relative;width:1em;height:1em;color:var(--uui-color-default,#1b264f)}#spinner{width:100%;height:100%}#spinner g{transform-origin:50% 50%;animation:18s linear infinite spinner-animation}#spinner.animate g{animation:.8s linear infinite spinner-animation}@keyframes spinner-animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#spinner.animate #circle{animation:1.4s ease-in infinite circle-animation}@keyframes circle-animation{0%{stroke-dashoffset:-55}38%{stroke-dashoffset:-88}100%{stroke-dashoffset:-55}}svg circle{fill:transparent;stroke:currentColor;stroke-width:6px}#bg{opacity:.5}#circle{stroke-linecap:round;stroke-dasharray:0 0;transform-origin:50% 50%;transform:rotate(-90deg);transition:stroke-dasharray 120ms ease}#progress-display{position:absolute;left:0;top:50%;right:0;stroke:currentColor;transform:translateY(-50%);font-size:.3em;font-weight:700;text-align:center;padding-top:.09em}`],Xr([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),Xr([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=Xr([p("uui-loader-circle")],n.UUILoaderCircleElement);var Sp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUILoaderElement=class extends m{render(){return u`<div></div><div></div><div></div>`}},n.UUILoaderElement.styles=[b`:host{color:var(--uui-color-default,#1b264f)}div{display:inline-block;width:var(--uui-size-2,6px);height:var(--uui-size-2,6px);border:2px solid currentColor;border-radius:100%;animation:loaderAnimation 1.4s infinite}div:nth-child(1n){animation-delay:0s}div:nth-child(2n){animation-delay:.15s}div:nth-child(3n){animation-delay:.3s}@keyframes loaderAnimation{0%{transform:scale(.5);background-color:currentColor}50%{transform:scale(1);background-color:transparent}100%{transform:scale(.5);background-color:currentColor}}`],n.UUILoaderElement=Sp([p("uui-loader")],n.UUILoaderElement);let Nt=class extends P{static{this.SHOW_CHILDREN="show-children"}static{this.HIDE_CHILDREN="hide-children"}static{this.CLICK_LABEL="click-label"}};var Pp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,Ba=i=>{throw TypeError(i)},ne=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ap(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Pp(e,t,o),o},zp=(i,e,t)=>e.has(i)||Ba("Cannot "+t),Lp=(i,e,t)=>e.has(i)?Ba("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Yr=(i,e,t)=>(zp(i,e,"access private method"),t),_i,Zr,Da;n.UUIMenuItemElement=class extends Gi(yt(oi(me("label",m)))){constructor(){super(...arguments),Lp(this,_i),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,this.caretLabel="Reveal the underlying items",this.iconSlotHasContent=!1,this._labelButtonChanged=e=>{this.selectableTarget=e||this},this._iconSlotChanged=e=>{this.iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0},this._onCaretClicked=()=>{const e=this.showChildren?Nt.HIDE_CHILDREN:Nt.SHOW_CHILDREN,t=new Nt(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),_(this,"uui-symbol-expand"),_(this,"uui-loader-bar")}async focus(){await this.updateComplete,this.shadowRoot?.querySelector("#label-button")?.focus?.()}_renderLabelInside(){return u`<slot name="icon" id="icon" style="${this.iconSlotHasContent?"":"display: none;"}" @slotchange="${this._iconSlotChanged}"></slot>${this.renderLabel()}<slot name="badge" id="badge"></slot>`}_renderLabelAsAnchor(){return this.disabled?u`<span id="label-button" ${uo(this._labelButtonChanged)}>${this._renderLabelInside()}</span>`:u`<a id="label-button" ${uo(this._labelButtonChanged)} href="${w(this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" @click="${Yr(this,_i,Zr)}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</a>`}_renderLabelAsButton(){return u`<button id="label-button" ${uo(this._labelButtonChanged)} @click="${Yr(this,_i,Zr)}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</button>`}render(){return u`<div id="menu-item" aria-label="menuitem" role="menuitem"><div id="label-button-background"></div>${this.hasChildren?u`<button id="caret-button" aria-label="${this.caretLabel}" @click="${this._onCaretClicked}">${Yr(this,_i,Da).call(this)}</button>`:""} ${this.href&&this.selectOnly!==!0&&this.selectable!==!0?this._renderLabelAsAnchor():this._renderLabelAsButton()}<slot id="actions-container" name="actions"></slot>${this.loading?u`<uui-loader-bar id="loader"></uui-loader-bar>`:""}</div>${this.showChildren?u`<slot></slot>`:""}`}},_i=new WeakSet,Zr=function(){if(this.selectOnly)return;const i=new Nt(Nt.CLICK_LABEL);this.dispatchEvent(i)},Da=function(){if(this.renderExpandSymbol){const i=this.renderExpandSymbol();if(i)return i}return u`<uui-symbol-expand aria-hidden="true" ?open="${this.showChildren}"></uui-symbol-expand>`},n.UUIMenuItemElement.styles=[b`:host{box-sizing:border-box;display:block;--uui-menu-item-child-indent:calc(var(--uui-menu-item-indent, 0) + 1);user-select:none;--flat-structure-reversed:calc(
|
|
410
406
|
1 - var(--uui-menu-item-flat-structure, 0)
|
|
411
|
-
)}#menu-item{position:relative;padding-left:calc(var(--uui-menu-item-indent,0) * var(--uui-size-4,12px));display:grid;grid-template-columns:calc(var(--flat-structure-reversed) * var(--uui-size-8,24px)) 1fr;grid-template-rows:1fr;white-space:nowrap}:host(:not([active],[selected],[disabled])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled],[select-mode=highlight])) #menu-item #label-button:hover~#label-button-background{background-color:var(--uui-menu-item-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}:host(:not([active],[selected])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled])) #menu-item #label-button:hover{color:var(--uui-menu-item-color-hover,var(--uui-color-interactive-emphasis,#3544b1))}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-menu-item-color-active,var(--uui-color-current-contrast,#1b264f))}:host([active]) #label-button-background{background-color:var(--uui-menu-item-background-color-active,var(--uui-color-current,#f5c1bc))}:host([active]) #caret-button:hover,:host([active]) #label-button:hover~#label-button-background{background-color:var(--uui-menu-item-background-color-active-hover,var(--uui-color-current-emphasis,#f8d6d3))}:host([disabled]) #menu-item{background-color:var(--uui-menu-item-background-color-disabled,var(--uui-color-disabled,#f3f3f5))}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button,:host([selected]:not([select-mode=highlight],[disabled])) #label-button{color:var(--uui-menu-item-color-selected,var(--uui-color-selected-contrast,#fff))}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color:var(--uui-menu-item-background-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button:hover,:host([selected]:not([select-mode=highlight],[disabled])) #label-button:hover~#label-button-background{background-color:var(--uui-menu-item-background-color-selected-hover,var(--uui-color-selected-emphasis,#4656c8))}:host([select-mode=highlight]:not([disabled],[active],[selectable])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight,var(--uui-color-surface-emphasis,#fafafa))}:host([select-mode=highlight][active]:not([disabled])) #menu-item #label-button-background{border-radius:var(--uui-border-radius,3px)}:host([select-mode=highlight][active][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight-active-selected,var(--uui-color-current-emphasis,#f8d6d3))}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #caret-button,:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button{color:var(--uui-menu-item-color-highlight-selected,var(--uui-color-interactive,#1b264f))}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color:var(--uui-menu-item-background-color-highlight-selectable-selected,var(--uui-color-interactive-emphasis,#3544b1))}:host([selected][selectable][select-mode=highlight]:not([active])) #menu-item #caret-button:hover{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight-selectable-selected,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-menu-item-color-highlight-selectable-selected,var(--uui-color-interactive-emphasis,#3544b1))}:host([select-mode=highlight]:not([disabled])) #menu-item #label-button-background::after{border-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px;border:2px solid var(--uui-menu-item-border-color-highlight,var(--uui-color-selected,#3544b1));opacity:0}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #caret-button:hover::after{border-top-left-radius:var(--uui-border-radius,3px);border-bottom-left-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px 0 1px 1px;border:2px solid var(--uui-menu-item-border-color-highlight,var(--uui-color-selected,#3544b1));border-right:none}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button-background::after{opacity:1}:host([select-mode=highlight][selectable]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.33}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button:hover~#label-button-background::after{opacity:.66}:host([disabled]) #label-button{cursor:default;opacity:.5}button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;padding:0;text-align:left;border:none;color:inherit;background-color:transparent;cursor:pointer;min-height:var(--uui-size-12,36px);z-index:1}#label-button{position:relative;flex-grow:1;grid-column-start:2;white-space:nowrap;overflow:hidden;padding-right:var(--uui-size-space-3,9px);padding-left:calc(var(--uui-menu-item-flat-structure) * var(--uui-size-space-3,9px));display:inline-flex;align-items:center;text-decoration:none;color:currentColor;min-height:var(--uui-size-12,36px);z-index:1;font-weight:inherit}#label-button .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span#label-button{pointer-events:none}#caret-button{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:end;padding-inline-end:3px;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--uui-menu-item-border-radius,0)}#actions-container{opacity:0;width:0;grid-column-start:3;overflow:hidden}:host(:not([disabled])) #menu-item:focus #actions-container,:host(:not([disabled])) #menu-item:focus-within #actions-container,:host(:not([disabled])) #menu-item:hover #actions-container{opacity:1;width:auto}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;margin-right:var(--uui-size-2,6px)}#badge{font-size:12px;--uui-badge-position:relative;--uui-badge-position:auto;display:block;margin-left:6px}:host([select-mode=highlight]) #label-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #label-button:focus-visible::after{content:'';border-radius:calc(var(--uui-border-radius,3px) - 1px);position:absolute;inset:3px 3px 3px -5px;border:2px solid var(--uui-color-focus,#3879ff)}:host([select-mode=highlight]) #caret-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #caret-button:focus-visible::after{content:'';position:absolute;inset:3px;border-radius:calc(var(--uui-border-radius,3px) - 1px);border:2px solid var(--uui-color-focus,#3879ff)}slot:not([name]){position:relative;display:block;width:100%}slot:not([name]){--uui-menu-item-indent:var(--uui-menu-item-child-indent)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-base-unit) * 4);margin-right:var(--uui-size-base-unit)}`],de([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),de([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),de([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),de([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),de([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),de([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),de([l({type:String})],n.UUIMenuItemElement.prototype,"rel",2),de([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),de([l({type:String,attribute:"caret-label"})],n.UUIMenuItemElement.prototype,"caretLabel",2),de([y()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=de([p("uui-menu-item")],n.UUIMenuItemElement);var Lp=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Nt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Op(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Lp(e,t,o),o};const Da="uui:modal-open",Bt="uui:modal-close",Va="uui:modal-close-end";let re=class extends m{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(Da,{cancelable:!0}),r=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(t),this.dispatchEvent(r),!(t.defaultPrevented||r.defaultPrevented)&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(Bt,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this.forceClose()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=e,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(e){super.firstUpdated(e),this.isClosing||this.open()}_openModal(){this.isOpen=!0,this._dialogElement?.showModal(),this._dialogElement?.addEventListener("cancel",this.close)}forceClose(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.dispatchEvent(new CustomEvent(Va)),this.remove()}static{this.styles=[b`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none;background:0 0;color:var(--uui-color-text,#060606)}dialog::backdrop{background:0 0;opacity:0}dialog::after{content:'';position:absolute;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));pointer-events:none;opacity:1;transition:opacity var(--uui-modal-transition-duration,250ms);z-index:1}:host([index='0']) dialog::after{opacity:0}`]}};Nt([S("dialog")],re.prototype,"_dialogElement",2),Nt([l({type:Boolean,reflect:!0,attribute:"is-open"})],re.prototype,"isOpen",2),Nt([l({type:Boolean,reflect:!0,attribute:"is-closing"})],re.prototype,"isClosing",2),Nt([l({type:Number,reflect:!0})],re.prototype,"index",2),Nt([l({type:Number,reflect:!0,attribute:"unique-index"})],re.prototype,"uniqueIndex",2),Nt([l({type:Number,attribute:"transition-duration"})],re.prototype,"transitionDuration",1);var Mp=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,ja=i=>{throw TypeError(i)},Ha=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Mp(e,t,o),o},Np=(i,e,t)=>e.has(i)||ja("Cannot "+t),Ra=(i,e,t)=>(Np(i,e,"read from private field"),t?t.call(i):e.get(i)),Bp=(i,e,t)=>e.has(i)?ja("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Eo,Qr;n.UUIModalSidebarElement=class extends re{constructor(){super(...arguments),Bp(this,Eo),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Ra(this,Eo,Qr)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}forceClose(){this.isClosing||(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Ra(this,Eo,Qr)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return u`<dialog><slot></slot></dialog>`}},Eo=new WeakSet,Qr=function(){return this._dialogElement?.getBoundingClientRect().width??0},n.UUIModalSidebarElement.styles=[...re.styles,b`:host{outline:0;--uui-modal-sidebar-left-gap:24px;--uui-modal-sidebar-background:var(--uui-color-surface,#fff)}@media (min-width:600px){:host{--uui-modal-sidebar-left-gap:64px}}dialog{height:100%;width:100%;box-sizing:border-box;max-width:calc(100% - var(--uui-modal-sidebar-left-gap));margin-left:auto;right:var(--uui-modal-offset);transition:right var(--uui-modal-transition-duration,250ms);background:var(--uui-modal-sidebar-background,var(--uui-color-surface,#fff))}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}:host([hide]) dialog{display:none}:host([size=large]) dialog{max-width:min(1200px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=medium]) dialog{max-width:min(800px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=small]) dialog{max-width:min(500px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],Ha([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Ha([p("uui-modal-sidebar")],n.UUIModalSidebarElement);var Dp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,Fa=i=>{throw TypeError(i)},Dt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Vp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Dp(e,t,o),o},Ga=(i,e,t)=>e.has(i)||Fa("Cannot "+t),Ui=(i,e,t)=>(Ga(i,e,"read from private field"),t?t.call(i):e.get(i)),Jr=(i,e,t)=>e.has(i)?Fa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),xo=(i,e,t)=>(Ga(i,e,"access private method"),t),en,Vt,jt,tn,on;n.UUIModalContainerElement=class extends m{constructor(){super(),Jr(this,jt),this.sidebarGap=64,this.transitionDurationMS=250,Jr(this,en,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof re)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(Bt,Ui(this,Vt))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(Bt,Ui(this,Vt))),this._sidebars=this._modals.filter(t=>t instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}xo(this,jt,tn).call(this),xo(this,jt,on).call(this)}),Jr(this,Vt,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(Bt,Ui(this,Vt)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}xo(this,jt,tn).call(this),xo(this,jt,on).call(this)}),this.addEventListener(Bt,Ui(this,Vt))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return u`<slot @slotchange="${Ui(this,en)}"></slot>`}},en=new WeakMap,Vt=new WeakMap,jt=new WeakSet,tn=function(){this.setAttribute("backdrop","");const i=this._modals?.filter(e=>!e.isClosing).reverse()??[];i?.forEach((e,t)=>{e.index=t,e.transitionDuration=this.transitionDurationMS}),i?.forEach(e=>{const t=i?.filter(r=>r.constructor.name===e.constructor.name);e.uniqueIndex=t?.indexOf(e)??0})},on=function(){requestAnimationFrame(()=>{let i=0;const e=this._sidebars?.filter(t=>!t.isClosing).reverse()??[];for(let t=0;t<e.length;t++){const r=e[t],o=e[t+1],s=i;if(r.updateComplete.then(()=>{r.style.setProperty("--uui-modal-offset",s+"px")}),o?.hasAttribute("hide"))break;const a=r.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=o?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,h=a+i+this.sidebarGap-c;i=h>0?h:0}})},n.UUIModalContainerElement.styles=b`:host{position:fixed;--uui-modal-color-backdrop:rgba(0, 0, 0, 0.5)}:host::after{content:'';position:fixed;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));opacity:0;pointer-events:none;transition:opacity var(--uui-modal-transition-duration,250ms)}:host([backdrop])::after{opacity:1}`,Dt([S("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),Dt([y()],n.UUIModalContainerElement.prototype,"_modals",2),Dt([y()],n.UUIModalContainerElement.prototype,"_sidebars",2),Dt([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),Dt([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=Dt([p("uui-modal-container")],n.UUIModalContainerElement);var jp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIModalDialogElement=class extends re{render(){return u`<dialog><slot></slot></dialog>`}},n.UUIModalDialogElement.styles=[...re.styles,b`:host{outline:0;--uui-modal-dialog-background:var(--uui-color-surface,#fff)}dialog{margin:auto;max-width:100%;max-height:100%;border-radius:var(--uui-modal-dialog-border-radius,calc(var(--uui-border-radius,3px) * 4));background:var(--uui-modal-dialog-background,var(--uui-color-surface,#fff))}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}`],n.UUIModalDialogElement=jp([p("uui-modal-dialog")],n.UUIModalDialogElement);let rt=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Hp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,Q=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Hp(e,t,o),o};const Fp=45,rn=(i,e,t)=>Math.min(Math.max(i,e),t),Gp=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);n.UUIPaginationElement=class extends m{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this.firstLabel="First",this.previousLabel="Previous",this.nextLabel="Next",this.lastLabel="Last",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),_(this,"uui-button"),_(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((o,s)=>o+s.getBoundingClientRect().width,0),r=(e-t)/Fp/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,r=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return Gp(rn(t,1,this.total),rn(r,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=rn(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new rt(rt.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new rt(rt.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new rt(rt.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="${this.firstLabel}" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}"></uui-button>`}renderPrevious(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="${this.previousLabel}" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}"></uui-button>`}renderNext(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="${this.nextLabel}" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}"></uui-button>`}renderLast(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="${this.lastLabel}" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}"></uui-button>`}renderDots(){return u`<uui-button compact="compact" look="outline" role="listitem" tabindex="-1" class="dots" label="More pages">...</uui-button>`}renderPage(e){return u`<uui-button compact="compact" look="outline" role="listitem" label="Go to page ${e}" class="${"page"+(e===this._current?" active":"")}" tabindex="${e===this._current?"-1":""}" @click="${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}">${e}</uui-button>`}renderNavigationLeft(){return u`${this.renderFirst()} ${this.renderPrevious()} ${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return u`${this._visiblePages.includes(this.total)?"":this.renderDots()} ${this.renderNext()} ${this.renderLast()}`}render(){return u`<uui-button-group role="list" id="pages">${this.renderNavigationLeft()} ${this._visiblePages.map(e=>this.renderPage(e))} ${this.renderNavigationRight()}</uui-button-group>`}},n.UUIPaginationElement.styles=[b`uui-button-group{width:100%}uui-button{--uui-button-border-color:var(--uui-color-border-standalone,#c2c2c2);--uui-button-border-color-hover:var(--uui-color-interactive-emphasis,#3544b1);--uui-button-border-color-disabled:var(--uui-color-border-standalone,#c2c2c2)}.page{min-width:36px;max-width:72px}.page.active{--uui-button-background-color:var(--uui-color-current,#f5c1bc)}.nav{min-width:72px}.dots{pointer-events:none}.active{pointer-events:none}`],Q([Zl("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),Q([S("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),Q([l()],n.UUIPaginationElement.prototype,"label",2),Q([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),Q([l()],n.UUIPaginationElement.prototype,"firstLabel",2),Q([l()],n.UUIPaginationElement.prototype,"previousLabel",2),Q([l()],n.UUIPaginationElement.prototype,"nextLabel",2),Q([l()],n.UUIPaginationElement.prototype,"lastLabel",2),Q([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),Q([y()],n.UUIPaginationElement.prototype,"_range",2),Q([y()],n.UUIPaginationElement.prototype,"_visiblePages",2),Q([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=Q([p("uui-pagination")],n.UUIPaginationElement);let Wa=class extends P{static{this.CLOSE="close"}};var Wp=Object.defineProperty,qp=Object.getOwnPropertyDescriptor,_i=(i,e,t,r)=>{for(var o=r>1?void 0:r?qp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wp(e,t,o),o};function Io(i,e,t){return i<e?e:i>t?t:i}n.UUIPopoverElement=class extends m{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new Wa(Wa.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const r=t.position==="absolute",o=/(auto|scroll)/;let s=e;for(;s=s.parentElement;)if(t=getComputedStyle(s),!(r&&t.position==="static")&&(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(s),t.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){if(!this.shadowRoot)return;const e=this.containerElement;if(!e)return;const t=this.containerElement?.getBoundingClientRect(),r=this._trigger?.getBoundingClientRect();if(r!=null&&t!=null){const o=this._scrollParents.map($e=>$e.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,t,o));let s=this._currentPlacement.indexOf("top")!==-1,a=this._currentPlacement.indexOf("bottom")!==-1,c=this._currentPlacement.indexOf("left")!==-1,h=this._currentPlacement.indexOf("right")!==-1;const d=this._currentPlacement.indexOf("-start")!==-1,g=this._currentPlacement.indexOf("-end")!==-1;let f=.5,U=.5,x=.5,I=.5,L=0,X=0;if(this.placement==="auto"){const $e=this._scrollParents[0],Oi=$e.clientWidth,dt=$e.clientHeight,Zt=r.x-t.width,Qt=Oi-(r.x+r.width)-t.width,Nn=r.y-t.height,jo=dt-(r.y+r.height)-t.height;let Ho=.5,Ro=.5;const Cm=Math.max(Zt,Qt);let Ll=Math.max(Nn,jo);jo>Nn&&jo>this.margin&&(Ll+=9999),Cm>Ll?(Zt>Qt?(Ho=0,c=!0):(Ho=1,h=!0),L=this.margin):(Nn>jo?(Ro=0,s=!0):(Ro=1,a=!0),X=this.margin),f=Ho,U=Ro,x=1-Ho,I=1-Ro}else s&&(I=1,U=0),a&&(I=0,U=1),(s||a)&&(X=this.margin,d&&(x=0,f=0),g&&(x=1,f=1)),c&&(x=1,f=0),h&&(x=0,f=1),(c||h)&&(L=this.margin,d&&(I=0,U=0),g&&(I=1,U=1));const Oe=-t.width*x+r.width*f-L*(x*2-1),Me=-t.height*I+r.height*U-X*(I*2-1);let ct=Oe,ht=Me;s||a?(this._scrollParents.forEach(($e,Oi)=>{const dt=$e===document.body?0:o[Oi].x,Zt=-r.x+dt,Qt=$e.clientWidth-r.x-r.width+Oe+dt-(t.width-r.width)*(1-f);ct=Io(ct,Zt,Qt)}),ct=Io(ct,-t.width,r.width)):(c||h)&&(this._scrollParents.forEach(($e,Oi)=>{const dt=$e===document.body?0:o[Oi].y,Zt=-r.y+dt,Qt=$e.clientHeight-r.y-r.height+Me+dt-(t.height-r.height)*(1-U);ht=Io(ht,Zt,Qt)}),ht=Io(ht,-t.height,r.height)),(this._positionX!==ct||this._positionY!==ht)&&(this._positionX=ct,this._positionY=ht,Oe===ct&&Me===ht&&this._stopScrollListener(),e.style.left=`${this._positionX}px`,e.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),s=o[0],a=o[1]||null;let c;return this._scrollParents.some((h,d)=>{const g=h===document.body?0:r[d].x,f=h===document.body?0:r[d].y;return s==="top"&&t.y-2<=f?(c="bottom",!0):s==="bottom"&&t.y+t.height+2>=h.clientHeight+f?(c="top",!0):s==="left"&&t.x-2<=g?(c="right",!0):s==="right"&&t.x+t.width+2>=h.clientWidth+g?(c="left",!0):!1}),c?(this._startScrollListener(),c+(a?`-${a}`:"")):e}render(){return u`<slot id="trigger" name="trigger" @slotchange="${this._onTriggerSlotChanged}"></slot><div id="container">${this._open?u`<slot name="popover"></slot>`:""}</div>`}},n.UUIPopoverElement.styles=[b`:host{position:relative;display:inline-block;width:100%}#container{position:absolute;width:100%;z-index:var(--uui-popover-z-index,1)}slot[name=popover]{display:block}#trigger{position:relative;width:100%}slot[name=trigger]::slotted(uui-button){--uui-button-border-radius:var(
|
|
407
|
+
)}#menu-item{position:relative;padding-left:calc(var(--uui-menu-item-indent,0) * var(--uui-size-4,12px));display:grid;grid-template-columns:calc(var(--flat-structure-reversed) * var(--uui-size-8,24px)) 1fr;grid-template-rows:1fr;white-space:nowrap}:host(:not([active],[selected],[disabled],[select-mode=highlight])) #menu-item:has(#label-button:hover) #label-button-background{background-color:var(--uui-menu-item-background-color-hover,var(--uui-color-surface-emphasis,#fafafa))}:host(:not([active],[selected])) #menu-item #caret-button:hover,:host(:not([active],[selected],[disabled])) #menu-item #label-button:hover{color:var(--uui-menu-item-color-hover,var(--uui-color-interactive-emphasis,#3544b1))}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-menu-item-color-active,var(--uui-color-current-contrast,#1b264f))}:host([active]) #label-button-background{background-color:var(--uui-menu-item-background-color-active,var(--uui-color-current,#f5c1bc))}:host([active]) #caret-button:hover,:host([active]) #menu-item:has(#label-button:hover) #label-button-background{background-color:var(--uui-menu-item-background-color-active-hover,var(--uui-color-current-emphasis,#f8d6d3))}:host([disabled]) #menu-item{background-color:var(--uui-menu-item-background-color-disabled,var(--uui-color-disabled,#f3f3f5))}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button,:host([selected]:not([select-mode=highlight],[disabled])) #label-button{color:var(--uui-menu-item-color-selected,var(--uui-color-selected-contrast,#fff))}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color:var(--uui-menu-item-background-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:not([select-mode=highlight],[disabled])) #caret-button:hover,:host([selected]:not([select-mode=highlight],[disabled])) #menu-item:has(#label-button:hover) #label-button-background{background-color:var(--uui-menu-item-background-color-selected-hover,var(--uui-color-selected-emphasis,#4656c8))}:host([select-mode=highlight]:not([disabled],[active],[selectable])) #menu-item:has(#label-button:hover) #label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight,var(--uui-color-surface-emphasis,#fafafa))}:host([select-mode=highlight][active]:not([disabled])) #menu-item #label-button-background{border-radius:var(--uui-border-radius,3px)}:host([select-mode=highlight][active][selected]:not([disabled])) #menu-item:has(#label-button:hover) #label-button-background{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight-active-selected,var(--uui-color-current-emphasis,#f8d6d3))}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #caret-button,:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button{color:var(--uui-menu-item-color-highlight-selected,var(--uui-color-interactive,#1b264f))}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color:var(--uui-menu-item-background-color-highlight-selectable-selected,var(--uui-color-interactive-emphasis,#3544b1))}:host([selected][selectable][select-mode=highlight]:not([active])) #menu-item #caret-button:hover{border-radius:var(--uui-border-radius,3px);background-color:var(--uui-menu-item-background-color-highlight-selectable-selected,var(--uui-color-surface-emphasis,#fafafa));color:var(--uui-menu-item-color-highlight-selectable-selected,var(--uui-color-interactive-emphasis,#3544b1))}:host([select-mode=highlight]:not([disabled])) #menu-item #label-button-background::after{border-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px;border:2px solid var(--uui-menu-item-border-color-highlight,var(--uui-color-selected,#3544b1));opacity:0}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #caret-button:hover::after{border-top-left-radius:var(--uui-border-radius,3px);border-bottom-left-radius:var(--uui-border-radius,3px);position:absolute;content:'';inset:1px 0 1px 1px;border:2px solid var(--uui-menu-item-border-color-highlight,var(--uui-color-selected,#3544b1));border-right:none}:host([select-mode=highlight][selected]:not([disabled])) #menu-item #label-button-background::after{opacity:1}:host([select-mode=highlight][selectable]:not([disabled])) #menu-item:has(#label-button:hover) #label-button-background::after{opacity:.33}:host([select-mode=highlight][selected]:not([disabled])) #menu-item:has(#label-button:hover) #label-button-background::after{opacity:.66}:host([disabled]) #label-button{cursor:default;opacity:.5}button{display:inline-flex;align-items:center;font-family:inherit;font-size:inherit;padding:0;text-align:left;border:none;color:inherit;background-color:transparent;cursor:pointer;min-height:var(--uui-size-12,36px)}#label-button{position:relative;flex-grow:1;grid-column-start:2;white-space:nowrap;overflow:hidden;padding-right:var(--uui-size-space-3,9px);padding-left:calc(var(--uui-menu-item-flat-structure) * var(--uui-size-space-3,9px));display:inline-flex;align-items:center;text-decoration:none;color:currentColor;min-height:var(--uui-size-12,36px);font-weight:inherit}#label-button .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span#label-button{pointer-events:none}#caret-button{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:end;padding-inline-end:3px;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--uui-menu-item-border-radius,0)}#actions-container{opacity:0;width:0;grid-column-start:3;overflow:hidden}:host(:not([disabled])) #menu-item:focus #actions-container,:host(:not([disabled])) #menu-item:focus-within #actions-container,:host(:not([disabled])) #menu-item:hover #actions-container{opacity:1;width:auto}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;margin-right:var(--uui-size-2,6px)}#badge{font-size:12px;--uui-badge-position:relative;--uui-badge-position:auto;display:block;margin-left:6px}:host([select-mode=highlight]) #label-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #label-button:focus-visible::after{content:'';border-radius:calc(var(--uui-border-radius,3px) - 1px);position:absolute;inset:3px 3px 3px -5px;border:2px solid var(--uui-color-focus,#3879ff)}:host([select-mode=highlight]) #caret-button:focus-visible{outline:0;overflow:initial}:host([select-mode=highlight]) #caret-button:focus-visible::after{content:'';position:absolute;inset:3px;border-radius:calc(var(--uui-border-radius,3px) - 1px);border:2px solid var(--uui-color-focus,#3879ff)}slot:not([name]){position:relative;display:block;width:100%}slot:not([name]){--uui-menu-item-indent:var(--uui-menu-item-child-indent)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-base-unit) * 4);margin-right:var(--uui-size-base-unit)}`],ne([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),ne([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),ne([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),ne([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),ne([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),ne([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),ne([l({type:String})],n.UUIMenuItemElement.prototype,"rel",2),ne([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),ne([l({type:String,attribute:"caret-label"})],n.UUIMenuItemElement.prototype,"caretLabel",2),ne([l({attribute:!1})],n.UUIMenuItemElement.prototype,"renderExpandSymbol",2),ne([y()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=ne([p("uui-menu-item")],n.UUIMenuItemElement);var Op=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,Bt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Op(e,t,o),o};const Va="uui:modal-open",Dt="uui:modal-close",ja="uui:modal-close-end";let se=class extends m{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(Va,{cancelable:!0}),r=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(t),this.dispatchEvent(r),!(t.defaultPrevented||r.defaultPrevented)&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(Dt,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this.forceClose()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=e,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(e){super.firstUpdated(e),this.isClosing||this.open()}_openModal(){this.isOpen=!0,this._dialogElement?.showModal(),this._dialogElement?.addEventListener("cancel",this.close)}forceClose(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.dispatchEvent(new CustomEvent(ja)),this.remove()}static{this.styles=[b`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none;background:0 0;color:var(--uui-color-text,#060606)}dialog::backdrop{background:0 0;opacity:0}dialog::after{content:'';position:absolute;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));pointer-events:none;opacity:1;transition:opacity var(--uui-modal-transition-duration,250ms);z-index:1}:host([index='0']) dialog::after{opacity:0}`]}};Bt([S("dialog")],se.prototype,"_dialogElement",2),Bt([l({type:Boolean,reflect:!0,attribute:"is-open"})],se.prototype,"isOpen",2),Bt([l({type:Boolean,reflect:!0,attribute:"is-closing"})],se.prototype,"isClosing",2),Bt([l({type:Number,reflect:!0})],se.prototype,"index",2),Bt([l({type:Number,reflect:!0,attribute:"unique-index"})],se.prototype,"uniqueIndex",2),Bt([l({type:Number,attribute:"transition-duration"})],se.prototype,"transitionDuration",1);var Tp=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Ha=i=>{throw TypeError(i)},Ra=(i,e,t,r)=>{for(var o=r>1?void 0:r?Np(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Tp(e,t,o),o},Bp=(i,e,t)=>e.has(i)||Ha("Cannot "+t),Fa=(i,e,t)=>(Bp(i,e,"read from private field"),t?t.call(i):e.get(i)),Dp=(i,e,t)=>e.has(i)?Ha("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),xo,Qr;n.UUIModalSidebarElement=class extends se{constructor(){super(...arguments),Dp(this,xo),this.size="full"}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Fa(this,xo,Qr)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}forceClose(){this.isClosing||(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Fa(this,xo,Qr)+"px"),setTimeout(()=>{super.forceClose()},this.transitionDuration))}render(){return u`<dialog><slot></slot></dialog>`}},xo=new WeakSet,Qr=function(){return this._dialogElement?.getBoundingClientRect().width??0},n.UUIModalSidebarElement.styles=[...se.styles,b`:host{outline:0;--uui-modal-sidebar-left-gap:24px;--uui-modal-sidebar-background:var(--uui-color-surface,#fff)}@media (min-width:600px){:host{--uui-modal-sidebar-left-gap:64px}}dialog{height:100%;width:100%;box-sizing:border-box;max-width:calc(100% - var(--uui-modal-sidebar-left-gap));margin-left:auto;right:var(--uui-modal-offset);transition:right var(--uui-modal-transition-duration,250ms);background:var(--uui-modal-sidebar-background,var(--uui-color-surface,#fff))}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}:host([hide]) dialog{display:none}:host([size=large]) dialog{max-width:min(1200px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=medium]) dialog{max-width:min(800px,calc(100% - var(--uui-modal-sidebar-left-gap)))}:host([size=small]) dialog{max-width:min(500px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],Ra([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Ra([p("uui-modal-sidebar")],n.UUIModalSidebarElement);var Vp=Object.defineProperty,jp=Object.getOwnPropertyDescriptor,Ga=i=>{throw TypeError(i)},Vt=(i,e,t,r)=>{for(var o=r>1?void 0:r?jp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vp(e,t,o),o},Wa=(i,e,t)=>e.has(i)||Ga("Cannot "+t),$i=(i,e,t)=>(Wa(i,e,"read from private field"),t?t.call(i):e.get(i)),Jr=(i,e,t)=>e.has(i)?Ga("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Io=(i,e,t)=>(Wa(i,e,"access private method"),t),en,jt,Ht,tn,on;n.UUIModalContainerElement=class extends m{constructor(){super(),Jr(this,Ht),this.sidebarGap=64,this.transitionDurationMS=250,Jr(this,en,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof se)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(Dt,$i(this,jt))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(Dt,$i(this,jt))),this._sidebars=this._modals.filter(t=>t instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}Io(this,Ht,tn).call(this),Io(this,Ht,on).call(this)}),Jr(this,jt,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(Dt,$i(this,jt)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}Io(this,Ht,tn).call(this),Io(this,Ht,on).call(this)}),this.addEventListener(Dt,$i(this,jt))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return u`<slot @slotchange="${$i(this,en)}"></slot>`}},en=new WeakMap,jt=new WeakMap,Ht=new WeakSet,tn=function(){this.setAttribute("backdrop","");const i=this._modals?.filter(e=>!e.isClosing).reverse()??[];i?.forEach((e,t)=>{e.index=t,e.transitionDuration=this.transitionDurationMS}),i?.forEach(e=>{const t=i?.filter(r=>r.constructor.name===e.constructor.name);e.uniqueIndex=t?.indexOf(e)??0})},on=function(){requestAnimationFrame(()=>{let i=0;const e=this._sidebars?.filter(t=>!t.isClosing).reverse()??[];for(let t=0;t<e.length;t++){const r=e[t],o=e[t+1],s=i;if(r.updateComplete.then(()=>{r.style.setProperty("--uui-modal-offset",s+"px")}),o?.hasAttribute("hide"))break;const a=r.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=o?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,h=a+i+this.sidebarGap-c;i=h>0?h:0}})},n.UUIModalContainerElement.styles=b`:host{position:fixed;--uui-modal-color-backdrop:rgba(0, 0, 0, 0.5)}:host::after{content:'';position:fixed;inset:0;background-color:var(--uui-modal-color-backdrop,rgba(0,0,0,.5));opacity:0;pointer-events:none;transition:opacity var(--uui-modal-transition-duration,250ms)}:host([backdrop])::after{opacity:1}`,Vt([S("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),Vt([y()],n.UUIModalContainerElement.prototype,"_modals",2),Vt([y()],n.UUIModalContainerElement.prototype,"_sidebars",2),Vt([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),Vt([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=Vt([p("uui-modal-container")],n.UUIModalContainerElement);var Hp=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIModalDialogElement=class extends se{render(){return u`<dialog><slot></slot></dialog>`}},n.UUIModalDialogElement.styles=[...se.styles,b`:host{outline:0;--uui-modal-dialog-background:var(--uui-color-surface,#fff)}dialog{margin:auto;max-width:100%;max-height:100%;border-radius:var(--uui-modal-dialog-border-radius,calc(var(--uui-border-radius,3px) * 4));background:var(--uui-modal-dialog-background,var(--uui-color-surface,#fff))}:host([index='0']) dialog{box-shadow:var(--uui-shadow-depth-5,0 19px 38px rgba(0,0,0,.3) ,0 15px 12px rgba(0,0,0,.22))}:host(:not([index='0'])) dialog{outline:1px solid rgba(0,0,0,.1)}`],n.UUIModalDialogElement=Hp([p("uui-modal-dialog")],n.UUIModalDialogElement);let nt=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Rp=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,Q=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Rp(e,t,o),o};const Gp=45,rn=(i,e,t)=>Math.min(Math.max(i,e),t),Wp=(i,e)=>Array.from({length:e-i+1},(t,r)=>i+r);n.UUIPaginationElement=class extends m{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",this.firstLabel="First",this.previousLabel="Previous",this.nextLabel="Next",this.lastLabel="Last",this._total=100,this._range=0,this._visiblePages=[],this._current=1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","navigation"),this._visiblePages=this._generateVisiblePages(this.current),_(this,"uui-button"),_(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(e){(e.has("current")||e.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const e=this.offsetWidth,t=Array.from(this._navButtons).reduce((o,s)=>o+s.getBoundingClientRect().width,0),r=(e-t)/Gp/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(e){const t=e<this._range?1:e<this.total-this._range?e-this._range:this.total-this._range*2,r=e<=this._range?this._range*2+1:e<this.total-this._range?e+this._range:this.total;return Wp(rn(t,1,this.total),rn(r,1,this.total))}get total(){return this._total}set total(e){this._total=e,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",e)}get current(){return this._current}set current(e){const t=this._current;this._current=rn(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new nt(nt.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new nt(nt.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new nt(nt.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".active");e&&e.focus()})}renderFirst(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="${this.firstLabel}" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}"></uui-button>`}renderPrevious(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="${this.previousLabel}" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}"></uui-button>`}renderNext(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="${this.nextLabel}" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}"></uui-button>`}renderLast(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="${this.lastLabel}" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}"></uui-button>`}renderDots(){return u`<uui-button compact="compact" look="outline" role="listitem" tabindex="-1" class="dots" label="More pages">...</uui-button>`}renderPage(e){return u`<uui-button compact="compact" look="outline" role="listitem" label="Go to page ${e}" class="${"page"+(e===this._current?" active":"")}" tabindex="${e===this._current?"-1":""}" @click="${()=>{e!==this._current&&(this.goToPage(e),this.focusActivePage())}}">${e}</uui-button>`}renderNavigationLeft(){return u`${this.renderFirst()} ${this.renderPrevious()} ${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return u`${this._visiblePages.includes(this.total)?"":this.renderDots()} ${this.renderNext()} ${this.renderLast()}`}render(){return u`<uui-button-group role="list" id="pages">${this.renderNavigationLeft()} ${this._visiblePages.map(e=>this.renderPage(e))} ${this.renderNavigationRight()}</uui-button-group>`}},n.UUIPaginationElement.styles=[b`uui-button-group{width:100%}uui-button{--uui-button-border-color:var(--uui-color-border-standalone,#c2c2c2);--uui-button-border-color-hover:var(--uui-color-interactive-emphasis,#3544b1);--uui-button-border-color-disabled:var(--uui-color-border-standalone,#c2c2c2)}.page{min-width:36px;max-width:72px}.page.active{--uui-button-background-color:var(--uui-color-current,#f5c1bc)}.nav{min-width:72px}.dots{pointer-events:none}.active{pointer-events:none}`],Q([Ql("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),Q([S("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),Q([l()],n.UUIPaginationElement.prototype,"label",2),Q([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),Q([l()],n.UUIPaginationElement.prototype,"firstLabel",2),Q([l()],n.UUIPaginationElement.prototype,"previousLabel",2),Q([l()],n.UUIPaginationElement.prototype,"nextLabel",2),Q([l()],n.UUIPaginationElement.prototype,"lastLabel",2),Q([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),Q([y()],n.UUIPaginationElement.prototype,"_range",2),Q([y()],n.UUIPaginationElement.prototype,"_visiblePages",2),Q([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=Q([p("uui-pagination")],n.UUIPaginationElement);let qa=class extends P{static{this.CLOSE="close"}};var qp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,ki=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&qp(e,t,o),o};function Co(i,e,t){return i<e?e:i>t?t:i}n.UUIPopoverElement=class extends m{constructor(){super(...arguments),this.scrollEventHandler=this._updatePlacement.bind(this),this._open=!1,this._placement="bottom-start",this._currentPlacement=null,this._scrollParents=[],this.margin=0,this._onTriggerSlotChanged=e=>{this._trigger=e.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=e=>{e.forEach(t=>{t.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=e=>{if(e.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=e=>{e.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(e){const t=this._placement;this._placement=e||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",t)}get open(){return this._open}set open(e){const t=this._open;this._open=e,e?this._openPopover():this._closePopover(),this.requestUpdate("open",t)}connectedCallback(){super.connectedCallback(),this._getScrollParents()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("scroll",this.scrollEventHandler),this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),this._scrollParents=[]}_openPopover(){this.containerElement&&(this.containerElement.style.opacity="0",document.addEventListener("mousedown",this._onDocumentClick),document.addEventListener("keyup",this._onKeyUp),this._currentPlacement=null,requestAnimationFrame(()=>{this._updatePlacement(),this._createIntersectionObserver(),this.containerElement.style.opacity="1"}))}_closePopover(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),delete this.intersectionObserver),document.removeEventListener("mousedown",this._onDocumentClick),document.removeEventListener("keyup",this._onKeyUp),this._currentPlacement=null}_triggerPopoverClose(){const e=new qa(qa.CLOSE,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&(this.open=!1)}_getScrollParents(){this._scrollParents=[];const e=this.shadowRoot.host;let t=getComputedStyle(e);if(t.position==="fixed")return;const r=t.position==="absolute",o=/(auto|scroll)/;let s=e;for(;s;){if(t=getComputedStyle(s),r&&t.position==="static"){s=this._getAncestorElement(s);continue}if(o.test(t.overflow+t.overflowY+t.overflowX)&&this._scrollParents.push(s),t.position==="fixed")return;s=this._getAncestorElement(s)}this._scrollParents.push(document.body)}_getAncestorElement(e){return e?.parentElement?e.parentElement:e?.getRootNode()?.host}_createIntersectionObserver(){if(this.intersectionObserver)return;const e={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,e),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(e=>{e.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){if(!this.shadowRoot)return;const e=this.containerElement;if(!e)return;const t=this.containerElement?.getBoundingClientRect(),r=this._trigger?.getBoundingClientRect();if(r!=null&&t!=null){const o=this._scrollParents.map($e=>$e.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,t,o));let s=this._currentPlacement.indexOf("top")!==-1,a=this._currentPlacement.indexOf("bottom")!==-1,c=this._currentPlacement.indexOf("left")!==-1,h=this._currentPlacement.indexOf("right")!==-1;const d=this._currentPlacement.indexOf("-start")!==-1,g=this._currentPlacement.indexOf("-end")!==-1;let f=.5,U=.5,x=.5,I=.5,L=0,X=0;if(this.placement==="auto"){const $e=this._scrollParents[0],Ni=$e.clientWidth,pt=$e.clientHeight,Zt=r.x-t.width,Qt=Ni-(r.x+r.width)-t.width,Bn=r.y-t.height,Vo=pt-(r.y+r.height)-t.height;let jo=.5,Ho=.5;const Sm=Math.max(Zt,Qt);let Ol=Math.max(Bn,Vo);Vo>Bn&&Vo>this.margin&&(Ol+=9999),Sm>Ol?(Zt>Qt?(jo=0,c=!0):(jo=1,h=!0),L=this.margin):(Bn>Vo?(Ho=0,s=!0):(Ho=1,a=!0),X=this.margin),f=jo,U=Ho,x=1-jo,I=1-Ho}else s&&(I=1,U=0),a&&(I=0,U=1),(s||a)&&(X=this.margin,d&&(x=0,f=0),g&&(x=1,f=1)),c&&(x=1,f=0),h&&(x=0,f=1),(c||h)&&(L=this.margin,d&&(I=0,U=0),g&&(I=1,U=1));const Oe=-t.width*x+r.width*f-L*(x*2-1),Me=-t.height*I+r.height*U-X*(I*2-1);let ht=Oe,dt=Me;s||a?(this._scrollParents.forEach(($e,Ni)=>{const pt=$e===document.body?0:o[Ni].x,Zt=-r.x+pt,Qt=$e.clientWidth-r.x-r.width+Oe+pt-(t.width-r.width)*(1-f);ht=Co(ht,Zt,Qt)}),ht=Co(ht,-t.width,r.width)):(c||h)&&(this._scrollParents.forEach(($e,Ni)=>{const pt=$e===document.body?0:o[Ni].y,Zt=-r.y+pt,Qt=$e.clientHeight-r.y-r.height+Me+pt-(t.height-r.height)*(1-U);dt=Co(dt,Zt,Qt)}),dt=Co(dt,-t.height,r.height)),(this._positionX!==ht||this._positionY!==dt)&&(this._positionX=ht,this._positionY=dt,Oe===ht&&Me===dt&&this._stopScrollListener(),e.style.left=`${this._positionX}px`,e.style.top=`${this._positionY}px`)}}_managePlacementFlip(e,t,r){const o=e.split("-"),s=o[0],a=o[1]||null;let c;return this._scrollParents.some((h,d)=>{const g=h===document.body?0:r[d].x,f=h===document.body?0:r[d].y;return s==="top"&&t.y-2<=f?(c="bottom",!0):s==="bottom"&&t.y+t.height+2>=h.clientHeight+f?(c="top",!0):s==="left"&&t.x-2<=g?(c="right",!0):s==="right"&&t.x+t.width+2>=h.clientWidth+g?(c="left",!0):!1}),c?(this._startScrollListener(),c+(a?`-${a}`:"")):e}render(){return u`<slot id="trigger" name="trigger" @slotchange="${this._onTriggerSlotChanged}"></slot><div id="container">${this._open?u`<slot name="popover"></slot>`:""}</div>`}},n.UUIPopoverElement.styles=[b`:host{position:relative;display:inline-block;width:100%}#container{position:absolute;width:100%;z-index:var(--uui-popover-z-index,1)}slot[name=popover]{display:block}#trigger{position:relative;width:100%}slot[name=trigger]::slotted(uui-button){--uui-button-border-radius:var(
|
|
412
408
|
--uui-popover-toggle-slot-button-border-radius
|
|
413
409
|
);--uui-button-merge-border-left:var(
|
|
414
410
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
415
|
-
)}`],_i([S("#container")],n.UUIPopoverElement.prototype,"containerElement",2),_i([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),_i([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),_i([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=_i([p("uui-popover")],n.UUIPopoverElement);var Kp=Object.defineProperty,Xp=Object.getOwnPropertyDescriptor,qa=i=>{throw TypeError(i)},nt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Kp(e,t,o),o},nn=(i,e,t)=>e.has(i)||qa("Cannot "+t),z=(i,e,t)=>(nn(i,e,"read from private field"),t?t.call(i):e.get(i)),Se=(i,e,t)=>e.has(i)?qa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Co=(i,e,t,r)=>(nn(i,e,"write to private field"),e.set(i,t),t),je=(i,e,t)=>(nn(i,e,"access private method"),t),Pe,Ht,st,$i,So,Ae,ki,sn,ye,an,Ka,ln,Xa,un;n.UUIPopoverContainerElement=class extends m{constructor(){super(...arguments),Se(this,ye),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Se(this,Pe,null),Se(this,Ht,[]),Se(this,st,null),Se(this,$i,{width:0,height:0}),Se(this,So,e=>{if(this._open=e.newState==="open",Co(this,Pe,Ec(this,"popovertarget",this.id)),je(this,ye,Xa).call(this),z(this,Pe)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),!this._open){je(this,ye,ln).call(this);return}je(this,ye,Ka).call(this),requestAnimationFrame(()=>{z(this,Ae).call(this)})}),Se(this,Ae,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",z(this,ki).call(this,3))}),Se(this,ki,e=>{if(z(this,sn).call(this),e--,z(this,Pe)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,s=this._actualPlacement.indexOf("right")!==-1,a=this._actualPlacement.indexOf("-start")!==-1,c=this._actualPlacement.indexOf("-end")!==-1,h=z(this,Pe).getBoundingClientRect(),d=this.getBoundingClientRect();let g=0,f=0;r&&(g=h.top+h.height,a&&(f=h.left),c&&(f=h.left+h.width-d.width),!a&&!c&&(f=h.left+h.width/2-d.width/2)),t&&(g=h.top-d.height,a&&(f=h.left),c&&(f=h.left+h.width-d.width),!a&&!c&&(f=h.left+h.width/2-d.width/2)),o&&(f=h.left-d.width,a&&(g=h.top),c&&(g=h.top+h.height-d.height),!a&&!c&&(g=h.top+h.height/2-d.height/2)),s&&(f=h.left+h.width,a&&(g=h.top),c&&(g=h.top+h.height-d.height),!a&&!c&&(g=h.top+h.height/2-d.height/2));const U=window.innerWidth,x=window.innerHeight,I=Math.min(0,h.top+h.height),L=Math.max(Math.min(g,x-d.height),h.top-d.height);if(Math.max(I,L)!==g&&(t||r)&&e>0){je(this,ye,an).call(this),z(this,ki).call(this,e);return}g=Math.max(I,L);const X=Math.min(0,h.left+h.width),Oe=Math.max(Math.min(f,U-d.width),h.left-d.width),Me=Math.max(X,Oe);if(Me!==f&&(o||s)&&e>0){je(this,ye,an).call(this),z(this,ki).call(this,e);return}f=Me,(g+d.height<0||g>x||f+d.width<0||f>U)&&this.hidePopover(),this.style.transform=`translate(${f}px, ${g}px)`,this.style.opacity="1"}),Se(this,sn,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,z(this,Ae).call(this)}connectedCallback(){this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",z(this,So)),z(this,st)||(Co(this,st,new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,o=t.contentRect.height;r===z(this,$i).width&&o===z(this,$i).height||(Co(this,$i,{width:r,height:o}),z(this,Ae).call(this))})),z(this,st).observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",z(this,So)),je(this,ye,ln).call(this),z(this,st)?.disconnect(),Co(this,st,null)}render(){return u`<slot></slot>`}},Pe=new WeakMap,Ht=new WeakMap,st=new WeakMap,$i=new WeakMap,So=new WeakMap,Ae=new WeakMap,ki=new WeakMap,sn=new WeakMap,ye=new WeakSet,an=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},Ka=function(){z(this,Ht).forEach(i=>{i.addEventListener("scroll",z(this,Ae),{passive:!0})}),document.addEventListener("scroll",z(this,Ae),{passive:!0})},ln=function(){z(this,Ht).forEach(i=>{i.removeEventListener("scroll",z(this,Ae))}),document.removeEventListener("scroll",z(this,Ae))},Xa=function(){if(!z(this,Pe))return;let i=getComputedStyle(z(this,Pe));if(i.position==="fixed")return;const e=i.position==="absolute",t=/(auto|scroll)/;let r=z(this,Pe);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=je(this,ye,un).call(this,r);continue}if(t.test(i.overflow+i.overflowY+i.overflowX)&&z(this,Ht).push(r),i.position==="fixed")return;r=je(this,ye,un).call(this,r)}z(this,Ht).push(document.body)},un=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},n.UUIPopoverContainerElement.styles=[b`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible;color:var(--uui-color-text,#060606)}`],nt([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),nt([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),nt([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),nt([y()],n.UUIPopoverContainerElement.prototype,"_placement",2),nt([y()],n.UUIPopoverContainerElement.prototype,"_open",2),nt([y()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=nt([p("uui-popover-container")],n.UUIPopoverContainerElement);var Yp=Object.defineProperty,Zp=Object.getOwnPropertyDescriptor,Ya=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Yp(e,t,o),o};const Qp=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUIProgressBarElement=class extends m{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=Qp(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return u`<div id="bar" style="${ke(this._getProgressStyle())}"></div>`}},n.UUIProgressBarElement.styles=[b`:host{width:100%;height:4px;position:relative;overflow:hidden;background:var(--uui-color-surface-alt,#f3f3f5);border-radius:100px;display:inline-block}#bar{transition:width 250ms ease;background:var(--uui-color-positive,#0b8152);height:100%;width:0%}`],Ya([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=Ya([p("uui-progress-bar")],n.UUIProgressBarElement);let Ei=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Jp=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,Za=i=>{throw TypeError(i)},He=(i,e,t,r)=>{for(var o=r>1?void 0:r?eb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Jp(e,t,o),o},tb=(i,e,t)=>e.has(i)||Za("Cannot "+t),ib=(i,e,t)=>e.has(i)?Za("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ob=(i,e,t)=>(tb(i,e,"access private method"),t),cn,Qa;n.UUIRadioElement=class extends m{constructor(){super(...arguments),ib(this,cn),this.name="",this.value="",this.label="",this.checked=!1,this.disabled=!1,this.readonly=!1}focus(){this._inputElement.focus()}click(){this._inputElement.click()}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.removeAttribute("tabindex")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}render(){return u`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled||this.readonly}" @change="${ob(this,cn,Qa)}"><div id="button"></div><div id="label">${this.label?u`<span>${this.label}</span>`:u`<slot></slot>`}</div></label>`}},cn=new WeakSet,Qa=function(i){i.stopPropagation();const e=this._inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new Ei(Ei.CHANGE))},n.UUIRadioElement.styles=[Fi,b`:host{display:block;box-sizing:border-box;font-family:inherit;color:currentColor;--uui-radio-button-size:var(--uui-size-6,18px);margin:var(--uui-size-2,6px) 0}label{position:relative;box-sizing:border-box;user-select:none;display:flex;align-items:center;cursor:pointer;line-height:18px}:host([readonly]) label{cursor:default}#input{width:0;height:0;opacity:0;margin:0}.label{margin-top:2px}#button{box-sizing:border-box;display:inline-block;width:var(--uui-radio-button-size,18px);height:var(--uui-radio-button-size,18px);background-color:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border-standalone,#c2c2c2);border-radius:100%;margin-right:calc(var(--uui-size-2,6px) * 2);position:relative;flex:0 0 var(--uui-radio-button-size)}#button::after{content:'';width:calc(var(--uui-radio-button-size)/ 2);height:calc(var(--uui-radio-button-size)/ 2);background-color:var(--uui-color-selected,#3544b1);border-radius:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:all .15s ease-in-out}:host(:hover) #button{border:1px solid var(--uui-color-border-emphasis,#a1a1a1)}:host(:focus){outline:0}:host(:focus-within) input:focus-visible+#button{outline:2px solid var(--uui-color-focus,#3879ff)}input:checked~#button::after{transform:translate(-50%,-50%) scale(1)}input:checked~#button{border:1px solid var(--uui-color-selected,#3544b1)}input:checked:hover~#button{border:1px solid var(--uui-color-selected-emphasis,#4656c8)}input:checked:hover~#button::after{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([disabled]) label{cursor:not-allowed;opacity:.5}:host([disabled]) .label{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button::after{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]:active) #button{animation:${Gi}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],He([S("#input")],n.UUIRadioElement.prototype,"_inputElement",2),He([l({type:String})],n.UUIRadioElement.prototype,"name",2),He([l({type:String})],n.UUIRadioElement.prototype,"value",2),He([l({type:String})],n.UUIRadioElement.prototype,"label",2),He([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",2),He([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",2),He([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"readonly",2),n.UUIRadioElement=He([p("uui-radio")],n.UUIRadioElement);let hn=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,Ja=i=>{throw TypeError(i)},dn=(i,e,t,r)=>{for(var o=r>1?void 0:r?nb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&rb(e,t,o),o},pn=(i,e,t)=>e.has(i)||Ja("Cannot "+t),$=(i,e,t)=>(pn(i,e,"read from private field"),t?t.call(i):e.get(i)),Re=(i,e,t)=>e.has(i)?Ja("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Po=(i,e,t,r)=>(pn(i,e,"write to private field"),e.set(i,t),t),B=(i,e,t)=>(pn(i,e,"access private method"),t),D,O,bn,mn,Ao,zo,vn,M,el,gn,fn,yn,wn,at,tl,il,xi;const sb="ArrowLeft",ab="ArrowUp",lb="ArrowRight",ub="ArrowDown",cb=" ",hb="Enter";n.UUIRadioGroupElement=class extends ve(m,""){constructor(){super(),Re(this,M),this.disabled=!1,this.readonly=!1,Re(this,D,null),Re(this,O,[]),Re(this,bn,e=>{$(this,O)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),Re(this,mn,e=>{this.contains(e.relatedTarget)||$(this,D)===null&&$(this,O)?.forEach(t=>{t.makeFocusable()})}),Re(this,Ao,()=>{this.pristine=!1}),Re(this,zo,e=>{e.target.checked===!0&&(this.value=e.target.value,B(this,M,xi).call(this))}),Re(this,vn,e=>{switch(e.key){case sb:case ab:{e.preventDefault(),B(this,M,tl).call(this);break}case lb:case ub:{e.preventDefault(),B(this,M,il).call(this);break}case cb:{$(this,D)===null&&(this.value=B(this,M,at).call(this,1,!1)?.value,B(this,M,xi).call(this));break}case hb:this.submit()}}),this.addEventListener("keydown",$(this,vn)),this.addEventListener("focusin",$(this,bn)),this.addEventListener("focusout",$(this,mn)),this.updateComplete.then(()=>{B(this,M,fn).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,B(this,M,fn).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&B(this,M,yn).call(this,this.disabled),e.has("readonly")&&B(this,M,wn).call(this,this.readonly),e.has("name")&&B(this,M,gn).call(this,e.get("name"))}async focus(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.focus():B(this,M,at).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.blur():B(this,M,at).call(this,1,!1)?.blur()}async click(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.click():B(this,M,at).call(this,1,!1)?.click()}getFormElement(){if($(this,O)&&$(this,D))return $(this,O)[$(this,D)]}render(){return u`<slot @slotchange="${B(this,M,el)}"></slot>`}},D=new WeakMap,O=new WeakMap,bn=new WeakMap,mn=new WeakMap,Ao=new WeakMap,zo=new WeakMap,vn=new WeakMap,M=new WeakSet,el=function(i){if(i.stopPropagation(),$(this,O)?.forEach(t=>{t.removeEventListener(Ei.CHANGE,$(this,zo)),t.removeEventListener("blur",$(this,Ao))}),Po(this,D,null),Po(this,O,i.target.assignedElements({flatten:!0}).filter(t=>t instanceof n.UUIRadioElement)),$(this,O).length===0)return;$(this,O).forEach(t=>{t.addEventListener(Ei.CHANGE,$(this,zo)),t.addEventListener("blur",$(this,Ao))}),B(this,M,gn).call(this,this.name),this.disabled&&B(this,M,yn).call(this,!0),this.readonly&&B(this,M,wn).call(this,!0);const e=$(this,O).filter(t=>t.checked===!0);if(e.length>1&&($(this,O).forEach(t=>{t.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),e.length===1){const t=e[0];this.value=t.value,Po(this,D,$(this,O).indexOf(t))}},gn=function(i){$(this,O)?.forEach(e=>e.name=i)},fn=function(i){const e=[];$(this,O).forEach((t,r)=>{t.value===i?(t.checked=!0,t.makeFocusable(),Po(this,D,r)):(t.checked=!1,e.push(t))}),$(this,D)!==null&&e.forEach(t=>t.makeUnfocusable())},yn=function(i){$(this,O)?.forEach(e=>e.disabled=i)},wn=function(i){$(this,O)?.forEach(e=>e.readonly=i)},at=function(i=1,e=!0){if(!$(this,O)||$(this,O).length===0)return null;const t=$(this,O).length;let r=$(this,D)??0;for(let o=0;o<t+1;o++){if(!e||o>0){const s=$(this,O)[r];if(!s.disabled&&!s.readonly)return s}r=(r+i+t)%t}return null},tl=function(){this.value=B(this,M,at).call(this,-1)?.value??"",$(this,O)[$(this,D)??0]?.focus(),B(this,M,xi).call(this)},il=function(){this.value=B(this,M,at).call(this)?.value??"",$(this,O)[$(this,D)??0]?.focus(),B(this,M,xi).call(this)},xi=function(){this.pristine=!1,this.dispatchEvent(new hn(hn.CHANGE))},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[b`:host{display:inline-block;padding-right:3px;border:1px solid transparent;border-radius:var(--uui-border-radius,3px)}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],dn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),dn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"readonly",2),n.UUIRadioGroupElement=dn([p("uui-radio-group")],n.UUIRadioGroupElement);let Fe=class extends P{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var db=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,ol=i=>{throw TypeError(i)},T=(i,e,t,r)=>{for(var o=r>1?void 0:r?pb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&db(e,t,o),o},rl=(i,e,t)=>e.has(i)||ol("Cannot "+t),bb=(i,e,t)=>(rl(i,e,"read from private field"),t?t.call(i):e.get(i)),nl=(i,e,t)=>e.has(i)?ol("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Rt=(i,e,t)=>(rl(i,e,"access private method"),t),Ge,lt,Un;const _n={TOP:3,CENTER:2},Ii=18,Ft=3,ze=12,mb=24,$n=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};n.UUIRangeSliderElement=class extends ve(m,""){constructor(){super(),nl(this,Ge),this.disabled=!1,this.readonly=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,nl(this,Un,e=>{e.key=="Enter"&&this.submit()}),this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const r=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled||this.readonly)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const r=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keydown",bb(this,Un)),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{this._trackWidth=this._outerTrack?.offsetWidth})}get min(){return this._min}set min(e){this._min=e,Rt(this,Ge,lt).call(this)}get max(){return this._max}set max(e){this._max=e,Rt(this,Ge,lt).call(this)}get step(){return this._step}set step(e){this._step=e,Rt(this,Ge,lt).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,Rt(this,Ge,lt).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,Rt(this,Ge,lt).call(this)}get value(){return super.value}set value(e){super.value=e,Rt(this,Ge,lt).call(this)}setValueLow(e){e=A(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=A(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,r){if(r){const o=this.startPoint.high-this.startPoint.low;e=A(e,this.min,this.max-o),t=A(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}async focus(){await this.updateComplete,this.getFormElement().focus()}async blur(){await this.updateComplete,this.getFormElement().blur()}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const e=this._minGap;this._highInputValue-e<this._min?(this.setValueHigh(this._lowInputValue+e),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-e),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=t/e*100,s=100-r/e*100;this._lowValuePercentStart=A(o,0,100),this._highValuePercentEnd=A(s,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-ze)/(this._trackWidth-ze*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,r=e-this.startPoint.mouse,o=this._max-this._min,s=r/(t+ze*2),a=Math.round(s*o/this._step)*this._step,c=this.startPoint.low+a,h=this.startPoint.high+a;this.setValue(c,h,!0),this.dispatchEvent(new Fe(Fe.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new Fe(Fe.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new Fe(Fe.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new Fe(Fe.CHANGE))}render(){return u`
|
|
411
|
+
)}`],ki([S("#container")],n.UUIPopoverElement.prototype,"containerElement",2),ki([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),ki([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),ki([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=ki([p("uui-popover")],n.UUIPopoverElement);var Xp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Ka=i=>{throw TypeError(i)},st=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xp(e,t,o),o},nn=(i,e,t)=>e.has(i)||Ka("Cannot "+t),z=(i,e,t)=>(nn(i,e,"read from private field"),t?t.call(i):e.get(i)),Se=(i,e,t)=>e.has(i)?Ka("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ei=(i,e,t,r)=>(nn(i,e,"write to private field"),e.set(i,t),t),je=(i,e,t)=>(nn(i,e,"access private method"),t),Pe,He,at,xi,sn,Ae,Ii,an,ye,ln,Xa,un,Ya,cn;n.UUIPopoverContainerElement=class extends m{constructor(){super(),Se(this,ye),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,Se(this,Pe,null),Se(this,He,[]),Se(this,at,null),Se(this,xi,{width:0,height:0}),Se(this,sn,e=>{this._open=e.newState==="open",Ei(this,Pe,xc(this,"popovertarget",this.id)),z(this,Pe)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),this._open?(je(this,ye,Ya).call(this),je(this,ye,Xa).call(this),requestAnimationFrame(()=>{z(this,Ae).call(this)})):je(this,ye,un).call(this)}),Se(this,Ae,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",z(this,Ii).call(this,3))}),Se(this,Ii,e=>{if(z(this,an).call(this),e--,z(this,Pe)===null)return;const t=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,s=this._actualPlacement.indexOf("right")!==-1,a=this._actualPlacement.indexOf("-start")!==-1,c=this._actualPlacement.indexOf("-end")!==-1,h=z(this,Pe).getBoundingClientRect(),d=this.getBoundingClientRect();let g=0,f=0;r&&(g=h.top+h.height,a&&(f=h.left),c&&(f=h.left+h.width-d.width),!a&&!c&&(f=h.left+h.width/2-d.width/2)),t&&(g=h.top-d.height,a&&(f=h.left),c&&(f=h.left+h.width-d.width),!a&&!c&&(f=h.left+h.width/2-d.width/2)),o&&(f=h.left-d.width,a&&(g=h.top),c&&(g=h.top+h.height-d.height),!a&&!c&&(g=h.top+h.height/2-d.height/2)),s&&(f=h.left+h.width,a&&(g=h.top),c&&(g=h.top+h.height-d.height),!a&&!c&&(g=h.top+h.height/2-d.height/2));const U=window.innerWidth,x=window.innerHeight,I=Math.min(0,h.top+h.height),L=Math.max(Math.min(g,x-d.height),h.top-d.height);if(Math.max(I,L)!==g&&(t||r)&&e>0){je(this,ye,ln).call(this),z(this,Ii).call(this,e);return}g=Math.max(I,L);const X=Math.min(0,h.left+h.width),Oe=Math.max(Math.min(f,U-d.width),h.left-d.width),Me=Math.max(X,Oe);if(Me!==f&&(o||s)&&e>0){je(this,ye,ln).call(this),z(this,Ii).call(this,e);return}f=Me,(g+d.height<0||g>x||f+d.width<0||f>U)&&this.hidePopover(),this.style.transform=`translate(${f}px, ${g}px)`,this.style.opacity="1"}),Se(this,an,()=>{const e={top:"bottom",bottom:"top",left:"right",right:"left"};let t=this._actualPlacement.split("-")[0];t=e[t]||t,t=t.charAt(0).toUpperCase()+t.slice(1);const r=`padding${t}`;this.style.padding="0",this.style[r]=`${this.margin}px`}),this.addEventListener("beforetoggle",z(this,sn),{passive:!0})}get open(){return this._open}get placement(){return this._placement}set placement(e){this._placement=e,this._actualPlacement=e,z(this,Ae).call(this)}connectedCallback(){super.connectedCallback(),this.hasAttribute("popover")||this.setAttribute("popover",""),z(this,at)||(Ei(this,at,new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,o=t.contentRect.height;r===z(this,xi).width&&o===z(this,xi).height||(Ei(this,xi,{width:r,height:o}),z(this,Ae).call(this))})),z(this,at).observe(this))}disconnectedCallback(){super.disconnectedCallback(),je(this,ye,un).call(this),z(this,at)?.disconnect(),Ei(this,at,null)}_getScrollParents(){return z(this,He)}render(){return u`<slot></slot>`}},Pe=new WeakMap,He=new WeakMap,at=new WeakMap,xi=new WeakMap,sn=new WeakMap,Ae=new WeakMap,Ii=new WeakMap,an=new WeakMap,ye=new WeakSet,ln=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},Xa=function(){z(this,He).forEach(i=>{i.addEventListener("scroll",z(this,Ae),{passive:!0})}),document.addEventListener("scroll",z(this,Ae),{passive:!0})},un=function(){z(this,He).forEach(i=>{i.removeEventListener("scroll",z(this,Ae))}),document.removeEventListener("scroll",z(this,Ae))},Ya=function(){if(Ei(this,He,[]),!z(this,Pe))return;let i=getComputedStyle(z(this,Pe));if(i.position==="fixed")return;let e=i.position==="absolute";const t=/(auto|scroll)/;let r=z(this,Pe);for(;r;){if(i=getComputedStyle(r),e&&i.position==="static"){r=je(this,ye,cn).call(this,r);continue}if(i.position!=="static"&&(e=i.position==="absolute"),t.test(i.overflow+i.overflowY+i.overflowX)&&z(this,He).push(r),i.position==="fixed")return;r=je(this,ye,cn).call(this,r)}z(this,He).push(document.body)},cn=function(i){return i?.parentElement?i.parentElement:i?.getRootNode()?.host},n.UUIPopoverContainerElement.styles=[b`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible;color:var(--uui-color-text,#060606)}`],st([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),st([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),st([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),st([y()],n.UUIPopoverContainerElement.prototype,"_placement",2),st([y()],n.UUIPopoverContainerElement.prototype,"_open",2),st([y()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=st([p("uui-popover-container")],n.UUIPopoverContainerElement);var Zp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,Za=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qp(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zp(e,t,o),o};const Jp=(i,e,t)=>Math.min(Math.max(i,e),t);n.UUIProgressBarElement=class extends m{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(e){const t=this._progress;this._progress=Jp(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return u`<div id="bar" style="${ke(this._getProgressStyle())}"></div>`}},n.UUIProgressBarElement.styles=[b`:host{width:100%;height:4px;position:relative;overflow:hidden;background:var(--uui-color-surface-alt,#f3f3f5);border-radius:100px;display:inline-block}#bar{transition:width 250ms ease;background:var(--uui-color-positive,#0b8152);height:100%;width:0%}`],Za([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=Za([p("uui-progress-bar")],n.UUIProgressBarElement);let Ci=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var eb=Object.defineProperty,tb=Object.getOwnPropertyDescriptor,Qa=i=>{throw TypeError(i)},Re=(i,e,t,r)=>{for(var o=r>1?void 0:r?tb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&eb(e,t,o),o},ib=(i,e,t)=>e.has(i)||Qa("Cannot "+t),ob=(i,e,t)=>e.has(i)?Qa("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),rb=(i,e,t)=>(ib(i,e,"access private method"),t),hn,Ja;n.UUIRadioElement=class extends m{constructor(){super(...arguments),ob(this,hn),this.name="",this.value="",this.label="",this.checked=!1,this.disabled=!1,this.readonly=!1}focus(){this._inputElement.focus()}click(){this._inputElement.click()}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.removeAttribute("tabindex")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}render(){return u`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled||this.readonly}" @change="${rb(this,hn,Ja)}"><div id="button"></div><div id="label">${this.label?u`<span>${this.label}</span>`:u`<slot></slot>`}</div></label>`}},hn=new WeakSet,Ja=function(i){i.stopPropagation();const e=this._inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new Ci(Ci.CHANGE))},n.UUIRadioElement.styles=[qi,b`:host{display:block;box-sizing:border-box;font-family:inherit;color:currentColor;--uui-radio-button-size:var(--uui-size-6,18px);margin:var(--uui-size-2,6px) 0}label{position:relative;box-sizing:border-box;user-select:none;display:flex;align-items:center;cursor:pointer;line-height:18px}:host([readonly]) label{cursor:default}#input{width:0;height:0;opacity:0;margin:0}.label{margin-top:2px}#button{box-sizing:border-box;display:inline-block;width:var(--uui-radio-button-size,18px);height:var(--uui-radio-button-size,18px);background-color:var(--uui-color-surface,#fff);border:1px solid var(--uui-color-border-standalone,#c2c2c2);border-radius:100%;margin-right:calc(var(--uui-size-2,6px) * 2);position:relative;flex:0 0 var(--uui-radio-button-size)}#button::after{content:'';width:calc(var(--uui-radio-button-size)/ 2);height:calc(var(--uui-radio-button-size)/ 2);background-color:var(--uui-color-selected,#3544b1);border-radius:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:all .15s ease-in-out}:host(:hover) #button{border:1px solid var(--uui-color-border-emphasis,#a1a1a1)}:host(:focus){outline:0}:host(:focus-within) input:focus-visible+#button{outline:2px solid var(--uui-color-focus,#3879ff)}input:checked~#button::after{transform:translate(-50%,-50%) scale(1)}input:checked~#button{border:1px solid var(--uui-color-selected,#3544b1)}input:checked:hover~#button{border:1px solid var(--uui-color-selected-emphasis,#4656c8)}input:checked:hover~#button::after{background-color:var(--uui-color-selected-emphasis,#4656c8)}:host([disabled]) label{cursor:not-allowed;opacity:.5}:host([disabled]) .label{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button{border:1px solid var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) input:checked~#button::after{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]:active) #button{animation:${Ki}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],Re([S("#input")],n.UUIRadioElement.prototype,"_inputElement",2),Re([l({type:String})],n.UUIRadioElement.prototype,"name",2),Re([l({type:String})],n.UUIRadioElement.prototype,"value",2),Re([l({type:String})],n.UUIRadioElement.prototype,"label",2),Re([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",2),Re([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",2),Re([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"readonly",2),n.UUIRadioElement=Re([p("uui-radio")],n.UUIRadioElement);let dn=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var nb=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,el=i=>{throw TypeError(i)},pn=(i,e,t,r)=>{for(var o=r>1?void 0:r?sb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&nb(e,t,o),o},bn=(i,e,t)=>e.has(i)||el("Cannot "+t),$=(i,e,t)=>(bn(i,e,"read from private field"),t?t.call(i):e.get(i)),Fe=(i,e,t)=>e.has(i)?el("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),So=(i,e,t,r)=>(bn(i,e,"write to private field"),e.set(i,t),t),B=(i,e,t)=>(bn(i,e,"access private method"),t),D,O,mn,vn,Po,Ao,gn,M,tl,fn,yn,wn,Un,lt,il,ol,Si;const ab="ArrowLeft",lb="ArrowUp",ub="ArrowRight",cb="ArrowDown",hb=" ",db="Enter";n.UUIRadioGroupElement=class extends ve(m,""){constructor(){super(),Fe(this,M),this.disabled=!1,this.readonly=!1,Fe(this,D,null),Fe(this,O,[]),Fe(this,mn,e=>{$(this,O)?.forEach(t=>{t!==e.target?t.makeUnfocusable():t.makeFocusable()})}),Fe(this,vn,e=>{this.contains(e.relatedTarget)||$(this,D)===null&&$(this,O)?.forEach(t=>{t.makeFocusable()})}),Fe(this,Po,()=>{this.pristine=!1}),Fe(this,Ao,e=>{e.target.checked===!0&&(this.value=e.target.value,B(this,M,Si).call(this))}),Fe(this,gn,e=>{switch(e.key){case ab:case lb:{e.preventDefault(),B(this,M,il).call(this);break}case ub:case cb:{e.preventDefault(),B(this,M,ol).call(this);break}case hb:{$(this,D)===null&&(this.value=B(this,M,lt).call(this,1,!1)?.value,B(this,M,Si).call(this));break}case db:this.submit()}}),this.addEventListener("keydown",$(this,gn)),this.addEventListener("focusin",$(this,mn)),this.addEventListener("focusout",$(this,vn)),this.updateComplete.then(()=>{B(this,M,yn).call(this,this.value)})}get value(){return super.value}set value(e){super.value=e,B(this,M,yn).call(this,e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}updated(e){super.updated(e),e.has("disabled")&&B(this,M,wn).call(this,this.disabled),e.has("readonly")&&B(this,M,Un).call(this,this.readonly),e.has("name")&&B(this,M,fn).call(this,e.get("name"))}async focus(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.focus():B(this,M,lt).call(this,1,!1)?.focus()}async blur(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.blur():B(this,M,lt).call(this,1,!1)?.blur()}async click(){await this.updateComplete,$(this,D)!==null?$(this,O)[$(this,D)]?.click():B(this,M,lt).call(this,1,!1)?.click()}getFormElement(){if($(this,O)&&$(this,D))return $(this,O)[$(this,D)]}render(){return u`<slot @slotchange="${B(this,M,tl)}"></slot>`}},D=new WeakMap,O=new WeakMap,mn=new WeakMap,vn=new WeakMap,Po=new WeakMap,Ao=new WeakMap,gn=new WeakMap,M=new WeakSet,tl=function(i){if(i.stopPropagation(),$(this,O)?.forEach(t=>{t.removeEventListener(Ci.CHANGE,$(this,Ao)),t.removeEventListener("blur",$(this,Po))}),So(this,D,null),So(this,O,i.target.assignedElements({flatten:!0}).filter(t=>t instanceof n.UUIRadioElement)),$(this,O).length===0)return;$(this,O).forEach(t=>{t.addEventListener(Ci.CHANGE,$(this,Ao)),t.addEventListener("blur",$(this,Po))}),B(this,M,fn).call(this,this.name),this.disabled&&B(this,M,wn).call(this,!0),this.readonly&&B(this,M,Un).call(this,!0);const e=$(this,O).filter(t=>t.checked===!0);if(e.length>1&&($(this,O).forEach(t=>{t.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),e.length===1){const t=e[0];this.value=t.value,So(this,D,$(this,O).indexOf(t))}},fn=function(i){$(this,O)?.forEach(e=>e.name=i)},yn=function(i){const e=[];$(this,O).forEach((t,r)=>{t.value===i?(t.checked=!0,t.makeFocusable(),So(this,D,r)):(t.checked=!1,e.push(t))}),$(this,D)!==null&&e.forEach(t=>t.makeUnfocusable())},wn=function(i){$(this,O)?.forEach(e=>e.disabled=i)},Un=function(i){$(this,O)?.forEach(e=>e.readonly=i)},lt=function(i=1,e=!0){if(!$(this,O)||$(this,O).length===0)return null;const t=$(this,O).length;let r=$(this,D)??0;for(let o=0;o<t+1;o++){if(!e||o>0){const s=$(this,O)[r];if(!s.disabled&&!s.readonly)return s}r=(r+i+t)%t}return null},il=function(){this.value=B(this,M,lt).call(this,-1)?.value??"",$(this,O)[$(this,D)??0]?.focus(),B(this,M,Si).call(this)},ol=function(){this.value=B(this,M,lt).call(this)?.value??"",$(this,O)[$(this,D)??0]?.focus(),B(this,M,Si).call(this)},Si=function(){this.pristine=!1,this.dispatchEvent(new dn(dn.CHANGE))},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[b`:host{display:inline-block;padding-right:3px;border:1px solid transparent;border-radius:var(--uui-border-radius,3px)}:host(:not([pristine]):invalid),:host(:not([pristine])[internals-invalid]){border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],pn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),pn([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"readonly",2),n.UUIRadioGroupElement=pn([p("uui-radio-group")],n.UUIRadioGroupElement);let Ge=class extends P{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var pb=Object.defineProperty,bb=Object.getOwnPropertyDescriptor,rl=i=>{throw TypeError(i)},T=(i,e,t,r)=>{for(var o=r>1?void 0:r?bb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pb(e,t,o),o},nl=(i,e,t)=>e.has(i)||rl("Cannot "+t),mb=(i,e,t)=>(nl(i,e,"read from private field"),t?t.call(i):e.get(i)),sl=(i,e,t)=>e.has(i)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Rt=(i,e,t)=>(nl(i,e,"access private method"),t),We,ut,_n;const $n={TOP:3,CENTER:2},Pi=18,Ft=3,ze=12,vb=24,kn=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};n.UUIRangeSliderElement=class extends ve(m,""){constructor(){super(),sl(this,We),this.disabled=!1,this.readonly=!1,this._min=0,this._max=0,this.hideStepValues=!1,this._step=1,this._movement=!1,this.startPoint={mouse:0,low:0,high:0},this._lowInputValue=0,this._highInputValue=0,this._trackWidth=0,this._lowValuePercentStart=0,this._highValuePercentEnd=100,sl(this,_n,e=>{e.key=="Enter"&&this.submit()}),this._onTouchStart=e=>{if(this.disabled)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(e.touches[0].pageX);else{const r=this._getClickedValue(e.touches[0].pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onTouchMove=e=>{this._dragBothValuesByMousePos(e.touches[0].pageX)},this._onTouchEnd=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("touchend",this._onTouchEnd),window.removeEventListener("touchcancel",this._onTouchEnd),window.removeEventListener("touchmove",this._onTouchMove)},this._onMouseDown=e=>{if(this.disabled||this.readonly)return;const t=e.composedPath()[0];if(t!==this._outerTrack)if(t===this._innerColor||t===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(e.pageX);else{const r=this._getClickedValue(e.pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=e=>{e.preventDefault(),this._dragBothValuesByMousePos(e.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keydown",mb(this,_n)),this.addEventListener("mousedown",this._onMouseDown),this.addEventListener("touchstart",this._onTouchStart),window.addEventListener("resize",()=>{this._trackWidth=this._outerTrack?.offsetWidth})}get min(){return this._min}set min(e){this._min=e,Rt(this,We,ut).call(this)}get max(){return this._max}set max(e){this._max=e,Rt(this,We,ut).call(this)}get step(){return this._step}set step(e){this._step=e,Rt(this,We,ut).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,Rt(this,We,ut).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,Rt(this,We,ut).call(this)}get value(){return super.value}set value(e){super.value=e,Rt(this,We,ut).call(this)}setValueLow(e){e=A(e,this.maxGap?this._highInputValue-this.maxGap>this.min?this._highInputValue-this.maxGap:this.min:this.min,this.minGap?this._highInputValue-this.minGap:this._highInputValue-this.step),this.setValue(e,this._highInputValue)}setValueHigh(e){e=A(e,this.minGap?this._lowInputValue+this.minGap:this._lowInputValue+this.step,this.maxGap?this.maxGap+this._lowInputValue<this.max?this.maxGap+this._lowInputValue:this.max:this.max),this.setValue(this._lowInputValue,e)}setValue(e,t,r){if(r){const o=this.startPoint.high-this.startPoint.low;e=A(e,this.min,this.max-o),t=A(t,this.min+o,this.max)}this._inputLow.value=e.toString(),this._inputHigh.value=t.toString(),this.value=`${e},${t}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}async focus(){await this.updateComplete,this.getFormElement().focus()}async blur(){await this.updateComplete,this.getFormElement().blur()}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(e){super.updated(e),this._trackWidth=this._outerTrack.offsetWidth,this._runPropertiesChecks()}_runPropertiesChecks(){if(new RegExp(/^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/).test(this.value)||console.error("Range slider (Value error occurred): Bad input"),this._highInputValue===this._lowInputValue&&console.error("Range slider (Value error occurred): Low-end and high-end value should never be equal. Use <uui-slider></uui-slider> instead."),this._lowInputValue>this._highInputValue&&console.error("Range slider (Value error occurred): Low-end value should never be higher than high-end value."),(this._highInputValue>this._max||this._highInputValue<this._min)&&(this.setValueHigh(this._max),console.warn(`Conflict with the high-end value and max value. High-end value has been converted to the max value (${this._max})`)),(this._lowInputValue<this._min||this._lowInputValue>this._max)&&(this.setValueLow(this._min),console.warn(`Conflict with the low-end value and min value. Low-end value has been converted to the min value (${this._min})`)),this._step<=0&&(this._step=1,console.warn("Property step needs a value higher than 0. Converted the step value to 1 (default)")),(this._max-this._min)/this._step%1!==0&&console.error("Conflict with step value and the min and max values. May experience bad side effects"),this._minGap&&this._minGap<this._step&&(this._minGap=void 0,console.warn("Conflict with min-gap and step value. The min-gap needs to be higher than the step value. Removed the min-gap property.")),this._minGap&&this._maxGap&&this._minGap>this._maxGap&&(this._minGap=void 0,this._maxGap=void 0,console.warn("Conflict with min-gap and max-gap. Removed the min-gap and max-gap properties.")),this._minGap&&this._max-this._min<this._minGap&&(this._minGap=void 0,console.warn("Conflict with the min-gap and the total range. Removed the min-gap.")),this._maxGap&&this._highInputValue-this._lowInputValue>this._maxGap&&(this.setValueHigh(this._lowInputValue+this._maxGap),console.warn(`Conflict with value and max-gap. High-end value has been converted to the highest possible value based on the low-end value and the max gap value (${this._highInputValue})`)),this._minGap&&this._highInputValue-this._lowInputValue<this._minGap){const e=this._minGap;this._highInputValue-e<this._min?(this.setValueHigh(this._lowInputValue+e),console.warn(`Conflict with value and min gap. High-end value has been converted to the lowest possible value based on the low-end value and the min gap value (${this._highInputValue}).`)):(this.setValueLow(this._highInputValue-e),console.warn(`Conflict with value and min gap. Low-end value has been converted to the highest possible value based on the high-end value and the min gap value (${this._lowInputValue}).`))}}_updateInnerColor(){const e=this._max-this._min,t=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=t/e*100,s=100-r/e*100;this._lowValuePercentStart=A(o,0,100),this._highValuePercentEnd=A(s,0,100)}_getClickedValue(e){const t=this._outerTrack.getBoundingClientRect().left,r=(e-t-ze)/(this._trackWidth-ze*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(e){this.startPoint={mouse:e,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(e){const t=this._outerTrack.offsetWidth,r=e-this.startPoint.mouse,o=this._max-this._min,s=r/(t+ze*2),a=Math.round(s*o/this._step)*this._step,c=this.startPoint.low+a,h=this.startPoint.high+a;this.setValue(c,h,!0),this.dispatchEvent(new Ge(Ge.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new Ge(Ge.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this.readonly&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new Ge(Ge.INPUT))}_onLowChange(){this.setValueLow(Number(this._inputLow.value)),this.onChanged()}_onHighChange(){this.setValueHigh(Number(this._inputHigh.value)),this.onChanged()}onChanged(){this.pristine=!1,this.dispatchEvent(new Ge(Ge.CHANGE))}render(){return u`
|
|
416
412
|
<div id="range-slider">
|
|
417
413
|
${this._renderNativeInputs()}
|
|
418
414
|
<div id="inner-track">
|
|
@@ -429,21 +425,21 @@
|
|
|
429
425
|
`}_renderThumbValues(){return u`<div class="thumb-values">
|
|
430
426
|
<span
|
|
431
427
|
><span
|
|
432
|
-
>${this._lowInputValue.toFixed(
|
|
428
|
+
>${this._lowInputValue.toFixed(kn(this._step))}</span
|
|
433
429
|
></span
|
|
434
430
|
>
|
|
435
431
|
<span
|
|
436
432
|
><span
|
|
437
|
-
>${this._highInputValue.toFixed(
|
|
433
|
+
>${this._highInputValue.toFixed(kn(this._step))}</span
|
|
438
434
|
></span
|
|
439
435
|
>
|
|
440
|
-
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-ze*2)/e;if(t<
|
|
436
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-ze*2)/e;if(t<vb||e%1!==0)return;let r=0;const o=new Array(e+1).fill(t).map(s=>s*r++);return u`<div class="step-wrapper">
|
|
441
437
|
<svg height="100%" width="100%">
|
|
442
438
|
<rect x="9" y="9" height="${Ft}" rx="2" />
|
|
443
439
|
${this._renderStepCircles(o)}
|
|
444
440
|
</svg>
|
|
445
441
|
${this._renderStepValues(e)}
|
|
446
|
-
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const r=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(
|
|
442
|
+
</div>`}_renderStepValues(e){if(this.hideStepValues||e>20)return;let t=0;const r=new Array(e+1).fill(this._step).map(o=>(this._min+o*t++).toFixed(kn(this._step)));return u`<div class="step-values">
|
|
447
443
|
${r.map(o=>u`<span><span>${o}</span></span>`)}
|
|
448
444
|
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return v`${e.map(r=>{const o=r+ze,s=this._lowInputValue-this._min,a=this._highInputValue-this._min;return o/t>=s&&o/t<=a?v`<circle class="track-step filled" cx="${o}" cy="${Ft*2}" r="4.5" />`:v`<circle class="track-step regular" cx="${o}" cy="${Ft*2}" r="4.5" />`})}`}_renderNativeInputs(){return u` <div class="native-wrapper">
|
|
449
445
|
<input
|
|
@@ -470,7 +466,7 @@
|
|
|
470
466
|
?disabled="${this.disabled||this.readonly}"
|
|
471
467
|
@input=${this._onHighInput}
|
|
472
468
|
@change=${this._onHighChange} />
|
|
473
|
-
</div>`}},
|
|
469
|
+
</div>`}},We=new WeakSet,ut=function(){const i=this.value.split(",");let e=Number(i[0])||0,t=Number(i[1])||0;t=A(t,this._min,this._max),e=this._min+Math.round((e-this._min)/this._step)*this._step,t=this._min+Math.round((t-this._min)/this._step)*this._step,this._lowInputValue=A(e,this._min,this._minGap?t-this._minGap:t-this._step),this._highInputValue=A(t,this._minGap?this._lowInputValue+this._minGap:this._lowInputValue+this._step,Math.min(this._maxGap?e+this._maxGap:this._max,this._max)),this._updateInnerColor(),this.requestUpdate()},_n=new WeakMap,n.UUIRangeSliderElement.formAssociated=!0,n.UUIRangeSliderElement.styles=[b`
|
|
474
470
|
:host {
|
|
475
471
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
476
472
|
--color-hover: var(--uui-color-selected-emphasis,rgb(
|
|
@@ -521,10 +517,10 @@
|
|
|
521
517
|
display: flex;
|
|
522
518
|
flex-direction: column;
|
|
523
519
|
justify-content: center;
|
|
524
|
-
height: ${
|
|
520
|
+
height: ${Pi}px;
|
|
525
521
|
cursor: grab;
|
|
526
522
|
user-select: none;
|
|
527
|
-
z-index: ${
|
|
523
|
+
z-index: ${$n.CENTER};
|
|
528
524
|
}
|
|
529
525
|
|
|
530
526
|
:host([disabled]) #inner-color-thumb,
|
|
@@ -707,9 +703,9 @@
|
|
|
707
703
|
pointer-events: all;
|
|
708
704
|
cursor: grab;
|
|
709
705
|
position: relative;
|
|
710
|
-
z-index: ${
|
|
711
|
-
width: ${
|
|
712
|
-
height: ${
|
|
706
|
+
z-index: ${$n.TOP};
|
|
707
|
+
width: ${Pi}px;
|
|
708
|
+
height: ${Pi}px;
|
|
713
709
|
border-radius: 24px;
|
|
714
710
|
border: none;
|
|
715
711
|
background-color: var(--color-interactive);
|
|
@@ -753,9 +749,9 @@
|
|
|
753
749
|
pointer-events: all;
|
|
754
750
|
cursor: grab;
|
|
755
751
|
position: relative;
|
|
756
|
-
z-index: ${
|
|
757
|
-
width: ${
|
|
758
|
-
height: ${
|
|
752
|
+
z-index: ${$n.TOP};
|
|
753
|
+
width: ${Pi}px;
|
|
754
|
+
height: ${Pi}px;
|
|
759
755
|
border-radius: 24px;
|
|
760
756
|
border: none;
|
|
761
757
|
background-color: var(--color-interactive);
|
|
@@ -790,7 +786,7 @@
|
|
|
790
786
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
791
787
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
792
788
|
}
|
|
793
|
-
`],T([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),T([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),T([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"readonly",2),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),T([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),T([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),T([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),T([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),T([y()],n.UUIRangeSliderElement.prototype,"_movement",2),T([y()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),T([y()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),T([y()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),T([y()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),T([y()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),T([S("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),T([S("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),T([S("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),T([S(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),T([S("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=T([p("uui-range-slider")],n.UUIRangeSliderElement);var
|
|
789
|
+
`],T([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),T([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),T([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"readonly",2),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),T([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),T([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),T([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),T([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),T([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),T([y()],n.UUIRangeSliderElement.prototype,"_movement",2),T([y()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),T([y()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),T([y()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),T([y()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),T([y()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),T([S("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),T([S("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),T([S("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),T([S(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),T([S("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=T([p("uui-range-slider")],n.UUIRangeSliderElement);var gb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIRefListElement=class extends m{render(){return u`<slot></slot>`}},n.UUIRefListElement.styles=[b`:host{display:block}::slotted(:not(:first-child)){margin-top:1px}::slotted(:not(:first-child))::before{content:'';position:absolute;top:-1px;left:0;right:0;border-top:1px solid var(--uui-color-border,#d8d7d9)}`],n.UUIRefListElement=gb([p("uui-ref-list")],n.UUIRefListElement);let Ai=class extends P{static{this.OPEN="open"}};var fb=Object.defineProperty,yb=Object.getOwnPropertyDescriptor,zo=(i,e,t,r)=>{for(var o=r>1?void 0:r?yb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&fb(e,t,o),o};n.UUIRefElement=class extends Gi(yt(m)){constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new Ai(Ai.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new Ai(Ai.OPEN)))}},n.UUIRefElement.styles=[b`:host{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;font-size:var(--uui-font-size);box-sizing:border-box;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);--uui-card-before-opacity:0;transition:--uui-card-before-opacity 120ms}:host([selectable]:focus-visible){outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width)}:host([error]){border:1px solid var(--uui-color-invalid,#d42054)}:host([standalone]){border:1px solid var(--uui-color-border,#d8d7d9)}:host([selectable]){cursor:pointer}:host([selectable]) #select-border{position:absolute;z-index:2;top:-2px;left:-2px;right:-2px;bottom:-2px;pointer-events:none;opacity:0;transition:opacity 120ms}:host([selectable]) #select-border::after{content:'';position:absolute;width:100%;height:100%;box-sizing:border-box;border:2px solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + 2px);box-shadow:0 0 4px 0 var(--uui-color-selected,#3544b1),inset 0 0 2px 0 var(--uui-color-selected,#3544b1)}:host([selected]) #select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border{opacity:.33}:host([selectable][selected]:hover) #select-border{opacity:.8}:host([selectable]:not([selected])) #open-part:hover+#select-border{opacity:0}:host([selectable][selected]) #open-part:hover+#select-border{opacity:1}:host([selectable]:not([selected]):hover) #select-border::after{animation:not-selected--hover 1.2s infinite}@keyframes not-selected--hover{0%,100%{opacity:.66}50%{opacity:1}}:host([selectable][selected]:hover) #select-border::after{animation:selected--hover 1.4s infinite}@keyframes selected--hover{0%,100%{opacity:1}50%{opacity:.66}}:host([selectable]) #open-part:hover+#select-border::after{animation:none}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}button{font-size:inherit;font-family:inherit;border:0;padding:0;background-color:transparent;text-align:left;color:var(--uui-color-text,#060606)}a{text-decoration:none;color:inherit}a:focus,button:focus{outline-color:var(--uui-color-focus,#3879ff);outline-width:var(--uui-card-border-width);outline-style:solid;outline-offset:var(--uui-card-border-width);border-radius:var(--uui-border-radius,3px)}slot[name=actions]::slotted(*){--uui-button-height:calc(var(--uui-size-2,6px) * 4)}slot[name=actions]::slotted(:first-child){margin-right:var(--uui-size-2,6px)}slot[name=actions]{display:flex;align-items:center}#tag-container::slotted(:first-child){margin:calc(var(--uui-size-2,6px))}#actions-container::slotted(:first-child){margin:calc(var(--uui-size-2,6px))}#actions-container{opacity:0;transition:opacity 120ms}:host(:focus) #actions-container,:host(:focus-within) #actions-container,:host(:hover) #actions-container{opacity:1}:host([standalone]:not([disabled]):hover){border-color:var(--uui-color-border-emphasis,#a1a1a1)}:host([disabled]) #open-part{cursor:default}:host([standalone][disabled]){border-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=tag]{display:flex;justify-content:flex-end;align-items:center}`],zo([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"disabled",2),zo([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"readonly",2),zo([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"error",2),n.UUIRefElement=zo([p("uui-ref")],n.UUIRefElement);var wb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,al=i=>{throw TypeError(i)},ct=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ub(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&wb(e,t,o),o},_b=(i,e,t)=>e.has(i)||al("Cannot "+t),$b=(i,e,t)=>e.has(i)?al("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),qe=(i,e,t)=>(_b(i,e,"access private method"),t),we,ll,ul,Lo,cl,hl,dl;n.UUIRefNodeElement=class extends n.UUIRefElement{constructor(){super(...arguments),$b(this,we),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon=`<svg
|
|
794
790
|
xmlns="http://www.w3.org/2000/svg"
|
|
795
791
|
viewBox="0 0 24 24"
|
|
796
792
|
fill="none"
|
|
@@ -801,7 +797,7 @@
|
|
|
801
797
|
id="icon">
|
|
802
798
|
<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
|
|
803
799
|
<path d="M14 2v4a2 2 0 0 0 2 2h4" />
|
|
804
|
-
</svg>`}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}render(){return u`${We(this,we,hl).call(this)}<div id="select-border"></div><slot></slot><slot name="tag" id="tag-container"></slot><slot name="actions" id="actions-container"></slot>`}},we=new WeakSet,al=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},ll=function(){return u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Oo=function(){return u`<span id="content" class="uui-text"><span id="icon"><slot name="icon" @slotchange="${We(this,we,al)}"></slot>${this._iconSlotHasContent===!1?We(this,we,ll).call(this):""}</span><div id="info"><div id="name">${this.name}<slot name="name"></slot></div>${this.renderDetail()}</div></span>`},ul=function(){return u`<a id="open-part" class="uui-text" tabindex="${this.disabled?E:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}">${We(this,we,Oo).call(this)}</a>`},cl=function(){return u`<button type="button" id="open-part" class="uui-text" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}">${We(this,we,Oo).call(this)}</button>`},hl=function(){return this.readonly?u`${We(this,we,Oo).call(this)}`:this.href?We(this,we,ul).call(this):We(this,we,cl).call(this)},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,b`:host{min-width:250px;padding:1px}#content{display:flex;flex-grow:1;align-items:center;line-height:1.2em;padding:calc(var(--uui-size-3,9px))}#open-part{color:inherit;text-decoration:none;cursor:pointer;display:flex;flex-grow:1}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px);display:flex;align-items:center;justify-content:center}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px);margin-top:1px}#detail{opacity:.6;line-height:1.2em}:host([selectable]) #open-part{flex-grow:0;padding:0;margin:calc(var(--uui-size-2,6px))}:host(:not([disabled])) #open-part:hover #name{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]) #icon{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #name{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #detail{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],ut([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),ut([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),ut([l({type:String})],n.UUIRefNodeElement.prototype,"href",2),ut([l({type:String})],n.UUIRefNodeElement.prototype,"target",2),ut([l({type:String})],n.UUIRefNodeElement.prototype,"rel",2),ut([y()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=ut([p("uui-ref-node")],n.UUIRefNodeElement);var $b=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,dl=(i,e,t,r)=>{for(var o=r>1?void 0:r?kb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&$b(e,t,o),o};n.UUIRefNodeDataTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDataTypeElement.styles=[...n.UUIRefNodeElement.styles],dl([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=dl([p("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var Eb=Object.defineProperty,xb=Object.getOwnPropertyDescriptor,pl=(i,e,t,r)=>{for(var o=r>1?void 0:r?xb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Eb(e,t,o),o};n.UUIRefNodeDocumentTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDocumentTypeElement.styles=[...n.UUIRefNodeElement.styles],pl([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=pl([p("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var Ib=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIRefNodeFormElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}},n.UUIRefNodeFormElement.styles=[...n.UUIRefNodeElement.styles],n.UUIRefNodeFormElement=Ib([p("uui-ref-node-form")],n.UUIRefNodeFormElement);var Cb=Object.defineProperty,Sb=Object.getOwnPropertyDescriptor,bl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Cb(e,t,o),o};n.UUIRefNodeMemberElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeMemberElement.styles=[...n.UUIRefNodeElement.styles],bl([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=bl([p("uui-ref-node-member")],n.UUIRefNodeMemberElement);var Pb=Object.defineProperty,Ab=Object.getOwnPropertyDescriptor,kn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ab(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Pb(e,t,o),o};n.UUIRefNodePackageElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodePackageElement.styles=[...n.UUIRefNodeElement.styles],kn([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),kn([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=kn([p("uui-ref-node-package")],n.UUIRefNodePackageElement);var zb=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,ml=(i,e,t,r)=>{for(var o=r>1?void 0:r?Lb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&zb(e,t,o),o};n.UUIRefNodeUserElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeUserElement.styles=[...n.UUIRefNodeElement.styles],ml([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=ml([p("uui-ref-node-user")],n.UUIRefNodeUserElement);var Ob=Object.defineProperty,Mb=Object.getOwnPropertyDescriptor,vl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Mb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ob(e,t,o),o};n.UUIScrollContainerElement=class extends m{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return u`<slot></slot>`}},n.UUIScrollContainerElement.styles=[b`:host{display:block;scrollbar-width:thin;scrollbar-color:var(--uui-color-disabled-contrast,#c4c4c4) var(--uui-color-surface,#fff);overflow-y:auto}:host([enforce-scroll]){overflow-y:scroll}:host::-webkit-scrollbar{width:6px;height:6px}:host::-webkit-scrollbar-track{background:var(--uui-color-surface,#fff);border-radius:3px}:host::-webkit-scrollbar-thumb{background-color:var(--uui-color-disabled-contrast,#c4c4c4);border-radius:3px}`],vl([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=vl([p("uui-scroll-container")],n.UUIScrollContainerElement);let En=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Tb=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,pe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Tb(e,t,o),o};n.UUISelectElement=class extends ve(m,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const t=this.options.find(r=>r.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new En(En.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,r,o){return u`<option value="${t}" ?selected="${r}" ?disabled="${o}">${e}</option>`}_renderGrouped(){return this._groups.length===0?E:u`${this._groups.map(e=>u`<optgroup label="${e}" ?disabled="${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}">${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}</optgroup>`)}`}_getDisplayValue(){return this.options.find(e=>e.value===this.value)?.name||this.value}render(){return this.readonly?u`<span>${this._getDisplayValue()}</span>`:u`<select id="native" aria-label="${this.label}" @change="${this.setValue}" ?disabled="${this.disabled}" .name="${this.name}" .value="${this.value}"><option disabled="disabled" selected="selected" value="" hidden>${this.placeholder}</option>${this._renderGrouped()} ${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}</select>`}},n.UUISelectElement.styles=[b`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,inherit);height:var(--uui-select-height,var(--uui-size-11,33px));padding:var(--uui-select-padding-y,var(--uui-size-1,3px)) var(--uui-select-padding-x,var(--uui-size-2,6px));color:var(--uui-select-text-color,var(--uui-color-text,#060606));box-sizing:border-box;border-radius:var(--uui-border-radius,3px);border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease;width:100%;background-color:var(--uui-select-background-color,var(--uui-color-surface,#fff))}#native:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-select-outline-color,var(--uui-color-focus,#3879ff))}#native[disabled]{cursor:not-allowed;background-color:var(--uui-select-disabled-background-color,var(--uui-color-disabled,#f3f3f5))}#native:hover{border:1px solid var(--uui-select-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1))}option:checked{background:var(--uui-select-selected-option-background-color,var(--uui-color-selected,#3544b1));color:var(--uui-select-selected-option-color,var(--uui-color-selected-contrast,#fff))}#caret{position:absolute;right:12px;top:50%;transform:translateY(-50%)}:host([error]) #native{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],pe([l({type:String})],n.UUISelectElement.prototype,"label",2),pe([l()],n.UUISelectElement.prototype,"placeholder",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"readonly",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),pe([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),pe([y()],n.UUISelectElement.prototype,"_groups",2),pe([l()],n.UUISelectElement.prototype,"disabledGroups",2),pe([y()],n.UUISelectElement.prototype,"_disabledGroups",2),pe([S("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=pe([p("uui-select")],n.UUISelectElement);const Bb=b`
|
|
800
|
+
</svg>`}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}render(){return u`${qe(this,we,dl).call(this)}<div id="select-border"></div><slot></slot><slot name="tag" id="tag-container"></slot><slot name="actions" id="actions-container"></slot>`}},we=new WeakSet,ll=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},ul=function(){return u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Lo=function(){return u`<span id="content" class="uui-text"><span id="icon"><slot name="icon" @slotchange="${qe(this,we,ll)}"></slot>${this._iconSlotHasContent===!1?qe(this,we,ul).call(this):""}</span><div id="info"><div id="name">${this.name}<slot name="name"></slot></div>${this.renderDetail()}</div></span>`},cl=function(){return u`<a id="open-part" class="uui-text" tabindex="${this.disabled?E:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}">${qe(this,we,Lo).call(this)}</a>`},hl=function(){return u`<button type="button" id="open-part" class="uui-text" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}">${qe(this,we,Lo).call(this)}</button>`},dl=function(){return this.readonly?u`${qe(this,we,Lo).call(this)}`:this.href?qe(this,we,cl).call(this):qe(this,we,hl).call(this)},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,b`:host{min-width:250px;padding:1px}#content{display:flex;flex-grow:1;align-items:center;line-height:1.2em;padding:calc(var(--uui-size-3,9px))}#open-part{color:inherit;text-decoration:none;cursor:pointer;display:flex;flex-grow:1}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px);display:flex;align-items:center;justify-content:center}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px);margin-top:1px}#detail{opacity:.6;line-height:1.2em}:host([selectable]) #open-part{flex-grow:0;padding:0;margin:calc(var(--uui-size-2,6px))}:host(:not([disabled])) #open-part:hover #name{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #detail{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([disabled]) #icon{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #name{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #detail{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],ct([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),ct([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),ct([l({type:String})],n.UUIRefNodeElement.prototype,"href",2),ct([l({type:String})],n.UUIRefNodeElement.prototype,"target",2),ct([l({type:String})],n.UUIRefNodeElement.prototype,"rel",2),ct([y()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=ct([p("uui-ref-node")],n.UUIRefNodeElement);var kb=Object.defineProperty,Eb=Object.getOwnPropertyDescriptor,pl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Eb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&kb(e,t,o),o};n.UUIRefNodeDataTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M142.212 397.267l106.052-48.024L398.479 199.03l-26.405-26.442-90.519 90.517-15.843-15.891 90.484-90.486-16.204-16.217-150.246 150.243-47.534 106.513zm74.904-100.739l23.285-23.283 3.353 22.221 22.008 3.124-23.283 23.313-46.176 20.991 20.813-46.366zm257.6-173.71L416.188 64.3l-49.755 49.785 58.504 58.503 49.779-49.77zM357.357 300.227h82.826v116.445H68.929V300.227h88.719v-30.648H38.288v177.733h432.537V269.578H357.357v30.649z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDataTypeElement.styles=[...n.UUIRefNodeElement.styles],pl([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=pl([p("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var xb=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,bl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ib(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&xb(e,t,o),o};n.UUIRefNodeDocumentTypeElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M49.035 60.434h413.93v33.592H49.035zm0 82.005h86.578v86.577H49.035zm163.677 0h86.576v86.577h-86.576zm163.676 0h86.576v86.577h-86.576zM49.035 282.984h413.93v33.593H49.035zm0 82.006h86.578v86.576H49.035zm163.677 0h86.576v86.576h-86.576zm163.676 0h86.576v86.576h-86.576z"></path></svg>',this.alias=""}renderDetail(){const e=[];return this.alias!==""&&e.push(this.alias),this.detail!==""&&e.push(this.detail),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeDocumentTypeElement.styles=[...n.UUIRefNodeElement.styles],bl([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=bl([p("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var Cb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIRefNodeFormElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444.72 215.28H67.28c-11.04 0-20-8.96-20-20V64.896c0-11.04 8.96-20 20-20h377.44c11.04 0 20 8.96 20 20V195.28c0 11.056-8.96 20-20 20zm-357.44-40h337.44V84.896H87.28v90.384zm185.504 215.696c0-6.848.704-13.504 1.936-20H87.28v-90.384h337.44v12.496a108.098 108.098 0 0140 31.36v-63.856c0-11.04-8.96-20-20-20H67.28c-11.04 0-20 8.96-20 20v130.384c0 11.04 8.96 20 20 20h207.44c-1.232-6.496-1.936-13.152-1.936-20zm107.552-76.128c-41.968 0-76.112 34.16-76.112 76.128s34.144 76.128 76.112 76.128 76.128-34.16 76.128-76.128-34.144-76.128-76.128-76.128zm46.016 80.464a7.293 7.293 0 01-7.296 7.296h-27.072v27.088a7.293 7.293 0 01-7.296 7.296H376a7.293 7.293 0 01-7.296-7.296v-27.088h-27.072a7.293 7.293 0 01-7.296-7.296v-8.672a7.293 7.293 0 017.296-7.296h27.072v-27.088A7.293 7.293 0 01376 344.96h8.688a7.293 7.293 0 017.296 7.296v27.088h27.072a7.293 7.293 0 017.296 7.296v8.672z"></path></svg>'}},n.UUIRefNodeFormElement.styles=[...n.UUIRefNodeElement.styles],n.UUIRefNodeFormElement=Cb([p("uui-ref-node-form")],n.UUIRefNodeFormElement);var Sb=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,ml=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Sb(e,t,o),o};n.UUIRefNodeMemberElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeMemberElement.styles=[...n.UUIRefNodeElement.styles],ml([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=ml([p("uui-ref-node-member")],n.UUIRefNodeMemberElement);var Ab=Object.defineProperty,zb=Object.getOwnPropertyDescriptor,En=(i,e,t,r)=>{for(var o=r>1?void 0:r?zb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Ab(e,t,o),o};n.UUIRefNodePackageElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M161.08 106.29l-70.073 40.452 165.498 95.545 70.076-40.453L161.08 106.29zm259.851 41.077L255.435 51.815l-63.578 36.709 165.499 95.542 63.575-36.699zm-150.11 122.19V459.43l164.966-95.238V174.32l-164.966 95.237zM75.082 364.191l164.959 95.234V268.32L75.082 173.09v191.101z"></path></svg>',this.version="",this.author=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.version!==""&&e.push(this.version),this.author!==""&&e.push(this.author),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodePackageElement.styles=[...n.UUIRefNodeElement.styles],En([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),En([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=En([p("uui-ref-node-package")],n.UUIRefNodePackageElement);var Lb=Object.defineProperty,Ob=Object.getOwnPropertyDescriptor,vl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ob(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Lb(e,t,o),o};n.UUIRefNodeUserElement=class extends n.UUIRefNodeElement{constructor(){super(...arguments),this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M331.135 98.375c3.677 14.798 4.045 16.031 3.702 31.225-.138 5.855-3.5 32.936-2.586 41.242.751 6.851 2.46 7.395 5.162 13.041 4.705 9.824 3.13 23.376 1.325 33.282-.988 5.42-3.076 13.136-6.248 17.561-3.497 4.876-10.498 4.913-13.592 10.602-4.459 8.195-1.941 19.692-4.752 28.54-3.193 10.033-11.325 10.738-11.938 23.867 3.986.562 7.962 1.134 11.938 1.703 3.99 8.484 11.297 25.552 18.759 30.688 6.25 1.705 12.505 3.411 18.752 5.113 21.907 8.982 46.251 19.732 68.204 28.987 19.991 8.434 43.927 11.439 51.151 32.396 0 14.229 1.343 47.849.976 66.497H36.514c-.367-18.648.974-52.268.974-66.497 7.226-20.957 31.16-23.963 51.151-32.396 21.953-9.255 46.297-20.005 68.201-28.987 6.25-1.702 12.506-3.408 18.754-5.113 7.461-5.136 14.77-22.203 18.76-30.688l8.877-2.158c-2.017-11.206-8.954-12.078-11.845-20.01a91882.59 91882.59 0 00-3.408-35.806c.055.563-8.163-1.497-9.238-2.171-11.58-7.256-11.816-36.723-12.931-48.978-.508-5.603 7.283-10.193 5.118-20.465-12.69-60.138 5.486-88.282 34.229-97.614 19.95-8.083 57.198-23.074 91.941-1.703l8.621 7.991 13.952 2.405c7 4.041 11.465 17.446 11.465 17.446z"></path></svg>',this.groupName=""}renderDetail(){const e=[];return this.detail!==""&&e.push(this.detail),this.groupName!==""&&e.push(this.groupName),u`<small id="detail">${e.join(" | ")}<slot name="detail"></slot></small>`}},n.UUIRefNodeUserElement.styles=[...n.UUIRefNodeElement.styles],vl([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=vl([p("uui-ref-node-user")],n.UUIRefNodeUserElement);var Mb=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,gl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Mb(e,t,o),o};n.UUIScrollContainerElement=class extends m{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return u`<slot></slot>`}},n.UUIScrollContainerElement.styles=[b`:host{display:block;scrollbar-width:thin;scrollbar-color:var(--uui-color-disabled-contrast,#c4c4c4) var(--uui-color-surface,#fff);overflow-y:auto}:host([enforce-scroll]){overflow-y:scroll}:host::-webkit-scrollbar{width:6px;height:6px}:host::-webkit-scrollbar-track{background:var(--uui-color-surface,#fff);border-radius:3px}:host::-webkit-scrollbar-thumb{background-color:var(--uui-color-disabled-contrast,#c4c4c4);border-radius:3px}`],gl([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=gl([p("uui-scroll-container")],n.UUIScrollContainerElement);let xn=class extends P{static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Nb=Object.defineProperty,Bb=Object.getOwnPropertyDescriptor,pe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Nb(e,t,o),o};n.UUISelectElement=class extends ve(m,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.error=!1,this.options=[],this._groups=[],this.disabledGroups="",this._disabledGroups=[],this._values=[],this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")})}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}_createDisabledGroups(){this.disabledGroups.length!==0&&(this._disabledGroups=this.disabledGroups.split(","))}_extractGroups(){this.options.length!==0&&(this._groups=Array.from(new Set(this.options.filter(e=>e.group).map(e=>e.group))))}willUpdate(e){if(e.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const t=this.options.find(r=>r.selected);this.value=t?t.value:""}e.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),e.has("disabledGroups")&&this._createDisabledGroups()}setValue(e){e.stopPropagation();const t=e.target;e.target&&(this.value=t.value),this.dispatchEvent(new xn(xn.CHANGE,{bubbles:!0,composed:!1}))}_renderOption(e,t,r,o){return u`<option value="${t}" ?selected="${r}" ?disabled="${o}">${e}</option>`}_renderGrouped(){return this._groups.length===0?E:u`${this._groups.map(e=>u`<optgroup label="${e}" ?disabled="${this._disabledGroups.some(t=>t.toLowerCase()===e.toLowerCase())}">${this.options.map(t=>t.group===e?this._renderOption(t.name,t.value,t.selected,t.disabled):"")}</optgroup>`)}`}_getDisplayValue(){return this.options.find(e=>e.value===this.value)?.name||this.value}render(){return this.readonly?u`<span>${this._getDisplayValue()}</span>`:u`<select id="native" aria-label="${this.label}" @change="${this.setValue}" ?disabled="${this.disabled}" .name="${this.name}" .value="${this.value}"><option disabled="disabled" selected="selected" value="" hidden>${this.placeholder}</option>${this._renderGrouped()} ${this.options.filter(e=>!e.group).map(e=>this._renderOption(e.name,e.value,e.selected,e.disabled))}</select>`}},n.UUISelectElement.styles=[b`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,inherit);height:var(--uui-select-height,var(--uui-size-11,33px));padding:var(--uui-select-padding-y,var(--uui-size-1,3px)) var(--uui-select-padding-x,var(--uui-size-2,6px));color:var(--uui-select-text-color,var(--uui-color-text,#060606));box-sizing:border-box;border-radius:var(--uui-border-radius,3px);border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease;width:100%;background-color:var(--uui-select-background-color,var(--uui-color-surface,#fff))}#native:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-select-outline-color,var(--uui-color-focus,#3879ff))}#native[disabled]{cursor:not-allowed;background-color:var(--uui-select-disabled-background-color,var(--uui-color-disabled,#f3f3f5))}#native:hover{border:1px solid var(--uui-select-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1))}option:checked{background:var(--uui-select-selected-option-background-color,var(--uui-color-selected,#3544b1));color:var(--uui-select-selected-option-color,var(--uui-color-selected-contrast,#fff))}#caret{position:absolute;right:12px;top:50%;transform:translateY(-50%)}:host([error]) #native{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],pe([l({type:String})],n.UUISelectElement.prototype,"label",2),pe([l()],n.UUISelectElement.prototype,"placeholder",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"readonly",2),pe([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),pe([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),pe([y()],n.UUISelectElement.prototype,"_groups",2),pe([l()],n.UUISelectElement.prototype,"disabledGroups",2),pe([y()],n.UUISelectElement.prototype,"_disabledGroups",2),pe([S("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=pe([p("uui-select")],n.UUISelectElement);const Db=b`
|
|
805
801
|
input[type='range'] {
|
|
806
802
|
left: 0;
|
|
807
803
|
position: absolute;
|
|
@@ -908,12 +904,12 @@
|
|
|
908
904
|
input[type='range']:focus::-ms-fill-upper {
|
|
909
905
|
background: transparent;
|
|
910
906
|
}
|
|
911
|
-
`;let
|
|
912
|
-
${this._steps.map(e=>{if(this._stepWidth>=
|
|
907
|
+
`;let zi=class extends P{static{this.INPUT="input"}static{this.CHANGE="change"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var Vb=Object.defineProperty,jb=Object.getOwnPropertyDescriptor,fl=i=>{throw TypeError(i)},q=(i,e,t,r)=>{for(var o=r>1?void 0:r?jb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Vb(e,t,o),o},In=(i,e,t)=>e.has(i)||fl("Cannot "+t),yl=(i,e,t)=>(In(i,e,"read from private field"),t?t.call(i):e.get(i)),Cn=(i,e,t)=>e.has(i)?fl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),wl=(i,e,t,r)=>(In(i,e,"write to private field"),e.set(i,t),t),Hb=(i,e,t)=>(In(i,e,"access private method"),t),Oo,Mo,Sn,Ul;const Li=12,_l=24,Rb=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t),Fb=i=>{const e=i.toString().indexOf(".");return e>=0?i.toString().length-e-1:0};n.UUISliderElement=class extends ve(m,""){constructor(){super(),Cn(this,Sn),Cn(this,Oo,0),this.hideStepValues=!1,this.hideValueLabel=!1,this.min=0,this.max=100,Cn(this,Mo,1),this.disabled=!1,this.readonly=!1,this._stepWidth=0,this.onWindowResize=()=>{this._stepWidth=this._calculateStepWidth()},this._steps=[],this._sliderPosition="0%",this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addEventListener("keydown",Hb(this,Sn,Ul))}get step(){return yl(this,Mo)}set step(e){wl(this,Mo,e),wl(this,Oo,(e.toString().split(".")[1]||[]).length)}get value(){return super.value}set value(e){if(e instanceof File)return;const t=super.value;let r=e?parseFloat(e):0;r=Math.min(Math.max(r,this.min),this.max),this.step>0&&(r=Math.round(r/this.step)*this.step),super.value=r.toFixed(yl(this,Oo)).toString(),this._calculateSliderPosition(),this.requestUpdate("value",t)}async focus(){await this.updateComplete,this._input.focus()}async blur(){await this.updateComplete,this._input.blur()}async click(){await this.updateComplete,this._input.click()}getFormElement(){return this._input}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.onWindowResize),this.label||console.warn(this.tagName+" needs a `label`",this)}disconnectedCallback(){window.removeEventListener("resize",this.onWindowResize),super.disconnectedCallback()}firstUpdated(){this._calculateSliderPosition(),this._updateSteps()}updated(e){super.updated(e),(e.get("max")||e.get("min")||e.get("step"))&&(this.value=this.value,this._updateSteps())}_updateSteps(){this._steps=Rb(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-Li*2)/(this._steps.length-1)}_calculateSliderPosition(){const e=(parseFloat(super.value||"0")-this.min)/(this.max-this.min);this._sliderPosition=`${Math.floor(e*1e5)/1e3}%`}_onInput(e){e.stopPropagation(),this.value=this._input.value,this.dispatchEvent(new zi(zi.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new zi(zi.CHANGE))}renderTrackSteps(){return v`
|
|
908
|
+
${this._steps.map(e=>{if(this._stepWidth>=_l){const t=Math.round(Li+this._stepWidth*this._steps.indexOf(e));return v`<circle class="track-step" cx="${t}" cy="50%" r="4.5" />`}return v``})}
|
|
913
909
|
`}renderStepValues(){return this.hideStepValues?E:u`<div id="step-values">
|
|
914
910
|
${this._steps.map(e=>u` <span
|
|
915
911
|
><span>
|
|
916
|
-
${this._steps.length<=20&&this._stepWidth>=
|
|
912
|
+
${this._steps.length<=20&&this._stepWidth>=_l?e.toFixed(Fb(this.step)):E}
|
|
917
913
|
</span></span
|
|
918
914
|
>`)}
|
|
919
915
|
</div>`}render(){return u`
|
|
@@ -942,7 +938,7 @@
|
|
|
942
938
|
</div>
|
|
943
939
|
</div>
|
|
944
940
|
${this.renderStepValues()}
|
|
945
|
-
`}},
|
|
941
|
+
`}},Oo=new WeakMap,Mo=new WeakMap,Sn=new WeakSet,Ul=function(i){i.key=="Enter"&&this.submit()},n.UUISliderElement.formAssociated=!0,n.UUISliderElement.styles=[yc,Db,b`
|
|
946
942
|
:host {
|
|
947
943
|
display: inline-block;
|
|
948
944
|
width: 100%;
|
|
@@ -991,8 +987,8 @@
|
|
|
991
987
|
|
|
992
988
|
#track-inner {
|
|
993
989
|
position: absolute;
|
|
994
|
-
left: ${
|
|
995
|
-
right: ${
|
|
990
|
+
left: ${Li}px; /* Match TRACK_MARGIN */
|
|
991
|
+
right: ${Li}px; /* Match TRACK_MARGIN */
|
|
996
992
|
}
|
|
997
993
|
|
|
998
994
|
#thumb {
|
|
@@ -1054,7 +1050,7 @@
|
|
|
1054
1050
|
}
|
|
1055
1051
|
|
|
1056
1052
|
#step-values {
|
|
1057
|
-
margin: 0 ${
|
|
1053
|
+
margin: 0 ${Li}px; /* Match TRACK_MARGIN */
|
|
1058
1054
|
margin-top: 6px;
|
|
1059
1055
|
display: flex;
|
|
1060
1056
|
align-items: flex-end;
|
|
@@ -1103,13 +1099,13 @@
|
|
|
1103
1099
|
:host([readonly]) #thumb-label {
|
|
1104
1100
|
opacity: 1;
|
|
1105
1101
|
}
|
|
1106
|
-
`],q([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",2),q([l({type:Boolean,attribute:"hide-value-label"})],n.UUISliderElement.prototype,"hideValueLabel",2),q([l({type:Number})],n.UUISliderElement.prototype,"min",2),q([l({type:Number})],n.UUISliderElement.prototype,"max",2),q([l({type:Number})],n.UUISliderElement.prototype,"step",1),q([l({type:String})],n.UUISliderElement.prototype,"value",1),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"readonly",2),q([l({type:String})],n.UUISliderElement.prototype,"label",2),q([S("#input")],n.UUISliderElement.prototype,"_input",2),q([S("#track")],n.UUISliderElement.prototype,"_track",2),q([y()],n.UUISliderElement.prototype,"_stepWidth",2),q([y()],n.UUISliderElement.prototype,"_steps",2),q([y()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=q([p("uui-slider")],n.UUISliderElement);var Fb=Object.defineProperty,Gb=Object.getOwnPropertyDescriptor,_l=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Fb(e,t,o),o};n.UUISymbolExpandElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUISymbolExpandElement.styles=[b`:host{display:inline-flex;width:12px;vertical-align:middle}svg{transform:rotate(-90deg);transform-origin:50% 50%;transition:transform .1s cubic-bezier(.1,0,.9,1);width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],_l([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=_l([p("uui-symbol-expand")],n.UUISymbolExpandElement);var Wb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,Sn=(i,e,t,r)=>{for(var o=r>1?void 0:r?qb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Wb(e,t,o),o};n.UUISymbolFileThumbnailElement=class extends m{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}render(){return this.src?u`<img src="${this.src}" alt="${this.alt}">`:u`<uui-icon name="picture" .fallback="${Sc.strings[0]}"></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[b`:host{display:block;width:100%;height:100%}img{object-fit:contain;height:100%;width:100%}uui-icon{width:100%;height:100%;max-width:100%;display:flex;max-height:100%;justify-content:center;color:var(--uui-color-surface,#fff);background:var(--uui-color-surface-alt,#f3f3f5)}`],Sn([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),Sn([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=Sn([p("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var Kb=Object.defineProperty,Xb=Object.getOwnPropertyDescriptor,$l=(i,e,t,r)=>{for(var o=r>1?void 0:r?Xb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Kb(e,t,o),o};n.UUISymbolFileElement=class extends m{constructor(){super(...arguments),this.type=""}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round" id="icon"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg> ${this.type?u`<small id="file-type" class="uui-small">${this.type.toUpperCase()}</small>`:""}`}},n.UUISymbolFileElement.styles=[vt,b`:host{position:relative;display:block;box-sizing:border-box}#file-type{position:absolute;bottom:20%;left:12%;margin-left:calc(var(--uui-size-3,9px) * -1);padding:0 var(--uui-size-3,9px);font-weight:700;background-color:var(--uui-color-surface-alt,#f3f3f5);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:var(--uui-border-radius,3px)}#icon{width:100%;color:var(--uui-color-border-standalone,#c2c2c2)}`],$l([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=$l([p("uui-symbol-file")],n.UUISymbolFileElement);var Yb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolFolderElement=class extends m{render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round" id="icon"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg>`}},n.UUISymbolFolderElement.styles=[b`:host{display:block;position:relative;box-sizing:border-box}#icon{width:100%;color:var(--uui-color-border-standalone,#c2c2c2)}`],n.UUISymbolFolderElement=Yb([p("uui-symbol-folder")],n.UUISymbolFolderElement);var Zb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,kl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Zb(e,t,o),o};n.UUISymbolLockElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?v`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:v`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}</svg>`}},n.UUISymbolLockElement.styles=[b`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],kl([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=kl([p("uui-symbol-lock")],n.UUISymbolLockElement);var Jb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolMoreElement=class extends m{render(){return v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="17" cy="50" r="9"></circle><circle cx="50" cy="50" r="9"></circle><circle cx="83" cy="50" r="9"></circle></svg>`}},n.UUISymbolMoreElement.styles=[b`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}svg{fill:currentColor}`],n.UUISymbolMoreElement=Jb([p("uui-symbol-more")],n.UUISymbolMoreElement);var em=Object.defineProperty,tm=Object.getOwnPropertyDescriptor,El=(i,e,t,r)=>{for(var o=r>1?void 0:r?tm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&em(e,t,o),o};n.UUISymbolSortElement=class extends oi(m){constructor(){super(...arguments),this.descending=!1}render(){return u`<svg id="up" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUISymbolSortElement.styles=[b`:host{position:relative;display:inline-block;width:.9em;height:1em;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.9em;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-8em}#up{transform:rotate(180deg);margin-top:-1.05em}#down{margin-top:-.55em}:host([active]) #up{margin-top:calc(-.8em - (.25em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.8em + (.25em * var(--uui-symbol-sort-hover,0)))}:host(:hover){--uui-symbol-sort-hover:1}:host(:not([active])) #down,:host(:not([active])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active]:not([descending])) #down{opacity:1}:host([active]:not([descending])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active][descending]) #up{opacity:1}:host([active][descending]) #down{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}`],El([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=El([p("uui-symbol-sort")],n.UUISymbolSortElement);var im=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return u`<slot></slot>`}},n.UUITableElement.styles=[b`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],n.UUITableElement=im([p("uui-table")],n.UUITableElement);var om=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,No=(i,e,t,r)=>{for(var o=r>1?void 0:r?rm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&om(e,t,o),o};n.UUITableCellElement=class extends m{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return u`<slot @slotchange="${this._detectOverflow}"></slot>`}},n.UUITableCellElement.styles=[b`:host{position:relative;display:table-cell;height:var(--uui-table-cell-height,var(--uui-size-12,36px));padding:var(--uui-table-cell-padding,var(--uui-size-3,9px) var(--uui-size-5,15px));border-top:1px solid var(--uui-color-border,#d8d7d9);vertical-align:middle}:host([clip-text]){max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}:host([disable-child-interaction]) ::slotted(*){pointer-events:none}:host([disable-child-interaction])::after{content:'';position:absolute;inset:0}:host([no-padding]){padding:0}`],No([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),No([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),No([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=No([p("uui-table-cell")],n.UUITableCellElement);var nm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableColumnElement=class extends m{},n.UUITableColumnElement.styles=[b`:host{display:table-column}`],n.UUITableColumnElement=nm([p("uui-table-column")],n.UUITableColumnElement);var sm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,b`:host{border-top:none}`],n.UUITableHeadCellElement=sm([p("uui-table-head-cell")],n.UUITableHeadCellElement);var am=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return u`<slot></slot>`}},n.UUITableHeadElement.styles=[b`:host{display:table-header-group;font-weight:700}`],n.UUITableHeadElement=am([p("uui-table-head")],n.UUITableHeadElement);var lm=Object.defineProperty,um=Object.getOwnPropertyDescriptor,xl=(i,e,t,r)=>{for(var o=r>1?void 0:r?um(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&lm(e,t,o),o};n.UUITableRowElement=class extends Hi(ft(m)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{e.disableChildInteraction!==void 0&&(e.disableChildInteraction=this.selectOnly)})}render(){return u`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}},n.UUITableRowElement.styles=[b`:host{display:table-row;position:relative;outline-offset:-3px}:host([selectable]){cursor:pointer}:host(:focus){outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host([selected]){outline:2px solid var(--uui-table-row-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:focus){outline-color:var(--uui-color-focus,#3879ff)}`],xl([De({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=xl([p("uui-table-row")],n.UUITableRowElement);var cm=Object.defineProperty,hm=Object.getOwnPropertyDescriptor,Gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?hm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&cm(e,t,o),o};n.UUITabElement=class extends oi(me("",m)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?u`<a id="button" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button type="button" id="button" ?disabled="${this.disabled}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUITabElement.styles=[b`:host{color:var(--uui-tab-text,var(--uui-color-interactive,#1b264f));font-family:inherit;width:fit-content}#button{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-height:var(--uui-size-12,36px);min-width:70px;padding:var(--uui-size-3,9px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px));border:none;font-size:inherit;background:0 0;color:inherit;cursor:pointer;font-family:inherit;text-decoration:none;line-height:normal}:host([orientation=vertical]) #button{min-height:var(--uui-size-14,42px);padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px))}:host(:not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([disabled])) #button:active{box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}:host([active]){color:var(--uui-tab-text-active,unset)}:host([disabled]) #button{color:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button::before{content:'';position:absolute;background-color:var(--uui-color-current,#f5c1bc);opacity:0}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0 0;height:0;width:calc(100% - 14px);bottom:0;transition:opacity linear 120ms,height ease-in-out 120ms}:host([active][orientation=horizontal]) #button::before{height:4px}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity linear 120ms,width ease-in-out 120ms}:host([active][orientation=vertical]) #button::before{width:4px}#button:hover::before{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #button::before{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=icon]::slotted(*){font-size:20px;margin-bottom:var(--uui-size-2,6px)}slot.label{text-align:center;display:flex;width:100%;flex-direction:column}:host([orientation=vertical]) slot.label{text-align:left}`],Gt([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),Gt([l({type:String})],n.UUITabElement.prototype,"href",2),Gt([l({type:String})],n.UUITabElement.prototype,"target",2),Gt([l({type:String})],n.UUITabElement.prototype,"rel",2),Gt([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=Gt([p("uui-tab")],n.UUITabElement);var dm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,Il=i=>{throw TypeError(i)},Wt=(i,e,t,r)=>{for(var o=r>1?void 0:r?pm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&dm(e,t,o),o},Pn=(i,e,t)=>e.has(i)||Il("Cannot "+t),C=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),Ue=(i,e,t)=>e.has(i)?Il("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Ai=(i,e,t,r)=>(Pn(i,e,"write to private field"),e.set(i,t),t),J=(i,e,t)=>(Pn(i,e,"access private method"),t),Bo,_e,Le,qt,Kt,Do,zi,Li,K,Cl,Sl,An,Pl,Xt,Vo,Al,zn,Ln;n.UUITabGroupElement=class extends m{constructor(){super(...arguments),Ue(this,K),Ue(this,Bo,0),this.dropdownContentDirection="vertical",Ue(this,_e,[]),Ue(this,Le,[]),Ue(this,qt,new Map),Ue(this,Kt,[]),Ue(this,Do,new ResizeObserver(J(this,K,Sl).bind(this))),Ue(this,zi,[]),Ue(this,Li,!1),Ue(this,Xt,e=>{const t=e.currentTarget;if(J(this,K,Ln).call(this,t)){t.active=!0;const r=C(this,qt).get(t);r&&(r.active=!0),[...C(this,_e),...C(this,Le)].filter(o=>o!==t&&o!==r).forEach(o=>{J(this,K,Ln).call(this,o)&&(o.active=!1)}),C(this,Le).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),J(this,K,Cl).call(this)}disconnectedCallback(){super.disconnectedCallback(),C(this,Do).unobserve(this),J(this,K,An).call(this)}render(){return u`<div id="main"><div id="grid" role="tablist"><slot @slotchange="${J(this,K,Pl)}"></slot></div><uui-button popovertarget="popover-container" style="display:none" id="more-button" label="More" compact="compact"><uui-symbol-more></uui-symbol-more></uui-button></div><uui-popover-container id="popover-container" popover placement="bottom-end"><div id="hidden-tabs-container" role="tablist">${Hr(C(this,Le),e=>u`${e}`)}</div></uui-popover-container>`}},Bo=new WeakMap,_e=new WeakMap,Le=new WeakMap,qt=new WeakMap,Kt=new WeakMap,Do=new WeakMap,zi=new WeakMap,Li=new WeakMap,K=new WeakSet,Cl=async function(){_(this,"uui-button"),_(this,"uui-popover-container"),_(this,"uui-symbol-more"),await this.updateComplete,C(this,Do).observe(this._mainElement)},Sl=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==C(this,Bo)?J(this,K,Vo).call(this):J(this,K,zn).call(this,i[0].contentBoxSize[0].inlineSize)},An=function(){C(this,_e).forEach(i=>{i.removeEventListener("click",C(this,Xt)),C(this,zi).forEach(e=>e.disconnect())}),C(this,zi).length=0,C(this,Kt).length=0},Pl=function(){J(this,K,An).call(this),J(this,K,Al).call(this),C(this,_e).forEach(i=>{i.addEventListener("click",C(this,Xt));const e=new ResizeObserver(J(this,K,Vo).bind(this));e.observe(i),C(this,zi).push(e)})},Xt=new WeakMap,Vo=async function(){if(C(this,Li))return;Ai(this,Li,!0),requestAnimationFrame(()=>{Ai(this,Li,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;Ai(this,Bo,e);let t=0;for(let o=0;o<C(this,_e).length;o++)C(this,_e)[o].style.display="",t+=C(this,_e)[o].offsetWidth,C(this,Kt)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",J(this,K,zn).call(this,this._mainElement.offsetWidth)},Al=function(){Ai(this,_e,this._slottedNodes?this._slottedNodes:[]),J(this,K,Vo).call(this)},zn=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);C(this,Le).forEach(s=>{s.removeEventListener("click",C(this,Xt))}),Ai(this,Le,[]),C(this,qt).clear();let r=!1;const o=C(this,Kt).length;for(let s=0;s<o;s++){const a=C(this,Kt)[s],c=C(this,_e)[s];if(a<=(s===o-1?i:t))c.style.display="";else{const h=c.cloneNode(!0);h.addEventListener("click",C(this,Xt)),h.classList.add("hidden-tab"),h.style.display="",h.orientation=this.dropdownContentDirection,C(this,qt).set(h,c),C(this,qt).set(c,h),C(this,Le).push(h),c.style.display="none",c.active&&(r=!0)}}C(this,Le).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement.hidePopover()):this._moreButtonElement.style.display="",r?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},Ln=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},n.UUITabGroupElement.styles=[b`:host{min-width:0;display:flex;height:100%}#main{display:flex;justify-content:space-between;overflow:hidden}#grid{width:1fr;display:flex;height:100%;min-height:48px;overflow:hidden;text-wrap:nowrap;color:var(--uui-tab-text);gap:var(--uui-tab-group-gap,0)}#popover-container{--uui-tab-text:var(--uui-tab-group-dropdown-tab-text, unset);--uui-tab-text-hover:var(
|
|
1102
|
+
`],q([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",2),q([l({type:Boolean,attribute:"hide-value-label"})],n.UUISliderElement.prototype,"hideValueLabel",2),q([l({type:Number})],n.UUISliderElement.prototype,"min",2),q([l({type:Number})],n.UUISliderElement.prototype,"max",2),q([l({type:Number})],n.UUISliderElement.prototype,"step",1),q([l({type:String})],n.UUISliderElement.prototype,"value",1),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"readonly",2),q([l({type:String})],n.UUISliderElement.prototype,"label",2),q([S("#input")],n.UUISliderElement.prototype,"_input",2),q([S("#track")],n.UUISliderElement.prototype,"_track",2),q([y()],n.UUISliderElement.prototype,"_stepWidth",2),q([y()],n.UUISliderElement.prototype,"_steps",2),q([y()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=q([p("uui-slider")],n.UUISliderElement);var Gb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,$l=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Gb(e,t,o),o};n.UUISymbolExpandElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUISymbolExpandElement.styles=[b`:host{display:inline-flex;width:12px;vertical-align:middle}svg{transform:rotate(-90deg);transform-origin:50% 50%;transition:transform .1s cubic-bezier(.1,0,.9,1);width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],$l([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=$l([p("uui-symbol-expand")],n.UUISymbolExpandElement);var qb=Object.defineProperty,Kb=Object.getOwnPropertyDescriptor,Pn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&qb(e,t,o),o};n.UUISymbolFileThumbnailElement=class extends m{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),_(this,"uui-icon")}render(){return this.src?u`<img src="${this.src}" alt="${this.alt}">`:u`<uui-icon name="picture" .fallback="${Pc.strings[0]}"></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[b`:host{display:block;width:100%;height:100%}img{object-fit:contain;height:100%;width:100%}uui-icon{width:100%;height:100%;max-width:100%;display:flex;max-height:100%;justify-content:center;color:var(--uui-color-surface,#fff);background:var(--uui-color-surface-alt,#f3f3f5)}`],Pn([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),Pn([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=Pn([p("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var Xb=Object.defineProperty,Yb=Object.getOwnPropertyDescriptor,kl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Yb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Xb(e,t,o),o};n.UUISymbolFileElement=class extends m{constructor(){super(...arguments),this.type=""}render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round" id="icon"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg> ${this.type?u`<small id="file-type" class="uui-small">${this.type.toUpperCase()}</small>`:""}`}},n.UUISymbolFileElement.styles=[gt,b`:host{position:relative;display:block;box-sizing:border-box}#file-type{position:absolute;bottom:20%;left:12%;margin-left:calc(var(--uui-size-3,9px) * -1);padding:0 var(--uui-size-3,9px);font-weight:700;background-color:var(--uui-color-surface-alt,#f3f3f5);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:var(--uui-border-radius,3px)}#icon{width:100%;color:var(--uui-color-border-standalone,#c2c2c2)}`],kl([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=kl([p("uui-symbol-file")],n.UUISymbolFileElement);var Zb=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolFolderElement=class extends m{render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="0.6" stroke-linecap="round" stroke-linejoin="round" id="icon"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg>`}},n.UUISymbolFolderElement.styles=[b`:host{display:block;position:relative;box-sizing:border-box}#icon{width:100%;color:var(--uui-color-border-standalone,#c2c2c2)}`],n.UUISymbolFolderElement=Zb([p("uui-symbol-folder")],n.UUISymbolFolderElement);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,El=(i,e,t,r)=>{for(var o=r>1?void 0:r?Jb(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Qb(e,t,o),o};n.UUISymbolLockElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?v`<path d="M457.915 242.222H269.053l-.004-78.416c0-33.277-12.63-63.824-33.538-86.175-20.82-22.357-50.579-36.756-83.391-36.731-32.814-.024-62.57 14.375-83.391 36.731-20.915 22.351-33.541 52.897-33.547 86.175v103.859H96.19v-13.476l-35.656-35.656H96.19v-54.728c0-17.765 6.717-33.406 17.084-44.502 10.463-11.09 23.927-17.37 38.845-17.394 14.916.024 28.375 6.304 38.837 17.394 10.375 11.096 17.092 26.738 17.087 44.502v78.416h-26.189c-9.159 0-16.582 7.426-16.582 16.585v194.53c0 9.158 7.423 16.583 16.582 16.583h276.06c9.164 0 16.587-7.425 16.587-16.583v-194.53c.001-9.159-7.422-16.584-16.586-16.584z"></path>`:v`<path d="M404.84 246.573h-22.084l-.002-73.603c0-36.675-13.921-70.311-36.917-94.892-22.91-24.584-55.547-40.367-91.539-40.336-36.003-.031-68.643 15.752-91.55 40.336-23.001 24.582-36.918 58.217-36.925 94.892v73.603h-22.082c-9.16 0-16.585 7.421-16.585 16.583v194.531c0 9.158 7.425 16.585 16.585 16.585H404.84c9.162 0 16.586-7.427 16.586-16.585V263.156c0-9.161-7.424-16.583-16.586-16.583zm-218.013-73.602c0-21.167 8.012-39.893 20.468-53.219 12.552-13.316 28.896-20.982 47.003-21.007 18.095.025 34.438 7.685 46.987 21.007 12.455 13.326 20.467 32.052 20.467 53.219v73.603H186.827v-73.603z"></path>`}</svg>`}},n.UUISymbolLockElement.styles=[b`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],El([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=El([p("uui-symbol-lock")],n.UUISymbolLockElement);var em=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUISymbolMoreElement=class extends m{render(){return v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="17" cy="50" r="9"></circle><circle cx="50" cy="50" r="9"></circle><circle cx="83" cy="50" r="9"></circle></svg>`}},n.UUISymbolMoreElement.styles=[b`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}svg{fill:currentColor}`],n.UUISymbolMoreElement=em([p("uui-symbol-more")],n.UUISymbolMoreElement);var tm=Object.defineProperty,im=Object.getOwnPropertyDescriptor,xl=(i,e,t,r)=>{for(var o=r>1?void 0:r?im(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&tm(e,t,o),o};n.UUISymbolSortElement=class extends oi(m){constructor(){super(...arguments),this.descending=!1}render(){return u`<svg id="up" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m4 9 8 8 8-8"></path></svg>`}},n.UUISymbolSortElement.styles=[b`:host{position:relative;display:inline-block;width:.9em;height:1em;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.9em;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-8em}#up{transform:rotate(180deg);margin-top:-1.05em}#down{margin-top:-.55em}:host([active]) #up{margin-top:calc(-.8em - (.25em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.8em + (.25em * var(--uui-symbol-sort-hover,0)))}:host(:hover){--uui-symbol-sort-hover:1}:host(:not([active])) #down,:host(:not([active])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active]:not([descending])) #down{opacity:1}:host([active]:not([descending])) #up{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}:host([active][descending]) #up{opacity:1}:host([active][descending]) #down{opacity:calc(.25 * var(--uui-symbol-sort-hover,0))}`],xl([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=xl([p("uui-symbol-sort")],n.UUISymbolSortElement);var om=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return u`<slot></slot>`}},n.UUITableElement.styles=[b`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],n.UUITableElement=om([p("uui-table")],n.UUITableElement);var rm=Object.defineProperty,nm=Object.getOwnPropertyDescriptor,To=(i,e,t,r)=>{for(var o=r>1?void 0:r?nm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&rm(e,t,o),o};n.UUITableCellElement=class extends m{constructor(){super(...arguments),this.disableChildInteraction=!1,this.noPadding=!1,this.clipText=!1,this._observer=new ResizeObserver(()=>{this._detectOverflow()})}_detectOverflow(){this.scrollWidth>this.clientWidth?this.setAttribute("title",this.innerText):this.removeAttribute("title")}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect()}updated(e){super.updated(e),e.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return u`<slot @slotchange="${this._detectOverflow}"></slot>`}},n.UUITableCellElement.styles=[b`:host{position:relative;display:table-cell;height:var(--uui-table-cell-height,var(--uui-size-12,36px));padding:var(--uui-table-cell-padding,var(--uui-size-3,9px) var(--uui-size-5,15px));border-top:1px solid var(--uui-color-border,#d8d7d9);vertical-align:middle}:host([clip-text]){max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}:host([disable-child-interaction]) ::slotted(*){pointer-events:none}:host([disable-child-interaction])::after{content:'';position:absolute;inset:0}:host([no-padding]){padding:0}`],To([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),To([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),To([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=To([p("uui-table-cell")],n.UUITableCellElement);var sm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableColumnElement=class extends m{},n.UUITableColumnElement.styles=[b`:host{display:table-column}`],n.UUITableColumnElement=sm([p("uui-table-column")],n.UUITableColumnElement);var am=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,b`:host{border-top:none}`],n.UUITableHeadCellElement=am([p("uui-table-head-cell")],n.UUITableHeadCellElement);var lm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUITableHeadElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return u`<slot></slot>`}},n.UUITableHeadElement.styles=[b`:host{display:table-header-group;font-weight:700}`],n.UUITableHeadElement=lm([p("uui-table-head")],n.UUITableHeadElement);var um=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,Il=(i,e,t,r)=>{for(var o=r>1?void 0:r?cm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&um(e,t,o),o};n.UUITableRowElement=class extends Gi(yt(m)){constructor(){super();let e=!1;this.addEventListener("blur",()=>{e===!1&&this.style.setProperty("--uui-show-focus-outline","1"),e=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),e=!0}),this.addEventListener("mouseup",()=>{e=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(e){e.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(e=>{e.disableChildInteraction!==void 0&&(e.disableChildInteraction=this.selectOnly)})}render(){return u`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}},n.UUITableRowElement.styles=[b`:host{display:table-row;position:relative;outline-offset:-3px}:host([selectable]){cursor:pointer}:host(:focus){outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host([selected]){outline:2px solid var(--uui-table-row-color-selected,var(--uui-color-selected,#3544b1))}:host([selected]:focus){outline-color:var(--uui-color-focus,#3879ff)}`],Il([De({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=Il([p("uui-table-row")],n.UUITableRowElement);var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Gt=(i,e,t,r)=>{for(var o=r>1?void 0:r?dm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&hm(e,t,o),o};n.UUITabElement=class extends oi(me("",m)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(e){this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}render(){return this.href?u`<a id="button" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.rel||w(this.target==="_blank"?"noopener noreferrer":void 0))}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button type="button" id="button" ?disabled="${this.disabled}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUITabElement.styles=[b`:host{color:var(--uui-tab-text,var(--uui-color-interactive,#1b264f));font-family:inherit;width:fit-content}#button{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-height:var(--uui-size-12,36px);min-width:70px;padding:var(--uui-size-3,9px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px));border:none;font-size:inherit;background:0 0;color:inherit;cursor:pointer;font-family:inherit;text-decoration:none;line-height:normal}:host([orientation=vertical]) #button{min-height:var(--uui-size-14,42px);padding:var(--uui-size-2,6px) var(--uui-tab-padding-horizontal,var(--uui-size-5,15px))}:host(:not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([disabled])) #button:active{box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}:host([active]){color:var(--uui-tab-text-active,unset)}:host([disabled]) #button{color:var(--uui-color-disabled-contrast,#c4c4c4);cursor:default}#button::before{content:'';position:absolute;background-color:var(--uui-color-current,#f5c1bc);opacity:0}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0 0;height:0;width:calc(100% - 14px);bottom:0;transition:opacity linear 120ms,height ease-in-out 120ms}:host([active][orientation=horizontal]) #button::before{height:4px}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--uui-border-radius,3px) var(--uui-border-radius,3px) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity linear 120ms,width ease-in-out 120ms}:host([active][orientation=vertical]) #button::before{width:4px}#button:hover::before{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #button::before{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}slot[name=icon]::slotted(*){font-size:20px;margin-bottom:var(--uui-size-2,6px)}slot.label{text-align:center;display:flex;width:100%;flex-direction:column}:host([orientation=vertical]) slot.label{text-align:left}`],Gt([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),Gt([l({type:String})],n.UUITabElement.prototype,"href",2),Gt([l({type:String})],n.UUITabElement.prototype,"target",2),Gt([l({type:String})],n.UUITabElement.prototype,"rel",2),Gt([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=Gt([p("uui-tab")],n.UUITabElement);var pm=Object.defineProperty,bm=Object.getOwnPropertyDescriptor,Cl=i=>{throw TypeError(i)},Wt=(i,e,t,r)=>{for(var o=r>1?void 0:r?bm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&pm(e,t,o),o},An=(i,e,t)=>e.has(i)||Cl("Cannot "+t),C=(i,e,t)=>(An(i,e,"read from private field"),t?t.call(i):e.get(i)),Ue=(i,e,t)=>e.has(i)?Cl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Oi=(i,e,t,r)=>(An(i,e,"write to private field"),e.set(i,t),t),J=(i,e,t)=>(An(i,e,"access private method"),t),No,_e,Le,qt,Kt,Bo,Mi,Ti,K,Sl,Pl,zn,Al,Xt,Do,zl,Ln,On;n.UUITabGroupElement=class extends m{constructor(){super(...arguments),Ue(this,K),Ue(this,No,0),this.dropdownContentDirection="vertical",Ue(this,_e,[]),Ue(this,Le,[]),Ue(this,qt,new Map),Ue(this,Kt,[]),Ue(this,Bo,new ResizeObserver(J(this,K,Pl).bind(this))),Ue(this,Mi,[]),Ue(this,Ti,!1),Ue(this,Xt,e=>{const t=e.currentTarget;if(J(this,K,On).call(this,t)){t.active=!0;const r=C(this,qt).get(t);r&&(r.active=!0),[...C(this,_e),...C(this,Le)].filter(o=>o!==t&&o!==r).forEach(o=>{J(this,K,On).call(this,o)&&(o.active=!1)}),C(this,Le).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),J(this,K,Sl).call(this)}disconnectedCallback(){super.disconnectedCallback(),C(this,Bo).unobserve(this),J(this,K,zn).call(this)}render(){return u`<div id="main"><div id="grid" role="tablist"><slot @slotchange="${J(this,K,Al)}"></slot></div><uui-button popovertarget="popover-container" style="display:none" id="more-button" label="More" compact="compact"><uui-symbol-more></uui-symbol-more></uui-button></div><uui-popover-container id="popover-container" popover placement="bottom-end"><div id="hidden-tabs-container" role="tablist">${jr(C(this,Le),e=>u`${e}`)}</div></uui-popover-container>`}},No=new WeakMap,_e=new WeakMap,Le=new WeakMap,qt=new WeakMap,Kt=new WeakMap,Bo=new WeakMap,Mi=new WeakMap,Ti=new WeakMap,K=new WeakSet,Sl=async function(){_(this,"uui-button"),_(this,"uui-popover-container"),_(this,"uui-symbol-more"),await this.updateComplete,C(this,Bo).observe(this._mainElement)},Pl=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==C(this,No)?J(this,K,Do).call(this):J(this,K,Ln).call(this,i[0].contentBoxSize[0].inlineSize)},zn=function(){C(this,_e).forEach(i=>{i.removeEventListener("click",C(this,Xt)),C(this,Mi).forEach(e=>e.disconnect())}),C(this,Mi).length=0,C(this,Kt).length=0},Al=function(){J(this,K,zn).call(this),J(this,K,zl).call(this),C(this,_e).forEach(i=>{i.addEventListener("click",C(this,Xt));const e=new ResizeObserver(J(this,K,Do).bind(this));e.observe(i),C(this,Mi).push(e)})},Xt=new WeakMap,Do=async function(){if(C(this,Ti))return;Oi(this,Ti,!0),requestAnimationFrame(()=>{Oi(this,Ti,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;Oi(this,No,e);let t=0;for(let o=0;o<C(this,_e).length;o++)C(this,_e)[o].style.display="",t+=C(this,_e)[o].offsetWidth,C(this,Kt)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",J(this,K,Ln).call(this,this._mainElement.offsetWidth)},zl=function(){Oi(this,_e,this._slottedNodes?this._slottedNodes:[]),J(this,K,Do).call(this)},Ln=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);C(this,Le).forEach(s=>{s.removeEventListener("click",C(this,Xt))}),Oi(this,Le,[]),C(this,qt).clear();let r=!1;const o=C(this,Kt).length;for(let s=0;s<o;s++){const a=C(this,Kt)[s],c=C(this,_e)[s];if(a<=(s===o-1?i:t))c.style.display="";else{const h=c.cloneNode(!0);h.addEventListener("click",C(this,Xt)),h.classList.add("hidden-tab"),h.style.display="",h.orientation=this.dropdownContentDirection,C(this,qt).set(h,c),C(this,qt).set(c,h),C(this,Le).push(h),c.style.display="none",c.active&&(r=!0)}}C(this,Le).length===0?(this._moreButtonElement.style.display="none",this._popoverContainerElement.hidePopover()):this._moreButtonElement.style.display="",r?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside"),this.requestUpdate()},On=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},n.UUITabGroupElement.styles=[b`:host{min-width:0;display:flex;height:100%}#main{display:flex;justify-content:space-between;overflow:hidden}#grid{width:1fr;display:flex;height:100%;min-height:48px;overflow:hidden;text-wrap:nowrap;color:var(--uui-tab-text);gap:var(--uui-tab-group-gap,0)}#popover-container{--uui-tab-text:var(--uui-tab-group-dropdown-tab-text, unset);--uui-tab-text-hover:var(
|
|
1107
1103
|
--uui-tab-group-dropdown-tab-text-hover,
|
|
1108
1104
|
unset
|
|
1109
1105
|
);--uui-tab-text-active:var(
|
|
1110
1106
|
--uui-tab-group-dropdown-tab-text-active,
|
|
1111
1107
|
unset
|
|
1112
|
-
)}::slotted(:not(:last-of-type)){border-right:1px solid var(--uui-tab-divider,none)}.hidden-tab{width:100%}#hidden-tabs-container{width:fit-content;display:flex;flex-direction:column;background-color:var(--uui-tab-group-dropdown-background,var(--uui-color-surface,#fff));border-radius:var(--uui-border-radius,3px);box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23));overflow:hidden}:host([dropdown-direction=horizontal]) #hidden-tabs-container{flex-direction:row}#more-button{position:relative;--uui-button-contrast:var(--uui-tab-text);--uui-button-contrast-hover:var(--uui-tab-text-hover);--uui-button-background-color:transparent;--uui-button-background-color-hover:transparent}#more-button::before{content:'';position:absolute;bottom:0;width:100%;background-color:var(--uui-color-current,#f5c1bc);height:0;border-radius:3px 3px 0 0;opacity:0;transition:opacity ease-in 120ms,height ease-in 120ms}#more-button.active-inside::before{opacity:1;height:4px;transition:opacity 120ms,height ease-out 120ms}`],Wt([S("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),Wt([S("#popover-container")],n.UUITabGroupElement.prototype,"_popoverContainerElement",2),Wt([S("#main")],n.UUITabGroupElement.prototype,"_mainElement",2),Wt([De({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),Wt([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=Wt([p("uui-tab-group")],n.UUITabGroupElement);class
|
|
1108
|
+
)}::slotted(:not(:last-of-type)){border-right:1px solid var(--uui-tab-divider,none)}.hidden-tab{width:100%}#hidden-tabs-container{width:fit-content;display:flex;flex-direction:column;background-color:var(--uui-tab-group-dropdown-background,var(--uui-color-surface,#fff));border-radius:var(--uui-border-radius,3px);box-shadow:var(--uui-shadow-depth-3,0 10px 20px rgba(0,0,0,.19) ,0 6px 6px rgba(0,0,0,.23));overflow:hidden}:host([dropdown-direction=horizontal]) #hidden-tabs-container{flex-direction:row}#more-button{position:relative;--uui-button-contrast:var(--uui-tab-text);--uui-button-contrast-hover:var(--uui-tab-text-hover);--uui-button-background-color:transparent;--uui-button-background-color-hover:transparent}#more-button::before{content:'';position:absolute;bottom:0;width:100%;background-color:var(--uui-color-current,#f5c1bc);height:0;border-radius:3px 3px 0 0;opacity:0;transition:opacity ease-in 120ms,height ease-in 120ms}#more-button.active-inside::before{opacity:1;height:4px;transition:opacity 120ms,height ease-out 120ms}`],Wt([S("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),Wt([S("#popover-container")],n.UUITabGroupElement.prototype,"_popoverContainerElement",2),Wt([S("#main")],n.UUITabGroupElement.prototype,"_mainElement",2),Wt([De({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),Wt([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=Wt([p("uui-tab-group")],n.UUITabGroupElement);class mm extends P{}class vm extends P{}var gm=Object.defineProperty,fm=Object.getOwnPropertyDescriptor,Mn=(i,e,t,r)=>{for(var o=r>1?void 0:r?fm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&gm(e,t,o),o};n.UUITagElement=class extends m{constructor(){super(...arguments),this.color="default",this.look="primary"}render(){return u`<slot></slot>`}},n.UUITagElement.styles=[b`:host{display:inline-block;font-size:var(--uui-tag-font-size,var(--uui-type-small-size,12px));font-weight:700;line-height:1;padding:var(--uui-tag-padding,var(--uui-size-space-1,3px) calc(var(--uui-size-space-1,3px) + .5em));border-radius:100px;user-select:none;border-radius:var(--uui-tag-border-radius,var(--uui-size-4,12px));border:1px solid var(--uui-tag-border-color,transparent)}slot{display:block;align-content:center;margin:2px}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(
|
|
1113
1109
|
28,
|
|
1114
1110
|
35,
|
|
1115
1111
|
59
|
|
@@ -1125,6 +1121,6 @@
|
|
|
1125
1121
|
191,
|
|
1126
1122
|
33,
|
|
1127
1123
|
78
|
|
1128
|
-
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:transparent;color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:transparent;color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}`],
|
|
1129
|
-
</textarea>`}},n.UUITextareaElement.formAssociated=!0,n.UUITextareaElement.styles=[b`:host{position:relative}:host([error]) textarea,:host([error]) textarea[disabled]{border:1px solid var(--uui-color-invalid,#d42054)!important}:host(:not([pristine]):invalid) textarea,:host(:not([pristine])[internals-invalid]) textarea{border-color:var(--uui-color-invalid,#d42054)}:host([auto-height]) textarea{resize:none}.label{display:inline-block;margin-bottom:var(--uui-size-1,3px);font-weight:700}textarea[readonly]{border-color:var(--uui-textarea-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2));background-color:var(--uui-textarea-background-color-readonly,var(--uui-color-disabled,#f3f3f5))}textarea[disabled]{cursor:not-allowed;background-color:var(--uui-textarea-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-textarea-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}textarea{color:var(--uui-color-text,#060606);font-family:inherit;line-height:var(--uui-size-6,18px);box-sizing:border-box;min-width:100%;max-width:100%;font-size:inherit;padding:var(--uui-size-2,6px);border:1px solid var(--uui-textarea-border-color,var(--uui-color-border,#d8d7d9));border-radius:var(--uui-border-radius,3px);outline:0;min-height:var(--uui-textarea-min-height);max-height:var(--uui-textarea-max-height);background-color:var(--uui-textarea-background-color,var(--uui-color-surface,#fff))}:host(:focus) textarea,:host(:hover) textarea:not([readonly]):not([disabled]) :host(:focus-within) textarea{border-color:var(--uui-textarea-border-color,var(--uui-color-border-emphasis,#a1a1a1))}textarea:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}`],W([l()],n.UUITextareaElement.prototype,"placeholder",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"disabled",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"readonly",2),W([l({type:String})],n.UUITextareaElement.prototype,"name",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"error",2),W([l({type:Number})],n.UUITextareaElement.prototype,"minlength",2),W([l({attribute:"minlength-message"})],n.UUITextareaElement.prototype,"minlengthMessage",2),W([l({type:Number})],n.UUITextareaElement.prototype,"maxlength",2),W([l({attribute:"maxlength-message"})],n.UUITextareaElement.prototype,"maxlengthMessage",2),W([S("#textarea")],n.UUITextareaElement.prototype,"_textarea",2),W([l({type:Boolean,attribute:"auto-height",reflect:!0})],n.UUITextareaElement.prototype,"autoHeight",2),W([l({type:String})],n.UUITextareaElement.prototype,"label",2),W([l({type:Number})],n.UUITextareaElement.prototype,"rows",2),W([l({type:Number})],n.UUITextareaElement.prototype,"cols",2),W([l({type:String})],n.UUITextareaElement.prototype,"wrap",2),n.UUITextareaElement=W([p("uui-textarea")],n.UUITextareaElement);let be=class extends P{static{this.OPENING="opening"}static{this.OPENED="opened"}static{this.CLOSING="closing"}static{this.CLOSED="closed"}};var wm=Object.defineProperty,Um=Object.getOwnPropertyDescriptor,Yt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Um(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&wm(e,t,o),o};n.UUIToastNotificationElement=class extends m{constructor(){super(),this.color="",this._autoClose=null,this._onOpenTimerComplete=()=>{this._open&&(this.open=!1)},this._timer=null,this._pauseTimer=!1,this.isOpen=!1,this._open=!1,this._animate=!1,this._requestAnimationUpdate=0,this.addEventListener("keyup",e=>{e.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,e!==null?(this._timer===null?this._timer=new kc(this._onOpenTimerComplete,e):this._timer.setDuration(e),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):(this._timer?.destroy(),this._timer=null)}pauseAutoClose(){this._pauseTimer=!0,this._timer!==null&&this._timer.pause()}resumeAutoClose(){this._pauseTimer=!1,this._timer!==null&&this.isOpen===!0&&this._animate===!1&&this._timer.restart()}get open(){return this._open}set open(e){e===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),_(this,"uui-button"),_(this,"uui-icon")}_getAnimationDuration(){return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"),10)||480}_makeOpen(){this._open!==!0&&(this._open=!0,this.updateComplete.then(()=>{this._open===!0&&(cancelAnimationFrame(this._requestAnimationUpdate),this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!0,this.setAttribute("is-open",""),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,this.dispatchEvent(new be(be.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new be(be.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new be(be.CLOSING,{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented!==!0&&(this._open=!1,this._timer?.pause(),cancelAnimationFrame(this._requestAnimationUpdate),this.isOpen===!0&&(this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!1,this.removeAttribute("is-open"),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,requestAnimationFrame(()=>{this.style.height="0"}),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!1&&(this._animate=!1,this.dispatchEvent(new be(be.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return u`<div id="toast" class="${this._animate?"animate":""}"><div><div id="close"><uui-button .label="${"close"}" .color="${this.color}" .look="${this.color?"primary":"default"}" @click="${()=>this.open=!1}"><uui-icon name="remove" .fallback="${cr.strings[0]}"></uui-icon></uui-button></div><slot></slot></div></div>`}},n.UUIToastNotificationElement.styles=[vt,b`:host{--uui-toast-notification-margin:var(--uui-size-space-2,6px);position:relative;display:block;width:100%;max-width:400px;margin:0 var(--uui-toast-notification-margin);box-sizing:border-box;height:0;pointer-events:none;transition:height var(--uui-toast-notification-animation-duration,480ms) ease-in-out}:host([is-open]){pointer-events:all;transition-timing-function:cubic-bezier(.19,1,.22,1)}#toast{position:relative;display:block;padding:calc(var(--uui-toast-notification-margin) * .5) 0;width:100%;max-width:400px}#toast.animate{position:absolute}#toast>div{position:relative;display:block;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));background-color:var(--uui-color-surface,#fff);padding:var(--uui-size-layout-1,24px);padding-right:var(--uui-size-layout-1,24px);padding-left:var(--uui-size-layout-3,42px);border-radius:calc(var(--uui-border-radius,3px) * 2);opacity:0;transition:opacity var(--uui-toast-notification-animation-duration,480ms)}:host([is-open]) #toast>div{opacity:1}#close{float:right;margin-top:-6px;margin-left:var(--uui-size-space-1,3px);margin-bottom:-4px}#close>uui-button{--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}:host #toast>div{background-color:var(--uui-color-surface,#fff);color:var(--uui-color-text,#060606);border-color:var(--uui-color-surface,#fff)}:host([color=default]) #toast>div{background-color:var(--uui-color-default,#1b264f);color:var(--uui-color-default-contrast,#fff);border-color:var(--uui-color-default-standalone,#1c233b)}:host([color=positive]) #toast>div{background-color:var(--uui-color-positive,#0b8152);color:var(--uui-color-positive-contrast,#fff);border-color:var(--uui-color-positive-standalone,#0a7349)}:host([color=warning]) #toast>div{background-color:var(--uui-color-warning,#fbd142);color:var(--uui-color-warning-contrast,#000);border-color:var(--uui-color-warning-standalone,#a17700)}:host([color=danger]) #toast>div{background-color:var(--uui-color-danger,#d42054);color:var(--uui-color-danger-contrast,#fff);border-color:var(--uui-color-danger-standalone,#bf214e)}:host([color=invalid]) #toast>div{background-color:var(--uui-color-invalid,#d42054);color:var(--uui-color-invalid-contrast,#fff);border-color:var(--uui-color-invalid-standalone,#bf214e)}`],Yt([l({reflect:!0})],n.UUIToastNotificationElement.prototype,"color",2),Yt([l({type:Number})],n.UUIToastNotificationElement.prototype,"autoClose",1),Yt([S("#toast")],n.UUIToastNotificationElement.prototype,"_toastEl",2),Yt([y()],n.UUIToastNotificationElement.prototype,"_animate",2),Yt([l({type:Boolean,reflect:!0})],n.UUIToastNotificationElement.prototype,"open",1),n.UUIToastNotificationElement=Yt([p("uui-toast-notification")],n.UUIToastNotificationElement);var _m=Object.defineProperty,$m=Object.getOwnPropertyDescriptor,zl=(i,e,t,r)=>{for(var o=r>1?void 0:r?$m(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&_m(e,t,o),o};n.UUIToastNotificationContainerElement=class extends m{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{this._autoClosePause=!0,this._toasts?.forEach(e=>e.pauseAutoClose())},this.resumeAutoClose=()=>{this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,this._toasts?.forEach(e=>e.resumeAutoClose()))},this.onToastClosed=e=>{this.removeToast(e.target)},this._toasts=[],this.onSlotChanged=e=>{const t=[...this._toasts];this._toasts=e.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),t.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(be.CLOSED,this.onToastClosed),r.removeEventListener("mouseenter",this.pauseAutoClose),r.removeEventListener("mouseleave",this.resumeAutoClose),r.removeEventListener("focus",this.pauseAutoClose),r.removeEventListener("blur",this.resumeAutoClose)}),this._toasts.filter(r=>t.indexOf(r)===-1).forEach(r=>{r.addEventListener(be.CLOSED,this.onToastClosed),r.addEventListener("mouseenter",this.pauseAutoClose),r.addEventListener("mouseleave",this.resumeAutoClose),r.addEventListener("focus",this.pauseAutoClose),r.addEventListener("blur",this.resumeAutoClose),this._autoClose&&(r.autoClose=this._autoClose),this._autoClosePause===!0&&r.pauseAutoClose(),r.open=!0})}}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,this._toasts?.forEach(t=>t.autoClose=e)}removeToast(e){if(!e)e=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(e)===-1){console.warn("Toast-notification",e,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(e)}closeToast(e){let t=e;t||(t=this._toasts[this._toasts.length-1]),t.open=!1}render(){return u`<slot @slotchange="${this.onSlotChanged}"></slot>`}},n.UUIToastNotificationContainerElement.styles=[b`:host{position:absolute;overflow:hidden;max-width:100%;height:100%;pointer-events:none;box-sizing:border-box}slot{display:flex;flex-direction:column;align-items:end;height:100%;box-sizing:border-box;padding-top:var(--uui-size-space-1,3px);padding-bottom:var(--uui-size-space-1,3px)}:host([bottom-up]) slot{justify-content:end}:host([left-align]) slot{align-items:start}`],zl([l({type:Number,reflect:!0,attribute:"auto-close"})],n.UUIToastNotificationContainerElement.prototype,"_autoClose",2),n.UUIToastNotificationContainerElement=zl([p("uui-toast-notification-container")],n.UUIToastNotificationContainerElement);var km=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,Tn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Em(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&km(e,t,o),o};n.UUIToastNotificationLayoutElement=class extends m{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return u`<div id="message" class="uui-text"><h5 style="${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h5><slot></slot><slot id="actions" name="actions"></slot></div>`}},n.UUIToastNotificationLayoutElement.styles=[vt,b`#message{margin-bottom:calc(var(--uui-size-space-1,3px) * -1)}#message::after{content:'';display:block;clear:both}#actions{display:block;float:right;margin-top:var(--uui-size-space-4,12px);margin-bottom:calc(var(--uui-size-space-2,6px) * -1)}`],Tn([l({type:String})],n.UUIToastNotificationLayoutElement.prototype,"headline",2),Tn([y()],n.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIToastNotificationLayoutElement=Tn([p("uui-toast-notification-layout")],n.UUIToastNotificationLayoutElement);var xm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIToggleElement=class extends ne{constructor(){super("switch")}renderCheckbox(){return u`<div id="toggle"><div id="icon-checked">${qi}</div><div id="icon-unchecked">${cr}</div></div>`}},n.UUIToggleElement.formAssociated=!0,n.UUIToggleElement.styles=[...ne.styles,Fi,b`:host{--uui-toggle-size:18px;--uui-toggle-switch-width:calc(2 * var(--uui-toggle-size))}#toggle{position:relative;grid-area:'input';display:flex;align-items:center;flex-shrink:0;width:var(--uui-toggle-switch-width);height:var(--uui-toggle-size);border-radius:100px;background-color:var(--uui-toggle-background-color,var(--uui-color-border,#d8d7d9));border:1px solid var(--uui-toggle-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-toggle-size) * .6)}label:hover input:not([disabled])~#toggle{border-color:var(--uui-toggle-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-toggle-background-color-hover,var(--uui-color-border,#d8d7d9))}label:focus #toggle{border-color:var(--uui-toggle-border-color-focus,var(--uui-color-focus,#3879ff));background-color:var(--uui-toggle-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked~#toggle{background-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])~#toggle{background-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked~#toggle{background-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-checked,#icon-unchecked{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:color 120ms}#icon-checked{margin-left:-.5em;left:calc(var(--uui-toggle-size) * .5);color:var(--uui-color-interactive,#1b264f)}#icon-unchecked{margin-right:-.5em;right:calc(var(--uui-toggle-size) * .5);color:var(--uui-color-interactive,#1b264f)}input:checked~#toggle #icon-checked{color:var(--uui-color-selected-contrast,#fff)}#toggle::after{content:'';position:absolute;top:2px;left:2px;width:calc(var(--uui-toggle-size) - 4px);height:calc(var(--uui-toggle-size) - 4px);border-radius:100px;background-color:var(--uui-color-selected-contrast,#fff);transition:width 120ms ease,left 120ms ease,transform 120ms ease,background-color 120ms}input:checked~#toggle::after{left:calc(100% - 2px);transform:translateX(-100%)}input:focus~#toggle{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled],[readonly])) label:active #toggle::after{width:calc(1.06 * var(--uui-toggle-size))}:host([disabled]) #toggle{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}:host([disabled]) input:checked~#toggle{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #toggle::after{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #toggle #icon-unchecked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #toggle{animation:${Gi}}:host([disabled]) input:checked #toggle #icon-checked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host(:not([pristine]):invalid) #toggle,:host(:not([pristine]):invalid) label:hover #toggle,:host(:not([pristine])[internals-invalid]) #toggle,:host(:not([pristine])[internals-invalid]) label:hover #toggle{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],n.UUIToggleElement=xm([p("uui-toggle")],n.UUIToggleElement);var Im=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIVisuallyHiddenElement=class extends m{render(){return u`<slot></slot>`}},n.UUIVisuallyHiddenElement.styles=[b`:host(:not(:focus-within)){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`],n.UUIVisuallyHiddenElement=Im([p("uui-visually-hidden")],n.UUIVisuallyHiddenElement),n.ActiveMixin=lu,n.LabelMixin=cu,n.PopoverTargetMixin=Au,n.SelectOnlyMixin=gu,n.SelectableMixin=pu,n.Timer=_u,n.UUIBlinkAnimationValue=tu,n.UUIBlinkKeyframes=eu,n.UUIBooleanInputElement=ne,n.UUIBooleanInputEvent=nr,n.UUIButtonInlineCreateEvent=lr,n.UUICardEvent=si,n.UUIColorAreaEvent=_r,n.UUIColorPickerChangeEvent=di,n.UUIColorSliderEvent=zr,n.UUIColorSwatchesEvent=mi,n.UUIComboboxEvent=he,n.UUIComboboxListEvent=ce,n.UUICopyTextEvent=ri,n.UUIEvent=rr,n.UUIFileDropzoneEvent=fi,n.UUIFormControlEvent=Ye,n.UUIFormControlMixin=Uu,n.UUIHorizontalPulseAnimationValue=ou,n.UUIHorizontalPulseKeyframes=iu,n.UUIHorizontalShakeAnimationValue=nu,n.UUIHorizontalShakeKeyframes=ru,n.UUIIconHost=Fr,n.UUIIconRegistry=Gr,n.UUIIconRegistryEssential=za,n.UUIIconRequestEvent=yi,n.UUIInputEvent=wi,n.UUIInputLockEvent=qr,n.UUIInterfaceColorValues=Ou,n.UUIInterfaceHeadingValues=Mu,n.UUIInterfaceLookValues=Lu,n.UUIMenuItemEvent=Tt,n.UUIModalCloseEndEvent=Va,n.UUIModalCloseEvent=Bt,n.UUIModalElement=re,n.UUIModalOpenEvent=Da,n.UUIPaginationEvent=rt,n.UUIRadioEvent=Ei,n.UUIRadioGroupEvent=hn,n.UUIRefEvent=Ci,n.UUISelectEvent=En,n.UUISelectableEvent=ii,n.UUISliderEvent=Si,n.UUITabEvent=bm,n.UUITabGroupEvent=mm,n.UUITextStyles=vt,n.UUITextareaEvent=Mn,n.UUIToastNotificationEvent=be,n.clamp=Eu,n.defineElement=zu,n.demandCustomElement=$u,n.drag=ku,n.findAncestorByAttributeValue=ns,n.reverseNumberInRange=xu,n.slotHasContent=Cu,n.toHex=Iu});
|
|
1124
|
+
));--color-contrast:var(--uui-color-invalid-contrast,white)}:host{background-color:var(--uui-color-surface,#fff);color:var(--color-standalone);border-color:transparent}:host([look=primary]){background-color:var(--color);color:var(--color-contrast);border-color:transparent}:host([look=secondary]){background-color:var(--uui-color-surface-alt,#f3f3f5);color:var(--color-standalone);border-color:transparent}:host([look=outline]){background-color:transparent;color:var(--color-standalone);border-color:var(--color-standalone)}:host([look=placeholder]){border-style:dashed;background-color:transparent;color:var(--color-standalone);border-color:var(--uui-color-border-standalone,#c2c2c2)}`],Mn([l({reflect:!0})],n.UUITagElement.prototype,"color",2),Mn([l({reflect:!0})],n.UUITagElement.prototype,"look",2),n.UUITagElement=Mn([p("uui-tag")],n.UUITagElement);let Tn=class extends P{static{this.CHANGE="change"}static{this.INPUT="input"}constructor(e,t={}){super(e,{bubbles:!0,...t})}};var ym=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,W=(i,e,t,r)=>{for(var o=r>1?void 0:r?wm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&ym(e,t,o),o};n.UUITextareaElement=class extends ve(m,""){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage=e=>`${e} characters left`,this.maxlengthMessage=(e,t)=>`Maximum ${e} characters, ${t} too many.`,this.autoHeight=!1,this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("blur",()=>{this.style.setProperty("--uui-show-focus-outline","")}),this.addValidator("tooShort",()=>{const e=this.minlengthMessage;return typeof e=="function"?e(this.minlength?this.minlength-String(this.value).length:0):e},()=>!!this.minlength&&this.value.length<this.minlength),this.addValidator("tooLong",()=>{const e=this.maxlengthMessage;return typeof e=="function"?e(this.maxlength??0,String(this.value).length):e},()=>!!this.maxlength&&this.value.length>this.maxlength)}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this),this.autoHeight&&requestAnimationFrame(()=>{this.autoUpdateHeight()})}async focus(){await this.updateComplete,this._textarea.focus()}async blur(){await this.updateComplete,this._textarea.blur()}async click(){await this.updateComplete,this._textarea.click()}getFormElement(){return this._textarea}onInput(e){this.value=e.target.value,this.autoHeight&&this.autoUpdateHeight()}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Tn(Tn.CHANGE))}autoUpdateHeight(){const e=this.shadowRoot.host,t=this._textarea,r=e.scrollTop,o=getComputedStyle(e).height;e.style.display="block",e.style.height=o,t.style.height="auto",t.scrollHeight+2>t.clientHeight?t.style.height=t.scrollHeight+2+"px":t.scrollHeight+2<t.clientHeight&&t.style.removeProperty("height"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=r}render(){return u`<textarea id="textarea" rows="${w(this.rows)}" cols="${w(this.cols)}" .value="${this.value}" .name="${this.name}" wrap="${w(this.wrap)}" placeholder="${this.placeholder}" aria-label="${this.label}" .disabled="${this.disabled}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">
|
|
1125
|
+
</textarea>`}},n.UUITextareaElement.formAssociated=!0,n.UUITextareaElement.styles=[b`:host{position:relative}:host([error]) textarea,:host([error]) textarea[disabled]{border:1px solid var(--uui-color-invalid,#d42054)!important}:host(:not([pristine]):invalid) textarea,:host(:not([pristine])[internals-invalid]) textarea{border-color:var(--uui-color-invalid,#d42054)}:host([auto-height]) textarea{resize:none}.label{display:inline-block;margin-bottom:var(--uui-size-1,3px);font-weight:700}textarea[readonly]{border-color:var(--uui-textarea-border-color-readonly,var(--uui-color-disabled-standalone,#e2e2e2));background-color:var(--uui-textarea-background-color-readonly,var(--uui-color-disabled,#f3f3f5))}textarea[disabled]{cursor:not-allowed;background-color:var(--uui-textarea-background-color-disabled,var(--uui-color-disabled,#f3f3f5));border-color:var(--uui-textarea-border-color-disabled,var(--uui-color-disabled,#f3f3f5));color:var(--uui-color-disabled-contrast,#c4c4c4)}textarea{color:var(--uui-color-text,#060606);font-family:inherit;line-height:var(--uui-size-6,18px);box-sizing:border-box;min-width:100%;max-width:100%;font-size:inherit;padding:var(--uui-size-2,6px);border:1px solid var(--uui-textarea-border-color,var(--uui-color-border,#d8d7d9));border-radius:var(--uui-border-radius,3px);outline:0;min-height:var(--uui-textarea-min-height);max-height:var(--uui-textarea-max-height);background-color:var(--uui-textarea-background-color,var(--uui-color-surface,#fff))}:host(:focus) textarea,:host(:hover) textarea:not([readonly]):not([disabled]) :host(:focus-within) textarea{border-color:var(--uui-textarea-border-color,var(--uui-color-border-emphasis,#a1a1a1))}textarea:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}`],W([l()],n.UUITextareaElement.prototype,"placeholder",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"disabled",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"readonly",2),W([l({type:String})],n.UUITextareaElement.prototype,"name",2),W([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"error",2),W([l({type:Number})],n.UUITextareaElement.prototype,"minlength",2),W([l({attribute:"minlength-message"})],n.UUITextareaElement.prototype,"minlengthMessage",2),W([l({type:Number})],n.UUITextareaElement.prototype,"maxlength",2),W([l({attribute:"maxlength-message"})],n.UUITextareaElement.prototype,"maxlengthMessage",2),W([S("#textarea")],n.UUITextareaElement.prototype,"_textarea",2),W([l({type:Boolean,attribute:"auto-height",reflect:!0})],n.UUITextareaElement.prototype,"autoHeight",2),W([l({type:String})],n.UUITextareaElement.prototype,"label",2),W([l({type:Number})],n.UUITextareaElement.prototype,"rows",2),W([l({type:Number})],n.UUITextareaElement.prototype,"cols",2),W([l({type:String})],n.UUITextareaElement.prototype,"wrap",2),n.UUITextareaElement=W([p("uui-textarea")],n.UUITextareaElement);let be=class extends P{static{this.OPENING="opening"}static{this.OPENED="opened"}static{this.CLOSING="closing"}static{this.CLOSED="closed"}};var Um=Object.defineProperty,_m=Object.getOwnPropertyDescriptor,Yt=(i,e,t,r)=>{for(var o=r>1?void 0:r?_m(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Um(e,t,o),o};n.UUIToastNotificationElement=class extends m{constructor(){super(),this.color="",this._autoClose=null,this._onOpenTimerComplete=()=>{this._open&&(this.open=!1)},this._timer=null,this._pauseTimer=!1,this.isOpen=!1,this._open=!1,this._animate=!1,this._requestAnimationUpdate=0,this.addEventListener("keyup",e=>{e.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,e!==null?(this._timer===null?this._timer=new Ec(this._onOpenTimerComplete,e):this._timer.setDuration(e),this._pauseTimer===!1&&this.isOpen===!0&&this._animate===!1&&this._timer.start()):(this._timer?.destroy(),this._timer=null)}pauseAutoClose(){this._pauseTimer=!0,this._timer!==null&&this._timer.pause()}resumeAutoClose(){this._pauseTimer=!1,this._timer!==null&&this.isOpen===!0&&this._animate===!1&&this._timer.restart()}get open(){return this._open}set open(e){e===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),_(this,"uui-button"),_(this,"uui-icon")}_getAnimationDuration(){return parseInt(getComputedStyle(this).getPropertyValue("--uui-toast-notification-animation-duration"),10)||480}_makeOpen(){this._open!==!0&&(this._open=!0,this.updateComplete.then(()=>{this._open===!0&&(cancelAnimationFrame(this._requestAnimationUpdate),this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!0,this.setAttribute("is-open",""),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,this.dispatchEvent(new be(be.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new be(be.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new be(be.CLOSING,{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented!==!0&&(this._open=!1,this._timer?.pause(),cancelAnimationFrame(this._requestAnimationUpdate),this.isOpen===!0&&(this._requestAnimationUpdate=requestAnimationFrame(()=>{clearTimeout(this._animationTimeout),this.isOpen=!1,this.removeAttribute("is-open"),this.style.height=this._toastEl.getBoundingClientRect().height+"px",this._animate=!0,requestAnimationFrame(()=>{this.style.height="0"}),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!1&&(this._animate=!1,this.dispatchEvent(new be(be.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return u`<div id="toast" class="${this._animate?"animate":""}"><div><div id="close"><uui-button .label="${"close"}" .color="${this.color}" .look="${this.color?"primary":"default"}" @click="${()=>this.open=!1}"><uui-icon name="remove" .fallback="${ur.strings[0]}"></uui-icon></uui-button></div><slot></slot></div></div>`}},n.UUIToastNotificationElement.styles=[gt,b`:host{--uui-toast-notification-margin:var(--uui-size-space-2,6px);position:relative;display:block;width:100%;max-width:400px;margin:0 var(--uui-toast-notification-margin);box-sizing:border-box;height:0;pointer-events:none;transition:height var(--uui-toast-notification-animation-duration,480ms) ease-in-out}:host([is-open]){pointer-events:all;transition-timing-function:cubic-bezier(.19,1,.22,1)}#toast{position:relative;display:block;padding:calc(var(--uui-toast-notification-margin) * .5) 0;width:100%;max-width:400px}#toast.animate{position:absolute}#toast>div{position:relative;display:block;box-sizing:border-box;box-shadow:var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,.12) ,0 1px 2px rgba(0,0,0,.24));background-color:var(--uui-color-surface,#fff);padding:var(--uui-size-layout-1,24px);padding-right:var(--uui-size-layout-1,24px);padding-left:var(--uui-size-layout-3,42px);border-radius:calc(var(--uui-border-radius,3px) * 2);opacity:0;transition:opacity var(--uui-toast-notification-animation-duration,480ms)}:host([is-open]) #toast>div{opacity:1}#close{float:right;margin-top:-6px;margin-left:var(--uui-size-space-1,3px);margin-bottom:-4px}#close>uui-button{--uui-button-border-radius:50px 50px 50px 50px;--uui-button-padding-left-factor:1.5;--uui-button-padding-right-factor:1.5}:host #toast>div{background-color:var(--uui-color-surface,#fff);color:var(--uui-color-text,#060606);border-color:var(--uui-color-surface,#fff)}:host([color=default]) #toast>div{background-color:var(--uui-color-default,#1b264f);color:var(--uui-color-default-contrast,#fff);border-color:var(--uui-color-default-standalone,#1c233b)}:host([color=positive]) #toast>div{background-color:var(--uui-color-positive,#0b8152);color:var(--uui-color-positive-contrast,#fff);border-color:var(--uui-color-positive-standalone,#0a7349)}:host([color=warning]) #toast>div{background-color:var(--uui-color-warning,#fbd142);color:var(--uui-color-warning-contrast,#000);border-color:var(--uui-color-warning-standalone,#a17700)}:host([color=danger]) #toast>div{background-color:var(--uui-color-danger,#d42054);color:var(--uui-color-danger-contrast,#fff);border-color:var(--uui-color-danger-standalone,#bf214e)}:host([color=invalid]) #toast>div{background-color:var(--uui-color-invalid,#d42054);color:var(--uui-color-invalid-contrast,#fff);border-color:var(--uui-color-invalid-standalone,#bf214e)}`],Yt([l({reflect:!0})],n.UUIToastNotificationElement.prototype,"color",2),Yt([l({type:Number})],n.UUIToastNotificationElement.prototype,"autoClose",1),Yt([S("#toast")],n.UUIToastNotificationElement.prototype,"_toastEl",2),Yt([y()],n.UUIToastNotificationElement.prototype,"_animate",2),Yt([l({type:Boolean,reflect:!0})],n.UUIToastNotificationElement.prototype,"open",1),n.UUIToastNotificationElement=Yt([p("uui-toast-notification")],n.UUIToastNotificationElement);var $m=Object.defineProperty,km=Object.getOwnPropertyDescriptor,Ll=(i,e,t,r)=>{for(var o=r>1?void 0:r?km(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&$m(e,t,o),o};n.UUIToastNotificationContainerElement=class extends m{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{this._autoClosePause=!0,this._toasts?.forEach(e=>e.pauseAutoClose())},this.resumeAutoClose=()=>{this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,this._toasts?.forEach(e=>e.resumeAutoClose()))},this.onToastClosed=e=>{this.removeToast(e.target)},this._toasts=[],this.onSlotChanged=e=>{const t=[...this._toasts];this._toasts=e.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),t.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(be.CLOSED,this.onToastClosed),r.removeEventListener("mouseenter",this.pauseAutoClose),r.removeEventListener("mouseleave",this.resumeAutoClose),r.removeEventListener("focus",this.pauseAutoClose),r.removeEventListener("blur",this.resumeAutoClose)}),this._toasts.filter(r=>t.indexOf(r)===-1).forEach(r=>{r.addEventListener(be.CLOSED,this.onToastClosed),r.addEventListener("mouseenter",this.pauseAutoClose),r.addEventListener("mouseleave",this.resumeAutoClose),r.addEventListener("focus",this.pauseAutoClose),r.addEventListener("blur",this.resumeAutoClose),this._autoClose&&(r.autoClose=this._autoClose),this._autoClosePause===!0&&r.pauseAutoClose(),r.open=!0})}}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose=e,this._toasts?.forEach(t=>t.autoClose=e)}removeToast(e){if(!e)e=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(e)===-1){console.warn("Toast-notification",e,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(e)}closeToast(e){let t=e;t||(t=this._toasts[this._toasts.length-1]),t.open=!1}render(){return u`<slot @slotchange="${this.onSlotChanged}"></slot>`}},n.UUIToastNotificationContainerElement.styles=[b`:host{position:absolute;overflow:hidden;max-width:100%;height:100%;pointer-events:none;box-sizing:border-box}slot{display:flex;flex-direction:column;align-items:end;height:100%;box-sizing:border-box;padding-top:var(--uui-size-space-1,3px);padding-bottom:var(--uui-size-space-1,3px)}:host([bottom-up]) slot{justify-content:end}:host([left-align]) slot{align-items:start}`],Ll([l({type:Number,reflect:!0,attribute:"auto-close"})],n.UUIToastNotificationContainerElement.prototype,"_autoClose",2),n.UUIToastNotificationContainerElement=Ll([p("uui-toast-notification-container")],n.UUIToastNotificationContainerElement);var Em=Object.defineProperty,xm=Object.getOwnPropertyDescriptor,Nn=(i,e,t,r)=>{for(var o=r>1?void 0:r?xm(e,t):e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=(r?a(e,t,o):a(o))||o);return r&&o&&Em(e,t,o),o};n.UUIToastNotificationLayoutElement=class extends m{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=e=>{this._headlineSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}}render(){return u`<div id="message" class="uui-text"><h5 style="${this._headlineSlotHasContent||this.headline&&this.headline!==""?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h5><slot></slot><slot id="actions" name="actions"></slot></div>`}},n.UUIToastNotificationLayoutElement.styles=[gt,b`#message{margin-bottom:calc(var(--uui-size-space-1,3px) * -1)}#message::after{content:'';display:block;clear:both}#actions{display:block;float:right;margin-top:var(--uui-size-space-4,12px);margin-bottom:calc(var(--uui-size-space-2,6px) * -1)}`],Nn([l({type:String})],n.UUIToastNotificationLayoutElement.prototype,"headline",2),Nn([y()],n.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIToastNotificationLayoutElement=Nn([p("uui-toast-notification-layout")],n.UUIToastNotificationLayoutElement);var Im=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIToggleElement=class extends ae{constructor(){super("switch")}renderCheckbox(){return u`<div id="toggle"><div id="icon-checked">${Yi}</div><div id="icon-unchecked">${ur}</div></div>`}},n.UUIToggleElement.formAssociated=!0,n.UUIToggleElement.styles=[...ae.styles,qi,b`:host{--uui-toggle-size:18px;--uui-toggle-switch-width:calc(2 * var(--uui-toggle-size))}#toggle{position:relative;grid-area:'input';display:flex;align-items:center;flex-shrink:0;width:var(--uui-toggle-switch-width);height:var(--uui-toggle-size);border-radius:100px;background-color:var(--uui-toggle-background-color,var(--uui-color-border,#d8d7d9));border:1px solid var(--uui-toggle-border-color,var(--uui-color-border-standalone,#c2c2c2));font-size:calc(var(--uui-toggle-size) * .6)}label:hover input:not([disabled])~#toggle{border-color:var(--uui-toggle-border-color-hover,var(--uui-color-border-emphasis,#a1a1a1));background-color:var(--uui-toggle-background-color-hover,var(--uui-color-border,#d8d7d9))}label:focus #toggle{border-color:var(--uui-toggle-border-color-focus,var(--uui-color-focus,#3879ff));background-color:var(--uui-toggle-background-color-focus,var(--uui-color-surface-emphasis,#fafafa))}input:checked~#toggle{background-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])~#toggle{background-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked~#toggle{background-color:var(--uui-color-selected-emphasis,#4656c8)}#icon-checked,#icon-unchecked{position:absolute;vertical-align:middle;width:1em;height:1em;line-height:0;transition:color 120ms}#icon-checked{margin-left:-.5em;left:calc((var(--uui-toggle-size) + 1px) * .5);color:var(--uui-color-interactive,#1b264f)}#icon-unchecked{margin-right:-.5em;right:calc((var(--uui-toggle-size) + 1px) * .5);color:var(--uui-color-interactive,#1b264f)}input:checked~#toggle #icon-checked{color:var(--uui-color-selected-contrast,#fff)}#toggle::after{content:'';position:absolute;top:2px;left:2px;width:calc(var(--uui-toggle-size) - 4px);height:calc(var(--uui-toggle-size) - 4px);border-radius:100px;background-color:var(--uui-color-selected-contrast,#fff);transition:width 120ms ease,left 120ms ease,transform 120ms ease,background-color 120ms}input:checked~#toggle::after{left:calc(100% - 2px);transform:translateX(-100%)}input:focus~#toggle{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled],[readonly])) label:active #toggle::after{width:calc(1.06 * var(--uui-toggle-size))}:host([disabled]) #toggle{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}:host([disabled]) input:checked~#toggle{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #toggle::after{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #toggle #icon-unchecked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #toggle{animation:${Ki}}:host([disabled]) input:checked #toggle #icon-checked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host(:not([pristine]):invalid) #toggle,:host(:not([pristine]):invalid) label:hover #toggle,:host(:not([pristine])[internals-invalid]) #toggle,:host(:not([pristine])[internals-invalid]) label:hover #toggle{border:1px solid var(--uui-color-invalid-standalone,#bf214e)}`],n.UUIToggleElement=Im([p("uui-toggle")],n.UUIToggleElement);var Cm=(i,e,t,r)=>{for(var o=e,s=i.length-1,a;s>=0;s--)(a=i[s])&&(o=a(o)||o);return o};n.UUIVisuallyHiddenElement=class extends m{render(){return u`<slot></slot>`}},n.UUIVisuallyHiddenElement.styles=[b`:host(:not(:focus-within)){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`],n.UUIVisuallyHiddenElement=Cm([p("uui-visually-hidden")],n.UUIVisuallyHiddenElement),n.ActiveMixin=uu,n.LabelMixin=hu,n.PopoverTargetMixin=zu,n.SelectOnlyMixin=fu,n.SelectableMixin=bu,n.Timer=$u,n.UUIBlinkAnimationValue=iu,n.UUIBlinkKeyframes=tu,n.UUIBooleanInputElement=ae,n.UUIBooleanInputEvent=rr,n.UUIButtonInlineCreateEvent=ar,n.UUICardEvent=si,n.UUIColorAreaEvent=Ur,n.UUIColorPickerChangeEvent=di,n.UUIColorSliderEvent=Ar,n.UUIColorSwatchesEvent=mi,n.UUIComboboxEvent=de,n.UUIComboboxListEvent=he,n.UUICopyTextEvent=ri,n.UUIEvent=or,n.UUIFileDropzoneEvent=yi,n.UUIFormControlEvent=Ze,n.UUIFormControlMixin=_u,n.UUIHorizontalPulseAnimationValue=ru,n.UUIHorizontalPulseKeyframes=ou,n.UUIHorizontalShakeAnimationValue=su,n.UUIHorizontalShakeKeyframes=nu,n.UUIIconHost=Rr,n.UUIIconRegistry=Fr,n.UUIIconRegistryEssential=La,n.UUIIconRequestEvent=wi,n.UUIInputEvent=Ui,n.UUIInputLockEvent=Wr,n.UUIInterfaceColorValues=Mu,n.UUIInterfaceHeadingValues=Tu,n.UUIInterfaceLookValues=Ou,n.UUIMenuItemEvent=Nt,n.UUIModalCloseEndEvent=ja,n.UUIModalCloseEvent=Dt,n.UUIModalElement=se,n.UUIModalOpenEvent=Va,n.UUIPaginationEvent=nt,n.UUIRadioEvent=Ci,n.UUIRadioGroupEvent=dn,n.UUIRefEvent=Ai,n.UUISelectEvent=xn,n.UUISelectableEvent=ii,n.UUISliderEvent=zi,n.UUITabEvent=mm,n.UUITabGroupEvent=vm,n.UUITextStyles=gt,n.UUITextareaEvent=Tn,n.UUIToastNotificationEvent=be,n.clamp=xu,n.defineElement=Lu,n.demandCustomElement=ku,n.drag=Eu,n.findAncestorByAttributeValue=ss,n.reverseNumberInRange=Iu,n.slotHasContent=Su,n.toHex=Cu}));
|
|
1130
1126
|
//# sourceMappingURL=uui.min.js.map
|