@umbraco-ui/uui 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/uui.min.js +69 -69
- package/dist/uui.min.js.map +1 -1
- package/lib/index.umd.d.ts +1 -0
- package/package.json +10 -10
package/dist/uui.min.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(n,Ie){typeof exports=="object"&&typeof module<"u"?Ie(exports):typeof define=="function"&&define.amd?define(["exports"],Ie):(n=typeof globalThis<"u"?globalThis:n||self,Ie(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
|
|
5
|
+
*/const Ie=window,po=Ie.ShadowRoot&&(Ie.ShadyCSS===void 0||Ie.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bo=Symbol(),tn=new WeakMap;let on=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==bo)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(po&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=tn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&tn.set(t,e))}return e}toString(){return this.cssText}};const xe=i=>new on(typeof i=="string"?i:i+"",void 0,bo),p=(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 on(t,i,bo)},Ca=(i,e)=>{po?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const r=document.createElement("style"),o=Ie.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=t.cssText,i.appendChild(r)})},rn=po?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return xe(t)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var mo;const li=window,nn=li.trustedTypes,Sa=nn?nn.emptyScript:"",sn=li.reactiveElementPolyfillSupport,vo={toAttribute(i,e){switch(e){case Boolean:i=i?Sa: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}},an=(i,e)=>e!==i&&(e==e||i==i),go={attribute:!0,type:String,converter:vo,reflect:!1,hasChanged:an},fo="finalized";let et=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=go){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)||go}static finalize(){if(this.hasOwnProperty(fo))return!1;this[fo]=!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(rn(o))}else e!==void 0&&t.push(rn(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 Ca(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=go){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:vo).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),d=typeof a.converter=="function"?{fromAttribute:a.converter}:((r=a.converter)===null||r===void 0?void 0:r.fromAttribute)!==void 0?a.converter:vo;this._$El=s,this[s]=d.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,r){let o=!0;e!==void 0&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||an)(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){}};et[fo]=!0,et.elementProperties=new Map,et.elementStyles=[],et.shadowRootOptions={mode:"open"},sn?.({ReactiveElement:et}),((mo=li.reactiveElementVersions)!==null&&mo!==void 0?mo:li.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]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var yo;const ui=window,tt=ui.trustedTypes,ln=tt?tt.createPolicy("lit-html",{createHTML:i=>i}):void 0,ci="$lit$",pe=`lit$${(Math.random()+"").slice(9)}$`,_o="?"+pe,Pa=`<${_o}>`,Le=document,Lt=()=>Le.createComment(""),Tt=i=>i===null||typeof i!="object"&&typeof i!="function",un=Array.isArray,cn=i=>un(i)||typeof i?.[Symbol.iterator]=="function",wo=`[
|
|
14
|
+
\f\r]`,Nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dn=/-->/g,hn=/>/g,Te=RegExp(`>|${wo}(?:([^\\s"'>=/]+)(${wo}*=${wo}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pn=/'/g,bn=/"/g,mn=/^(?:script|style|textarea|title)$/i,vn=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),u=vn(1),_=vn(2),R=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),gn=new WeakMap,Ne=Le.createTreeWalker(Le,129,null,!1);function fn(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ln!==void 0?ln.createHTML(e):e}const yn=(i,e)=>{const t=i.length-1,r=[];let o,s=e===2?"<svg>":"",a=Nt;for(let d=0;d<t;d++){const c=i[d];let h,f,g=-1,y=0;for(;y<c.length&&(a.lastIndex=y,f=a.exec(c),f!==null);)y=a.lastIndex,a===Nt?f[1]==="!--"?a=dn:f[1]!==void 0?a=hn:f[2]!==void 0?(mn.test(f[2])&&(o=RegExp("</"+f[2],"g")),a=Te):f[3]!==void 0&&(a=Te):a===Te?f[0]===">"?(a=o??Nt,g=-1):f[1]===void 0?g=-2:(g=a.lastIndex-f[2].length,h=f[1],a=f[3]===void 0?Te:f[3]==='"'?bn:pn):a===bn||a===pn?a=Te:a===dn||a===hn?a=Nt:(a=Te,o=void 0);const $=a===Te&&i[d+1].startsWith("/>")?" ":"";s+=a===Nt?c+Pa:g>=0?(r.push(h),c.slice(0,g)+ci+c.slice(g)+pe+$):c+pe+(g===-2?(r.push(void 0),d):$)}return[fn(i,s+(i[t]||"<?>")+(e===2?"</svg>":"")),r]};let Uo=class Ia{constructor({strings:e,_$litType$:t},r){let o;this.parts=[];let s=0,a=0;const d=e.length-1,c=this.parts,[h,f]=yn(e,t);if(this.el=Ia.createElement(h,r),Ne.currentNode=this.el.content,t===2){const g=this.el.content,y=g.firstChild;y.remove(),g.append(...y.childNodes)}for(;(o=Ne.nextNode())!==null&&c.length<d;){if(o.nodeType===1){if(o.hasAttributes()){const g=[];for(const y of o.getAttributeNames())if(y.endsWith(ci)||y.startsWith(pe)){const $=f[a++];if(g.push(y),$!==void 0){const I=o.getAttribute($.toLowerCase()+ci).split(pe),S=/([.?@])?(.*)/.exec($);c.push({type:1,index:s,name:S[2],strings:I,ctor:S[1]==="."?wn:S[1]==="?"?Un:S[1]==="@"?En:Mt})}else c.push({type:6,index:s})}for(const y of g)o.removeAttribute(y)}if(mn.test(o.tagName)){const g=o.textContent.split(pe),y=g.length-1;if(y>0){o.textContent=tt?tt.emptyScript:"";for(let $=0;$<y;$++)o.append(g[$],Lt()),Ne.nextNode(),c.push({type:2,index:++s});o.append(g[y],Lt())}}}else if(o.nodeType===8)if(o.data===_o)c.push({type:2,index:s});else{let g=-1;for(;(g=o.data.indexOf(pe,g+1))!==-1;)c.push({type:7,index:s}),g+=pe.length-1}s++}}static createElement(e,t){const r=Le.createElement("template");return r.innerHTML=e,r}};function Me(i,e,t=i,r){var o,s,a,d;if(e===R)return e;let c=r!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[r]:t._$Cl;const h=Tt(e)?void 0:e._$litDirective$;return c?.constructor!==h&&((s=c?._$AO)===null||s===void 0||s.call(c,!1),h===void 0?c=void 0:(c=new h(i),c._$AT(i,t,r)),r!==void 0?((a=(d=t)._$Co)!==null&&a!==void 0?a:d._$Co=[])[r]=c:t._$Cl=c),c!==void 0&&(e=Me(i,c._$AS(i,e.values),c,r)),e}let _n=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:Le).importNode(r,!0);Ne.currentNode=s;let a=Ne.nextNode(),d=0,c=0,h=o[0];for(;h!==void 0;){if(d===h.index){let f;h.type===2?f=new di(a,a.nextSibling,this,e):h.type===1?f=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(f=new $n(a,this,e)),this._$AV.push(f),h=o[++c]}d!==h?.index&&(a=Ne.nextNode(),d++)}return Ne.currentNode=Le,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++}},di=class xa{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=Me(this,e,t),Tt(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==R&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):cn(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&&Tt(this._$AH)?this._$AA.nextSibling.data=e:this.$(Le.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=Uo.createElement(fn(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 _n(s,this),d=a.u(this.options);a.v(r),this.$(d),this._$AH=a}}_$AC(e){let t=gn.get(e.strings);return t===void 0&&gn.set(e.strings,t=new Uo(e)),t}T(e){un(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 xa(this.k(Lt()),this.k(Lt()),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))}},Mt=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=Me(this,e,t,0),a=!Tt(e)||e!==this._$AH&&e!==R,a&&(this._$AH=e);else{const d=e;let c,h;for(e=s[0],c=0;c<s.length-1;c++)h=Me(this,d[r+c],t,c),h===R&&(h=this._$AH[c]),a||(a=!Tt(h)||h!==this._$AH[c]),h===E?e=E:e!==E&&(e+=(h??"")+s[c+1]),this._$AH[c]=h}a&&!o&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},wn=class extends Mt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}};const Aa=tt?tt.emptyScript:"";let Un=class extends Mt{constructor(){super(...arguments),this.type=4}j(e){e&&e!==E?this.element.setAttribute(this.name,Aa):this.element.removeAttribute(this.name)}},En=class extends Mt{constructor(e,t,r,o,s){super(e,t,r,o,s),this.type=5}_$AI(e,t=this){var r;if((e=(r=Me(this,e,t,0))!==null&&r!==void 0?r:E)===R)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)}},$n=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){Me(this,e)}};const Oa={O:ci,P:pe,A:_o,C:1,M:yn,L:_n,R:cn,D:Me,I:di,V:Mt,H:Un,N:En,U:wn,F:$n},kn=ui.litHtmlPolyfillSupport;kn?.(Uo,di),((yo=ui.litHtmlVersions)!==null&&yo!==void 0?yo:ui.litHtmlVersions=[]).push("2.8.0");const za=(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 d=(o=t?.renderBefore)!==null&&o!==void 0?o:null;s._$litPart$=a=new di(e.insertBefore(Lt(),d),d,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
|
|
19
|
+
*/var Eo,$o;let m=class extends et{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=za(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 R}};m.finalized=!0,m._$litElement$=!0,(Eo=globalThis.litElementHydrateSupport)===null||Eo===void 0||Eo.call(globalThis,{LitElement:m});const In=globalThis.litElementPolyfillSupport;In?.({LitElement:m}),(($o=globalThis.litElementVersions)!==null&&$o!==void 0?$o: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 La=(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)}},Ta=(i,e,t)=>{e.constructor.createProperty(t,i)};function l(i){return(e,t)=>t!==void 0?Ta(i,e,t):La(i,e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/function v(i){return
|
|
27
|
+
*/function v(i){return l({...i,state:!0})}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const
|
|
31
|
+
*/const ko=({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(d){i(d,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
|
|
35
|
+
*/function C(i,e){return ko({descriptor:t=>{const r={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};if(e){const o=typeof t=="symbol"?Symbol():"__"+t;r.get=function(){var s,a;return this[o]===void 0&&(this[o]=(a=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(i))!==null&&a!==void 0?a:null),this[o]}}return r}})}/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
39
|
+
*/function Na(i){return ko({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 Io;const Ma=((Io=window.HTMLSlotElement)===null||Io===void 0?void 0:Io.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);function Ce(i){const{slot:e,selector:t}=i??{};return ko({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),d=a!=null?Ma(a,i):[];return t?d.filter(c=>c.matches(t)):d},enumerable:!0,configurable:!0})})}var Da=`.uui-text {
|
|
44
44
|
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
45
45
|
font-size: 15px;
|
|
46
46
|
line-height: calc(var(--uui-size-2,6px) * 4);
|
|
@@ -208,27 +208,27 @@
|
|
|
208
208
|
margin-top: var(--uui-size-layout-1,24px);
|
|
209
209
|
margin-bottom: var(--uui-size-layout-1,24px);
|
|
210
210
|
}
|
|
211
|
-
`;const Nr=Wt(du);d`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,Wt("uui-blink 0.9s infinite both"),d`@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}}`,Wt("pulse 0.8s ease-in-out infinite both"),d`@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)}}`,Wt("uui-horizontal-shake 600ms ease backwards");let ea=class extends Event{constructor(t,e={}){super(t,{...e}),this.detail=e.detail||{}}},ia=class extends ea{constructor(t,e={}){super(t,{bubbles:!0,...e})}};ia.VALID="valid",ia.INVALID="invalid";let oa=class extends ea{constructor(t,e={}){super(t,{bubbles:!0,cancelable:!0,...e})}};oa.SELECTED="selected",oa.DESELECTED="deselected";function p(i,t){return e=>{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,e,t)}}var pu=Object.defineProperty,bu=Object.getOwnPropertyDescriptor,vu=(i,t,e,r)=>{for(var o=r>1?void 0:r?bu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&pu(t,e,o),o};let vi=class extends b{render(){return l`<slot></slot>`}};vi.styles=[d`: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}`],vi=vu([p("uui-button-group")],vi);var gu=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,mu=(i,t,e,r)=>{for(var o=r>1?void 0:r?fu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&gu(t,e,o),o};let Mr=class extends vi{};Mr.styles=[...vi.styles,d`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(uui-button:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(uui-button:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(uui-button: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}`],Mr=mu([p("uui-action-bar")],Mr);var yu=Object.defineProperty,xu=Object.getOwnPropertyDescriptor,ao=(i,t,e,r)=>{for(var o=r>1?void 0:r?xu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&yu(t,e,o),o};let Pe=class extends b{constructor(){super(...arguments),this._avatarArray=[],this.limit=0}firstUpdated(){this._setAvatarArray()}_onSlotChange(){this._setAvatarArray(),this._updateAvatarVisibility()}_setAvatarArray(){this._avatarArray=this._avatarNodes?this._avatarNodes:[]}updated(t){t.has("limit")&&this._updateAvatarVisibility()}_updateAvatarVisibility(){this._avatarArray.forEach((t,e)=>{t.style.display=e<this.limit||this.limit===0?"":"none"})}_isLimitExceeded(){return this.limit!==0&&this._avatarArray.length>this.limit}render(){return l`<slot @slotchange="${this._onSlotChange}"></slot>${this._isLimitExceeded()?l`<small id="overflow-indication">+${this._avatarArray.length-this.limit}</small>`:""}`}};Pe.styles=[d`: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}`],ao([Ft({selector:"uui-avatar, [uui-avatar]",flatten:!0})],Pe.prototype,"_avatarNodes",2),ao([v()],Pe.prototype,"_avatarArray",2),ao([a({type:Number,attribute:!0})],Pe.prototype,"limit",2),Pe=ao([p("uui-avatar-group")],Pe);var _u=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,Ae=(i,t,e,r)=>{for(var o=r>1?void 0:r?wu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&_u(t,e,o),o};let qt=class extends b{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this._name="",this.initials=""}get name(){return this._name}set name(t){const e=this._name;this._name=t,this.initials=this.createInitials(this._name),this.requestUpdate("title",e)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(t){let e="";if(!t)return e;const r=t.match(/(\w+)/g);return r?.length?(e=r[0].substring(0,1),r.length>1&&(e+=r[r.length-1].substring(0,1)),e.toUpperCase()):e}renderImage(){return l`<img src="${this.imgSrc}" srcset="${this.imgSrcset}" alt="${this.initials}" title="${this.name}">`}render(){return l`${this.imgSrc?this.renderImage():""} ${this.imgSrc?"":this.initials}<slot></slot>`}};qt.styles=[d`: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%}`],Ae([a({type:Boolean,attribute:!0,reflect:!0})],qt.prototype,"overflow",2),Ae([a({type:String,attribute:"img-src"})],qt.prototype,"imgSrc",2),Ae([a({type:String,attribute:"img-srcset"})],qt.prototype,"imgSrcset",2),Ae([a({type:String,reflect:!0})],qt.prototype,"name",1),Ae([v()],qt.prototype,"initials",2),qt=Ae([p("uui-avatar")],qt);var $u=Object.defineProperty,ku=Object.getOwnPropertyDescriptor,lo=(i,t,e,r)=>{for(var o=r>1?void 0:r?ku(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&$u(t,e,o),o};let Oe=class extends b{constructor(){super(...arguments),this.color="default",this.look="primary",this.attention=!1}render(){return l`<slot></slot>`}};Oe.styles=[d`: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(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-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}}`],lo([a({reflect:!0})],Oe.prototype,"color",2),lo([a({reflect:!0})],Oe.prototype,"look",2),lo([a({type:Boolean,reflect:!0})],Oe.prototype,"attention",2),Oe=lo([p("uui-badge")],Oe);var Eu=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,Su=(i,t,e,r)=>{for(var o=r>1?void 0:r?Cu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Eu(t,e,o),o};const gi=i=>{class t extends i{constructor(){super(...arguments),this.active=!1}}return Su([a({type:Boolean,reflect:!0})],t.prototype,"active",2),t};var Pu=Object.defineProperty,Au=Object.getOwnPropertyDescriptor,ra=(i,t,e,r)=>{for(var o=r>1?void 0:r?Au(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Pu(t,e,o),o};const vt=(i,t)=>{class e extends t{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),this.label||console.warn(this.tagName+" needs a `label`",this)}labelSlotChanged(o){this._labelSlotHasContent=o.target.assignedNodes({flatten:!0}).length>0}renderLabel(){return l`${this._labelSlotHasContent===!1?l`<span class="label">${this.label}</span>`:""}<slot class="label" style="${this._labelSlotHasContent?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return ra([a({type:String})],e.prototype,"label",2),ra([v()],e.prototype,"_labelSlotHasContent",2),e};let Ou=class extends Event{constructor(t,e={}){super(t,{...e}),this.detail=e.detail||{}}},ze=class extends Ou{constructor(t,e={}){super(t,{bubbles:!0,cancelable:!0,...e})}};ze.SELECTED="selected",ze.DESELECTED="deselected";var zu=Object.defineProperty,Lu=Object.getOwnPropertyDescriptor,sa=(i,t,e,r)=>{for(var o=r>1?void 0:r?Lu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&zu(t,e,o),o};const Le=i=>{class t extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new ze(ze.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new ze(ze.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return sa([a({type:Boolean,reflect:!0})],t.prototype,"selectable",1),sa([a({type:Boolean,reflect:!0})],t.prototype,"selected",2),t};var Iu=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,Nu=(i,t,e,r)=>{for(var o=r>1?void 0:r?ju(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Iu(t,e,o),o};const uo=i=>{class t 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 Nu([a({type:Boolean,reflect:!0,attribute:"select-only"})],t.prototype,"selectOnly",1),t};let na=class extends Event{constructor(t,e={}){super(t,{...e}),this.detail=e.detail||{}}},Ie=class extends na{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Ie.VALID="valid",Ie.INVALID="invalid";let aa=class extends na{constructor(t,e={}){super(t,{bubbles:!0,cancelable:!0,...e})}};aa.SELECTED="selected",aa.DESELECTED="deselected";var Mu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,ce=(i,t,e,r)=>{for(var o=r>1?void 0:r?Du(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Mu(t,e,o),o};const gt=i=>{class t extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,s){const n={flagKey:r,getMessageMethod:o,checkMethod:s};return this._validators.push(n),n}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const s in o.validity)s!=="valid"&&o.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new Ie(Ie.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new Ie(Ie.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){this._form?.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this._validityState}get validationMessage(){return this._internals?.validationMessage}}return t.formAssociated=!0,ce([a({type:String})],t.prototype,"name",2),ce([a()],t.prototype,"value",1),ce([a({type:Boolean,reflect:!0})],t.prototype,"pristine",2),ce([a({type:Boolean,reflect:!0})],t.prototype,"required",2),ce([a({type:String,attribute:"required-message"})],t.prototype,"requiredMessage",2),ce([a({type:Boolean,reflect:!0})],t.prototype,"error",2),ce([a({type:String,attribute:"error-message"})],t.prototype,"errorMessage",2),t},Tu=(i,t,e)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(t)&&r.getAttribute(t)===e,s=r.querySelector(`[${t}="${e}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${t}="${e}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};var Hu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Bu=(i,t,e,r)=>{for(var o=r>1?void 0:r?Vu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Hu(t,e,o),o},la=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},ua=(i,t,e)=>(la(i,t,"read from private field"),e?e.call(i):t.get(i)),ca=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ru=(i,t,e,r)=>(la(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e);const Uu=i=>{var t,e;class r extends i{constructor(...s){super(...s),ca(this,t,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const n=Tu(this,"id",this.popoverContainerElement);n&&(ua(this,t)?n.hidePopover():n.showPopover())},ca(this,e,n=>{requestAnimationFrame(()=>{Ru(this,t,n.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",ua(this,e))}}return t=new WeakMap,e=new WeakMap,Bu([a({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};let O=class extends Event{constructor(t,e={}){super(t,{...e}),this.detail=e.detail||{}}},je=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};je.VALID="valid",je.INVALID="invalid";let Kt=class extends O{constructor(t,e={}){super(t,{bubbles:!0,cancelable:!0,...e})}};Kt.SELECTED="selected",Kt.DESELECTED="deselected";let Dr=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Dr.CHANGE="change";var Gu=Object.defineProperty,Wu=Object.getOwnPropertyDescriptor,co=(i,t,e,r)=>{for(var o=r>1?void 0:r?Wu(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Gu(t,e,o),o};let At=class extends gt(vt("",b)){constructor(t="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=t,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(t){const e=this._value;this._value=t,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._checked&&this.name!==""?this._value:null),this.requestUpdate("value",e)}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,this._internals.setFormValue(this._checked&&this.name!==""?this._value?this._value:"on":null),this.requestUpdate("checked",e)}getFormElement(){return this._input}_onKeypress(t){t.key=="Enter"&&this.submit()}hasValue(){return this.checked}formResetCallback(){super.formResetCallback(),this.checked=this.hasAttribute("checked")}firstUpdated(t){super.firstUpdated(t);const e=this.shadowRoot?.querySelector("label");let r=!1;this._input.addEventListener("blur",()=>{r===!1&&this.style.setProperty("--uui-show-focus-outline","1"),r=!1}),e.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),r=!0}),e.addEventListener("mouseup",()=>{r=!1})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(t){t.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new Dr(Dr.CHANGE))}render(){return l`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled}" .checked="${this.checked}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}};At.styles=[d`:host{display:inline-block}label{cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}input{position:absolute;height:0;width:0;margin-top:-4px}: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{opacity:.5}`],co([a({type:String,attribute:"label-position",reflect:!0})],At.prototype,"labelPosition",2),co([a({type:Boolean})],At.prototype,"checked",1),co([a({type:Boolean,reflect:!0})],At.prototype,"disabled",2),co([S("#input")],At.prototype,"_input",2);/**
|
|
211
|
+
`;const hi=xe(Da),ja=p`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,Ba=xe("uui-blink 0.9s infinite both"),Va=p`@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}}`,Ha=xe("pulse 0.8s ease-in-out infinite both"),Ra=p`@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)}}`,Fa=xe("uui-horizontal-shake 600ms ease backwards");let xo=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},De=class extends xo{constructor(e,t={}){super(e,{bubbles:!0,...t})}};De.VALID="valid",De.INVALID="invalid";let je=class extends xo{constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};je.SELECTED="selected",je.DESELECTED="deselected";var Ga=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,qa=(i,e,t,r)=>{for(var o=r>1?void 0:r?Wa(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&&Ga(e,t,o),o};const Ka=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return qa([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var Xa=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,xn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ya(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&&Xa(e,t,o),o};const Za=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),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?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return xn([l({type:String})],t.prototype,"label",2),xn([v()],t.prototype,"_labelSlotHasContent",2),t};var Qa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,Cn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ja(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&&Qa(e,t,o),o};const el=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new je(je.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new je(je.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Cn([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Cn([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var tl=Object.defineProperty,il=Object.getOwnPropertyDescriptor,ol=(i,e,t,r)=>{for(var o=r>1?void 0:r?il(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&&tl(e,t,o),o};const rl=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 ol([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};var nl=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,Be=(i,e,t,r)=>{for(var o=r>1?void 0:r?sl(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&&nl(e,t,o),o};const al=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,s){const a={flagKey:r,getMessageMethod:o,checkMethod:s};return this._validators.push(a),a}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const s in o.validity)s!=="valid"&&o.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new De(De.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new De(De.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){this._form?.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this._validityState}get validationMessage(){return this._internals?.validationMessage}}return e.formAssociated=!0,Be([l({type:String})],e.prototype,"name",2),Be([l()],e.prototype,"value",1),Be([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),Be([l({type:Boolean,reflect:!0})],e.prototype,"required",2),Be([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),Be([l({type:Boolean,reflect:!0})],e.prototype,"error",2),Be([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e};let ll=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 ul=(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)},cl=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,d=s.left+a.scrollX,c=s.top+a.scrollY;let h;o instanceof TouchEvent?h=o.touches[0]:h=o;const f=h.pageX-d,g=h.pageY-c;e?.onMove&&e.onMove(f,g)}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)},dl=(i,e,t)=>Math.min(Math.max(i,e),t),hl=(i,e,t)=>t+e-i,pl=i=>{const e=Math.round(i).toString(16);return e.length===1?`0${e}`:e},Sn=(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 bl(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}var ml=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,gl=(i,e,t,r)=>{for(var o=r>1?void 0:r?vl(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&&ml(e,t,o),o},Pn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},An=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),On=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},fl=(i,e,t,r)=>(Pn(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const yl=i=>{var e,t;class r extends i{constructor(...s){super(...s),On(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const a=Sn(this,"id",this.popoverContainerElement);a&&(An(this,e)?a.hidePopover():a.showPopover())},On(this,t,a=>{requestAnimationFrame(()=>{fl(this,e,a.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",An(this,t))}}return e=new WeakMap,t=new WeakMap,gl([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};function _l(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 wl=["default","primary","secondary","outline","placeholder"],Ul=["default","positive","warning","danger"],El=["h1","h2","h3","h4","h5","h6"];function b(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 $l=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Il=(i,e,t,r)=>{for(var o=r>1?void 0:r?kl(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&&$l(e,t,o),o};n.UUIButtonGroupElement=class extends m{render(){return u`<slot></slot>`}},n.UUIButtonGroupElement.styles=[p`: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=Il([b("uui-button-group")],n.UUIButtonGroupElement);var xl=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,Sl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Cl(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&&xl(e,t,o),o};n.UUIActionBarElement=class extends n.UUIButtonGroupElement{},n.UUIActionBarElement.styles=[...n.UUIButtonGroupElement.styles,p`::slotted(*){--uui-button-padding-left-factor:0.5;--uui-button-padding-right-factor:0.5}::slotted(uui-button:first-child){--uui-button-border-radius:50px 0 0 50px;--uui-button-padding-left-factor:2}::slotted(uui-button:last-child){--uui-button-border-radius:0 50px 50px 0;--uui-button-padding-right-factor:2}::slotted(uui-button: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=Sl([b("uui-action-bar")],n.UUIActionBarElement);var Pl=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,pi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Al(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&&Pl(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=[p`: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}`],pi([Ce({selector:"uui-avatar, [uui-avatar]",flatten:!0})],n.UUIAvatarGroupElement.prototype,"_avatarNodes",2),pi([v()],n.UUIAvatarGroupElement.prototype,"_avatarArray",2),pi([l({type:Number,attribute:!0})],n.UUIAvatarGroupElement.prototype,"limit",2),n.UUIAvatarGroupElement=pi([b("uui-avatar-group")],n.UUIAvatarGroupElement);var Ol=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,it=(i,e,t,r)=>{for(var o=r>1?void 0:r?zl(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&&Ol(e,t,o),o};n.UUIAvatarElement=class extends m{constructor(){super(...arguments),this.overflow=!0,this.imgSrc="",this.imgSrcset="",this._name="",this.initials=""}get name(){return this._name}set name(e){const t=this._name;this._name=e,this.initials=this.createInitials(this._name),this.requestUpdate("title",t)}connectedCallback(){super.connectedCallback(),this.name||console.warn(this.tagName+" needs a `name`",this)}createInitials(e){let t="";if(!e)return t;const r=e.match(/(\w+)/g);return r?.length?(t=r[0].substring(0,1),r.length>1&&(t+=r[r.length-1].substring(0,1)),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=[p`: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%}`],it([l({type:Boolean,attribute:!0,reflect:!0})],n.UUIAvatarElement.prototype,"overflow",2),it([l({type:String,attribute:"img-src"})],n.UUIAvatarElement.prototype,"imgSrc",2),it([l({type:String,attribute:"img-srcset"})],n.UUIAvatarElement.prototype,"imgSrcset",2),it([l({type:String,reflect:!0})],n.UUIAvatarElement.prototype,"name",1),it([v()],n.UUIAvatarElement.prototype,"initials",2),n.UUIAvatarElement=it([b("uui-avatar")],n.UUIAvatarElement);var Ll=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,bi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Tl(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&&Ll(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=[p`: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(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-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}}`],bi([l({reflect:!0})],n.UUIBadgeElement.prototype,"color",2),bi([l({reflect:!0})],n.UUIBadgeElement.prototype,"look",2),bi([l({type:Boolean,reflect:!0})],n.UUIBadgeElement.prototype,"attention",2),n.UUIBadgeElement=bi([b("uui-badge")],n.UUIBadgeElement);var Nl=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Dl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ml(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&&Nl(e,t,o),o};const Dt=i=>{class e extends i{constructor(){super(...arguments),this.active=!1}}return Dl([l({type:Boolean,reflect:!0})],e.prototype,"active",2),e};var jl=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,zn=(i,e,t,r)=>{for(var o=r>1?void 0:r?Bl(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&&jl(e,t,o),o};const ie=(i,e)=>{class t extends e{constructor(){super(...arguments),this._labelSlotHasContent=!1}connectedCallback(){super.connectedCallback(),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?"":"visibility: hidden"}" name="${i||""}" @slotchange="${this.labelSlotChanged}"></slot>`}}return zn([l({type:String})],t.prototype,"label",2),zn([v()],t.prototype,"_labelSlotHasContent",2),t};let Vl=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},ot=class extends Vl{constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};ot.SELECTED="selected",ot.DESELECTED="deselected";var Hl=Object.defineProperty,Rl=Object.getOwnPropertyDescriptor,Ln=(i,e,t,r)=>{for(var o=r>1?void 0:r?Rl(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&&Hl(e,t,o),o};const rt=i=>{class e extends i{constructor(...r){super(...r),this._selectable=!1,this.deselectable=!0,this.selected=!1,this.selectableTarget=this,this.handleSelectKeydown=o=>{if(this.selectableTarget===this){if(o.key!==" "&&o.key!=="Enter")return;this._toggleSelect()}},this.addEventListener("click",this._handleClick),this.addEventListener("keydown",this.handleSelectKeydown)}get selectable(){return this._selectable}set selectable(r){const o=this._selectable;this._selectable=r,this.selectableTarget||this.setAttribute("tabindex",`${r?"0":"-1"}`),this.requestUpdate("selectable",o)}_select(){if(!this.selectable)return;const r=new ot(ot.SELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!0)}_deselect(){if(!this.deselectable)return;const r=new ot(ot.DESELECTED);this.dispatchEvent(r),!r.defaultPrevented&&(this.selected=!1)}_handleClick(r){r.composedPath().indexOf(this.selectableTarget)!==-1&&this._toggleSelect()}_toggleSelect(){this.selectable&&(this.deselectable===!1?this._select():this.selected?this._deselect():this._select())}}return Ln([l({type:Boolean,reflect:!0})],e.prototype,"selectable",1),Ln([l({type:Boolean,reflect:!0})],e.prototype,"selected",2),e};var Fl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Wl=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gl(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&&Fl(e,t,o),o};const mi=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 Wl([l({type:Boolean,reflect:!0,attribute:"select-only"})],e.prototype,"selectOnly",1),e};let Tn=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},nt=class extends Tn{constructor(e,t={}){super(e,{bubbles:!0,...t})}};nt.VALID="valid",nt.INVALID="invalid";let Nn=class extends Tn{constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};Nn.SELECTED="selected",Nn.DESELECTED="deselected";var ql=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,Ve=(i,e,t,r)=>{for(var o=r>1?void 0:r?Kl(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&&ql(e,t,o),o};const oe=i=>{class e extends i{constructor(...r){super(...r),this.name="",this._validityState={},this.pristine=!0,this.required=!1,this.requiredMessage="This field is required",this.error=!1,this.errorMessage="This field is invalid",this._value="",this._form=null,this._validators=[],this._formCtrlElements=[],this._onFormSubmit=()=>{this.pristine=!1},this._internals=this.attachInternals(),this.addValidator("valueMissing",()=>this.requiredMessage,()=>this.hasAttribute("required")&&this.hasValue()===!1),this.addValidator("customError",()=>this.errorMessage,()=>this.error),this.addEventListener("blur",()=>{this.pristine=!1})}get value(){return this._value}set value(r){const o=this._value;this._value=r,"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",o)}hasValue(){return this.value!==""}disconnectedCallback(){super.disconnectedCallback(),this._removeFormListeners()}_removeFormListeners(){this._form&&this._form.removeEventListener("submit",this._onFormSubmit)}addValidator(r,o,s){const a={flagKey:r,getMessageMethod:o,checkMethod:s};return this._validators.push(a),a}removeValidator(r){const o=this._validators.indexOf(r);o!==-1&&this._validators.splice(o,1)}addFormControlElement(r){this._formCtrlElements.push(r)}setCustomValidity(r){this._customValidityObject&&this.removeValidator(this._customValidityObject),r!=null&&r!==""&&(this._customValidityObject=this.addValidator("customError",()=>r,()=>!0)),this._runValidators()}_runValidators(){this._validityState={},this._formCtrlElements.forEach(o=>{for(const s in o.validity)s!=="valid"&&o.validity[s]&&(this._validityState[s]=!0,this._internals.setValidity(this._validityState,o.validationMessage,o))}),this._validators.forEach(o=>{o.checkMethod()&&(this._validityState[o.flagKey]=!0,this._internals.setValidity(this._validityState,o.getMessageMethod(),this.getFormElement()))});const r=Object.values(this._validityState).includes(!0);this._validityState.valid=!r,r?this.dispatchEvent(new nt(nt.INVALID)):(this._internals.setValidity({}),this.dispatchEvent(new nt(nt.VALID)))}updated(r){super.updated(r),this._runValidators()}submit(){this._form?.requestSubmit()}formAssociatedCallback(){this._removeFormListeners(),this._form=this._internals.form,this._form&&(this._form.hasAttribute("submit-invalid")&&(this.pristine=!1),this._form.addEventListener("submit",this._onFormSubmit))}formResetCallback(){this.pristine=!0,this.value=this.getAttribute("value")||""}checkValidity(){for(const r in this._formCtrlElements)if(this._formCtrlElements[r].checkValidity()===!1)return!1;return this._internals?.checkValidity()}get validity(){return this._validityState}get validationMessage(){return this._internals?.validationMessage}}return e.formAssociated=!0,Ve([l({type:String})],e.prototype,"name",2),Ve([l()],e.prototype,"value",1),Ve([l({type:Boolean,reflect:!0})],e.prototype,"pristine",2),Ve([l({type:Boolean,reflect:!0})],e.prototype,"required",2),Ve([l({type:String,attribute:"required-message"})],e.prototype,"requiredMessage",2),Ve([l({type:Boolean,reflect:!0})],e.prototype,"error",2),Ve([l({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),e},Xl=(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 Yl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,Ql=(i,e,t,r)=>{for(var o=r>1?void 0:r?Zl(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&&Yl(e,t,o),o},Mn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Dn=(i,e,t)=>(Mn(i,e,"read from private field"),t?t.call(i):e.get(i)),jn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Jl=(i,e,t,r)=>(Mn(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t);const eu=i=>{var e,t;class r extends i{constructor(...s){super(...s),jn(this,e,!1),this._togglePopover=()=>{if(!this.popoverContainerElement)return;const a=Xl(this,"id",this.popoverContainerElement);a&&(Dn(this,e)?a.hidePopover():a.showPopover())},jn(this,t,a=>{requestAnimationFrame(()=>{Jl(this,e,a.detail.newState==="open")})}),this.addEventListener("uui-popover-before-toggle",Dn(this,t))}}return e=new WeakMap,t=new WeakMap,Ql([l({type:String,attribute:"popovertarget"})],r.prototype,"popoverContainerElement",2),r};let P=class extends Event{constructor(e,t={}){super(e,{...t}),this.detail=t.detail||{}}},st=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};st.VALID="valid",st.INVALID="invalid";let Se=class extends P{constructor(e,t={}){super(e,{bubbles:!0,cancelable:!0,...t})}};Se.SELECTED="selected",Se.DESELECTED="deselected";let vi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};vi.CHANGE="change";var tu=Object.defineProperty,iu=Object.getOwnPropertyDescriptor,gi=(i,e,t,r)=>{for(var o=r>1?void 0:r?iu(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&&tu(e,t,o),o};let re=class extends oe(ie("",m)){constructor(e="checkbox"){super(),this.labelPosition="right",this._checked=!1,this.disabled=!1,this._value===""&&(this._value="on"),this.inputRole=e,this.addEventListener("keypress",this._onKeypress)}get value(){return this._value}set value(e){const t=this._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}_onKeypress(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})}focus(){this._input.focus()}click(){this._input.click()}_onInputChange(e){e.stopPropagation(),this.pristine=!1,this.checked=this._input.checked,this.dispatchEvent(new vi(vi.CHANGE))}render(){return u`<label><input id="input" type="checkbox" @change="${this._onInputChange}" .disabled="${this.disabled}" .checked="${this.checked}" aria-checked="${this.checked?"true":"false"}" aria-label="${this.label}" role="${this.inputRole}"> ${this.renderCheckbox()} ${this.renderLabel()}</label>`}};re.styles=[p`:host{display:inline-block}label{cursor:pointer;user-select:none;display:flex;flex-wrap:nowrap;align-items:center;justify-items:center;gap:var(--uui-size-3,9px)}input{position:absolute;height:0;width:0;margin-top:-4px}: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{opacity:.5}`],gi([l({type:String,attribute:"label-position",reflect:!0})],re.prototype,"labelPosition",2),gi([l({type:Boolean})],re.prototype,"checked",1),gi([l({type:Boolean,reflect:!0})],re.prototype,"disabled",2),gi([C("#input")],re.prototype,"_input",2);/**
|
|
212
212
|
* @license
|
|
213
213
|
* Copyright 2020 Google LLC
|
|
214
214
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
215
|
-
*/const
|
|
215
|
+
*/const Bn=Symbol.for(""),ou=i=>{if(i?.r===Bn)return i?._$litStatic$},Vn=i=>({_$litStatic$:i,r:Bn}),Hn=new Map,ru=i=>(e,...t)=>{const r=t.length;let o,s;const a=[],d=[];let c,h=0,f=!1;for(;h<r;){for(c=e[h];h<r&&(s=t[h],(o=ou(s))!==void 0);)c+=o+e[++h],f=!0;h!==r&&d.push(s),a.push(c),h++}if(h===r&&a.push(e[r]),f){const g=a.join("$$lit$$");(e=Hn.get(g))===void 0&&(a.raw=a,Hn.set(g,e=a)),t=d}return i(e,...t)},Rn=ru(u);var nu=Object.defineProperty,su=Object.getOwnPropertyDescriptor,He=(i,e,t,r)=>{for(var o=r>1?void 0:r?su(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&&nu(e,t,o),o};function Co(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=Co(e.target)},this._headerSlotHasContent=!1,this._headerSlotChanged=e=>{this._headerSlotHasContent=Co(e.target)},this._headerActionsSlotHasContent=!1,this._headerActionsSlotChanged=e=>{this._headerActionsSlotHasContent=Co(e.target)}}set headlineVariant(e){this._headlineVariantTag=e}get headlineVariant(){return this._headlineVariantTag}renderHeader(){return Rn`<div
|
|
216
216
|
id="header"
|
|
217
217
|
class="uui-text"
|
|
218
218
|
style=${this._headerSlotHasContent||this._headlineSlotHasContent||this._headerActionsSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
219
|
-
<${
|
|
219
|
+
<${Vn(this._headlineVariantTag)}
|
|
220
220
|
id="headline"
|
|
221
221
|
class="uui-h5"
|
|
222
222
|
style=${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}>
|
|
223
223
|
${this.headline}
|
|
224
224
|
<slot name="headline" @slotchange=${this._headlineSlotChanged}></slot>
|
|
225
|
-
</${
|
|
225
|
+
</${Vn(this._headlineVariantTag)}>
|
|
226
226
|
<slot name="header" @slotchange=${this._headerSlotChanged}></slot>
|
|
227
227
|
<slot name="header-actions" @slotchange=${this._headerActionsSlotChanged}></slot>
|
|
228
|
-
</div>`}render(){return
|
|
228
|
+
</div>`}render(){return Rn`
|
|
229
229
|
${this.renderHeader()}
|
|
230
230
|
<slot></slot>
|
|
231
|
-
`}}
|
|
231
|
+
`}},n.UUIBoxElement.styles=[hi,p`
|
|
232
232
|
:host {
|
|
233
233
|
display: block;
|
|
234
234
|
box-shadow: var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,0.12) , 0 1px 2px rgba(0,0,0,0.24));
|
|
@@ -255,34 +255,34 @@
|
|
|
255
255
|
display: block;
|
|
256
256
|
margin-left: auto;
|
|
257
257
|
}
|
|
258
|
-
`],
|
|
258
|
+
`],He([l({type:String})],n.UUIBoxElement.prototype,"headline",2),He([l({attribute:"headline-variant"})],n.UUIBoxElement.prototype,"headlineVariant",1),He([v()],n.UUIBoxElement.prototype,"_headlineVariantTag",2),He([v()],n.UUIBoxElement.prototype,"_headlineSlotHasContent",2),He([v()],n.UUIBoxElement.prototype,"_headerSlotHasContent",2),He([v()],n.UUIBoxElement.prototype,"_headerActionsSlotHasContent",2),n.UUIBoxElement=He([b("uui-box")],n.UUIBoxElement);var au=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,So=(i,e,t,r)=>{for(var o=r>1?void 0:r?lu(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&&au(e,t,o),o};n.UUIBreadcrumbItemElement=class extends m{constructor(){super(...arguments),this.href="#",this.lastItem=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem")}renderLinkAndSeparator(){return u`<a id="link" href="${this.href}"><slot></slot></a><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=[p`: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}#link{cursor:pointer}`],So([l()],n.UUIBreadcrumbItemElement.prototype,"href",2),So([l({type:Boolean,attribute:"last-item"})],n.UUIBreadcrumbItemElement.prototype,"lastItem",2),n.UUIBreadcrumbItemElement=So([b("uui-breadcrumb-item")],n.UUIBreadcrumbItemElement);var uu=Object.defineProperty,cu=Object.getOwnPropertyDescriptor,Fn=(i,e,t,r)=>{for(var o=r>1?void 0:r?cu(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&&uu(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=[p`: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}`],Fn([Ce({flatten:!0,selector:"uui-breadcrumb-item, [uui-breadcrumb-item], [role=listitem]"})],n.UUIBreadcrumbsElement.prototype,"slotNodes",2),n.UUIBreadcrumbsElement=Fn([b("uui-breadcrumbs")],n.UUIBreadcrumbsElement);const du=p`@keyframes uui-blink{0%,100%{opacity:.5}50%{opacity:1}}`,hu=xe("uui-blink 0.9s infinite both"),pu=p`@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}}`;xe("pulse 0.8s ease-in-out infinite both");const fi=p`@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)}}`,yi=xe("uui-horizontal-shake 600ms ease backwards");/**
|
|
259
259
|
* @license
|
|
260
260
|
* Copyright 2017 Google LLC
|
|
261
261
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
262
|
-
*/const
|
|
262
|
+
*/const Q={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},at=i=>(...e)=>({_$litDirective$:i,values:e});let lt=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)}};/**
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright 2018 Google LLC
|
|
265
265
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
-
*/const
|
|
266
|
+
*/const Gn="important",bu=" !"+Gn,ne=at(class extends lt{constructor(i){var e;if(super(i),i.type!==Q.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(bu);r.includes("-")||s?t.setProperty(r,s?o.slice(0,-11):o,s?Gn:""):t[r]=o}}return R}});/**
|
|
267
267
|
* @license
|
|
268
268
|
* Copyright 2018 Google LLC
|
|
269
269
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
270
|
-
*/const w=i=>i??_;let Vr=class extends O{constructor(t,e={}){super(t,{bubbles:!0,composed:!0,...e})}};Vr.CLICK="click";var rc=Object.defineProperty,sc=Object.getOwnPropertyDescriptor,Te=(i,t,e,r)=>{for(var o=r>1?void 0:r?sc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&rc(t,e,o),o},nc=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Br=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},vo=(i,t,e)=>(nc(i,t,"access private method"),e),go,Rr,Ur,fa,Gr,ma;let Xt=class extends b{constructor(){super(...arguments),Br(this,go),Br(this,Ur),Br(this,Gr),this._position=0,this.vertical=!1}_onMouseMove(t){this._position=(this.vertical?t.offsetY:t.offsetX)-5}_handleClick(t){t.preventDefault(),t.stopImmediatePropagation(),t.target?.blur?.(),this.dispatchEvent(new Vr(Vr.CLICK))}render(){return this.href?vo(this,Ur,fa).call(this):vo(this,Gr,ma).call(this)}};go=new WeakSet,Rr=function(){return l`<div id="plus" style="${ft({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>`},Ur=new WeakSet,fa=function(){return l`<a id="button-wrapper" @mousemove="${this._onMouseMove}" href="${w(this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}" aria-label="${this.label?this.label:"create new element"}">${vo(this,go,Rr).call(this)}</a>`},Gr=new WeakSet,ma=function(){return l`<button id="button-wrapper" @mousemove="${this._onMouseMove}" @click="${this._handleClick}" aria-label="${this.label?this.label:"create new element"}">${vo(this,go,Rr).call(this)}</button>`},Xt.styles=[tc,d`: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:${ec};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)}`],Te([v()],Xt.prototype,"_position",2),Te([a({type:String})],Xt.prototype,"label",2),Te([a({type:Boolean,reflect:!0})],Xt.prototype,"vertical",2),Te([a({type:String})],Xt.prototype,"href",2),Te([a({type:String})],Xt.prototype,"target",2),Xt=Te([p("uui-button-inline-create")],Xt);let ac=class{constructor(t,e){this._callback=t,this._timerId=null,this._remaining=null,this._onComplete=()=>{this._remaining=null,this._callback()},this.setDuration(e)}setDuration(t){this._duration=t,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 x=(i,t,e=`This element has to be present for ${i.nodeName} to work appropriate.`)=>{customElements.get(t)||console.warn(`%c ${i.nodeName} requires ${t} element to be registered!`,"font-weight: bold;",e,i)},ya=(i,t)=>{function e(o){const s=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,c=s.left+n.scrollX,u=s.top+n.scrollY;let h;o instanceof TouchEvent?h=o.touches[0]:h=o;const f=h.pageX-c,g=h.pageY-u;t?.onMove&&t.onMove(f,g)}function r(){document.removeEventListener("pointermove",e),document.removeEventListener("pointerup",r),t?.onStop&&t.onStop()}document.addEventListener("pointermove",e,{passive:!0}),document.addEventListener("pointerup",r),t?.initialEvent&&e(t.initialEvent)},A=(i,t,e)=>Math.min(Math.max(i,t),e),xa=(i,t,e)=>e+t-i,lc=(i,t,e)=>{let r=i;for(;r!==null;){const o=r instanceof HTMLElement&&r.hasAttribute(t)&&r.getAttribute(t)===e,s=r.querySelector(`[${t}="${e}"]`)!==null;if(o)return r;if(s)return r.querySelector(`[${t}="${e}"]`);r=r.parentElement||r.parentNode||r.host||null}return null};function uc(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}const fo=y`<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>`,cc=y`<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>`,hc=y`<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>`,dc=y`<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>`,Wr=y`<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>`,pc=y`<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>`,bc=y`<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>`,vc=y`<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>`,gc=y`<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 fc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,mt=(i,t,e,r)=>{for(var o=r>1?void 0:r?mc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&fc(t,e,o),o};let tt=class extends gt(vt("",Uu(b))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}_onHostClick(t){if(this.disabled){t.preventDefault(),t.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(t){super.updated(t),t.has("state")&&(clearTimeout(this._resetStateTimeout),(this.state==="success"||this.state==="failed")&&(this._resetStateTimeout=setTimeout(()=>this.state=void 0,2e3)))}renderState(){let t;switch(this.state){case"waiting":x(this,"uui-loader-circle"),t=l`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":x(this,"uui-icon"),t=l`<uui-icon name="check" .fallback="${fo.strings[0]}"></uui-icon>`;break;case"failed":x(this,"uui-icon"),t=l`<uui-icon name="wrong" .fallback="${gc.strings[0]}"></uui-icon>`;break;default:return _}return l`<div id="state">${t}</div>`}render(){return this.href?l`<a id="button" aria-label="${this.label}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:l`<button id="button" ?disabled="${this.disabled}" aria-label="${this.label}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}};tt.styles=[po,d`: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:normal;display:block;transition:opacity 120ms}: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}a:not([href]):active,button[disabled]:active{animation:${bo}}#icon-check,#icon-wrong{display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}: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(28, 35, 59));--color-emphasis:var(--uui-color-default-emphasis,#3544b1);--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]) #button{--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-emphasis:var(--uui-color-positive-emphasis,rgb(13, 155, 98));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]) #button{--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-emphasis:var(--uui-color-warning-emphasis,rgb(251, 224, 101));--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]) #button{--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-emphasis:var(--uui-color-danger-emphasis,rgb(226, 60, 107));--color-contrast:var(--uui-color-danger-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][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))}`],mt([a({type:String,reflect:!0})],tt.prototype,"type",2),mt([a({type:Boolean,reflect:!0})],tt.prototype,"disabled",2),mt([a({reflect:!0})],tt.prototype,"look",2),mt([a({reflect:!0})],tt.prototype,"color",2),mt([a({type:Boolean,reflect:!0})],tt.prototype,"compact",2),mt([a({type:String,reflect:!0})],tt.prototype,"state",2),mt([a({type:String})],tt.prototype,"href",2),mt([a({type:String})],tt.prototype,"target",2),mt([S("#button")],tt.prototype,"_button",2),tt=mt([p("uui-button")],tt);let fi=class extends O{};fi.OPEN="open";var yc=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,mi=(i,t,e,r)=>{for(var o=r>1?void 0:r?xc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&yc(t,e,o),o};let F=class extends uo(Le(b)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(t){this.disabled||(t.stopPropagation(),this.dispatchEvent(new fi(fi.OPEN)))}handleOpenKeydown(t){this.disabled||t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new fi(fi.OPEN)))}render(){return l`<slot></slot>`}};F.styles=[d`: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(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(*) *{outline-color:var(--uui-color-focus,#3879ff)}:host(: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)}: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-danger,#d42054);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([selectable])::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-card-border-width) * -1);width:calc(100% + calc(var(--uui-card-border-width) * 2));height:calc(100% + calc(var(--uui-card-border-width) * 2));box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-card-border-width));transition:opacity .1s ease-out;opacity:0}:host([selectable]:hover)::after{opacity:.33}:host([selectable][selected]:hover)::after{opacity:.66}:host([selectable][selected])::after{opacity:1}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}a{text-decoration:none;color:inherit}`],mi([a({type:Boolean,reflect:!0,attribute:"disabled"})],F.prototype,"disabled",2),mi([a({type:Boolean,reflect:!0})],F.prototype,"error",2),mi([a({type:String})],F.prototype,"href",2),mi([a({type:String})],F.prototype,"target",2),F=mi([p("uui-card")],F);var _c=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,mo=(i,t,e,r)=>{for(var o=r>1?void 0:r?wc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&_c(t,e,o),o},$c=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},_a=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},wa=(i,t,e)=>($c(i,t,"access private method"),e),Fr,$a,qr,ka;let He=class extends F{constructor(){super(...arguments),_a(this,Fr),_a(this,qr),this.name=""}render(){return l`<div id="portrait" style="${ft({backgroundColor:this.background})}"><slot></slot></div>${this.href?wa(this,qr,ka).call(this):wa(this,Fr,$a).call(this)}<slot name="tag"></slot><slot name="actions"></slot>`}};Fr=new WeakSet,$a=function(){return l`<button id="open-part" tabindex="${this.disabled?_:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><strong>${this.name}</strong><small>${this.description}</small></button>`},qr=new WeakSet,ka=function(){return l`<a id="open-part" tabindex="${this.disabled?_:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}"><strong>${this.name}</strong><small>${this.description}</small></a>`},He.styles=[...F.styles,d`:host{flex-direction:column;justify-content:flex-start}:host(:hover) #info{color:var(--uui-color-interactive-emphasis,#3544b1)}#portrait{background-color:var(--uui-color-surface-alt,#f3f3f5);display:flex;justify-content:center;min-height:150px;max-height:150px}slot:not([name])::slotted(*){align-self:center;font-size:var(--uui-size-8,24px);border-radius:var(--uui-border-radius,3px);object-fit:cover;max-width:100%;max-height:100%}#open-part{text-align:left;background-color:var(--uui-color-surface,#fff);cursor:pointer;color:var(--uui-color-interactive,#1b264f);border:none;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px);display:flex;flex-direction:column;line-height:var(--uui-size-6,18px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover strong{text-decoration:underline}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}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}: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}`],mo([a({type:String})],He.prototype,"name",2),mo([a({type:String})],He.prototype,"description",2),mo([a({type:String,attribute:"background"})],He.prototype,"background",2),He=mo([p("uui-card-block-type")],He);var kc=Object.defineProperty,Ec=Object.getOwnPropertyDescriptor,Kr=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ec(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&kc(t,e,o),o},Cc=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Ea=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ca=(i,t,e)=>(Cc(i,t,"access private method"),e),Xr,Sa,Yr,Pa;let yi=class extends F{constructor(){super(...arguments),Ea(this,Xr),Ea(this,Yr),this.name="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}_onSlotIconChange(t){this._iconSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return x(this,"uui-icon"),l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return l`${this.href?Ca(this,Yr,Pa).call(this):Ca(this,Xr,Sa).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}};Xr=new WeakSet,Sa=function(){return l`<div id="open-part" tabindex="${this.disabled?_:0}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></div>`},Yr=new WeakSet,Pa=function(){return l`<a id="open-part" tabindex="${this.disabled?_:0}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></a>`},yi.styles=[...F.styles,d`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px) var(--uui-size-4,12px)}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))}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer}:host([disabled]) #open-part{pointer-events:none}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}#name{margin-top:4px}`],Kr([a({type:String})],yi.prototype,"name",2),Kr([v()],yi.prototype,"_iconSlotHasContent",2),yi=Kr([p("uui-card-content-node")],yi);var Sc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,yo=(i,t,e,r)=>{for(var o=r>1?void 0:r?Pc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Sc(t,e,o),o},Ac=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Aa=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Oa=(i,t,e)=>(Ac(i,t,"access private method"),e),Zr,za,Qr,La;let Ve=class extends F{constructor(){super(...arguments),Aa(this,Zr),Aa(this,Qr),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),x(this,"uui-symbol-folder"),x(this,"uui-symbol-file")}queryPreviews(t){this.hasPreview=t.composedPath()[0].assignedElements({flatten:!0}).length>0}renderMedia(){return this.hasPreview===!0?"":this.fileExt===""?l`<uui-symbol-folder id="folder-symbol"></uui-symbol-folder>`:l`<uui-symbol-file id="file-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return l`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?Oa(this,Qr,La).call(this):Oa(this,Zr,za).call(this)}<div id="select-border"></div><slot name="tag"></slot><slot name="actions"></slot>`}};Zr=new WeakSet,za=function(){return l`<button id="open-part" tabindex="${this.disabled?_:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></button>`},Qr=new WeakSet,La=function(){return l`<a id="open-part" tabindex="${this.disabled?_:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},Ve.styles=[...F.styles,d`#file-symbol,#folder-symbol{align-self:center;margin:var(--uui-size-14,42px);width:80%}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])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%}#open-part{position:absolute;bottom:0;width:100%;background-color:var(--uui-color-surface,#fff);color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);display:flex;justify-content:flex-start;align-items:center;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}: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}`],yo([a({type:String})],Ve.prototype,"name",2),yo([a({type:String,attribute:"file-ext"})],Ve.prototype,"fileExt",2),yo([v()],Ve.prototype,"hasPreview",2),Ve=yo([p("uui-card-media")],Ve);var Oc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,Jr=(i,t,e,r)=>{for(var o=r>1?void 0:r?zc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Oc(t,e,o),o},Lc=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Ia=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},ja=(i,t,e)=>(Lc(i,t,"access private method"),e),ts,Na,es,Ma;let xi=class extends F{constructor(){super(...arguments),Ia(this,ts),Ia(this,es),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=t=>{this._avatarSlotHasContent=uc(t.target)}}connectedCallback(){super.connectedCallback(),x(this,"uui-avatar")}render(){return l`${this._avatarSlotHasContent?_:l`<uui-avatar id="avatar" name="${this.name}" size="m"></uui-avatar>`}<slot name="avatar" id="avatar" @slotchange="${this._avatarSlotChanged}"></slot>${this.href?ja(this,es,Ma).call(this):ja(this,ts,Na).call(this)}<slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}};ts=new WeakSet,Na=function(){return l`<div id="open-part" tabindex="${this.disabled?_:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></div>`},es=new WeakSet,Ma=function(){return l`<a id="open-part" tabindex="${this.disabled?_:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},xi.styles=[...F.styles,d`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px);align-items:center}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-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}#avatar{margin:var(--uui-size-3,9px)}slot[name=icon]::slotted(*){font-size:1.2em}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer;margin:0 0 3px 0}:host([disabled]) #open-part{pointer-events:none}#open-part>span{vertical-align:center;margin-top:3px}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}`],Jr([a({type:String})],xi.prototype,"name",2),Jr([v()],xi.prototype,"_avatarSlotHasContent",2),xi=Jr([p("uui-card-user")],xi);var Ic=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Da=(i,t,e,r)=>{for(var o=r>1?void 0:r?jc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Ic(t,e,o),o};let xo=class extends b{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 l`<svg viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}};xo.styles=[d`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform-origin:50% 50%;transition:transform 280ms cubic-bezier(.17,-.88,.82,1.84)}:host([open]) svg{transform:rotate(180deg)}`],Da([a({type:Boolean,reflect:!0})],xo.prototype,"open",2),xo=Da([p("uui-caret")],xo);var Nc=Object.defineProperty,Mc=Object.getOwnPropertyDescriptor,Dc=(i,t,e,r)=>{for(var o=r>1?void 0:r?Mc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Nc(t,e,o),o};let _o=class extends At{renderCheckbox(){return l`<div id="ticker"><div id="icon-check">${fo}</div></div>`}};_o.formAssociated=!0,_o.styles=[...At.styles,po,d`: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{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#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{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check{opacity:1}label:focus input:checked+#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])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked: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:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker{border:1px solid var(--uui-color-danger-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]) #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:${bo}}:host([disabled]) input:checked+#ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],_o=Dc([p("uui-checkbox")],_o);/**
|
|
270
|
+
*/const U=i=>i??E;let _i=class extends P{constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t})}};_i.CLICK="click";var mu=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,ut=(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&&mu(e,t,o),o},gu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Po=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},wi=(i,e,t)=>(gu(i,e,"access private method"),t),Ui,Ao,Oo,Wn,zo,qn;n.UUIButtonInlineCreateElement=class extends m{constructor(){super(...arguments),Po(this,Ui),Po(this,Oo),Po(this,zo),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 _i(_i.CLICK))}render(){return this.href?wi(this,Oo,Wn).call(this):wi(this,zo,qn).call(this)}},Ui=new WeakSet,Ao=function(){return u`<div id="plus" style="${ne({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>`},Oo=new WeakSet,Wn=function(){return u`<a id="button-wrapper" @mousemove="${this._onMouseMove}" href="${U(this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}" aria-label="${this.label?this.label:"create new element"}">${wi(this,Ui,Ao).call(this)}</a>`},zo=new WeakSet,qn=function(){return u`<button id="button-wrapper" @mousemove="${this._onMouseMove}" @click="${this._handleClick}" aria-label="${this.label?this.label:"create new element"}">${wi(this,Ui,Ao).call(this)}</button>`},n.UUIButtonInlineCreateElement.styles=[du,p`: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:${hu};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)}`],ut([v()],n.UUIButtonInlineCreateElement.prototype,"_position",2),ut([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"label",2),ut([l({type:Boolean,reflect:!0})],n.UUIButtonInlineCreateElement.prototype,"vertical",2),ut([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"href",2),ut([l({type:String})],n.UUIButtonInlineCreateElement.prototype,"target",2),n.UUIButtonInlineCreateElement=ut([b("uui-button-inline-create")],n.UUIButtonInlineCreateElement);let fu=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 w=(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)},Kn=(i,e)=>{function t(o){const s=i.getBoundingClientRect(),a=i.ownerDocument.defaultView,d=s.left+a.scrollX,c=s.top+a.scrollY;let h;o instanceof TouchEvent?h=o.touches[0]:h=o;const f=h.pageX-d,g=h.pageY-c;e?.onMove&&e.onMove(f,g)}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),Xn=(i,e,t)=>t+e-i,yu=(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 _u(i){return i?i.assignedNodes({flatten:!0}).length>0:!1}const Ei=_`<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>`,wu=_`<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>`,Uu=_`<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>`,Eu=_`<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>`,Lo=_`<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>`,$u=_`<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>`,ku=_`<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>`,Iu=_`<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>`,xu=_`<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 Cu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,se=(i,e,t,r)=>{for(var o=r>1?void 0:r?Su(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&&Cu(e,t,o),o};n.UUIButtonElement=class extends oe(ie("",eu(m))){constructor(){super(),this.type="button",this.disabled=!1,this.look="default",this.color="default",this.compact=!1,this.state=void 0,this.addEventListener("click",this._onHostClick)}getFormElement(){return this._button}_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(this._resetStateTimeout),(this.state==="success"||this.state==="failed")&&(this._resetStateTimeout=setTimeout(()=>this.state=void 0,2e3)))}renderState(){let e;switch(this.state){case"waiting":w(this,"uui-loader-circle"),e=u`<uui-loader-circle id="loader"></uui-loader-circle>`;break;case"success":w(this,"uui-icon"),e=u`<uui-icon name="check" .fallback="${Ei.strings[0]}"></uui-icon>`;break;case"failed":w(this,"uui-icon"),e=u`<uui-icon name="wrong" .fallback="${xu.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="${U(this.label)}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></a>`:u`<button id="button" ?disabled="${this.disabled}" aria-label="${U(this.label)}">${this.renderState()} ${this.renderLabel()}<slot name="extra"></slot></button>`}},n.UUIButtonElement.styles=[fi,p`: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:normal;display:block;transition:opacity 120ms}: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}a:not([href]):active,button[disabled]:active{animation:${yi}}#icon-check,#icon-wrong{display:grid;place-items:center;width:1.5em}#loader{font-size:1.5em}:host([look]:not([look=''])) #loader{color:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}: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(28, 35, 59));--color-emphasis:var(--uui-color-default-emphasis,#3544b1);--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]) #button{--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-emphasis:var(--uui-color-positive-emphasis,rgb(13, 155, 98));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]) #button{--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-emphasis:var(--uui-color-warning-emphasis,rgb(251, 224, 101));--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]) #button{--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-emphasis:var(--uui-color-danger-emphasis,rgb(226, 60, 107));--color-contrast:var(--uui-color-danger-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][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))}`],se([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"type",2),se([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"disabled",2),se([l({reflect:!0})],n.UUIButtonElement.prototype,"look",2),se([l({reflect:!0})],n.UUIButtonElement.prototype,"color",2),se([l({type:Boolean,reflect:!0})],n.UUIButtonElement.prototype,"compact",2),se([l({type:String,reflect:!0})],n.UUIButtonElement.prototype,"state",2),se([l({type:String})],n.UUIButtonElement.prototype,"href",2),se([l({type:String})],n.UUIButtonElement.prototype,"target",2),se([C("#button")],n.UUIButtonElement.prototype,"_button",2),n.UUIButtonElement=se([b("uui-button")],n.UUIButtonElement);let ct=class extends P{};ct.OPEN="open";var Pu=Object.defineProperty,Au=Object.getOwnPropertyDescriptor,jt=(i,e,t,r)=>{for(var o=r>1?void 0:r?Au(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&&Pu(e,t,o),o};n.UUICardElement=class extends mi(rt(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){this.disabled||(e.stopPropagation(),this.dispatchEvent(new ct(ct.OPEN)))}handleOpenKeydown(e){this.disabled||e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new ct(ct.OPEN)))}render(){return u`<slot></slot>`}},n.UUICardElement.styles=[p`: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(*){outline-color:var(--uui-color-focus,#3879ff);outline-offset:4px}:host(*) *{outline-color:var(--uui-color-focus,#3879ff)}:host(: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)}: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-danger,#d42054);border-radius:var(--uui-border-radius,3px)}:host([selectable]){cursor:pointer}:host([disabled]){background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([selectable])::after{content:'';position:absolute;pointer-events:none;inset:calc(var(--uui-card-border-width) * -1);width:calc(100% + calc(var(--uui-card-border-width) * 2));height:calc(100% + calc(var(--uui-card-border-width) * 2));box-sizing:border-box;border:var(--uui-card-border-width) solid var(--uui-color-selected,#3544b1);border-radius:calc(var(--uui-border-radius,3px) + var(--uui-card-border-width));transition:opacity .1s ease-out;opacity:0}:host([selectable]:hover)::after{opacity:.33}:host([selectable][selected]:hover)::after{opacity:.66}:host([selectable][selected])::after{opacity:1}:host([select-only]) *,:host([select-only]) ::slotted(*){pointer-events:none}a{text-decoration:none;color:inherit}`],jt([l({type:Boolean,reflect:!0,attribute:"disabled"})],n.UUICardElement.prototype,"disabled",2),jt([l({type:Boolean,reflect:!0})],n.UUICardElement.prototype,"error",2),jt([l({type:String})],n.UUICardElement.prototype,"href",2),jt([l({type:String})],n.UUICardElement.prototype,"target",2),n.UUICardElement=jt([b("uui-card")],n.UUICardElement);var Ou=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,$i=(i,e,t,r)=>{for(var o=r>1?void 0:r?zu(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&&Ou(e,t,o),o},Lu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Yn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Zn=(i,e,t)=>(Lu(i,e,"access private method"),t),To,Qn,No,Jn;n.UUICardBlockTypeElement=class extends n.UUICardElement{constructor(){super(...arguments),Yn(this,To),Yn(this,No),this.name=""}render(){return u`<div id="portrait" style="${ne({backgroundColor:this.background})}"><slot></slot></div>${this.href?Zn(this,No,Jn).call(this):Zn(this,To,Qn).call(this)}<slot name="tag"></slot><slot name="actions"></slot>`}},To=new WeakSet,Qn=function(){return u`<button id="open-part" tabindex="${this.disabled?E:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><strong>${this.name}</strong><small>${this.description}</small></button>`},No=new WeakSet,Jn=function(){return u`<a id="open-part" tabindex="${this.disabled?E:"0"}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}"><strong>${this.name}</strong><small>${this.description}</small></a>`},n.UUICardBlockTypeElement.styles=[...n.UUICardElement.styles,p`:host{flex-direction:column;justify-content:flex-start}:host(:hover) #info{color:var(--uui-color-interactive-emphasis,#3544b1)}#portrait{background-color:var(--uui-color-surface-alt,#f3f3f5);display:flex;justify-content:center;min-height:150px;max-height:150px}slot:not([name])::slotted(*){align-self:center;font-size:var(--uui-size-8,24px);border-radius:var(--uui-border-radius,3px);object-fit:cover;max-width:100%;max-height:100%}#open-part{text-align:left;background-color:var(--uui-color-surface,#fff);cursor:pointer;color:var(--uui-color-interactive,#1b264f);border:none;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px);display:flex;flex-direction:column;line-height:var(--uui-size-6,18px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover strong{text-decoration:underline}#open-part:hover{color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}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}: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}`],$i([l({type:String})],n.UUICardBlockTypeElement.prototype,"name",2),$i([l({type:String})],n.UUICardBlockTypeElement.prototype,"description",2),$i([l({type:String,attribute:"background"})],n.UUICardBlockTypeElement.prototype,"background",2),n.UUICardBlockTypeElement=$i([b("uui-card-block-type")],n.UUICardBlockTypeElement);var Tu=Object.defineProperty,Nu=Object.getOwnPropertyDescriptor,Mo=(i,e,t,r)=>{for(var o=r>1?void 0:r?Nu(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&&Tu(e,t,o),o},Mu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},es=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ts=(i,e,t)=>(Mu(i,e,"access private method"),t),Do,is,jo,os;n.UUICardContentNodeElement=class extends n.UUICardElement{constructor(){super(...arguments),es(this,Do),es(this,jo),this.name="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}_onSlotIconChange(e){this._iconSlotHasContent=e.target.assignedNodes({flatten:!0}).length>0}_renderFallbackIcon(){return w(this,"uui-icon"),u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`}render(){return u`${this.href?ts(this,jo,os).call(this):ts(this,Do,is).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},Do=new WeakSet,is=function(){return u`<div id="open-part" tabindex="${this.disabled?E:0}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></div>`},jo=new WeakSet,os=function(){return u`<a id="open-part" tabindex="${this.disabled?E:0}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}"><span id="icon"><slot name="icon" @slotchange="${this._onSlotIconChange}"></slot>${this._iconSlotHasContent===!1?this._renderFallbackIcon():""} </span><span id="name">${this.name}</span></a>`},n.UUICardContentNodeElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px) var(--uui-size-4,12px)}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))}#icon{font-size:1.2em;margin-right:var(--uui-size-1,3px)}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer}:host([disabled]) #open-part{pointer-events:none}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}#name{margin-top:4px}`],Mo([l({type:String})],n.UUICardContentNodeElement.prototype,"name",2),Mo([v()],n.UUICardContentNodeElement.prototype,"_iconSlotHasContent",2),n.UUICardContentNodeElement=Mo([b("uui-card-content-node")],n.UUICardContentNodeElement);var Du=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,ki=(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&&Du(e,t,o),o},Bu=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},rs=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ns=(i,e,t)=>(Bu(i,e,"access private method"),t),Bo,ss,Vo,as;n.UUICardMediaElement=class extends n.UUICardElement{constructor(){super(...arguments),rs(this,Bo),rs(this,Vo),this.name="",this.fileExt="",this.hasPreview=!1}connectedCallback(){super.connectedCallback(),w(this,"uui-symbol-folder"),w(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="folder-symbol"></uui-symbol-folder>`:u`<uui-symbol-file id="file-symbol" type="${this.fileExt}"></uui-symbol-file>`}render(){return u`${this.renderMedia()}<slot @slotchange="${this.queryPreviews}"></slot>${this.href?ns(this,Vo,as).call(this):ns(this,Bo,ss).call(this)}<div id="select-border"></div><slot name="tag"></slot><slot name="actions"></slot>`}},Bo=new WeakSet,ss=function(){return u`<button id="open-part" tabindex="${this.disabled?E:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></button>`},Vo=new WeakSet,as=function(){return u`<a id="open-part" tabindex="${this.disabled?E:"0"}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardMediaElement.styles=[...n.UUICardElement.styles,p`#file-symbol,#folder-symbol{align-self:center;margin:var(--uui-size-14,42px);width:80%}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])::slotted(*){align-self:center;border-radius:var(--uui-border-radius,3px);object-fit:cover;width:100%;height:100%}#open-part{position:absolute;bottom:0;width:100%;background-color:var(--uui-color-surface,#fff);color:var(--uui-color-interactive,#1b264f);border:none;cursor:pointer;border-top:1px solid var(--uui-color-divider,#f6f6f7);border-radius:0 0 var(--uui-border-radius,3px) var(--uui-border-radius,3px);display:flex;justify-content:flex-start;align-items:center;font-family:inherit;font-size:var(--uui-type-small-size,12px);box-sizing:border-box;padding:var(--uui-size-2,6px) var(--uui-size-4,12px)}:host([disabled]) #open-part{pointer-events:none;background:var(--uui-color-disabled,#f3f3f5);color:var(--uui-color-contrast-disabled)}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}:host([image]:not([image=''])) #open-part{transition:opacity .5s .5s;opacity:0}: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}`],ki([l({type:String})],n.UUICardMediaElement.prototype,"name",2),ki([l({type:String,attribute:"file-ext"})],n.UUICardMediaElement.prototype,"fileExt",2),ki([v()],n.UUICardMediaElement.prototype,"hasPreview",2),n.UUICardMediaElement=ki([b("uui-card-media")],n.UUICardMediaElement);var Vu=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Ho=(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&&Vu(e,t,o),o},Ru=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ls=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},us=(i,e,t)=>(Ru(i,e,"access private method"),t),Ro,cs,Fo,ds;n.UUICardUserElement=class extends n.UUICardElement{constructor(){super(...arguments),ls(this,Ro),ls(this,Fo),this.name="",this._avatarSlotHasContent=!1,this._avatarSlotChanged=e=>{this._avatarSlotHasContent=_u(e.target)}}connectedCallback(){super.connectedCallback(),w(this,"uui-avatar")}render(){return u`${this._avatarSlotHasContent?E:u`<uui-avatar id="avatar" name="${this.name}" size="m"></uui-avatar>`}<slot name="avatar" id="avatar" @slotchange="${this._avatarSlotChanged}"></slot>${this.href?us(this,Fo,ds).call(this):us(this,Ro,cs).call(this)}<slot></slot><slot name="tag"></slot><slot name="actions"></slot>`}},Ro=new WeakSet,cs=function(){return u`<div id="open-part" tabindex="${this.disabled?E:"0"}" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}"><span>${this.name}</span></div>`},Fo=new WeakSet,ds=function(){return u`<a id="open-part" tabindex="${this.disabled?E:"0"}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}"><span>${this.name}</span></a>`},n.UUICardUserElement.styles=[...n.UUICardElement.styles,p`:host{min-width:250px;flex-direction:column;justify-content:space-between;padding:var(--uui-size-3,9px);align-items:center}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-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}#avatar{margin:var(--uui-size-3,9px)}slot[name=icon]::slotted(*){font-size:1.2em}#open-part{display:flex;position:relative;font-weight:700;align-items:center;cursor:pointer;margin:0 0 3px 0}:host([disabled]) #open-part{pointer-events:none}#open-part>span{vertical-align:center;margin-top:3px}#open-part:hover{text-decoration:underline;color:var(--uui-color-interactive-emphasis,#3544b1)}`],Ho([l({type:String})],n.UUICardUserElement.prototype,"name",2),Ho([v()],n.UUICardUserElement.prototype,"_avatarSlotHasContent",2),n.UUICardUserElement=Ho([b("uui-card-user")],n.UUICardUserElement);var Fu=Object.defineProperty,Gu=Object.getOwnPropertyDescriptor,hs=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gu(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};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 viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUICaretElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform-origin:50% 50%;transition:transform 280ms cubic-bezier(.17,-.88,.82,1.84)}:host([open]) svg{transform:rotate(180deg)}`],hs([l({type:Boolean,reflect:!0})],n.UUICaretElement.prototype,"open",2),n.UUICaretElement=hs([b("uui-caret")],n.UUICaretElement);var Wu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,Ku=(i,e,t,r)=>{for(var o=r>1?void 0:r?qu(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&&Wu(e,t,o),o};n.UUICheckboxElement=class extends re{renderCheckbox(){return u`<div id="ticker"><div id="icon-check">${Ei}</div></div>`}},n.UUICheckboxElement.formAssociated=!0,n.UUICheckboxElement.styles=[...re.styles,fi,p`: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{border-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])+#ticker{border-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked+#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{background-color:var(--uui-color-selected-emphasis,#4656c8)}input:checked+#ticker::before{transform:scale(1);opacity:1}input:checked+#ticker #icon-check{opacity:1}label:focus input:checked+#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])) label:active input:checked+#ticker::before{transform:scale(.9)}:host(:not([pristine]):invalid) #ticker,:host(:not([pristine]):invalid) label:focus input:checked+#ticker,:host(:not([pristine]):invalid) label:hover #ticker,:host(:not([pristine]):invalid) label:hover input:checked: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:hover #ticker,:host(:not([pristine])[internals-invalid]) label:hover input:checked:not([disabled])+#ticker{border:1px solid var(--uui-color-danger-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]) #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:${yi}}:host([disabled]) input:checked+#ticker #icon-check{color:var(--uui-color-disabled-contrast,#c4c4c4)}`],n.UUICheckboxElement=Ku([b("uui-checkbox")],n.UUICheckboxElement);/**
|
|
271
271
|
* @license
|
|
272
272
|
* Copyright 2018 Google LLC
|
|
273
273
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
274
|
-
*/const is=Me(class extends De{constructor(i){var t;if(super(i),i.type!==lt.ATTRIBUTE||i.name!=="class"||((t=i.strings)===null||t===void 0?void 0:t.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(t=>i[t]).join(" ")+" "}update(i,[t]){var e,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 t)t[s]&&!(!((e=this.nt)===null||e===void 0)&&e.has(s))&&this.it.add(s);return this.render(t)}const o=i.element.classList;this.it.forEach(s=>{s in t||(o.remove(s),this.it.delete(s))});for(const s in t){const n=!!t[s];n===this.it.has(s)||!((r=this.nt)===null||r===void 0)&&r.has(s)||(n?(o.add(s),this.it.add(s)):(o.remove(s),this.it.delete(s)))}return X}});var Tc={grad:.9,turn:360,rad:360/(2*Math.PI)},zt=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},H=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*i)/e+0},et=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),i>e?e:i>t?i:t},Ta=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Ha=function(i){return{r:et(i.r,0,255),g:et(i.g,0,255),b:et(i.b,0,255),a:et(i.a)}},os=function(i){return{r:H(i.r),g:H(i.g),b:H(i.b),a:H(i.a,3)}},Hc=/^#([0-9a-f]{3,8})$/i,wo=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},Va=function(i){var t=i.r,e=i.g,r=i.b,o=i.a,s=Math.max(t,e,r),n=s-Math.min(t,e,r),c=n?s===t?(e-r)/n:s===e?2+(r-t)/n:4+(t-e)/n:0;return{h:60*(c<0?c+6:c),s:s?n/s*100:0,v:s/255*100,a:o}},Ba=function(i){var t=i.h,e=i.s,r=i.v,o=i.a;t=t/360*6,e/=100,r/=100;var s=Math.floor(t),n=r*(1-e),c=r*(1-(t-s)*e),u=r*(1-(1-t+s)*e),h=s%6;return{r:255*[r,c,n,n,u,r][h],g:255*[u,r,r,c,n,n][h],b:255*[n,n,u,r,r,c][h],a:o}},Ra=function(i){return{h:Ta(i.h),s:et(i.s,0,100),l:et(i.l,0,100),a:et(i.a)}},Ua=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((e=(t=i).s,{h:t.h,s:(e*=((r=t.l)<50?r:100-r)/100)>0?2*e/(r+e)*100:0,v:r+e,a:t.a}));var t,e,r},_i=function(i){return{h:(t=Va(i)).h,s:(o=(200-(e=t.s))*(r=t.v)/100)>0&&o<200?e*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,e,r,o},Vc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Uc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wa={string:[[function(i){var t=Hc.exec(i);return t?(i=t[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 t=Rc.exec(i)||Uc.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ha({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(i){var t=Vc.exec(i)||Bc.exec(i);if(!t)return null;var e,r,o=Ra({h:(e=t[1],r=t[2],r===void 0&&(r="deg"),Number(e)*(Tc[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ga(o)},"hsl"]],object:[[function(i){var t=i.r,e=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return zt(t)&&zt(e)&&zt(r)?Ha({r:Number(t),g:Number(e),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var t=i.h,e=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!zt(t)||!zt(e)||!zt(r))return null;var n=Ra({h:Number(t),s:Number(e),l:Number(r),a:Number(s)});return Ga(n)},"hsl"],[function(i){var t=i.h,e=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!zt(t)||!zt(e)||!zt(r))return null;var n=function(c){return{h:Ta(c.h),s:et(c.s,0,100),v:et(c.v,0,100),a:et(c.a)}}({h:Number(t),s:Number(e),v:Number(r),a:Number(s)});return Ba(n)},"hsv"]]},Fa=function(i,t){for(var e=0;e<t.length;e++){var r=t[e][0](i);if(r)return[r,t[e][1]]}return[null,void 0]},Gc=function(i){return typeof i=="string"?Fa(i.trim(),Wa.string):typeof i=="object"&&i!==null?Fa(i,Wa.object):[null,void 0]},rs=function(i,t){var e=_i(i);return{h:e.h,s:et(e.s+100*t,0,100),l:e.l,a:e.a}},ss=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},qa=function(i,t){var e=_i(i);return{h:e.h,s:e.s,l:et(e.l+100*t,0,100),a:e.a}},Ka=function(){function i(t){this.parsed=Gc(t)[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(ss(this.rgba),2)},i.prototype.isDark=function(){return ss(this.rgba)<.5},i.prototype.isLight=function(){return ss(this.rgba)>=.5},i.prototype.toHex=function(){return t=os(this.rgba),e=t.r,r=t.g,o=t.b,n=(s=t.a)<1?wo(H(255*s)):"","#"+wo(e)+wo(r)+wo(o)+n;var t,e,r,o,s,n},i.prototype.toRgb=function(){return os(this.rgba)},i.prototype.toRgbString=function(){return t=os(this.rgba),e=t.r,r=t.g,o=t.b,(s=t.a)<1?"rgba("+e+", "+r+", "+o+", "+s+")":"rgb("+e+", "+r+", "+o+")";var t,e,r,o,s},i.prototype.toHsl=function(){return Ua(_i(this.rgba))},i.prototype.toHslString=function(){return t=Ua(_i(this.rgba)),e=t.h,r=t.s,o=t.l,(s=t.a)<1?"hsla("+e+", "+r+"%, "+o+"%, "+s+")":"hsl("+e+", "+r+"%, "+o+"%)";var t,e,r,o,s},i.prototype.toHsv=function(){return t=Va(this.rgba),{h:H(t.h),s:H(t.s),v:H(t.v),a:H(t.a,3)};var t},i.prototype.invert=function(){return it({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},i.prototype.saturate=function(t){return t===void 0&&(t=.1),it(rs(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),it(rs(this.rgba,-t))},i.prototype.grayscale=function(){return it(rs(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),it(qa(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),it(qa(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?it({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):H(this.rgba.a,3);var e},i.prototype.hue=function(t){var e=_i(this.rgba);return typeof t=="number"?it({h:t,s:e.s,l:e.l,a:e.a}):H(e.h)},i.prototype.isEqual=function(t){return this.toHex()===it(t).toHex()},i}(),it=function(i){return i instanceof Ka?i:new Ka(i)};let ns=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};ns.CHANGE="change";var Wc=Object.defineProperty,Fc=Object.getOwnPropertyDescriptor,Lt=(i,t,e,r)=>{for(var o=r>1?void 0:r?Fc(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Wc(t,e,o),o};let ut=class extends b{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000",this.disabled=!1}get value(){return this._value}set value(t){const e=this._value;this._value=t,this.requestUpdate("value",e);try{const r=it(t);if(r.isValid()){const{h:o,l:s,a:n}=r.toHsl();o!==0&&(this.hue=o),this.lightness=s,this.brightness=this.getBrightness(s),this.alpha=n*100}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(t){if(this.disabled)return;const e=this.shadowRoot.querySelector(".color-area"),r=e.querySelector(".color-area__handle"),{width:o,height:s}=e.getBoundingClientRect();r.focus(),t.preventDefault(),t.stopPropagation(),this.isDraggingGridHandle=!0,ya(e,{onMove:(n,c)=>{isNaN(n)||isNaN(c)||(this.saturation=A(n/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:t})}handleGridKeyDown(t){if(this.disabled)return;const e=t.shiftKey?10:1;t.key==="ArrowLeft"&&(t.preventDefault(),this.saturation=A(this.saturation-e,0,100),this.syncValues()),t.key==="ArrowRight"&&(t.preventDefault(),this.saturation=A(this.saturation+e,0,100),this.syncValues()),t.key==="ArrowUp"&&(t.preventDefault(),this.brightness=A(this.brightness+e,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues()),t.key==="ArrowDown"&&(t.preventDefault(),this.brightness=A(this.brightness-e,0,100),this.lightness=this.getLightness(this.brightness),this.syncValues())}getBrightness(t){return A(-1*(200*t/(this.saturation-200)),0,100)}getLightness(t){return A((200-this.saturation)*t/100*5/10,0,100)}syncValues(){const t=it({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=t.toRgbString(),this.dispatchEvent(new ns(ns.CHANGE))}getHexString(t,e,r,o=100){const s=it(`hsla(${t}, ${e}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}render(){const t=this.saturation,e=100-this.brightness;return l`<div part="grid" class="color-area" style="${ft({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${is({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${ft({top:`${e}%`,left:`${t}%`,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>`}};ut.styles=[d`: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}.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}`],Lt([v()],ut.prototype,"isDraggingGridHandle",2),Lt([a({type:Number})],ut.prototype,"hue",2),Lt([a({type:Number})],ut.prototype,"saturation",2),Lt([a({type:Number})],ut.prototype,"lightness",2),Lt([a({type:Number})],ut.prototype,"brightness",2),Lt([a({type:Number})],ut.prototype,"alpha",2),Lt([a({type:String})],ut.prototype,"value",1),Lt([a({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),ut=Lt([p("uui-color-area")],ut);/**
|
|
274
|
+
*/const Go=at(class extends lt{constructor(i){var e;if(super(i),i.type!==Q.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 R}});var Xu={grad:.9,turn:360,rad:360/(2*Math.PI)},be=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},T=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},X=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},ps=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},bs=function(i){return{r:X(i.r,0,255),g:X(i.g,0,255),b:X(i.b,0,255),a:X(i.a)}},Wo=function(i){return{r:T(i.r),g:T(i.g),b:T(i.b),a:T(i.a,3)}},Yu=/^#([0-9a-f]{3,8})$/i,Ii=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},ms=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),d=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(d<0?d+6:d),s:s?a/s*100:0,v:s/255*100,a:o}},vs=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),d=r*(1-(e-s)*t),c=r*(1-(1-e+s)*t),h=s%6;return{r:255*[r,d,a,a,c,r][h],g:255*[c,r,r,d,a,a][h],b:255*[a,a,c,r,r,d][h],a:o}},gs=function(i){return{h:ps(i.h),s:X(i.s,0,100),l:X(i.l,0,100),a:X(i.a)}},fs=function(i){return{h:T(i.h),s:T(i.s),l:T(i.l),a:T(i.a,3)}},ys=function(i){return vs((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},Bt=function(i){return{h:(e=ms(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},Zu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ju=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ec=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_s={string:[[function(i){var e=Yu.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?T(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?T(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=Ju.exec(i)||ec.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:bs({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=Zu.exec(i)||Qu.exec(i);if(!e)return null;var t,r,o=gs({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(Xu[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ys(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 be(e)&&be(t)&&be(r)?bs({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(!be(e)||!be(t)||!be(r))return null;var a=gs({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return ys(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!be(e)||!be(t)||!be(r))return null;var a=function(d){return{h:ps(d.h),s:X(d.s,0,100),v:X(d.v,0,100),a:X(d.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return vs(a)},"hsv"]]},ws=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]},tc=function(i){return typeof i=="string"?ws(i.trim(),_s.string):typeof i=="object"&&i!==null?ws(i,_s.object):[null,void 0]},qo=function(i,e){var t=Bt(i);return{h:t.h,s:X(t.s+100*e,0,100),l:t.l,a:t.a}},Ko=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Us=function(i,e){var t=Bt(i);return{h:t.h,s:t.s,l:X(t.l+100*e,0,100),a:t.a}},Es=function(){function i(e){this.parsed=tc(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 T(Ko(this.rgba),2)},i.prototype.isDark=function(){return Ko(this.rgba)<.5},i.prototype.isLight=function(){return Ko(this.rgba)>=.5},i.prototype.toHex=function(){return e=Wo(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?Ii(T(255*s)):"","#"+Ii(t)+Ii(r)+Ii(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Wo(this.rgba)},i.prototype.toRgbString=function(){return e=Wo(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(Bt(this.rgba))},i.prototype.toHslString=function(){return e=fs(Bt(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=ms(this.rgba),{h:T(e.h),s:T(e.s),v:T(e.v),a:T(e.a,3)};var e},i.prototype.invert=function(){return Y({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),Y(qo(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),Y(qo(this.rgba,-e))},i.prototype.grayscale=function(){return Y(qo(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),Y(Us(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),Y(Us(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"?Y({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):T(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Bt(this.rgba);return typeof e=="number"?Y({h:e,s:t.s,l:t.l,a:t.a}):T(t.h)},i.prototype.isEqual=function(e){return this.toHex()===Y(e).toHex()},i}(),Y=function(i){return i instanceof Es?i:new Es(i)};let xi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};xi.CHANGE="change";var ic=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,me=(i,e,t,r)=>{for(var o=r>1?void 0:r?oc(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&&ic(e,t,o),o};n.UUIColorAreaElement=class extends m{constructor(){super(...arguments),this.isDraggingGridHandle=!1,this.hue=0,this.saturation=0,this.lightness=0,this.brightness=0,this.alpha=100,this._value="#000",this.disabled=!1}get value(){return this._value}set value(e){const t=this._value;this._value=e,this.requestUpdate("value",t);try{const r=Y(e);if(r.isValid()){const{h:o,l:s,a}=r.toHsl();o!==0&&(this.hue=o),this.lightness=s,this.brightness=this.getBrightness(s),this.alpha=a*100}}catch(r){console.error("Something went wrong parsing the color string.",r)}}handleGridDrag(e){if(this.disabled)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,Kn(t,{onMove:(a,d)=>{isNaN(a)||isNaN(d)||(this.saturation=A(a/o*100,0,100),this.brightness=A(100-d/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=Y({h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha/100});this._value=e.toRgbString(),this.dispatchEvent(new xi(xi.CHANGE))}getHexString(e,t,r,o=100){const s=Y(`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="${ne({backgroundColor:this.getHexString(this.hue,100,50)})}" @mousedown="${this.handleGridDrag}" @touchstart="${this.handleGridDrag}"><span part="grid-handle" class="${Go({"color-area__handle":!0,"color-area__handle--dragging":this.isDraggingGridHandle})}" style="${ne({top:`${t}%`,left:`${e}%`,backgroundColor:this.getHexString(this.hue,this.saturation,this.lightness,this.alpha)})}" role="application" tabindex="${U(this.disabled?void 0:"0")}" aria-label="HSB" @keydown="${this.handleGridKeyDown}"></span></div>`}},n.UUIColorAreaElement.styles=[p`: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}.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}`],me([v()],n.UUIColorAreaElement.prototype,"isDraggingGridHandle",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"hue",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"saturation",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"lightness",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"brightness",2),me([l({type:Number})],n.UUIColorAreaElement.prototype,"alpha",2),me([l({type:String})],n.UUIColorAreaElement.prototype,"value",1),me([l({type:Boolean,reflect:!0})],n.UUIColorAreaElement.prototype,"disabled",2),n.UUIColorAreaElement=me([b("uui-color-area")],n.UUIColorAreaElement);/**
|
|
275
275
|
* @license
|
|
276
276
|
* Copyright 2020 Google LLC
|
|
277
277
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
278
|
-
*/const{I:
|
|
278
|
+
*/const{I:rc}=Oa,$s=i=>i.strings===void 0,ks=()=>document.createComment(""),Vt=(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(ks(),s),d=o.insertBefore(ks(),s);t=new rc(a,d,i,i.options)}else{const a=t._$AB.nextSibling,d=t._$AM,c=d!==i;if(c){let h;(r=t._$AQ)===null||r===void 0||r.call(t,i),t._$AM=i,t._$AP!==void 0&&(h=i._$AU)!==d._$AU&&t._$AP(h)}if(a!==s||c){let h=t._$AA;for(;h!==a;){const f=h.nextSibling;o.insertBefore(h,s),h=f}}}return t},Re=(i,e,t=i)=>(i._$AI(e,t),i),nc={},Is=(i,e=nc)=>i._$AH=e,sc=i=>i._$AH,Xo=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}};/**
|
|
279
279
|
* @license
|
|
280
280
|
* Copyright 2020 Google LLC
|
|
281
281
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
282
|
-
*/const Yc=Me(class extends De{constructor(i){if(super(i),i.type!==lt.PROPERTY&&i.type!==lt.ATTRIBUTE&&i.type!==lt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xa(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===X||t===_)return t;const e=i.element,r=i.name;if(i.type===lt.PROPERTY){if(t===e[r])return X}else if(i.type===lt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return X}else if(i.type===lt.ATTRIBUTE&&e.getAttribute(r)===t+"")return X;return Za(i),t}});var Zc={grad:.9,turn:360,rad:360/(2*Math.PI)},It=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},V=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*i)/e+0},ot=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),i>e?e:i>t?i:t},Qa=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Ja=function(i){return{r:ot(i.r,0,255),g:ot(i.g,0,255),b:ot(i.b,0,255),a:ot(i.a)}},ls=function(i){return{r:V(i.r),g:V(i.g),b:V(i.b),a:V(i.a,3)}},Qc=/^#([0-9a-f]{3,8})$/i,$o=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},tl=function(i){var t=i.r,e=i.g,r=i.b,o=i.a,s=Math.max(t,e,r),n=s-Math.min(t,e,r),c=n?s===t?(e-r)/n:s===e?2+(r-t)/n:4+(t-e)/n:0;return{h:60*(c<0?c+6:c),s:s?n/s*100:0,v:s/255*100,a:o}},el=function(i){var t=i.h,e=i.s,r=i.v,o=i.a;t=t/360*6,e/=100,r/=100;var s=Math.floor(t),n=r*(1-e),c=r*(1-(t-s)*e),u=r*(1-(1-t+s)*e),h=s%6;return{r:255*[r,c,n,n,u,r][h],g:255*[u,r,r,c,n,n][h],b:255*[n,n,u,r,r,c][h],a:o}},il=function(i){return{h:Qa(i.h),s:ot(i.s,0,100),l:ot(i.l,0,100),a:ot(i.a)}},ol=function(i){return{h:V(i.h),s:V(i.s),l:V(i.l),a:V(i.a,3)}},rl=function(i){return el((e=(t=i).s,{h:t.h,s:(e*=((r=t.l)<50?r:100-r)/100)>0?2*e/(r+e)*100:0,v:r+e,a:t.a}));var t,e,r},$i=function(i){return{h:(t=tl(i)).h,s:(o=(200-(e=t.s))*(r=t.v)/100)>0&&o<200?e*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,e,r,o},Jc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,th=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,eh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ih=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,us={string:[[function(i){var t=Qc.exec(i);return t?(i=t[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 t=eh.exec(i)||ih.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ja({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(i){var t=Jc.exec(i)||th.exec(i);if(!t)return null;var e,r,o=il({h:(e=t[1],r=t[2],r===void 0&&(r="deg"),Number(e)*(Zc[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return rl(o)},"hsl"]],object:[[function(i){var t=i.r,e=i.g,r=i.b,o=i.a,s=o===void 0?1:o;return It(t)&&It(e)&&It(r)?Ja({r:Number(t),g:Number(e),b:Number(r),a:Number(s)}):null},"rgb"],[function(i){var t=i.h,e=i.s,r=i.l,o=i.a,s=o===void 0?1:o;if(!It(t)||!It(e)||!It(r))return null;var n=il({h:Number(t),s:Number(e),l:Number(r),a:Number(s)});return rl(n)},"hsl"],[function(i){var t=i.h,e=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!It(t)||!It(e)||!It(r))return null;var n=function(c){return{h:Qa(c.h),s:ot(c.s,0,100),v:ot(c.v,0,100),a:ot(c.a)}}({h:Number(t),s:Number(e),v:Number(r),a:Number(s)});return el(n)},"hsv"]]},sl=function(i,t){for(var e=0;e<t.length;e++){var r=t[e][0](i);if(r)return[r,t[e][1]]}return[null,void 0]},oh=function(i){return typeof i=="string"?sl(i.trim(),us.string):typeof i=="object"&&i!==null?sl(i,us.object):[null,void 0]},cs=function(i,t){var e=$i(i);return{h:e.h,s:ot(e.s+100*t,0,100),l:e.l,a:e.a}},hs=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},nl=function(i,t){var e=$i(i);return{h:e.h,s:e.s,l:ot(e.l+100*t,0,100),a:e.a}},ko=function(){function i(t){this.parsed=oh(t)[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(hs(this.rgba),2)},i.prototype.isDark=function(){return hs(this.rgba)<.5},i.prototype.isLight=function(){return hs(this.rgba)>=.5},i.prototype.toHex=function(){return t=ls(this.rgba),e=t.r,r=t.g,o=t.b,n=(s=t.a)<1?$o(V(255*s)):"","#"+$o(e)+$o(r)+$o(o)+n;var t,e,r,o,s,n},i.prototype.toRgb=function(){return ls(this.rgba)},i.prototype.toRgbString=function(){return t=ls(this.rgba),e=t.r,r=t.g,o=t.b,(s=t.a)<1?"rgba("+e+", "+r+", "+o+", "+s+")":"rgb("+e+", "+r+", "+o+")";var t,e,r,o,s},i.prototype.toHsl=function(){return ol($i(this.rgba))},i.prototype.toHslString=function(){return t=ol($i(this.rgba)),e=t.h,r=t.s,o=t.l,(s=t.a)<1?"hsla("+e+", "+r+"%, "+o+"%, "+s+")":"hsl("+e+", "+r+"%, "+o+"%)";var t,e,r,o,s},i.prototype.toHsv=function(){return t=tl(this.rgba),{h:V(t.h),s:V(t.s),v:V(t.v),a:V(t.a,3)};var t},i.prototype.invert=function(){return ct({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},i.prototype.saturate=function(t){return t===void 0&&(t=.1),ct(cs(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),ct(cs(this.rgba,-t))},i.prototype.grayscale=function(){return ct(cs(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),ct(nl(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),ct(nl(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?ct({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):V(this.rgba.a,3);var e},i.prototype.hue=function(t){var e=$i(this.rgba);return typeof t=="number"?ct({h:t,s:e.s,l:e.l,a:e.a}):V(e.h)},i.prototype.isEqual=function(t){return this.toHex()===ct(t).toHex()},i}(),ct=function(i){return i instanceof ko?i:new ko(i)},al=[],rh=function(i){i.forEach(function(t){al.indexOf(t)<0&&(t(ko,us),al.push(t))})};function sh(i,t){var e={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 e)r[e[o]]=o;var s={};i.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,u,h=r[this.toHex()];if(h)return h;if(n?.closest){var f=this.toRgb(),g=1/0,m="black";if(!s.length)for(var $ in e)s[$]=new i(e[$]).toRgb();for(var E in e){var P=(c=f,u=s[E],Math.pow(c.r-u.r,2)+Math.pow(c.g-u.g,2)+Math.pow(c.b-u.b,2));P<g&&(g=P,m=E)}return m}},t.string.push([function(n){var c=n.toLowerCase(),u=c==="transparent"?"#0000":e[c];return u?new i(u).toRgb():null},"name"])}let ds=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};ds.CHANGE="change";var nh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,M=(i,t,e,r)=>{for(var o=r>1?void 0:r?ah(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&nh(t,e,o),o};rh([sh]);const ll="EyeDropper"in window;let I=class extends vt("label",b){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=ct("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),x(this,"uui-icon"),x(this,"uui-icon-registry-essential"),x(this,"uui-input"),x(this,"uui-button"),x(this,"uui-button-group"),x(this,"uui-color-swatches"),x(this,"uui-color-swatch"),x(this,"uui-color-area"),x(this,"uui-color-slider"),x(this,"uui-popover-container")}getFormattedValue(t){const e=this.opacity?`${t}a`:t,r=this._colord.toHex(),o=r.length>7?r.substring(0,r.length-2):r,{r:s,g:n,b:c}=this._colord.toRgb(),{h:u,s:h,l:f}=this._colord.toHsl(),{v:g}=this._colord.toHsv(),m=this._colord.alpha();switch(e){case"hex":return this.setLetterCase(o);case"hexa":return this.setLetterCase(r);case"rgb":return this.setLetterCase(`rgb(${s}, ${n}, ${c})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${u}, ${h}%, ${f}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${u}, ${h}%, ${f}%)`);case"hsva":return this.setLetterCase(`hsva(${u}, ${h}%, ${g}%, ${m})`);default:return""}}getBrightness(t){return A(-1*(200*t/(this.saturation-200)),0,100)}getLightness(t){return A((200-this.saturation)*t/100*5/10,0,100)}handleFormatToggle(){const t=["hex","rgb","hsl","hsv"],e=(t.indexOf(this.format)+1)%t.length;this.format=t[e],this._syncValues()}handleAlphaChange(t){t.stopPropagation(),this._swatches?.resetSelection();const e=t.target,r={h:this.hue,s:this.saturation,l:this.lightness,a:Math.round(e.value)/100};this.setColor(r)}handleHueChange(t){t.stopPropagation(),this._swatches?.resetSelection();const e={h:t.target.value,s:this.saturation,l:this.lightness,a:this.alpha/100};this.setColor(e)}handleGridChange(t){t.stopPropagation(),this._swatches?.resetSelection();const e=t.target,r={h:this.hue,s:e.saturation,l:e.lightness,a:this.alpha/100};this.setColor(r)}handleInputChange(t){this._swatches?.resetSelection();const e=t.target;e.value?(this.setColor(e.value),e.value=this.value):this.setColor("#000"),t.stopPropagation()}handleInputKeyDown(t){t.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),this._swatches?.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(t){t.stopImmediatePropagation();const e=t.target;e.value?this.setColor(e.value):this.setColor("#000")}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(){ll&&new EyeDropper().open().then(t=>this.setColor(t.sRGBHex)).catch(()=>{})}setColor(t){const e=new ko(t),{h:r,s:o,l:s,a:n}=e.toHsl();this.hue=r,this.saturation=o,this.lightness=s,this.alpha=this.opacity?n*100:100;const c=t;return c&&c.h&&(this.hue=c.h),this._colord=e,this._syncValues(),this.dispatchEvent(new ds(ds.CHANGE)),!0}setLetterCase(t){return typeof t!="string"?"":this.uppercase?t.toUpperCase():t.toLowerCase()}getHexString(t,e,r,o=100){const s=ct(`hsla(${t}, ${e}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return l`<div class="${is({"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}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" @change="${this.handleHueChange}"></uui-color-slider>${this.opacity?l`<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}" @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="${ft({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" @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="${Yc(this.inputValue)}" ?disabled="${this.disabled}" @keydown="${this.handleInputKeyDown}" @change="${this.handleInputChange}"></uui-input><uui-button-group>${this.noFormatToggle?"":l`<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>`} ${ll?l`<uui-button label="Select a color" ?disabled="${this.disabled}" @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?l`<uui-color-swatches id="swatches" class="color-picker__swatches" ?disabled="${this.disabled}" @change="${this.handleColorSwatchChange}">${this.swatches.map(t=>l`<uui-color-swatch label="${t}" .value="${t}"></uui-color-swatch>`)}</uui-color-swatches>`:_}_renderPreviewButton(){return l`<button type="button" part="trigger" aria-label="${this.label||"Open Color picker"}" class="${is({"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="${ft({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" ?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()}};I.styles=[d`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;display:block;width:var(--uui-color-picker-width,280px)}uui-popover-container{width:inherit}.color-picker{width:100%;background-color:#fff;user-select:none;border:solid 1px #e4e4e7}.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;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__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-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 #d4d4d8;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%}`],M([S('[part="input"]')],I.prototype,"_input",2),M([S(".color-picker__preview")],I.prototype,"_previewButton",2),M([S("#swatches")],I.prototype,"_swatches",2),M([v()],I.prototype,"inputValue",2),M([v()],I.prototype,"hue",2),M([v()],I.prototype,"saturation",2),M([v()],I.prototype,"lightness",2),M([v()],I.prototype,"alpha",2),M([v()],I.prototype,"_colord",2),M([a()],I.prototype,"value",2),M([a()],I.prototype,"format",2),M([a()],I.prototype,"name",2),M([a()],I.prototype,"size",2),M([a({attribute:"no-format-toggle",type:Boolean})],I.prototype,"noFormatToggle",2),M([a({type:Boolean,reflect:!0})],I.prototype,"inline",2),M([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2),M([a({type:Boolean})],I.prototype,"opacity",2),M([a({type:Boolean})],I.prototype,"uppercase",2),M([a({attribute:!1})],I.prototype,"swatches",2),I=M([p("uui-color-picker")],I);let ps=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};ps.CHANGE="change";var lh=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,jt=(i,t,e,r)=>{for(var o=r>1?void 0:r?uh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&lh(t,e,o),o};let ht=class extends vt("label",b){constructor(){super(...arguments),this.type="hue",this.color="",this.min=0,this.max=100,this.precision=1,this.vertical=!1,this.value=0,this.disabled=!1}willUpdate(t){t.has("type")&&(this.type==="hue"?(this.max=360,this.precision=1):this.type==="opacity"&&(this.max=100,this.precision=1))}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(t){if(this.disabled||!this.container||!this.handle)return;const{width:e,height:r}=this.container.getBoundingClientRect();this.handle.focus(),t.preventDefault(),ya(this.container,{onMove:(o,s)=>{this.vertical?this.value=xa(A(s/r*this.max,this.min,this.max),this.min,this.max):this.value=A(o/e*this.max,this.min,this.max),this.syncValues()},initialEvent:t})}handleClick(t){this.disabled||(this.value=this.getValueFromMousePosition(t),this.syncValues())}handleKeyDown(t){const e=t.shiftKey?10:1;t.key==="ArrowLeft"?(t.preventDefault(),this.value=A(this.value-e,this.min,this.max),this.syncValues()):t.key==="ArrowRight"?(t.preventDefault(),this.value=A(this.value+e,this.min,this.max),this.syncValues()):t.key==="ArrowUp"?(t.preventDefault(),this.value=A(this.value+e,this.min,this.max),this.syncValues()):t.key==="ArrowDown"?(t.preventDefault(),this.value=A(this.value-e,this.min,this.max),this.syncValues()):t.key==="Home"?(t.preventDefault(),this.value=this.min,this.syncValues()):t.key==="End"&&(t.preventDefault(),this.value=this.max,this.syncValues())}getValueFromMousePosition(t){return this.vertical?this.getValueFromYCoordinate(t.clientY):this.getValueFromXCoordinate(t.clientX)}getValueFromTouchPosition(t){return this.vertical?this.getValueFromYCoordinate(t.touches[0].clientY):this.getValueFromXCoordinate(t.touches[0].clientX)}getValueFromXCoordinate(t){const{left:e,width:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((t-e)/r*this.max),this.min,this.max)}getValueFromYCoordinate(t){const{top:e,height:r}=this.container.getBoundingClientRect();return A(this.roundToPrecision((t-e)/r*this.max),this.min,this.max)}roundToPrecision(t){const e=1/this.precision;return Math.ceil(t*e)/e}syncValues(){this.dispatchEvent(new ps(ps.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/xa(this.value,this.min,this.max):this.max/this.value)}render(){return l`<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"?l`<div id="current-hue" style="${ft({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
282
|
+
*/const ac=at(class extends lt{constructor(i){if(super(i),i.type!==Q.PROPERTY&&i.type!==Q.ATTRIBUTE&&i.type!==Q.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!$s(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===R||e===E)return e;const t=i.element,r=i.name;if(i.type===Q.PROPERTY){if(e===t[r])return R}else if(i.type===Q.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return R}else if(i.type===Q.ATTRIBUTE&&t.getAttribute(r)===e+"")return R;return Is(i),e}});var lc={grad:.9,turn:360,rad:360/(2*Math.PI)},ve=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},N=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t+0},Z=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i>e?i:e},xs=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Cs=function(i){return{r:Z(i.r,0,255),g:Z(i.g,0,255),b:Z(i.b,0,255),a:Z(i.a)}},Yo=function(i){return{r:N(i.r),g:N(i.g),b:N(i.b),a:N(i.a,3)}},uc=/^#([0-9a-f]{3,8})$/i,Ci=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},Ss=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),d=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:60*(d<0?d+6:d),s:s?a/s*100:0,v:s/255*100,a:o}},Ps=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),d=r*(1-(e-s)*t),c=r*(1-(1-e+s)*t),h=s%6;return{r:255*[r,d,a,a,c,r][h],g:255*[c,r,r,d,a,a][h],b:255*[a,a,c,r,r,d][h],a:o}},As=function(i){return{h:xs(i.h),s:Z(i.s,0,100),l:Z(i.l,0,100),a:Z(i.a)}},Os=function(i){return{h:N(i.h),s:N(i.s),l:N(i.l),a:N(i.a,3)}},zs=function(i){return Ps((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},Ht=function(i){return{h:(e=Ss(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},cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,dc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zo={string:[[function(i){var e=uc.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?N(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?N(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var e=hc.exec(i)||pc.exec(i);return e?e[2]!==e[4]||e[4]!==e[6]?null:Cs({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=cc.exec(i)||dc.exec(i);if(!e)return null;var t,r,o=As({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(lc[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return zs(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 ve(e)&&ve(t)&&ve(r)?Cs({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(!ve(e)||!ve(t)||!ve(r))return null;var a=As({h:Number(e),s:Number(t),l:Number(r),a:Number(s)});return zs(a)},"hsl"],[function(i){var e=i.h,t=i.s,r=i.v,o=i.a,s=o===void 0?1:o;if(!ve(e)||!ve(t)||!ve(r))return null;var a=function(d){return{h:xs(d.h),s:Z(d.s,0,100),v:Z(d.v,0,100),a:Z(d.a)}}({h:Number(e),s:Number(t),v:Number(r),a:Number(s)});return Ps(a)},"hsv"]]},Ls=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]},bc=function(i){return typeof i=="string"?Ls(i.trim(),Zo.string):typeof i=="object"&&i!==null?Ls(i,Zo.object):[null,void 0]},Qo=function(i,e){var t=Ht(i);return{h:t.h,s:Z(t.s+100*e,0,100),l:t.l,a:t.a}},Jo=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Ts=function(i,e){var t=Ht(i);return{h:t.h,s:t.s,l:Z(t.l+100*e,0,100),a:t.a}},Si=function(){function i(e){this.parsed=bc(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 N(Jo(this.rgba),2)},i.prototype.isDark=function(){return Jo(this.rgba)<.5},i.prototype.isLight=function(){return Jo(this.rgba)>=.5},i.prototype.toHex=function(){return e=Yo(this.rgba),t=e.r,r=e.g,o=e.b,a=(s=e.a)<1?Ci(N(255*s)):"","#"+Ci(t)+Ci(r)+Ci(o)+a;var e,t,r,o,s,a},i.prototype.toRgb=function(){return Yo(this.rgba)},i.prototype.toRgbString=function(){return e=Yo(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 Os(Ht(this.rgba))},i.prototype.toHslString=function(){return e=Os(Ht(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=Ss(this.rgba),{h:N(e.h),s:N(e.s),v:N(e.v),a:N(e.a,3)};var e},i.prototype.invert=function(){return J({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),J(Qo(this.rgba,e))},i.prototype.desaturate=function(e){return e===void 0&&(e=.1),J(Qo(this.rgba,-e))},i.prototype.grayscale=function(){return J(Qo(this.rgba,-1))},i.prototype.lighten=function(e){return e===void 0&&(e=.1),J(Ts(this.rgba,e))},i.prototype.darken=function(e){return e===void 0&&(e=.1),J(Ts(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"?J({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):N(this.rgba.a,3);var t},i.prototype.hue=function(e){var t=Ht(this.rgba);return typeof e=="number"?J({h:e,s:t.s,l:t.l,a:t.a}):N(t.h)},i.prototype.isEqual=function(e){return this.toHex()===J(e).toHex()},i}(),J=function(i){return i instanceof Si?i:new Si(i)},Ns=[],mc=function(i){i.forEach(function(e){Ns.indexOf(e)<0&&(e(Si,Zo),Ns.push(e))})};function vc(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 d,c,h=r[this.toHex()];if(h)return h;if(a?.closest){var f=this.toRgb(),g=1/0,y="black";if(!s.length)for(var $ in t)s[$]=new i(t[$]).toRgb();for(var I in t){var S=(d=f,c=s[I],Math.pow(d.r-c.r,2)+Math.pow(d.g-c.g,2)+Math.pow(d.b-c.b,2));S<g&&(g=S,y=I)}return y}},e.string.push([function(a){var d=a.toLowerCase(),c=d==="transparent"?"#0000":t[d];return c?new i(c).toRgb():null},"name"])}let Pi=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Pi.CHANGE="change";var gc=Object.defineProperty,fc=Object.getOwnPropertyDescriptor,L=(i,e,t,r)=>{for(var o=r>1?void 0:r?fc(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};mc([vc]);const Ms="EyeDropper"in window;n.UUIColorPickerElement=class extends ie("label",m){constructor(){super(...arguments),this.inputValue="",this.hue=0,this.saturation=0,this.lightness=0,this.alpha=100,this._colord=J("hsl(0, 0%, 0%)"),this.value="",this.format="hex",this.name="",this.size="medium",this.noFormatToggle=!1,this.inline=!1,this.disabled=!1,this.opacity=!1,this.uppercase=!1,this.swatches=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000","#444","#888","#ccc","#fff"]}connectedCallback(){super.connectedCallback(),this.value?this.setColor(this.value):this.setColor("#000"),w(this,"uui-icon"),w(this,"uui-icon-registry-essential"),w(this,"uui-input"),w(this,"uui-button"),w(this,"uui-button-group"),w(this,"uui-color-swatches"),w(this,"uui-color-swatch"),w(this,"uui-color-area"),w(this,"uui-color-slider"),w(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:d}=this._colord.toRgb(),{h:c,s:h,l:f}=this._colord.toHsl(),{v:g}=this._colord.toHsv(),y=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}, ${d})`);case"rgba":return this.setLetterCase(this._colord.toRgbString());case"hsl":return this.setLetterCase(`hsl(${c}, ${h}%, ${f}%)`);case"hsla":return this.setLetterCase(this._colord.toHslString());case"hsv":return this.setLetterCase(`hsv(${c}, ${h}%, ${f}%)`);case"hsva":return this.setLetterCase(`hsva(${c}, ${h}%, ${g}%, ${y})`);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){this._swatches?.resetSelection();const t=e.target;t.value?(this.setColor(t.value),t.value=this.value):this.setColor("#000"),e.stopPropagation()}handleInputKeyDown(e){e.key==="Enter"&&(this.inputValue?(this.setColor(this.inputValue),this._swatches?.resetSelection(),this.inputValue=this.value,setTimeout(()=>this._input.select())):this.setColor("#000"))}handleColorSwatchChange(e){e.stopImmediatePropagation();const t=e.target;t.value?this.setColor(t.value):this.setColor("#000")}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(){Ms&&new EyeDropper().open().then(e=>this.setColor(e.sRGBHex)).catch(()=>{})}setColor(e){const t=new Si(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 d=e;return d&&d.h&&(this.hue=d.h),this._colord=t,this._syncValues(),this.dispatchEvent(new Pi(Pi.CHANGE)),!0}setLetterCase(e){return typeof e!="string"?"":this.uppercase?e.toUpperCase():e.toLowerCase()}getHexString(e,t,r,o=100){const s=J(`hsla(${e}, ${t}%, ${r}%, ${o/100})`);return s.isValid()?s.toHex():""}_syncValues(){this.inputValue=this.getFormattedValue(this.format),this.value=this.inputValue}_renderColorPicker(){return u`<div class="${Go({"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}" @change="${this.handleGridChange}"></uui-color-area><div class="color-picker__controls"><div class="color-picker__sliders"><uui-color-slider label="hue" class="hue-slider" .value="${Math.round(this.hue)}" ?disabled="${this.disabled}" @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}" @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="${ne({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" @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="${ac(this.inputValue)}" ?disabled="${this.disabled}" @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>`} ${Ms?u`<uui-button label="Select a color" ?disabled="${this.disabled}" @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?u`<uui-color-swatches id="swatches" class="color-picker__swatches" ?disabled="${this.disabled}" @change="${this.handleColorSwatchChange}">${this.swatches.map(e=>u`<uui-color-swatch label="${e}" .value="${e}"></uui-color-swatch>`)}</uui-color-swatches>`:E}_renderPreviewButton(){return u`<button type="button" part="trigger" aria-label="${this.label||"Open Color picker"}" class="${Go({"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="${ne({"--preview-color":`hsla(${this.hue}deg, ${this.saturation}%, ${this.lightness}%, ${this.alpha/100})`})}" ?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=[p`:host{--uui-look-outline-border:#ddd;--uui-look-outline-border-hover:#aaa;font-size:.8rem;display:block;width:var(--uui-color-picker-width,280px)}uui-popover-container{width:inherit}.color-picker{width:100%;background-color:#fff;user-select:none;border:solid 1px #e4e4e7}.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;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);background-color:var(--preview-color)}.color-dropdown__trigger--empty::before{background-color:transparent}.color-picker__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-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 #d4d4d8;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%}`],L([C('[part="input"]')],n.UUIColorPickerElement.prototype,"_input",2),L([C(".color-picker__preview")],n.UUIColorPickerElement.prototype,"_previewButton",2),L([C("#swatches")],n.UUIColorPickerElement.prototype,"_swatches",2),L([v()],n.UUIColorPickerElement.prototype,"inputValue",2),L([v()],n.UUIColorPickerElement.prototype,"hue",2),L([v()],n.UUIColorPickerElement.prototype,"saturation",2),L([v()],n.UUIColorPickerElement.prototype,"lightness",2),L([v()],n.UUIColorPickerElement.prototype,"alpha",2),L([v()],n.UUIColorPickerElement.prototype,"_colord",2),L([l()],n.UUIColorPickerElement.prototype,"value",2),L([l()],n.UUIColorPickerElement.prototype,"format",2),L([l()],n.UUIColorPickerElement.prototype,"name",2),L([l()],n.UUIColorPickerElement.prototype,"size",2),L([l({attribute:"no-format-toggle",type:Boolean})],n.UUIColorPickerElement.prototype,"noFormatToggle",2),L([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"inline",2),L([l({type:Boolean,reflect:!0})],n.UUIColorPickerElement.prototype,"disabled",2),L([l({type:Boolean})],n.UUIColorPickerElement.prototype,"opacity",2),L([l({type:Boolean})],n.UUIColorPickerElement.prototype,"uppercase",2),L([l({attribute:!1})],n.UUIColorPickerElement.prototype,"swatches",2),n.UUIColorPickerElement=L([b("uui-color-picker")],n.UUIColorPickerElement);let Ai=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Ai.CHANGE="change";var yc=Object.defineProperty,_c=Object.getOwnPropertyDescriptor,ge=(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&&yc(e,t,o),o};n.UUIColorSliderElement=class extends ie("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.disabled=!1}willUpdate(e){e.has("type")&&(this.type==="hue"?(this.max=360,this.precision=1):this.type==="opacity"&&(this.max=100,this.precision=1))}firstUpdated(){this.container=this.shadowRoot.querySelector("#color-slider"),this.handle=this.container.querySelector("#color-slider__handle")}handleDrag(e){if(this.disabled||!this.container||!this.handle)return;const{width:t,height:r}=this.container.getBoundingClientRect();this.handle.focus(),e.preventDefault(),Kn(this.container,{onMove:(o,s)=>{this.vertical?this.value=Xn(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.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 Ai(Ai.CHANGE))}get cssPropCurrentValue(){return this.value===0?this.vertical?100:0:100/(this.vertical?this.max/Xn(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="${ne({backgroundImage:`linear-gradient(to ${this.vertical?"top":"right"},
|
|
283
283
|
transparent 0%,
|
|
284
284
|
${this.color} 100%
|
|
285
|
-
)`})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.cssPropCurrentValue}" tabindex="${
|
|
285
|
+
)`})}"></div>`:""} <span id="color-slider__handle" style="--current-value:${this.cssPropCurrentValue}" tabindex="${U(this.disabled?void 0:"0")}"></span></div>${Math.round(this.value)}`}},n.UUIColorSliderElement.styles=[p`: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(
|
|
286
286
|
to right,
|
|
287
287
|
rgb(255, 0, 0) 0%,
|
|
288
288
|
rgb(255, 255, 0) 17%,
|
|
@@ -304,25 +304,25 @@
|
|
|
304
304
|
45deg,
|
|
305
305
|
var(--uui-palette-grey,#c4c4c4) 25%,
|
|
306
306
|
transparent 25%
|
|
307
|
-
),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}#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}`],jt([a({reflect:!0})],ht.prototype,"type",2),jt([a()],ht.prototype,"color",2),jt([a({type:Number})],ht.prototype,"min",2),jt([a({type:Number})],ht.prototype,"max",2),jt([a({type:Number})],ht.prototype,"precision",2),jt([a({type:Boolean,reflect:!0})],ht.prototype,"vertical",2),jt([a()],ht.prototype,"value",2),jt([a({type:Boolean,reflect:!0})],ht.prototype,"disabled",2),ht=jt([p("uui-color-slider")],ht);var ch=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,ki=(i,t,e,r)=>{for(var o=r>1?void 0:r?hh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&ch(t,e,o),o};let pe=class extends vt("label",Le(gi(b))){constructor(){super(),this.disabled=!1,this.showLabel=!1,this.addEventListener("click",this._setAriaAttributes)}get value(){return this._value??""}set value(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}get color(){return this._color}set color(t){const e=this._color;this._color=t,this.requestUpdate("color",e)}_setAriaAttributes(){this.selectable&&this.setAttribute("aria-checked",this.selected.toString())}firstUpdated(){this._setAriaAttributes()}willUpdate(t){t.has("disabled")&&this.selectable&&(this.selectable=!this.disabled,this.deselectable=!this.disabled),(t.has("selectable")||t.has("selected"))&&this._setAriaAttributes()}render(){return l`<button id="swatch" aria-label="${this.label}" aria-disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background-color:var(--uui-swatch-color,${this.color??this.value})"></div><div class="color-swatch__check" style="color:var(--uui-swatch-color,${this.color??this.value})">${fo}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?l`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:_}};pe.styles=[d`: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}#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}`],ki([a()],pe.prototype,"value",1),ki([a()],pe.prototype,"color",1),ki([a({type:Boolean,reflect:!0})],pe.prototype,"disabled",2),ki([a({type:Boolean,attribute:"show-label",reflect:!0})],pe.prototype,"showLabel",2),pe=ki([p("uui-color-swatch")],pe);let Ei=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Ei.CHANGE="change";var dh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Eo=(i,t,e,r)=>{for(var o=r>1?void 0:r?ph(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&dh(t,e,o),o};let Be=class extends vt("label",b){constructor(){super(),this.value="",this.disabled=!1,this._onSelected=t=>{const e=t.target;this.swatches.includes(e)&&(this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=e,this._activeElement=this._selectedElement,this.value=this._selectedElement.value||"",this.dispatchEvent(new Ei(Ei.CHANGE)))},this._onDeselected=t=>{const e=t.target;this.swatches.includes(e)&&(this._activeElement===e&&(this._activeElement=void 0),this._selectedElement===e&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0,this.value="",this.dispatchEvent(new Ei(Ei.CHANGE))))},this.addEventListener(Kt.SELECTED,this._onSelected),this.addEventListener(Kt.DESELECTED,this._onDeselected)}get _activeElement(){return this.__activeElement}set _activeElement(t){this.__activeElement&&(this.__activeElement.active=!1),t&&(t.active=!0,this.__activeElement=t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(t){t.has("label")&&this.setAttribute("aria-label",this.label)}_handleSlotChange(){!this.swatches||this.swatches.length===0||this.swatches.forEach(t=>{t.setAttribute("aria-checked","false"),t.setAttribute("role","radio"),this.disabled?t.setAttribute("disabled",""):t.setAttribute("selectable","selectable"),this.value!==""&&t.value===this.value&&(t.selected=!0,t.setAttribute("aria-checked","true"),this._selectedElement=t,this._activeElement=this._selectedElement)})}resetSelection(){this.swatches.forEach(t=>{t.selected=!1,t.active=!1,t.selectable=!t.disabled}),this._activeElement=void 0,this._selectedElement=void 0,this.value=""}render(){return l`<slot @slotchange="${this._handleSlotChange}"></slot>`}};Be.styles=[d`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],Eo([a()],Be.prototype,"value",2),Eo([a({type:Boolean,reflect:!0})],Be.prototype,"disabled",2),Eo([Ft({selector:"uui-color-swatch"})],Be.prototype,"swatches",2),Be=Eo([p("uui-color-swatches")],Be);let yt=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};yt.CHANGE="change",yt.INNER_SLOT_CHANGE="inner-slot-change";var bh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Yt=(i,t,e,r)=>{for(var o=r>1?void 0:r?vh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&bh(t,e,o),o},gh=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},fh=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},ul=(i,t,e)=>(gh(i,t,"access private method"),e),Co,bs;let xt=class extends b{constructor(){super(...arguments),fh(this,Co),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{ul(this,Co,bs).call(this),this._updateSelection(),this.dispatchEvent(new yt(yt.INNER_SLOT_CHANGE))},this._onSelected=t=>{this._selectedElement&&(this._selectedElement.selected=!1,this._selectedElement.active=!1,this._selectedElement=void 0),this._selectedElement=t.composedPath()[0],this.value=this._selectedElement.value||"",this.displayValue=this._selectedElement.displayValue||"",this.dispatchEvent(new yt(yt.CHANGE))},this._onDeselected=t=>{const e=t.composedPath()[0];this._selectedElement===e&&(this.value="",this.displayValue="",this.dispatchEvent(new yt(yt.CHANGE)))},this._moveIndex=t=>{const e=Math.min(Math.max(this._getActiveIndex+t,0),this._options.length-1);this._goToIndex(e)},this._onKeyDown=t=>{if(!(this._options.length<=0))switch(t.key){case"ArrowUp":t.preventDefault(),t.ctrlKey?this._moveIndex(-10):this._moveIndex(-1);break;case"ArrowDown":t.preventDefault(),t.ctrlKey?this._moveIndex(10):this._moveIndex(1);break;case"Home":{t.preventDefault(),this._goToIndex(0);break}case"Enter":{t.preventDefault(),this._getActiveElement?.click();break}case"End":{t.preventDefault(),this._goToIndex(this._options.length-1);break}}}}get value(){return this._value}set value(t){if(this._value===t)return;const e=this._value;this._value=t,this._updateSelection(),this.requestUpdate("value",e)}get for(){return this._for}set for(t){this._for&&this._for.removeEventListener("keydown",this._onKeyDown),this._for=t,this._for&&this._for.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this._for||(this._for=this),this.addEventListener(Kt.SELECTED,this._onSelected),this.addEventListener(Kt.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Kt.SELECTED,this._onSelected),this.removeEventListener(Kt.DESELECTED,this._onDeselected)}_updateSelection(){this.displayValue="";for(const t of this._options)t.value===this._value?(this.displayValue=t.displayValue||"",t.selected=!0):t.selected=!1}get _getActiveIndex(){return this._activeElementValue===null?-1:this._options.findIndex(t=>t.value===this._activeElementValue)}get _getActiveElement(){return this._activeElementValue===null?null:this._options.find(t=>t.value===this._activeElementValue)}_goToIndex(t){if(this._options.length===0)return;t=Math.min(Math.max(t,0),this._options.length-1);const e=this._options[t];this._activeElementValue=e.value,ul(this,Co,bs).call(this),e&&e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return l`<slot @slotchange="${this._onSlotChange}"></slot>`}};Co=new WeakSet,bs=function(){for(let t=0;t<this._activeOptions.length;t++)this._activeOptions[t].active=!1;const i=this._getActiveElement;i?i.active=!0:this._goToIndex(0)},xt.styles=[d`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Yt([a()],xt.prototype,"value",1),Yt([a({type:String})],xt.prototype,"displayValue",2),Yt([a({attribute:!1})],xt.prototype,"for",1),Yt([Ft({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],xt.prototype,"_options",2),Yt([Ft({flatten:!0,selector:"uui-combobox-list-option[active]"})],xt.prototype,"_activeOptions",2),Yt([v()],xt.prototype,"_value",2),Yt([v()],xt.prototype,"_activeElementValue",2),xt=Yt([p("uui-combobox-list")],xt);var mh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,Re=(i,t,e,r)=>{for(var o=r>1?void 0:r?yh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&mh(t,e,o),o};let Zt=class extends Le(gi(b)){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(t){const e=this._value;this._value=t,this.requestUpdate("value",e)}get displayValue(){return this._displayValue?this._displayValue:this.textContent?.trim()||""}set displayValue(t){const e=this._displayValue;this._displayValue=t,this.requestUpdate("displayValue",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.selectable=!this._disabled,this.requestUpdate("disabled",e)}render(){return l`<slot></slot>`}};Zt.styles=[d`:host{position:relative;cursor:pointer;margin:0 4px;border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px;padding-left:4px}: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)}`],Re([v()],Zt.prototype,"_disabled",2),Re([v()],Zt.prototype,"_displayValue",2),Re([a({type:String})],Zt.prototype,"value",1),Re([a({type:String,attribute:"display-value"})],Zt.prototype,"displayValue",1),Re([a({type:Boolean,reflect:!0})],Zt.prototype,"disabled",1),Zt=Re([p("uui-combobox-list-option")],Zt);let rt=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};rt.SEARCH="search",rt.CHANGE="change";var xh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,Z=(i,t,e,r)=>{for(var o=r>1?void 0:r?_h(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&xh(t,e,o),o},vs=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},k=(i,t,e)=>(vs(i,t,"read from private field"),e?e.call(i):t.get(i)),B=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},cl=(i,t,e,r)=>(vs(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e),gs=(i,t,e)=>(vs(i,t,"access private method"),e),dt,Ue,Ci,Si,So,Po,Ao,fs,ms,ys,xs,Oo,Ge,_s,zo,Lo,ws,Io;let q=class extends gt(b){constructor(){super(...arguments),B(this,Si),this.closeLabel="Close",this.disabled=!1,B(this,dt,void 0),B(this,Ue,void 0),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,B(this,Ci,()=>{this._isPhone=k(this,Ue).matches}),B(this,Po,()=>requestAnimationFrame(()=>this._inputElement.focus())),B(this,Ao,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||k(this,Ge).call(this)})),B(this,fs,t=>{t.preventDefault(),t.stopImmediatePropagation(),this.search=t.target.value,this.dispatchEvent(new rt(rt.SEARCH)),k(this,Oo).call(this)}),B(this,ms,()=>{this.value&&this.value!==k(this,dt)?.value&&gs(this,Si,So).call(this,this.value)}),B(this,ys,()=>{this.value=k(this,dt)?.value||"",this.search=this.value?this.search:"",k(this,Ge).call(this),this.dispatchEvent(new rt(rt.CHANGE))}),B(this,xs,()=>{this.open=!this.open}),B(this,Oo,()=>{this.open||(this.open=!0)}),B(this,Ge,()=>{this.open&&(this.open=!1,this.search="",this._inputElement.value=this._displayValue,this.dispatchEvent(new rt(rt.SEARCH)))}),B(this,_s,t=>{this.open===!1&&t.key==="Enter"&&(t.preventDefault(),t.stopImmediatePropagation()),(t.key==="ArrowUp"||t.key==="ArrowDown")&&k(this,Oo).call(this),(t.key==="Escape"||t.key==="Enter")&&k(this,Ge).call(this)}),B(this,zo,t=>{t.key&&t.key!=="Enter"||(t.preventDefault(),t.stopImmediatePropagation(),this.value="",this.search="",this._inputElement.value=this._displayValue,this._inputElement.focus(),this.dispatchEvent(new rt(rt.SEARCH)),this.dispatchEvent(new rt(rt.CHANGE)))}),B(this,Lo,()=>l`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" autocomplete="off" .disabled="${this.disabled}" popovertarget="combobox-popover" @click="${k(this,xs)}" @input="${k(this,fs)}" @keydown="${k(this,_s)}"><slot name="input-prepend" slot="prepend"></slot>${this.disabled?"":k(this,ws).call(this)}<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>`),B(this,ws,()=>this.value||this.search?l`<uui-button id="clear-button" @click="${k(this,zo)}" @keydown="${k(this,zo)}" label="clear" slot="append" compact="compact" style="height:100%"><uui-icon name="remove" .fallback="${Wr.strings[0]}"></uui-icon></uui-button>`:""),B(this,Io,()=>l`<div id="dropdown"><uui-scroll-container tabindex="-1" id="scroll-container"><slot></slot></uui-scroll-container></div>`)}get value(){return this._value}set value(t){typeof t=="string"&&gs(this,Si,So).call(this,t),super.value=t}get search(){return this._search}set search(t){if(this.search===t)return;const e=this._search;this._search=t,this.requestUpdate("search",e)}get open(){return this._isOpen}set open(t){const e=t;this._isOpen=t;const r=this._comboboxPopoverElement;if(r)if(t){const o=this._inputElement.offsetWidth;r.style.setProperty("--popover-width",`${o}px`),r.showPopover()}else r.hidePopover();this.requestUpdate("open",e)}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",k(this,Ao)),this.addEventListener("mousedown",k(this,Po)),cl(this,Ue,window.matchMedia("(max-width: 600px)")),k(this,Ci).call(this),k(this,Ue).addEventListener("change",k(this,Ci)),x(this,"uui-icon"),x(this,"uui-input"),x(this,"uui-button"),x(this,"uui-combobox-list"),x(this,"uui-scroll-container"),x(this,"uui-popover-container"),x(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",k(this,Ao)),this.removeEventListener("mousedown",k(this,Po)),k(this,Ue).removeEventListener("change",k(this,Ci))}async firstUpdated(){const t=this._comboboxListElements?.[0];t&&(cl(this,dt,t),k(this,dt).for=this,k(this,dt).addEventListener(yt.CHANGE,k(this,ys)),k(this,dt).addEventListener(yt.INNER_SLOT_CHANGE,k(this,ms)),await this.updateComplete,gs(this,Si,So).call(this,this.value))}getFormElement(){return this._inputElement}render(){return this._isPhone&&this.open?l`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${k(this,Ge)}">${this.closeLabel}</uui-button>${k(this,Lo).call(this)} ${k(this,Io).call(this)}</div>`:l`${k(this,Lo).call(this)}<uui-popover-container id="combobox-popover" popover="manual" placement="bottom-end">${k(this,Io).call(this)}</uui-popover-container>`}};dt=new WeakMap,Ue=new WeakMap,Ci=new WeakMap,Si=new WeakSet,So=function(i){k(this,dt)&&(k(this,dt).value=i,requestAnimationFrame(()=>this._displayValue=k(this,dt).displayValue||""))},Po=new WeakMap,Ao=new WeakMap,fs=new WeakMap,ms=new WeakMap,ys=new WeakMap,xs=new WeakMap,Oo=new WeakMap,Ge=new WeakMap,_s=new WeakMap,zo=new WeakMap,Lo=new WeakMap,ws=new WeakMap,Io=new WeakMap,q.styles=[d`:host{display:inline-block}#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}#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%;height: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}`],Z([a({attribute:"value",reflect:!0})],q.prototype,"value",1),Z([a({type:String})],q.prototype,"search",1),Z([a({type:Boolean})],q.prototype,"open",1),Z([a({type:String})],q.prototype,"closeLabel",2),Z([a({type:Boolean,reflect:!0})],q.prototype,"disabled",2),Z([S("#combobox-input")],q.prototype,"_inputElement",2),Z([S("#combobox-popover")],q.prototype,"_comboboxPopoverElement",2),Z([Ft({flatten:!0,selector:"uui-combobox-list"})],q.prototype,"_comboboxListElements",2),Z([v()],q.prototype,"_displayValue",2),Z([v()],q.prototype,"_search",2),Z([v()],q.prototype,"_isPhone",2),Z([v()],q.prototype,"_isOpen",2),q=Z([p("uui-combobox")],q);var wh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,$s=(i,t,e,r)=>{for(var o=r>1?void 0:r?$h(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&wh(t,e,o),o};let Pi=class extends b{constructor(){super(...arguments),this.headline=null,this._headlineSlotHasContent=!1,this._headlineSlotChanged=t=>{this._headlineSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}}renderHeadline(){return l`<h3 style="${this._headlineSlotHasContent||this.headline!==null?"":"display: none"}">${this.headline}<slot name="headline" @slotchange="${this._headlineSlotChanged}"></slot></h3>`}renderContent(){return l`<slot></slot>`}renderActions(){return l`<slot id="actions" name="actions"></slot>`}render(){return l`${this.renderHeadline()} ${this.renderContent()} ${this.renderActions()}`}};Pi.styles=[d`: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)}`],$s([a({type:String})],Pi.prototype,"headline",2),$s([v()],Pi.prototype,"_headlineSlotHasContent",2),Pi=$s([p("uui-dialog-layout")],Pi);var kh=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,Ch=(i,t,e,r)=>{for(var o=r>1?void 0:r?Eh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&kh(t,e,o),o};let ks=class extends b{render(){return l`<slot></slot>`}};ks.styles=[d`: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))}`],ks=Ch([p("uui-dialog")],ks);let Ai=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Ai.CHANGE="change";var Sh=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,Oi=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ph(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Sh(t,e,o),o};let be=class extends vt("",b){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",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(t){if(t){const r=[],o=[];t.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 e=this._accept;this._accept=t,this.requestUpdate("accept",e)}get accept(){return this._accept}browse(){this._input.click()}connectedCallback(){super.connectedCallback(),x(this,"uui-symbol-file-dropzone")}async _getAllFileEntries(t){const e=[],r=[...t];for(;r.length>0;){const o=r.shift();if(o.kind==="file"){const s=o.getAsFile();if(!s)continue;this._isAccepted(s)&&e.push(s)}else if(o.kind==="directory"){if(!("webkitGetAsEntry"in o))continue;const s=o.webkitGetAsEntry();r.push(...await this._readAllDirectoryEntries(s.createReader()))}}return e}async _readAllDirectoryEntries(t){const e=[];let r=await this._readEntriesPromise(t);for(;r.length>0;)e.push(...r),r=await this._readEntriesPromise(t);return e}async _readEntriesPromise(t){return new Promise((e,r)=>{try{t.readEntries(e,r)}catch(o){console.log(o),r(o)}})}_isAccepted(t){if(this._acceptedFileExtensions.length===0&&this._acceptedMimeTypes.length===0)return!0;const e=t.type.toLowerCase(),r=t.name.split(".").pop();if(r&&this._acceptedFileExtensions.includes(r.toLowerCase()))return!0;for(const o in this._acceptedMimeTypes)if(e===o||o.endsWith("/*")&&e.startsWith(o.replace("/*","")))return!0;return!1}async _onDrop(t){t.preventDefault(),this._dropzone.classList.remove("hover");const e=t.dataTransfer?.items;if(e){let r=await this._getAllFileEntries(e);this.multiple===!1&&r.length&&(r=[r[0]]),this.dispatchEvent(new Ai(Ai.CHANGE,{detail:{files:r}}))}}_onDragOver(t){t.preventDefault()}_onDragEnter(t){this._dropzone.classList.add("hover"),t.preventDefault()}_onDragLeave(t){this._dropzone.classList.remove("hover"),t.preventDefault()}_onFileInputChange(){const t=this._input.files?Array.from(this._input.files):[];this.dispatchEvent(new Ai(Ai.CHANGE,{detail:{files:t}}))}render(){return l`<div id="dropzone"><uui-symbol-file-dropzone id="symbol"></uui-symbol-file-dropzone>${this.renderLabel()} <input @click="${t=>t.stopImmediatePropagation()}" id="input" type="file" accept="${this.accept}" ?multiple="${this.multiple}" @change="${this._onFileInputChange}" aria-label="${this.label}"><slot></slot></div>`}};be.styles=[d`#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}`],Oi([S("#input")],be.prototype,"_input",2),Oi([S("#dropzone")],be.prototype,"_dropzone",2),Oi([a({type:String})],be.prototype,"accept",1),Oi([a({type:Boolean})],be.prototype,"multiple",2),be=Oi([p("uui-file-dropzone")],be);let Ah=class{static humanFileSize(t,e=!1,r=1){const o=e?1e3:1024;if(Math.abs(t)<o)return t+" B";const s=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let n=-1;const c=10**r;do t/=o,++n;while(Math.round(Math.abs(t)*c)/c>=o&&n<s.length-1);return t.toFixed(r)+" "+s[n]}};var Oh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,_t=(i,t,e,r)=>{for(var o=r>1?void 0:r?zh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Oh(t,e,o),o};let st=class extends b{constructor(){super(...arguments),this._name="",this._url="",this._extension="",this._src="",this._size=0,this._isDirectory=!1}get file(){return this._file}set file(t){const e=this._file;t instanceof File&&(this._name=t.name.split(".")[0],this._extension=t.name.split(".")[1],this._isDirectory=!1,this._size=t.size,this._isFileAnImage(t)&&(this._isImage=!0,this._getThumbnail(t).then(r=>{this._src=r})),this.requestUpdate("file",e))}connectedCallback(){super.connectedCallback(),x(this,"uui-symbol-file-thumbnail"),x(this,"uui-symbol-folder"),x(this,"uui-symbol-file")}_openSource(){window.open(this._url,"_blank")}_fileTypeTemplate(){return this._isDirectory?l`<uui-symbol-folder id="file-symbol"></uui-symbol-folder>`:this._isImage?l`<uui-symbol-file-thumbnail .src="${this._src}" .alt="${this._name}" id="file-symbol"></uui-symbol-file-thumbnail>`:l`<uui-symbol-file id="file-symbol" .type="${this._extension}"></uui-symbol-file>`}_renderLongName(){const t=this._name.substring(0,this._name.length-6),e=this._name.substring(this._name.length-6,this._name.length);return l`<span id="file-name" class="${this._url?"has-source":""}" @click="${()=>this._url?this._openSource():""}" @keydown="${()=>""}"><span id="file-name-start">${t}</span> <span id="file-name-end">${e}</span></span>`}_isFileAnImage(t){return t?t.type.split("/")[0]==="image":!1}async _getThumbnail(t){return await new Promise(e=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>{e(r.result)}})}render(){return l`<slot id="actions" name="actions"></slot>${this._fileTypeTemplate()}<div id="file-info">${this._renderLongName()} <span id="file-size">${this._size&&!this._isDirectory?l`${Ah.humanFileSize(this._size,!0)}`:""}</span></div>`}};st.styles=[d`: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}`],_t([v()],st.prototype,"_name",2),_t([v()],st.prototype,"_url",2),_t([v()],st.prototype,"_extension",2),_t([v()],st.prototype,"_src",2),_t([v()],st.prototype,"_size",2),_t([v()],st.prototype,"_isDirectory",2),_t([v()],st.prototype,"_file",2),_t([v()],st.prototype,"_isImage",2),_t([a({attribute:!1})],st.prototype,"file",1),st=_t([p("uui-file-preview")],st);var Lh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,jo=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ih(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Lh(t,e,o),o};let We=class extends b{constructor(){super(...arguments),this.description=null,this._labelSlotHasContent=!1,this._labelSlotChanged=t=>{this._labelSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0},this._descriptionSlotHasContent=!1,this._descriptionSlotChanged=t=>{this._descriptionSlotHasContent=t.target.assignedNodes({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),x(this,"uui-form-validation-message")}render(){return l`<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>`}};We.styles=[d`: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}`],jo([a({type:String})],We.prototype,"description",2),jo([v()],We.prototype,"_labelSlotHasContent",2),jo([v()],We.prototype,"_descriptionSlotHasContent",2),We=jo([p("uui-form-layout-item")],We);/**
|
|
307
|
+
),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}#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}`],ge([l({reflect:!0})],n.UUIColorSliderElement.prototype,"type",2),ge([l()],n.UUIColorSliderElement.prototype,"color",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"min",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"max",2),ge([l({type:Number})],n.UUIColorSliderElement.prototype,"precision",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"vertical",2),ge([l()],n.UUIColorSliderElement.prototype,"value",2),ge([l({type:Boolean,reflect:!0})],n.UUIColorSliderElement.prototype,"disabled",2),n.UUIColorSliderElement=ge([b("uui-color-slider")],n.UUIColorSliderElement);var wc=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,Rt=(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};n.UUIColorSwatchElement=class extends ie("label",rt(Dt(m))){constructor(){super(),this.disabled=!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")&&this.selectable&&(this.selectable=!this.disabled,this.deselectable=!this.disabled),(e.has("selectable")||e.has("selected"))&&this._setAriaAttributes()}render(){return u`<button id="swatch" aria-label="${this.label}" aria-disabled="${this.disabled}" title="${this.label}"><div class="color-swatch color-swatch--transparent-bg"><div class="color-swatch__color" style="background-color:var(--uui-swatch-color,${this.color??this.value})"></div><div class="color-swatch__check" style="color:var(--uui-swatch-color,${this.color??this.value})">${Ei}</div></div>${this._renderWithLabel()}</button>`}_renderWithLabel(){return this.showLabel?u`<div class="color-swatch__label"><strong>${this.renderLabel()}</strong> ${this.value}</div>`:E}},n.UUIColorSwatchElement.styles=[p`: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}#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}`],Rt([l()],n.UUIColorSwatchElement.prototype,"value",1),Rt([l()],n.UUIColorSwatchElement.prototype,"color",1),Rt([l({type:Boolean,reflect:!0})],n.UUIColorSwatchElement.prototype,"disabled",2),Rt([l({type:Boolean,attribute:"show-label",reflect:!0})],n.UUIColorSwatchElement.prototype,"showLabel",2),n.UUIColorSwatchElement=Rt([b("uui-color-swatch")],n.UUIColorSwatchElement);let dt=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};dt.CHANGE="change";var Ec=Object.defineProperty,$c=Object.getOwnPropertyDescriptor,Oi=(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&&Ec(e,t,o),o};n.UUIColorSwatchesElement=class extends ie("label",m){constructor(){super(),this.value="",this.disabled=!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 dt(dt.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 dt(dt.CHANGE))))},this.addEventListener(Se.SELECTED,this._onSelected),this.addEventListener(Se.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.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=[p`:host{display:flex;flex-wrap:wrap;gap:.4rem}`],Oi([l()],n.UUIColorSwatchesElement.prototype,"value",2),Oi([l({type:Boolean,reflect:!0})],n.UUIColorSwatchesElement.prototype,"disabled",2),Oi([Ce({selector:"uui-color-swatch"})],n.UUIColorSwatchesElement.prototype,"swatches",2),n.UUIColorSwatchesElement=Oi([b("uui-color-swatches")],n.UUIColorSwatchesElement);let ee=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};ee.CHANGE="change",ee.INNER_SLOT_CHANGE="inner-slot-change";var kc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,Pe=(i,e,t,r)=>{for(var o=r>1?void 0:r?Ic(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&&kc(e,t,o),o},xc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Cc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ds=(i,e,t)=>(xc(i,e,"access private method"),t),zi,er;n.UUIComboboxListElement=class extends m{constructor(){super(...arguments),Cc(this,zi),this.displayValue="",this._value="",this._activeElementValue=null,this._onSlotChange=()=>{Ds(this,zi,er).call(this),this._updateSelection(),this.dispatchEvent(new ee(ee.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 ee(ee.CHANGE))},this._onDeselected=e=>{const t=e.composedPath()[0];this._selectedElement===t&&(this.value="",this.displayValue="",this.dispatchEvent(new ee(ee.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(Se.SELECTED,this._onSelected),this.addEventListener(Se.DESELECTED,this._onDeselected)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._onKeyDown),this.removeEventListener(Se.SELECTED,this._onSelected),this.removeEventListener(Se.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,Ds(this,zi,er).call(this),t&&t.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}render(){return u`<slot @slotchange="${this._onSlotChange}"></slot>`}},zi=new WeakSet,er=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=[p`:host{display:flex;flex-direction:column;box-sizing:border-box}`],Pe([l()],n.UUIComboboxListElement.prototype,"value",1),Pe([l({type:String})],n.UUIComboboxListElement.prototype,"displayValue",2),Pe([l({attribute:!1})],n.UUIComboboxListElement.prototype,"for",1),Pe([Ce({flatten:!0,selector:"uui-combobox-list-option:not([disabled])"})],n.UUIComboboxListElement.prototype,"_options",2),Pe([Ce({flatten:!0,selector:"uui-combobox-list-option[active]"})],n.UUIComboboxListElement.prototype,"_activeOptions",2),Pe([v()],n.UUIComboboxListElement.prototype,"_value",2),Pe([v()],n.UUIComboboxListElement.prototype,"_activeElementValue",2),n.UUIComboboxListElement=Pe([b("uui-combobox-list")],n.UUIComboboxListElement);var Sc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,ht=(i,e,t,r)=>{for(var o=r>1?void 0:r?Pc(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};n.UUIComboboxListOptionElement=class extends rt(Dt(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=[p`:host{position:relative;cursor:pointer;margin:0 4px;border-radius:var(--uui-border-radius,3px);outline:2px solid transparent;outline-offset:-2px;padding-left:4px}: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)}`],ht([v()],n.UUIComboboxListOptionElement.prototype,"_disabled",2),ht([v()],n.UUIComboboxListOptionElement.prototype,"_displayValue",2),ht([l({type:String})],n.UUIComboboxListOptionElement.prototype,"value",1),ht([l({type:String,attribute:"display-value"})],n.UUIComboboxListOptionElement.prototype,"displayValue",1),ht([l({type:Boolean,reflect:!0})],n.UUIComboboxListOptionElement.prototype,"disabled",1),n.UUIComboboxListOptionElement=ht([b("uui-combobox-list-option")],n.UUIComboboxListOptionElement);let F=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};F.SEARCH="search",F.CHANGE="change";var Ac=Object.defineProperty,Oc=Object.getOwnPropertyDescriptor,G=(i,e,t,r)=>{for(var o=r>1?void 0:r?Oc(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},tr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},k=(i,e,t)=>(tr(i,e,"read from private field"),t?t.call(i):e.get(i)),M=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},js=(i,e,t,r)=>(tr(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),ir=(i,e,t)=>(tr(i,e,"access private method"),t),te,pt,Ft,Gt,Li,Ti,Ni,or,rr,nr,sr,Mi,bt,ar,Di,ji,lr,Bi;n.UUIComboboxElement=class extends oe(m){constructor(){super(...arguments),M(this,Gt),this.closeLabel="Close",this.disabled=!1,M(this,te,void 0),M(this,pt,void 0),this._displayValue="",this._search="",this._isPhone=!1,this._isOpen=!1,M(this,Ft,()=>{this._isPhone=k(this,pt).matches}),M(this,Ti,()=>requestAnimationFrame(()=>this._inputElement.focus())),M(this,Ni,()=>requestAnimationFrame(()=>{this.shadowRoot?.activeElement||k(this,bt).call(this)})),M(this,or,e=>{e.preventDefault(),e.stopImmediatePropagation(),this.search=e.target.value,this.dispatchEvent(new F(F.SEARCH)),k(this,Mi).call(this)}),M(this,rr,()=>{this.value&&this.value!==k(this,te)?.value&&ir(this,Gt,Li).call(this,this.value)}),M(this,nr,()=>{this.value=k(this,te)?.value||"",this.search=this.value?this.search:"",k(this,bt).call(this),this.dispatchEvent(new F(F.CHANGE))}),M(this,sr,()=>{this.open=!this.open}),M(this,Mi,()=>{this.open||(this.open=!0)}),M(this,bt,()=>{this.open&&(this.open=!1,this.search="",this._inputElement.value=this._displayValue,this.dispatchEvent(new F(F.SEARCH)))}),M(this,ar,e=>{this.open===!1&&e.key==="Enter"&&(e.preventDefault(),e.stopImmediatePropagation()),(e.key==="ArrowUp"||e.key==="ArrowDown")&&k(this,Mi).call(this),(e.key==="Escape"||e.key==="Enter")&&k(this,bt).call(this)}),M(this,Di,e=>{e.key&&e.key!=="Enter"||(e.preventDefault(),e.stopImmediatePropagation(),this.value="",this.search="",this._inputElement.value=this._displayValue,this._inputElement.focus(),this.dispatchEvent(new F(F.SEARCH)),this.dispatchEvent(new F(F.CHANGE)))}),M(this,ji,()=>u`<uui-input slot="trigger" id="combobox-input" label="combobox-input" type="text" .value="${this._displayValue}" autocomplete="off" .disabled="${this.disabled}" popovertarget="combobox-popover" @click="${k(this,sr)}" @input="${k(this,or)}" @keydown="${k(this,ar)}"><slot name="input-prepend" slot="prepend"></slot>${this.disabled?"":k(this,lr).call(this)}<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>`),M(this,lr,()=>this.value||this.search?u`<uui-button id="clear-button" @click="${k(this,Di)}" @keydown="${k(this,Di)}" label="clear" slot="append" compact="compact" style="height:100%"><uui-icon name="remove" .fallback="${Lo.strings[0]}"></uui-icon></uui-button>`:""),M(this,Bi,()=>u`<div id="dropdown"><uui-scroll-container tabindex="-1" id="scroll-container"><slot></slot></uui-scroll-container></div>`)}get value(){return this._value}set value(e){typeof e=="string"&&ir(this,Gt,Li).call(this,e),super.value=e}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._inputElement.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,Ni)),this.addEventListener("mousedown",k(this,Ti)),js(this,pt,window.matchMedia("(max-width: 600px)")),k(this,Ft).call(this),k(this,pt).addEventListener("change",k(this,Ft)),w(this,"uui-icon"),w(this,"uui-input"),w(this,"uui-button"),w(this,"uui-combobox-list"),w(this,"uui-scroll-container"),w(this,"uui-popover-container"),w(this,"uui-symbol-expand")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",k(this,Ni)),this.removeEventListener("mousedown",k(this,Ti)),k(this,pt).removeEventListener("change",k(this,Ft))}async firstUpdated(){const e=this._comboboxListElements?.[0];e&&(js(this,te,e),k(this,te).for=this,k(this,te).addEventListener(ee.CHANGE,k(this,nr)),k(this,te).addEventListener(ee.INNER_SLOT_CHANGE,k(this,rr)),await this.updateComplete,ir(this,Gt,Li).call(this,this.value))}getFormElement(){return this._inputElement}render(){return this._isPhone&&this.open?u`<div id="phone-wrapper"><uui-button label="close" look="primary" @click="${k(this,bt)}">${this.closeLabel}</uui-button>${k(this,ji).call(this)} ${k(this,Bi).call(this)}</div>`:u`${k(this,ji).call(this)}<uui-popover-container id="combobox-popover" popover="manual" placement="bottom-end">${k(this,Bi).call(this)}</uui-popover-container>`}},te=new WeakMap,pt=new WeakMap,Ft=new WeakMap,Gt=new WeakSet,Li=function(i){k(this,te)&&(k(this,te).value=i,requestAnimationFrame(()=>this._displayValue=k(this,te).displayValue||""))},Ti=new WeakMap,Ni=new WeakMap,or=new WeakMap,rr=new WeakMap,nr=new WeakMap,sr=new WeakMap,Mi=new WeakMap,bt=new WeakMap,ar=new WeakMap,Di=new WeakMap,ji=new WeakMap,lr=new WeakMap,Bi=new WeakMap,n.UUIComboboxElement.styles=[p`:host{display:inline-block}#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}#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%;height: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})],n.UUIComboboxElement.prototype,"closeLabel",2),G([l({type:Boolean,reflect:!0})],n.UUIComboboxElement.prototype,"disabled",2),G([C("#combobox-input")],n.UUIComboboxElement.prototype,"_inputElement",2),G([C("#combobox-popover")],n.UUIComboboxElement.prototype,"_comboboxPopoverElement",2),G([Ce({flatten:!0,selector:"uui-combobox-list"})],n.UUIComboboxElement.prototype,"_comboboxListElements",2),G([v()],n.UUIComboboxElement.prototype,"_displayValue",2),G([v()],n.UUIComboboxElement.prototype,"_search",2),G([v()],n.UUIComboboxElement.prototype,"_isPhone",2),G([v()],n.UUIComboboxElement.prototype,"_isOpen",2),n.UUIComboboxElement=G([b("uui-combobox")],n.UUIComboboxElement);var zc=Object.defineProperty,Lc=Object.getOwnPropertyDescriptor,ur=(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&&zc(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=[p`: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)}`],ur([l({type:String})],n.UUIDialogLayoutElement.prototype,"headline",2),ur([v()],n.UUIDialogLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIDialogLayoutElement=ur([b("uui-dialog-layout")],n.UUIDialogLayoutElement);var Tc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Mc=(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};n.UUIDialogElement=class extends m{render(){return u`<slot></slot>`}},n.UUIDialogElement.styles=[p`: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=Mc([b("uui-dialog")],n.UUIDialogElement);let mt=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};mt.CHANGE="change";var Dc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Wt=(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&&Dc(e,t,o),o};n.UUIFileDropzoneElement=class extends ie("",m){constructor(){super(),this._acceptedFileExtensions=[],this._acceptedMimeTypes=[],this._accept="",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()}connectedCallback(){super.connectedCallback(),w(this,"uui-symbol-file-dropzone")}async _getAllFileEntries(e){const t=[],r=[...e];for(;r.length>0;){const o=r.shift();if(o.kind==="file"){const s=o.getAsFile();if(!s)continue;this._isAccepted(s)&&t.push(s)}else if(o.kind==="directory"){if(!("webkitGetAsEntry"in o))continue;const s=o.webkitGetAsEntry();r.push(...await this._readAllDirectoryEntries(s.createReader()))}}return t}async _readAllDirectoryEntries(e){const t=[];let r=await this._readEntriesPromise(e);for(;r.length>0;)t.push(...r),r=await this._readEntriesPromise(e);return t}async _readEntriesPromise(e){return new Promise((t,r)=>{try{e.readEntries(t,r)}catch(o){console.log(o),r(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 in this._acceptedMimeTypes)if(t===o||o.endsWith("/*")&&t.startsWith(o.replace("/*","")))return!0;return!1}async _onDrop(e){e.preventDefault(),this._dropzone.classList.remove("hover");const t=e.dataTransfer?.items;if(t){let r=await this._getAllFileEntries(t);this.multiple===!1&&r.length&&(r=[r[0]]),this.dispatchEvent(new mt(mt.CHANGE,{detail:{files: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.dispatchEvent(new mt(mt.CHANGE,{detail:{files:e}}))}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=[p`#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}`],Wt([C("#input")],n.UUIFileDropzoneElement.prototype,"_input",2),Wt([C("#dropzone")],n.UUIFileDropzoneElement.prototype,"_dropzone",2),Wt([l({type:String})],n.UUIFileDropzoneElement.prototype,"accept",1),Wt([l({type:Boolean})],n.UUIFileDropzoneElement.prototype,"multiple",2),n.UUIFileDropzoneElement=Wt([b("uui-file-dropzone")],n.UUIFileDropzoneElement);let Bc=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 d=10**r;do e/=o,++a;while(Math.round(Math.abs(e)*d)/d>=o&&a<s.length-1);return e.toFixed(r)+" "+s[a]}};var Vc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,ae=(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&&Vc(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(),w(this,"uui-symbol-file-thumbnail"),w(this,"uui-symbol-folder"),w(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`${Bc.humanFileSize(this._size,!0)}`:""}</span></div>`}},n.UUIFilePreviewElement.styles=[p`: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}`],ae([v()],n.UUIFilePreviewElement.prototype,"_name",2),ae([v()],n.UUIFilePreviewElement.prototype,"_url",2),ae([v()],n.UUIFilePreviewElement.prototype,"_extension",2),ae([v()],n.UUIFilePreviewElement.prototype,"_src",2),ae([v()],n.UUIFilePreviewElement.prototype,"_size",2),ae([v()],n.UUIFilePreviewElement.prototype,"_isDirectory",2),ae([v()],n.UUIFilePreviewElement.prototype,"_file",2),ae([v()],n.UUIFilePreviewElement.prototype,"_isImage",2),ae([l({attribute:!1})],n.UUIFilePreviewElement.prototype,"file",1),n.UUIFilePreviewElement=ae([b("uui-file-preview")],n.UUIFilePreviewElement);var Rc=Object.defineProperty,Fc=Object.getOwnPropertyDescriptor,Vi=(i,e,t,r)=>{for(var o=r>1?void 0:r?Fc(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&&Rc(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(),w(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=[p`: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}`],Vi([l({type:String})],n.UUIFormLayoutItemElement.prototype,"description",2),Vi([v()],n.UUIFormLayoutItemElement.prototype,"_labelSlotHasContent",2),Vi([v()],n.UUIFormLayoutItemElement.prototype,"_descriptionSlotHasContent",2),n.UUIFormLayoutItemElement=Vi([b("uui-form-layout-item")],n.UUIFormLayoutItemElement);/**
|
|
308
308
|
* @license
|
|
309
309
|
* Copyright 2017 Google LLC
|
|
310
310
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
311
|
-
*/const
|
|
311
|
+
*/const Bs=(i,e,t)=>{const r=new Map;for(let o=e;o<=t;o++)r.set(i[o],o);return r},cr=at(class extends lt{constructor(i){if(super(i),i.type!==Q.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 d of i)o[a]=r?r(d,a):a,s[a]=t(d,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=sc(i),{values:a,keys:d}=this.ct(e,t,r);if(!Array.isArray(s))return this.ut=d,a;const c=(o=this.ut)!==null&&o!==void 0?o:this.ut=[],h=[];let f,g,y=0,$=s.length-1,I=0,S=a.length-1;for(;y<=$&&I<=S;)if(s[y]===null)y++;else if(s[$]===null)$--;else if(c[y]===d[I])h[I]=Re(s[y],a[I]),y++,I++;else if(c[$]===d[S])h[S]=Re(s[$],a[S]),$--,S--;else if(c[y]===d[S])h[S]=Re(s[y],a[S]),Vt(i,h[S+1],s[y]),y++,S--;else if(c[$]===d[I])h[I]=Re(s[$],a[I]),Vt(i,s[y],s[$]),$--,I++;else if(f===void 0&&(f=Bs(d,I,S),g=Bs(c,y,$)),f.has(c[y]))if(f.has(c[$])){const H=g.get(d[I]),$e=H!==void 0?s[H]:null;if($e===null){const ke=Vt(i,s[y]);Re(ke,a[I]),h[I]=ke}else h[I]=Re($e,a[I]),Vt(i,s[y],$e),s[H]=null;I++}else Xo(s[$]),$--;else Xo(s[y]),y++;for(;I<=S;){const H=Vt(i,h[S+1]);Re(H,a[I]),h[I++]=H}for(;y<=$;){const H=s[y++];H!==null&&Xo(H)}return this.ut=d,Is(i,h),R}});var Gc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Vs=(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.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()},this._onControlValid=e=>{const t=e.composedPath()[0];this._messages.delete(t),this.requestUpdate()},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));const r=t||this,o=this._for;o!==r&&(o!==null&&(o.removeEventListener(st.INVALID,this._onControlInvalid),o.removeEventListener(st.VALID,this._onControlValid)),this._for=r,this._for.addEventListener(st.INVALID,this._onControlInvalid),this._for.addEventListener(st.VALID,this._onControlValid))}render(){return u`<slot></slot><div id="messages">${cr(this._messages,e=>u`<div>${e[1]}</div>`)}<slot name="message"></slot></div>`}},n.UUIFormValidationMessageElement.styles=[p`#messages{color:var(--uui-color-danger-standalone,#bf214e)}`],Vs([l({reflect:!1,attribute:!0})],n.UUIFormValidationMessageElement.prototype,"for",1),n.UUIFormValidationMessageElement=Vs([b("uui-form-validation-message")],n.UUIFormValidationMessageElement);var qc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,Xc=(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};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=Xc([b("uui-form")],n.UUIFormElement);/**
|
|
312
312
|
* @license
|
|
313
313
|
* Copyright 2017 Google LLC
|
|
314
314
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
315
|
-
*/let Cs=class extends De{constructor(t){if(super(t),this.et=_,t.type!==lt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_||t==null)return this.ft=void 0,this.et=t;if(t===X)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Cs.directiveName="unsafeHTML",Cs.resultType=1;const Ss=Me(Cs);let zi=class extends O{constructor(t,e={}){super(t,{bubbles:!0,composed:!0,...e}),this.icon=null}acceptRequest(t){this.icon=t,this.stopImmediatePropagation()}};zi.ICON_REQUEST="icon-request";var Hh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,ve=(i,t,e,r)=>{for(var o=r>1?void 0:r?Vh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Hh(t,e,o),o};let Nt=class extends b{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(t){this._name=t,this.shadowRoot&&this.requestIcon()}requestIcon(){if(this._name!==""&&this._name!==null){const t=new zi(zi.ICON_REQUEST,{detail:{iconName:this._name}});this.dispatchEvent(t),t.icon!==null?(this._retrievedNameIcon=!0,t.icon.then(e=>{this._useFallback=!1,this._nameSvg=e})):(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?l`<slot name="fallback"></slot>`:Ss(this.fallback):this._nameSvg!==null?Ss(this._nameSvg):this.svg!==null?Ss(this.svg):l`<slot></slot>`}};Nt.styles=[d`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor)}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],ve([v()],Nt.prototype,"_nameSvg",2),ve([a()],Nt.prototype,"label",2),ve([a()],Nt.prototype,"name",1),ve([a({attribute:!1})],Nt.prototype,"svg",2),ve([a({attribute:!1})],Nt.prototype,"fallback",2),ve([v()],Nt.prototype,"_useFallback",2),Nt=ve([p("uui-icon")],Nt);let bl=class{constructor(t){this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r}),t&&this.resolve(t)}set svg(t){this.resolve(t)}},vl=class{constructor(){this.icons={},this._onIconRequest=t=>{const e=this.getIcon(t.detail.iconName);e!==null&&t.acceptRequest(e)}}attach(t){t.addEventListener(zi.ICON_REQUEST,this._onIconRequest)}detach(t){t.removeEventListener(zi.ICON_REQUEST,this._onIconRequest)}defineIcon(t,e){if(this.icons[t]){this.icons[t].svg=e;return}this.icons[t]=new bl(e)}getIcon(t){return this.icons[t]||this.acceptIcon(t)?this.icons[t].promise:null}provideIcon(t){return this.icons[t]=new bl}acceptIcon(t){return!1}getIconNames(){return Object.keys(this.icons)}};var Bh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,gl=(i,t,e,r)=>{for(var o=r>1?void 0:r?Rh(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Bh(t,e,o),o};let Mo=class extends b{constructor(){super(),this._icons={},this._registry=new vl,this._registry.attach(this)}get icons(){return this._icons}set icons(t){this._icons=t,this._registry&&Object.entries(this._icons).forEach(([e,r])=>this._registry.defineIcon(e,r))}get registry(){return this._registry}set registry(t){this.registry&&this.registry.detach(this),t.attach(this),this._registry=t}render(){return l`<slot></slot>`}};gl([a({attribute:!1})],Mo.prototype,"_icons",2),Mo=gl([p("uui-icon-registry")],Mo);const Uh=y`<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>`,Gh=y`<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>`,Wh=y`<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>`,Fh=y`<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>`,qh=y`<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>`,Kh=y`<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>`,Xh=y`<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>`,Yh=y`<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>`,Zh=y`<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>`,Qh=y`<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>`,Jh=y`<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>`,td=y`<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>`,ed=y`<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>`,id=y`<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>`,od=y`<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=y`<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>`,sd=y`<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>`,nd=y`<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>`,ad=y`<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>`,ld=y`<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>`,ud=y`<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>`,cd=y`<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>`,hd=y`<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>`,dd=y`<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>`,pd=y`<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>`,bd=y`<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>`,vd=y`<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>`,gd=y`<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>`,fd=y`<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>`,md=y`<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>`,yd=y`<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>`,xd=y`<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 _d=class extends vl{constructor(){super(),this.defineIcon("add",Uh.strings[0]),this.defineIcon("alert",Gh.strings[0]),this.defineIcon("attachment",Wh.strings[0]),this.defineIcon("calendar",Fh.strings[0]),this.defineIcon("check",qh.strings[0]),this.defineIcon("clipboard",Kh.strings[0]),this.defineIcon("code",Xh.strings[0]),this.defineIcon("colorpicker",Yh.strings[0]),this.defineIcon("copy",Zh.strings[0]),this.defineIcon("delete",Qh.strings[0]),this.defineIcon("document",Jh.strings[0]),this.defineIcon("download",td.strings[0]),this.defineIcon("edit",ed.strings[0]),this.defineIcon("favorite",id.strings[0]),this.defineIcon("folder",od.strings[0]),this.defineIcon("forbidden",rd.strings[0]),this.defineIcon("info",sd.strings[0]),this.defineIcon("link",nd.strings[0]),this.defineIcon("lock",ad.strings[0]),this.defineIcon("pause",ld.strings[0]),this.defineIcon("picture",ud.strings[0]),this.defineIcon("play",cd.strings[0]),this.defineIcon("remove",hd.strings[0]),this.defineIcon("search",dd.strings[0]),this.defineIcon("see",pd.strings[0]),this.defineIcon("settings",bd.strings[0]),this.defineIcon("subtract",vd.strings[0]),this.defineIcon("sync",gd.strings[0]),this.defineIcon("unlock",fd.strings[0]),this.defineIcon("unsee",md.strings[0]),this.defineIcon("wand",yd.strings[0]),this.defineIcon("wrong",xd.strings[0])}};var wd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,kd=(i,t,e,r)=>{for(var o=r>1?void 0:r?$d(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&wd(t,e,o),o};let fl=class extends Mo{constructor(){super(),this.registry=new _d}};fl=kd([p("uui-icon-registry-essential")],fl);var Ed=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Fe=(i,t,e,r)=>{for(var o=r>1?void 0:r?Cd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Ed(t,e,o),o};let Qt=class extends gt(b){constructor(){super(),this.accept="",this.multiple=!1,this._files=[],this._updateFileWrappers=t=>{let e=[];for(const r of t)this.multiple?e.push(r):e=[r];this._files=e},this.addEventListener("dragenter",()=>this._setShowDropzone(!0)),this.addEventListener("dragleave",()=>this._setShowDropzone(!1)),this.addEventListener("drop",()=>this._setShowDropzone(!1))}get value(){return this._value}set value(t){if(super.value=t,t instanceof FormData){const e=this.multiple?t.getAll(this.name):[t.get(this.name)];this._updateFileWrappers(e);return}if(t instanceof File){this._updateFileWrappers([t]);return}}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-file-dropzone"),x(this,"uui-button"),x(this,"uui-action-bar"),x(this,"uui-file-preview")}getFormElement(){return this._dropZone}_handleClick(t){t.stopImmediatePropagation(),this._dropzone.browse()}async _handleFilesChange(t){const e=t.detail.files.filter(o=>o instanceof File||o.isFile);if(!this.multiple){const o=e[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(e.length>0&&!(this.value instanceof FormData)&&(r=new FormData),r instanceof FormData)for(const o of e){const s=o instanceof File;r.append(this.name,s?o:await this._getFile(o))}this.value=r}async _getFile(t){return await new Promise((e,r)=>t.file(e,r))}_removeFile(t){const e=this._files[t];if(this.value instanceof FormData){const r=this.value.getAll(this.name).filter(o=>o!==e);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(t){t?this._dropZone.style.display="flex":this._dropZone.style.display="none"}_renderFileItem(t,e){return l`<uui-file-preview .file="${t}"><uui-action-bar slot="actions"><uui-button @click="${()=>this._removeFile(e)}" color="danger" label="${`Delete ${t.name}`}"><uui-icon name="delete" .fallback="${cc.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return l`${Es(this._files,t=>t.name+t.size,(t,e)=>this._renderFileItem(t,e))}`}render(){return l`<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?l`<uui-button @click="${this._handleClick}" id="add-button" look="placeholder" label="Add"></uui-button>`:_}</div>`}};Qt.styles=[d`: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}`],Fe([S("#dropzone")],Qt.prototype,"_dropzone",2),Fe([S("#dropzone")],Qt.prototype,"_dropZone",2),Fe([a({type:String})],Qt.prototype,"accept",2),Fe([a({type:Boolean})],Qt.prototype,"multiple",2),Fe([v()],Qt.prototype,"_files",2),Qt=Fe([p("uui-input-file")],Qt);let qe=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};qe.CHANGE="change",qe.INPUT="input";var Sd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,R=(i,t,e,r)=>{for(var o=r>1?void 0:r?Pd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Sd(t,e,o),o};let z=class extends gt(vt("",b)){constructor(){super(),this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="",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("keypress",this._onKeypress),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&String(this._value).length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&String(this._value).length>this.maxlength)}get type(){return this._type}set type(t){this._type=t}firstUpdated(t){super.firstUpdated(t),this.addFormControlElement(this._input)}_onKeypress(t){this.type!=="color"&&t.key=="Enter"&&this.submit()}blur(){this._input.blur()}focus(){this._input.focus()}select(){this._input.select()}getFormElement(){return this._input}onInput(t){t.stopPropagation(),this.value=t.target.value,this.dispatchEvent(new qe(qe.INPUT))}onChange(t){t.stopPropagation(),this.pristine=!1,this.dispatchEvent(new qe(qe.CHANGE))}renderPrepend(){return l`<slot name="prepend"></slot>`}renderAppend(){return l`<slot name="append"></slot>`}render(){return l`${this.renderPrepend()} ${this.autoWidth?this.renderInputWithAutoWidth():this.renderInput()} ${this.renderAppend()}`}renderInputWithAutoWidth(){return l`<div id="control">${this.renderInput()}${this.renderAutoWidthBackground()}</div>`}renderInput(){return l`<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}" @input="${this.onInput}" @change="${this.onChange}">`}renderAutoWidthBackground(){return l`<div id="auto" aria-hidden="true">${this.renderText()}</div>`}renderText(){return l`${this.value.length>0?this.value:this.placeholder}`}};z.formAssociated=!0,z.styles=[d`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;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));--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}#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-danger,#d42054)}input{font-family:inherit;padding:var(--uui-size-1,3px) var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:0;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}::slotted(uui-input),::slotted(uui-input-lock){height:100%;--uui-input-border-width:0}`],R([a()],z.prototype,"min",2),R([a({type:Number})],z.prototype,"minlength",2),R([a({type:String,attribute:"minlength-message"})],z.prototype,"minlengthMessage",2),R([a()],z.prototype,"max",2),R([a({type:Number})],z.prototype,"maxlength",2),R([a({type:String,attribute:"maxlength-message"})],z.prototype,"maxlengthMessage",2),R([a({type:Number})],z.prototype,"step",2),R([a({type:Boolean,reflect:!0})],z.prototype,"disabled",2),R([a({type:Boolean,reflect:!0})],z.prototype,"readonly",2),R([a()],z.prototype,"placeholder",2),R([a()],z.prototype,"autocomplete",2),R([a({type:Boolean,reflect:!0,attribute:"auto-width"})],z.prototype,"autoWidth",2),R([a({type:String})],z.prototype,"type",1),R([a({type:String})],z.prototype,"pattern",2),R([a({type:String})],z.prototype,"inputMode",2),R([S("#input")],z.prototype,"_input",2),z=R([p("uui-input")],z);var Ad=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,ml=(i,t,e,r)=>{for(var o=r>1?void 0:r?Od(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Ad(t,e,o),o};let Do=class extends z{constructor(){super(),this.locked=!0,this.readonly=!0}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked}renderIcon(){return this.locked===!0?l`<uui-icon name="lock" .fallback="${hc.strings[0]}"></uui-icon>`:l`<uui-icon name="unlock" .fallback="${bc.strings[0]}"></uui-icon>`}renderPrepend(){return l`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?"Unlock input":"Lock input"}">${this.renderIcon()}</uui-button>`}};Do.styles=[...z.styles,d`#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}`],ml([a({type:Boolean,reflect:!0})],Do.prototype,"locked",2),Do=ml([p("uui-input-lock")],Do);var zd=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,Ps=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ld(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&zd(t,e,o),o};let Li=class extends z{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(t){}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),x(this,"uui-icon"),x(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?l`<uui-icon name="see" .fallback="${pc.strings[0]}"></uui-icon>`:l`<uui-icon name="unsee" .fallback="${vc.strings[0]}"></uui-icon>`}renderAppend(){return l`<uui-button .disabled="${this.disabled}" @click="${this._onPasswordToggle}" compact="compact" label="${this.passwordType==="password"?"Show password":"Hide password"}" id="eye">${this.renderIcon()}</uui-button>`}};Li.styles=[...z.styles,d`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],Ps([v()],Li.prototype,"passwordType",2),Ps([a()],Li.prototype,"type",1),Li=Ps([p("uui-input-password")],Li);var Id=Object.defineProperty,jd=Object.getOwnPropertyDescriptor,Nd=(i,t,e,r)=>{for(var o=r>1?void 0:r?jd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Id(t,e,o),o};let As=class extends b{render(){return l`<slot></slot>`}};As.styles=[d`: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}`],As=Nd([p("uui-keyboard-shortcut")],As);var Md=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Td=(i,t,e,r)=>{for(var o=r>1?void 0:r?Dd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Md(t,e,o),o};let Os=class extends b{render(){return l`<slot></slot>`}};Os.styles=[d`: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}`],Os=Td([p("uui-key")],Os);var Hd=Object.defineProperty,Vd=Object.getOwnPropertyDescriptor,To=(i,t,e,r)=>{for(var o=r>1?void 0:r?Vd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Hd(t,e,o),o};let Ke=class extends b{constructor(){super(),this.disabled=!1,this.for=null,this.required=!1,this.addEventListener("click",this._onClick)}_onClick(){if(this.disabled)return;const t=this.getForElement();t&&(t.focus(),t.click())}getForElement(){return typeof this.for=="string"?this.getRootNode()?.getElementById(this.for)||null:this.for||null}render(){return l`<slot></slot>${this.required?l`<div id="required">*</div>`:""}`}};Ke.styles=[d`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],To([a({type:Boolean,reflect:!0})],Ke.prototype,"disabled",2),To([a({reflect:!0,attribute:!0})],Ke.prototype,"for",2),To([a({type:Boolean,reflect:!0})],Ke.prototype,"required",2),Ke=To([p("uui-label")],Ke);var Bd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,zs=(i,t,e,r)=>{for(var o=r>1?void 0:r?Rd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Bd(t,e,o),o};const Ud=(i,t,e)=>Math.min(Math.max(i,t),e);let Ii=class extends b{constructor(){super(...arguments),this._progress=0,this._animationDuration=1}get progress(){return this._progress}set progress(t){const e=this._progress;this._progress=Ud(t,0,100),this.requestUpdate("progress",e)}get animationDuration(){return this._animationDuration}set animationDuration(t){const e=this._animationDuration;this._animationDuration=t>=0?t:1,this.requestUpdate("animationDuration",e)}render(){return l`${this.progress?l`<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>`}};Ii.styles=[d`: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}}`],zs([a({type:Number})],Ii.prototype,"progress",1),zs([a({type:Number})],Ii.prototype,"animationDuration",1),Ii=zs([p("uui-loader-bar")],Ii);var Gd=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,Ls=(i,t,e,r)=>{for(var o=r>1?void 0:r?Wd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Gd(t,e,o),o};let ji=class extends b{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 t=this.clientHeight>=30;this._isLarge!=t&&(this._isLarge=t,this.requestUpdate())}renderProgress(){return this._isLarge&&this.progress&&this.showProgress?l`<span id="progress-display">${this.progress}</span>`:""}render(){return l`<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="${ft(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}};ji.styles=[d`: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}`],Ls([a({type:Number})],ji.prototype,"progress",2),Ls([a({type:Boolean,reflect:!0,attribute:"show-progress"})],ji.prototype,"showProgress",2),ji=Ls([p("uui-loader-circle")],ji);var Fd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,Kd=(i,t,e,r)=>{for(var o=r>1?void 0:r?qd(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Fd(t,e,o),o};let Is=class extends b{render(){return l`<div></div><div></div><div></div>`}};Is.styles=[d`: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}}`],Is=Kd([p("uui-loader")],Is);/**
|
|
315
|
+
*/let dr=class extends lt{constructor(e){if(super(e),this.et=E,e.type!==Q.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===R)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:[]}}};dr.directiveName="unsafeHTML",dr.resultType=1;const hr=at(dr);let vt=class extends P{constructor(e,t={}){super(e,{bubbles:!0,composed:!0,...t}),this.icon=null}acceptRequest(e){this.icon=e,this.stopImmediatePropagation()}};vt.ICON_REQUEST="icon-request";var Yc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Fe=(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};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 vt(vt.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>`:hr(this.fallback):this._nameSvg!==null?hr(this._nameSvg):this.svg!==null?hr(this.svg):u`<slot></slot>`}},n.UUIIconElement.styles=[p`:host{display:inline-block;vertical-align:bottom;width:1.15em;height:1.15em}::slotted(svg),:host svg{color:var(--uui-icon-color,currentColor)}:host-context(div[slot=prepend]){margin-left:var(--uui-size-2,6px)}:host-context(div[slot=append]){margin-right:var(--uui-size-2,6px)}`],Fe([v()],n.UUIIconElement.prototype,"_nameSvg",2),Fe([l()],n.UUIIconElement.prototype,"label",2),Fe([l()],n.UUIIconElement.prototype,"name",1),Fe([l({attribute:!1})],n.UUIIconElement.prototype,"svg",2),Fe([l({attribute:!1})],n.UUIIconElement.prototype,"fallback",2),Fe([v()],n.UUIIconElement.prototype,"_useFallback",2),n.UUIIconElement=Fe([b("uui-icon")],n.UUIIconElement);let pr=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)}},br=class{constructor(){this.icons={},this._onIconRequest=e=>{const t=this.getIcon(e.detail.iconName);t!==null&&e.acceptRequest(t)}}attach(e){e.addEventListener(vt.ICON_REQUEST,this._onIconRequest)}detach(e){e.removeEventListener(vt.ICON_REQUEST,this._onIconRequest)}defineIcon(e,t){if(this.icons[e]){this.icons[e].svg=t;return}this.icons[e]=new pr(t)}getIcon(e){return this.icons[e]||this.acceptIcon(e)?this.icons[e].promise:null}provideIcon(e){return this.icons[e]=new pr}acceptIcon(e){return!1}getIconNames(){return Object.keys(this.icons)}};var Qc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,Hs=(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&&Qc(e,t,o),o};n.UUIIconRegistryElement=class extends m{constructor(){super(),this._icons={},this._registry=new br,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>`}},Hs([l({attribute:!1})],n.UUIIconRegistryElement.prototype,"_icons",2),n.UUIIconRegistryElement=Hs([b("uui-icon-registry")],n.UUIIconRegistryElement);const ed=_`<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>`,td=_`<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>`,id=_`<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>`,od=_`<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>`,rd=_`<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>`,nd=_`<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>`,sd=_`<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>`,ad=_`<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>`,ld=_`<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>`,ud=_`<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>`,cd=_`<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=_`<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>`,hd=_`<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>`,pd=_`<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>`,bd=_`<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>`,md=_`<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>`,vd=_`<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=_`<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>`,fd=_`<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>`,yd=_`<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>`,_d=_`<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>`,wd=_`<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>`,Ud=_`<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>`,Ed=_`<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>`,$d=_`<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>`,kd=_`<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>`,Id=_`<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>`,xd=_`<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>`,Cd=_`<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>`,Sd=_`<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>`,Pd=_`<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>`,Ad=_`<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 Rs=class extends br{constructor(){super(),this.defineIcon("add",ed.strings[0]),this.defineIcon("alert",td.strings[0]),this.defineIcon("attachment",id.strings[0]),this.defineIcon("calendar",od.strings[0]),this.defineIcon("check",rd.strings[0]),this.defineIcon("clipboard",nd.strings[0]),this.defineIcon("code",sd.strings[0]),this.defineIcon("colorpicker",ad.strings[0]),this.defineIcon("copy",ld.strings[0]),this.defineIcon("delete",ud.strings[0]),this.defineIcon("document",cd.strings[0]),this.defineIcon("download",dd.strings[0]),this.defineIcon("edit",hd.strings[0]),this.defineIcon("favorite",pd.strings[0]),this.defineIcon("folder",bd.strings[0]),this.defineIcon("forbidden",md.strings[0]),this.defineIcon("info",vd.strings[0]),this.defineIcon("link",gd.strings[0]),this.defineIcon("lock",fd.strings[0]),this.defineIcon("pause",yd.strings[0]),this.defineIcon("picture",_d.strings[0]),this.defineIcon("play",wd.strings[0]),this.defineIcon("remove",Ud.strings[0]),this.defineIcon("search",Ed.strings[0]),this.defineIcon("see",$d.strings[0]),this.defineIcon("settings",kd.strings[0]),this.defineIcon("subtract",Id.strings[0]),this.defineIcon("sync",xd.strings[0]),this.defineIcon("unlock",Cd.strings[0]),this.defineIcon("unsee",Sd.strings[0]),this.defineIcon("wand",Pd.strings[0]),this.defineIcon("wrong",Ad.strings[0])}};var Od=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,Ld=(i,e,t,r)=>{for(var o=r>1?void 0:r?zd(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&&Od(e,t,o),o};n.UUIIconRegistryEssentialElement=class extends n.UUIIconRegistryElement{constructor(){super(),this.registry=new Rs}},n.UUIIconRegistryEssentialElement=Ld([b("uui-icon-registry-essential")],n.UUIIconRegistryEssentialElement);var Td=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,gt=(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&&Td(e,t,o),o};n.UUIInputFileElement=class extends oe(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 this._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(),w(this,"uui-icon"),w(this,"uui-file-dropzone"),w(this,"uui-button"),w(this,"uui-action-bar"),w(this,"uui-file-preview")}getFormElement(){return this._dropZone}_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="${wu.strings[0]}"></uui-icon></uui-button></uui-action-bar></uui-file-preview>`}_renderFiles(){return u`${cr(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=[p`: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}`],gt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropzone",2),gt([C("#dropzone")],n.UUIInputFileElement.prototype,"_dropZone",2),gt([l({type:String})],n.UUIInputFileElement.prototype,"accept",2),gt([l({type:Boolean})],n.UUIInputFileElement.prototype,"multiple",2),gt([v()],n.UUIInputFileElement.prototype,"_files",2),n.UUIInputFileElement=gt([b("uui-input-file")],n.UUIInputFileElement);let Ge=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Ge.CHANGE="change",Ge.INPUT="input";var Md=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,D=(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&&Md(e,t,o),o};n.UUIInputElement=class extends oe(ie("",m)){constructor(){super(),this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",this.disabled=!1,this.readonly=!1,this.placeholder="",this.autoWidth=!1,this.inputMode="",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("keypress",this._onKeypress),this.addValidator("tooShort",()=>this.minlengthMessage,()=>!!this.minlength&&String(this._value).length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!this.maxlength&&String(this._value).length>this.maxlength)}get type(){return this._type}set type(e){this._type=e}firstUpdated(e){super.firstUpdated(e),this.addFormControlElement(this._input)}_onKeypress(e){this.type!=="color"&&e.key=="Enter"&&this.submit()}blur(){this._input.blur()}focus(){this._input.focus()}select(){this._input.select()}getFormElement(){return this._input}onInput(e){e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new Ge(Ge.INPUT))}onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Ge(Ge.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="${U(this.pattern)}" min="${U(this.min)}" max="${U(this.max)}" step="${U(this.step)}" spellcheck="${this.spellcheck}" autocomplete="${U(this.autocomplete)}" placeholder="${U(this.placeholder)}" aria-label="${U(this.label)}" inputmode="${U(this.inputMode)}" ?disabled="${this.disabled}" ?autofocus="${this.autofocus}" ?required="${this.required}" ?readonly="${this.readonly}" @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}`}},n.UUIInputElement.formAssociated=!0,n.UUIInputElement.styles=[p`:host{position:relative;display:inline-flex;align-items:stretch;height:var(--uui-input-height,var(--uui-size-11,33px));text-align:left;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));--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}#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-danger,#d42054)}input{font-family:inherit;padding:var(--uui-size-1,3px) var(--uui-size-space-3,9px);font-size:inherit;color:inherit;border-radius:0;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}::slotted(uui-input),::slotted(uui-input-lock){height:100%;--uui-input-border-width:0}`],D([l()],n.UUIInputElement.prototype,"min",2),D([l({type:Number})],n.UUIInputElement.prototype,"minlength",2),D([l({type:String,attribute:"minlength-message"})],n.UUIInputElement.prototype,"minlengthMessage",2),D([l()],n.UUIInputElement.prototype,"max",2),D([l({type:Number})],n.UUIInputElement.prototype,"maxlength",2),D([l({type:String,attribute:"maxlength-message"})],n.UUIInputElement.prototype,"maxlengthMessage",2),D([l({type:Number})],n.UUIInputElement.prototype,"step",2),D([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"disabled",2),D([l({type:Boolean,reflect:!0})],n.UUIInputElement.prototype,"readonly",2),D([l()],n.UUIInputElement.prototype,"placeholder",2),D([l()],n.UUIInputElement.prototype,"autocomplete",2),D([l({type:Boolean,reflect:!0,attribute:"auto-width"})],n.UUIInputElement.prototype,"autoWidth",2),D([l({type:String})],n.UUIInputElement.prototype,"type",1),D([l({type:String})],n.UUIInputElement.prototype,"pattern",2),D([l({type:String})],n.UUIInputElement.prototype,"inputMode",2),D([C("#input")],n.UUIInputElement.prototype,"_input",2),n.UUIInputElement=D([b("uui-input")],n.UUIInputElement);var jd=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,Fs=(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&&jd(e,t,o),o};n.UUIInputLockElement=class extends n.UUIInputElement{constructor(){super(),this.locked=!0,this.readonly=!0}connectedCallback(){super.connectedCallback(),w(this,"uui-icon"),w(this,"uui-button")}_onLockToggle(){this.readonly=this.locked=!this.locked}renderIcon(){return this.locked===!0?u`<uui-icon name="lock" .fallback="${Uu.strings[0]}"></uui-icon>`:u`<uui-icon name="unlock" .fallback="${ku.strings[0]}"></uui-icon>`}renderPrepend(){return u`<uui-button .disabled="${this.disabled}" @click="${this._onLockToggle}" compact="compact" id="lock" label="${this.locked?"Unlock input":"Lock input"}">${this.renderIcon()}</uui-button>`}},n.UUIInputLockElement.styles=[...n.UUIInputElement.styles,p`#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}`],Fs([l({type:Boolean,reflect:!0})],n.UUIInputLockElement.prototype,"locked",2),n.UUIInputLockElement=Fs([b("uui-input-lock")],n.UUIInputLockElement);var Vd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,mr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Hd(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.UUIInputPasswordElement=class extends n.UUIInputElement{constructor(){super(...arguments),this.passwordType="password"}get type(){return this.passwordType}set type(e){}_onPasswordToggle(){this.passwordType==="password"?this.passwordType="text":this.passwordType="password"}connectedCallback(){super.connectedCallback(),w(this,"uui-icon"),w(this,"uui-button"),this.hasAttribute("spellcheck")||(this.spellcheck=!1)}renderIcon(){return this.passwordType==="password"?u`<uui-icon name="see" .fallback="${$u.strings[0]}"></uui-icon>`:u`<uui-icon name="unsee" .fallback="${Iu.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,p`#eye{height:100%;margin-left:-6px}#clear:hover{color:#000}`],mr([v()],n.UUIInputPasswordElement.prototype,"passwordType",2),mr([l()],n.UUIInputPasswordElement.prototype,"type",1),n.UUIInputPasswordElement=mr([b("uui-input-password")],n.UUIInputPasswordElement);var Rd=Object.defineProperty,Fd=Object.getOwnPropertyDescriptor,Gd=(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&&Rd(e,t,o),o};n.UUIKeyboardShortcutElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyboardShortcutElement.styles=[p`: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=Gd([b("uui-keyboard-shortcut")],n.UUIKeyboardShortcutElement);var Wd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,Kd=(i,e,t,r)=>{for(var o=r>1?void 0:r?qd(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.UUIKeyElement=class extends m{render(){return u`<slot></slot>`}},n.UUIKeyElement.styles=[p`: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=Kd([b("uui-key")],n.UUIKeyElement);var Xd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,Hi=(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&&Xd(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=[p`:host{font-weight:700}:host([for]){cursor:pointer}:host([disabled]){cursor:default}#required{display:inline;color:var(--uui-color-danger,#d42054);font-weight:900}`],Hi([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"disabled",2),Hi([l({reflect:!0,attribute:!0})],n.UUILabelElement.prototype,"for",2),Hi([l({type:Boolean,reflect:!0})],n.UUILabelElement.prototype,"required",2),n.UUILabelElement=Hi([b("uui-label")],n.UUILabelElement);var Zd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,vr=(i,e,t,r)=>{for(var o=r>1?void 0:r?Qd(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&&Zd(e,t,o),o};const Jd=(i,e,t)=>Math.min(Math.max(i,e),t);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=Jd(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=[p`: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}}`],vr([l({type:Number})],n.UUILoaderBarElement.prototype,"progress",1),vr([l({type:Number})],n.UUILoaderBarElement.prototype,"animationDuration",1),n.UUILoaderBarElement=vr([b("uui-loader-bar")],n.UUILoaderBarElement);var eh=Object.defineProperty,th=Object.getOwnPropertyDescriptor,gr=(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};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="${ne(this._circleStyle())}"/></g></svg> ${this.renderProgress()}`}},n.UUILoaderCircleElement.styles=[p`: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}`],gr([l({type:Number})],n.UUILoaderCircleElement.prototype,"progress",2),gr([l({type:Boolean,reflect:!0,attribute:"show-progress"})],n.UUILoaderCircleElement.prototype,"showProgress",2),n.UUILoaderCircleElement=gr([b("uui-loader-circle")],n.UUILoaderCircleElement);var ih=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,rh=(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&&ih(e,t,o),o};n.UUILoaderElement=class extends m{render(){return u`<div></div><div></div><div></div>`}},n.UUILoaderElement.styles=[p`: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=rh([b("uui-loader")],n.UUILoaderElement);/**
|
|
316
316
|
* @license
|
|
317
317
|
* Copyright 2017 Google LLC
|
|
318
318
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
319
|
-
*/const
|
|
319
|
+
*/const qt=(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),qt(s,e);return!0},Ri=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while(t?.size===0)},Gs=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),ah(e)}};function nh(i){this._$AN!==void 0?(Ri(this),this._$AM=i,Gs(this)):this._$AM=i}function sh(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++)qt(r[s],!1),Ri(r[s]);else r!=null&&(qt(r,!1),Ri(r));else qt(this,i)}const ah=i=>{var e,t,r,o;i.type==Q.CHILD&&((e=(r=i)._$AP)!==null&&e!==void 0||(r._$AP=sh),(t=(o=i)._$AQ)!==null&&t!==void 0||(o._$AQ=nh))};let lh=class extends lt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),Gs(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&&(qt(this,e),Ri(this))}setValue(e){if($s(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 fr=new WeakMap,yr=at(class extends lh{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=fr.get(t);r===void 0&&(r=new WeakMap,fr.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=fr.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)}});let fe=class extends P{};fe.SHOW_CHILDREN="show-children",fe.HIDE_CHILDREN="hide-children",fe.CLICK_LABEL="click-label";var uh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,ye=(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.UUIMenuItemElement=class extends mi(rt(Dt(ie("label",m)))){constructor(){super(...arguments),this.disabled=!1,this.showChildren=!1,this.hasChildren=!1,this.loading=!1,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?fe.HIDE_CHILDREN:fe.SHOW_CHILDREN,t=new fe(e,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.showChildren=!this.showChildren)},this._onLabelClicked=()=>{const e=new fe(fe.CLICK_LABEL);this.dispatchEvent(e)}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","menu"),w(this,"uui-symbol-expand"),w(this,"uui-loader-bar")}_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" ${yr(this._labelButtonChanged)}>${this._renderLabelInside()}</span>`:u`<a id="label-button" ${yr(this._labelButtonChanged)} href="${U(this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}" @click="${this._onLabelClicked}" ?disabled="${this.disabled}" aria-label="${this.label}">${this._renderLabelInside()}</a>`}_renderLabelAsButton(){return u`<button id="label-button" ${yr(this._labelButtonChanged)} @click="${this._onLabelClicked}" ?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" @click="${this._onCaretClicked}"><uui-symbol-expand ?open="${this.showChildren}"></uui-symbol-expand></button>`:""} ${this.href?this._renderLabelAsAnchor():this._renderLabelAsButton()}<div id="label-button-background"></div>${this.selectOnly===!1?u`<slot id="actions-container" name="actions"></slot>`:""} ${this.loading?u`<uui-loader-bar id="loader"></uui-loader-bar>`:""}</div>${this.showChildren?u`<slot></slot>`:""}`}},n.UUIMenuItemElement.styles=[p`: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(
|
|
320
320
|
1 - var(--uui-menu-item-flat-structure, 0)
|
|
321
|
-
)}#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-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-color-interactive-emphasis,#3544b1)}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-color-current-contrast,#1b264f)}:host([active]) #label-button-background{background-color:var(--uui-color-current,#f5c1bc)}:host([active]) #caret-button:hover,:host([active]) #label-button:hover~#label-button-background{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #menu-item{color:var(--uui-color-disabled-contrast,#c4c4c4);background-color: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-color-selected-contrast,#fff)}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color: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-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-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-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-color-interactive,#1b264f)}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color: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-color-surface-emphasis,#fafafa);color: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-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-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}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}#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:center;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0}#actions-container{opacity:0;transition:opacity 120ms;grid-column-start:3}: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}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;font-size:16px;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)}`],Mt([a({type:Boolean,reflect:!0})],pt.prototype,"disabled",2),Mt([a({type:Boolean,reflect:!0,attribute:"show-children"})],pt.prototype,"showChildren",2),Mt([a({type:Boolean,attribute:"has-children"})],pt.prototype,"hasChildren",2),Mt([a({type:Boolean,attribute:"loading"})],pt.prototype,"loading",2),Mt([a({type:String})],pt.prototype,"href",2),Mt([a({type:String})],pt.prototype,"target",2),Mt([a({type:String,attribute:"select-mode",reflect:!0})],pt.prototype,"selectMode",2),Mt([v()],pt.prototype,"iconSlotHasContent",2),pt=Mt([p("uui-menu-item")],pt);var ep=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,Xe=(i,t,e,r)=>{for(var o=r>1?void 0:r?ip(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&ep(t,e,o),o};const Ye="uui:modal-close";let nt=class extends b{constructor(){super(...arguments),this.isOpen=!1,this.isClosing=!1,this.index=0,this.uniqueIndex=0,this._transitionDuration=250,this.open=t=>{t?.preventDefault(),t?.stopImmediatePropagation();const e=new CustomEvent("open",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this._openModal()},this.close=t=>{t?.preventDefault(),t?.stopImmediatePropagation();const e=new CustomEvent(Ye,{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this._closeModal()}}get transitionDuration(){return this._transitionDuration}set transitionDuration(t){this._transitionDuration=t,this.style.setProperty("--uui-modal-transition-duration",this._transitionDuration+"ms")}firstUpdated(t){super.firstUpdated(t),this.isClosing||this.open()}_openModal(){this.isOpen=!0,this._dialogElement?.showModal(),this._dialogElement?.addEventListener("cancel",this.close)}_closeModal(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.remove()}};nt.styles=[d`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none}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}`],Xe([S("dialog")],nt.prototype,"_dialogElement",2),Xe([a({type:Boolean,reflect:!0,attribute:"is-open"})],nt.prototype,"isOpen",2),Xe([a({type:Boolean,reflect:!0,attribute:"is-closing"})],nt.prototype,"isClosing",2),Xe([a({type:Number,reflect:!0})],nt.prototype,"index",2),Xe([a({type:Number,reflect:!0,attribute:"unique-index"})],nt.prototype,"uniqueIndex",2),Xe([a({type:Number,attribute:"transition-duration"})],nt.prototype,"transitionDuration",1);var op=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,xl=(i,t,e,r)=>{for(var o=r>1?void 0:r?rp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&op(t,e,o),o},_l=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},wl=(i,t,e)=>(_l(i,t,"read from private field"),e?e.call(i):t.get(i)),$l=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},sp=(i,t,e)=>(_l(i,t,"access private method"),e),Vo,Ms,Ds,kl;let Mi=class extends nt{constructor(){super(),$l(this,Vo),$l(this,Ds),this.size="full",this.addEventListener(Ye,sp(this,Ds,kl).bind(this))}firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--uui-modal-offset",-wl(this,Vo,Ms)+"px")}updated(t){super.updated(t),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}render(){return l`<dialog><slot></slot></dialog>`}};Vo=new WeakSet,Ms=function(){return this._dialogElement?.getBoundingClientRect().width??0},Ds=new WeakSet,kl=function(i){i.preventDefault(),!this.isClosing&&(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-wl(this,Vo,Ms)+"px"),setTimeout(()=>{this._closeModal()},this.transitionDuration))},Mi.styles=[...nt.styles,d`:host{--uui-modal-sidebar-left-gap:24px}@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)}: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(400px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],xl([a({reflect:!0})],Mi.prototype,"size",2),Mi=xl([p("uui-modal-sidebar")],Mi);var np=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,Ze=(i,t,e,r)=>{for(var o=r>1?void 0:r?ap(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&np(t,e,o),o},El=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Di=(i,t,e)=>(El(i,t,"read from private field"),e?e.call(i):t.get(i)),Bo=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ro=(i,t,e)=>(El(i,t,"access private method"),e),Ts,Qe,Uo,Hs,Go,Vs;let te=class extends b{constructor(){super(),Bo(this,Uo),Bo(this,Go),this.sidebarGap=64,this.transitionDurationMS=250,Bo(this,Ts,()=>{const t=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(e=>e instanceof nt)??[],t.filter(e=>this._modals.indexOf(e)===-1).forEach(e=>e.removeEventListener(Ye,Di(this,Qe))),this._modals.filter(e=>t.indexOf(e)===-1).forEach(e=>e.addEventListener(Ye,Di(this,Qe))),this._sidebars=this._modals.filter(e=>e instanceof Mi),this._modals.length===0){this.removeAttribute("backdrop");return}Ro(this,Uo,Hs).call(this),Ro(this,Go,Vs).call(this)}),Bo(this,Qe,t=>{if(t.stopImmediatePropagation(),t.target?.removeEventListener(Ye,Di(this,Qe)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}Ro(this,Uo,Hs).call(this),Ro(this,Go,Vs).call(this)}),this.addEventListener(Ye,Di(this,Qe))}firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return l`<slot @slotchange="${Di(this,Ts)}"></slot>`}};Ts=new WeakMap,Qe=new WeakMap,Uo=new WeakSet,Hs=function(){this.setAttribute("backdrop","");const i=this._modals?.filter(t=>!t.isClosing).reverse()??[];i?.forEach((t,e)=>{t.index=e,t.transitionDuration=this.transitionDurationMS}),i?.forEach(t=>{const e=i?.filter(r=>r.constructor.name===t.constructor.name);t.uniqueIndex=e?.indexOf(t)??0})},Go=new WeakSet,Vs=function(){requestAnimationFrame(()=>{let i=0;const t=this._sidebars?.filter(e=>!e.isClosing).reverse()??[];for(let e=0;e<t.length;e++){const r=t[e],o=t[e+1],s=i;if(r.updateComplete.then(()=>{r.style.setProperty("--uui-modal-offset",s+"px")}),o?.hasAttribute("hide"))break;const n=r.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=o?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,u=n+i+this.sidebarGap-c;i=u>0?u:0}})},te.styles=d`: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}`,Ze([S("slot")],te.prototype,"modalSlot",2),Ze([v()],te.prototype,"_modals",2),Ze([v()],te.prototype,"_sidebars",2),Ze([a({type:Number})],te.prototype,"sidebarGap",2),Ze([a({type:Number})],te.prototype,"transitionDurationMS",2),te=Ze([p("uui-modal-container")],te);var lp=Object.defineProperty,up=Object.getOwnPropertyDescriptor,cp=(i,t,e,r)=>{for(var o=r>1?void 0:r?up(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&lp(t,e,o),o};let Bs=class extends nt{render(){return l`<dialog><slot></slot></dialog>`}};Bs.styles=[...nt.styles,d`dialog{margin:auto;max-width:100%;max-height:100%;border-radius:12px}: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)}`],Bs=cp([p("uui-modal-dialog")],Bs);let ge=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};ge.CHANGE="change";var hp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Dt=(i,t,e,r)=>{for(var o=r>1?void 0:r?dp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&hp(t,e,o),o};const pp=45,Rs=(i,t,e)=>Math.min(Math.max(i,t),e),bp=(i,t)=>Array.from({length:t-i+1},(e,r)=>i+r);let bt=class extends b{constructor(){super(...arguments),this._observer=new ResizeObserver(this._calculateRange.bind(this)),this.label="",this.ariaLabel="",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),x(this,"uui-button"),x(this,"uui-button-group")}disconnectedCallback(){this._observer.disconnect()}firstUpdated(){this._observer.observe(this._pagesGroup),this.updateLabel(),this._calculateRange()}willUpdate(t){(t.has("current")||t.has("label"))&&this.updateLabel()}updateLabel(){this.ariaLabel=`${this.label||"Pagination navigation"}. Current page: ${this.current}.`}_calculateRange(){const t=this.offsetWidth,e=Array.from(this._navButtons).reduce((o,s)=>o+s.getBoundingClientRect().width,0),r=(t-e)/pp/2;this._range=Math.max(1,Math.floor(r)),this._visiblePages=this._generateVisiblePages(this.current)}_generateVisiblePages(t){const e=t<this._range?1:t<this.total-this._range?t-this._range:this.total-this._range*2,r=t<=this._range?this._range*2+1:t<this.total-this._range?t+this._range:this.total;return bp(Rs(e,1,this.total),Rs(r,1,this.total))}get total(){return this._total}set total(t){this._total=t,this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("total",t)}get current(){return this._current}set current(t){const e=this._current;this._current=Rs(t,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",e)}goToNextPage(){this.current++,this.dispatchEvent(new ge(ge.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new ge(ge.CHANGE))}goToPage(t){this.current=t,this.dispatchEvent(new ge(ge.CHANGE))}focusActivePage(){requestAnimationFrame(()=>{const t=this.renderRoot.querySelector(".active");t&&t.focus()})}renderFirst(){return l`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to first page" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}">First</uui-button>`}renderPrevious(){return l`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to previous page" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}">Previous</uui-button>`}renderNext(){return l`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to next page" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}">Next</uui-button>`}renderLast(){return l`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to last page" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}">Last</uui-button>`}renderDots(){return l`<uui-button compact="compact" look="outline" role="listitem" tabindex="-1" class="dots" label="More pages">...</uui-button>`}renderPage(t){return l`<uui-button compact="compact" look="outline" role="listitem" label="Go to page ${t}" class="${"page"+(t===this._current?" active":"")}" tabindex="${t===this._current?"-1":""}" @click="${()=>{t!==this._current&&(this.goToPage(t),this.focusActivePage())}}">${t}</uui-button>`}renderNavigationLeft(){return l`${this.renderFirst()} ${this.renderPrevious()} ${this._visiblePages.includes(1)?"":this.renderDots()}`}renderNavigationRight(){return l`${this._visiblePages.includes(this.total)?"":this.renderDots()} ${this.renderNext()} ${this.renderLast()}`}render(){return l`<uui-button-group role="list" id="pages">${this.renderNavigationLeft()} ${this._visiblePages.map(t=>this.renderPage(t))} ${this.renderNavigationRight()}</uui-button-group>`}};bt.styles=[d`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}`],Dt([cu("uui-button.nav")],bt.prototype,"_navButtons",2),Dt([S("#pages")],bt.prototype,"_pagesGroup",2),Dt([a()],bt.prototype,"label",2),Dt([a({reflect:!0,attribute:"aria-label"})],bt.prototype,"ariaLabel",2),Dt([a({type:Number})],bt.prototype,"total",1),Dt([v()],bt.prototype,"_range",2),Dt([v()],bt.prototype,"_visiblePages",2),Dt([a({type:Number})],bt.prototype,"current",1),bt=Dt([p("uui-pagination")],bt);let Us=class extends O{};Us.CLOSE="close";var vp=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,Ti=(i,t,e,r)=>{for(var o=r>1?void 0:r?gp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&vp(t,e,o),o};function Wo(i,t,e){return i<t?t:i>e?e:i}let fe=class extends b{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=t=>{this._trigger=t.target.assignedElements({flatten:!0})[0]},this._intersectionCallback=t=>{t.forEach(e=>{e.isIntersecting===!1&&(this._startScrollListener(),this._updatePlacement())})},this._onKeyUp=t=>{if(t.key==="Escape"){this._triggerPopoverClose();return}},this._onDocumentClick=t=>{t.composedPath().includes(this)||this._triggerPopoverClose()}}get placement(){return this._placement}set placement(t){const e=this._placement;this._placement=t||"bottom-start",this._currentPlacement=null,this._updatePlacement(),this.requestUpdate("placement",e)}get open(){return this._open}set open(t){const e=this._open;this._open=t,t?this._openPopover():this._closePopover(),this.requestUpdate("open",e)}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 t=new Us(Us.CLOSE,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&(this.open=!1)}_getScrollParents(){const t=this.shadowRoot.host;let e=getComputedStyle(t);if(e.position==="fixed")return;const r=e.position==="absolute",o=/(auto|scroll)/;let s=t;for(;s=s.parentElement;)if(e=getComputedStyle(s),!(r&&e.position==="static")&&(o.test(e.overflow+e.overflowY+e.overflowX)&&this._scrollParents.push(s),e.position==="fixed"))return;this._scrollParents.push(document.body)}_createIntersectionObserver(){if(this.intersectionObserver)return;const t={root:null,rootMargin:"0px",threshold:1};this.intersectionObserver=new IntersectionObserver(this._intersectionCallback,t),this.intersectionObserver.observe(this.containerElement)}_startScrollListener(){this._scrollParents.forEach(t=>{t.addEventListener("scroll",this.scrollEventHandler)}),document.addEventListener("scroll",this.scrollEventHandler)}_stopScrollListener(){this._scrollParents.forEach(t=>{t.removeEventListener("scroll",this.scrollEventHandler)}),document.removeEventListener("scroll",this.scrollEventHandler)}_updatePlacement(){if(!this.shadowRoot)return;const t=this.containerElement;if(!t)return;const e=this.containerElement?.getBoundingClientRect(),r=this._trigger?.getBoundingClientRect();if(r!=null&&e!=null){const o=this._scrollParents.map(St=>St.getBoundingClientRect());this._currentPlacement=this._currentPlacement||this._placement,this._placement!=="auto"&&(this._currentPlacement=this._managePlacementFlip(this._currentPlacement,e,o));let s=this._currentPlacement.indexOf("top")!==-1,n=this._currentPlacement.indexOf("bottom")!==-1,c=this._currentPlacement.indexOf("left")!==-1,u=this._currentPlacement.indexOf("right")!==-1;const h=this._currentPlacement.indexOf("-start")!==-1,f=this._currentPlacement.indexOf("-end")!==-1;let g=.5,m=.5,$=.5,E=.5,P=0,K=0;if(this.placement==="auto"){const St=this._scrollParents[0],io=St.clientWidth,Ee=St.clientHeight,ui=r.x-e.width,ci=io-(r.x+r.width)-e.width,An=r.y-e.height,mr=Ee-(r.y+r.height)-e.height;let yr=.5,xr=.5;const g0=Math.max(ui,ci);let Jl=Math.max(An,mr);mr>An&&mr>this.margin&&(Jl+=9999),g0>Jl?(ui>ci?(yr=0,c=!0):(yr=1,u=!0),P=this.margin):(An>mr?(xr=0,s=!0):(xr=1,n=!0),K=this.margin),g=yr,m=xr,$=1-yr,E=1-xr}else s&&(E=1,m=0),n&&(E=0,m=1),(s||n)&&(K=this.margin,h&&($=0,g=0),f&&($=1,g=1)),c&&($=1,g=0),u&&($=0,g=1),(c||u)&&(P=this.margin,h&&(E=0,m=0),f&&(E=1,m=1));const Ut=-e.width*$+r.width*g-P*($*2-1),Gt=-e.height*E+r.height*m-K*(E*2-1);let $e=Ut,ke=Gt;s||n?(this._scrollParents.forEach((St,io)=>{const Ee=St===document.body?0:o[io].x,ui=-r.x+Ee,ci=St.clientWidth-r.x-r.width+Ut+Ee-(e.width-r.width)*(1-g);$e=Wo($e,ui,ci)}),$e=Wo($e,-e.width,r.width)):(c||u)&&(this._scrollParents.forEach((St,io)=>{const Ee=St===document.body?0:o[io].y,ui=-r.y+Ee,ci=St.clientHeight-r.y-r.height+Gt+Ee-(e.height-r.height)*(1-m);ke=Wo(ke,ui,ci)}),ke=Wo(ke,-e.height,r.height)),(this._positionX!==$e||this._positionY!==ke)&&(this._positionX=$e,this._positionY=ke,Ut===$e&&Gt===ke&&this._stopScrollListener(),t.style.left=`${this._positionX}px`,t.style.top=`${this._positionY}px`)}}_managePlacementFlip(t,e,r){const o=t.split("-"),s=o[0],n=o[1]||null;let c;return this._scrollParents.some((u,h)=>{const f=u===document.body?0:r[h].x,g=u===document.body?0:r[h].y;return s==="top"&&e.y-2<=g?(c="bottom",!0):s==="bottom"&&e.y+e.height+2>=u.clientHeight+g?(c="top",!0):s==="left"&&e.x-2<=f?(c="right",!0):s==="right"&&e.x+e.width+2>=u.clientWidth+f?(c="left",!0):!1}),c?(this._startScrollListener(),c+(n?`-${n}`:"")):t}render(){return l`<slot id="trigger" name="trigger" @slotchange="${this._onTriggerSlotChanged}"></slot><div id="container">${this._open?l`<slot name="popover"></slot>`:""}</div>`}};fe.styles=[d`: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(
|
|
321
|
+
)}#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-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-color-interactive-emphasis,#3544b1)}:host([active]) #caret-button,:host([active]) #label-button{color:var(--uui-color-current-contrast,#1b264f)}:host([active]) #label-button-background{background-color:var(--uui-color-current,#f5c1bc)}:host([active]) #caret-button:hover,:host([active]) #label-button:hover~#label-button-background{background-color:var(--uui-color-current-emphasis,#f8d6d3)}:host([disabled]) #menu-item{color:var(--uui-color-disabled-contrast,#c4c4c4);background-color: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-color-selected-contrast,#fff)}:host([selected]:not([select-mode=highlight],[disabled])) #label-button-background{background-color: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-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-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-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-color-interactive,#1b264f)}:host([select-mode=highlight][selectable][selected]:not([disabled])) #menu-item #label-button:hover{color: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-color-surface-emphasis,#fafafa);color: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-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-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}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}#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:center;color:var(--uui-color-interactive,#1b264f)}#label-button-background{position:absolute;top:0;left:0;right:0;bottom:0}#actions-container{opacity:0;transition:opacity 120ms;grid-column-start:3}: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}#loader{position:absolute;width:100%;bottom:0}#icon{display:inline-flex;font-size:16px;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)}`],ye([l({type:Boolean,reflect:!0})],n.UUIMenuItemElement.prototype,"disabled",2),ye([l({type:Boolean,reflect:!0,attribute:"show-children"})],n.UUIMenuItemElement.prototype,"showChildren",2),ye([l({type:Boolean,attribute:"has-children"})],n.UUIMenuItemElement.prototype,"hasChildren",2),ye([l({type:Boolean,attribute:"loading"})],n.UUIMenuItemElement.prototype,"loading",2),ye([l({type:String})],n.UUIMenuItemElement.prototype,"href",2),ye([l({type:String})],n.UUIMenuItemElement.prototype,"target",2),ye([l({type:String,attribute:"select-mode",reflect:!0})],n.UUIMenuItemElement.prototype,"selectMode",2),ye([v()],n.UUIMenuItemElement.prototype,"iconSlotHasContent",2),n.UUIMenuItemElement=ye([b("uui-menu-item")],n.UUIMenuItemElement);var dh=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,ft=(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&&dh(e,t,o),o};const We="uui:modal-close";let W=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("open",{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._openModal()},this.close=e=>{e?.preventDefault(),e?.stopImmediatePropagation();const t=new CustomEvent(We,{cancelable:!0});this.dispatchEvent(t),!t.defaultPrevented&&this._closeModal()}}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)}_closeModal(){this.isClosing=!0,this.isOpen=!1,this._dialogElement?.close(),this.dispatchEvent(new CustomEvent("close-end")),this.remove()}};W.styles=[p`dialog{display:block;margin:0;padding:0;max-width:unset;max-height:unset;border:none}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}`],ft([C("dialog")],W.prototype,"_dialogElement",2),ft([l({type:Boolean,reflect:!0,attribute:"is-open"})],W.prototype,"isOpen",2),ft([l({type:Boolean,reflect:!0,attribute:"is-closing"})],W.prototype,"isClosing",2),ft([l({type:Number,reflect:!0})],W.prototype,"index",2),ft([l({type:Number,reflect:!0,attribute:"unique-index"})],W.prototype,"uniqueIndex",2),ft([l({type:Number,attribute:"transition-duration"})],W.prototype,"transitionDuration",1);var ph=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,Ws=(i,e,t,r)=>{for(var o=r>1?void 0:r?bh(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&&ph(e,t,o),o},qs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ks=(i,e,t)=>(qs(i,e,"read from private field"),t?t.call(i):e.get(i)),Xs=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},mh=(i,e,t)=>(qs(i,e,"access private method"),t),Fi,_r,wr,Ys;n.UUIModalSidebarElement=class extends W{constructor(){super(),Xs(this,Fi),Xs(this,wr),this.size="full",this.addEventListener(We,mh(this,wr,Ys).bind(this))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-offset",-Ks(this,Fi,_r)+"px")}updated(e){super.updated(e),this.uniqueIndex>10?this.setAttribute("hide",""):this.removeAttribute("hide")}render(){return u`<dialog><slot></slot></dialog>`}},Fi=new WeakSet,_r=function(){return this._dialogElement?.getBoundingClientRect().width??0},wr=new WeakSet,Ys=function(i){i.preventDefault(),!this.isClosing&&(this.isClosing=!0,this.style.setProperty("--uui-modal-offset",-Ks(this,Fi,_r)+"px"),setTimeout(()=>{this._closeModal()},this.transitionDuration))},n.UUIModalSidebarElement.styles=[...W.styles,p`:host{--uui-modal-sidebar-left-gap:24px}@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)}: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(400px,calc(100% - var(--uui-modal-sidebar-left-gap)))}`],Ws([l({reflect:!0})],n.UUIModalSidebarElement.prototype,"size",2),n.UUIModalSidebarElement=Ws([b("uui-modal-sidebar")],n.UUIModalSidebarElement);var vh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,yt=(i,e,t,r)=>{for(var o=r>1?void 0:r?gh(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&&vh(e,t,o),o},Zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Kt=(i,e,t)=>(Zs(i,e,"read from private field"),t?t.call(i):e.get(i)),Gi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Wi=(i,e,t)=>(Zs(i,e,"access private method"),t),Ur,_t,qi,Er,Ki,$r;n.UUIModalContainerElement=class extends m{constructor(){super(),Gi(this,qi),Gi(this,Ki),this.sidebarGap=64,this.transitionDurationMS=250,Gi(this,Ur,()=>{const e=this._modals??[];if(this._modals=this.modalSlot?.assignedElements({flatten:!0}).filter(t=>t instanceof W)??[],e.filter(t=>this._modals.indexOf(t)===-1).forEach(t=>t.removeEventListener(We,Kt(this,_t))),this._modals.filter(t=>e.indexOf(t)===-1).forEach(t=>t.addEventListener(We,Kt(this,_t))),this._sidebars=this._modals.filter(t=>t instanceof n.UUIModalSidebarElement),this._modals.length===0){this.removeAttribute("backdrop");return}Wi(this,qi,Er).call(this),Wi(this,Ki,$r).call(this)}),Gi(this,_t,e=>{if(e.stopImmediatePropagation(),e.target?.removeEventListener(We,Kt(this,_t)),!this._modals||this._modals.length<=1){this.removeAttribute("backdrop");return}Wi(this,qi,Er).call(this),Wi(this,Ki,$r).call(this)}),this.addEventListener(We,Kt(this,_t))}firstUpdated(e){super.firstUpdated(e),this.style.setProperty("--uui-modal-transition-duration",this.transitionDurationMS+"ms")}render(){return u`<slot @slotchange="${Kt(this,Ur)}"></slot>`}},Ur=new WeakMap,_t=new WeakMap,qi=new WeakSet,Er=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})},Ki=new WeakSet,$r=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,d=o?.shadowRoot?.querySelector("dialog")?.getBoundingClientRect().width??0,c=a+i+this.sidebarGap-d;i=c>0?c:0}})},n.UUIModalContainerElement.styles=p`: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}`,yt([C("slot")],n.UUIModalContainerElement.prototype,"modalSlot",2),yt([v()],n.UUIModalContainerElement.prototype,"_modals",2),yt([v()],n.UUIModalContainerElement.prototype,"_sidebars",2),yt([l({type:Number})],n.UUIModalContainerElement.prototype,"sidebarGap",2),yt([l({type:Number})],n.UUIModalContainerElement.prototype,"transitionDurationMS",2),n.UUIModalContainerElement=yt([b("uui-modal-container")],n.UUIModalContainerElement);var fh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,_h=(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.UUIModalDialogElement=class extends W{render(){return u`<dialog><slot></slot></dialog>`}},n.UUIModalDialogElement.styles=[...W.styles,p`dialog{margin:auto;max-width:100%;max-height:100%;border-radius:12px}: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=_h([b("uui-modal-dialog")],n.UUIModalDialogElement);let Ae=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Ae.CHANGE="change";var wh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,_e=(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&&wh(e,t,o),o};const Eh=45,kr=(i,e,t)=>Math.min(Math.max(i,e),t),$h=(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._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),w(this,"uui-button"),w(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)/Eh/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 $h(kr(t,1,this.total),kr(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=kr(e,1,this.total),this._visiblePages=this._generateVisiblePages(this._current),this.requestUpdate("current",t)}goToNextPage(){this.current++,this.dispatchEvent(new Ae(Ae.CHANGE))}goToPreviousPage(){this.current--,this.dispatchEvent(new Ae(Ae.CHANGE))}goToPage(e){this.current=e,this.dispatchEvent(new Ae(Ae.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="Go to first page" ?disabled="${this._current===1}" @click="${()=>this.goToPage(1)}">First</uui-button>`}renderPrevious(){return u`<uui-button compact="compact" look="outline" class="nav" role="listitem" label="Go to previous page" ?disabled="${this._current===1}" @click="${this.goToPreviousPage}">Previous</uui-button>`}renderNext(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to next page" ?disabled="${this._current===this.total}" @click="${this.goToNextPage}">Next</uui-button>`}renderLast(){return u`<uui-button compact="compact" look="outline" role="listitem" class="nav" label="Go to last page" ?disabled="${this.total===this._current}" @click="${()=>this.goToPage(this.total)}">Last</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=[p`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}`],_e([Na("uui-button.nav")],n.UUIPaginationElement.prototype,"_navButtons",2),_e([C("#pages")],n.UUIPaginationElement.prototype,"_pagesGroup",2),_e([l()],n.UUIPaginationElement.prototype,"label",2),_e([l({reflect:!0,attribute:"aria-label"})],n.UUIPaginationElement.prototype,"ariaLabel",2),_e([l({type:Number})],n.UUIPaginationElement.prototype,"total",1),_e([v()],n.UUIPaginationElement.prototype,"_range",2),_e([v()],n.UUIPaginationElement.prototype,"_visiblePages",2),_e([l({type:Number})],n.UUIPaginationElement.prototype,"current",1),n.UUIPaginationElement=_e([b("uui-pagination")],n.UUIPaginationElement);let Ir=class extends P{};Ir.CLOSE="close";var kh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Xt=(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&&kh(e,t,o),o};function Xi(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 Ir(Ir.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(he=>he.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,d=this._currentPlacement.indexOf("left")!==-1,c=this._currentPlacement.indexOf("right")!==-1;const h=this._currentPlacement.indexOf("-start")!==-1,f=this._currentPlacement.indexOf("-end")!==-1;let g=.5,y=.5,$=.5,I=.5,S=0,H=0;if(this.placement==="auto"){const he=this._scrollParents[0],ai=he.clientWidth,Je=he.clientHeight,Ot=r.x-t.width,zt=ai-(r.x+r.width)-t.width,en=r.y-t.height,uo=Je-(r.y+r.height)-t.height;let co=.5,ho=.5;const Cb=Math.max(Ot,zt);let ka=Math.max(en,uo);uo>en&&uo>this.margin&&(ka+=9999),Cb>ka?(Ot>zt?(co=0,d=!0):(co=1,c=!0),S=this.margin):(en>uo?(ho=0,s=!0):(ho=1,a=!0),H=this.margin),g=co,y=ho,$=1-co,I=1-ho}else s&&(I=1,y=0),a&&(I=0,y=1),(s||a)&&(H=this.margin,h&&($=0,g=0),f&&($=1,g=1)),d&&($=1,g=0),c&&($=0,g=1),(d||c)&&(S=this.margin,h&&(I=0,y=0),f&&(I=1,y=1));const $e=-t.width*$+r.width*g-S*($*2-1),ke=-t.height*I+r.height*y-H*(I*2-1);let Ze=$e,Qe=ke;s||a?(this._scrollParents.forEach((he,ai)=>{const Je=he===document.body?0:o[ai].x,Ot=-r.x+Je,zt=he.clientWidth-r.x-r.width+$e+Je-(t.width-r.width)*(1-g);Ze=Xi(Ze,Ot,zt)}),Ze=Xi(Ze,-t.width,r.width)):(d||c)&&(this._scrollParents.forEach((he,ai)=>{const Je=he===document.body?0:o[ai].y,Ot=-r.y+Je,zt=he.clientHeight-r.y-r.height+ke+Je-(t.height-r.height)*(1-y);Qe=Xi(Qe,Ot,zt)}),Qe=Xi(Qe,-t.height,r.height)),(this._positionX!==Ze||this._positionY!==Qe)&&(this._positionX=Ze,this._positionY=Qe,$e===Ze&&ke===Qe&&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 d;return this._scrollParents.some((c,h)=>{const f=c===document.body?0:r[h].x,g=c===document.body?0:r[h].y;return s==="top"&&t.y-2<=g?(d="bottom",!0):s==="bottom"&&t.y+t.height+2>=c.clientHeight+g?(d="top",!0):s==="left"&&t.x-2<=f?(d="right",!0):s==="right"&&t.x+t.width+2>=c.clientWidth+f?(d="left",!0):!1}),d?(this._startScrollListener(),d+(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=[p`: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(
|
|
322
322
|
--uui-popover-toggle-slot-button-border-radius
|
|
323
323
|
);--uui-button-merge-border-left:var(
|
|
324
324
|
--uui-popover-toggle-slot-button-merge-border-left
|
|
325
|
-
)}`],Ti([S("#container")],fe.prototype,"containerElement",2),Ti([a({type:Number})],fe.prototype,"margin",2),Ti([a({type:String,reflect:!0})],fe.prototype,"placement",1),Ti([a({type:Boolean,reflect:!0})],fe.prototype,"open",1),fe=Ti([p("uui-popover")],fe);function fp(){const i=this.addEventListener;this.addEventListener=function(e,r,o){if(e!=="focusout"){if(e==="beforetoggle"){this.polyfill_onBeforeToggle=s=>{this.dispatchEvent(new CustomEvent("polyfill-beforetoggle",{bubbles:!1,composed:!1,detail:{oldState:s.oldState,newState:s.newState}})),r(s)};return}i.call(this,e,r,o)}},this.polyfill_onFocusout=e=>{const r=e.relatedTarget;if(!r)return;const o=r?.closest("uui-popover-container"),s=r?.closest("[popovertarget]");!o&&!s&&this.hidePopover()},this.polyfill_onClick=e=>{e.composedPath().some(r=>r.tagName==="UUI-POPOVER-CONTAINER"||r.attributes?.popovertarget)||this.hidePopover()},this.polyfill_onParentPopoverUpdate=e=>{e.detail.newState==="closed"&&this.hidePopover()};const t=e=>e.parentElement?e.parentElement?.tagName==="UUI-POPOVER-CONTAINER"?e.parentElement:t(e.parentElement):null;this.polyfill_hasBeenMovedToBody||(this.style.display="none",this.style.position="fixed",this.style.inset="0",this.style.zIndex="9999"),this.showPopover=()=>{this.polyfill_hasBeenMovedToBody||(this.polyfill_parentPopoverContainer=t(this)),this.polyfill_onBeforeToggle({oldState:"closed",newState:"open"}),this.style.display="block",this.polyfill_parentPopoverContainer?.addEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),window.addEventListener("click",this.polyfill_onClick),window.addEventListener("focusout",this.polyfill_onFocusout),this.polyfill_originalParent=this.parentNode,this.polyfill_originalNextSibling=this.nextSibling;const e=this.getRootNode();if(e&&e.adoptedStyleSheets){const r=e.adoptedStyleSheets.reduce((n,c)=>n+Object.values(c.cssRules).reduce((u,h)=>u+`#${this.id} ${h.cssText}`,""),""),o=document.createElement("style");o.innerHTML=r,o.id="uui-popover-polyfill-style";const s=this.shadowRoot.host.querySelector("#uui-popover-polyfill-style");s&&s.parentNode.removeChild(s),this.insertAdjacentElement("beforeend",o)}this.parentNode!==document.body&&(this.parentNode?.removeChild(this),this.polyfill_hasBeenMovedToBody=!0,document.body.appendChild(this))},this.hidePopover=()=>{this.polyfill_hasBeenMovedToBody&&(document.body.removeChild(this),this.polyfill_hasBeenMovedToBody=!1,this.polyfill_originalParent?.insertBefore(this,this.polyfill_originalNextSibling)),window.removeEventListener("click",this.polyfill_onClick),window.removeEventListener("focusout",this.polyfill_onFocusout),this.polyfill_parentPopoverContainer?.removeEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),this.polyfill_onBeforeToggle({oldState:"open",newState:"closed"}),this.style.display="none"}}var mp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,me=(i,t,e,r)=>{for(var o=r>1?void 0:r?yp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&mp(t,e,o),o},Gs=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},j=(i,t,e)=>(Gs(i,t,"read from private field"),e?e.call(i):t.get(i)),wt=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},xp=(i,t,e,r)=>(Gs(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e),Je=(i,t,e)=>(Gs(i,t,"access private method"),e),Tt,ti,Fo,ee,Hi,Ws,qo,Fs,qs,Cl,Ko,Ks,Xs,Sl;let Ht=class extends b{constructor(){super(...arguments),wt(this,qo),wt(this,qs),wt(this,Ko),wt(this,Xs),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,wt(this,Tt,null),wt(this,ti,[]),wt(this,Fo,t=>{if(this._open=t.newState==="open",xp(this,Tt,lc(this,"popovertarget",this.id)),Je(this,Xs,Sl).call(this),j(this,Tt)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:t.oldState,newState:t.newState}})),!this._open){Je(this,Ko,Ks).call(this);return}Je(this,qs,Cl).call(this),requestAnimationFrame(()=>{j(this,ee).call(this)})}),wt(this,ee,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",j(this,Hi).call(this,3))}),wt(this,Hi,t=>{if(j(this,Ws).call(this),t--,j(this,Tt)===null)return;const e=this._actualPlacement.indexOf("top")!==-1,r=this._actualPlacement.indexOf("bottom")!==-1,o=this._actualPlacement.indexOf("left")!==-1,s=this._actualPlacement.indexOf("right")!==-1,n=this._actualPlacement.indexOf("-start")!==-1,c=this._actualPlacement.indexOf("-end")!==-1,u=j(this,Tt).getBoundingClientRect(),h=this.getBoundingClientRect();let f=0,g=0;r&&(f=u.top+u.height,n&&(g=u.left),c&&(g=u.left+u.width-h.width),!n&&!c&&(g=u.left+u.width/2-h.width/2)),e&&(f=u.top-h.height,n&&(g=u.left),c&&(g=u.left+u.width-h.width),!n&&!c&&(g=u.left+u.width/2-h.width/2)),o&&(g=u.left-h.width,n&&(f=u.top),c&&(f=u.top+u.height-h.height),!n&&!c&&(f=u.top+u.height/2-h.height/2)),s&&(g=u.left+u.width,n&&(f=u.top),c&&(f=u.top+u.height-h.height),!n&&!c&&(f=u.top+u.height/2-h.height/2));const m=window.innerWidth,$=window.innerHeight,E=Math.min(0,u.top+u.height),P=Math.max(Math.min(f,$-h.height),u.top-h.height);if(Math.max(E,P)!==f&&(e||r)&&t>0){Je(this,qo,Fs).call(this),j(this,Hi).call(this,t);return}f=Math.max(E,P);const K=Math.min(0,u.left+u.width),Ut=Math.max(Math.min(g,m-h.width),u.left-h.width),Gt=Math.max(K,Ut);if(Gt!==g&&(o||s)&&t>0){Je(this,qo,Fs).call(this),j(this,Hi).call(this,t);return}g=Gt,(f+h.height<0||f>$||g+h.width<0||g>m)&&this.hidePopover(),this.style.transform=`translate(${g}px, ${f}px)`,this.style.opacity="1"}),wt(this,Ws,()=>{const t={top:"bottom",bottom:"top",left:"right",right:"left"};let e=this._actualPlacement.split("-")[0];e=t[e]||e,e=e.charAt(0).toUpperCase()+e.slice(1);const r=`padding${e}`;this.style.padding="0",this.style[r]=`${this.margin}px`})}get open(){return this._open}get placement(){return this._placement}set placement(t){this._placement=t,this._actualPlacement=t,j(this,ee).call(this)}connectedCallback(){!HTMLElement.prototype.hasOwnProperty("popover")&&fp.bind(this)(),this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",j(this,Fo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",j(this,Fo)),Je(this,Ko,Ks).call(this)}render(){return l`<slot></slot>`}};Tt=new WeakMap,ti=new WeakMap,Fo=new WeakMap,ee=new WeakMap,Hi=new WeakMap,Ws=new WeakMap,qo=new WeakSet,Fs=function(){const[i,t]=this._actualPlacement.split("-"),e=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${e}-${t}`},qs=new WeakSet,Cl=function(){j(this,ti).forEach(i=>{i.addEventListener("scroll",j(this,ee),{passive:!0})}),document.addEventListener("scroll",j(this,ee),{passive:!0})},Ko=new WeakSet,Ks=function(){j(this,ti).forEach(i=>{i.removeEventListener("scroll",j(this,ee))}),document.removeEventListener("scroll",j(this,ee))},Xs=new WeakSet,Sl=function(){if(!j(this,Tt))return;let i=getComputedStyle(j(this,Tt));if(i.position==="fixed")return;const t=i.position==="absolute",e=/(auto|scroll)/;let r=j(this,Tt);for(;r=r.parentElement;)if(i=getComputedStyle(r),!(t&&i.position==="static")&&(e.test(i.overflow+i.overflowY+i.overflowX)&&j(this,ti).push(r),i.position==="fixed"))return;j(this,ti).push(document.body)},Ht.styles=[d`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible}`],me([a({type:Number})],Ht.prototype,"margin",2),me([a({type:Boolean})],Ht.prototype,"open",1),me([a({type:String,reflect:!0})],Ht.prototype,"placement",1),me([v()],Ht.prototype,"_placement",2),me([v()],Ht.prototype,"_open",2),me([v()],Ht.prototype,"_actualPlacement",2),Ht=me([p("uui-popover-container")],Ht);var _p=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,Pl=(i,t,e,r)=>{for(var o=r>1?void 0:r?wp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&_p(t,e,o),o};const $p=(i,t,e)=>Math.min(Math.max(i,t),e);let Xo=class extends b{constructor(){super(...arguments),this._progress=0}get progress(){return this._progress}set progress(t){const e=this._progress;this._progress=$p(t,0,100),this.requestUpdate("progress",e)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return l`<div id="bar" style="${ft(this._getProgressStyle())}"></div>`}};Xo.styles=[d`: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%}`],Pl([a({type:Number})],Xo.prototype,"progress",1),Xo=Pl([p("uui-progress-bar")],Xo);let Vi=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Vi.CHANGE="change";var kp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,ye=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ep(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&kp(t,e,o),o},Cp=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Al=(i,t,e)=>(Cp(i,t,"read from private field"),e?e.call(i):t.get(i)),Ol=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ys,Zs;let $t=class extends b{constructor(){super(),this.name="",this.value="",this.label="",this._checked=!1,this._disabled=!1,Ol(this,Ys,()=>{this.style.setProperty("--uui-show-focus-outline","1")}),Ol(this,Zs,()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("mousedown",Al(this,Zs)),this.addEventListener("blur",Al(this,Ys))}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,t===!0?(this.setAttribute("aria-checked",""),this.disabled||this.setAttribute("tabindex","0")):(this.setAttribute("tabindex","-1"),this.removeAttribute("aria-checked")),this.requestUpdate("checked",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-hidden",t?"true":"false"),this.setAttribute("tabindex",t?"-1":"0"),this.requestUpdate("disabled",e)}focus(){this.inputElement.focus()}click(){this.inputElement.click()}_onChange(t){t.stopPropagation();const e=this.inputElement.checked;this.checked=e,e&&this.focus(),this.dispatchEvent(new Vi(Vi.CHANGE))}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.setAttribute("tabindex","0")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.hasAttribute("aria-checked")||this.removeAttribute("aria-checked")}render(){return l`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled}" @change="${this._onChange}"><div id="button"></div><div id="label">${this.label?l`<span>${this.label}</span>`:l`<slot></slot>`}</div></label>`}};Ys=new WeakMap,Zs=new WeakMap,$t.styles=[po,d`: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{display:block;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;line-height:18px}#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) #button{outline:calc(2px * var(--uui-show-focus-outline,1)) 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:default;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:${bo}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],ye([S("#input")],$t.prototype,"inputElement",2),ye([a({type:String})],$t.prototype,"name",2),ye([a({type:String})],$t.prototype,"value",2),ye([a({type:String})],$t.prototype,"label",2),ye([a({type:Boolean,reflect:!0})],$t.prototype,"checked",1),ye([a({type:Boolean,reflect:!0})],$t.prototype,"disabled",1),$t=ye([p("uui-radio")],$t);let Qs=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};Qs.CHANGE="change";var Sp=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,zl=(i,t,e,r)=>{for(var o=r>1?void 0:r?Pp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Sp(t,e,o),o};const Ap="ArrowLeft",Op="ArrowUp",zp="ArrowRight",Lp="ArrowDown",Ip=" ";let Bi=class extends gt(b){constructor(){super(),this.disabled=!1,this._selected=null,this._radioElements=[],this._onChildBlur=()=>{this.pristine=!1},this._handleSelectOnClick=t=>{t.target.checked===!0&&(this.value=t.target.value,this._fireChangeEvent())},this.addEventListener("keydown",this._onKeydown),this.addEventListener("keypress",this._onKeypress),this.updateComplete.then(()=>{this._updateRadioElementsCheckedState(this.value)})}get value(){return this._value}set value(t){super.value=t,(t===null||t==="")&&this._makeFirstEnabledFocusable(),this._updateRadioElementsCheckedState(t)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}focus(){this._selected!==null?this._radioElements[this._selected]?.focus():this._findNextEnabledElement()?.focus()}click(){this._selected!==null?this._radioElements[this._selected]?.click():this._findNextEnabledElement()?.click()}getFormElement(){if(this._radioElements&&this._selected)return this._radioElements[this._selected]}_setNameOnRadios(t){this._radioElements?.forEach(e=>e.name=t)}_updateRadioElementsCheckedState(t){this._radioElements.forEach((e,r)=>{e.value===t?(e.checked=!0,this._selected=r):e.checked=!1})}_setDisableOnRadios(t){this._radioElements?.forEach(e=>e.disabled=t)}_handleSlotChange(t){if(t.stopPropagation(),this._radioElements?.forEach(r=>{r.removeEventListener(Vi.CHANGE,this._handleSelectOnClick),r.removeEventListener("blur",this._onChildBlur)}),this._selected=null,this._radioElements=t.target.assignedElements({flatten:!0}).filter(r=>r instanceof $t),this._radioElements.length===0)return;this._radioElements.forEach(r=>{r.addEventListener(Vi.CHANGE,this._handleSelectOnClick),r.addEventListener("blur",this._onChildBlur)}),this._setNameOnRadios(this.name),this.disabled&&this._setDisableOnRadios(!0);const e=this._radioElements.filter(r=>r.checked===!0);e.length>1&&(this._radioElements.forEach(r=>{r.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),e.length===1?(this.value=e[0].value,this._selected=this._radioElements.indexOf(e[0]),e[0].disabled===!1?(this._radioElements.forEach(r=>{r.makeUnfocusable()}),e[0].makeFocusable()):this._makeFirstEnabledFocusable()):this._makeFirstEnabledFocusable()}_makeFirstEnabledFocusable(){this._selected=null,this._radioElements?.forEach(t=>{t.makeUnfocusable()}),this._findNextEnabledElement()?.makeFocusable()}_findNextEnabledElement(t=1){if(!this._radioElements)return null;const e=this._selected||0,r=this._radioElements.length;let o=this._selected===null?0:1;for(;o<r;){let s=(e+o*t)%r;if(s<0&&(s+=r),this._radioElements[s].disabled===!1)return this._radioElements[s];o++}return null}_selectPreviousElement(){this.value=this._findNextEnabledElement(-1)?.value||"",this._radioElements[this._selected||0]?.focus(),this._fireChangeEvent()}_selectNextElement(){this.value=this._findNextEnabledElement()?.value||"",this._radioElements[this._selected||0]?.focus(),this._fireChangeEvent()}_onKeydown(t){switch(t.key){case Ap:case Op:{t.preventDefault(),this._selectPreviousElement();break}case zp:case Lp:{t.preventDefault(),this._selectNextElement();break}case Ip:this._selected===null&&(this.value=this._findNextEnabledElement()?.value,this._fireChangeEvent())}}_onKeypress(t){t.key=="Enter"&&this.submit()}_fireChangeEvent(){this.pristine=!1,this.dispatchEvent(new Qs(Qs.CHANGE))}updated(t){super.updated(t),t.has("disabled")&&this._setDisableOnRadios(this.disabled),t.has("name")&&this._setNameOnRadios(t.get("name"))}render(){return l`<slot @slotchange="${this._handleSlotChange}"></slot>`}};Bi.formAssociated=!0,Bi.styles=[d`: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-danger-standalone,#bf214e)}`],zl([a({type:Boolean,reflect:!0})],Bi.prototype,"disabled",2),Bi=zl([p("uui-radio-group")],Bi);let kt=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};kt.INPUT="input",kt.CHANGE="change";var jp=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,N=(i,t,e,r)=>{for(var o=r>1?void 0:r?Np(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&jp(t,e,o),o},Mp=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Dp=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},ei=(i,t,e)=>(Mp(i,t,"access private method"),e),ie,xe;const Js={TOP:3,CENTER:2,BACK:1},Ri=18,Vt=12,Tp=24;let L=class extends gt(b){constructor(){super(),Dp(this,ie),this.disabled=!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,this._onKeypress=t=>{t.key=="Enter"&&this.submit()},this._onTouchStart=t=>{if(this.disabled)return;const e=t.composedPath()[0];if(e!==this._outerTrack)if(e===this._innerColor||e===this._innerColorThumb)window.addEventListener("touchend",this._onTouchEnd),window.addEventListener("touchcancel",this._onTouchEnd),window.addEventListener("touchmove",this._onTouchMove),this._movement=!0,this._saveStartPoints(t.touches[0].pageX);else{const r=this._getClickedValue(t.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=t=>{this._dragBothValuesByMousePos(t.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=t=>{if(this.disabled)return;const e=t.composedPath()[0];if(e!==this._outerTrack)if(e===this._innerColor||e===this._innerColorThumb)window.addEventListener("mouseup",this._onMouseUp),window.addEventListener("mousemove",this._onMouseMove),this._movement=!0,this._saveStartPoints(t.pageX);else{const r=this._getClickedValue(t.pageX),o=Math.abs(this._lowInputValue-r),s=Math.abs(this._highInputValue-r);o<s?this.setValueLow(r):this.setValueHigh(r)}},this._onMouseMove=t=>{t.preventDefault(),this._dragBothValuesByMousePos(t.pageX)},this._onMouseUp=()=>{this._movement=!1,this.onChanged(),window.removeEventListener("mouseup",this._onMouseUp),window.removeEventListener("mousemove",this._onMouseMove)},this.addEventListener("keypress",this._onKeypress),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(t){this._min=t,ei(this,ie,xe).call(this)}get max(){return this._max}set max(t){this._max=t,ei(this,ie,xe).call(this)}get step(){return this._step}set step(t){this._step=t,ei(this,ie,xe).call(this)}get minGap(){return this._minGap}set minGap(t){this._minGap=t,ei(this,ie,xe).call(this)}get maxGap(){return this._maxGap}set maxGap(t){this._maxGap=t,ei(this,ie,xe).call(this)}get value(){return this._value}set value(t){super.value=t,ei(this,ie,xe).call(this)}setValueLow(t){t=A(t,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(t,this._highInputValue)}setValueHigh(t){t=A(t,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,t)}setValue(t,e,r){if(r){const o=this.startPoint.high-this.startPoint.low;t=A(t,this.min,this.max-o),e=A(e,this.min+o,this.max)}this._inputLow.value=t.toString(),this._inputHigh.value=e.toString(),this.value=`${t},${e}`}getFormElement(){return this._currentFocus?this._currentFocus:this._inputLow}connectedCallback(){super.connectedCallback(),this.value||(this.value=`${this._min},${this._max}`)}firstUpdated(t){super.updated(t),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 t=this._minGap;this._highInputValue-t<this._min?(this.setValueHigh(this._lowInputValue+t),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-t),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 t=this._max-this._min,e=this._lowInputValue-this._min,r=this._highInputValue-this._min,o=e/t*100,s=100-r/t*100;this._lowValuePercentStart=A(o,0,100),this._highValuePercentEnd=A(s,0,100)}_getClickedValue(t){const e=this._outerTrack.getBoundingClientRect().left,r=(t-e-Vt)/(this._trackWidth-Vt*2)*(this._max-this._min)+this._min;return Math.round(r/this._step)*this._step}_saveStartPoints(t){this.startPoint={mouse:t,low:this._lowInputValue,high:this._highInputValue}}_dragBothValuesByMousePos(t){const e=this._outerTrack.offsetWidth,r=t-this.startPoint.mouse,o=this._max-this._min,s=r/(e+Vt*2),n=Math.round(s*o/this._step)*this._step,c=this.startPoint.low+n,u=this.startPoint.high+n;this.setValue(c,u,!0),this.dispatchEvent(new kt(kt.INPUT))}_onLowInput(t){this.disabled&&t.preventDefault(),this._currentFocus=this._inputLow;const e=Number(t.target.value);this.setValueLow(e),this.dispatchEvent(new kt(kt.INPUT))}_onHighInput(t){this.disabled&&t.preventDefault(),this._currentFocus=this._inputHigh;const e=Number(t.target.value);this.setValueHigh(e),this.dispatchEvent(new kt(kt.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 kt(kt.CHANGE))}render(){return l`
|
|
325
|
+
)}`],Xt([C("#container")],n.UUIPopoverElement.prototype,"containerElement",2),Xt([l({type:Number})],n.UUIPopoverElement.prototype,"margin",2),Xt([l({type:String,reflect:!0})],n.UUIPopoverElement.prototype,"placement",1),Xt([l({type:Boolean,reflect:!0})],n.UUIPopoverElement.prototype,"open",1),n.UUIPopoverElement=Xt([b("uui-popover")],n.UUIPopoverElement);function xh(){const i=this.addEventListener;this.addEventListener=function(t,r,o){if(t!=="focusout"){if(t==="beforetoggle"){this.polyfill_onBeforeToggle=s=>{this.dispatchEvent(new CustomEvent("polyfill-beforetoggle",{bubbles:!1,composed:!1,detail:{oldState:s.oldState,newState:s.newState}})),r(s)};return}i.call(this,t,r,o)}},this.polyfill_onFocusout=t=>{const r=t.relatedTarget;if(!r)return;const o=r?.closest("uui-popover-container"),s=r?.closest("[popovertarget]");!o&&!s&&this.hidePopover()},this.polyfill_onClick=t=>{t.composedPath().some(r=>r.tagName==="UUI-POPOVER-CONTAINER"||r.attributes?.popovertarget)||this.hidePopover()},this.polyfill_onParentPopoverUpdate=t=>{t.detail.newState==="closed"&&this.hidePopover()};const e=t=>t.parentElement?t.parentElement?.tagName==="UUI-POPOVER-CONTAINER"?t.parentElement:e(t.parentElement):null;this.polyfill_hasBeenMovedToBody||(this.style.display="none",this.style.position="fixed",this.style.inset="0",this.style.zIndex="9999"),this.showPopover=()=>{this.polyfill_hasBeenMovedToBody||(this.polyfill_parentPopoverContainer=e(this)),this.polyfill_onBeforeToggle({oldState:"closed",newState:"open"}),this.style.display="block",this.polyfill_parentPopoverContainer?.addEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),window.addEventListener("click",this.polyfill_onClick),window.addEventListener("focusout",this.polyfill_onFocusout),this.polyfill_originalParent=this.parentNode,this.polyfill_originalNextSibling=this.nextSibling;const t=this.getRootNode();if(t&&t.adoptedStyleSheets){const r=t.adoptedStyleSheets.reduce((a,d)=>a+Object.values(d.cssRules).reduce((c,h)=>c+`#${this.id} ${h.cssText}`,""),""),o=document.createElement("style");o.innerHTML=r,o.id="uui-popover-polyfill-style";const s=this.shadowRoot.host.querySelector("#uui-popover-polyfill-style");s&&s.parentNode.removeChild(s),this.insertAdjacentElement("beforeend",o)}this.parentNode!==document.body&&(this.parentNode?.removeChild(this),this.polyfill_hasBeenMovedToBody=!0,document.body.appendChild(this))},this.hidePopover=()=>{this.polyfill_hasBeenMovedToBody&&(document.body.removeChild(this),this.polyfill_hasBeenMovedToBody=!1,this.polyfill_originalParent?.insertBefore(this,this.polyfill_originalNextSibling)),window.removeEventListener("click",this.polyfill_onClick),window.removeEventListener("focusout",this.polyfill_onFocusout),this.polyfill_parentPopoverContainer?.removeEventListener("polyfill-beforetoggle",this.polyfill_onParentPopoverUpdate),this.polyfill_onBeforeToggle({oldState:"open",newState:"closed"}),this.style.display="none"}}var Ch=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,qe=(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&&Ch(e,t,o),o},xr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},O=(i,e,t)=>(xr(i,e,"read from private field"),t?t.call(i):e.get(i)),le=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ph=(i,e,t,r)=>(xr(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),wt=(i,e,t)=>(xr(i,e,"access private method"),t),we,Ut,Yi,Oe,Yt,Cr,Zi,Sr,Pr,Qs,Qi,Ar,Or,Js;n.UUIPopoverContainerElement=class extends m{constructor(){super(...arguments),le(this,Zi),le(this,Pr),le(this,Qi),le(this,Or),this.margin=0,this._placement="bottom-start",this._open=!1,this._actualPlacement=this._placement,le(this,we,null),le(this,Ut,[]),le(this,Yi,e=>{if(this._open=e.newState==="open",Ph(this,we,yu(this,"popovertarget",this.id)),wt(this,Or,Js).call(this),O(this,we)?.dispatchEvent(new CustomEvent("uui-popover-before-toggle",{bubbles:!1,composed:!1,detail:{oldState:e.oldState,newState:e.newState}})),!this._open){wt(this,Qi,Ar).call(this);return}wt(this,Pr,Qs).call(this),requestAnimationFrame(()=>{O(this,Oe).call(this)})}),le(this,Oe,()=>{this._open&&(this._actualPlacement=this._placement,this.style.opacity="0",O(this,Yt).call(this,3))}),le(this,Yt,e=>{if(O(this,Cr).call(this),e--,O(this,we)===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,d=this._actualPlacement.indexOf("-end")!==-1,c=O(this,we).getBoundingClientRect(),h=this.getBoundingClientRect();let f=0,g=0;r&&(f=c.top+c.height,a&&(g=c.left),d&&(g=c.left+c.width-h.width),!a&&!d&&(g=c.left+c.width/2-h.width/2)),t&&(f=c.top-h.height,a&&(g=c.left),d&&(g=c.left+c.width-h.width),!a&&!d&&(g=c.left+c.width/2-h.width/2)),o&&(g=c.left-h.width,a&&(f=c.top),d&&(f=c.top+c.height-h.height),!a&&!d&&(f=c.top+c.height/2-h.height/2)),s&&(g=c.left+c.width,a&&(f=c.top),d&&(f=c.top+c.height-h.height),!a&&!d&&(f=c.top+c.height/2-h.height/2));const y=window.innerWidth,$=window.innerHeight,I=Math.min(0,c.top+c.height),S=Math.max(Math.min(f,$-h.height),c.top-h.height);if(Math.max(I,S)!==f&&(t||r)&&e>0){wt(this,Zi,Sr).call(this),O(this,Yt).call(this,e);return}f=Math.max(I,S);const H=Math.min(0,c.left+c.width),$e=Math.max(Math.min(g,y-h.width),c.left-h.width),ke=Math.max(H,$e);if(ke!==g&&(o||s)&&e>0){wt(this,Zi,Sr).call(this),O(this,Yt).call(this,e);return}g=ke,(f+h.height<0||f>$||g+h.width<0||g>y)&&this.hidePopover(),this.style.transform=`translate(${g}px, ${f}px)`,this.style.opacity="1"}),le(this,Cr,()=>{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,O(this,Oe).call(this)}connectedCallback(){!HTMLElement.prototype.hasOwnProperty("popover")&&xh.bind(this)(),this.hasAttribute("popover")||this.setAttribute("popover",""),super.connectedCallback(),this.addEventListener("beforetoggle",O(this,Yi))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("beforetoggle",O(this,Yi)),wt(this,Qi,Ar).call(this)}render(){return u`<slot></slot>`}},we=new WeakMap,Ut=new WeakMap,Yi=new WeakMap,Oe=new WeakMap,Yt=new WeakMap,Cr=new WeakMap,Zi=new WeakSet,Sr=function(){const[i,e]=this._actualPlacement.split("-"),t=i==="top"?"bottom":i==="bottom"?"top":i==="left"?"right":"left";this._actualPlacement=`${t}-${e}`},Pr=new WeakSet,Qs=function(){O(this,Ut).forEach(i=>{i.addEventListener("scroll",O(this,Oe),{passive:!0})}),document.addEventListener("scroll",O(this,Oe),{passive:!0})},Qi=new WeakSet,Ar=function(){O(this,Ut).forEach(i=>{i.removeEventListener("scroll",O(this,Oe))}),document.removeEventListener("scroll",O(this,Oe))},Or=new WeakSet,Js=function(){if(!O(this,we))return;let i=getComputedStyle(O(this,we));if(i.position==="fixed")return;const e=i.position==="absolute",t=/(auto|scroll)/;let r=O(this,we);for(;r=r.parentElement;)if(i=getComputedStyle(r),!(e&&i.position==="static")&&(t.test(i.overflow+i.overflowY+i.overflowX)&&O(this,Ut).push(r),i.position==="fixed"))return;O(this,Ut).push(document.body)},n.UUIPopoverContainerElement.styles=[p`:host{margin:0;width:fit-content;height:fit-content;border:none;border-radius:0;padding:0;background-color:none;background:0 0;overflow:visible}`],qe([l({type:Number})],n.UUIPopoverContainerElement.prototype,"margin",2),qe([l({type:Boolean})],n.UUIPopoverContainerElement.prototype,"open",1),qe([l({type:String,reflect:!0})],n.UUIPopoverContainerElement.prototype,"placement",1),qe([v()],n.UUIPopoverContainerElement.prototype,"_placement",2),qe([v()],n.UUIPopoverContainerElement.prototype,"_open",2),qe([v()],n.UUIPopoverContainerElement.prototype,"_actualPlacement",2),n.UUIPopoverContainerElement=qe([b("uui-popover-container")],n.UUIPopoverContainerElement);var Ah=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,ea=(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&&Ah(e,t,o),o};const zh=(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=zh(e,0,100),this.requestUpdate("progress",t)}_getProgressStyle(){return{width:`${this._progress}%`}}render(){return u`<div id="bar" style="${ne(this._getProgressStyle())}"></div>`}},n.UUIProgressBarElement.styles=[p`: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%}`],ea([l({type:Number})],n.UUIProgressBarElement.prototype,"progress",1),n.UUIProgressBarElement=ea([b("uui-progress-bar")],n.UUIProgressBarElement);let Et=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Et.CHANGE="change";var Lh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Ke=(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&&Lh(e,t,o),o},Nh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ta=(i,e,t)=>(Nh(i,e,"read from private field"),t?t.call(i):e.get(i)),ia=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},zr,Lr;n.UUIRadioElement=class extends m{constructor(){super(),this.name="",this.value="",this.label="",this._checked=!1,this._disabled=!1,ia(this,zr,()=>{this.style.setProperty("--uui-show-focus-outline","1")}),ia(this,Lr,()=>{this.style.setProperty("--uui-show-focus-outline","0")}),this.addEventListener("mousedown",ta(this,Lr)),this.addEventListener("blur",ta(this,zr))}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,e===!0?(this.setAttribute("aria-checked",""),this.disabled||this.setAttribute("tabindex","0")):(this.setAttribute("tabindex","-1"),this.removeAttribute("aria-checked")),this.requestUpdate("checked",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-hidden",e?"true":"false"),this.setAttribute("tabindex",e?"-1":"0"),this.requestUpdate("disabled",t)}focus(){this.inputElement.focus()}click(){this.inputElement.click()}_onChange(e){e.stopPropagation();const t=this.inputElement.checked;this.checked=t,t&&this.focus(),this.dispatchEvent(new Et(Et.CHANGE))}uncheck(){this.checked=!1}check(){this.checked=!0}makeFocusable(){this.disabled||this.setAttribute("tabindex","0")}makeUnfocusable(){this.disabled||this.setAttribute("tabindex","-1")}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.hasAttribute("aria-checked")||this.removeAttribute("aria-checked")}render(){return u`<label><input id="input" type="radio" name="${this.name}" value="${this.value}" .checked="${this.checked}" .disabled="${this.disabled}" @change="${this._onChange}"><div id="button"></div><div id="label">${this.label?u`<span>${this.label}</span>`:u`<slot></slot>`}</div></label>`}},zr=new WeakMap,Lr=new WeakMap,n.UUIRadioElement.styles=[fi,p`: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{display:block;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;line-height:18px}#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) #button{outline:calc(2px * var(--uui-show-focus-outline,1)) 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:default;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:${yi}}@media (prefers-reduced-motion){:host([disabled]:active) #button{animation:none}#button::after{transition:none}}`],Ke([C("#input")],n.UUIRadioElement.prototype,"inputElement",2),Ke([l({type:String})],n.UUIRadioElement.prototype,"name",2),Ke([l({type:String})],n.UUIRadioElement.prototype,"value",2),Ke([l({type:String})],n.UUIRadioElement.prototype,"label",2),Ke([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"checked",1),Ke([l({type:Boolean,reflect:!0})],n.UUIRadioElement.prototype,"disabled",1),n.UUIRadioElement=Ke([b("uui-radio")],n.UUIRadioElement);let Ji=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Ji.CHANGE="change";var Mh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,oa=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dh(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&&Mh(e,t,o),o};const jh="ArrowLeft",Bh="ArrowUp",Vh="ArrowRight",Hh="ArrowDown",Rh=" ";n.UUIRadioGroupElement=class extends oe(m){constructor(){super(),this.disabled=!1,this._selected=null,this._radioElements=[],this._onChildBlur=()=>{this.pristine=!1},this._handleSelectOnClick=e=>{e.target.checked===!0&&(this.value=e.target.value,this._fireChangeEvent())},this.addEventListener("keydown",this._onKeydown),this.addEventListener("keypress",this._onKeypress),this.updateComplete.then(()=>{this._updateRadioElementsCheckedState(this.value)})}get value(){return this._value}set value(e){super.value=e,(e===null||e==="")&&this._makeFirstEnabledFocusable(),this._updateRadioElementsCheckedState(e)}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","radiogroup")}focus(){this._selected!==null?this._radioElements[this._selected]?.focus():this._findNextEnabledElement()?.focus()}click(){this._selected!==null?this._radioElements[this._selected]?.click():this._findNextEnabledElement()?.click()}getFormElement(){if(this._radioElements&&this._selected)return this._radioElements[this._selected]}_setNameOnRadios(e){this._radioElements?.forEach(t=>t.name=e)}_updateRadioElementsCheckedState(e){this._radioElements.forEach((t,r)=>{t.value===e?(t.checked=!0,this._selected=r):t.checked=!1})}_setDisableOnRadios(e){this._radioElements?.forEach(t=>t.disabled=e)}_handleSlotChange(e){if(e.stopPropagation(),this._radioElements?.forEach(r=>{r.removeEventListener(Et.CHANGE,this._handleSelectOnClick),r.removeEventListener("blur",this._onChildBlur)}),this._selected=null,this._radioElements=e.target.assignedElements({flatten:!0}).filter(r=>r instanceof n.UUIRadioElement),this._radioElements.length===0)return;this._radioElements.forEach(r=>{r.addEventListener(Et.CHANGE,this._handleSelectOnClick),r.addEventListener("blur",this._onChildBlur)}),this._setNameOnRadios(this.name),this.disabled&&this._setDisableOnRadios(!0);const t=this._radioElements.filter(r=>r.checked===!0);t.length>1&&(this._radioElements.forEach(r=>{r.checked=!1}),this.value="",console.error("There can only be one checked radio among the <"+this.nodeName+"> children",this)),t.length===1?(this.value=t[0].value,this._selected=this._radioElements.indexOf(t[0]),t[0].disabled===!1?(this._radioElements.forEach(r=>{r.makeUnfocusable()}),t[0].makeFocusable()):this._makeFirstEnabledFocusable()):this._makeFirstEnabledFocusable()}_makeFirstEnabledFocusable(){this._selected=null,this._radioElements?.forEach(e=>{e.makeUnfocusable()}),this._findNextEnabledElement()?.makeFocusable()}_findNextEnabledElement(e=1){if(!this._radioElements)return null;const t=this._selected||0,r=this._radioElements.length;let o=this._selected===null?0:1;for(;o<r;){let s=(t+o*e)%r;if(s<0&&(s+=r),this._radioElements[s].disabled===!1)return this._radioElements[s];o++}return null}_selectPreviousElement(){this.value=this._findNextEnabledElement(-1)?.value||"",this._radioElements[this._selected||0]?.focus(),this._fireChangeEvent()}_selectNextElement(){this.value=this._findNextEnabledElement()?.value||"",this._radioElements[this._selected||0]?.focus(),this._fireChangeEvent()}_onKeydown(e){switch(e.key){case jh:case Bh:{e.preventDefault(),this._selectPreviousElement();break}case Vh:case Hh:{e.preventDefault(),this._selectNextElement();break}case Rh:this._selected===null&&(this.value=this._findNextEnabledElement()?.value,this._fireChangeEvent())}}_onKeypress(e){e.key=="Enter"&&this.submit()}_fireChangeEvent(){this.pristine=!1,this.dispatchEvent(new Ji(Ji.CHANGE))}updated(e){super.updated(e),e.has("disabled")&&this._setDisableOnRadios(this.disabled),e.has("name")&&this._setNameOnRadios(e.get("name"))}render(){return u`<slot @slotchange="${this._handleSlotChange}"></slot>`}},n.UUIRadioGroupElement.formAssociated=!0,n.UUIRadioGroupElement.styles=[p`: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-danger-standalone,#bf214e)}`],oa([l({type:Boolean,reflect:!0})],n.UUIRadioGroupElement.prototype,"disabled",2),n.UUIRadioGroupElement=oa([b("uui-radio-group")],n.UUIRadioGroupElement);let ue=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};ue.INPUT="input",ue.CHANGE="change";var Fh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,z=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gh(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},Wh=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},qh=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$t=(i,e,t)=>(Wh(i,e,"access private method"),t),ze,Xe;const Tr={TOP:3,CENTER:2,BACK:1},Zt=18,Ue=12,Kh=24;n.UUIRangeSliderElement=class extends oe(m){constructor(){super(),qh(this,ze),this.disabled=!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,this._onKeypress=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)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("keypress",this._onKeypress),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,$t(this,ze,Xe).call(this)}get max(){return this._max}set max(e){this._max=e,$t(this,ze,Xe).call(this)}get step(){return this._step}set step(e){this._step=e,$t(this,ze,Xe).call(this)}get minGap(){return this._minGap}set minGap(e){this._minGap=e,$t(this,ze,Xe).call(this)}get maxGap(){return this._maxGap}set maxGap(e){this._maxGap=e,$t(this,ze,Xe).call(this)}get value(){return this._value}set value(e){super.value=e,$t(this,ze,Xe).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}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-Ue)/(this._trackWidth-Ue*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+Ue*2),a=Math.round(s*o/this._step)*this._step,d=this.startPoint.low+a,c=this.startPoint.high+a;this.setValue(d,c,!0),this.dispatchEvent(new ue(ue.INPUT))}_onLowInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputLow;const t=Number(e.target.value);this.setValueLow(t),this.dispatchEvent(new ue(ue.INPUT))}_onHighInput(e){this.disabled&&e.preventDefault(),this._currentFocus=this._inputHigh;const t=Number(e.target.value);this.setValueHigh(t),this.dispatchEvent(new ue(ue.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 ue(ue.CHANGE))}render(){return u`
|
|
326
326
|
<div id="range-slider">
|
|
327
327
|
${this._renderNativeInputs()}
|
|
328
328
|
<div id="inner-track">
|
|
@@ -336,18 +336,18 @@
|
|
|
336
336
|
${this._renderSteps()}
|
|
337
337
|
</div>
|
|
338
338
|
</div>
|
|
339
|
-
`}_renderThumbValues(){return
|
|
339
|
+
`}_renderThumbValues(){return u`<div class="thumb-values">
|
|
340
340
|
<span><span>${this._lowInputValue}</span></span>
|
|
341
341
|
<span><span>${this._highInputValue}</span></span>
|
|
342
|
-
</div>`}_renderSteps(){const
|
|
342
|
+
</div>`}_renderSteps(){const e=(this._max-this._min)/this._step,t=(this._trackWidth-Ue*2)/e;if(t<Kh||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">
|
|
343
343
|
<svg height="100%" width="100%">
|
|
344
344
|
<rect x="9" y="9" height="3" rx="2" />
|
|
345
345
|
${this._renderStepCircles(o)}
|
|
346
346
|
</svg>
|
|
347
|
-
${this._renderStepValues(
|
|
348
|
-
</div>`}_renderStepValues(
|
|
349
|
-
${r.map(o=>
|
|
350
|
-
</div>`}_renderStepCircles(
|
|
347
|
+
${this._renderStepValues(e)}
|
|
348
|
+
</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++);return u`<div class="step-values">
|
|
349
|
+
${r.map(o=>u`<span><span>${o}</span></span>`)}
|
|
350
|
+
</div>`}_renderStepCircles(e){const t=this._trackWidth/(this._max-this._min);return _`${e.map(r=>{const o=r+Ue,s=this._lowInputValue-this._min,a=this._highInputValue-this._min;return o/t>=s&&o/t<=a?_`<circle class="track-step filled" cx="${o}" cy="5" r="4.5" />`:_`<circle class="track-step regular" cx="${o}" cy="5" r="4.5" />`})}`}_renderNativeInputs(){return u` <div class="native-wrapper">
|
|
351
351
|
<input
|
|
352
352
|
id="inputLow"
|
|
353
353
|
class="${this._movement?"focus":""}"
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
?disabled="${this.disabled}"
|
|
373
373
|
@input=${this._onHighInput}
|
|
374
374
|
@change=${this._onHighChange} />
|
|
375
|
-
</div>`}}
|
|
375
|
+
</div>`}},ze=new WeakSet,Xe=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.UUIRangeSliderElement.formAssociated=!0,n.UUIRangeSliderElement.styles=[p`
|
|
376
376
|
:host {
|
|
377
377
|
--color-interactive: var(--uui-color-selected,#3544b1);
|
|
378
378
|
--color-hover: var(--uui-color-selected-emphasis,rgb(70, 86, 200));
|
|
@@ -400,8 +400,8 @@
|
|
|
400
400
|
background-color: var(--uui-color-border-standalone,#c2c2c2);
|
|
401
401
|
position: absolute;
|
|
402
402
|
height: 3px;
|
|
403
|
-
left: ${
|
|
404
|
-
right: ${
|
|
403
|
+
left: ${Ue}px; /* Match TRACK_MARGIN */
|
|
404
|
+
right: ${Ue}px; /* Match TRACK_MARGIN */
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
:host(:not([disabled]):hover) #inner-track,
|
|
@@ -415,10 +415,10 @@
|
|
|
415
415
|
display: flex;
|
|
416
416
|
flex-direction: column;
|
|
417
417
|
justify-content: center;
|
|
418
|
-
height: ${
|
|
418
|
+
height: ${Zt}px;
|
|
419
419
|
cursor: grab;
|
|
420
420
|
user-select: none;
|
|
421
|
-
z-index: ${
|
|
421
|
+
z-index: ${Tr.CENTER};
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
:host([disabled]) #inner-color-thumb {
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
|
|
464
464
|
/** Steps */
|
|
465
465
|
.step-wrapper {
|
|
466
|
-
margin: 0 ${-1*
|
|
466
|
+
margin: 0 ${-1*Ue}px;
|
|
467
467
|
height: 11px;
|
|
468
468
|
position: absolute;
|
|
469
469
|
left: 0;
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
|
|
503
503
|
.step-values {
|
|
504
504
|
box-sizing: border-box;
|
|
505
|
-
margin: 0 ${
|
|
505
|
+
margin: 0 ${Ue}px; /* Match TRACK_MARGIN */
|
|
506
506
|
display: flex;
|
|
507
507
|
justify-content: space-between;
|
|
508
508
|
font-size: var(--uui-type-small-size,12px);
|
|
@@ -580,9 +580,9 @@
|
|
|
580
580
|
pointer-events: all;
|
|
581
581
|
cursor: grab;
|
|
582
582
|
position: relative;
|
|
583
|
-
z-index: ${
|
|
584
|
-
width: ${
|
|
585
|
-
height: ${
|
|
583
|
+
z-index: ${Tr.TOP};
|
|
584
|
+
width: ${Zt}px;
|
|
585
|
+
height: ${Zt}px;
|
|
586
586
|
border-radius: 24px;
|
|
587
587
|
border: none;
|
|
588
588
|
background-color: var(--color-interactive);
|
|
@@ -624,9 +624,9 @@
|
|
|
624
624
|
pointer-events: all;
|
|
625
625
|
cursor: grab;
|
|
626
626
|
position: relative;
|
|
627
|
-
z-index: ${
|
|
628
|
-
width: ${
|
|
629
|
-
height: ${
|
|
627
|
+
z-index: ${Tr.TOP};
|
|
628
|
+
width: ${Zt}px;
|
|
629
|
+
height: ${Zt}px;
|
|
630
630
|
border-radius: 24px;
|
|
631
631
|
border: none;
|
|
632
632
|
background-color: var(--color-interactive);
|
|
@@ -660,7 +660,7 @@
|
|
|
660
660
|
inset 0 0 0 2px var(--uui-palette-mine-grey,#3e3e3e),
|
|
661
661
|
inset 0 0 0 4px var(--uui-color-surface,#fff);
|
|
662
662
|
}
|
|
663
|
-
`],N([a({type:String})],L.prototype,"label",2),N([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2),N([a({type:Number})],L.prototype,"min",1),N([a({type:Number})],L.prototype,"max",1),N([a({type:Boolean,attribute:"hide-step-values"})],L.prototype,"hideStepValues",2),N([a({type:Number})],L.prototype,"step",1),N([a({type:Number,attribute:"min-gap"})],L.prototype,"minGap",1),N([a({type:Number,attribute:"max-gap"})],L.prototype,"maxGap",1),N([a({type:String})],L.prototype,"value",1),N([v()],L.prototype,"_movement",2),N([v()],L.prototype,"_lowInputValue",2),N([v()],L.prototype,"_highInputValue",2),N([v()],L.prototype,"_trackWidth",2),N([v()],L.prototype,"_lowValuePercentStart",2),N([v()],L.prototype,"_highValuePercentEnd",2),N([S("#range-slider")],L.prototype,"_outerTrack",2),N([S("#inputLow")],L.prototype,"_inputLow",2),N([S("#inputHigh")],L.prototype,"_inputHigh",2),N([S(".color")],L.prototype,"_innerColor",2),N([S("#inner-color-thumb")],L.prototype,"_innerColorThumb",2),L=N([p("uui-range-slider")],L);var Hp=Object.defineProperty,Vp=Object.getOwnPropertyDescriptor,Bp=(i,t,e,r)=>{for(var o=r>1?void 0:r?Vp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Hp(t,e,o),o};let tn=class extends b{render(){return l`<slot></slot>`}};tn.styles=[d`: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)}`],tn=Bp([p("uui-ref-list")],tn);let Ui=class extends O{};Ui.OPEN="open";var Rp=Object.defineProperty,Up=Object.getOwnPropertyDescriptor,en=(i,t,e,r)=>{for(var o=r>1?void 0:r?Up(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Rp(t,e,o),o};let _e=class extends uo(Le(b)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(t){t.stopPropagation(),this.dispatchEvent(new Ui(Ui.OPEN))}handleOpenKeydown(t){t.key!==" "&&t.key!=="Enter"||(t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new Ui(Ui.OPEN)))}};_e.styles=[d`:host{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;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(:focus){outline-color:#6ab4f0}:host([error]){border:2px solid var(--uui-color-danger,#d42054);box-shadow:0 0 4px 0 var(--uui-color-danger,#d42054),inset 0 0 2px 0 var(--uui-color-danger,#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)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-2,6px) * 4);margin-right:var(--uui-size-2,6px)}#actions-container{opacity:0;transition:opacity 120ms}: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]{flex-grow:1;display:flex;justify-content:flex-end;align-items:center}`],en([a({type:Boolean,reflect:!0})],_e.prototype,"disabled",2),en([a({type:Boolean,reflect:!0})],_e.prototype,"error",2),_e=en([p("uui-ref")],_e);var Gp=Object.defineProperty,Wp=Object.getOwnPropertyDescriptor,ii=(i,t,e,r)=>{for(var o=r>1?void 0:r?Wp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Gp(t,e,o),o},Fp=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},Gi=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},oi=(i,t,e)=>(Fp(i,t,"access private method"),e),on,Ll,rn,Il,Yo,sn,nn,jl,an,Nl;let D=class extends _e{constructor(){super(...arguments),Gi(this,on),Gi(this,rn),Gi(this,Yo),Gi(this,nn),Gi(this,an),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}connectedCallback(){super.connectedCallback(),x(this,"uui-icon")}renderDetail(){return l`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}render(){return l`${this.href?oi(this,nn,jl).call(this):oi(this,an,Nl).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions" id="actions-container"></slot>`}};on=new WeakSet,Ll=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},rn=new WeakSet,Il=function(){return l`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},Yo=new WeakSet,sn=function(){return l`<span id="icon"><slot name="icon" @slotchange="${oi(this,on,Ll)}"></slot>${this._iconSlotHasContent===!1?oi(this,rn,Il).call(this):""}</span><div id="info"><div id="name">${this.name}</div>${this.renderDetail()}</div>`},nn=new WeakSet,jl=function(){return l`<a id="open-part" tabindex="${this.disabled?_:"0"}" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}">${oi(this,Yo,sn).call(this)}</a>`},an=new WeakSet,Nl=function(){return l`<button type="button" id="open-part" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}">${oi(this,Yo,sn).call(this)}</button>`},D.styles=[..._e.styles,d`:host{min-width:250px;padding:calc(var(--uui-size-2,6px) + 1px)}#open-part{text-decoration:none;color:inherit;align-self:stretch;line-height:normal;display:flex;position:relative;align-items:center;cursor:pointer}#icon{font-size:1.2em;margin-left:var(--uui-size-2,6px);margin-right:var(--uui-size-1,3px)}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px)}#name{font-weight:700}#detail{font-size:var(--uui-type-small-size,12px)}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{font-weight:700;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)}`],ii([a({type:String})],D.prototype,"name",2),ii([a({type:String})],D.prototype,"detail",2),ii([a({type:String})],D.prototype,"href",2),ii([a({type:String})],D.prototype,"target",2),ii([v()],D.prototype,"_iconSlotHasContent",2),D=ii([p("uui-ref-node")],D);var qp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,Ml=(i,t,e,r)=>{for(var o=r>1?void 0:r?Kp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&qp(t,e,o),o};let Zo=class extends D{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 t=[];return this.alias!==""&&t.push(this.alias),this.detail!==""&&t.push(this.detail),l`<small id="detail">${t.join(" | ")}<slot name="detail"></slot></small>`}};Zo.styles=[...D.styles],Ml([a({type:String})],Zo.prototype,"alias",2),Zo=Ml([p("uui-ref-node-data-type")],Zo);var Xp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Dl=(i,t,e,r)=>{for(var o=r>1?void 0:r?Yp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Xp(t,e,o),o};let Qo=class extends D{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 t=[];return this.alias!==""&&t.push(this.alias),this.detail!==""&&t.push(this.detail),l`<small id="detail">${t.join(" | ")}<slot name="detail"></slot></small>`}};Qo.styles=[...D.styles],Dl([a({type:String})],Qo.prototype,"alias",2),Qo=Dl([p("uui-ref-node-document-type")],Qo);var Zp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,Jp=(i,t,e,r)=>{for(var o=r>1?void 0:r?Qp(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Zp(t,e,o),o};let ln=class extends D{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>'}};ln.styles=[...D.styles],ln=Jp([p("uui-ref-node-form")],ln);var tb=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,Tl=(i,t,e,r)=>{for(var o=r>1?void 0:r?eb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&tb(t,e,o),o};let Jo=class extends D{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 t=[];return this.detail!==""&&t.push(this.detail),this.groupName!==""&&t.push(this.groupName),l`<small id="detail">${t.join(" | ")}<slot name="detail"></slot></small>`}};Jo.styles=[...D.styles],Tl([a({type:String,attribute:"group-name"})],Jo.prototype,"groupName",2),Jo=Tl([p("uui-ref-node-member")],Jo);var ib=Object.defineProperty,ob=Object.getOwnPropertyDescriptor,un=(i,t,e,r)=>{for(var o=r>1?void 0:r?ob(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&ib(t,e,o),o};let Wi=class extends D{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 t=[];return this.detail!==""&&t.push(this.detail),this.version!==""&&t.push(this.version),this.author!==""&&t.push(this.author),l`<small id="detail">${t.join(" | ")}<slot name="detail"></slot></small>`}};Wi.styles=[...D.styles],un([a({type:String})],Wi.prototype,"version",2),un([a({type:String})],Wi.prototype,"author",2),Wi=un([p("uui-ref-node-package")],Wi);var rb=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,Hl=(i,t,e,r)=>{for(var o=r>1?void 0:r?sb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&rb(t,e,o),o};let tr=class extends D{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 t=[];return this.detail!==""&&t.push(this.detail),this.groupName!==""&&t.push(this.groupName),l`<small id="detail">${t.join(" | ")}<slot name="detail"></slot></small>`}};tr.styles=[...D.styles],Hl([a({type:String,attribute:"group-name"})],tr.prototype,"groupName",2),tr=Hl([p("uui-ref-node-user")],tr);var nb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,Vl=(i,t,e,r)=>{for(var o=r>1?void 0:r?ab(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&nb(t,e,o),o};let er=class extends b{constructor(){super(...arguments),this.enforceScroll=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}render(){return l`<slot></slot>`}};er.styles=[d`: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([a({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],er.prototype,"enforceScroll",2),er=Vl([p("uui-scroll-container")],er);let cn=class extends O{constructor(t,e={}){super(t,{bubbles:!0,...e})}};cn.CHANGE="change";var lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,Et=(i,t,e,r)=>{for(var o=r>1?void 0:r?ub(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&lb(t,e,o),o};let at=class extends gt(b){constructor(){super(),this.placeholder="",this.disabled=!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","")})}focus(){this._input.focus()}click(){this._input.click()}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(t=>t.group).map(t=>t.group))))}willUpdate(t){if(t.has("options")){this._extractGroups(),this._values=this.options.map(r=>r.value);const e=this.options.find(r=>r.selected);this.value=e?e.value:""}t.has("value")&&(this.value=this._values.includes(this.value)?this.value:""),t.has("disabledGroups")&&this._createDisabledGroups()}setValue(t){t.stopPropagation();const e=t.target;t.target&&(this.value=e.value),this.dispatchEvent(new cn(cn.CHANGE,{bubbles:!0,composed:!1}))}getFormElement(){return this._input}_renderOption(t,e,r,o){return l`<option value="${e}" ?selected="${r}" ?disabled="${o}">${t}</option>`}_renderGrouped(){return this._groups.length===0?_:l`${this._groups.map(t=>l`<optgroup label="${t}" ?disabled="${this._disabledGroups.some(e=>e.toLowerCase()===t.toLowerCase())}">${this.options.map(e=>e.group===t?this._renderOption(e.name,e.value,e.selected,e.disabled):"")}</optgroup>`)}`}render(){return l`<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(t=>!t.group).map(t=>this._renderOption(t.name,t.value,t.selected,t.disabled))}</select>`}};at.styles=[d`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,var(--uui-size-5,15px));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:currentColor;box-sizing:border-box;border-radius:0;border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease;width:100%}#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-danger-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],Et([a({type:String})],at.prototype,"label",2),Et([a()],at.prototype,"placeholder",2),Et([a({type:Boolean,reflect:!0})],at.prototype,"disabled",2),Et([a({type:Boolean,reflect:!0})],at.prototype,"error",2),Et([a({type:Array,attribute:!1})],at.prototype,"options",2),Et([v()],at.prototype,"_groups",2),Et([a()],at.prototype,"disabledGroups",2),Et([v()],at.prototype,"_disabledGroups",2),Et([S("#native")],at.prototype,"_input",2),at=Et([p("uui-select")],at);const cb=d`
|
|
663
|
+
`],z([l({type:String})],n.UUIRangeSliderElement.prototype,"label",2),z([l({type:Boolean,reflect:!0})],n.UUIRangeSliderElement.prototype,"disabled",2),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"min",1),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"max",1),z([l({type:Boolean,attribute:"hide-step-values"})],n.UUIRangeSliderElement.prototype,"hideStepValues",2),z([l({type:Number})],n.UUIRangeSliderElement.prototype,"step",1),z([l({type:Number,attribute:"min-gap"})],n.UUIRangeSliderElement.prototype,"minGap",1),z([l({type:Number,attribute:"max-gap"})],n.UUIRangeSliderElement.prototype,"maxGap",1),z([l({type:String})],n.UUIRangeSliderElement.prototype,"value",1),z([v()],n.UUIRangeSliderElement.prototype,"_movement",2),z([v()],n.UUIRangeSliderElement.prototype,"_lowInputValue",2),z([v()],n.UUIRangeSliderElement.prototype,"_highInputValue",2),z([v()],n.UUIRangeSliderElement.prototype,"_trackWidth",2),z([v()],n.UUIRangeSliderElement.prototype,"_lowValuePercentStart",2),z([v()],n.UUIRangeSliderElement.prototype,"_highValuePercentEnd",2),z([C("#range-slider")],n.UUIRangeSliderElement.prototype,"_outerTrack",2),z([C("#inputLow")],n.UUIRangeSliderElement.prototype,"_inputLow",2),z([C("#inputHigh")],n.UUIRangeSliderElement.prototype,"_inputHigh",2),z([C(".color")],n.UUIRangeSliderElement.prototype,"_innerColor",2),z([C("#inner-color-thumb")],n.UUIRangeSliderElement.prototype,"_innerColorThumb",2),n.UUIRangeSliderElement=z([b("uui-range-slider")],n.UUIRangeSliderElement);var Xh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,Zh=(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&&Xh(e,t,o),o};n.UUIRefListElement=class extends m{render(){return u`<slot></slot>`}},n.UUIRefListElement.styles=[p`: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=Zh([b("uui-ref-list")],n.UUIRefListElement);let kt=class extends P{};kt.OPEN="open";var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Nr=(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.UUIRefElement=class extends mi(rt(m)){constructor(){super(...arguments),this.disabled=!1,this.error=!1}handleOpenClick(e){e.stopPropagation(),this.dispatchEvent(new kt(kt.OPEN))}handleOpenKeydown(e){e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new kt(kt.OPEN)))}},n.UUIRefElement.styles=[p`:host{position:relative;display:flex;justify-content:space-between;align-items:center;width:100%;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(:focus){outline-color:#6ab4f0}:host([error]){border:2px solid var(--uui-color-danger,#d42054);box-shadow:0 0 4px 0 var(--uui-color-danger,#d42054),inset 0 0 2px 0 var(--uui-color-danger,#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)}slot[name=actions]{display:flex;align-items:center;--uui-button-height:calc(var(--uui-size-2,6px) * 4);margin-right:var(--uui-size-2,6px)}#actions-container{opacity:0;transition:opacity 120ms}: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]{flex-grow:1;display:flex;justify-content:flex-end;align-items:center}`],Nr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"disabled",2),Nr([l({type:Boolean,reflect:!0})],n.UUIRefElement.prototype,"error",2),n.UUIRefElement=Nr([b("uui-ref")],n.UUIRefElement);var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,It=(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&&ep(e,t,o),o},ip=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qt=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},xt=(i,e,t)=>(ip(i,e,"access private method"),t),Mr,ra,Dr,na,eo,jr,Br,sa,Vr,aa;n.UUIRefNodeElement=class extends n.UUIRefElement{constructor(){super(...arguments),Qt(this,Mr),Qt(this,Dr),Qt(this,eo),Qt(this,Br),Qt(this,Vr),this.name="",this.detail="",this._iconSlotHasContent=!1,this.fallbackIcon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"></path></svg>'}connectedCallback(){super.connectedCallback(),w(this,"uui-icon")}renderDetail(){return u`<small id="detail">${this.detail}<slot name="detail"></slot></small>`}render(){return u`${this.href?xt(this,Br,sa).call(this):xt(this,Vr,aa).call(this)}<div id="select-border"></div><slot></slot><slot name="tag"></slot><slot name="actions" id="actions-container"></slot>`}},Mr=new WeakSet,ra=function(i){this._iconSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0},Dr=new WeakSet,na=function(){return u`<uui-icon .svg="${this.fallbackIcon}"></uui-icon>`},eo=new WeakSet,jr=function(){return u`<span id="icon"><slot name="icon" @slotchange="${xt(this,Mr,ra)}"></slot>${this._iconSlotHasContent===!1?xt(this,Dr,na).call(this):""}</span><div id="info"><div id="name">${this.name}</div>${this.renderDetail()}</div>`},Br=new WeakSet,sa=function(){return u`<a id="open-part" tabindex="${this.disabled?E:"0"}" href="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(this.target==="_blank"?"noopener noreferrer":void 0)}">${xt(this,eo,jr).call(this)}</a>`},Vr=new WeakSet,aa=function(){return u`<button type="button" id="open-part" tabindex="0" @click="${this.handleOpenClick}" @keydown="${this.handleOpenKeydown}" ?disabled="${this.disabled}">${xt(this,eo,jr).call(this)}</button>`},n.UUIRefNodeElement.styles=[...n.UUIRefElement.styles,p`:host{min-width:250px;padding:calc(var(--uui-size-2,6px) + 1px)}#open-part{text-decoration:none;color:inherit;align-self:stretch;line-height:normal;display:flex;position:relative;align-items:center;cursor:pointer}#icon{font-size:1.2em;margin-left:var(--uui-size-2,6px);margin-right:var(--uui-size-1,3px)}#info{display:flex;flex-direction:column;align-items:start;justify-content:center;height:100%;padding-left:var(--uui-size-2,6px)}#name{font-weight:700}#detail{font-size:var(--uui-type-small-size,12px)}:host(:not([disabled])) #open-part:hover #icon{color:var(--uui-color-interactive-emphasis,#3544b1)}:host(:not([disabled])) #open-part:hover #name{font-weight:700;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)}`],It([l({type:String})],n.UUIRefNodeElement.prototype,"name",2),It([l({type:String})],n.UUIRefNodeElement.prototype,"detail",2),It([l({type:String})],n.UUIRefNodeElement.prototype,"href",2),It([l({type:String})],n.UUIRefNodeElement.prototype,"target",2),It([v()],n.UUIRefNodeElement.prototype,"_iconSlotHasContent",2),n.UUIRefNodeElement=It([b("uui-ref-node")],n.UUIRefNodeElement);var op=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,la=(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&&op(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],la([l({type:String})],n.UUIRefNodeDataTypeElement.prototype,"alias",2),n.UUIRefNodeDataTypeElement=la([b("uui-ref-node-data-type")],n.UUIRefNodeDataTypeElement);var np=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,ua=(i,e,t,r)=>{for(var o=r>1?void 0:r?sp(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&&np(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],ua([l({type:String})],n.UUIRefNodeDocumentTypeElement.prototype,"alias",2),n.UUIRefNodeDocumentTypeElement=ua([b("uui-ref-node-document-type")],n.UUIRefNodeDocumentTypeElement);var ap=Object.defineProperty,lp=Object.getOwnPropertyDescriptor,up=(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.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=up([b("uui-ref-node-form")],n.UUIRefNodeFormElement);var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,ca=(i,e,t,r)=>{for(var o=r>1?void 0:r?dp(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&&cp(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],ca([l({type:String,attribute:"group-name"})],n.UUIRefNodeMemberElement.prototype,"groupName",2),n.UUIRefNodeMemberElement=ca([b("uui-ref-node-member")],n.UUIRefNodeMemberElement);var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Hr=(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&&hp(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],Hr([l({type:String})],n.UUIRefNodePackageElement.prototype,"version",2),Hr([l({type:String})],n.UUIRefNodePackageElement.prototype,"author",2),n.UUIRefNodePackageElement=Hr([b("uui-ref-node-package")],n.UUIRefNodePackageElement);var bp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,da=(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};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],da([l({type:String,attribute:"group-name"})],n.UUIRefNodeUserElement.prototype,"groupName",2),n.UUIRefNodeUserElement=da([b("uui-ref-node-user")],n.UUIRefNodeUserElement);var vp=Object.defineProperty,gp=Object.getOwnPropertyDescriptor,ha=(i,e,t,r)=>{for(var o=r>1?void 0:r?gp(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};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=[p`: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}`],ha([l({type:Boolean,reflect:!0,attribute:"enforce-scroll"})],n.UUIScrollContainerElement.prototype,"enforceScroll",2),n.UUIScrollContainerElement=ha([b("uui-scroll-container")],n.UUIScrollContainerElement);let to=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};to.CHANGE="change";var fp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,ce=(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.UUISelectElement=class extends oe(m){constructor(){super(),this.placeholder="",this.disabled=!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","")})}focus(){this._input.focus()}click(){this._input.click()}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 to(to.CHANGE,{bubbles:!0,composed:!1}))}getFormElement(){return this._input}_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>`)}`}render(){return 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=[p`:host{display:inline-block;position:relative;font-family:inherit}#native{display:inline-block;font-family:inherit;font-size:var(--uui-select-font-size,var(--uui-size-5,15px));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:currentColor;box-sizing:border-box;border-radius:0;border:1px solid var(--uui-select-border-color,var(--uui-color-border,#d8d7d9));transition:all 150ms ease;width:100%}#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-danger-standalone,#bf214e)}:host([error]) #native[disabled]{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],ce([l({type:String})],n.UUISelectElement.prototype,"label",2),ce([l()],n.UUISelectElement.prototype,"placeholder",2),ce([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"disabled",2),ce([l({type:Boolean,reflect:!0})],n.UUISelectElement.prototype,"error",2),ce([l({type:Array,attribute:!1})],n.UUISelectElement.prototype,"options",2),ce([v()],n.UUISelectElement.prototype,"_groups",2),ce([l()],n.UUISelectElement.prototype,"disabledGroups",2),ce([v()],n.UUISelectElement.prototype,"_disabledGroups",2),ce([C("#native")],n.UUISelectElement.prototype,"_input",2),n.UUISelectElement=ce([b("uui-select")],n.UUISelectElement);const _p=p`
|
|
664
664
|
input[type='range'] {
|
|
665
665
|
left: 0;
|
|
666
666
|
position: absolute;
|
|
@@ -767,15 +767,15 @@
|
|
|
767
767
|
input[type='range']:focus::-ms-fill-upper {
|
|
768
768
|
background: transparent;
|
|
769
769
|
}
|
|
770
|
-
`;let
|
|
771
|
-
${i.map(
|
|
772
|
-
|
|
773
|
-
${i.map(r=>
|
|
770
|
+
`;let Ye=class extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}};Ye.INPUT="input",Ye.CHANGE="change";var wp=Object.defineProperty,Up=Object.getOwnPropertyDescriptor,q=(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&&wp(e,t,o),o};const Jt=12,pa=24,Ep=(i,e)=>_`
|
|
771
|
+
${i.map(t=>{if(e>=pa){const r=Math.round(Jt+e*i.indexOf(t));return _`<circle class="track-step" cx="${r}" cy="50%" r="4.5" />`}return _``})}
|
|
772
|
+
`,$p=(i,e,t)=>t?E:u`<div id="step-values">
|
|
773
|
+
${i.map(r=>u` <span
|
|
774
774
|
><span>
|
|
775
|
-
${i.length<=20&&
|
|
775
|
+
${i.length<=20&&e>=pa?r.toFixed(0):E}
|
|
776
776
|
</span></span
|
|
777
777
|
>`)}
|
|
778
|
-
</div>`,
|
|
778
|
+
</div>`,kp=(i,e,t)=>Array.from({length:(e-i)/t+1},(r,o)=>i+o*t);n.UUISliderElement=class extends oe(m){constructor(){super(),this.hideStepValues=!1,this.min=0,this.max=100,this.step=1,this.disabled=!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("keypress",this._onKeypress)}get value(){return this._value}set value(e){if(e instanceof File)return;const t=this._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),this._value=r.toString(),this._calculateSliderPosition(),"ElementInternals"in window&&"setFormValue"in window.ElementInternals.prototype&&this._internals.setFormValue(this._value),this.requestUpdate("value",t)}focus(){this._input.focus()}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=kp(this.min,this.max,this.step),this._stepWidth=this._calculateStepWidth()}_calculateStepWidth(){return(this._track.getBoundingClientRect().width-Jt*2)/(this._steps.length-1)}_onKeypress(e){e.key=="Enter"&&this.submit()}_calculateSliderPosition(){const e=(parseFloat(this._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 Ye(Ye.INPUT))}_onChange(e){e.stopPropagation(),this.pristine=!1,this.dispatchEvent(new Ye(Ye.CHANGE))}render(){return u`
|
|
779
779
|
<input
|
|
780
780
|
id="input"
|
|
781
781
|
type="range"
|
|
@@ -790,17 +790,17 @@
|
|
|
790
790
|
<div id="track" aria-hidden="true">
|
|
791
791
|
<svg height="100%" width="100%">
|
|
792
792
|
<rect x="9" y="9" height="3" rx="2" />
|
|
793
|
-
${
|
|
793
|
+
${Ep(this._steps,this._stepWidth)}
|
|
794
794
|
</svg>
|
|
795
795
|
|
|
796
796
|
<div id="track-inner" aria-hidden="true">
|
|
797
|
-
<div id="thumb" style=${
|
|
797
|
+
<div id="thumb" style=${ne({left:this._sliderPosition})}>
|
|
798
798
|
<div id="thumb-label">${this.value}</div>
|
|
799
799
|
</div>
|
|
800
800
|
</div>
|
|
801
801
|
</div>
|
|
802
|
-
${
|
|
803
|
-
`}}
|
|
802
|
+
${$p(this._steps,this._stepWidth,this.hideStepValues)}
|
|
803
|
+
`}},n.UUISliderElement.formAssociated=!0,n.UUISliderElement.styles=[pu,_p,p`
|
|
804
804
|
:host {
|
|
805
805
|
display: inline-block;
|
|
806
806
|
width: 100%;
|
|
@@ -848,8 +848,8 @@
|
|
|
848
848
|
|
|
849
849
|
#track-inner {
|
|
850
850
|
position: absolute;
|
|
851
|
-
left: ${
|
|
852
|
-
right: ${
|
|
851
|
+
left: ${Jt}px; /* Match TRACK_MARGIN */
|
|
852
|
+
right: ${Jt}px; /* Match TRACK_MARGIN */
|
|
853
853
|
}
|
|
854
854
|
|
|
855
855
|
#thumb {
|
|
@@ -908,7 +908,7 @@
|
|
|
908
908
|
}
|
|
909
909
|
|
|
910
910
|
#step-values {
|
|
911
|
-
margin: 0 ${
|
|
911
|
+
margin: 0 ${Jt}px; /* Match TRACK_MARGIN */
|
|
912
912
|
margin-top: 6px;
|
|
913
913
|
display: flex;
|
|
914
914
|
align-items: flex-end;
|
|
@@ -939,12 +939,12 @@
|
|
|
939
939
|
:host(:not([pristine]):invalid) #thumb:after {
|
|
940
940
|
background-color: var(--uui-color-danger,#d42054);
|
|
941
941
|
}
|
|
942
|
-
`],Q([a({type:Boolean,attribute:"hide-step-values"})],G.prototype,"hideStepValues",2),Q([a({type:Number})],G.prototype,"min",2),Q([a({type:Number})],G.prototype,"max",2),Q([a({type:Number})],G.prototype,"step",2),Q([a({type:String})],G.prototype,"value",1),Q([a({type:Boolean,reflect:!0})],G.prototype,"disabled",2),Q([a({type:String})],G.prototype,"label",2),Q([S("#input")],G.prototype,"_input",2),Q([S("#track")],G.prototype,"_track",2),Q([v()],G.prototype,"_stepWidth",2),Q([v()],G.prototype,"_steps",2),Q([v()],G.prototype,"_sliderPosition",2),G=Q([p("uui-slider")],G);var gb=Object.defineProperty,fb=Object.getOwnPropertyDescriptor,Rl=(i,t,e,r)=>{for(var o=r>1?void 0:r?fb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&gb(t,e,o),o};let ir=class extends b{constructor(){super(...arguments),this.open=!1}render(){return l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}};ir.styles=[d`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform:rotate(-90deg);transform-origin:50% 50%;transition:transform 120ms ease-in-out;width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],Rl([a({type:Boolean,reflect:!0})],ir.prototype,"open",2),ir=Rl([p("uui-symbol-expand")],ir);var mb=Object.defineProperty,yb=Object.getOwnPropertyDescriptor,Ul=(i,t,e,r)=>{for(var o=r>1?void 0:r?yb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&mb(t,e,o),o};let or=class extends b{constructor(){super(...arguments),this.error=!1}render(){return l`<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>`}};or.styles=[d`: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-danger,#d42054)}`],Ul([a({type:Boolean,reflect:!0})],or.prototype,"error",2),or=Ul([p("uui-symbol-file-dropzone")],or);var xb=Object.defineProperty,_b=Object.getOwnPropertyDescriptor,hn=(i,t,e,r)=>{for(var o=r>1?void 0:r?_b(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&xb(t,e,o),o};let qi=class extends b{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),x(this,"uui-icon")}render(){return this.src?l`<img src="${this.src}" alt="${this.alt}">`:l`<uui-icon name="picture" .fallback="${dc.strings[0]}"></uui-icon>`}};qi.styles=[d`: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)}`],hn([a({type:String})],qi.prototype,"src",2),hn([a({type:String})],qi.prototype,"alt",2),qi=hn([p("uui-symbol-file-thumbnail")],qi);var wb=Object.defineProperty,$b=Object.getOwnPropertyDescriptor,Gl=(i,t,e,r)=>{for(var o=r>1?void 0:r?$b(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&wb(t,e,o),o};let rr=class extends b{constructor(){super(...arguments),this.type=""}render(){return l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"/></svg> ${this.type?l`<span id="file-type">${this.type.toUpperCase()}</span>`:""}`}};rr.styles=[d`:host{position:relative;display:block}#file-type{position:absolute;bottom:24%;left:25.5%;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}#icon{fill:var(--uui-color-border-standalone,#c2c2c2)}`],Gl([a({type:String})],rr.prototype,"type",2),rr=Gl([p("uui-symbol-file")],rr);var kb=Object.defineProperty,Eb=Object.getOwnPropertyDescriptor,Cb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Eb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&kb(t,e,o),o};let dn=class extends b{render(){return l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M450.962 169.833v-19.248c0-23.398-19.035-42.436-42.434-42.436H257.306c-5.885-16.926-21.99-29.1-40.885-29.1h-89.758c-20.545 0-37.795 14.391-42.191 33.623-13.891 7.016-23.486 21.45-23.486 37.912V169.897c-7.148 7.774-11.443 18.122-11.443 29.287v.956l.062.953c.045.704 4.639 70.713 5.469 95.492l3.137 93.62c.033 6.024.682 14.788 5.271 23.301 6.564 12.175 19.002 19.442 33.273 19.442h318.49c14.273 0 26.713-7.268 33.275-19.445 4.588-8.512 5.236-17.275 5.271-23.298l3.135-93.62c.832-24.782 5.424-94.788 5.471-95.492l.061-.953v-.956c0-11.203-4.314-21.574-11.496-29.351zM90.093 150.585c0-7.281 5.84-13.189 13.09-13.318h-.125c5.324 0 9.441-9.694 9.441-13.382l-.006-1.562c0-7.824 6.344-14.168 14.17-14.168h89.758c7.826 0 14.166 6.344 14.166 14.168v1.562c0 3.663 4.062 13.239 9.332 13.37h168.609c7.363 0 13.328 5.969 13.328 13.33v9.201H90.093v-9.201zm337.744 145.028c-.854 25.538-3.15 94.062-3.15 94.062 0 7.825-1.617 14.171-9.441 14.171H96.755c-7.822 0-9.439-6.346-9.439-14.171l-3.152-94.062c-.855-25.538-5.516-96.428-5.516-96.428 0-6.893 4.926-12.631 11.445-13.9l331.764-.009c6.547 1.251 11.494 6.998 11.494 13.909 0 .001-4.657 70.89-5.514 96.428z"/></svg>`}};dn.styles=[d`:host{display:block;box-sizing:border-box;position:relative;max-width:100px}#icon{fill:var(--uui-color-border,#d8d7d9)}`],dn=Cb([p("uui-symbol-folder")],dn);var Sb=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,Wl=(i,t,e,r)=>{for(var o=r>1?void 0:r?Pb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Sb(t,e,o),o};let sr=class extends b{constructor(){super(...arguments),this.open=!1}render(){return y`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?y`<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>`:y`<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>`}};sr.styles=[d`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],Wl([a({type:Boolean,reflect:!0})],sr.prototype,"open",2),sr=Wl([p("uui-symbol-lock")],sr);var Ab=Object.defineProperty,Ob=Object.getOwnPropertyDescriptor,zb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ob(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Ab(t,e,o),o};let pn=class extends b{render(){return l`•••`}};pn.styles=[d`:host{display:inline-block;font-size:.8em;vertical-align:top;margin-top:.27em;line-height:1em;user-select:none}`],pn=zb([p("uui-symbol-more")],pn);var Lb=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,Fl=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ib(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Lb(t,e,o),o};let nr=class extends gi(b){constructor(){super(...arguments),this.descending=!1}render(){return l`<svg id="up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}};nr.styles=[d`:host{position:relative;display:inline-block;width:.8em;height:1em;vertical-align:middle;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.8em;fill:currentColor;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-.5em}#up{transform:rotate(180deg);margin-top:-.7em}#down{margin-top:-.3em}:host([active]) #up{margin-top:calc(-.5em - (.2em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.5em + (.2em * 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))}`],Fl([a({type:Boolean,reflect:!0})],nr.prototype,"descending",2),nr=Fl([p("uui-symbol-sort")],nr);var jb=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,Mb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Nb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&jb(t,e,o),o};let bn=class extends b{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return l`<slot></slot>`}};bn.styles=[d`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],bn=Mb([p("uui-table")],bn);var Db=Object.defineProperty,Tb=Object.getOwnPropertyDescriptor,ar=(i,t,e,r)=>{for(var o=r>1?void 0:r?Tb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Db(t,e,o),o};let Bt=class extends b{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(t){super.updated(t),t.has("clipText")&&(this.clipText?(this._detectOverflow(),this._observer.observe(this)):this._observer.disconnect())}render(){return l`<slot @slotchange="${this._detectOverflow}"></slot>`}};Bt.styles=[d`: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-4,12px) 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}`],ar([a({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],Bt.prototype,"disableChildInteraction",2),ar([a({type:Boolean,reflect:!0,attribute:"no-padding"})],Bt.prototype,"noPadding",2),ar([a({type:Boolean,reflect:!0,attribute:"clip-text"})],Bt.prototype,"clipText",2),Bt=ar([p("uui-table-cell")],Bt);var Hb=Object.defineProperty,Vb=Object.getOwnPropertyDescriptor,Bb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Vb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Hb(t,e,o),o};let vn=class extends b{};vn.styles=[d`:host{display:table-column}`],vn=Bb([p("uui-table-column")],vn);var Rb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,Gb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Ub(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Rb(t,e,o),o};let gn=class extends Bt{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}};gn.styles=[...Bt.styles,d`:host{border-top:none}`],gn=Gb([p("uui-table-head-cell")],gn);var Wb=Object.defineProperty,Fb=Object.getOwnPropertyDescriptor,qb=(i,t,e,r)=>{for(var o=r>1?void 0:r?Fb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Wb(t,e,o),o};let fn=class extends b{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return l`<slot></slot>`}};fn.styles=[d`:host{display:table-header-group;font-weight:700}`],fn=qb([p("uui-table-head")],fn);var Kb=Object.defineProperty,Xb=Object.getOwnPropertyDescriptor,ql=(i,t,e,r)=>{for(var o=r>1?void 0:r?Xb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Kb(t,e,o),o};let lr=class extends uo(Le(b)){constructor(){super();let t=!1;this.addEventListener("blur",()=>{t===!1&&this.style.setProperty("--uui-show-focus-outline","1"),t=!1}),this.addEventListener("mousedown",()=>{this.style.setProperty("--uui-show-focus-outline","0"),t=!0}),this.addEventListener("mouseup",()=>{t=!1})}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}updated(t){t.has("selectOnly")&&this.updateChildSelectOnly()}updateChildSelectOnly(){this.slotCellNodes&&this.slotCellNodes.forEach(t=>{this.elementIsTableCell(t)&&(t.disableChildInteraction=this.selectOnly)})}elementIsTableCell(t){return t instanceof Bt}render(){return l`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}};lr.styles=[d`: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)}`],ql([Ft({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],lr.prototype,"slotCellNodes",2),lr=ql([p("uui-table-row")],lr);var Yb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,Ki=(i,t,e,r)=>{for(var o=r>1?void 0:r?Zb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Yb(t,e,o),o};let we=class extends gi(vt("",b)){constructor(){super(),this.disabled=!1,this.orientation="horizontal",this.addEventListener("click",this.onHostClick)}onHostClick(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}render(){return this.href?l`<a id="button" href="${w(this.disabled?void 0:this.href)}" target="${w(this.target||void 0)}" rel="${w(this.target==="_blank"?"noopener noreferrer":void 0)}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></a>`:l`<button type="button" id="button" ?disabled="${this.disabled}" role="tab"><slot name="icon"></slot>${this.renderLabel()}<slot name="extra"></slot></button>`}};we.styles=[d`: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([active]):not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([active]):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([active]) #button{cursor:default}: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;--transitionDuration:120ms;--barWidth:4px;--borderRadius:3px}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--borderRadius) var(--borderRadius) 0 0;height:0;width:calc(100% - 15px);bottom:0;transition:opacity ease-in-out var(--transitionDuration),height ease-in-out var(--transitionDuration)}:host([active][orientation=horizontal]) #button::before{height:var(--barWidth)}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--borderRadius) var(--borderRadius) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity ease-in-out var(--transitionDuration),width ease-in-out var(--transitionDuration)}:host([active][orientation=vertical]) #button::before{width:var(--barWidth)}#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}`],Ki([a({type:Boolean,reflect:!0})],we.prototype,"disabled",2),Ki([a({type:String})],we.prototype,"href",2),Ki([a({type:String})],we.prototype,"target",2),Ki([a({type:String,reflect:!0})],we.prototype,"orientation",2),we=Ki([p("uui-tab")],we);var Qb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,si=(i,t,e,r)=>{for(var o=r>1?void 0:r?Jb(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&Qb(t,e,o),o},mn=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)},C=(i,t,e)=>(mn(i,t,"read from private field"),e?e.call(i):t.get(i)),U=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Xi=(i,t,e,r)=>(mn(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e),J=(i,t,e)=>(mn(i,t,"access private method"),e),ur,Ct,Rt,ni,Yi,cr,Zi,Qi,yn,Kl,xn,Xl,hr,_n,wn,Yl,ai,Ji,dr,$n,Zl,pr,kn,br,En;let oe=class extends b{constructor(){super(...arguments),U(this,yn),U(this,xn),U(this,hr),U(this,wn),U(this,Ji),U(this,$n),U(this,pr),U(this,br),U(this,ur,0),this.dropdownContentDirection="vertical",U(this,Ct,[]),U(this,Rt,[]),U(this,ni,new Map),U(this,Yi,[]),U(this,cr,new ResizeObserver(J(this,xn,Xl).bind(this))),U(this,Zi,[]),U(this,Qi,!1),U(this,ai,i=>{const t=i.currentTarget;if(J(this,br,En).call(this,t)){t.active=!0;const e=C(this,ni).get(t);e&&(e.active=!0),[...C(this,Ct),...C(this,Rt)].filter(r=>r!==t&&r!==e).forEach(r=>{J(this,br,En).call(this,r)&&(r.active=!1)}),C(this,Rt).some(r=>r.active&&r!==e)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),J(this,yn,Kl).call(this)}disconnectedCallback(){super.disconnectedCallback(),C(this,cr).unobserve(this),J(this,hr,_n).call(this)}render(){return l`<div id="main"><div id="grid"><slot @slotchange="${J(this,wn,Yl)}"></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">${Es(C(this,Rt),i=>l`${i}`)}</div></uui-popover-container>`}};ur=new WeakMap,Ct=new WeakMap,Rt=new WeakMap,ni=new WeakMap,Yi=new WeakMap,cr=new WeakMap,Zi=new WeakMap,Qi=new WeakMap,yn=new WeakSet,Kl=async function(){x(this,"uui-button"),x(this,"uui-popover-container"),x(this,"uui-symbol-more"),this.hasAttribute("role")||this.setAttribute("role","tablist"),await this.updateComplete,C(this,cr).observe(this._mainElement)},xn=new WeakSet,Xl=function(i){const t=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(t)?0:t)!==C(this,ur)?J(this,Ji,dr).call(this):J(this,pr,kn).call(this,i[0].contentBoxSize[0].inlineSize)},hr=new WeakSet,_n=function(){C(this,Ct).forEach(i=>{i.removeEventListener("click",C(this,ai)),C(this,Zi).forEach(t=>t.disconnect())}),C(this,Zi).length=0},wn=new WeakSet,Yl=function(){J(this,hr,_n).call(this),J(this,$n,Zl).call(this),C(this,Ct).forEach(i=>{i.addEventListener("click",C(this,ai));const t=new ResizeObserver(J(this,Ji,dr).bind(this));t.observe(i),C(this,Zi).push(t)})},ai=new WeakMap,Ji=new WeakSet,dr=async function(){if(C(this,Qi))return;Xi(this,Qi,!0),requestAnimationFrame(()=>{Xi(this,Qi,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),t=Number.isNaN(i)?0:i;Xi(this,ur,t);let e=0;for(let o=0;o<C(this,Ct).length;o++)C(this,Ct)[o].style.display="",e+=C(this,Ct)[o].offsetWidth,C(this,Yi)[o]=e,e+=t;const r=2;this._mainElement.style.width=e-t+r+"px",J(this,pr,kn).call(this,this._mainElement.offsetWidth)},$n=new WeakSet,Zl=function(){Xi(this,Ct,this._slottedNodes?this._slottedNodes:[]),J(this,Ji,dr).call(this)},pr=new WeakSet,kn=function(i){const t=this._moreButtonElement.offsetWidth,e=i-(t||0);C(this,Rt).forEach(s=>{s.removeEventListener("click",C(this,ai))}),Xi(this,Rt,[]),C(this,ni).clear();let r=!1;const o=C(this,Yi).length;for(let s=0;s<o;s++){const n=C(this,Yi)[s],c=C(this,Ct)[s];if(n<=(s===o-1?i:e))c.style.display="";else{const u=c.cloneNode(!0);u.addEventListener("click",C(this,ai)),u.classList.add("hidden-tab"),u.style.display="",u.orientation=this.dropdownContentDirection,C(this,ni).set(u,c),C(this,ni).set(c,u),C(this,Rt).push(u),c.style.display="none",c.active&&(r=!0)}}C(this,Rt).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()},br=new WeakSet,En=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},oe.styles=[d`: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(
|
|
942
|
+
`],q([l({type:Boolean,attribute:"hide-step-values"})],n.UUISliderElement.prototype,"hideStepValues",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",2),q([l({type:String})],n.UUISliderElement.prototype,"value",1),q([l({type:Boolean,reflect:!0})],n.UUISliderElement.prototype,"disabled",2),q([l({type:String})],n.UUISliderElement.prototype,"label",2),q([C("#input")],n.UUISliderElement.prototype,"_input",2),q([C("#track")],n.UUISliderElement.prototype,"_track",2),q([v()],n.UUISliderElement.prototype,"_stepWidth",2),q([v()],n.UUISliderElement.prototype,"_steps",2),q([v()],n.UUISliderElement.prototype,"_sliderPosition",2),n.UUISliderElement=q([b("uui-slider")],n.UUISliderElement);var Ip=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,ba=(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&&Ip(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 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolExpandElement.styles=[p`:host{display:inline-block;width:12px;vertical-align:middle}svg{fill:currentColor;transform:rotate(-90deg);transform-origin:50% 50%;transition:transform 120ms ease-in-out;width:100%;height:100%}:host([open]) svg{transform:rotate(0)}`],ba([l({type:Boolean,reflect:!0})],n.UUISymbolExpandElement.prototype,"open",2),n.UUISymbolExpandElement=ba([b("uui-symbol-expand")],n.UUISymbolExpandElement);var Cp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,ma=(i,e,t,r)=>{for(var o=r>1?void 0:r?Sp(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&&Cp(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=[p`: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-danger,#d42054)}`],ma([l({type:Boolean,reflect:!0})],n.UUISymbolFileDropzoneElement.prototype,"error",2),n.UUISymbolFileDropzoneElement=ma([b("uui-symbol-file-dropzone")],n.UUISymbolFileDropzoneElement);var Pp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,Rr=(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};n.UUISymbolFileThumbnailElement=class extends m{constructor(){super(...arguments),this.src="",this.alt=""}connectedCallback(){super.connectedCallback(),w(this,"uui-icon")}render(){return this.src?u`<img src="${this.src}" alt="${this.alt}">`:u`<uui-icon name="picture" .fallback="${Eu.strings[0]}"></uui-icon>`}},n.UUISymbolFileThumbnailElement.styles=[p`: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)}`],Rr([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"src",2),Rr([l({type:String})],n.UUISymbolFileThumbnailElement.prototype,"alt",2),n.UUISymbolFileThumbnailElement=Rr([b("uui-symbol-file-thumbnail")],n.UUISymbolFileThumbnailElement);var Op=Object.defineProperty,zp=Object.getOwnPropertyDescriptor,va=(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&&Op(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 512 512" width="100%" id="icon"><path d="M396.441 138.878l-83.997-83.993-7.331-7.333H105.702v416.701h298.071V146.214l-7.332-7.336zM130.74 439.217V72.591h141.613c37.201 0 19.274 88.18 19.274 88.18s86-20.901 87.104 18.534v259.912H130.74z"/></svg> ${this.type?u`<span id="file-type">${this.type.toUpperCase()}</span>`:""}`}},n.UUISymbolFileElement.styles=[p`:host{position:relative;display:block}#file-type{position:absolute;bottom:24%;left:25.5%;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}#icon{fill:var(--uui-color-border-standalone,#c2c2c2)}`],va([l({type:String})],n.UUISymbolFileElement.prototype,"type",2),n.UUISymbolFileElement=va([b("uui-symbol-file")],n.UUISymbolFileElement);var Lp=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,Np=(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&&Lp(e,t,o),o};n.UUISymbolFolderElement=class extends m{render(){return u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" id="icon"><path d="M450.962 169.833v-19.248c0-23.398-19.035-42.436-42.434-42.436H257.306c-5.885-16.926-21.99-29.1-40.885-29.1h-89.758c-20.545 0-37.795 14.391-42.191 33.623-13.891 7.016-23.486 21.45-23.486 37.912V169.897c-7.148 7.774-11.443 18.122-11.443 29.287v.956l.062.953c.045.704 4.639 70.713 5.469 95.492l3.137 93.62c.033 6.024.682 14.788 5.271 23.301 6.564 12.175 19.002 19.442 33.273 19.442h318.49c14.273 0 26.713-7.268 33.275-19.445 4.588-8.512 5.236-17.275 5.271-23.298l3.135-93.62c.832-24.782 5.424-94.788 5.471-95.492l.061-.953v-.956c0-11.203-4.314-21.574-11.496-29.351zM90.093 150.585c0-7.281 5.84-13.189 13.09-13.318h-.125c5.324 0 9.441-9.694 9.441-13.382l-.006-1.562c0-7.824 6.344-14.168 14.17-14.168h89.758c7.826 0 14.166 6.344 14.166 14.168v1.562c0 3.663 4.062 13.239 9.332 13.37h168.609c7.363 0 13.328 5.969 13.328 13.33v9.201H90.093v-9.201zm337.744 145.028c-.854 25.538-3.15 94.062-3.15 94.062 0 7.825-1.617 14.171-9.441 14.171H96.755c-7.822 0-9.439-6.346-9.439-14.171l-3.152-94.062c-.855-25.538-5.516-96.428-5.516-96.428 0-6.893 4.926-12.631 11.445-13.9l331.764-.009c6.547 1.251 11.494 6.998 11.494 13.909 0 .001-4.657 70.89-5.514 96.428z"/></svg>`}},n.UUISymbolFolderElement.styles=[p`:host{display:block;box-sizing:border-box;position:relative;max-width:100px}#icon{fill:var(--uui-color-border,#d8d7d9)}`],n.UUISymbolFolderElement=Np([b("uui-symbol-folder")],n.UUISymbolFolderElement);var Mp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,ga=(i,e,t,r)=>{for(var o=r>1?void 0:r?Dp(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};n.UUISymbolLockElement=class extends m{constructor(){super(...arguments),this.open=!1}render(){return _`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">${this.open===!0?_`<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>`:_`<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=[p`:host{display:inline-block;vertical-align:middle;width:1em}svg{fill:currentColor}`],ga([l({type:Boolean,reflect:!0})],n.UUISymbolLockElement.prototype,"open",2),n.UUISymbolLockElement=ga([b("uui-symbol-lock")],n.UUISymbolLockElement);var jp=Object.defineProperty,Bp=Object.getOwnPropertyDescriptor,Vp=(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&&jp(e,t,o),o};n.UUISymbolMoreElement=class extends m{render(){return u`•••`}},n.UUISymbolMoreElement.styles=[p`:host{display:inline-block;font-size:.8em;vertical-align:top;margin-top:.27em;line-height:1em;user-select:none}`],n.UUISymbolMoreElement=Vp([b("uui-symbol-more")],n.UUISymbolMoreElement);var Hp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,fa=(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};n.UUISymbolSortElement=class extends Dt(m){constructor(){super(...arguments),this.descending=!1}render(){return u`<svg id="up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg> <svg id="down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M 255.125 400.35 L 88.193 188.765 H 422.055 Z"></path></svg>`}},n.UUISymbolSortElement.styles=[p`:host{position:relative;display:inline-block;width:.8em;height:1em;vertical-align:middle;pointer-events:none}svg{position:absolute;left:0;top:50%;width:.8em;fill:currentColor;transform-origin:50% 50%;transition:transform 120ms ease-in-out,opacity 120ms,margin-top 240ms;opacity:0;margin-top:-.5em}#up{transform:rotate(180deg);margin-top:-.7em}#down{margin-top:-.3em}:host([active]) #up{margin-top:calc(-.5em - (.2em * var(--uui-symbol-sort-hover,0)))}:host([active]) #down{margin-top:calc(-.5em + (.2em * 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))}`],fa([l({type:Boolean,reflect:!0})],n.UUISymbolSortElement.prototype,"descending",2),n.UUISymbolSortElement=fa([b("uui-symbol-sort")],n.UUISymbolSortElement);var Fp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,Wp=(i,e,t,r)=>{for(var o=r>1?void 0:r?Gp(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.UUITableElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","table")}render(){return u`<slot></slot>`}},n.UUITableElement.styles=[p`:host{display:table;width:100%;border-radius:var(--uui-border-radius,3px);background-color:var(--uui-color-surface,#fff);cursor:default}`],n.UUITableElement=Wp([b("uui-table")],n.UUITableElement);var qp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor,io=(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};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=[p`: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-4,12px) 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}`],io([l({type:Boolean,reflect:!0,attribute:"disable-child-interaction"})],n.UUITableCellElement.prototype,"disableChildInteraction",2),io([l({type:Boolean,reflect:!0,attribute:"no-padding"})],n.UUITableCellElement.prototype,"noPadding",2),io([l({type:Boolean,reflect:!0,attribute:"clip-text"})],n.UUITableCellElement.prototype,"clipText",2),n.UUITableCellElement=io([b("uui-table-cell")],n.UUITableCellElement);var Xp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Zp=(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};n.UUITableColumnElement=class extends m{},n.UUITableColumnElement.styles=[p`:host{display:table-column}`],n.UUITableColumnElement=Zp([b("uui-table-column")],n.UUITableColumnElement);var Qp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,eb=(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&&Qp(e,t,o),o};n.UUITableHeadCellElement=class extends n.UUITableCellElement{connectedCallback(){super.connectedCallback(),this.setAttribute("role","columnheader")}},n.UUITableHeadCellElement.styles=[...n.UUITableCellElement.styles,p`:host{border-top:none}`],n.UUITableHeadCellElement=eb([b("uui-table-head-cell")],n.UUITableHeadCellElement);var tb=Object.defineProperty,ib=Object.getOwnPropertyDescriptor,ob=(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&&tb(e,t,o),o};n.UUITableHeadElement=class extends m{connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return u`<slot></slot>`}},n.UUITableHeadElement.styles=[p`:host{display:table-header-group;font-weight:700}`],n.UUITableHeadElement=ob([b("uui-table-head")],n.UUITableHeadElement);var rb=Object.defineProperty,nb=Object.getOwnPropertyDescriptor,ya=(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};n.UUITableRowElement=class extends mi(rt(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=>{this.elementIsTableCell(e)&&(e.disableChildInteraction=this.selectOnly)})}elementIsTableCell(e){return e instanceof n.UUITableCellElement}render(){return u`<slot @slotchanged="${this.updateChildSelectOnly}"></slot>`}},n.UUITableRowElement.styles=[p`: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)}`],ya([Ce({flatten:!0,selector:"uui-table-cell, [uui-table-cell], [role=cell]"})],n.UUITableRowElement.prototype,"slotCellNodes",2),n.UUITableRowElement=ya([b("uui-table-row")],n.UUITableRowElement);var sb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,ei=(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&&sb(e,t,o),o};n.UUITabElement=class extends Dt(ie("",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="${U(this.disabled?void 0:this.href)}" target="${U(this.target||void 0)}" rel="${U(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=[p`: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([active]):not([disabled])) #button:hover{color:var(--uui-tab-text-hover,var(--uui-color-default-emphasis,#3544b1))}:host(:not([active]):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([active]) #button{cursor:default}: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;--transitionDuration:120ms;--barWidth:4px;--borderRadius:3px}:host([active]) #button::before{opacity:1}:host([orientation=horizontal]) #button::before{left:auto;right:auto;border-radius:var(--borderRadius) var(--borderRadius) 0 0;height:0;width:calc(100% - 15px);bottom:0;transition:opacity ease-in-out var(--transitionDuration),height ease-in-out var(--transitionDuration)}:host([active][orientation=horizontal]) #button::before{height:var(--barWidth)}:host([orientation=vertical]) #button::before{top:auto;bottom:auto;border-radius:0 var(--borderRadius) var(--borderRadius) 0;height:calc(100% - 12px);width:0;left:0;transition:opacity ease-in-out var(--transitionDuration),width ease-in-out var(--transitionDuration)}:host([active][orientation=vertical]) #button::before{width:var(--barWidth)}#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}`],ei([l({type:Boolean,reflect:!0})],n.UUITabElement.prototype,"disabled",2),ei([l({type:String})],n.UUITabElement.prototype,"href",2),ei([l({type:String})],n.UUITabElement.prototype,"target",2),ei([l({type:String,reflect:!0})],n.UUITabElement.prototype,"orientation",2),n.UUITabElement=ei([b("uui-tab")],n.UUITabElement);var lb=Object.defineProperty,ub=Object.getOwnPropertyDescriptor,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&&lb(e,t,o),o},Fr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},x=(i,e,t)=>(Fr(i,e,"read from private field"),t?t.call(i):e.get(i)),j=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ti=(i,e,t,r)=>(Fr(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),K=(i,e,t)=>(Fr(i,e,"access private method"),t),oo,de,Ee,St,ii,ro,oi,ri,Gr,_a,Wr,wa,no,qr,Kr,Ua,Pt,ni,so,Xr,Ea,ao,Yr,lo,Zr;n.UUITabGroupElement=class extends m{constructor(){super(...arguments),j(this,Gr),j(this,Wr),j(this,no),j(this,Kr),j(this,ni),j(this,Xr),j(this,ao),j(this,lo),j(this,oo,0),this.dropdownContentDirection="vertical",j(this,de,[]),j(this,Ee,[]),j(this,St,new Map),j(this,ii,[]),j(this,ro,new ResizeObserver(K(this,Wr,wa).bind(this))),j(this,oi,[]),j(this,ri,!1),j(this,Pt,e=>{const t=e.currentTarget;if(K(this,lo,Zr).call(this,t)){t.active=!0;const r=x(this,St).get(t);r&&(r.active=!0),[...x(this,de),...x(this,Ee)].filter(o=>o!==t&&o!==r).forEach(o=>{K(this,lo,Zr).call(this,o)&&(o.active=!1)}),x(this,Ee).some(o=>o.active&&o!==r)?this._moreButtonElement.classList.add("active-inside"):this._moreButtonElement.classList.remove("active-inside")}})}connectedCallback(){super.connectedCallback(),K(this,Gr,_a).call(this)}disconnectedCallback(){super.disconnectedCallback(),x(this,ro).unobserve(this),K(this,no,qr).call(this)}render(){return u`<div id="main"><div id="grid"><slot @slotchange="${K(this,Kr,Ua)}"></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">${cr(x(this,Ee),e=>u`${e}`)}</div></uui-popover-container>`}},oo=new WeakMap,de=new WeakMap,Ee=new WeakMap,St=new WeakMap,ii=new WeakMap,ro=new WeakMap,oi=new WeakMap,ri=new WeakMap,Gr=new WeakSet,_a=async function(){w(this,"uui-button"),w(this,"uui-popover-container"),w(this,"uui-symbol-more"),this.hasAttribute("role")||this.setAttribute("role","tablist"),await this.updateComplete,x(this,ro).observe(this._mainElement)},Wr=new WeakSet,wa=function(i){const e=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap"));(Number.isNaN(e)?0:e)!==x(this,oo)?K(this,ni,so).call(this):K(this,ao,Yr).call(this,i[0].contentBoxSize[0].inlineSize)},no=new WeakSet,qr=function(){x(this,de).forEach(i=>{i.removeEventListener("click",x(this,Pt)),x(this,oi).forEach(e=>e.disconnect())}),x(this,oi).length=0},Kr=new WeakSet,Ua=function(){K(this,no,qr).call(this),K(this,Xr,Ea).call(this),x(this,de).forEach(i=>{i.addEventListener("click",x(this,Pt));const e=new ResizeObserver(K(this,ni,so).bind(this));e.observe(i),x(this,oi).push(e)})},Pt=new WeakMap,ni=new WeakSet,so=async function(){if(x(this,ri))return;ti(this,ri,!0),requestAnimationFrame(()=>{ti(this,ri,!1)}),await this.updateComplete;const i=Number.parseFloat(this.style.getPropertyValue("--uui-tab-group-gap")),e=Number.isNaN(i)?0:i;ti(this,oo,e);let t=0;for(let o=0;o<x(this,de).length;o++)x(this,de)[o].style.display="",t+=x(this,de)[o].offsetWidth,x(this,ii)[o]=t,t+=e;const r=2;this._mainElement.style.width=t-e+r+"px",K(this,ao,Yr).call(this,this._mainElement.offsetWidth)},Xr=new WeakSet,Ea=function(){ti(this,de,this._slottedNodes?this._slottedNodes:[]),K(this,ni,so).call(this)},ao=new WeakSet,Yr=function(i){const e=this._moreButtonElement.offsetWidth,t=i-(e||0);x(this,Ee).forEach(s=>{s.removeEventListener("click",x(this,Pt))}),ti(this,Ee,[]),x(this,St).clear();let r=!1;const o=x(this,ii).length;for(let s=0;s<o;s++){const a=x(this,ii)[s],d=x(this,de)[s];if(a<=(s===o-1?i:t))d.style.display="";else{const c=d.cloneNode(!0);c.addEventListener("click",x(this,Pt)),c.classList.add("hidden-tab"),c.style.display="",c.orientation=this.dropdownContentDirection,x(this,St).set(c,d),x(this,St).set(d,c),x(this,Ee).push(c),d.style.display="none",d.active&&(r=!0)}}x(this,Ee).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()},lo=new WeakSet,Zr=function(i){return typeof i=="object"&&"active"in i&&typeof i.active=="boolean"},n.UUITabGroupElement.styles=[p`: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(
|
|
943
943
|
--uui-tab-group-dropdown-tab-text-hover,
|
|
944
944
|
unset
|
|
945
945
|
);--uui-tab-text-active:var(
|
|
946
946
|
--uui-tab-group-dropdown-tab-text-active,
|
|
947
947
|
unset
|
|
948
|
-
)}::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}`],
|
|
949
|
-
</textarea>`}};T.formAssociated=!0,T.styles=[d`:host{position:relative}:host([error]) textarea{border:1px solid var(--uui-color-danger,#d42054)!important}:host([error]) textarea[disabled]{border:1px solid var(--uui-color-danger,#d42054)!important}: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:0;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::placeholder{transition:opacity 120ms}:host(:not([readonly])) textarea:focus::placeholder{opacity:0}textarea:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}`],W([a()],T.prototype,"placeholder",2),W([a({type:Boolean,reflect:!0})],T.prototype,"disabled",2),W([a({type:Boolean,reflect:!0})],T.prototype,"readonly",2),W([a({type:String})],T.prototype,"name",2),W([a({type:Boolean,reflect:!0})],T.prototype,"error",2),W([a({type:Number})],T.prototype,"minlength",2),W([a({type:String,attribute:"minlength-message"})],T.prototype,"minlengthMessage",2),W([a({type:Number})],T.prototype,"maxlength",2),W([a({type:String,attribute:"maxlength-message"})],T.prototype,"maxlengthMessage",2),W([S("#textarea")],T.prototype,"_textarea",2),W([a({type:Boolean,attribute:"auto-height",reflect:!0})],T.prototype,"autoHeight",2),W([a({type:String})],T.prototype,"label",2),W([a({type:Number})],T.prototype,"rows",2),W([a({type:Number})],T.prototype,"cols",2),W([a({type:String})],T.prototype,"wrap",2),T=W([p("uui-textarea")],T);let Y=class extends O{};Y.OPENING="opening",Y.OPENED="opened",Y.CLOSING="closing",Y.CLOSED="closed";var r0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,li=(i,t,e,r)=>{for(var o=r>1?void 0:r?s0(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&r0(t,e,o),o};let re=class extends b{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",t=>{t.key==="Escape"&&(this.open=!1)})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose=t,t!==null?(this._timer===null?this._timer=new ac(this._onOpenTimerComplete,t):this._timer.setDuration(t),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(t){t===!0?this._makeOpen():this._makeClose()}connectedCallback(){super.connectedCallback(),x(this,"uui-button"),x(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 Y(Y.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new Y(Y.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const t=new Y(Y.CLOSING,{cancelable:!0});this.dispatchEvent(t),t.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 Y(Y.CLOSED)),this.parentNode&&this.parentNode.removeChild(this))},this._getAnimationDuration())})))}render(){return l`<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="${Wr.strings[0]}"></uui-icon></uui-button></div><slot></slot></div></div>`}};re.styles=[Nr,d`: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)}`],li([a({reflect:!0})],re.prototype,"color",2),li([a({type:Number})],re.prototype,"autoClose",1),li([S("#toast")],re.prototype,"_toastEl",2),li([v()],re.prototype,"_animate",2),li([a({type:Boolean,reflect:!0})],re.prototype,"open",1),re=li([p("uui-toast-notification")],re);var n0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,Ql=(i,t,e,r)=>{for(var o=r>1?void 0:r?a0(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&n0(t,e,o),o};let gr=class extends b{constructor(){super(...arguments),this._autoClose=null,this._autoClosePause=!1,this.pauseAutoClose=()=>{this._autoClosePause=!0,this._toasts?.forEach(t=>t.pauseAutoClose())},this.resumeAutoClose=()=>{this.matches(":focus-within:not(:focus)")===!1&&(this._autoClosePause=!1,this._toasts?.forEach(t=>t.resumeAutoClose()))},this.onToastClosed=t=>{this.removeToast(t.target)},this._toasts=[],this.onSlotChanged=t=>{const e=[...this._toasts];this._toasts=t.target.assignedElements({flatten:!0}).filter(r=>r.nodeName==="UUI-TOAST-NOTIFICATION"),e.filter(r=>this._toasts.indexOf(r)===-1).forEach(r=>{r.removeEventListener(Y.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=>e.indexOf(r)===-1).forEach(r=>{r.addEventListener(Y.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(t){this._autoClose=t,this._toasts?.forEach(e=>e.autoClose=t)}removeToast(t){if(!t)t=this._toasts[this._toasts.length-1];else if(this._toasts.indexOf(t)===-1){console.warn("Toast-notification",t,"could not be removed as it is not a child of this toast-notification-container",this);return}this.removeChild(t)}closeToast(t){let e=t;e||(e=this._toasts[this._toasts.length-1]),e.open=!1}render(){return l`<slot @slotchange="${this.onSlotChanged}"></slot>`}};gr.styles=[d`: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}`],Ql([a({type:Number,reflect:!0,attribute:"auto-close"})],gr.prototype,"_autoClose",2),gr=Ql([p("uui-toast-notification-container")],gr);var l0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,Sn=(i,t,e,r)=>{for(var o=r>1?void 0:r?u0(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&l0(t,e,o),o};let eo=class extends b{constructor(){super(...arguments),this.headline="",this._headlineSlotHasContent=!1,this._headlineSlotChanged=i=>{this._headlineSlotHasContent=i.target.assignedNodes({flatten:!0}).length>0}}render(){return l`<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>`}};eo.styles=[Nr,d`#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)}`],Sn([a({type:String})],eo.prototype,"headline",2),Sn([v()],eo.prototype,"_headlineSlotHasContent",2),eo=Sn([p("uui-toast-notification-layout")],eo);var c0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,d0=(i,t,e,r)=>{for(var o=r>1?void 0:r?h0(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&c0(t,e,o),o};let fr=class extends At{constructor(){super("switch")}renderCheckbox(){return l`<div id="slider"><div id="icon-checked">${fo}</div><div id="icon-unchecked">${Wr}</div></div>`}};fr.formAssociated=!0,fr.styles=[...At.styles,po,d`:host{--uui-toggle-size:18px;--uui-toggle-switch-width:calc(2 * var(--uui-toggle-size))}#slider{position:relative;grid-area:'input';display:flex;align-items:center;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])~#slider{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 #slider{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~#slider{background-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])~#slider{background-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked~#slider{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~#slider #icon-checked{color:var(--uui-color-selected-contrast,#fff)}#slider::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~#slider::after{left:calc(100% - 2px);transform:translateX(-100%)}input:focus~#slider{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled])) label:active #slider::after{width:calc(1.06 * var(--uui-toggle-size))}:host([disabled]) #slider{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}:host([disabled]) input:checked~#slider{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #slider::after{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #slider #icon-unchecked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #slider{animation:${bo}}:host([disabled]) input:checked #slider #icon-checked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host(:not([pristine]):invalid) #slider,:host(:not([pristine]):invalid) label:hover #slider,:host(:not([pristine])[internals-invalid]) #slider,:host(:not([pristine])[internals-invalid]) label:hover #slider{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],fr=d0([p("uui-toggle")],fr);var p0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,v0=(i,t,e,r)=>{for(var o=r>1?void 0:r?b0(t,e):t,s=i.length-1,n;s>=0;s--)(n=i[s])&&(o=(r?n(t,e,o):n(o))||o);return r&&o&&p0(t,e,o),o};let Pn=class extends b{render(){return l`<slot></slot>`}};Pn.styles=[d`: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}`],Pn=v0([p("uui-visually-hidden")],Pn)});
|
|
948
|
+
)}::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}`],Ct([C("#more-button")],n.UUITabGroupElement.prototype,"_moreButtonElement",2),Ct([C("#popover-container")],n.UUITabGroupElement.prototype,"_popoverContainerElement",2),Ct([C("#main")],n.UUITabGroupElement.prototype,"_mainElement",2),Ct([Ce({flatten:!0,selector:"uui-tab, [uui-tab], [role=tab]"})],n.UUITabGroupElement.prototype,"_slottedNodes",2),Ct([l({type:String,reflect:!0,attribute:"dropdown-content-direction"})],n.UUITabGroupElement.prototype,"dropdownContentDirection",2),n.UUITabGroupElement=Ct([b("uui-tab-group")],n.UUITabGroupElement);class cb extends P{}class db extends P{}var hb=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,Qr=(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&&hb(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=[p`: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-size-space-1,3px) calc(var(--uui-size-space-1,3px) + .5em);border-radius:100px;user-select:none;border-radius:var(--uui-size-4,12px);border:1px solid transparent}slot{display:flex;align-items:center;justify-content:center;margin:2px}:host{--color:var(--uui-color-default,#1b264f);--color-standalone:var(--uui-color-default-standalone,rgb(28, 35, 59));--color-contrast:var(--uui-color-default-contrast,#fff)}:host([color=positive]){--color:var(--uui-color-positive,#0b8152);--color-standalone:var(--uui-color-positive-standalone,rgb(10, 115, 73));--color-contrast:var(--uui-color-positive-contrast,#fff)}:host([color=warning]){--color:var(--uui-color-warning,#fbd142);--color-standalone:var(--uui-color-warning-standalone,#a17700);--color-contrast:var(--uui-color-warning-contrast,#000)}:host([color=danger]){--color:var(--uui-color-danger,#d42054);--color-standalone:var(--uui-color-danger-standalone,rgb(191, 33, 78));--color-contrast:var(--uui-color-danger-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)}`],Qr([l({reflect:!0})],n.UUITagElement.prototype,"color",2),Qr([l({reflect:!0})],n.UUITagElement.prototype,"look",2),n.UUITagElement=Qr([b("uui-tag")],n.UUITagElement);class si extends P{constructor(e,t={}){super(e,{bubbles:!0,...t})}}si.CHANGE="change",si.INPUT="input";var bb=Object.defineProperty,mb=Object.getOwnPropertyDescriptor,B=(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&&bb(e,t,o),o};n.UUITextareaElement=class extends oe(m){constructor(){super(),this.placeholder="",this.disabled=!1,this.readonly=!1,this.name="",this.error=!1,this.minlengthMessage="This field need more characters",this.maxlengthMessage="This field exceeds the allowed amount of characters",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",()=>this.minlengthMessage,()=>!!this.minlength&&this._value.length<this.minlength),this.addValidator("tooLong",()=>this.maxlengthMessage,()=>!!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()})}focus(){this._textarea?.focus()}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 si(si.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="${U(this.rows)}" cols="${U(this.cols)}" .value="${this.value}" .name="${this.name}" wrap="${U(this.wrap)}" placeholder="${this.placeholder}" aria-label="${this.label}" .disabled="${this.disabled}" ?readonly="${this.readonly}" @input="${this.onInput}" @change="${this.onChange}">
|
|
949
|
+
</textarea>`}},n.UUITextareaElement.formAssociated=!0,n.UUITextareaElement.styles=[p`:host{position:relative}:host([error]) textarea{border:1px solid var(--uui-color-danger,#d42054)!important}:host([error]) textarea[disabled]{border:1px solid var(--uui-color-danger,#d42054)!important}: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:0;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::placeholder{transition:opacity 120ms}:host(:not([readonly])) textarea:focus::placeholder{opacity:0}textarea:focus{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}`],B([l()],n.UUITextareaElement.prototype,"placeholder",2),B([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"disabled",2),B([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"readonly",2),B([l({type:String})],n.UUITextareaElement.prototype,"name",2),B([l({type:Boolean,reflect:!0})],n.UUITextareaElement.prototype,"error",2),B([l({type:Number})],n.UUITextareaElement.prototype,"minlength",2),B([l({type:String,attribute:"minlength-message"})],n.UUITextareaElement.prototype,"minlengthMessage",2),B([l({type:Number})],n.UUITextareaElement.prototype,"maxlength",2),B([l({type:String,attribute:"maxlength-message"})],n.UUITextareaElement.prototype,"maxlengthMessage",2),B([C("#textarea")],n.UUITextareaElement.prototype,"_textarea",2),B([l({type:Boolean,attribute:"auto-height",reflect:!0})],n.UUITextareaElement.prototype,"autoHeight",2),B([l({type:String})],n.UUITextareaElement.prototype,"label",2),B([l({type:Number})],n.UUITextareaElement.prototype,"rows",2),B([l({type:Number})],n.UUITextareaElement.prototype,"cols",2),B([l({type:String})],n.UUITextareaElement.prototype,"wrap",2),n.UUITextareaElement=B([b("uui-textarea")],n.UUITextareaElement);let V=class extends P{};V.OPENING="opening",V.OPENED="opened",V.CLOSING="closing",V.CLOSED="closed";var vb=Object.defineProperty,gb=Object.getOwnPropertyDescriptor,At=(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&&vb(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 fu(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(),w(this,"uui-button"),w(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 V(V.OPENING)),this._animationTimeout=window.setTimeout(()=>{this.isOpen===!0&&(this.style.height="auto",this._animate=!1,this._pauseTimer===!1&&this._timer?.start(),this.dispatchEvent(new V(V.OPENED)))},this._getAnimationDuration())}))}))}_makeClose(){if(this._open===!1)return;const e=new V(V.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 V(V.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="${Lo.strings[0]}"></uui-icon></uui-button></div><slot></slot></div></div>`}},n.UUIToastNotificationElement.styles=[hi,p`: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)}`],At([l({reflect:!0})],n.UUIToastNotificationElement.prototype,"color",2),At([l({type:Number})],n.UUIToastNotificationElement.prototype,"autoClose",1),At([C("#toast")],n.UUIToastNotificationElement.prototype,"_toastEl",2),At([v()],n.UUIToastNotificationElement.prototype,"_animate",2),At([l({type:Boolean,reflect:!0})],n.UUIToastNotificationElement.prototype,"open",1),n.UUIToastNotificationElement=At([b("uui-toast-notification")],n.UUIToastNotificationElement);var fb=Object.defineProperty,yb=Object.getOwnPropertyDescriptor,$a=(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.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(V.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(V.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=[p`: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}`],$a([l({type:Number,reflect:!0,attribute:"auto-close"})],n.UUIToastNotificationContainerElement.prototype,"_autoClose",2),n.UUIToastNotificationContainerElement=$a([b("uui-toast-notification-container")],n.UUIToastNotificationContainerElement);var _b=Object.defineProperty,wb=Object.getOwnPropertyDescriptor,Jr=(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&&_b(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=[hi,p`#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)}`],Jr([l({type:String})],n.UUIToastNotificationLayoutElement.prototype,"headline",2),Jr([v()],n.UUIToastNotificationLayoutElement.prototype,"_headlineSlotHasContent",2),n.UUIToastNotificationLayoutElement=Jr([b("uui-toast-notification-layout")],n.UUIToastNotificationLayoutElement);var Ub=Object.defineProperty,Eb=Object.getOwnPropertyDescriptor,$b=(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&&Ub(e,t,o),o};n.UUIToggleElement=class extends re{constructor(){super("switch")}renderCheckbox(){return u`<div id="slider"><div id="icon-checked">${Ei}</div><div id="icon-unchecked">${Lo}</div></div>`}},n.UUIToggleElement.formAssociated=!0,n.UUIToggleElement.styles=[...re.styles,fi,p`:host{--uui-toggle-size:18px;--uui-toggle-switch-width:calc(2 * var(--uui-toggle-size))}#slider{position:relative;grid-area:'input';display:flex;align-items:center;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])~#slider{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 #slider{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~#slider{background-color:var(--uui-color-selected,#3544b1)}label:hover input:checked:not([disabled])~#slider{background-color:var(--uui-color-selected-emphasis,#4656c8)}label:focus input:checked~#slider{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~#slider #icon-checked{color:var(--uui-color-selected-contrast,#fff)}#slider::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~#slider::after{left:calc(100% - 2px);transform:translateX(-100%)}input:focus~#slider{outline:calc(2px * var(--uui-show-focus-outline,1)) solid var(--uui-color-focus,#3879ff)}:host(:not([disabled])) label:active #slider::after{width:calc(1.06 * var(--uui-toggle-size))}:host([disabled]) #slider{background-color:var(--uui-color-disabled-standalone,#e2e2e2)}:host([disabled]) input:checked~#slider{background-color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) #slider::after{background-color:var(--uui-color-disabled,#f3f3f5)}:host([disabled]) #slider #icon-unchecked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host([disabled]) label:active #slider{animation:${yi}}:host([disabled]) input:checked #slider #icon-checked{color:var(--uui-color-disabled-contrast,#c4c4c4)}:host(:not([pristine]):invalid) #slider,:host(:not([pristine]):invalid) label:hover #slider,:host(:not([pristine])[internals-invalid]) #slider,:host(:not([pristine])[internals-invalid]) label:hover #slider{border:1px solid var(--uui-color-danger-standalone,#bf214e)}`],n.UUIToggleElement=$b([b("uui-toggle")],n.UUIToggleElement);var kb=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,xb=(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&&kb(e,t,o),o};n.UUIVisuallyHiddenElement=class extends m{render(){return u`<slot></slot>`}},n.UUIVisuallyHiddenElement.styles=[p`: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=xb([b("uui-visually-hidden")],n.UUIVisuallyHiddenElement),n.ActiveMixin=Ka,n.FormControlMixin=al,n.LabelMixin=Za,n.PopoverTargetMixin=yl,n.SelectOnlyMixin=rl,n.SelectableMixin=el,n.Timer=ll,n.UUIBlinkAnimationValue=Ba,n.UUIBlinkKeyframes=ja,n.UUIBooleanInputElement=re,n.UUIBooleanInputEvent=vi,n.UUIButtonInlineCreateEvent=_i,n.UUICardEvent=ct,n.UUIColorAreaEvent=xi,n.UUIColorPickerChangeEvent=Pi,n.UUIColorSliderEvent=Ai,n.UUIColorSwatchesEvent=dt,n.UUIComboboxEvent=F,n.UUIComboboxListEvent=ee,n.UUIEvent=xo,n.UUIFileDropzoneEvent=mt,n.UUIFormControlEvent=De,n.UUIHorizontalPulseAnimationValue=Ha,n.UUIHorizontalPulseKeyframes=Va,n.UUIHorizontalShakeAnimationValue=Fa,n.UUIHorizontalShakeKeyframes=Ra,n.UUIIconHost=pr,n.UUIIconRegistry=br,n.UUIIconRegistryEssential=Rs,n.UUIIconRequestEvent=vt,n.UUIInputEvent=Ge,n.UUIInterfaceColorValues=Ul,n.UUIInterfaceHeadingValues=El,n.UUIInterfaceLookValues=wl,n.UUIMenuItemEvent=fe,n.UUIModalCloseEvent=We,n.UUIModalElement=W,n.UUIPaginationEvent=Ae,n.UUIRadioEvent=Et,n.UUIRadioGroupEvent=Ji,n.UUIRefEvent=kt,n.UUISelectEvent=to,n.UUISelectableEvent=je,n.UUISliderEvent=Ye,n.UUITabEvent=cb,n.UUITabGroupEvent=db,n.UUITextStyles=hi,n.UUITextareaEvent=si,n.UUIToastNotificationEvent=V,n.clamp=dl,n.defineElement=_l,n.demandCustomElement=ul,n.drag=cl,n.findAncestorByAttributeValue=Sn,n.reverseNumberInRange=hl,n.slotHasContent=bl,n.toHex=pl});
|
|
950
950
|
//# sourceMappingURL=uui.min.js.map
|