frankenstyle 0.1.0-next.6 → 0.1.0-next.8

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.
@@ -1,6 +1,6 @@
1
- var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const se=ie(Ct);const I=a=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(a,t)})):customElements.define(a,t)};const it=globalThis,$t=it.ShadowRoot&&(it.ShadyCSS===void 0||it.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,At=Symbol(),Et=new WeakMap;let ne=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==At)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if($t&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Et.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Et.set(e,t))}return t}toString(){return this.cssText}};const ae=a=>new ne(typeof a=="string"?a:a+"",void 0,At),re=(a,t)=>{if($t)a.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const i=document.createElement("style"),s=it.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,a.appendChild(i)}},xt=$t?a=>a:a=>a instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ae(e)})(a):a;const{is:oe,defineProperty:le,getOwnPropertyDescriptor:he,getOwnPropertyNames:ue,getOwnPropertySymbols:ce,getPrototypeOf:de}=Object,st=globalThis,Mt=st.trustedTypes,pe=Mt?Mt.emptyScript:"",$e=st.reactiveElementPolyfillSupport,F=(a,t)=>a,nt={toAttribute(a,t){switch(t){case Boolean:a=a?pe:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,t){let e=a;switch(t){case Boolean:e=a!==null;break;case Number:e=a===null?null:Number(a);break;case Object:case Array:try{e=JSON.parse(a)}catch{e=null}}return e}},mt=(a,t)=>!oe(a,t),Dt={attribute:!0,type:String,converter:nt,reflect:!1,useDefault:!1,hasChanged:mt};Symbol.metadata??=Symbol("metadata"),st.litPropertyMetadata??=new WeakMap;class J extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Dt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&le(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=he(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:s,set(r){const l=s?.call(this);n?.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Dt}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;const t=de(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){const e=this.properties,i=[...ue(e),...ce(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(xt(s))}else t!==void 0&&e.push(xt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return re(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:nt).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),r=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:nt;this._$Em=s;const l=r.fromAttribute(e,n.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){const s=this.constructor,n=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??mt)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,n]of i){const{wrapped:r}=n,l=this[s];r!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}}J.elementStyles=[],J.shadowRootOptions={mode:"open"},J[F("elementProperties")]=new Map,J[F("finalized")]=new Map,$e?.({ReactiveElement:J}),(st.reactiveElementVersions??=[]).push("2.1.1");const me={attribute:!0,type:String,converter:nt,reflect:!1,hasChanged:mt},fe=(a=me,t,e)=>{const{kind:i,metadata:s}=e;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),i==="setter"&&((a=Object.create(a)).wrapped=!0),n.set(e.name,a),i==="accessor"){const{name:r}=e;return{set(l){const h=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,h,a)},init(l){return l!==void 0&&this.C(r,void 0,a,l),l}}}if(i==="setter"){const{name:r}=e;return function(l){const h=this[r];t.call(this,l),this.requestUpdate(r,h,a)}}throw Error("Unsupported decorator location: "+i)};function u(a){return(t,e)=>typeof e=="object"?fe(a,t,e):((i,s,n)=>{const r=s.hasOwnProperty(n);return s.constructor.createProperty(n,i),r?Object.getOwnPropertyDescriptor(s,n):void 0})(a,t,e)}function m(a){return u({...a,state:!0,attribute:!1})}const ft=globalThis,at=ft.trustedTypes,Lt=at?at.createPolicy("lit-html",{createHTML:a=>a}):void 0,Ot="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,Pt="?"+O,ge=`<${Pt}>`,H=document,rt=()=>H.createComment(""),W=a=>a===null||typeof a!="object"&&typeof a!="function",gt=Array.isArray,be=a=>gt(a)||typeof a?.[Symbol.iterator]=="function",bt=`[
2
- \f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ht=/-->/g,Rt=/>/g,R=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),jt=/'/g,Ut=/"/g,Vt=/^(?:script|style|textarea|title)$/i,P=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Nt=new WeakMap,j=H.createTreeWalker(H,129);function zt(a,t){if(!gt(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lt!==void 0?Lt.createHTML(t):t}const ve=(a,t)=>{const e=a.length-1,i=[];let s,n=t===2?"<svg>":t===3?"<math>":"",r=G;for(let l=0;l<e;l++){const h=a[l];let d,$,p=-1,f=0;for(;f<h.length&&(r.lastIndex=f,$=r.exec(h),$!==null);)f=r.lastIndex,r===G?$[1]==="!--"?r=Ht:$[1]!==void 0?r=Rt:$[2]!==void 0?(Vt.test($[2])&&(s=RegExp("</"+$[2],"g")),r=R):$[3]!==void 0&&(r=R):r===R?$[0]===">"?(r=s??G,p=-1):$[1]===void 0?p=-2:(p=r.lastIndex-$[2].length,d=$[1],r=$[3]===void 0?R:$[3]==='"'?Ut:jt):r===Ut||r===jt?r=R:r===Ht||r===Rt?r=G:(r=R,s=void 0);const g=r===R&&a[l+1].startsWith("/>")?" ":"";n+=r===G?h+ge:p>=0?(i.push(d),h.slice(0,p)+Ot+h.slice(p)+O+g):h+O+(p===-2?l:g)}return[zt(a,n+(a[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Z{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const l=t.length-1,h=this.parts,[d,$]=ve(t,e);if(this.el=Z.createElement(d,i),j.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=j.nextNode())!==null&&h.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(Ot)){const f=$[r++],g=s.getAttribute(p).split(O),b=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:b[2],strings:g,ctor:b[1]==="."?we:b[1]==="?"?ke:b[1]==="@"?Ie:ot}),s.removeAttribute(p)}else p.startsWith(O)&&(h.push({type:6,index:n}),s.removeAttribute(p));if(Vt.test(s.tagName)){const p=s.textContent.split(O),f=p.length-1;if(f>0){s.textContent=at?at.emptyScript:"";for(let g=0;g<f;g++)s.append(p[g],rt()),j.nextNode(),h.push({type:2,index:++n});s.append(p[f],rt())}}}else if(s.nodeType===8)if(s.data===Pt)h.push({type:2,index:n});else{let p=-1;for(;(p=s.data.indexOf(O,p+1))!==-1;)h.push({type:7,index:n}),p+=O.length-1}n++}}static createElement(t,e){const i=H.createElement("template");return i.innerHTML=t,i}}function q(a,t,e=a,i){if(t===P)return t;let s=i!==void 0?e._$Co?.[i]:e._$Cl;const n=W(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(a),s._$AT(a,e,i)),i!==void 0?(e._$Co??=[])[i]=s:e._$Cl=s),s!==void 0&&(t=q(a,s._$AS(a,t.values),s,i)),t}let ye=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??H).importNode(e,!0);j.currentNode=s;let n=j.nextNode(),r=0,l=0,h=i[0];for(;h!==void 0;){if(r===h.index){let d;h.type===2?d=new X(n,n.nextSibling,this,t):h.type===1?d=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(d=new _e(n,this,t)),this._$AV.push(d),h=i[++l]}r!==h?.index&&(n=j.nextNode(),r++)}return j.currentNode=H,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=q(this,t,e),W(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):be(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==y&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Z.createElement(zt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const n=new ye(s,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=Nt.get(t.strings);return e===void 0&&Nt.set(t.strings,e=new Z(t)),e}k(t){gt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new X(this.O(rt()),this.O(rt()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=y}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=q(this,t,e,0),r=!W(t)||t!==this._$AH&&t!==P,r&&(this._$AH=t);else{const l=t;let h,d;for(t=n[0],h=0;h<n.length-1;h++)d=q(this,l[i+h],e,h),d===P&&(d=this._$AH[h]),r||=!W(d)||d!==this._$AH[h],d===y?t=y:t!==y&&(t+=(d??"")+n[h+1]),this._$AH[h]=d}r&&!s&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class we extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class ke extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class Ie extends ot{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=q(this,t,e,0)??y)===P)return;const i=this._$AH,s=t===y&&i!==y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==y&&(i===y||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){q(this,t)}}const Se={I:X},Te=ft.litHtmlPolyfillSupport;Te?.(Z,X),(ft.litHtmlVersions??=[]).push("3.3.1");const vt={ATTRIBUTE:1,CHILD:2},yt=a=>(...t)=>({_$litDirective$:a,values:t});class wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Kt=yt(class extends wt{constructor(a){if(super(a),a.type!==vt.ATTRIBUTE||a.name!=="class"||a.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter((t=>a[t])).join(" ")+" "}update(a,[t]){if(this.st===void 0){this.st=new Set,a.strings!==void 0&&(this.nt=new Set(a.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}const e=a.element.classList;for(const i of this.st)i in t||(e.remove(i),this.st.delete(i));for(const i in t){const s=!!t[i];s===this.st.has(i)||this.nt?.has(i)||(s?(e.add(i),this.st.add(i)):(e.remove(i),this.st.delete(i)))}return P}});const{I:Ce}=Se,Bt=()=>document.createComment(""),Q=(a,t,e)=>{const i=a._$AA.parentNode,s=t===void 0?a._$AB:t._$AA;if(e===void 0){const n=i.insertBefore(Bt(),s),r=i.insertBefore(Bt(),s);e=new Ce(n,r,a,a.options)}else{const n=e._$AB.nextSibling,r=e._$AM,l=r!==a;if(l){let h;e._$AQ?.(a),e._$AM=a,e._$AP!==void 0&&(h=a._$AU)!==r._$AU&&e._$AP(h)}if(n!==s||l){let h=e._$AA;for(;h!==n;){const d=h.nextSibling;i.insertBefore(h,s),h=d}}}return e},U=(a,t,e=a)=>(a._$AI(t,e),a),Ae={},Ee=(a,t=Ae)=>a._$AH=t,xe=a=>a._$AH,kt=a=>{a._$AR(),a._$AA.remove()};const qt=(a,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(a[s],s);return i},V=yt(class extends wt{constructor(a){if(super(a),a.type!==vt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(a,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],n=[];let r=0;for(const l of a)s[r]=i?i(l,r):r,n[r]=e(l,r),r++;return{values:n,keys:s}}render(a,t,e){return this.dt(a,t,e).values}update(a,[t,e,i]){const s=xe(a),{values:n,keys:r}=this.dt(t,e,i);if(!Array.isArray(s))return this.ut=r,n;const l=this.ut??=[],h=[];let d,$,p=0,f=s.length-1,g=0,b=n.length-1;for(;p<=f&&g<=b;)if(s[p]===null)p++;else if(s[f]===null)f--;else if(l[p]===r[g])h[g]=U(s[p],n[g]),p++,g++;else if(l[f]===r[b])h[b]=U(s[f],n[b]),f--,b--;else if(l[p]===r[b])h[b]=U(s[p],n[b]),Q(a,h[b+1],s[p]),p++,b--;else if(l[f]===r[g])h[g]=U(s[f],n[g]),Q(a,s[p],s[f]),f--,g++;else if(d===void 0&&(d=qt(r,g,b),$=qt(l,p,f)),d.has(l[p]))if(d.has(l[f])){const w=$.get(r[g]),K=w!==void 0?s[w]:null;if(K===null){const B=Q(a,s[p]);U(B,n[g]),h[g]=B}else h[g]=U(K,n[g]),Q(a,s[p],K),s[w]=null;g++}else kt(s[f]),f--;else kt(s[p]),p++;for(;g<=b;){const w=Q(a,h[b+1]);U(w,n[g]),h[g++]=w}for(;p<=f;){const w=s[p++];w!==null&&kt(w)}return this.ut=r,Ee(a,h),P}});function tt(a){if(!/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2})?$/.test(a))throw new Error("Invalid date format. Expected YYYY-MM-DD or YYYY-MM-DDTHH:MM");const e=new Date(a);if(isNaN(e.getTime()))throw new Error("Invalid date value");return e}function Me(a){if(!/^([01]\d|2[0-3]):([0-5]\d)$/.test(a))throw new Error("Invalid time format. Use HH:MM (24-hour format)");return a}function De(a,t,e="en-US"){const i=p=>{if(p>=11&&p<=13)return"th";switch(p%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},s=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),r=new Intl.DateTimeFormat(e,{weekday:"long"}),l=new Intl.DateTimeFormat(e,{weekday:"short"}),h={YYYY:()=>a.getFullYear().toString(),YY:()=>(a.getFullYear()%100).toString().padStart(2,"0"),MMMM:()=>s.format(a),MMM:()=>n.format(a),MM:()=>(a.getMonth()+1).toString().padStart(2,"0"),M:()=>(a.getMonth()+1).toString(),dddd:()=>r.format(a),ddd:()=>l.format(a),Do:()=>a.getDate()+(e.startsWith("en")?i(a.getDate()):""),DD:()=>a.getDate().toString().padStart(2,"0"),D:()=>a.getDate().toString(),HH:()=>a.getHours().toString().padStart(2,"0"),H:()=>a.getHours().toString(),hh:()=>(a.getHours()%12||12).toString().padStart(2,"0"),h:()=>(a.getHours()%12||12).toString(),mm:()=>a.getMinutes().toString().padStart(2,"0"),m:()=>a.getMinutes().toString(),A:()=>a.getHours()>=12?"PM":"AM",a:()=>a.getHours()>=12?"pm":"am"},d=Object.keys(h).sort((p,f)=>f.length-p.length),$=new RegExp(d.join("|"),"g");return t.replace($,p=>h[p]())}var Le=Object.defineProperty,E=(a,t,e,i)=>{for(var s=void 0,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=r(t,e,s)||s);return s&&Le(t,e,s),s};const Yt=a=>{class t extends a{constructor(){super(...arguments),this.today=!1,this.jumpable=!1,this["starts-with"]=0,this["disabled-dates"]="",this["marked-dates"]="",this["view-date"]=new Date().toISOString().split("T")[0],this.min="",this.max="",this["weekday-format"]="short",this.lang="en-us",this.isDirty=!1}get $viewDate(){const[i,s,n]=this["view-date"].split("-").map(Number);return this.createUTCDate(i,s-1,n)}createUTCDate(i,s,n){return new Date(Date.UTC(i,s,n))}dateToUTC(i){return this.createUTCDate(i.getFullYear(),i.getMonth(),i.getDate())}getTodayUTC(){return this.dateToUTC(new Date)}getUTCDate(i){return this.dateToUTC(i)}isDateInRange(i){if(!this.min&&!this.max)return!0;const s=new Date(i);if(this.min){const n=tt(this.min);if(s<n)return!1}if(this.max){const n=tt(this.max);if(n.setDate(n.getDate()+1),s>=n)return!1}return!0}parseDates(i){return i?i.split(",").map(s=>s.trim()).filter(Boolean).map(s=>{try{return tt(s).toISOString().slice(0,10)}catch{return console.warn(`[fr-calendar] Invalid date format in list: "${s}".`),""}}).filter(Boolean):[]}getTimestampComponent(i){const s=this.lang||void 0;return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,monthName:i.toLocaleDateString(s,{month:"long",timeZone:"UTC"}),day:i.getUTCDate(),dayName:i.toLocaleDateString(s,{weekday:"long",timeZone:"UTC"}),ISOString:i.toISOString()}}$icons(i){const s=super.$icons(i);if(s)return s;switch(i){case"chevron-left":return c.html`
1
+ var __COMPONENTS__=(function(o,c,Tt,te){"use strict";function ee(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const ie=ee(Tt);const _=r=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(r,t)})):customElements.define(r,t)};const et=globalThis,pt=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ct=Symbol(),At=new WeakMap;let se=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(pt&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=At.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&At.set(e,t))}return t}toString(){return this.cssText}};const ne=r=>new se(typeof r=="string"?r:r+"",void 0,Ct),re=(r,t)=>{if(pt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const i=document.createElement("style"),s=et.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},xt=pt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ne(e)})(r):r;const{is:ae,defineProperty:oe,getOwnPropertyDescriptor:le,getOwnPropertyNames:he,getOwnPropertySymbols:ue,getPrototypeOf:ce}=Object,it=globalThis,Et=it.trustedTypes,de=Et?Et.emptyScript:"",pe=it.reactiveElementPolyfillSupport,Y=(r,t)=>r,st={toAttribute(r,t){switch(t){case Boolean:r=r?de:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},$t=(r,t)=>!ae(r,t),Dt={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),it.litPropertyMetadata??=new WeakMap;class F extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Dt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&oe(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=le(this.prototype,t)??{get(){return this[e]},set(a){this[e]=a}};return{get:s,set(a){const h=s?.call(this);n?.call(this,a),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Dt}static _$Ei(){if(this.hasOwnProperty(Y("elementProperties")))return;const t=ce(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Y("properties"))){const e=this.properties,i=[...he(e),...ue(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(xt(s))}else t!==void 0&&e.push(xt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return re(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:st).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:st;this._$Em=s;const h=a.fromAttribute(e,n.type);this[s]=h??this._$Ej?.get(s)??h,this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){const s=this.constructor,n=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??$t)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:n},a){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??e??this[t]),n!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,n]of i){const{wrapped:a}=n,h=this[s];a!==!0||this._$AL.has(s)||h===void 0||this.C(s,void 0,n,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}}F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[Y("elementProperties")]=new Map,F[Y("finalized")]=new Map,pe?.({ReactiveElement:F}),(it.reactiveElementVersions??=[]).push("2.1.1");const $e={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:$t},me=(r=$e,t,e)=>{const{kind:i,metadata:s}=e;let n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),i==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),i==="accessor"){const{name:a}=e;return{set(h){const l=t.get.call(this);t.set.call(this,h),this.requestUpdate(a,l,r)},init(h){return h!==void 0&&this.C(a,void 0,r,h),h}}}if(i==="setter"){const{name:a}=e;return function(h){const l=this[a];t.call(this,h),this.requestUpdate(a,l,r)}}throw Error("Unsupported decorator location: "+i)};function u(r){return(t,e)=>typeof e=="object"?me(r,t,e):((i,s,n)=>{const a=s.hasOwnProperty(n);return s.constructor.createProperty(n,i),a?Object.getOwnPropertyDescriptor(s,n):void 0})(r,t,e)}function m(r){return u({...r,state:!0,attribute:!1})}const mt=globalThis,nt=mt.trustedTypes,Mt=nt?nt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ot="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,Lt="?"+O,fe=`<${Lt}>`,P=document,rt=()=>P.createComment(""),J=r=>r===null||typeof r!="object"&&typeof r!="function",ft=Array.isArray,ge=r=>ft(r)||typeof r?.[Symbol.iterator]=="function",gt=`[
2
+ \f\r]`,W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pt=/-->/g,Ht=/>/g,H=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),jt=/'/g,Ut=/"/g,Rt=/^(?:script|style|textarea|title)$/i,L=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Nt=new WeakMap,j=P.createTreeWalker(P,129);function Vt(r,t){if(!ft(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(t):t}const be=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":t===3?"<math>":"",a=W;for(let h=0;h<e;h++){const l=r[h];let d,$,p=-1,f=0;for(;f<l.length&&(a.lastIndex=f,$=a.exec(l),$!==null);)f=a.lastIndex,a===W?$[1]==="!--"?a=Pt:$[1]!==void 0?a=Ht:$[2]!==void 0?(Rt.test($[2])&&(s=RegExp("</"+$[2],"g")),a=H):$[3]!==void 0&&(a=H):a===H?$[0]===">"?(a=s??W,p=-1):$[1]===void 0?p=-2:(p=a.lastIndex-$[2].length,d=$[1],a=$[3]===void 0?H:$[3]==='"'?Ut:jt):a===Ut||a===jt?a=H:a===Pt||a===Ht?a=W:(a=H,s=void 0);const g=a===H&&r[h+1].startsWith("/>")?" ":"";n+=a===W?l+fe:p>=0?(i.push(d),l.slice(0,p)+Ot+l.slice(p)+O+g):l+O+(p===-2?h:g)}return[Vt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class G{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,a=0;const h=t.length-1,l=this.parts,[d,$]=be(t,e);if(this.el=G.createElement(d,i),j.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(s=j.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(const p of s.getAttributeNames())if(p.endsWith(Ot)){const f=$[a++],g=s.getAttribute(p).split(O),b=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:b[2],strings:g,ctor:b[1]==="."?ye:b[1]==="?"?we:b[1]==="@"?ke:at}),s.removeAttribute(p)}else p.startsWith(O)&&(l.push({type:6,index:n}),s.removeAttribute(p));if(Rt.test(s.tagName)){const p=s.textContent.split(O),f=p.length-1;if(f>0){s.textContent=nt?nt.emptyScript:"";for(let g=0;g<f;g++)s.append(p[g],rt()),j.nextNode(),l.push({type:2,index:++n});s.append(p[f],rt())}}}else if(s.nodeType===8)if(s.data===Lt)l.push({type:2,index:n});else{let p=-1;for(;(p=s.data.indexOf(O,p+1))!==-1;)l.push({type:7,index:n}),p+=O.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function q(r,t,e=r,i){if(t===L)return t;let s=i!==void 0?e._$Co?.[i]:e._$Cl;const n=J(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,e,i)),i!==void 0?(e._$Co??=[])[i]=s:e._$Cl=s),s!==void 0&&(t=q(r,s._$AS(r,t.values),s,i)),t}let ve=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??P).importNode(e,!0);j.currentNode=s;let n=j.nextNode(),a=0,h=0,l=i[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new Z(n,n.nextSibling,this,t):l.type===1?d=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(d=new Ie(n,this,t)),this._$AV.push(d),l=i[++h]}a!==l?.index&&(n=j.nextNode(),a++)}return j.currentNode=P,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class Z{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=q(this,t,e),J(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==L&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ge(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==y&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=G.createElement(Vt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const n=new ve(s,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=Nt.get(t.strings);return e===void 0&&Nt.set(t.strings,e=new G(t)),e}k(t){ft(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new Z(this.O(rt()),this.O(rt()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class at{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=y}_$AI(t,e=this,i,s){const n=this.strings;let a=!1;if(n===void 0)t=q(this,t,e,0),a=!J(t)||t!==this._$AH&&t!==L,a&&(this._$AH=t);else{const h=t;let l,d;for(t=n[0],l=0;l<n.length-1;l++)d=q(this,h[i+l],e,l),d===L&&(d=this._$AH[l]),a||=!J(d)||d!==this._$AH[l],d===y?t=y:t!==y&&(t+=(d??"")+n[l+1]),this._$AH[l]=d}a&&!s&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ye extends at{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class we extends at{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class ke extends at{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=q(this,t,e,0)??y)===L)return;const i=this._$AH,s=t===y&&i!==y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==y&&(i===y||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ie{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){q(this,t)}}const Se={I:Z},_e=mt.litHtmlPolyfillSupport;_e?.(G,Z),(mt.litHtmlVersions??=[]).push("3.3.1");const bt={ATTRIBUTE:1,CHILD:2},vt=r=>(...t)=>({_$litDirective$:r,values:t});class yt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const zt=vt(class extends yt{constructor(r){if(super(r),r.type!==bt.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter((t=>r[t])).join(" ")+" "}update(r,[t]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}const e=r.element.classList;for(const i of this.st)i in t||(e.remove(i),this.st.delete(i));for(const i in t){const s=!!t[i];s===this.st.has(i)||this.nt?.has(i)||(s?(e.add(i),this.st.add(i)):(e.remove(i),this.st.delete(i)))}return L}});const{I:Te}=Se,Bt=()=>document.createComment(""),X=(r,t,e)=>{const i=r._$AA.parentNode,s=t===void 0?r._$AB:t._$AA;if(e===void 0){const n=i.insertBefore(Bt(),s),a=i.insertBefore(Bt(),s);e=new Te(n,a,r,r.options)}else{const n=e._$AB.nextSibling,a=e._$AM,h=a!==r;if(h){let l;e._$AQ?.(r),e._$AM=r,e._$AP!==void 0&&(l=r._$AU)!==a._$AU&&e._$AP(l)}if(n!==s||h){let l=e._$AA;for(;l!==n;){const d=l.nextSibling;i.insertBefore(l,s),l=d}}}return e},U=(r,t,e=r)=>(r._$AI(t,e),r),Ce={},Ae=(r,t=Ce)=>r._$AH=t,xe=r=>r._$AH,wt=r=>{r._$AR(),r._$AA.remove()};const qt=(r,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(r[s],s);return i},R=vt(class extends yt{constructor(r){if(super(r),r.type!==bt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],n=[];let a=0;for(const h of r)s[a]=i?i(h,a):a,n[a]=e(h,a),a++;return{values:n,keys:s}}render(r,t,e){return this.dt(r,t,e).values}update(r,[t,e,i]){const s=xe(r),{values:n,keys:a}=this.dt(t,e,i);if(!Array.isArray(s))return this.ut=a,n;const h=this.ut??=[],l=[];let d,$,p=0,f=s.length-1,g=0,b=n.length-1;for(;p<=f&&g<=b;)if(s[p]===null)p++;else if(s[f]===null)f--;else if(h[p]===a[g])l[g]=U(s[p],n[g]),p++,g++;else if(h[f]===a[b])l[b]=U(s[f],n[b]),f--,b--;else if(h[p]===a[b])l[b]=U(s[p],n[b]),X(r,l[b+1],s[p]),p++,b--;else if(h[f]===a[g])l[g]=U(s[f],n[g]),X(r,s[p],s[f]),f--,g++;else if(d===void 0&&(d=qt(a,g,b),$=qt(h,p,f)),d.has(h[p]))if(d.has(h[f])){const k=$.get(a[g]),z=k!==void 0?s[k]:null;if(z===null){const B=X(r,s[p]);U(B,n[g]),l[g]=B}else l[g]=U(z,n[g]),X(r,s[p],z),s[k]=null;g++}else wt(s[f]),f--;else wt(s[p]),p++;for(;g<=b;){const k=X(r,l[b+1]);U(k,n[g]),l[g++]=k}for(;p<=f;){const k=s[p++];k!==null&&wt(k)}return this.ut=a,Ae(r,l),L}});function Q(r){if(!/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2})?$/.test(r))throw new Error("Invalid date format. Expected YYYY-MM-DD or YYYY-MM-DDTHH:MM");const e=new Date(r);if(isNaN(e.getTime()))throw new Error("Invalid date value");return e}function Ee(r){if(!/^([01]\d|2[0-3]):([0-5]\d)$/.test(r))throw new Error("Invalid time format. Use HH:MM (24-hour format)");return r}function De(r,t,e="en-US"){const i=p=>{if(p>=11&&p<=13)return"th";switch(p%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},s=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),a=new Intl.DateTimeFormat(e,{weekday:"long"}),h=new Intl.DateTimeFormat(e,{weekday:"short"}),l={YYYY:()=>r.getFullYear().toString(),YY:()=>(r.getFullYear()%100).toString().padStart(2,"0"),MMMM:()=>s.format(r),MMM:()=>n.format(r),MM:()=>(r.getMonth()+1).toString().padStart(2,"0"),M:()=>(r.getMonth()+1).toString(),dddd:()=>a.format(r),ddd:()=>h.format(r),Do:()=>r.getDate()+(e.startsWith("en")?i(r.getDate()):""),DD:()=>r.getDate().toString().padStart(2,"0"),D:()=>r.getDate().toString(),HH:()=>r.getHours().toString().padStart(2,"0"),H:()=>r.getHours().toString(),hh:()=>(r.getHours()%12||12).toString().padStart(2,"0"),h:()=>(r.getHours()%12||12).toString(),mm:()=>r.getMinutes().toString().padStart(2,"0"),m:()=>r.getMinutes().toString(),A:()=>r.getHours()>=12?"PM":"AM",a:()=>r.getHours()>=12?"pm":"am"},d=Object.keys(l).sort((p,f)=>f.length-p.length),$=new RegExp(d.join("|"),"g");return t.replace($,p=>l[p]())}var Me=Object.defineProperty,A=(r,t,e,i)=>{for(var s=void 0,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(t,e,s)||s);return s&&Me(t,e,s),s};const Kt=r=>{class t extends r{constructor(){super(...arguments),this.today=!1,this.jumpable=!1,this["starts-with"]=0,this["disabled-dates"]="",this["marked-dates"]="",this["view-date"]=new Date().toISOString().split("T")[0],this.min="",this.max="",this["weekday-format"]="short",this.lang="en-us",this.isDirty=!1}get $viewDate(){const[i,s,n]=this["view-date"].split("-").map(Number);return this.createUTCDate(i,s-1,n)}createUTCDate(i,s,n){return new Date(Date.UTC(i,s,n))}dateToUTC(i){return this.createUTCDate(i.getFullYear(),i.getMonth(),i.getDate())}getTodayUTC(){return this.dateToUTC(new Date)}getUTCDate(i){return this.dateToUTC(i)}isDateInRange(i){if(!this.min&&!this.max)return!0;const s=new Date(i);if(this.min){const n=Q(this.min);if(s<n)return!1}if(this.max){const n=Q(this.max);if(n.setDate(n.getDate()+1),s>=n)return!1}return!0}parseDates(i){return i?i.split(",").map(s=>s.trim()).filter(Boolean).map(s=>{try{return Q(s).toISOString().slice(0,10)}catch{return console.warn(`[fr-calendar] Invalid date format in list: "${s}".`),""}}).filter(Boolean):[]}getTimestampComponent(i){const s=this.lang||void 0;return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,monthName:i.toLocaleDateString(s,{month:"long",timeZone:"UTC"}),day:i.getUTCDate(),dayName:i.toLocaleDateString(s,{weekday:"long",timeZone:"UTC"}),ISOString:i.toISOString()}}$icons(i){const s=super.$icons(i);if(s)return s;switch(i){case"chevron-left":return c.html`
4
4
  <svg
5
5
  xmlns="http://www.w3.org/2000/svg"
6
6
  width="16"
@@ -48,11 +48,11 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
48
48
  <rect width="18" height="18" x="3" y="4" rx="2" />
49
49
  <path d="M3 10h18" />
50
50
  </svg>
51
- `}}}return E([u({type:Boolean})],t.prototype,"today"),E([u({type:Boolean})],t.prototype,"jumpable"),E([u({type:Number})],t.prototype,"starts-with"),E([u({type:String})],t.prototype,"disabled-dates"),E([u({type:String})],t.prototype,"marked-dates"),E([u({type:String})],t.prototype,"view-date"),E([u({type:String})],t.prototype,"min"),E([u({type:String})],t.prototype,"max"),E([u({type:String})],t.prototype,"weekday-format"),E([u({type:String})],t.prototype,"lang"),t};var Oe=Object.defineProperty,et=(a,t,e,i)=>{for(var s=void 0,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=r(t,e,s)||s);return s&&Oe(t,e,s),s};const N=a=>{class t extends a{constructor(){super(...arguments),this.disabled=!1,this.name="",this.placeholder="",this.required=!1,this.value=""}renderHidden(){return typeof this.$value=="string"?this.name?c.html`
51
+ `}}}return A([u({type:Boolean})],t.prototype,"today"),A([u({type:Boolean})],t.prototype,"jumpable"),A([u({type:Number})],t.prototype,"starts-with"),A([u({type:String})],t.prototype,"disabled-dates"),A([u({type:String})],t.prototype,"marked-dates"),A([u({type:String})],t.prototype,"view-date"),A([u({type:String})],t.prototype,"min"),A([u({type:String})],t.prototype,"max"),A([u({type:String})],t.prototype,"weekday-format"),A([u({type:String})],t.prototype,"lang"),t};var Oe=Object.defineProperty,tt=(r,t,e,i)=>{for(var s=void 0,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(t,e,s)||s);return s&&Oe(t,e,s),s};const N=r=>{class t extends r{constructor(){super(...arguments),this.disabled=!1,this.name="",this.placeholder="",this.required=!1,this.value=""}renderHidden(){return typeof this.$value=="string"?this.name?c.html`
52
52
  <input name="${this.name}" type="hidden" value="${this.$value}" />
53
53
  `:"":this.$value.map(i=>c.html`
54
54
  <input name="${this.name}[]" type="hidden" value="${i}" />
55
- `)}emit(){this.dispatchEvent(new CustomEvent(this["input-event"],{detail:{value:this.$value},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.initializeValue()}}return et([u({type:Boolean})],t.prototype,"disabled"),et([u({type:String})],t.prototype,"name"),et([u({type:String})],t.prototype,"placeholder"),et([u({type:Boolean})],t.prototype,"required"),et([u({type:String})],t.prototype,"value"),t};class It extends wt{constructor(t){if(super(t),this.it=y,t.type!==vt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===y||t==null)return this._t=void 0,this.it=t;if(t===P)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}It.directiveName="unsafeHTML",It.resultType=1;const Ft=yt(It);function lt(a,t=!1){if(t){if(a.startsWith("{"))try{return JSON.parse(a)}catch(e){return console.error("Error parsing JSON:",a,e),a}return a}if(a.startsWith("{"))try{return JSON.parse(a)}catch(e){return console.error("Error parsing JSON:",a,e),{}}if(a.replace(/\\:/g,"").includes(":"))try{const e={};return Jt(a.replace(/[;\s]+$/,""),";").forEach(s=>{const n=Jt(s.trim(),":");if(n.length>=2){const r=n[0].trim(),l=n.slice(1).join(":").trim();r&&(e[r]=Wt(l))}}),e}catch(e){return console.error("Error parsing key-value pairs:",a,e),{}}return Wt(a)}function Jt(a,t){const e=[];let i="",s=0;for(;s<a.length;)a[s]==="\\"&&s+1<a.length&&a[s+1]===t?(i+="\\"+t,s+=2):a[s]===t?(e.push(i),i="",s++):(i+=a[s],s++);return e.push(i),e}function Wt(a){return a.replace(/\\:/g,":").replace(/\\;/g,";")}function Pe(a){const t={},e=(s,n=[])=>{const r=n.length>0?{keywords:n}:{};return Object.keys(s.dataset).forEach(l=>{if(l==="keywords"){const h=s.dataset.keywords.split(",").map(d=>d.trim()).filter(d=>d.length>0);r.keywords=n.length>0?[...n,...h]:h}else r[l]=s.dataset[l]}),r},i=(s,n,r,l=!1)=>{const h=r.hasAttribute("value")?r.getAttribute("value"):r.textContent.trim(),d=e(r,[h]);t[s]||(t[s]={text:n,options:[]}),t[s].options.push({group:s,value:h,text:r.textContent.trim(),disabled:l||r.disabled,selected:r.hasAttribute("selected"),data:d})};return Array.from(a.children).forEach(s=>{if(s.nodeName==="OPTGROUP"){const n=s,r=n.dataset.key||n.getAttribute("label"),l=n.getAttribute("label").trim(),h=e(n);Array.from(n.children).forEach(d=>{d.nodeName==="OPTION"&&i(r,l,d,n.disabled)}),Object.keys(h).length>0&&(t[r]||(t[r]={text:l,options:[]}),t[r].data=h)}else s.nodeName==="OPTION"&&i("__","__",s)}),t}var He=Object.defineProperty,T=(a,t,e,i)=>{for(var s=void 0,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=r(t,e,s)||s);return s&&He(t,e,s),s};let ht=null,Gt=!1;class v extends c.LitElement{constructor(){super(...arguments),this.cls="",this.stl="",this.i18n="",this["force-prevent-rerender"]=!1,this.$i18n={},this.$cls={},this.$stl={},this.$config={},this.$i=new Map,this.$template="",this.$data={},this.isRendered=!1,this.HTMLScript=null,this.HTMLIconContainer=null,this.HTMLTemplateContainer=null,this.HTMLDataSource=null,this.configObserver=null,this.dataSourceObserver=null,this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner"}get $normalizedI18n(){const t={};return Object.keys(this.$i18n).forEach(e=>{const i=this.$i18n[e];t[e]=i.includes(",")?i.split(",").map(s=>s.trim()):i}),t}$icons(t){return this.$i.get(t)}getI18nText(t,e={},i){let s=this.$i18n[t];if(!s){const n=this.tagName.toLowerCase(),r=this.$i18n[n];typeof r=="object"&&r!==null&&t in r&&(s=r[t])}return s||(s=e[t]||""),i!==void 0&&(typeof i=="number"?s=s.replace("{n}",String(i)):Object.keys(i).forEach(n=>{const r=i[n];s=s.replace(new RegExp(`\\{${n}\\}`,"g"),String(r))})),s}initializeCls(){if(this.cls){const t=lt(this.cls);typeof t=="string"?this.$cls[this["cls-default-element"]]=t:Object.keys(t).forEach(e=>{this.$cls[e]=t[e]})}}initializeStl(){if(this.stl){const t=lt(this.stl);typeof t=="string"?this.$stl[this["stl-default-element"]]=t:Object.keys(t).forEach(e=>{this.$stl[e]=t[e]})}}initializeGI18n(){if(Gt)return;Gt=!0;const t=document.getElementById("uk-i18n");if(t&&t.textContent)try{ht=JSON.parse(t.textContent)}catch(e){console.error('Failed to parse global i18n from <script id="uk-i18n">.',e),ht={}}else ht={}}initializeI18n(){this.initializeGI18n();const t=this.i18n?lt(this.i18n):{};typeof t=="object"&&t!==null&&(this.$i18n=Object.assign({},ht,t))}initializeConfig(){this.HTMLScript=this.querySelector('script[data-fn="config"][type="application/json"]')}initializeIcons(){this.HTMLIconContainer=this.querySelector('template[data-fn="icons"]')}initializeTemplate(){this.HTMLTemplateContainer=this.querySelector('template[data-fn="template"]')}initializeDataSource(){this.HTMLDataSource=this.querySelector('select[data-fn="data-source"]')}parseIcons(){if(!this.HTMLIconContainer)return;this.HTMLIconContainer.content.querySelectorAll("[data-key]").forEach(e=>{const i=e.getAttribute("data-key");if(i){const s=e.cloneNode(!0);s.removeAttribute("data-key");const n=s.outerHTML;this.$i.set(i,c.html`${Ft(n)}`)}})}parseTemplate(){this.HTMLTemplateContainer&&(this.$template=this.HTMLTemplateContainer.innerHTML.trim())}parseConfig(){if(this.HTMLScript)try{const t=this.HTMLScript.textContent;if(this.$config=t?JSON.parse(t):{},this.$config&&typeof this.$config=="object"){if("i18n"in this.$config){const e=this.$config.i18n;typeof e=="object"&&e!==null&&(this.$i18n={...this.$i18n,...e})}if("cls"in this.$config){const e=this.$config.cls;typeof e=="string"?this.$cls[this["cls-default-element"]]=e:typeof e=="object"&&e!==null&&(this.$cls={...this.$cls,...e})}if("stl"in this.$config){const e=this.$config.stl;typeof e=="string"?this.$stl[this["stl-default-element"]]=e:typeof e=="object"&&e!==null&&(this.$stl={...this.$stl,...e})}}}catch(t){console.warn(`${this.tagName.toLowerCase()}: Failed to parse config JSON:`,t),this.$config={}}}parseDataSource(){this.HTMLDataSource&&(this.$data=Pe(this.HTMLDataSource))}initializeConfigObserver(){!this.HTMLScript||!this.HTMLScript.hasAttribute("data-reactive")||(this.configObserver=new MutationObserver(()=>{this.parseConfig(),this.onConfigChanged()}),this.configObserver.observe(this.HTMLScript,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}initializeDataSourceObserver(){!this.HTMLDataSource||!this.HTMLDataSource.hasAttribute("data-reactive")||(this.dataSourceObserver=new MutationObserver(()=>{this.parseDataSource(),this.onDataSourceChanged()}),this.dataSourceObserver.observe(this.HTMLDataSource,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}onConfigChanged(){}onDataSourceChanged(){}connectedCallback(){super.connectedCallback(),this["force-prevent-rerender"]&&this.querySelector("[data-host-inner]")&&(this.isRendered=!0),this.initializeI18n(),this.initializeCls(),this.initializeStl(),this.initializeConfig(),this.initializeIcons(),this.initializeTemplate(),this.initializeDataSource(),this.HTMLScript&&(this.parseConfig(),this.initializeConfigObserver()),this.HTMLIconContainer&&this.parseIcons(),this.HTMLTemplateContainer&&this.parseTemplate(),this.HTMLDataSource&&(this.parseDataSource(),this.initializeDataSourceObserver())}disconnectedCallback(){super.disconnectedCallback(),this.configObserver&&(this.configObserver.disconnect(),this.configObserver=null),this.dataSourceObserver&&(this.dataSourceObserver.disconnect(),this.dataSourceObserver=null)}shouldUpdate(t){return this["force-prevent-rerender"]&&this.isRendered?!1:super.shouldUpdate(t)}updated(t){super.updated(t),this.isRendered||(this.isRendered=!0)}createRenderRoot(){return this}}T([u({type:String})],v.prototype,"cls"),T([u({type:String})],v.prototype,"stl"),T([u({type:String})],v.prototype,"i18n"),T([u({type:Boolean})],v.prototype,"force-prevent-rerender"),T([m()],v.prototype,"$i18n"),T([m()],v.prototype,"$cls"),T([m()],v.prototype,"$stl"),T([m()],v.prototype,"$config"),T([m()],v.prototype,"$i"),T([m()],v.prototype,"$template"),T([m()],v.prototype,"$data");var Re=Object.defineProperty,je=Object.getOwnPropertyDescriptor,ut=(a,t,e,i)=>{for(var s=i>1?void 0:i?je(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&Re(t,e,s),s};o.Calendar=class extends Yt(N(v)){constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this["input-event"]="uk-calendar:change",this.$cls={"host-inner":"uk-cal",header:"uk-cal-header","previous-button":"uk-button uk-button-secondary uk-button-icon uk-button-small","next-button":"uk-button uk-button-secondary uk-button-icon uk-button-small",title:"uk-cal-title",jumper:"uk-cal-jumper","month-select":"uk-select uk-form-small","year-input":"uk-input uk-form-small",grid:"",weekdays:"",weekday:"",week:"",day:"","day-button":"","jumper-month":"uk-cal-jumper-month","jumper-year":"uk-cal-jumper-year","jumper-button":"uk-button uk-button-secondary uk-button-icon uk-button-small","day-outside-month":"uk-cal-oom","day-selected":"uk-active","day-today":"uk-nothing","day-marked":"uk-cal-marked","button-outside-month":"uk-nothing","button-selected":"uk-nothing","button-today":"uk-nothing","button-marked":"uk-nothing"},this.$stl={"host-inner":"",header:"","previous-button":"","next-button":"",title:"",jumper:"","month-select":"","year-input":"",grid:"",weekdays:"",weekday:"",week:"",day:"","day-button":"","jumper-month":"","jumper-year":"","jumper-button":"","day-outside-month":"","day-selected":"","day-today":"","day-marked":"","button-outside-month":"","button-selected":"","button-today":"","button-marked":""},this.defaultI18n={"prev-month":"Previous month","next-month":"Next month","prev-year":"Previous year","next-year":"Next year","select-month":"Select month","select-year":"Select year"},this.navigate=t=>{const e=t.target;if(!e?.matches("button[data-iso]"))return;const i=Array.from(this.querySelectorAll("button[data-iso]")),s=i.indexOf(e),n=this.getGridPosition(e);if(!n)return;const{rowIndex:r,colIndex:l}=n;let h;const d={ArrowLeft:()=>this.findNextEnabled(i,s-1,-1),ArrowRight:()=>this.findNextEnabled(i,s+1,1),ArrowUp:()=>this.getNextEnabledInColumn(r-1,l,-1),ArrowDown:()=>this.getNextEnabledInColumn(r+1,l,1),Home:()=>this.getRowFirstEnabledButton(r),End:()=>this.getRowLastEnabledButton(r),PageUp:t.ctrlKey||t.metaKey?()=>{this.navigateYear("prev")}:()=>{this.navigateMonth("prev")},PageDown:t.ctrlKey||t.metaKey?()=>{this.navigateYear("next")}:()=>{this.navigateMonth("next")}};if(d[t.key]){t.preventDefault();const $=d[t.key]();$&&(h=$)}else if(t.key==="Enter"||t.key===" "){t.preventDefault(),e.click();return}h?.focus()}}get $value(){return this.$active?this.$active.slice(0,10):""}get $text(){return""}initializeValue(){if(this.value)try{const t=tt(this.value);this.$active=t.toISOString(),this["view-date"]=t.toISOString().slice(0,10)}catch(t){console.error(`[uk-calendar] Invalid date format for value: "${this.value}".`,t)}else this.today&&(this.$active=this.getTodayUTC().toISOString())}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.navigate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.navigate)}updated(t){t.has("$active")&&(this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(`button[data-iso="${this.$active}"]`);e&&this.isDirty&&e.focus()}),this.emit())}findNextEnabled(t,e,i){for(let s=e;s>=0&&s<t.length;s+=i)if(!t[s].disabled)return t[s]}getNextEnabledInColumn(t,e,i){const s=Array.from(this.querySelectorAll("tr"));for(let n=t;n>=0&&n<s.length;n+=i){const r=s[n]?.children[e]?.querySelector("button[data-iso]");if(r&&!r.disabled)return r}}getRowFirstEnabledButton(t){const e=this.querySelectorAll("tr")[t];return Array.from(e?.querySelectorAll("button[data-iso]")||[]).find(i=>!i.disabled)}getRowLastEnabledButton(t){const e=this.querySelectorAll("tr")[t];return Array.from(e?.querySelectorAll("button[data-iso]")||[]).reverse().find(i=>!i.disabled)}getGridPosition(t){const e=t.closest("td"),i=e?.closest("tr");return!i||!e?null:{rowIndex:Array.from(this.querySelectorAll("tr")).indexOf(i),colIndex:Array.from(i.children).indexOf(e)}}select(t){this.$active=t.ISOString,t.month!=="current"&&(this["view-date"]=t.ISOString.slice(0,10)),this.isDirty||(this.isDirty=!0)}navigateYear(t){const[e,i,s]=this["view-date"].split("-"),n=t==="prev"?parseInt(e)-1:parseInt(e)+1;this["view-date"]=`${n}-${i}-${s}`}navigateMonth(t){const[e,i]=this["view-date"].split("-").map(Number);let s=i,n=e;t==="prev"?i===1?(s=12,n-=1):s-=1:i===12?(s=1,n+=1):s+=1,this["view-date"]=`${n}-${s.toString().padStart(2,"0")}-01`}selectMonth(t){const[e]=this["view-date"].split("-");this["view-date"]=`${e}-${(t+1).toString().padStart(2,"0")}-01`}setYear(t){if(/^\d{4}$/.test(t)){const[,e,i]=this["view-date"].split("-");this["view-date"]=`${t}-${e}-${i}`}}get weekdays(){const t=this.lang||void 0,e=[];for(let i=0;i<7;i++){const s=(this["starts-with"]+i)%7,n=this.createUTCDate(2023,0,1+s);e.push(n.toLocaleDateString(t,{weekday:this["weekday-format"],timeZone:"UTC"}))}return e}get calendar(){const[t,e]=this["view-date"].split("-").map(Number),i=this.getTodayUTC().toISOString().slice(0,10),s=this.parseDates(this["marked-dates"]),n=new Set(this.parseDates(this["disabled-dates"])),r=this.createUTCDate(t,e-1,1),l=this.createUTCDate(t,e,0).getUTCDate(),h=this.createUTCDate(t,e-1,0).getUTCDate();let d=(r.getUTCDay()-this["starts-with"]+7)%7;const $=[];let p=1,f=h-d+1,g=1;for(let b=0;b<6;b++){const w=[];for(let K=0;K<7;K++){let B,dt,pt;b===0&&K<d?(B=this.createUTCDate(t,e-2,f),dt=f,pt="prev",f++):p>l?(B=this.createUTCDate(t,e,g),dt=g,pt="next",g++):(B=this.createUTCDate(t,e-1,p),dt=p,pt="current",p++);const St=B.toISOString(),Tt=St.slice(0,10);w.push({date:dt,month:pt,isToday:Tt===i,isDisabled:n.has(Tt)||!this.isDateInRange(St),isMarked:s.includes(Tt),ISOString:St})}if($.push(w),p>l&&b>=4)break}return $}render(){return c.html`
55
+ `)}emit(){this.dispatchEvent(new CustomEvent(this["input-event"],{detail:{value:this.$value},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.initializeValue()}}return tt([u({type:Boolean})],t.prototype,"disabled"),tt([u({type:String})],t.prototype,"name"),tt([u({type:String})],t.prototype,"placeholder"),tt([u({type:Boolean})],t.prototype,"required"),tt([u({type:String})],t.prototype,"value"),t};class kt extends yt{constructor(t){if(super(t),this.it=y,t.type!==bt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===y||t==null)return this._t=void 0,this.it=t;if(t===L)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}kt.directiveName="unsafeHTML",kt.resultType=1;const Yt=vt(kt);function ot(r,t=!1){if(t){if(r.startsWith("{"))try{return JSON.parse(r)}catch(e){return console.error("Error parsing JSON:",r,e),r}return r}if(r.startsWith("{"))try{return JSON.parse(r)}catch(e){return console.error("Error parsing JSON:",r,e),{}}if(r.replace(/\\:/g,"").includes(":"))try{const e={};return Ft(r.replace(/[;\s]+$/,""),";").forEach(s=>{const n=Ft(s.trim(),":");if(n.length>=2){const a=n[0].trim(),h=n.slice(1).join(":").trim();a&&(e[a]=Jt(h))}}),e}catch(e){return console.error("Error parsing key-value pairs:",r,e),{}}return Jt(r)}function Ft(r,t){const e=[];let i="",s=0;for(;s<r.length;)r[s]==="\\"&&s+1<r.length&&r[s+1]===t?(i+="\\"+t,s+=2):r[s]===t?(e.push(i),i="",s++):(i+=r[s],s++);return e.push(i),e}function Jt(r){return r.replace(/\\:/g,":").replace(/\\;/g,";")}function Le(r){const t={},e=(s,n=[])=>{const a=n.length>0?{keywords:n}:{};return Object.keys(s.dataset).forEach(h=>{if(h==="keywords"){const l=s.dataset.keywords.split(",").map(d=>d.trim()).filter(d=>d.length>0);a.keywords=n.length>0?[...n,...l]:l}else a[h]=s.dataset[h]}),a},i=(s,n,a,h=!1)=>{const l=a.hasAttribute("value")?a.getAttribute("value"):a.textContent.trim(),d=e(a,[l]);t[s]||(t[s]={text:n,options:[]}),t[s].options.push({group:s,value:l,text:a.textContent.trim(),disabled:h||a.disabled,selected:a.hasAttribute("selected"),data:d})};return Array.from(r.children).forEach(s=>{if(s.nodeName==="OPTGROUP"){const n=s,a=n.dataset.key||n.getAttribute("label"),h=n.getAttribute("label").trim(),l=e(n);Array.from(n.children).forEach(d=>{d.nodeName==="OPTION"&&i(a,h,d,n.disabled)}),Object.keys(l).length>0&&(t[a]||(t[a]={text:h,options:[]}),t[a].data=l)}else s.nodeName==="OPTION"&&i("__","__",s)}),t}var Pe=Object.defineProperty,T=(r,t,e,i)=>{for(var s=void 0,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(t,e,s)||s);return s&&Pe(t,e,s),s};let lt=null,Wt=!1;class v extends c.LitElement{constructor(){super(...arguments),this.cls="",this.stl="",this.i18n="",this["force-prevent-rerender"]=!1,this.$i18n={},this.$cls={},this.$stl={},this.$config={},this.$i=new Map,this.$template="",this.$data={},this.isRendered=!1,this.HTMLScript=null,this.HTMLIconContainer=null,this.HTMLTemplateContainer=null,this.HTMLDataSource=null,this.configObserver=null,this.dataSourceObserver=null,this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner"}get $normalizedI18n(){const t={};return Object.keys(this.$i18n).forEach(e=>{const i=this.$i18n[e];t[e]=i.includes(",")?i.split(",").map(s=>s.trim()):i}),t}$icons(t){return this.$i.get(t)}getI18nText(t,e={},i){let s=this.$i18n[t];if(!s){const n=this.tagName.toLowerCase(),a=this.$i18n[n];typeof a=="object"&&a!==null&&t in a&&(s=a[t])}return s||(s=e[t]||""),i!==void 0&&(typeof i=="number"?s=s.replace("{n}",String(i)):Object.keys(i).forEach(n=>{const a=i[n];s=s.replace(new RegExp(`\\{${n}\\}`,"g"),String(a))})),s}initializeCls(){if(this.cls){const t=ot(this.cls);typeof t=="string"?this.$cls[this["cls-default-element"]]=t:Object.keys(t).forEach(e=>{this.$cls[e]=t[e]})}}initializeStl(){if(this.stl){const t=ot(this.stl);typeof t=="string"?this.$stl[this["stl-default-element"]]=t:Object.keys(t).forEach(e=>{this.$stl[e]=t[e]})}}initializeGI18n(){if(Wt)return;Wt=!0;const t=document.getElementById("uk-i18n");if(t&&t.textContent)try{lt=JSON.parse(t.textContent)}catch(e){console.error('Failed to parse global i18n from <script id="uk-i18n">.',e),lt={}}else lt={}}initializeI18n(){this.initializeGI18n();const t=this.i18n?ot(this.i18n):{};typeof t=="object"&&t!==null&&(this.$i18n=Object.assign({},lt,t))}initializeConfig(){this.HTMLScript=this.querySelector('script[data-fn="config"][type="application/json"]')}initializeIcons(){this.HTMLIconContainer=this.querySelector('template[data-fn="icons"]')}initializeTemplate(){this.HTMLTemplateContainer=this.querySelector('template[data-fn="template"]')}initializeDataSource(){this.HTMLDataSource=this.querySelector('select[data-fn="data-source"]')}parseIcons(){if(!this.HTMLIconContainer)return;this.HTMLIconContainer.content.querySelectorAll("[data-key]").forEach(e=>{const i=e.getAttribute("data-key");if(i){const s=e.cloneNode(!0);s.removeAttribute("data-key");const n=s.outerHTML;this.$i.set(i,c.html`${Yt(n)}`)}})}parseTemplate(){this.HTMLTemplateContainer&&(this.$template=this.HTMLTemplateContainer.innerHTML.trim())}parseConfig(){if(this.HTMLScript)try{const t=this.HTMLScript.textContent;if(this.$config=t?JSON.parse(t):{},this.$config&&typeof this.$config=="object"){if("i18n"in this.$config){const e=this.$config.i18n;typeof e=="object"&&e!==null&&(this.$i18n={...this.$i18n,...e})}if("cls"in this.$config){const e=this.$config.cls;typeof e=="string"?this.$cls[this["cls-default-element"]]=e:typeof e=="object"&&e!==null&&(this.$cls={...this.$cls,...e})}if("stl"in this.$config){const e=this.$config.stl;typeof e=="string"?this.$stl[this["stl-default-element"]]=e:typeof e=="object"&&e!==null&&(this.$stl={...this.$stl,...e})}}}catch(t){console.warn(`${this.tagName.toLowerCase()}: Failed to parse config JSON:`,t),this.$config={}}}parseDataSource(){this.HTMLDataSource&&(this.$data=Le(this.HTMLDataSource))}initializeConfigObserver(){!this.HTMLScript||!this.HTMLScript.hasAttribute("data-reactive")||(this.configObserver=new MutationObserver(()=>{this.parseConfig(),this.onConfigChanged()}),this.configObserver.observe(this.HTMLScript,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}initializeDataSourceObserver(){!this.HTMLDataSource||!this.HTMLDataSource.hasAttribute("data-reactive")||(this.dataSourceObserver=new MutationObserver(()=>{this.parseDataSource(),this.onDataSourceChanged()}),this.dataSourceObserver.observe(this.HTMLDataSource,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}onConfigChanged(){}onDataSourceChanged(){}connectedCallback(){super.connectedCallback(),this["force-prevent-rerender"]&&this.querySelector("[data-host-inner]")&&(this.isRendered=!0),this.initializeI18n(),this.initializeCls(),this.initializeStl(),this.initializeConfig(),this.initializeIcons(),this.initializeTemplate(),this.initializeDataSource(),this.HTMLScript&&(this.parseConfig(),this.initializeConfigObserver()),this.HTMLIconContainer&&this.parseIcons(),this.HTMLTemplateContainer&&this.parseTemplate(),this.HTMLDataSource&&(this.parseDataSource(),this.initializeDataSourceObserver())}disconnectedCallback(){super.disconnectedCallback(),this.configObserver&&(this.configObserver.disconnect(),this.configObserver=null),this.dataSourceObserver&&(this.dataSourceObserver.disconnect(),this.dataSourceObserver=null)}shouldUpdate(t){return this["force-prevent-rerender"]&&this.isRendered?!1:super.shouldUpdate(t)}updated(t){super.updated(t),this.isRendered||(this.isRendered=!0)}createRenderRoot(){return this}}T([u({type:String})],v.prototype,"cls"),T([u({type:String})],v.prototype,"stl"),T([u({type:String})],v.prototype,"i18n"),T([u({type:Boolean})],v.prototype,"force-prevent-rerender"),T([m()],v.prototype,"$i18n"),T([m()],v.prototype,"$cls"),T([m()],v.prototype,"$stl"),T([m()],v.prototype,"$config"),T([m()],v.prototype,"$i"),T([m()],v.prototype,"$template"),T([m()],v.prototype,"$data");var He=Object.defineProperty,je=Object.getOwnPropertyDescriptor,ht=(r,t,e,i)=>{for(var s=i>1?void 0:i?je(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&He(t,e,s),s};o.Calendar=class extends Kt(N(v)){constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this["input-event"]="uk-calendar:change",this.$cls={"host-inner":"uk-cal",header:"uk-cal-header","previous-button":"uk-button uk-button-secondary uk-button-icon uk-button-small","next-button":"uk-button uk-button-secondary uk-button-icon uk-button-small",title:"uk-cal-title",jumper:"uk-cal-jumper","month-select":"uk-select uk-form-small","year-input":"uk-input uk-form-small",grid:"",weekdays:"",weekday:"",week:"",day:"","day-button":"","jumper-month":"uk-cal-jumper-month","jumper-year":"uk-cal-jumper-year","jumper-button":"uk-button uk-button-secondary uk-button-icon uk-button-small","day-outside-month":"uk-cal-oom","day-selected":"uk-active","day-today":"uk-nothing","day-marked":"uk-cal-marked","button-outside-month":"uk-nothing","button-selected":"uk-nothing","button-today":"uk-nothing","button-marked":"uk-nothing"},this.$stl={"host-inner":"",header:"","previous-button":"","next-button":"",title:"",jumper:"","month-select":"","year-input":"",grid:"",weekdays:"",weekday:"",week:"",day:"","day-button":"","jumper-month":"","jumper-year":"","jumper-button":"","day-outside-month":"","day-selected":"","day-today":"","day-marked":"","button-outside-month":"","button-selected":"","button-today":"","button-marked":""},this.defaultI18n={"prev-month":"Previous month","next-month":"Next month","prev-year":"Previous year","next-year":"Next year","select-month":"Select month","select-year":"Select year"},this.navigate=t=>{const e=t.target;if(!e?.matches("button[data-iso]"))return;const i=Array.from(this.querySelectorAll("button[data-iso]")),s=i.indexOf(e),n=this.getGridPosition(e);if(!n)return;const{rowIndex:a,colIndex:h}=n;let l;const d={ArrowLeft:()=>this.findNextEnabled(i,s-1,-1),ArrowRight:()=>this.findNextEnabled(i,s+1,1),ArrowUp:()=>this.getNextEnabledInColumn(a-1,h,-1),ArrowDown:()=>this.getNextEnabledInColumn(a+1,h,1),Home:()=>this.getRowFirstEnabledButton(a),End:()=>this.getRowLastEnabledButton(a),PageUp:t.ctrlKey||t.metaKey?()=>{this.navigateYear("prev")}:()=>{this.navigateMonth("prev")},PageDown:t.ctrlKey||t.metaKey?()=>{this.navigateYear("next")}:()=>{this.navigateMonth("next")}};if(d[t.key]){t.preventDefault();const $=d[t.key]();$&&(l=$)}else if(t.key==="Enter"||t.key===" "){t.preventDefault(),e.click();return}l?.focus()}}get $value(){return this.$active?this.$active.slice(0,10):""}get $text(){return""}initializeValue(){if(this.value)try{const t=Q(this.value);this.$active=t.toISOString(),this["view-date"]=t.toISOString().slice(0,10)}catch(t){console.error(`[uk-calendar] Invalid date format for value: "${this.value}".`,t)}else this.today&&(this.$active=this.getTodayUTC().toISOString())}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.navigate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.navigate)}updated(t){t.has("$active")&&(this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(`button[data-iso="${this.$active}"]`);e&&this.isDirty&&e.focus()}),this.emit())}findNextEnabled(t,e,i){for(let s=e;s>=0&&s<t.length;s+=i)if(!t[s].disabled)return t[s]}getNextEnabledInColumn(t,e,i){const s=Array.from(this.querySelectorAll("tr"));for(let n=t;n>=0&&n<s.length;n+=i){const a=s[n]?.children[e]?.querySelector("button[data-iso]");if(a&&!a.disabled)return a}}getRowFirstEnabledButton(t){const e=this.querySelectorAll("tr")[t];return Array.from(e?.querySelectorAll("button[data-iso]")||[]).find(i=>!i.disabled)}getRowLastEnabledButton(t){const e=this.querySelectorAll("tr")[t];return Array.from(e?.querySelectorAll("button[data-iso]")||[]).reverse().find(i=>!i.disabled)}getGridPosition(t){const e=t.closest("td"),i=e?.closest("tr");return!i||!e?null:{rowIndex:Array.from(this.querySelectorAll("tr")).indexOf(i),colIndex:Array.from(i.children).indexOf(e)}}select(t){this.$active=t.ISOString,t.month!=="current"&&(this["view-date"]=t.ISOString.slice(0,10)),this.isDirty||(this.isDirty=!0)}navigateYear(t){const[e,i,s]=this["view-date"].split("-"),n=t==="prev"?parseInt(e)-1:parseInt(e)+1;this["view-date"]=`${n}-${i}-${s}`}navigateMonth(t){const[e,i]=this["view-date"].split("-").map(Number);let s=i,n=e;t==="prev"?i===1?(s=12,n-=1):s-=1:i===12?(s=1,n+=1):s+=1,this["view-date"]=`${n}-${s.toString().padStart(2,"0")}-01`}selectMonth(t){const[e]=this["view-date"].split("-");this["view-date"]=`${e}-${(t+1).toString().padStart(2,"0")}-01`}setYear(t){if(/^\d{4}$/.test(t)){const[,e,i]=this["view-date"].split("-");this["view-date"]=`${t}-${e}-${i}`}}get weekdays(){const t=this.lang||void 0,e=[];for(let i=0;i<7;i++){const s=(this["starts-with"]+i)%7,n=this.createUTCDate(2023,0,1+s);e.push(n.toLocaleDateString(t,{weekday:this["weekday-format"],timeZone:"UTC"}))}return e}get calendar(){const[t,e]=this["view-date"].split("-").map(Number),i=this.getTodayUTC().toISOString().slice(0,10),s=this.parseDates(this["marked-dates"]),n=new Set(this.parseDates(this["disabled-dates"])),a=this.createUTCDate(t,e-1,1),h=this.createUTCDate(t,e,0).getUTCDate(),l=this.createUTCDate(t,e-1,0).getUTCDate();let d=(a.getUTCDay()-this["starts-with"]+7)%7;const $=[];let p=1,f=l-d+1,g=1;for(let b=0;b<6;b++){const k=[];for(let z=0;z<7;z++){let B,ct,dt;b===0&&z<d?(B=this.createUTCDate(t,e-2,f),ct=f,dt="prev",f++):p>h?(B=this.createUTCDate(t,e,g),ct=g,dt="next",g++):(B=this.createUTCDate(t,e-1,p),ct=p,dt="current",p++);const St=B.toISOString(),_t=St.slice(0,10);k.push({date:ct,month:dt,isToday:_t===i,isDisabled:n.has(_t)||!this.isDateInRange(St),isMarked:s.includes(_t),ISOString:St})}if($.push(k),p>h&&b>=4)break}return $}render(){return c.html`
56
56
  <div
57
57
  data-host-inner
58
58
  class=${this.$cls["host-inner"]}
@@ -68,7 +68,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
68
68
  style=${this.$stl.weekdays}
69
69
  role="row"
70
70
  >
71
- ${V(this.weekdays,t=>t,t=>c.html`<th
71
+ ${R(this.weekdays,t=>t,t=>c.html`<th
72
72
  class=${this.$cls.weekday}
73
73
  style=${this.$stl.weekday}
74
74
  role="columnheader"
@@ -79,7 +79,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
79
79
  </tr>
80
80
  </thead>
81
81
  <tbody>
82
- ${V(this.calendar,t=>t[0].ISOString,t=>this.renderWeek(t))}
82
+ ${R(this.calendar,t=>t[0].ISOString,t=>this.renderWeek(t))}
83
83
  </tbody>
84
84
  </table>
85
85
  ${this.renderHidden()}
@@ -114,7 +114,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
114
114
  </button>
115
115
  `}
116
116
  </div>
117
- `}renderJumper(){const{year:t,month:e}=this.getTimestampComponent(this.$viewDate),i=this.lang||void 0,s=Array.from({length:12},(d,$)=>this.createUTCDate(2e3,$,15).toLocaleDateString(i,{month:"long",timeZone:"UTC"})),n=this.getI18nText("prev-month",this.defaultI18n),r=this.getI18nText("next-month",this.defaultI18n),l=this.getI18nText("prev-year",this.defaultI18n),h=this.getI18nText("next-year",this.defaultI18n);return c.html`
117
+ `}renderJumper(){const{year:t,month:e}=this.getTimestampComponent(this.$viewDate),i=this.lang||void 0,s=Array.from({length:12},(d,$)=>this.createUTCDate(2e3,$,15).toLocaleDateString(i,{month:"long",timeZone:"UTC"})),n=this.getI18nText("prev-month",this.defaultI18n),a=this.getI18nText("next-month",this.defaultI18n),h=this.getI18nText("prev-year",this.defaultI18n),l=this.getI18nText("next-year",this.defaultI18n);return c.html`
118
118
  <div class=${this.$cls.jumper} style=${this.$stl.jumper}>
119
119
  <div
120
120
  class="${this.$cls["jumper-month"]}"
@@ -143,7 +143,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
143
143
  style=${this.$stl["jumper-button"]}
144
144
  @click=${()=>this.navigateMonth("next")}
145
145
  type="button"
146
- aria-label=${r}
146
+ aria-label=${a}
147
147
  >
148
148
  ${this.$icons("chevron-right")}
149
149
  </button>
@@ -157,7 +157,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
157
157
  style=${this.$stl["jumper-button"]}
158
158
  @click=${()=>this.navigateYear("prev")}
159
159
  type="button"
160
- aria-label=${l}
160
+ aria-label=${h}
161
161
  >
162
162
  ${this.$icons("chevron-left")}
163
163
  </button>
@@ -175,7 +175,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
175
175
  style=${this.$stl["jumper-button"]}
176
176
  @click=${()=>this.navigateYear("next")}
177
177
  type="button"
178
- aria-label=${h}
178
+ aria-label=${l}
179
179
  >
180
180
  ${this.$icons("chevron-right")}
181
181
  </button>
@@ -183,17 +183,17 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
183
183
  </div>
184
184
  `}renderWeek(t){return c.html`
185
185
  <tr class=${this.$cls.week} style=${this.$stl.week} role="row">
186
- ${V(t,e=>e.ISOString,e=>this.renderDay(e))}
186
+ ${R(t,e=>e.ISOString,e=>this.renderDay(e))}
187
187
  </tr>
188
- `}renderDay(t){const e=this.$active===t.ISOString,i=new Date(t.ISOString),s=this.lang||void 0,n=i.toLocaleDateString(s,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),r={[this.$cls.day]:!0,[this.$cls["day-outside-month"]]:t.month!=="current",[this.$cls["day-selected"]]:e,[this.$cls["day-today"]]:t.isToday,[this.$cls["day-marked"]]:t.isMarked},l={[this.$cls["day-button"]]:!0,[this.$cls["button-selected"]]:e,[this.$cls["button-today"]]:t.isToday,[this.$cls["button-marked"]]:t.isMarked,[this.$cls["button-outside-month"]]:t.month!=="current"};return c.html`
188
+ `}renderDay(t){const e=this.$active===t.ISOString,i=new Date(t.ISOString),s=this.lang||void 0,n=i.toLocaleDateString(s,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),a={[this.$cls.day]:!0,[this.$cls["day-outside-month"]]:t.month!=="current",[this.$cls["day-selected"]]:e,[this.$cls["day-today"]]:t.isToday,[this.$cls["day-marked"]]:t.isMarked},h={[this.$cls["day-button"]]:!0,[this.$cls["button-selected"]]:e,[this.$cls["button-today"]]:t.isToday,[this.$cls["button-marked"]]:t.isMarked,[this.$cls["button-outside-month"]]:t.month!=="current"};return c.html`
189
189
  <td
190
- class=${Kt(r)}
190
+ class=${zt(a)}
191
191
  style=${this.$stl.day}
192
192
  role="gridcell"
193
193
  aria-selected=${e?"true":"false"}
194
194
  >
195
195
  <button
196
- class=${Kt(l)}
196
+ class=${zt(h)}
197
197
  style=${this.$stl["day-button"]}
198
198
  data-iso=${t.ISOString}
199
199
  @click=${()=>this.select(t)}
@@ -206,7 +206,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
206
206
  ${t.date}
207
207
  </button>
208
208
  </td>
209
- `}},ut([m()],o.Calendar.prototype,"$active",2),ut([m()],o.Calendar.prototype,"$cls",2),ut([m()],o.Calendar.prototype,"$stl",2),o.Calendar=ut([I("uk-calendar")],o.Calendar);var Ue=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,x=(a,t,e,i)=>{for(var s=i>1?void 0:i?Ve(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&Ue(t,e,s),s};o.InputDate=class extends Yt(N(v)){constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["input-event"]="uk-input-date:change",this["display-format"]="MMMM DD, YYYY",this["with-time"]=!1,this.clock="12h",this["require-time"]=!1,this.drop="mode: click; animation: uk-animation-slide-top-small;",this.$cls={container:"",button:"","button-text":"",icon:"",dropdown:"uk-datepicker-dropdown",calendar:"","time-wrapper":"uk-datepicker-time",time:""},this.$stl={container:"",button:"","button-text":"",icon:"",dropdown:"",calendar:"","time-wrapper":"",time:""},this.defaultI18n={"button-label":"Select date","dialog-label":"Date picker",selected:"selected",placeholder:"Select a date","placeholder-with-time":"Select a date and time"}}get $value(){return this.$date&&this.$time?`${this.$date}T${this.$time}`:this.$date?this.$date:""}get $text(){if(this.$value)try{const t=this.$value.includes("T")?new Date(this.$value):new Date(this.$value+"T00:00:00");let e=this["display-format"];if(this["with-time"]&&this.$time){const i=this.clock==="12h"?"h:mm A":"HH:mm";e=`${this["display-format"]} ${i}`}return De(t,e,this.lang)}catch(t){return console.error("[uk-input-date] Failed to format date:",t),this.$value}return this.placeholder?this.placeholder:this.getI18nText(this["with-time"]?"placeholder-with-time":"placeholder",this.defaultI18n)}connectedCallback(){super.connectedCallback()}firstUpdated(t){super.firstUpdated?.(t),this.renderRoot.querySelector("uk-calendar")?.addEventListener("uk-calendar:change",e=>{this.$date=e.detail.value}),this["with-time"]&&this.renderRoot.querySelector("uk-input-time")?.addEventListener("uk-input-time:input",e=>{this.$time=e.detail.value})}updated(t){super.updated(t),(t.has("$date")||t.has("$time"))&&this.emit()}initializeValue(){if(this.value)try{if(tt(this.value),!this.value.includes("T"))this.$date=this.value;else{const[e,i]=this.value.split("T");this.$date=e,this.$time=i}}catch(t){console.error("[uk-input-date] Failed to initialize date value:",t)}}get buttonLabel(){const t=this.getI18nText("button-text",this.defaultI18n);return this.$value?`${t}, ${this.getI18nText("selected",this.defaultI18n)}: ${this.$text}`:t}render(){const t=this.getI18nText("dialog-label",this.defaultI18n);return c.html`
209
+ `}},ht([m()],o.Calendar.prototype,"$active",2),ht([m()],o.Calendar.prototype,"$cls",2),ht([m()],o.Calendar.prototype,"$stl",2),o.Calendar=ht([_("uk-calendar")],o.Calendar);var Ue=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,x=(r,t,e,i)=>{for(var s=i>1?void 0:i?Re(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Ue(t,e,s),s};o.InputDate=class extends Kt(N(v)){constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["input-event"]="uk-input-date:change",this["display-format"]="MMMM DD, YYYY",this["with-time"]=!1,this.clock="12h",this["require-time"]=!1,this.drop="mode: click; animation: uk-animation-slide-top-small;",this.$cls={container:"",button:"","button-text":"",icon:"",dropdown:"uk-datepicker-dropdown",calendar:"","time-wrapper":"uk-datepicker-time",time:""},this.$stl={container:"",button:"","button-text":"",icon:"",dropdown:"",calendar:"","time-wrapper":"",time:""},this.defaultI18n={"button-label":"Select date","dialog-label":"Date picker",selected:"selected",placeholder:"Select a date","placeholder-with-time":"Select a date and time"}}get $value(){return this.$date&&this.$time?`${this.$date}T${this.$time}`:this.$date?this.$date:""}get $text(){if(this.$value)try{const t=this.$value.includes("T")?new Date(this.$value):new Date(this.$value+"T00:00:00");let e=this["display-format"];if(this["with-time"]&&this.$time){const i=this.clock==="12h"?"h:mm A":"HH:mm";e=`${this["display-format"]} ${i}`}return De(t,e,this.lang)}catch(t){return console.error("[uk-input-date] Failed to format date:",t),this.$value}return this.placeholder?this.placeholder:this.getI18nText(this["with-time"]?"placeholder-with-time":"placeholder",this.defaultI18n)}connectedCallback(){super.connectedCallback()}firstUpdated(t){super.firstUpdated?.(t),this.renderRoot.querySelector("uk-calendar")?.addEventListener("uk-calendar:change",e=>{this.$date=e.detail.value}),this["with-time"]&&this.renderRoot.querySelector("uk-input-time")?.addEventListener("uk-input-time:input",e=>{this.$time=e.detail.value})}updated(t){super.updated(t),(t.has("$date")||t.has("$time"))&&this.emit()}initializeValue(){if(this.value)try{if(Q(this.value),!this.value.includes("T"))this.$date=this.value;else{const[e,i]=this.value.split("T");this.$date=e,this.$time=i}}catch(t){console.error("[uk-input-date] Failed to initialize date value:",t)}}get buttonLabel(){const t=this.getI18nText("button-text",this.defaultI18n);return this.$value?`${t}, ${this.getI18nText("selected",this.defaultI18n)}: ${this.$text}`:t}render(){const t=this.getI18nText("dialog-label",this.defaultI18n);return c.html`
210
210
  <div
211
211
  data-host-inner
212
212
  class="${this.$cls.container}"
@@ -276,7 +276,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
276
276
  .now=${this.today}
277
277
  ></uk-input-time>
278
278
  </div>
279
- `:c.nothing}},x([u({type:String,attribute:"display-format"})],o.InputDate.prototype,"display-format",2),x([u({type:Boolean,attribute:"with-time"})],o.InputDate.prototype,"with-time",2),x([u({type:String})],o.InputDate.prototype,"clock",2),x([u({type:Boolean,attribute:"require-time"})],o.InputDate.prototype,"require-time",2),x([u({type:String})],o.InputDate.prototype,"drop",2),x([m()],o.InputDate.prototype,"$date",2),x([m()],o.InputDate.prototype,"$time",2),x([m()],o.InputDate.prototype,"$cls",2),x([m()],o.InputDate.prototype,"$stl",2),o.InputDate=x([I("uk-input-date")],o.InputDate);var Ne=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,L=(a,t,e,i)=>{for(var s=i>1?void 0:i?ze(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&Ne(t,e,s),s};o.InputPin=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="wrapper",this["stl-default-element"]="wrapper",this["input-event"]="uk-input-pin:change",this.autofocus=!1,this.length=6,this["input-mode"]="numeric",this.defaultI18n={label:"PIN Code",description:"Enter {length}-digit code","field-label":"Digit {n} of {total}",loaded:"PIN input ready",complete:"PIN entry complete","field-filled":"Field {n} filled","invalid-character":"Invalid character entered"},this.$cls={"host-inner":"",wrapper:"uk-input-pin",input:"",label:"sr-only",description:"sr-only"},this.$stl={container:"",wrapper:"",input:"",label:"",description:""},this.$pin="",this.$inputs=null,this.groupId=""}get $value(){return this.$pin}get $text(){return""}initializeValue(){if(this.groupId=this.id?`${this.id}-group`:`pin-${Math.random().toString(36).substr(2,9)}`,this.value){const t=this.value.substring(0,this.length);if(this.pattern&&!new RegExp(`^[${this.pattern}]*$`).test(t)){console.warn(`[uk-input-pin] Initial value "${this.value}" does not match pattern "${this.pattern}"`);return}this.$pin=t}}firstUpdated(t){this.$inputs=this.renderRoot.querySelectorAll("input[data-pin-input]"),this.setupPasteHandlers(),this.populateInitialValue(),this.announceToScreenReader(this.getI18nText("loaded",this.defaultI18n))}populateInitialValue(){if(!(!this.$pin||!this.$inputs)&&(this.$pin.split("").forEach((t,e)=>{const i=this.$inputs[e];i&&(i.value=t,i.disabled=!1)}),this.$pin.length<this.length)){const t=this.$inputs[this.$pin.length];t&&(t.disabled=!1)}}setupPasteHandlers(){this.$inputs?.forEach(t=>{t.addEventListener("paste",e=>{e.preventDefault();const i=e.clipboardData;i&&this.handlePaste(i.getData("Text"))})})}handlePaste(t){if(!this.$inputs)return;const e=t.substring(0,this.length);if(this.pattern&&!new RegExp(`^[${this.pattern}]*$`).test(e)){this.announceToScreenReader(this.getI18nText("invalid-character",this.defaultI18n));return}this.$pin=e,e.split("").forEach((i,s)=>{const n=this.$inputs[s];n.disabled=!1,n.value=i});for(let i=e.length;i<this.length;i++){const s=this.$inputs[i];s.value="",s.disabled=i!==e.length}if(e.length<this.length){const i=this.$inputs[e.length];i.disabled=!1,i.focus(),this.announceToScreenReader(this.getI18nText("field-filled",this.defaultI18n,{n:e.length+1}))}else this.$inputs[this.$focus]?.blur(),this.announceToScreenReader(this.getI18nText("complete",this.defaultI18n)),this.emitComplete();this.emit()}handleKeyNavigation(t,e){if(!(this.$focus===void 0||!this.$inputs))switch(t.key){case"Backspace":if(e.value.length===0&&this.$focus>0){t.preventDefault();const i=this.$inputs[this.$focus-1];i.focus(),i.select(),e.disabled=!0}break;case"Delete":if(e.value.length===0){t.preventDefault();const i=this.$inputs[this.$focus+1];i&&(i.focus(),i.setSelectionRange(0,0))}break;case"ArrowLeft":if(t.preventDefault(),this.$focus>0){const i=this.$inputs[this.$focus-1];i.focus(),i.setSelectionRange(1,1)}break;case"ArrowRight":if(t.preventDefault(),this.$focus<this.length-1){const i=this.$inputs[this.$focus+1];i.disabled||(i.focus(),i.setSelectionRange(0,0))}break;case"Home":t.preventDefault(),this.$inputs[0]?.focus();break;case"End":t.preventDefault();for(let i=this.length-1;i>=0;i--){const s=this.$inputs[i];if(!s.disabled){s.focus();break}}break}}handleInput(t,e){if(!this.$inputs)return;const i=t.target;if(this.pattern&&i.value&&!new RegExp(`[${this.pattern}]`).test(i.value)){i.value="",this.announceToScreenReader(this.getI18nText("invalid-character",this.defaultI18n));return}if(i.value.length===1)if(e<this.length-1){const s=this.$inputs[e+1];s.disabled=!1,s.focus(),this.announceToScreenReader(this.getI18nText("field-filled",this.defaultI18n,{n:e+2}))}else i.blur(),this.announceToScreenReader(this.getI18nText("complete",this.defaultI18n)),this.emitComplete();this.updatePinValue(),this.emit()}updatePinValue(){if(!this.$inputs)return;let t="";this.$inputs.forEach(e=>{t+=e.value}),this.$pin=t}emitComplete(){this.dispatchEvent(new CustomEvent("uk-input-pin:complete",{detail:{value:this.$value},bubbles:!0,composed:!0}))}announceToScreenReader(t){if(!t)return;const e=this.renderRoot.querySelector('[role="status"]');e&&(e.textContent=t,setTimeout(()=>{e.textContent=""},1e3))}get groupLabel(){return this.getI18nText("label",this.defaultI18n)}get groupDescription(){return this.getI18nText("description",this.defaultI18n,{length:this.length})}getFieldLabel(t){return this.getI18nText("field-label",this.defaultI18n,{n:t+1,total:this.length})}renderInput(t){const e=this.getFieldLabel(t);return c.html`
279
+ `:c.nothing}},x([u({type:String,attribute:"display-format"})],o.InputDate.prototype,"display-format",2),x([u({type:Boolean,attribute:"with-time"})],o.InputDate.prototype,"with-time",2),x([u({type:String})],o.InputDate.prototype,"clock",2),x([u({type:Boolean,attribute:"require-time"})],o.InputDate.prototype,"require-time",2),x([u({type:String})],o.InputDate.prototype,"drop",2),x([m()],o.InputDate.prototype,"$date",2),x([m()],o.InputDate.prototype,"$time",2),x([m()],o.InputDate.prototype,"$cls",2),x([m()],o.InputDate.prototype,"$stl",2),o.InputDate=x([_("uk-input-date")],o.InputDate);var Ne=Object.defineProperty,Ve=Object.getOwnPropertyDescriptor,D=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ve(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Ne(t,e,s),s};o.InputPin=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="wrapper",this["stl-default-element"]="wrapper",this["input-event"]="uk-input-pin:change",this.autofocus=!1,this.length=6,this["input-mode"]="numeric",this.defaultI18n={label:"PIN Code",description:"Enter {length}-digit code","field-label":"Digit {n} of {total}",loaded:"PIN input ready",complete:"PIN entry complete","field-filled":"Field {n} filled","invalid-character":"Invalid character entered"},this.$cls={"host-inner":"",wrapper:"uk-input-pin",input:"",label:"sr-only",description:"sr-only"},this.$stl={container:"",wrapper:"",input:"",label:"",description:""},this.$pin="",this.$inputs=null,this.groupId=""}get $value(){return this.$pin}get $text(){return""}initializeValue(){if(this.groupId=this.id?`${this.id}-group`:`pin-${Math.random().toString(36).substr(2,9)}`,this.value){const t=this.value.substring(0,this.length);if(this.pattern&&!new RegExp(`^[${this.pattern}]*$`).test(t)){console.warn(`[uk-input-pin] Initial value "${this.value}" does not match pattern "${this.pattern}"`);return}this.$pin=t}}firstUpdated(t){this.$inputs=this.renderRoot.querySelectorAll("input[data-pin-input]"),this.setupPasteHandlers(),this.populateInitialValue(),this.announceToScreenReader(this.getI18nText("loaded",this.defaultI18n))}populateInitialValue(){if(!(!this.$pin||!this.$inputs)&&(this.$pin.split("").forEach((t,e)=>{const i=this.$inputs[e];i&&(i.value=t,i.disabled=!1)}),this.$pin.length<this.length)){const t=this.$inputs[this.$pin.length];t&&(t.disabled=!1)}}setupPasteHandlers(){this.$inputs?.forEach(t=>{t.addEventListener("paste",e=>{e.preventDefault();const i=e.clipboardData;i&&this.handlePaste(i.getData("Text"))})})}handlePaste(t){if(!this.$inputs)return;const e=t.substring(0,this.length);if(this.pattern&&!new RegExp(`^[${this.pattern}]*$`).test(e)){this.announceToScreenReader(this.getI18nText("invalid-character",this.defaultI18n));return}this.$pin=e,e.split("").forEach((i,s)=>{const n=this.$inputs[s];n.disabled=!1,n.value=i});for(let i=e.length;i<this.length;i++){const s=this.$inputs[i];s.value="",s.disabled=i!==e.length}if(e.length<this.length){const i=this.$inputs[e.length];i.disabled=!1,i.focus(),this.announceToScreenReader(this.getI18nText("field-filled",this.defaultI18n,{n:e.length+1}))}else this.$inputs[this.$focus]?.blur(),this.announceToScreenReader(this.getI18nText("complete",this.defaultI18n)),this.emitComplete();this.emit()}handleKeyNavigation(t,e){if(!(this.$focus===void 0||!this.$inputs))switch(t.key){case"Backspace":if(e.value.length===0&&this.$focus>0){t.preventDefault();const i=this.$inputs[this.$focus-1];i.focus(),i.select(),e.disabled=!0}break;case"Delete":if(e.value.length===0){t.preventDefault();const i=this.$inputs[this.$focus+1];i&&(i.focus(),i.setSelectionRange(0,0))}break;case"ArrowLeft":if(t.preventDefault(),this.$focus>0){const i=this.$inputs[this.$focus-1];i.focus(),i.setSelectionRange(1,1)}break;case"ArrowRight":if(t.preventDefault(),this.$focus<this.length-1){const i=this.$inputs[this.$focus+1];i.disabled||(i.focus(),i.setSelectionRange(0,0))}break;case"Home":t.preventDefault(),this.$inputs[0]?.focus();break;case"End":t.preventDefault();for(let i=this.length-1;i>=0;i--){const s=this.$inputs[i];if(!s.disabled){s.focus();break}}break}}handleInput(t,e){if(!this.$inputs)return;const i=t.target;if(this.pattern&&i.value&&!new RegExp(`[${this.pattern}]`).test(i.value)){i.value="",this.announceToScreenReader(this.getI18nText("invalid-character",this.defaultI18n));return}if(i.value.length===1)if(e<this.length-1){const s=this.$inputs[e+1];s.disabled=!1,s.focus(),this.announceToScreenReader(this.getI18nText("field-filled",this.defaultI18n,{n:e+2}))}else i.blur(),this.announceToScreenReader(this.getI18nText("complete",this.defaultI18n)),this.emitComplete();this.updatePinValue(),this.emit()}updatePinValue(){if(!this.$inputs)return;let t="";this.$inputs.forEach(e=>{t+=e.value}),this.$pin=t}emitComplete(){this.dispatchEvent(new CustomEvent("uk-input-pin:complete",{detail:{value:this.$value},bubbles:!0,composed:!0}))}announceToScreenReader(t){if(!t)return;const e=this.renderRoot.querySelector('[role="status"]');e&&(e.textContent=t,setTimeout(()=>{e.textContent=""},1e3))}get groupLabel(){return this.getI18nText("label",this.defaultI18n)}get groupDescription(){return this.getI18nText("description",this.defaultI18n,{length:this.length})}getFieldLabel(t){return this.getI18nText("field-label",this.defaultI18n,{n:t+1,total:this.length})}renderInput(t){const e=this.getFieldLabel(t);return c.html`
280
280
  <input
281
281
  class=${this.$cls.input}
282
282
  style=${this.$stl.input}
@@ -337,10 +337,10 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
337
337
 
338
338
  ${this.renderHidden()}
339
339
  </div>
340
- `}},L([u({type:Boolean})],o.InputPin.prototype,"autofocus",2),L([u({type:Number})],o.InputPin.prototype,"length",2),L([u({type:String,attribute:"input-mode"})],o.InputPin.prototype,"input-mode",2),L([u({type:String})],o.InputPin.prototype,"pattern",2),L([m()],o.InputPin.prototype,"$cls",2),L([m()],o.InputPin.prototype,"$stl",2),L([m()],o.InputPin.prototype,"$focus",2),L([m()],o.InputPin.prototype,"$pin",2),o.InputPin=L([I("uk-input-pin")],o.InputPin);var Ke=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,M=(a,t,e,i)=>{for(var s=i>1?void 0:i?Be(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&Ke(t,e,s),s};o.InputRange=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this["input-event"]="uk-input-range:input",this.multiple=!1,this.min=0,this.max=100,this.step=1,this.label=!1,this["label-position"]="top",this["aria-label"]="",this._lowValue=this.min,this._highValue=this.max,this._label=!1,this.activeKnob=null,this.trackElement=null,this.isDragging=!1,this.defaultI18n={"aria-value-text":"Value: {value}","aria-range-text":"Range from {low} to {high}","low-knob-label":"Minimum value","high-knob-label":"Maximum value","aria-label":"Range slider"},this.$cls={"host-inner":"uk-input-range",runnable:"",fill:"",knob:"","knob-low":"","knob-high":"","knob-dragging":"",label:"","label-top":"","label-bottom":""},this.$stl={"host-inner":"",runnable:"",fill:"",knob:"","knob-low":"","knob-high":"",label:"","label-top":"","label-bottom":""},this.preventScrolling=t=>{this.isDragging&&t.preventDefault()},this.onPointerStart=(t,e)=>{this.disabled||(t.preventDefault(),t.stopPropagation(),this.activeKnob=e,this.isDragging=!0,t.currentTarget.focus(),document.addEventListener("pointermove",this.onPointerMove,{passive:!1}),document.addEventListener("pointerup",this.onPointerEnd),document.addEventListener("pointercancel",this.onPointerEnd),document.addEventListener("touchmove",this.onTouchMove,{passive:!1}),document.addEventListener("touchend",this.onPointerEnd),document.addEventListener("touchcancel",this.onPointerEnd))},this.onPointerMove=t=>{if(!this.isDragging||!this.activeKnob||this.disabled)return;t.preventDefault();const e=this.positionToValue(t.clientX);this.handleValueChange(this.activeKnob,e)},this.onTouchMove=t=>{if(!this.isDragging||!this.activeKnob||this.disabled)return;t.preventDefault();const e=this.positionToValue(t.touches[0].clientX);this.handleValueChange(this.activeKnob,e)},this.onPointerEnd=()=>{this.isDragging=!1,this.activeKnob=null,this.cleanupEventListeners()},this.onKeyDown=(t,e)=>{if(this.disabled)return;const i=e==="low"?this._lowValue:this._highValue;let s=0;switch(t.key){case"ArrowRight":case"ArrowUp":s=this.step;break;case"ArrowLeft":case"ArrowDown":s=-this.step;break;case"Home":this.handleValueChange(e,e==="low"?this.min:this._lowValue),t.preventDefault();return;case"End":this.handleValueChange(e,e==="high"?this.max:this._highValue),t.preventDefault();return;case"PageUp":s=this.step*10;break;case"PageDown":s=-this.step*10;break;default:return}s&&(t.preventDefault(),this.handleValueChange(e,i+s))}}get $text(){return""}get $value(){return this.multiple?this.value.split(",").map(t=>t.trim()):this.value}get precision(){const t=this.step.toString();return t.includes(".")?t.split(".")[1].length:0}connectedCallback(){super.connectedCallback();const t=this.getAttribute("label");this._label=t===""?!0:t||!1,this.addEventListener("touchstart",this.preventScrolling,{passive:!1})}disconnectedCallback(){this.removeEventListener("touchstart",this.preventScrolling),this.cleanupEventListeners(),super.disconnectedCallback?.()}updated(t){(t.has("value")||t.has("multiple"))&&this.parseValue()}initializeValue(){this.value?this.parseValue():(this._lowValue=this.min,this._highValue=this.max,this.value=this.multiple?`${this.formatValue(this._lowValue)},${this.formatValue(this._highValue)}`:this.formatValue(this._lowValue))}parseValue(){if(this.multiple){const[t,e]=this.value.split(",").map(i=>parseFloat(i));t!==void 0&&e!==void 0&&(this._lowValue=this.clamp(t),this._highValue=this.clamp(e))}else this._lowValue=this.clamp(parseFloat(this.value))}formatValue(t){return t.toFixed(this.precision)}clamp(t){const e=Math.min(Math.max(t,this.min),this.max);return parseFloat(e.toFixed(this.precision))}valueToPercent(t){return(t-this.min)/(this.max-this.min)*100}positionToValue(t){this.trackElement||(this.trackElement=this.querySelector("[data-range-track]"));const e=this.trackElement.getBoundingClientRect(),i=Math.max(0,Math.min(1,(t-e.left)/e.width));return this.min+i*(this.max-this.min)}updateValue(){this.value=this.multiple?`${this.formatValue(this._lowValue)},${this.formatValue(this._highValue)}`:this.formatValue(this._lowValue),this.emit()}handleValueChange(t,e){const i=Math.round(e/this.step)*this.step,s=parseFloat(i.toFixed(this.precision));e=this.clamp(s),t==="low"?this._lowValue=this.multiple?Math.min(e,this._highValue):e:this._highValue=Math.max(e,this._lowValue),this.updateValue(),this.requestUpdate()}cleanupEventListeners(){document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerEnd),document.removeEventListener("pointercancel",this.onPointerEnd),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onPointerEnd),document.removeEventListener("touchcancel",this.onPointerEnd)}getAriaValueText(t){return this.multiple?this.getI18nText("aria-range-text",this.defaultI18n,{low:this.formatValue(this._lowValue),high:this.formatValue(this._highValue)}):this.getI18nText("aria-value-text",this.defaultI18n,{value:this.formatValue(t)})}getKnobAriaLabel(t){const e=t==="low"?"low-knob-label":"high-knob-label";return this.getI18nText(e,this.defaultI18n)}renderKnob(t){const e=t==="low"?this._lowValue:this._highValue,i=this.valueToPercent(e),s=t==="low"?this.min:this._lowValue,n=t==="low"?this.multiple?this._highValue:this.max:this.max,r=this.isDragging&&this.activeKnob===t,l=[this.$cls.knob||"uk-input-range-knob",this.$cls[t==="low"?"knob-low":"knob-high"]||"",r&&this.$cls["knob-dragging"]||""].filter(Boolean).join(" "),h=this["label-position"]==="top"?this.$cls["label-top"]||"uk-input-range-label-top":this.$cls["label-bottom"]||"uk-input-range-label-bottom";return c.html`
340
+ `}},D([u({type:Boolean})],o.InputPin.prototype,"autofocus",2),D([u({type:Number})],o.InputPin.prototype,"length",2),D([u({type:String,attribute:"input-mode"})],o.InputPin.prototype,"input-mode",2),D([u({type:String})],o.InputPin.prototype,"pattern",2),D([m()],o.InputPin.prototype,"$cls",2),D([m()],o.InputPin.prototype,"$stl",2),D([m()],o.InputPin.prototype,"$focus",2),D([m()],o.InputPin.prototype,"$pin",2),o.InputPin=D([_("uk-input-pin")],o.InputPin);var ze=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,E=(r,t,e,i)=>{for(var s=i>1?void 0:i?Be(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&ze(t,e,s),s};o.InputRange=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this["input-event"]="uk-input-range:input",this.multiple=!1,this.min=0,this.max=100,this.step=1,this.label=!1,this["label-position"]="top",this["aria-label"]="",this._lowValue=this.min,this._highValue=this.max,this._label=!1,this.activeKnob=null,this.trackElement=null,this.isDragging=!1,this.defaultI18n={"aria-value-text":"Value: {value}","aria-range-text":"Range from {low} to {high}","low-knob-label":"Minimum value","high-knob-label":"Maximum value","aria-label":"Range slider"},this.$cls={"host-inner":"uk-input-range",runnable:"",fill:"",knob:"","knob-low":"","knob-high":"","knob-dragging":"",label:"","label-top":"","label-bottom":""},this.$stl={"host-inner":"",runnable:"",fill:"",knob:"","knob-low":"","knob-high":"",label:"","label-top":"","label-bottom":""},this.preventScrolling=t=>{this.isDragging&&t.preventDefault()},this.onPointerStart=(t,e)=>{this.disabled||(t.preventDefault(),t.stopPropagation(),this.activeKnob=e,this.isDragging=!0,t.currentTarget.focus(),document.addEventListener("pointermove",this.onPointerMove,{passive:!1}),document.addEventListener("pointerup",this.onPointerEnd),document.addEventListener("pointercancel",this.onPointerEnd),document.addEventListener("touchmove",this.onTouchMove,{passive:!1}),document.addEventListener("touchend",this.onPointerEnd),document.addEventListener("touchcancel",this.onPointerEnd))},this.onPointerMove=t=>{if(!this.isDragging||!this.activeKnob||this.disabled)return;t.preventDefault();const e=this.positionToValue(t.clientX);this.handleValueChange(this.activeKnob,e)},this.onTouchMove=t=>{if(!this.isDragging||!this.activeKnob||this.disabled)return;t.preventDefault();const e=this.positionToValue(t.touches[0].clientX);this.handleValueChange(this.activeKnob,e)},this.onPointerEnd=()=>{this.isDragging=!1,this.activeKnob=null,this.cleanupEventListeners()},this.onKeyDown=(t,e)=>{if(this.disabled)return;const i=e==="low"?this._lowValue:this._highValue;let s=0;switch(t.key){case"ArrowRight":case"ArrowUp":s=this.step;break;case"ArrowLeft":case"ArrowDown":s=-this.step;break;case"Home":this.handleValueChange(e,e==="low"?this.min:this._lowValue),t.preventDefault();return;case"End":this.handleValueChange(e,e==="high"?this.max:this._highValue),t.preventDefault();return;case"PageUp":s=this.step*10;break;case"PageDown":s=-this.step*10;break;default:return}s&&(t.preventDefault(),this.handleValueChange(e,i+s))}}get $text(){return""}get $value(){return this.multiple?this.value.split(",").map(t=>t.trim()):this.value}get precision(){const t=this.step.toString();return t.includes(".")?t.split(".")[1].length:0}connectedCallback(){super.connectedCallback();const t=this.getAttribute("label");this._label=t===""?!0:t||!1,this.addEventListener("touchstart",this.preventScrolling,{passive:!1})}disconnectedCallback(){this.removeEventListener("touchstart",this.preventScrolling),this.cleanupEventListeners(),super.disconnectedCallback?.()}updated(t){(t.has("value")||t.has("multiple"))&&this.parseValue()}initializeValue(){this.value?this.parseValue():(this._lowValue=this.min,this._highValue=this.max,this.value=this.multiple?`${this.formatValue(this._lowValue)},${this.formatValue(this._highValue)}`:this.formatValue(this._lowValue))}parseValue(){if(this.multiple){const[t,e]=this.value.split(",").map(i=>parseFloat(i));t!==void 0&&e!==void 0&&(this._lowValue=this.clamp(t),this._highValue=this.clamp(e))}else this._lowValue=this.clamp(parseFloat(this.value))}formatValue(t){return t.toFixed(this.precision)}clamp(t){const e=Math.min(Math.max(t,this.min),this.max);return parseFloat(e.toFixed(this.precision))}valueToPercent(t){return(t-this.min)/(this.max-this.min)*100}positionToValue(t){this.trackElement||(this.trackElement=this.querySelector("[data-range-track]"));const e=this.trackElement.getBoundingClientRect(),i=Math.max(0,Math.min(1,(t-e.left)/e.width));return this.min+i*(this.max-this.min)}updateValue(){this.value=this.multiple?`${this.formatValue(this._lowValue)},${this.formatValue(this._highValue)}`:this.formatValue(this._lowValue),this.emit()}handleValueChange(t,e){const i=Math.round(e/this.step)*this.step,s=parseFloat(i.toFixed(this.precision));e=this.clamp(s),t==="low"?this._lowValue=this.multiple?Math.min(e,this._highValue):e:this._highValue=Math.max(e,this._lowValue),this.updateValue(),this.requestUpdate()}cleanupEventListeners(){document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerEnd),document.removeEventListener("pointercancel",this.onPointerEnd),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onPointerEnd),document.removeEventListener("touchcancel",this.onPointerEnd)}getAriaValueText(t){return this.multiple?this.getI18nText("aria-range-text",this.defaultI18n,{low:this.formatValue(this._lowValue),high:this.formatValue(this._highValue)}):this.getI18nText("aria-value-text",this.defaultI18n,{value:this.formatValue(t)})}getKnobAriaLabel(t){const e=t==="low"?"low-knob-label":"high-knob-label";return this.getI18nText(e,this.defaultI18n)}renderKnob(t){const e=t==="low"?this._lowValue:this._highValue,i=this.valueToPercent(e),s=t==="low"?this.min:this._lowValue,n=t==="low"?this.multiple?this._highValue:this.max:this.max,a=this.isDragging&&this.activeKnob===t,h=[this.$cls.knob||"uk-input-range-knob",this.$cls[t==="low"?"knob-low":"knob-high"]||"",a&&this.$cls["knob-dragging"]||""].filter(Boolean).join(" "),l=this["label-position"]==="top"?this.$cls["label-top"]||"uk-input-range-label-top":this.$cls["label-bottom"]||"uk-input-range-label-bottom";return c.html`
341
341
  <button
342
342
  type="button"
343
- class="${l}"
343
+ class="${h}"
344
344
  role="slider"
345
345
  aria-label="${this.getKnobAriaLabel(t)}"
346
346
  aria-valuemin="${s}"
@@ -351,14 +351,14 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
351
351
  ?disabled=${this.disabled}
352
352
  style="${this.$stl.knob||""}${this.$stl[t==="low"?"knob-low":"knob-high"]||""}left: ${i}%;"
353
353
  data-knob="${t}"
354
- data-dragging="${r}"
354
+ data-dragging="${a}"
355
355
  @pointerdown=${d=>this.onPointerStart(d,t)}
356
356
  @touchstart=${d=>this.onPointerStart(d,t)}
357
357
  @keydown=${d=>this.onKeyDown(d,t)}
358
358
  >
359
359
  ${this._label?c.html`
360
360
  <span
361
- class="${this.$cls.label||"uk-input-range-label"} ${h}"
361
+ class="${this.$cls.label||"uk-input-range-label"} ${l}"
362
362
  style="${this.$stl.label||""}"
363
363
  data-label-position="${this["label-position"]}"
364
364
  >
@@ -391,7 +391,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
391
391
  ${this.renderKnob("low")}
392
392
  ${this.multiple?this.renderKnob("high"):""} ${this.renderHidden()}
393
393
  </div>
394
- `}},M([u({type:Boolean})],o.InputRange.prototype,"multiple",2),M([u({type:Number})],o.InputRange.prototype,"min",2),M([u({type:Number})],o.InputRange.prototype,"max",2),M([u({type:Number})],o.InputRange.prototype,"step",2),M([u({type:String})],o.InputRange.prototype,"label",2),M([u({type:String})],o.InputRange.prototype,"label-position",2),M([u({type:String})],o.InputRange.prototype,"aria-label",2),M([m()],o.InputRange.prototype,"$cls",2),M([m()],o.InputRange.prototype,"$stl",2),o.InputRange=M([I("uk-input-range")],o.InputRange);function qe(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ct={exports:{}},Ye=ct.exports,Zt;function Fe(){return Zt||(Zt=1,(function(a,t){(function(e,i,s){a.exports=s(),a.exports.default=s()})("slugify",Ye,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),i=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function s(n,r){if(typeof n!="string")throw new Error("slugify: string argument expected");r=typeof r=="string"?{replacement:r}:r||{};var l=i[r.locale]||{},h=r.replacement===void 0?"-":r.replacement,d=r.trim===void 0?!0:r.trim,$=n.normalize().split("").reduce(function(p,f){var g=l[f];return g===void 0&&(g=e[f]),g===void 0&&(g=f),g===h&&(g=" "),p+g.replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return r.strict&&($=$.replace(/[^A-Za-z0-9\s]/g,"")),d&&($=$.trim()),$=$.replace(/\s+/g,h),r.lower&&($=$.toLowerCase()),$}return s.extend=function(n){Object.assign(e,n)},s})})(ct)),ct.exports}var Je=Fe();const Xt=qe(Je);var We=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,k=(a,t,e,i)=>{for(var s=i>1?void 0:i?Ge(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&We(t,e,s),s};o.InputTag=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this["input-event"]="uk-input-tag:input",this.maxlength=20,this.minlength=1,this.slugify=!1,this["slugify-options"]="",this.delimiters=",",this["allow-duplicates"]=!1,this["max-tags"]=0,this.$input="",this.$slugOptions={lower:!0,strict:!0},this.$tags=[],this.$error="",this.defaultI18n={placeholder:"Add a tag...","remove-label":"Remove tag","edit-label":"Edit tag","tag-list-label":"Tags","min-length-error":"Tag must be at least {min} characters","max-length-error":"Tag cannot exceed {max} characters","duplicate-error":"Tag already exists","max-tags-error":"Maximum {max} tags allowed","input-label":"Tag input"},this.$cls={"host-inner":"",wrapper:"uk-input-tag","tag-list":"uk-input-tag-list",tag:"uk-tag uk-tag-secondary","tag-text":"","tag-remove":"",input:"",error:"sr-only"},this.$stl={"host-inner":"",wrapper:"","tag-list":"",tag:"","tag-text":"","tag-remove":"",input:"",error:""}}get $value(){return this.$tags}get $text(){return""}get delimiterChars(){return this.delimiters.split("")}initializeValue(){this.initializeTags(),this.initializeSlugOptions()}initializeTags(){this.$tags=this.value===""?[]:this.value.split(",")}initializeSlugOptions(){if(!this["slugify-options"])return;const t=lt(this["slugify-options"]);t.replacement&&(this.$slugOptions.replacement=t.replacement),t.remove&&(this.$slugOptions.remove=new RegExp(t.remove,"g")),t.lower&&(this.$slugOptions.lower=t.lower==="true"),t.strict&&(this.$slugOptions.strict=t.strict==="true"),t.locale&&(this.$slugOptions.locale=t.locale),t.trim&&(this.$slugOptions.trim=t.trim==="true")}validateTag(t){return this.$error="",t.length<this.minlength?(this.$error=this.getI18nText("min-length-error",this.defaultI18n,{min:String(this.minlength)}),!1):t.length>this.maxlength?(this.$error=this.getI18nText("max-length-error",this.defaultI18n,{max:String(this.maxlength)}),!1):!this["allow-duplicates"]&&this.$tags.includes(t)?(this.$error=this.getI18nText("duplicate-error",this.defaultI18n),!1):this["max-tags"]>0&&this.$tags.length>=this["max-tags"]?(this.$error=this.getI18nText("max-tags-error",this.defaultI18n,{max:String(this["max-tags"])}),!1):!0}addTag(){if(!this.$input.trim())return;let t=this.$input.trim();this.slugify&&(t=Xt(t,this.$slugOptions)),this.validateTag(t)&&(this.$tags=[...this.$tags,t],this.$input="",this.$error="",this.emit(),this.requestUpdate())}removeTag(t){this.disabled||(this.$tags=this.$tags.filter((e,i)=>i!==t),this.$error="",this.emit(),this.requestUpdate())}editTag(t){this.disabled||(this.$input=this.$tags[t],this.removeTag(t),this.updateComplete.then(()=>{this.renderRoot.querySelector("input")?.focus()}))}handleKeydown(t){switch(t.key){case"Backspace":this.$tags.length>0&&this.$input.length===0&&(t.preventDefault(),this.editTag(this.$tags.length-1));break;case"Enter":t.preventDefault(),this.addTag();break;case"Escape":this.$input&&(t.preventDefault(),this.$input="",this.$error="",this.requestUpdate());break;default:this.delimiterChars.includes(t.key)&&(t.preventDefault(),this.addTag());break}}handleInput(t){const e=t.target;this.$input=e.value,this.$error=""}handlePaste(t){const e=t.clipboardData?.getData("text");if(!e)return;if(this.delimiterChars.some(s=>e.includes(s))){t.preventDefault();const s=new RegExp(`[${this.delimiterChars.join("")}]`);e.split(s).map(r=>r.trim()).filter(r=>r.length>0).forEach(r=>{this.slugify&&(r=Xt(r,this.$slugOptions)),this.validateTag(r)&&(this.$tags=[...this.$tags,r])}),this.$input="",this.emit(),this.requestUpdate()}}renderTag(t,e){const i=this.getI18nText("remove-label",this.defaultI18n),s=this.getI18nText("edit-label",this.defaultI18n);return c.html`
394
+ `}},E([u({type:Boolean})],o.InputRange.prototype,"multiple",2),E([u({type:Number})],o.InputRange.prototype,"min",2),E([u({type:Number})],o.InputRange.prototype,"max",2),E([u({type:Number})],o.InputRange.prototype,"step",2),E([u({type:String})],o.InputRange.prototype,"label",2),E([u({type:String})],o.InputRange.prototype,"label-position",2),E([u({type:String})],o.InputRange.prototype,"aria-label",2),E([m()],o.InputRange.prototype,"$cls",2),E([m()],o.InputRange.prototype,"$stl",2),o.InputRange=E([_("uk-input-range")],o.InputRange);function qe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ut={exports:{}},Ke=ut.exports,Gt;function Ye(){return Gt||(Gt=1,(function(r,t){(function(e,i,s){r.exports=s(),r.exports.default=s()})("slugify",Ke,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),i=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function s(n,a){if(typeof n!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var h=i[a.locale]||{},l=a.replacement===void 0?"-":a.replacement,d=a.trim===void 0?!0:a.trim,$=n.normalize().split("").reduce(function(p,f){var g=h[f];return g===void 0&&(g=e[f]),g===void 0&&(g=f),g===l&&(g=" "),p+g.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&($=$.replace(/[^A-Za-z0-9\s]/g,"")),d&&($=$.trim()),$=$.replace(/\s+/g,l),a.lower&&($=$.toLowerCase()),$}return s.extend=function(n){Object.assign(e,n)},s})})(ut)),ut.exports}var Fe=Ye();const Zt=qe(Fe);var Je=Object.defineProperty,We=Object.getOwnPropertyDescriptor,w=(r,t,e,i)=>{for(var s=i>1?void 0:i?We(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Je(t,e,s),s};o.InputTag=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="wrapper",this["stl-default-element"]="wrapper",this["input-event"]="uk-input-tag:input",this.maxlength=20,this.minlength=1,this.slugify=!1,this["slugify-options"]="",this.delimiters=",",this["allow-duplicates"]=!1,this["max-tags"]=0,this.$input="",this.$slugOptions={lower:!0,strict:!0},this.$tags=[],this.$error="",this.defaultI18n={placeholder:"Add a tag...","remove-label":"Remove tag","edit-label":"Edit tag","tag-list-label":"Tags","min-length-error":"Tag must be at least {min} characters","max-length-error":"Tag cannot exceed {max} characters","duplicate-error":"Tag already exists","max-tags-error":"Maximum {max} tags allowed","input-label":"Tag input"},this.$cls={"host-inner":"",wrapper:"uk-input-tag","tag-list":"uk-input-tag-list",tag:"uk-tag uk-tag-secondary","tag-text":"","tag-remove":"",input:"",error:"sr-only"},this.$stl={"host-inner":"",wrapper:"","tag-list":"",tag:"","tag-text":"","tag-remove":"",input:"",error:""}}get $value(){return this.$tags}get $text(){return""}get delimiterChars(){return this.delimiters.split("")}initializeValue(){this.initializeTags(),this.initializeSlugOptions()}initializeTags(){this.$tags=this.value===""?[]:this.value.split(",")}initializeSlugOptions(){if(!this["slugify-options"])return;const t=ot(this["slugify-options"]);t.replacement&&(this.$slugOptions.replacement=t.replacement),t.remove&&(this.$slugOptions.remove=new RegExp(t.remove,"g")),t.lower&&(this.$slugOptions.lower=t.lower==="true"),t.strict&&(this.$slugOptions.strict=t.strict==="true"),t.locale&&(this.$slugOptions.locale=t.locale),t.trim&&(this.$slugOptions.trim=t.trim==="true")}validateTag(t){return this.$error="",t.length<this.minlength?(this.$error=this.getI18nText("min-length-error",this.defaultI18n,{min:String(this.minlength)}),!1):t.length>this.maxlength?(this.$error=this.getI18nText("max-length-error",this.defaultI18n,{max:String(this.maxlength)}),!1):!this["allow-duplicates"]&&this.$tags.includes(t)?(this.$error=this.getI18nText("duplicate-error",this.defaultI18n),!1):this["max-tags"]>0&&this.$tags.length>=this["max-tags"]?(this.$error=this.getI18nText("max-tags-error",this.defaultI18n,{max:String(this["max-tags"])}),!1):!0}addTag(){if(!this.$input.trim())return;let t=this.$input.trim();this.slugify&&(t=Zt(t,this.$slugOptions)),this.validateTag(t)&&(this.$tags=[...this.$tags,t],this.$input="",this.$error="",this.emit(),this.requestUpdate())}removeTag(t){this.disabled||(this.$tags=this.$tags.filter((e,i)=>i!==t),this.$error="",this.emit(),this.requestUpdate())}editTag(t){this.disabled||(this.$input=this.$tags[t],this.removeTag(t),this.updateComplete.then(()=>{this.renderRoot.querySelector("input")?.focus()}))}handleKeydown(t){switch(t.key){case"Backspace":this.$tags.length>0&&this.$input.length===0&&(t.preventDefault(),this.editTag(this.$tags.length-1));break;case"Enter":t.preventDefault(),this.addTag();break;case"Escape":this.$input&&(t.preventDefault(),this.$input="",this.$error="",this.requestUpdate());break;default:this.delimiterChars.includes(t.key)&&(t.preventDefault(),this.addTag());break}}handleInput(t){const e=t.target;this.$input=e.value,this.$error=""}handlePaste(t){const e=t.clipboardData?.getData("text");if(!e)return;if(this.delimiterChars.some(s=>e.includes(s))){t.preventDefault();const s=new RegExp(`[${this.delimiterChars.join("")}]`);e.split(s).map(a=>a.trim()).filter(a=>a.length>0).forEach(a=>{this.slugify&&(a=Zt(a,this.$slugOptions)),this.validateTag(a)&&(this.$tags=[...this.$tags,a])}),this.$input="",this.emit(),this.requestUpdate()}}renderTag(t,e){const i=this.getI18nText("remove-label",this.defaultI18n),s=this.getI18nText("edit-label",this.defaultI18n);return c.html`
395
395
  <div
396
396
  class="${this.$cls.tag||""}"
397
397
  style="${this.$stl.tag||""}"
@@ -471,7 +471,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
471
471
 
472
472
  ${this.renderError()} ${this.renderHidden()}
473
473
  </div>
474
- `}},k([u({type:Number})],o.InputTag.prototype,"maxlength",2),k([u({type:Number})],o.InputTag.prototype,"minlength",2),k([u({type:Boolean})],o.InputTag.prototype,"slugify",2),k([u({type:String})],o.InputTag.prototype,"slugify-options",2),k([u({type:String})],o.InputTag.prototype,"delimiters",2),k([u({type:Boolean})],o.InputTag.prototype,"allow-duplicates",2),k([u({type:Number})],o.InputTag.prototype,"max-tags",2),k([m()],o.InputTag.prototype,"$input",2),k([m()],o.InputTag.prototype,"$slugOptions",2),k([m()],o.InputTag.prototype,"$tags",2),k([m()],o.InputTag.prototype,"$error",2),k([m()],o.InputTag.prototype,"$cls",2),k([m()],o.InputTag.prototype,"$stl",2),o.InputTag=k([I("uk-input-tag")],o.InputTag);var Ze=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,C=(a,t,e,i)=>{for(var s=i>1?void 0:i?Xe(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&Ze(t,e,s),s};o.InputTime=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="container",this["stl-default-element"]="container",this["input-event"]="uk-input-time:input",this.autofocus=!1,this.now=!1,this.clock="12h",this.min="",this.max="",this.$min=0,this.$meridiem="am",this.defaultI18n={am:"AM",pm:"PM","hour-label":"Hour","minute-label":"Minute","meridiem-label":"AM/PM","time-label":"Time","hour-placeholder":"HH","minute-placeholder":"MM","invalid-time":"Invalid time format"},this.$cls={container:"uk-input-time",input:"uk-input","hour-input":"","minute-input":"",separator:"","meridiem-button":"uk-input-fake",button:""},this.$stl={container:"",input:"","hour-input":"","minute-input":"",separator:"","meridiem-button":"",button:""}}get $HH(){return this.$hour!==void 0?this.$hour.toString().padStart(2,"0"):"00"}get $MM(){return this.$min>=0?this.$min.toString().padStart(2,"0"):"00"}get $value(){if(this.$hour===void 0||this.$hour===null)return"";let t=this.$hour;return this.clock==="12h"&&(this.$meridiem==="pm"?t=this.$hour===12?12:this.$hour+12:t=this.$hour===12?0:this.$hour),`${t.toString().padStart(2,"0")}:${this.$min.toString().padStart(2,"0")}`}get $text(){return""}initializeValue(){this.value?this.parseTimeValue():this.now&&this.setCurrentTime()}updated(t){["$hour","$min","$meridiem"].some(e=>t.has(e))&&this.emit()}parseTimeValue(){try{const t=Me(this.value),[e,i]=t.split(":").map(Number);this.clock==="12h"?this.$hour=e%12||12:this.$hour=e,this.$min=i,this.$meridiem=e<12?"am":"pm"}catch(t){console.error(this.getI18nText("invalid-time",this.defaultI18n),t)}}setCurrentTime(){const t=new Date;this.clock==="12h"?this.$hour=t.getHours()%12||12:this.$hour=t.getHours(),this.$min=t.getMinutes(),this.$meridiem=t.getHours()<12?"am":"pm"}isTimeValid(){const t=this.$value;return t?!(this.min&&t<this.min||this.max&&t>this.max):!0}handleInput(t,e){const i=t.target,s=i.value.replace(/[^0-9]/g,"").substring(0,2),n=parseInt(s);switch(e){case"$hour":this.clock==="12h"?this.$hour=n<=12?n:12:this.$hour=n<=23?n:23;break;case"$min":this.$min=n<=59?n:59;break}i.value=s}handleBlur(t,e){const i=t.target,s=parseInt(i.value);switch(e){case"$hour":if(i.value===""){this.required?i.value=this.$HH:this.$hour=void 0;return}this.clock==="12h"&&s>12?(this.$hour=12,i.value="12"):this.clock==="12h"&&s===0?(this.$hour=12,i.value="12"):this.clock==="24h"&&s>23?(this.$hour=23,i.value="23"):i.value=this.$HH;break;case"$min":s>59&&(this.$min=59),i.value=this.$MM;break}}handleKeydown(t,e){const i=t.target;if((e==="$hour"?this.$hour:this.$min)===void 0&&e==="$hour")return;let n=0,r=!1;switch(t.key){case"ArrowUp":n=1,r=!0;break;case"ArrowDown":n=-1,r=!0;break;case"PageUp":n=e==="$hour"?1:15,r=!0;break;case"PageDown":n=e==="$hour"?-1:-15,r=!0;break}if(r&&n!==0)if(t.preventDefault(),e==="$hour"){const l=this.clock==="12h"?12:23,h=this.clock==="12h"?1:0;let d=(this.$hour||0)+n;d>l&&(d=h),d<h&&(d=l),this.$hour=d,i.value=d.toString().padStart(2,"0")}else{let l=this.$min+n;l>59&&(l=0),l<0&&(l=59),this.$min=l,i.value=l.toString().padStart(2,"0")}}toggleMeridiem(){this.$meridiem=this.$meridiem==="am"?"pm":"am"}handleMeridiemKeydown(t){(t.key==="ArrowUp"||t.key==="ArrowDown"||t.key===" ")&&(t.preventDefault(),this.toggleMeridiem())}renderInput(t){const{min:e,max:i,state:s,key:n}=t,r=s==="$hour",l=r?this.$hour!==void 0?this.$hour.toString().padStart(2,"0"):"":this.$hour===void 0?"":this.$min>=0?this.$min.toString().padStart(2,"0"):"00",h=this.getI18nText(r?"hour-label":"minute-label",this.defaultI18n),d=this.getI18nText(r?"hour-placeholder":"minute-placeholder",this.defaultI18n),$=r?this.$cls["hour-input"]||this.$cls.input||"":this.$cls["minute-input"]||this.$cls.input||"",p=r?this.$stl["hour-input"]||this.$stl.input||"":this.$stl["minute-input"]||this.$stl.input||"";return c.html`
474
+ `}},w([u({type:Number})],o.InputTag.prototype,"maxlength",2),w([u({type:Number})],o.InputTag.prototype,"minlength",2),w([u({type:Boolean})],o.InputTag.prototype,"slugify",2),w([u({type:String})],o.InputTag.prototype,"slugify-options",2),w([u({type:String})],o.InputTag.prototype,"delimiters",2),w([u({type:Boolean})],o.InputTag.prototype,"allow-duplicates",2),w([u({type:Number})],o.InputTag.prototype,"max-tags",2),w([m()],o.InputTag.prototype,"$input",2),w([m()],o.InputTag.prototype,"$slugOptions",2),w([m()],o.InputTag.prototype,"$tags",2),w([m()],o.InputTag.prototype,"$error",2),w([m()],o.InputTag.prototype,"$cls",2),w([m()],o.InputTag.prototype,"$stl",2),o.InputTag=w([_("uk-input-tag")],o.InputTag);var Ge=Object.defineProperty,Ze=Object.getOwnPropertyDescriptor,C=(r,t,e,i)=>{for(var s=i>1?void 0:i?Ze(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Ge(t,e,s),s};o.InputTime=class extends N(v){constructor(){super(...arguments),this["cls-default-element"]="container",this["stl-default-element"]="container",this["input-event"]="uk-input-time:input",this.autofocus=!1,this.now=!1,this.clock="12h",this.min="",this.max="",this.$min=0,this.$meridiem="am",this.defaultI18n={am:"AM",pm:"PM","hour-label":"Hour","minute-label":"Minute","meridiem-label":"AM/PM","time-label":"Time","hour-placeholder":"HH","minute-placeholder":"MM","invalid-time":"Invalid time format"},this.$cls={container:"uk-input-time",input:"uk-input","hour-input":"","minute-input":"",separator:"","meridiem-button":"uk-input-fake",button:""},this.$stl={container:"",input:"","hour-input":"","minute-input":"",separator:"","meridiem-button":"",button:""}}get $HH(){return this.$hour!==void 0?this.$hour.toString().padStart(2,"0"):"00"}get $MM(){return this.$min>=0?this.$min.toString().padStart(2,"0"):"00"}get $value(){if(this.$hour===void 0||this.$hour===null)return"";let t=this.$hour;return this.clock==="12h"&&(this.$meridiem==="pm"?t=this.$hour===12?12:this.$hour+12:t=this.$hour===12?0:this.$hour),`${t.toString().padStart(2,"0")}:${this.$min.toString().padStart(2,"0")}`}get $text(){return""}initializeValue(){this.value?this.parseTimeValue():this.now&&this.setCurrentTime()}updated(t){["$hour","$min","$meridiem"].some(e=>t.has(e))&&this.emit()}parseTimeValue(){try{const t=Ee(this.value),[e,i]=t.split(":").map(Number);this.clock==="12h"?this.$hour=e%12||12:this.$hour=e,this.$min=i,this.$meridiem=e<12?"am":"pm"}catch(t){console.error(this.getI18nText("invalid-time",this.defaultI18n),t)}}setCurrentTime(){const t=new Date;this.clock==="12h"?this.$hour=t.getHours()%12||12:this.$hour=t.getHours(),this.$min=t.getMinutes(),this.$meridiem=t.getHours()<12?"am":"pm"}isTimeValid(){const t=this.$value;return t?!(this.min&&t<this.min||this.max&&t>this.max):!0}handleInput(t,e){const i=t.target,s=i.value.replace(/[^0-9]/g,"").substring(0,2),n=parseInt(s);switch(e){case"$hour":this.clock==="12h"?this.$hour=n<=12?n:12:this.$hour=n<=23?n:23;break;case"$min":this.$min=n<=59?n:59;break}i.value=s}handleBlur(t,e){const i=t.target,s=parseInt(i.value);switch(e){case"$hour":if(i.value===""){this.required?i.value=this.$HH:this.$hour=void 0;return}this.clock==="12h"&&s>12?(this.$hour=12,i.value="12"):this.clock==="12h"&&s===0?(this.$hour=12,i.value="12"):this.clock==="24h"&&s>23?(this.$hour=23,i.value="23"):i.value=this.$HH;break;case"$min":s>59&&(this.$min=59),i.value=this.$MM;break}}handleKeydown(t,e){const i=t.target;if((e==="$hour"?this.$hour:this.$min)===void 0&&e==="$hour")return;let n=0,a=!1;switch(t.key){case"ArrowUp":n=1,a=!0;break;case"ArrowDown":n=-1,a=!0;break;case"PageUp":n=e==="$hour"?1:15,a=!0;break;case"PageDown":n=e==="$hour"?-1:-15,a=!0;break}if(a&&n!==0)if(t.preventDefault(),e==="$hour"){const h=this.clock==="12h"?12:23,l=this.clock==="12h"?1:0;let d=(this.$hour||0)+n;d>h&&(d=l),d<l&&(d=h),this.$hour=d,i.value=d.toString().padStart(2,"0")}else{let h=this.$min+n;h>59&&(h=0),h<0&&(h=59),this.$min=h,i.value=h.toString().padStart(2,"0")}}toggleMeridiem(){this.$meridiem=this.$meridiem==="am"?"pm":"am"}handleMeridiemKeydown(t){(t.key==="ArrowUp"||t.key==="ArrowDown"||t.key===" ")&&(t.preventDefault(),this.toggleMeridiem())}renderInput(t){const{min:e,max:i,state:s,key:n}=t,a=s==="$hour",h=a?this.$hour!==void 0?this.$hour.toString().padStart(2,"0"):"":this.$hour===void 0?"":this.$min>=0?this.$min.toString().padStart(2,"0"):"00",l=this.getI18nText(a?"hour-label":"minute-label",this.defaultI18n),d=this.getI18nText(a?"hour-placeholder":"minute-placeholder",this.defaultI18n),$=a?this.$cls["hour-input"]||this.$cls.input||"":this.$cls["minute-input"]||this.$cls.input||"",p=a?this.$stl["hour-input"]||this.$stl.input||"":this.$stl["minute-input"]||this.$stl.input||"";return c.html`
475
475
  <input
476
476
  class="${$}"
477
477
  style="${p}"
@@ -480,24 +480,24 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
480
480
  type="number"
481
481
  inputmode="numeric"
482
482
  role="spinbutton"
483
- aria-label="${h}"
483
+ aria-label="${l}"
484
484
  aria-valuemin="${e}"
485
485
  aria-valuemax="${i}"
486
- aria-valuenow="${r?this.$hour||0:this.$min}"
486
+ aria-valuenow="${a?this.$hour||0:this.$min}"
487
487
  aria-invalid="${!this.isTimeValid()}"
488
488
  min="${e}"
489
489
  max="${i}"
490
490
  step="1"
491
491
  placeholder="${d}"
492
492
  maxlength="2"
493
- value="${l}"
494
- .autofocus="${r&&this.autofocus}"
495
- ?disabled="${this.disabled||!r&&this.$hour===void 0}"
493
+ value="${h}"
494
+ .autofocus="${a&&this.autofocus}"
495
+ ?disabled="${this.disabled||!a&&this.$hour===void 0}"
496
496
  @keydown="${f=>this.handleKeydown(f,s)}"
497
497
  @input="${f=>this.handleInput(f,s)}"
498
498
  @blur="${f=>this.handleBlur(f,s)}"
499
499
  />
500
- `}render(){const t=this.getI18nText("time-label",this.defaultI18n),e=this.getI18nText("meridiem-label",this.defaultI18n);let i=c.html``;if(this.clock==="12h"){const s=this.getI18nText("am",this.defaultI18n),n=this.getI18nText("pm",this.defaultI18n),r=this.$meridiem==="am"?s:n;i=c.html`
500
+ `}render(){const t=this.getI18nText("time-label",this.defaultI18n),e=this.getI18nText("meridiem-label",this.defaultI18n);let i=c.html``;if(this.clock==="12h"){const s=this.getI18nText("am",this.defaultI18n),n=this.getI18nText("pm",this.defaultI18n),a=this.$meridiem==="am"?s:n;i=c.html`
501
501
  <button
502
502
  class="${this.$cls["meridiem-button"]||this.$cls.button||""}"
503
503
  style="${this.$stl["meridiem-button"]||this.$stl.button||""}"
@@ -508,10 +508,10 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
508
508
  aria-label="${e}"
509
509
  aria-checked="${this.$meridiem==="pm"}"
510
510
  ?disabled="${this.disabled||this.$hour===void 0}"
511
- @click="${l=>{l.preventDefault(),this.toggleMeridiem()}}"
511
+ @click="${h=>{h.preventDefault(),this.toggleMeridiem()}}"
512
512
  @keydown="${this.handleMeridiemKeydown}"
513
513
  >
514
- ${r}
514
+ ${a}
515
515
  </button>
516
516
  `}return c.html`
517
517
  <div
@@ -535,257 +535,30 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
535
535
  ${this.renderInput({min:0,max:59,state:"$min",key:"$MM"})}
536
536
  ${i} ${this.renderHidden()}
537
537
  </div>
538
- `}},C([u({type:Boolean})],o.InputTime.prototype,"autofocus",2),C([u({type:Boolean})],o.InputTime.prototype,"now",2),C([u({type:String})],o.InputTime.prototype,"clock",2),C([u({type:String})],o.InputTime.prototype,"min",2),C([u({type:String})],o.InputTime.prototype,"max",2),C([m()],o.InputTime.prototype,"$hour",2),C([m()],o.InputTime.prototype,"$min",2),C([m()],o.InputTime.prototype,"$meridiem",2),C([m()],o.InputTime.prototype,"$cls",2),C([m()],o.InputTime.prototype,"$stl",2),o.InputTime=C([I("uk-input-time")],o.InputTime);function Qe(a=5){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:a},()=>t.charAt(Math.floor(Math.random()*t.length))).join("")}function Qt(a){return a?a.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,A=(a,t,e,i)=>{for(var s=i>1?void 0:i?ei(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&ti(t,e,s),s};o.Keyval=class extends v{constructor(){super(...arguments),this["cls-default-element"]="container",this["stl-default-element"]="container",this.keys="",this.values="",this.sensitive=!1,this.noninsertable=!1,this.max=0,this.min=1,this["aria-label"]="",this.valueVisibility={},this.$defaultI18n={"header-key":"Key","header-value":"Value","placeholder-key":"Enter key","placeholder-value":"Enter value","add-row-label":"Add row","remove-row-label":"Remove row","toggle-visibility-label":"Toggle visibility","generate-random-label":"Generate random value","table-label":"Key-value pairs","actions-label":"Actions","key-label":"Key for row {index}","value-label":"Value for row {index}"},this.$cls={container:"uk-keyval",table:"uk-table uk-table-divider","header-row":"",row:"","add-button":"uk-button uk-button-default",button:"uk-keyval-button","key-input":"",input:"uk-input","value-wrapper":"uk-keyval-value-wrapper","random-button":"","value-input":"uk-input",actions:"uk-keyval-actions","toggle-button":"","remove-button":""},this.$stl={container:"",table:"","header-row":"",row:"","add-button":"",button:"","key-input":"",input:"","value-wrapper":"","random-button":"","value-input":"",actions:"","toggle-button":"","remove-button":""},this.handleKeyDown=t=>{(t.ctrlKey||t.metaKey)&&t.key==="Enter"&&!this.noninsertable&&(t.preventDefault(),this.addRow())}}connectedCallback(){super.connectedCallback(),this.HTMLDataSource||(this.initializeEmptyData(),this.addRow()),this.initializePasswordVisibility()}onDataSourceChanged(){(!this.$data.__||!this.$data.__.options||this.$data.__.options.length===0)&&(this.initializeEmptyData(),this.addRow())}initializeEmptyData(){this.$data={__:{text:"__",options:[]}}}initializePasswordVisibility(){this.sensitive&&this.$data.__&&this.$data.__.options&&this.$data.__.options.forEach((t,e)=>{this.valueVisibility[e]=!1})}canAddRow(){return this.max===0?!0:this.$data.__.options.length<this.max}canRemoveRow(){return this.$data.__.options.length>this.min}addRow(){if(!this.canAddRow())return;this.$data.__||this.initializeEmptyData();const t=this.$data.__.options.length;this.$data.__.options.push({group:"__",value:"",text:"",disabled:!1,selected:!1,data:{gid:""}}),this.sensitive&&(this.valueVisibility[t]=!1),this.requestUpdate(),this.updateComplete.then(()=>{const i=this.renderRoot.querySelectorAll('[data-field="key"]')[t];i&&i.focus()})}removeRow(t){this.canRemoveRow()&&this.$data.__&&this.$data.__.options&&(this.$data.__.options.splice(t,1),this.reindexVisibilityAfterRemoval(t),this.requestUpdate())}reindexVisibilityAfterRemoval(t){const e={};Object.keys(this.valueVisibility).forEach(i=>{const s=parseInt(i);s<t?e[s]=this.valueVisibility[s]:s>t&&(e[s-1]=this.valueVisibility[s])}),this.valueVisibility=e}handleKeyChange(t,e){const s=e.target.value;this.$data.__&&this.$data.__.options[t]&&(this.$data.__.options[t].data.gid=s,this.requestUpdate())}handleValueChange(t,e){const s=e.target.value;this.$data.__&&this.$data.__.options[t]&&(this.$data.__.options[t].value=s,this.requestUpdate())}setRandomValue(t){this.$data.__&&this.$data.__.options[t]&&(this.$data.__.options[t].value=Qe(16),this.valueVisibility[t]=!0,this.requestUpdate())}togglePasswordVisibility(t){this.sensitive&&(this.valueVisibility[t]=!this.valueVisibility[t],this.requestUpdate())}getPasswordVisibility(t){return this.valueVisibility[t]||!1}getInputType(t){return this.sensitive?this.getPasswordVisibility(t)?"text":"password":"text"}$icons(t){const e=super.$icons(t);if(e)return e;switch(t){case"plus":return c.html`
539
- <svg
540
- xmlns="http://www.w3.org/2000/svg"
541
- width="16"
542
- height="16"
543
- viewBox="0 0 24 24"
544
- fill="none"
545
- stroke="currentColor"
546
- stroke-width="2"
547
- stroke-linecap="round"
548
- stroke-linejoin="round"
549
- aria-hidden="true"
550
- >
551
- <path d="M5 12h14" />
552
- <path d="M12 5v14" />
553
- </svg>
554
- `;case"wand":return c.html`
555
- <svg
556
- xmlns="http://www.w3.org/2000/svg"
557
- width="16"
558
- height="16"
559
- viewBox="0 0 24 24"
560
- fill="none"
561
- stroke="currentColor"
562
- stroke-width="2"
563
- stroke-linecap="round"
564
- stroke-linejoin="round"
565
- aria-hidden="true"
566
- >
567
- <path d="M15 4V2" />
568
- <path d="M15 16v-2" />
569
- <path d="M8 9h2" />
570
- <path d="M20 9h2" />
571
- <path d="M17.8 11.8 19 13" />
572
- <path d="M15 9h.01" />
573
- <path d="M17.8 6.2 19 5" />
574
- <path d="m3 21 9-9" />
575
- <path d="M12.2 6.2 11 5" />
576
- </svg>
577
- `;case"eye-off":return c.html`
578
- <svg
579
- xmlns="http://www.w3.org/2000/svg"
580
- width="16"
581
- height="16"
582
- viewBox="0 0 24 24"
583
- fill="none"
584
- stroke="currentColor"
585
- stroke-width="2"
586
- stroke-linecap="round"
587
- stroke-linejoin="round"
588
- aria-hidden="true"
589
- >
590
- <path
591
- d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"
592
- />
593
- <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" />
594
- <path
595
- d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"
596
- />
597
- <path d="m2 2 20 20" />
598
- </svg>
599
- `;case"eye":return c.html`
600
- <svg
601
- xmlns="http://www.w3.org/2000/svg"
602
- width="16"
603
- height="16"
604
- viewBox="0 0 24 24"
605
- fill="none"
606
- stroke="currentColor"
607
- stroke-width="2"
608
- stroke-linecap="round"
609
- stroke-linejoin="round"
610
- aria-hidden="true"
611
- >
612
- <path
613
- d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
614
- />
615
- <circle cx="12" cy="12" r="3" />
616
- </svg>
617
- `;case"trash-2":return c.html`
618
- <svg
619
- xmlns="http://www.w3.org/2000/svg"
620
- width="16"
621
- height="16"
622
- viewBox="0 0 24 24"
623
- fill="none"
624
- stroke="currentColor"
625
- stroke-width="2"
626
- stroke-linecap="round"
627
- stroke-linejoin="round"
628
- aria-hidden="true"
629
- >
630
- <path d="M3 6h18" />
631
- <path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" />
632
- <path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" />
633
- <line x1="10" x2="10" y1="11" y2="17" />
634
- <line x1="14" x2="14" y1="11" y2="17" />
635
- </svg>
636
- `}}render(){const t=this["aria-label"]||this.getI18nText("table-label",this.$defaultI18n),e=this.getI18nText("header-key",this.$defaultI18n),i=this.getI18nText("header-value",this.$defaultI18n),s=this.getI18nText("actions-label",this.$defaultI18n),n=this.getI18nText("add-row-label",this.$defaultI18n);return c.html`
538
+ `}},C([u({type:Boolean})],o.InputTime.prototype,"autofocus",2),C([u({type:Boolean})],o.InputTime.prototype,"now",2),C([u({type:String})],o.InputTime.prototype,"clock",2),C([u({type:String})],o.InputTime.prototype,"min",2),C([u({type:String})],o.InputTime.prototype,"max",2),C([m()],o.InputTime.prototype,"$hour",2),C([m()],o.InputTime.prototype,"$min",2),C([m()],o.InputTime.prototype,"$meridiem",2),C([m()],o.InputTime.prototype,"$cls",2),C([m()],o.InputTime.prototype,"$stl",2),o.InputTime=C([_("uk-input-time")],o.InputTime);var Xe=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,I=(r,t,e,i)=>{for(var s=i>1?void 0:i?Qe(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Xe(t,e,s),s};o.Icon=class extends v{constructor(){super(...arguments),this["cls-default-element"]="svg",this["stl-default-element"]="svg",this.icon="",this.label="",this.decorative=!1,this.role="",this["stroke-width"]="2",this.height="16",this.width="16",this.color="",this.fill="none",this.defaultI18n={label:""}}get key(){return this.icon.trim().split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}getEffectiveLabel(){return this.getI18nText("label",this.defaultI18n)||this.label}updated(t){(["icon","stroke-width","height","width","size","color","fill","label","decorative","role","$cls","$stl"].some(i=>t.has(i))||t.has("$i18n"))&&this.updateComplete.then(()=>{this.regenerateSvg()})}regenerateSvg(){this.$svg=this.createSvg({icon:this.key,cls:this.$cls.svg||"",stl:this.$stl.svg||"",height:this.size||this.height,width:this.size||this.width,strokeWidth:this["stroke-width"],color:this.color,fill:this.fill,label:this.getEffectiveLabel(),decorative:this.decorative,role:this.role})}createSvg(t){const{icon:e,cls:i,stl:s,height:n,width:a,strokeWidth:h,color:l,fill:d,label:$,decorative:p,role:f}=t;try{const g=ie[e];if(!g){console.warn(`uk-icon: Icon "${this.icon}" not found in Lucide icons.`);return}const b=Tt.createElement(g);if(i&&b.setAttribute("class",i),s&&b.setAttribute("style",s),b.setAttribute("height",n),b.setAttribute("width",a),b.setAttribute("stroke-width",h),d!=="none"&&b.setAttribute("fill",d),l){const k=b.getAttribute("style")||"";b.setAttribute("style",`${k}; color: ${l};`)}return p?(b.setAttribute("aria-hidden","true"),b.removeAttribute("role"),b.removeAttribute("aria-label")):$?(b.setAttribute("role",f||"img"),b.setAttribute("aria-label",$),b.removeAttribute("aria-hidden")):f&&(b.setAttribute("role",f),b.removeAttribute("aria-hidden")),b.setAttribute("data-icon",this.icon),b.setAttribute("data-lucide",this.icon),b}catch(g){console.warn(`uk-icon: Failed to create icon "${this.icon}":`,g);return}}render(){return this.renderRoot.children.length===0?this.$svg:c.nothing}},I([u({type:String})],o.Icon.prototype,"icon",2),I([u({type:String})],o.Icon.prototype,"label",2),I([u({type:Boolean})],o.Icon.prototype,"decorative",2),I([u({type:String})],o.Icon.prototype,"role",2),I([u({type:String})],o.Icon.prototype,"stroke-width",2),I([u({type:String})],o.Icon.prototype,"height",2),I([u({type:String})],o.Icon.prototype,"width",2),I([u({type:String})],o.Icon.prototype,"size",2),I([u({type:String})],o.Icon.prototype,"color",2),I([u({type:String})],o.Icon.prototype,"fill",2),I([m()],o.Icon.prototype,"$svg",2),o.Icon=I([_("uk-icon")],o.Icon);var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,V=(r,t,e,i)=>{for(var s=i>1?void 0:i?ei(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&ti(t,e,s),s};o.Chart=class extends v{constructor(){super(...arguments),this["cls-default-element"]="host-inner",this["stl-default-element"]="host-inner",this.defaultI18n={"chart-label":"Chart","loading-message":"Loading chart...","error-message":"Failed to load chart. Please try again.","no-data-message":"No data available"},this.loading=!1,this.width="100%",this.height="auto",this.hasError=!1,this.$cls={"host-inner":"",chart:"uk-chart",loading:"sr-only",error:"sr-only"},this.$stl={"host-inner":"",chart:"",loading:"",error:""},this.apexCharts=null}get $apexChartsConfig(){return"apexCharts"in this.$config&&typeof this.$config=="object"?this.$config.apexCharts:{}}hasValidConfig(){return Object.keys(this.$apexChartsConfig).length>0}firstUpdated(t){super.firstUpdated(t),this.loading||this.initializeApexCharts()}updated(t){super.updated(t),t.has("loading")&&!this.loading&&!this.apexCharts&&this.initializeApexCharts()}disconnectedCallback(){super.disconnectedCallback(),this.apexCharts&&(this.apexCharts.destroy(),this.apexCharts=null)}onConfigChanged(){if(this.apexCharts&&this.hasValidConfig())try{this.apexCharts.updateOptions(this.$apexChartsConfig,!0,!0),this.hasError=!1}catch(t){console.error("uk-chart: Failed to update chart:",t),this.hasError=!0}else!this.apexCharts&&this.hasValidConfig()&&this.initializeApexCharts()}async initializeApexCharts(){const t=this.renderRoot.querySelector("[data-chart-container]");if(!t){console.warn("uk-chart: Chart container not found in render root");return}if(!this.hasValidConfig()){console.warn("uk-chart: No valid chart configuration found"),this.hasError=!0;return}if(this.apexCharts===null)try{const e={...this.$apexChartsConfig,chart:{...this.$apexChartsConfig.chart,width:this.width,height:this.height}};this.apexCharts=new te(t,e),await this.apexCharts.render(),this.isRendered=!0,this.hasError=!1}catch(e){console.error("uk-chart: Failed to initialize chart:",e),this.hasError=!0}}renderLoading(){const t=this.getI18nText("loading-message",this.defaultI18n);return c.html`
637
539
  <div
638
- data-host-inner
639
- class="${this.$cls.container||""}"
640
- style="${this.$stl.container||""}"
641
- @keydown="${this.handleKeyDown}"
642
- >
643
- <table
644
- class="${this.$cls.table||""}"
645
- style="${this.$stl.table||""}"
646
- role="table"
647
- aria-label="${t}"
648
- >
649
- <thead>
650
- <tr
651
- class="${this.$cls["header-row"]||""}"
652
- style="${this.$stl["header-row"]||""}"
653
- role="row"
654
- >
655
- <th role="columnheader">${e}</th>
656
- <th role="columnheader">${i}</th>
657
- <th role="columnheader">
658
- ${s}
659
- ${this.noninsertable?"":c.html`
660
- <button
661
- class="${this.$cls["add-button"]||this.$cls.button||""}"
662
- style="${this.$stl["add-button"]||this.$stl.button||""}"
663
- type="button"
664
- aria-label="${n}"
665
- ?disabled="${!this.canAddRow()}"
666
- @click=${()=>this.addRow()}
667
- >
668
- ${this.$icons("plus")}
669
- </button>
670
- `}
671
- </th>
672
- </tr>
673
- </thead>
674
- <tbody>
675
- ${this.$data.__&&this.$data.__.options?this.$data.__.options.map((r,l)=>{const h=this.getI18nText("key-label",this.$defaultI18n,{index:String(l+1)}),d=this.getI18nText("value-label",this.$defaultI18n,{index:String(l+1)}),$=this.getI18nText("placeholder-key",this.$defaultI18n),p=this.getI18nText("placeholder-value",this.$defaultI18n),f=this.getI18nText("remove-row-label",this.$defaultI18n),g=this.getI18nText("toggle-visibility-label",this.$defaultI18n),b=this.getI18nText("generate-random-label",this.$defaultI18n);return c.html`
676
- <tr
677
- class="${this.$cls.row||""}"
678
- style="${this.$stl.row||""}"
679
- role="row"
680
- data-row-index="${l}"
681
- >
682
- <td role="cell">
683
- <input
684
- class="${this.$cls["key-input"]||this.$cls.input||""}"
685
- style="${this.$stl["key-input"]||this.$stl.input||""}"
686
- autocomplete="off"
687
- type="text"
688
- placeholder="${$}"
689
- value="${r.data.gid||""}"
690
- aria-label="${h}"
691
- data-field="key"
692
- @input=${w=>this.handleKeyChange(l,w)}
693
- />
694
- </td>
695
- <td role="cell">
696
- <div
697
- class="${this.$cls["value-wrapper"]||""}"
698
- style="${this.$stl["value-wrapper"]||""}"
699
- >
700
- ${this.sensitive?c.html`
701
- <button
702
- class="${this.$cls["random-button"]||this.$cls.button||""}"
703
- style="${this.$stl["random-button"]||this.$stl.button||""}"
704
- type="button"
705
- aria-label="${b}"
706
- ?disabled="${!!r.value}"
707
- @click=${()=>this.setRandomValue(l)}
708
- >
709
- ${this.$icons("wand")}
710
- </button>
711
- `:""}
712
-
713
- <input
714
- class="${this.$cls["value-input"]||this.$cls.input||""}"
715
- style="${this.$stl["value-input"]||this.$stl.input||""}"
716
- autocomplete="off"
717
- type="${this.getInputType(l)}"
718
- placeholder="${p}"
719
- name="${r.data.gid||""}"
720
- value="${r.value}"
721
- aria-label="${d}"
722
- data-field="value"
723
- ?disabled=${!r.data.gid}
724
- @input=${w=>this.handleValueChange(l,w)}
725
- />
726
- </div>
727
- </td>
728
- <td role="cell">
729
- <div
730
- class="${this.$cls.actions||""}"
731
- style="${this.$stl.actions||""}"
732
- role="group"
733
- aria-label="${s}"
734
- >
735
- ${this.sensitive?c.html`
736
- <button
737
- class="${this.$cls["toggle-button"]||this.$cls.button||""}"
738
- style="${this.$stl["toggle-button"]||this.$stl.button||""}"
739
- type="button"
740
- aria-label="${g}"
741
- aria-pressed="${this.getPasswordVisibility(l)}"
742
- @click=${()=>this.togglePasswordVisibility(l)}
743
- >
744
- ${this.getPasswordVisibility(l)?this.$icons("eye-off"):this.$icons("eye")}
745
- </button>
746
- `:""}
747
- <button
748
- class="${this.$cls["remove-button"]||this.$cls.button||""}"
749
- style="${this.$stl["remove-button"]||this.$stl.button||""}"
750
- type="button"
751
- aria-label="${f}"
752
- ?disabled=${!this.canRemoveRow()}
753
- @click=${()=>this.removeRow(l)}
754
- >
755
- ${this.$icons("trash-2")}
756
- </button>
757
- </div>
758
- </td>
759
- </tr>
760
- `}):""}
761
- </tbody>
762
- </table>
763
- </div>
764
- `}},A([u({type:String})],o.Keyval.prototype,"keys",2),A([u({type:String})],o.Keyval.prototype,"values",2),A([u({type:Boolean})],o.Keyval.prototype,"sensitive",2),A([u({type:Boolean})],o.Keyval.prototype,"noninsertable",2),A([u({type:Number})],o.Keyval.prototype,"max",2),A([u({type:Number})],o.Keyval.prototype,"min",2),A([u({type:String})],o.Keyval.prototype,"aria-label",2),A([m()],o.Keyval.prototype,"valueVisibility",2),A([m()],o.Keyval.prototype,"$cls",2),A([m()],o.Keyval.prototype,"$stl",2),o.Keyval=A([I("uk-keyval")],o.Keyval);var ii=Object.defineProperty,si=Object.getOwnPropertyDescriptor,_=(a,t,e,i)=>{for(var s=i>1?void 0:i?si(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&ii(t,e,s),s};o.Icon=class extends v{constructor(){super(...arguments),this["cls-default-element"]="svg",this["stl-default-element"]="svg",this.icon="",this.label="",this.decorative=!1,this.role="",this["stroke-width"]="2",this.height="16",this.width="16",this.color="",this.fill="none",this.defaultI18n={label:""}}get key(){return this.icon.trim().split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}getEffectiveLabel(){return this.getI18nText("label",this.defaultI18n)||this.label}updated(t){(["icon","stroke-width","height","width","size","color","fill","label","decorative","role","$cls","$stl"].some(i=>t.has(i))||t.has("$i18n"))&&this.updateComplete.then(()=>{this.regenerateSvg()})}regenerateSvg(){this.$svg=this.createSvg({icon:this.key,cls:this.$cls.svg||"",stl:this.$stl.svg||"",height:this.size||this.height,width:this.size||this.width,strokeWidth:this["stroke-width"],color:this.color,fill:this.fill,label:this.getEffectiveLabel(),decorative:this.decorative,role:this.role})}createSvg(t){const{icon:e,cls:i,stl:s,height:n,width:r,strokeWidth:l,color:h,fill:d,label:$,decorative:p,role:f}=t;try{const g=se[e];if(!g){console.warn(`uk-icon: Icon "${this.icon}" not found in Lucide icons.`);return}const b=Ct.createElement(g);if(i&&b.setAttribute("class",i),s&&b.setAttribute("style",s),b.setAttribute("height",n),b.setAttribute("width",r),b.setAttribute("stroke-width",l),d!=="none"&&b.setAttribute("fill",d),h){const w=b.getAttribute("style")||"";b.setAttribute("style",`${w}; color: ${h};`)}return p?(b.setAttribute("aria-hidden","true"),b.removeAttribute("role"),b.removeAttribute("aria-label")):$?(b.setAttribute("role",f||"img"),b.setAttribute("aria-label",$),b.removeAttribute("aria-hidden")):f&&(b.setAttribute("role",f),b.removeAttribute("aria-hidden")),b.setAttribute("data-icon",this.icon),b.setAttribute("data-lucide",this.icon),b}catch(g){console.warn(`uk-icon: Failed to create icon "${this.icon}":`,g);return}}render(){return this.renderRoot.children.length===0?this.$svg:c.nothing}},_([u({type:String})],o.Icon.prototype,"icon",2),_([u({type:String})],o.Icon.prototype,"label",2),_([u({type:Boolean})],o.Icon.prototype,"decorative",2),_([u({type:String})],o.Icon.prototype,"role",2),_([u({type:String})],o.Icon.prototype,"stroke-width",2),_([u({type:String})],o.Icon.prototype,"height",2),_([u({type:String})],o.Icon.prototype,"width",2),_([u({type:String})],o.Icon.prototype,"size",2),_([u({type:String})],o.Icon.prototype,"color",2),_([u({type:String})],o.Icon.prototype,"fill",2),_([m()],o.Icon.prototype,"$svg",2),o.Icon=_([I("uk-icon")],o.Icon);var ni=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,z=(a,t,e,i)=>{for(var s=i>1?void 0:i?ai(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&ni(t,e,s),s};o.Chart=class extends v{constructor(){super(...arguments),this["cls-default-element"]="container",this["stl-default-element"]="container",this.loading=!1,this.width="100%",this.height="auto",this["aria-label"]="",this.hasError=!1,this.errorMessage="",this.apexCharts=null,this.defaultI18n={chartLabel:"Chart",loadingMessage:"Loading chart...",errorMessage:"Failed to load chart. Please try again.",noDataMessage:"No data available"}}get $apexChartsConfig(){return"apexCharts"in this.$config&&typeof this.$config=="object"?this.$config.apexCharts:{}}hasValidConfig(){return Object.keys(this.$apexChartsConfig).length>0}firstUpdated(t){super.firstUpdated(t),this.loading||this.initializeApexCharts()}updated(t){super.updated(t),t.has("loading")&&!this.loading&&!this.apexCharts&&this.initializeApexCharts()}disconnectedCallback(){super.disconnectedCallback(),this.apexCharts&&(this.apexCharts.destroy(),this.apexCharts=null)}onConfigChanged(){if(this.apexCharts&&this.hasValidConfig())try{this.apexCharts.updateOptions(this.$apexChartsConfig,!0,!0),this.hasError=!1,this.errorMessage=""}catch(t){console.error("uk-chart: Failed to update chart:",t),this.hasError=!0,this.errorMessage=t instanceof Error?t.message:"Unknown error"}else!this.apexCharts&&this.hasValidConfig()&&this.initializeApexCharts()}async initializeApexCharts(){const t=this.renderRoot.querySelector("[data-chart-container]");if(!t){console.warn("uk-chart: Chart container not found");return}if(!this.hasValidConfig()){console.warn("uk-chart: No valid chart configuration found"),this.hasError=!0,this.errorMessage=this.getI18nText("noDataMessage",this.defaultI18n);return}if(this.apexCharts===null)try{const e={...this.$apexChartsConfig,chart:{...this.$apexChartsConfig.chart,width:this.width,height:this.height}};this.apexCharts=new ee(t,e),await this.apexCharts.render(),this.isRendered=!0,this.hasError=!1,this.errorMessage=""}catch(e){console.error("uk-chart: Failed to initialize chart:",e),this.hasError=!0,this.errorMessage=e instanceof Error?e.message:this.getI18nText("errorMessage",this.defaultI18n)}}renderLoading(){const t=this.getI18nText("loadingMessage",this.defaultI18n);return c.html`
765
- <div
766
- class="${this.$cls.loading||""}"
767
- style="${this.$stl.loading||""}"
540
+ class="${this.$cls.loading}"
541
+ style="${this.$stl.loading}"
768
542
  role="status"
769
543
  aria-live="polite"
770
544
  aria-label="${t}"
771
545
  >
772
546
  <span>${t}</span>
773
547
  </div>
774
- `}renderError(){const t=this.errorMessage||this.getI18nText("errorMessage",this.defaultI18n);return c.html`
548
+ `}renderError(){const t=this.hasValidConfig()?this.getI18nText("error-message",this.defaultI18n):this.getI18nText("no-data-message",this.defaultI18n);return c.html`
775
549
  <div
776
- class="${this.$cls.error||""}"
777
- part="error"
778
- style="${this.$stl.error||""}"
550
+ class="${this.$cls.error}"
551
+ style="${this.$stl.error}"
779
552
  role="alert"
780
553
  aria-live="assertive"
781
554
  >
782
555
  <span>${t}</span>
783
556
  </div>
784
- `}render(){const t=this["aria-label"]||this.getI18nText("chartLabel",this.defaultI18n);return c.html`
557
+ `}render(){const t=this.getI18nText("chart-label",this.defaultI18n);return c.html`
785
558
  <div
786
559
  data-host-inner
787
- class="${this.$cls.container}"
788
- style="${this.$stl.container}"
560
+ class="${this.$cls["host-inner"]}"
561
+ style="${this.$stl["host-inner"]}"
789
562
  role="img"
790
563
  aria-label="${t}"
791
564
  data-loading="${this.loading}"
@@ -795,13 +568,12 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
795
568
  ${this.loading?this.renderLoading():this.hasError?this.renderError():c.html`
796
569
  <div
797
570
  data-chart-container
798
- class="${this.$cls.chart||""}"
799
- part="chart"
800
- style="${this.$stl.chart||""}"
571
+ class="${this.$cls.chart}"
572
+ style="${this.$stl.chart}"
801
573
  ></div>
802
574
  `}
803
575
  </div>
804
- `}async updateChart(t,e=!0,i=!0){if(this.apexCharts)try{await this.apexCharts.updateOptions(t,e,i),this.hasError=!1,this.errorMessage=""}catch(s){throw console.error("uk-chart: Failed to update chart:",s),this.hasError=!0,this.errorMessage=s instanceof Error?s.message:"Unknown error",s}else throw new Error("Chart not initialized")}async updateSeries(t,e=!0){if(this.apexCharts)try{await this.apexCharts.updateSeries(t,e),this.hasError=!1,this.errorMessage=""}catch(i){throw console.error("uk-chart: Failed to update series:",i),this.hasError=!0,this.errorMessage=i instanceof Error?i.message:"Unknown error",i}else throw new Error("Chart not initialized")}getChartInstance(){return this.apexCharts}},z([u({type:Boolean})],o.Chart.prototype,"loading",2),z([u({type:String})],o.Chart.prototype,"width",2),z([u({type:String})],o.Chart.prototype,"height",2),z([u({type:String})],o.Chart.prototype,"aria-label",2),z([m()],o.Chart.prototype,"hasError",2),z([m()],o.Chart.prototype,"errorMessage",2),o.Chart=z([I("uk-chart")],o.Chart);var ri=Object.defineProperty,_t=(a,t,e,i)=>{for(var s=void 0,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=r(t,e,s)||s);return s&&ri(t,e,s),s};const te=a=>{class t extends a{constructor(){super(...arguments),this.$term="",this.$focused=-1,this.$open=!1,this.selected=null,this.HTMLRectParent=null,this.HTMLRectActive=null}get options(){const i={};return Object.entries(this.$data).forEach(([s,n])=>{const r=n.options.filter(l=>l.data.keywords?.some(h=>h.toLowerCase().includes(this.$term.toLowerCase())));r.length>0&&(i[s]={text:n.text,options:r,...n.data&&{data:n.data}})}),i}get count(){let i=0;for(const s in this.options){const n=this.options[s].options.length;i+=n}return i-1}updated(i){if(super.updated(i),i.has("$term")&&i.get("$term")!==void 0&&(this.dispatchEvent(new CustomEvent(this["search-event"],{detail:{value:this.$term},bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this.$focused=-1})),i.has("$focused")&&this.HTMLRectParent){this.HTMLRectParent.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute("aria-selected");const s=Array.from(this.HTMLRectParent.querySelectorAll('[role="option"]'));this.HTMLRectActive=s[this.$focused],this.HTMLRectActive&&(this.HTMLRectActive.setAttribute("aria-selected","true"),this.focusActiveOption())}}navigate(i){switch(i){case"t":this.$focused<=0?this.$focused=this.count:this.$focused--;break;case"d":this.$focused<this.count?this.$focused++:this.$focused=0;break}}focusActiveOption(i="smooth"){if(this.HTMLRectParent&&this.HTMLRectActive){const s={parent:this.HTMLRectParent.getBoundingClientRect(),active:this.HTMLRectActive.getBoundingClientRect()};this.HTMLRectParent.scrollTo({top:this.HTMLRectActive.offsetTop-this.HTMLRectParent.offsetTop-s.parent.height/2+s.active.height/2,behavior:i})}}onKeydown(i){if(this.$open===!0)switch(i.key){case"ArrowDown":i.preventDefault(),this.navigate("d");break;case"ArrowUp":i.preventDefault(),this.navigate("t");break;case"Enter":if(i.preventDefault(),this.$focused===-1)return;this.onKeydownEnter();break;case"Home":i.preventDefault(),this.$focused=0;break;case"End":i.preventDefault(),this.$focused=this.count;break}}renderList(){const i=this._cls();return c.html`
576
+ `}async updateChart(t,e=!0,i=!0){if(this.apexCharts)try{await this.apexCharts.updateOptions(t,e,i),this.hasError=!1}catch(s){throw console.error("uk-chart: Failed to update chart:",s),this.hasError=!0,s}else throw new Error("Chart not initialized")}async updateSeries(t,e=!0){if(this.apexCharts)try{await this.apexCharts.updateSeries(t,e),this.hasError=!1}catch(i){throw console.error("uk-chart: Failed to update series:",i),this.hasError=!0,i}else throw new Error("Chart not initialized")}getChartInstance(){return this.apexCharts}},V([u({type:Boolean})],o.Chart.prototype,"loading",2),V([u({type:String})],o.Chart.prototype,"width",2),V([u({type:String})],o.Chart.prototype,"height",2),V([m()],o.Chart.prototype,"hasError",2),V([m()],o.Chart.prototype,"$cls",2),V([m()],o.Chart.prototype,"$stl",2),o.Chart=V([_("uk-chart")],o.Chart);var ii=Object.defineProperty,It=(r,t,e,i)=>{for(var s=void 0,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=a(t,e,s)||s);return s&&ii(t,e,s),s};const Xt=r=>{class t extends r{constructor(){super(...arguments),this.$term="",this.$focused=-1,this.$open=!1,this.selected=null,this.HTMLRectParent=null,this.HTMLRectActive=null}get options(){const i={};return Object.entries(this.$data).forEach(([s,n])=>{const a=n.options.filter(h=>h.data.keywords?.some(l=>l.toLowerCase().includes(this.$term.toLowerCase())));a.length>0&&(i[s]={text:n.text,options:a,...n.data&&{data:n.data}})}),i}get count(){let i=0;for(const s in this.options){const n=this.options[s].options.length;i+=n}return i-1}updated(i){if(super.updated(i),i.has("$term")&&i.get("$term")!==void 0&&(this.dispatchEvent(new CustomEvent(this["search-event"],{detail:{value:this.$term},bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this.$focused=-1})),i.has("$focused")&&this.HTMLRectParent){this.HTMLRectParent.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute("aria-selected");const s=Array.from(this.HTMLRectParent.querySelectorAll('[role="option"]'));this.HTMLRectActive=s[this.$focused],this.HTMLRectActive&&(this.HTMLRectActive.setAttribute("aria-selected","true"),this.focusActiveOption())}}navigate(i){switch(i){case"t":this.$focused<=0?this.$focused=this.count:this.$focused--;break;case"d":this.$focused<this.count?this.$focused++:this.$focused=0;break}}focusActiveOption(i="smooth"){if(this.HTMLRectParent&&this.HTMLRectActive){const s={parent:this.HTMLRectParent.getBoundingClientRect(),active:this.HTMLRectActive.getBoundingClientRect()};this.HTMLRectParent.scrollTo({top:this.HTMLRectActive.offsetTop-this.HTMLRectParent.offsetTop-s.parent.height/2+s.active.height/2,behavior:i})}}onKeydown(i){if(this.$open===!0)switch(i.key){case"ArrowDown":i.preventDefault(),this.navigate("d");break;case"ArrowUp":i.preventDefault(),this.navigate("t");break;case"Enter":if(i.preventDefault(),this.$focused===-1)return;this.onKeydownEnter();break;case"Home":i.preventDefault(),this.$focused=0;break;case"End":i.preventDefault(),this.$focused=this.count;break}}renderList(){const i=this._cls();return c.html`
805
577
  <ul
806
578
  class="${i.list}"
807
579
  style="${this.$stl.list}"
@@ -810,9 +582,9 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
810
582
  aria-label="${this.getI18nText("list-label",this.defaultI18n)}"
811
583
  @keydown="${this.onKeydown}"
812
584
  >
813
- ${V(Object.keys(this.options),s=>c.html`
585
+ ${R(Object.keys(this.options),s=>c.html`
814
586
  ${this.renderListHeader(s)}
815
- ${V(this.options[s].options,(n,r)=>this.renderListItem(s,n,r))}
587
+ ${R(this.options[s].options,(n,a)=>this.renderListItem(s,n,a))}
816
588
  `)}
817
589
  </ul>
818
590
  `}renderListHeader(i){const s=this._cls();return i!=="__"?c.html`<li
@@ -865,7 +637,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
865
637
  <path d="m7 15 5 5 5-5" />
866
638
  <path d="m7 9 5-5 5 5" />
867
639
  </svg>
868
- `}}}return _t([m()],t.prototype,"$term"),_t([m()],t.prototype,"$focused"),_t([m()],t.prototype,"$open"),t};var oi=Object.defineProperty,li=Object.getOwnPropertyDescriptor,Y=(a,t,e,i)=>{for(var s=i>1?void 0:i?li(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&oi(t,e,s),s};o.Command=class extends te(v){constructor(){super(...arguments),this["cls-default-element"]="modal",this["stl-default-element"]="modal",this["search-event"]="uk-command:search",this["input-event"]="uk-command:click",this.modifier="ctrl",this.toggle="",this.$cls={modal:"uk-modal uk-flex-top",dialog:"uk-modal-dialog uk-margin-auto-vertical",header:"uk-cmd-header","header-icon":"uk-cmd-header-icon","header-input":"uk-cmd-header-input","header-esc":"uk-cmd-header-esc",list:"uk-overflow-auto uk-nav uk-nav-alt uk-nav-primary uk-nav-cmd uk-cmd-body",item:"","item-header":"uk-nav-header","item-link":"","item-wrapper":"uk-cmd-item-wrapper","item-icon":"uk-cmd-item-icon","item-text":"uk-cmd-item-text","item-key":"uk-cmd-item-key","item-subtitle":"uk-nav-subtitle","escape-button":"uk-button uk-button-default uk-button-small"},this.$stl={modal:"",dialog:"",header:"","header-icon":"","header-input":"","header-esc":"",list:"",item:"","item-header":"","item-link":"","item-wrapper":"","item-icon":"","item-text":"","item-key":"","item-subtitle":"","escape-button":"uk-button uk-button-default uk-button-small"},this.defaultI18n={placeholder:"Search commands...","search-label":"Search","list-label":"Commands","close-label":"Close","modal-label":"Command palette","escape-button-label":"Esc"},this.HTMLModal=null,this.handleGlobalKeydown=t=>{this.getModifierPressed(t)&&t.key===this.key&&(t.preventDefault(),this.HTMLModal&&window.UIkit.modal(this.HTMLModal).toggle())},this.onInputKeydown=t=>{this.$open&&(this.onKeydown(t),Object.values(this.options).forEach(e=>{e.options.forEach(i=>{if(i.data?.key&&this.getModifierPressed(t,i.data?.modifier||"ctrl")&&t.key.toLowerCase()===i.data.key.toLowerCase()){t.preventDefault(),t.stopPropagation(),this.select(i);return}})}))}}get $value(){return""}get $text(){return""}connectedCallback(){super.connectedCallback(),this.key!==void 0&&document.addEventListener("keydown",this.handleGlobalKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.key!==void 0&&document.removeEventListener("keydown",this.handleGlobalKeydown)}firstUpdated(t){super.firstUpdated?.(t),this.HTMLModal=this.renderRoot.querySelector(".uk-modal"),this.HTMLModal&&(this.HTMLRectParent=this.renderRoot.querySelector("ul"),window.UIkit.util.on(this.HTMLModal,"shown",()=>{this.$open=!0,this.focusSearchInput()}),window.UIkit.util.on(this.HTMLModal,"hidden",()=>{this.$open=!1,this.$focused=-1,this.$term=""})),this.isRendered=!0}initializeValue(){}focusSearchInput(){const t=this.renderRoot.querySelector('input[type="text"]');t&&t.focus()}_cls(t){return{button:"",icon:"",list:this.$cls.list,item:t?.item.disabled===!0?"uk-disabled":this.$cls.item,"item-header":this.$cls["item-header"],"item-link":t?.item.disabled===!1?"uk-modal-close":this.$cls["item-link"],"item-wrapper":this.$cls["item-wrapper"],"item-icon":this.$cls["item-icon"],"item-text":this.$cls["item-text"],"item-check":"",search:"","search-input":"","search-icon":"","item-key":this.$cls["item-key"],"item-subtitle":this.$cls["item-subtitle"]}}onClick(t){const{item:e}=t;this.select(e)}onKeydownEnter(){const t=this.HTMLRectActive?.dataset;if(t){const e=t.key,i=t.index;this.select(this.options[e].options[i])}}select(t){t.disabled||(this.HTMLModal&&window.UIkit.modal(this.HTMLModal).hide(),this.dispatchEvent(new CustomEvent("uk-command:click",{detail:{value:t},bubbles:!0,composed:!0})))}renderListItem(t,e,i){const s=this._cls({item:e,index:i}),n=this.getGlobalIndex(t,i);return c.html`
640
+ `}}}return It([m()],t.prototype,"$term"),It([m()],t.prototype,"$focused"),It([m()],t.prototype,"$open"),t};function Qt(r){return r?r.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}var si=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,K=(r,t,e,i)=>{for(var s=i>1?void 0:i?ni(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&si(t,e,s),s};o.Command=class extends Xt(v){constructor(){super(...arguments),this["cls-default-element"]="modal",this["stl-default-element"]="modal",this["search-event"]="uk-command:search",this["input-event"]="uk-command:click",this.modifier="ctrl",this.toggle="",this.$cls={modal:"uk-modal uk-flex-top",dialog:"uk-modal-dialog uk-margin-auto-vertical",header:"uk-cmd-header","header-icon":"uk-cmd-header-icon","header-input":"uk-cmd-header-input","header-esc":"uk-cmd-header-esc",list:"uk-overflow-auto uk-nav uk-nav-alt uk-nav-primary uk-nav-cmd uk-cmd-body",item:"","item-header":"uk-nav-header","item-link":"","item-wrapper":"uk-cmd-item-wrapper","item-icon":"uk-cmd-item-icon","item-text":"uk-cmd-item-text","item-key":"uk-cmd-item-key","item-subtitle":"uk-nav-subtitle","escape-button":"uk-button uk-button-default uk-button-small"},this.$stl={modal:"",dialog:"",header:"","header-icon":"","header-input":"","header-esc":"",list:"",item:"","item-header":"","item-link":"","item-wrapper":"","item-icon":"","item-text":"","item-key":"","item-subtitle":"","escape-button":"uk-button uk-button-default uk-button-small"},this.defaultI18n={placeholder:"Search commands...","search-label":"Search","list-label":"Commands","close-label":"Close","modal-label":"Command palette","escape-button-label":"Esc"},this.HTMLModal=null,this.handleGlobalKeydown=t=>{this.getModifierPressed(t)&&t.key===this.key&&(t.preventDefault(),this.HTMLModal&&window.UIkit.modal(this.HTMLModal).toggle())},this.onInputKeydown=t=>{this.$open&&(this.onKeydown(t),Object.values(this.options).forEach(e=>{e.options.forEach(i=>{if(i.data?.key&&this.getModifierPressed(t,i.data?.modifier||"ctrl")&&t.key.toLowerCase()===i.data.key.toLowerCase()){t.preventDefault(),t.stopPropagation(),this.select(i);return}})}))}}get $value(){return""}get $text(){return""}connectedCallback(){super.connectedCallback(),this.key!==void 0&&document.addEventListener("keydown",this.handleGlobalKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.key!==void 0&&document.removeEventListener("keydown",this.handleGlobalKeydown)}firstUpdated(t){super.firstUpdated?.(t),this.HTMLModal=this.renderRoot.querySelector(".uk-modal"),this.HTMLModal&&(this.HTMLRectParent=this.renderRoot.querySelector("ul"),window.UIkit.util.on(this.HTMLModal,"shown",()=>{this.$open=!0,this.focusSearchInput()}),window.UIkit.util.on(this.HTMLModal,"hidden",()=>{this.$open=!1,this.$focused=-1,this.$term=""})),this.isRendered=!0}initializeValue(){}focusSearchInput(){const t=this.renderRoot.querySelector('input[type="text"]');t&&t.focus()}_cls(t){return{button:"",icon:"",list:this.$cls.list,item:t?.item.disabled===!0?"uk-disabled":this.$cls.item,"item-header":this.$cls["item-header"],"item-link":t?.item.disabled===!1?"uk-modal-close":this.$cls["item-link"],"item-wrapper":this.$cls["item-wrapper"],"item-icon":this.$cls["item-icon"],"item-text":this.$cls["item-text"],"item-check":"",search:"","search-input":"","search-icon":"","item-key":this.$cls["item-key"],"item-subtitle":this.$cls["item-subtitle"]}}onClick(t){const{item:e}=t;this.select(e)}onKeydownEnter(){const t=this.HTMLRectActive?.dataset;if(t){const e=t.key,i=t.index;this.select(this.options[e].options[i])}}select(t){t.disabled||(this.HTMLModal&&window.UIkit.modal(this.HTMLModal).hide(),this.dispatchEvent(new CustomEvent("uk-command:click",{detail:{value:t},bubbles:!0,composed:!0})))}renderListItem(t,e,i){const s=this._cls({item:e,index:i}),n=this.getGlobalIndex(t,i);return c.html`
869
641
  <li
870
642
  class="${s.item}"
871
643
  style="${this.$stl.item}"
@@ -968,11 +740,11 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
968
740
  ${this.renderSearch()} ${this.renderList()}
969
741
  </div>
970
742
  </div>
971
- `}},Y([u({type:String})],o.Command.prototype,"key",2),Y([u({type:String})],o.Command.prototype,"modifier",2),Y([u({type:String})],o.Command.prototype,"toggle",2),Y([m()],o.Command.prototype,"$cls",2),Y([m()],o.Command.prototype,"$stl",2),o.Command=Y([I("uk-command")],o.Command);var hi=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,S=(a,t,e,i)=>{for(var s=i>1?void 0:i?ui(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&hi(t,e,s),s};o.Select=class extends te(N(v)){constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["input-event"]="uk-select:input",this["search-event"]="uk-select:search",this.drop="mode: click; animation: uk-animation-slide-top-small;",this.searchable=!1,this.insertable=!1,this["send-headers"]="",this["send-url"]="",this["send-method"]="POST",this.multiple=!1,this.icon="",this.$selected=[],this.$cls={"host-inner":"uk-position-relative",button:"","button-text":"",icon:"",list:"uk-nav uk-dropdown-nav uk-overflow-auto uk-custom-select-list",item:"","item-active":"uk-active","item-disabled":"uk-disabled","item-header":"uk-nav-header","item-link":"","item-wrapper":"uk-custom-select-item-wrapper","item-icon":"uk-custom-select-item-icon","item-text":"uk-custom-select-item-text","item-check":"","item-subtitle":"",search:"uk-custom-select-search","search-input":"","search-icon":"",dropdown:"uk-select-dropdown",divider:"uk-hr"},this.$stl={"host-inner":"",button:"","button-text":"",icon:"",list:"",item:"","item-active":"uk-active","item-disabled":"uk-disabled","item-header":"","item-link":"","item-wrapper":"","item-icon":"","item-text":"","item-check":"","item-subtitle":"",search:"","search-input":"","search-icon":"",dropdown:"",divider:"uk-hr"},this.defaultI18n={"button-label":"Select an option","selection-count":"{n} options selected","search-placeholder":"Search",insert:"Insert","list-label":"Options"},this.HTMLDrop=null,this.onInputKeydown=t=>{if(this.onKeydown(t),this.$open===!0)switch(t.key){case"Tab":!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.preventDefault();break}}}get $text(){return this.$selected.length===0?this.placeholder!==""?this.placeholder:this.getI18nText("button-label",this.defaultI18n):this.multiple===!1&&this.selected?this.selected.text:this.$selected.length===1&&this.selected?this.selected.text:this.getI18nText("selection-count",this.defaultI18n,{n:this.$selected.length})}get $value(){return this.multiple?this.$selected:this.$selected.length===1?this.$selected[0]:""}get count(){let t=this.insertable&&this.$term!==""&&!this.hasOption(this.$term)?1:0;for(const e in this.options){const i=this.options[e].options.length;t+=i}return t-1}connectedCallback(){super.connectedCallback(),this.insertable&&(this.searchable=!0)}firstUpdated(t){super.firstUpdated?.(t),this.HTMLDrop=this.renderRoot.querySelector(".uk-drop"),this.HTMLDrop&&(this.HTMLRectParent=this.renderRoot.querySelector("ul"),window.UIkit.util.on(this.HTMLDrop,"hidden",()=>{this.$open=!1,this.$focused=-1,this.$term=""}),window.UIkit.util.on(this.HTMLDrop,"shown",()=>{this.$open=!0})),this.updateComplete.then(()=>{if(this.hasAttribute("value"))this.$selected=this.value.split(",").map(e=>e.trim()),this.multiple||(this.$selected=this.$selected.slice(-1)),this.updateSelectedFromValues();else{let e=[];for(const i in this.$data){const s=this.$data[i].options;if(this.multiple)s.forEach(n=>{n.selected&&e.push(n.value)});else{const n=[...s].reverse().find(r=>r.selected);if(n){e=[n.value],this.selected=n;break}}}this.$selected=e,this.multiple&&this.updateSelectedFromValues()}}),this.isRendered=!0}updated(t){super.updated(t),this.isRendered&&t.has("$selected")&&t.get("$selected")!==void 0&&this.emit()}initializeValue(){}select(t){t.disabled||(this.multiple?(this.$selected.findIndex(i=>i===t?.value)===-1?this.$selected=[...this.$selected,t.value]:this.$selected=this.$selected.filter(i=>i!==t.value),this.$selected.length>0&&this.updateSelectedFromValues(),this.requestUpdate()):(this.$selected=[t.value],this.selected=t))}updateSelectedFromValues(){if(this.$selected.length>0){const t=this.$selected[this.$selected.length-1];for(const e in this.$data){const i=this.$data[e].options.find(s=>s.value===t);if(i){this.selected=i;break}}}}onKeydownEnter(){const t=this.HTMLRectActive?.dataset;if(t){const e=t.key,i=t.index;e==="__insert__"?this.insert():this.select(this.options[e].options[i])}}onClick(t){const{item:e}=t;this.select(e)}_cls(t){const e=[this.$cls.item];return t?.item.disabled&&e.push(this.$cls["item-disabled"]),this.$focused===t?.index&&e.push(this.$cls["item-active"]),{button:this.$cls.button,icon:this.$cls.icon,list:this.$cls.list,item:e.join(" "),"item-header":this.$cls["item-header"],"item-link":this.multiple===!1?"uk-drop-close":"","item-wrapper":this.$cls["item-wrapper"],"item-icon":this.$cls["item-icon"],"item-text":this.$cls["item-text"],"item-check":this.$cls["item-check"],"item-subtitle":this.$cls["item-subtitle"],search:this.$cls.search,"search-input":this.$cls["search-input"],"search-icon":this.$cls["search-icon"],dropdown:this.$cls.dropdown}}renderListItem(t,e,i){const s=this._cls({item:e,index:i}),n=this.$selected.includes(e.value),r=this.getGlobalIndex(t,i);return c.html`
743
+ `}},K([u({type:String})],o.Command.prototype,"key",2),K([u({type:String})],o.Command.prototype,"modifier",2),K([u({type:String})],o.Command.prototype,"toggle",2),K([m()],o.Command.prototype,"$cls",2),K([m()],o.Command.prototype,"$stl",2),o.Command=K([_("uk-command")],o.Command);var ri=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,S=(r,t,e,i)=>{for(var s=i>1?void 0:i?ai(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&ri(t,e,s),s};o.Select=class extends Xt(N(v)){constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["input-event"]="uk-select:input",this["search-event"]="uk-select:search",this.drop="mode: click; animation: uk-animation-slide-top-small;",this.searchable=!1,this.insertable=!1,this["send-headers"]="",this["send-url"]="",this["send-method"]="POST",this.multiple=!1,this.icon="",this.$selected=[],this.$cls={"host-inner":"uk-position-relative",button:"","button-text":"",icon:"",list:"uk-nav uk-dropdown-nav uk-overflow-auto uk-custom-select-list",item:"","item-active":"uk-active","item-disabled":"uk-disabled","item-header":"uk-nav-header","item-link":"","item-wrapper":"uk-custom-select-item-wrapper","item-icon":"uk-custom-select-item-icon","item-text":"uk-custom-select-item-text","item-check":"","item-subtitle":"",search:"uk-custom-select-search","search-input":"","search-icon":"",dropdown:"uk-select-dropdown",divider:"uk-hr"},this.$stl={"host-inner":"",button:"","button-text":"",icon:"",list:"",item:"","item-active":"uk-active","item-disabled":"uk-disabled","item-header":"","item-link":"","item-wrapper":"","item-icon":"","item-text":"","item-check":"","item-subtitle":"",search:"","search-input":"","search-icon":"",dropdown:"",divider:"uk-hr"},this.defaultI18n={"button-label":"Select an option","selection-count":"{n} options selected","search-placeholder":"Search",insert:"Insert","list-label":"Options"},this.HTMLDrop=null,this.onInputKeydown=t=>{if(this.onKeydown(t),this.$open===!0)switch(t.key){case"Tab":!t.altKey&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey&&t.preventDefault();break}}}get $text(){return this.$selected.length===0?this.placeholder!==""?this.placeholder:this.getI18nText("button-label",this.defaultI18n):this.multiple===!1&&this.selected?this.selected.text:this.$selected.length===1&&this.selected?this.selected.text:this.getI18nText("selection-count",this.defaultI18n,{n:this.$selected.length})}get $value(){return this.multiple?this.$selected:this.$selected.length===1?this.$selected[0]:""}get count(){let t=this.insertable&&this.$term!==""&&!this.hasOption(this.$term)?1:0;for(const e in this.options){const i=this.options[e].options.length;t+=i}return t-1}connectedCallback(){super.connectedCallback(),this.insertable&&(this.searchable=!0)}firstUpdated(t){super.firstUpdated?.(t),this.HTMLDrop=this.renderRoot.querySelector(".uk-drop"),this.HTMLDrop&&(this.HTMLRectParent=this.renderRoot.querySelector("ul"),window.UIkit.util.on(this.HTMLDrop,"hidden",()=>{this.$open=!1,this.$focused=-1,this.$term=""}),window.UIkit.util.on(this.HTMLDrop,"shown",()=>{this.$open=!0})),this.updateComplete.then(()=>{if(this.hasAttribute("value"))this.$selected=this.value.split(",").map(e=>e.trim()),this.multiple||(this.$selected=this.$selected.slice(-1)),this.updateSelectedFromValues();else{let e=[];for(const i in this.$data){const s=this.$data[i].options;if(this.multiple)s.forEach(n=>{n.selected&&e.push(n.value)});else{const n=[...s].reverse().find(a=>a.selected);if(n){e=[n.value],this.selected=n;break}}}this.$selected=e,this.multiple&&this.updateSelectedFromValues()}}),this.isRendered=!0}updated(t){super.updated(t),this.isRendered&&t.has("$selected")&&t.get("$selected")!==void 0&&this.emit()}initializeValue(){}select(t){t.disabled||(this.multiple?(this.$selected.findIndex(i=>i===t?.value)===-1?this.$selected=[...this.$selected,t.value]:this.$selected=this.$selected.filter(i=>i!==t.value),this.$selected.length>0&&this.updateSelectedFromValues(),this.requestUpdate()):(this.$selected=[t.value],this.selected=t))}updateSelectedFromValues(){if(this.$selected.length>0){const t=this.$selected[this.$selected.length-1];for(const e in this.$data){const i=this.$data[e].options.find(s=>s.value===t);if(i){this.selected=i;break}}}}onKeydownEnter(){const t=this.HTMLRectActive?.dataset;if(t){const e=t.key,i=t.index;e==="__insert__"?this.insert():this.select(this.options[e].options[i])}}onClick(t){const{item:e}=t;this.select(e)}_cls(t){const e=[this.$cls.item];return t?.item.disabled&&e.push(this.$cls["item-disabled"]),this.$focused===t?.index&&e.push(this.$cls["item-active"]),{button:this.$cls.button,icon:this.$cls.icon,list:this.$cls.list,item:e.join(" "),"item-header":this.$cls["item-header"],"item-link":this.multiple===!1?"uk-drop-close":"","item-wrapper":this.$cls["item-wrapper"],"item-icon":this.$cls["item-icon"],"item-text":this.$cls["item-text"],"item-check":this.$cls["item-check"],"item-subtitle":this.$cls["item-subtitle"],search:this.$cls.search,"search-input":this.$cls["search-input"],"search-icon":this.$cls["search-icon"],dropdown:this.$cls.dropdown}}renderListItem(t,e,i){const s=this._cls({item:e,index:i}),n=this.$selected.includes(e.value),a=this.getGlobalIndex(t,i);return c.html`
972
744
  <li
973
745
  class="${s.item}"
974
746
  role="option"
975
- aria-selected="${r===this.$focused?"true":"false"}"
747
+ aria-selected="${a===this.$focused?"true":"false"}"
976
748
  aria-disabled="${e.disabled?"true":"false"}"
977
749
  data-key="${t}"
978
750
  data-index="${i}"
@@ -1048,9 +820,9 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
1048
820
  @keydown="${this.onKeydown}"
1049
821
  >
1050
822
  ${this.insertable&&this.$term&&!this.hasOption(this.$term)?this.renderInsertion():""}
1051
- ${V(Object.keys(this.options),e=>c.html`
823
+ ${R(Object.keys(this.options),e=>c.html`
1052
824
  ${this.renderListHeader(e)}
1053
- ${V(this.options[e].options,(i,s)=>this.renderListItem(e,i,s))}
825
+ ${R(this.options[e].options,(i,s)=>this.renderListItem(e,i,s))}
1054
826
  `)}
1055
827
  </ul>
1056
828
  `}render(){const t=this._cls(),e=this.id?`${this.id}-button`:`uk-select-${Math.random().toString(36).substr(2,9)}`,i=this.id?`${this.id}-listbox`:`uk-listbox-${Math.random().toString(36).substr(2,9)}`;return c.html`
@@ -1094,7 +866,7 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
1094
866
  </div>
1095
867
  ${this.renderHidden()}
1096
868
  </div>
1097
- `}},S([u({type:String})],o.Select.prototype,"drop",2),S([u({type:Boolean})],o.Select.prototype,"searchable",2),S([u({type:Boolean})],o.Select.prototype,"insertable",2),S([u({type:String,attribute:"send-headers"})],o.Select.prototype,"send-headers",2),S([u({type:String,attribute:"send-url"})],o.Select.prototype,"send-url",2),S([u({type:String,attribute:"send-method"})],o.Select.prototype,"send-method",2),S([u({type:Boolean})],o.Select.prototype,"multiple",2),S([u({type:String})],o.Select.prototype,"icon",2),S([m()],o.Select.prototype,"$selected",2),S([m()],o.Select.prototype,"$cls",2),S([m()],o.Select.prototype,"$stl",2),o.Select=S([I("uk-select")],o.Select);var ci=Object.defineProperty,di=Object.getOwnPropertyDescriptor,D=(a,t,e,i)=>{for(var s=i>1?void 0:i?di(t,e):t,n=a.length-1,r;n>=0;n--)(r=a[n])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&ci(t,e,s),s};return o.Lsh=class extends v{constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["change-event"]="uk-lsh:change",this["before-change-event"]="uk-lsh:before-change",this.defaultI18n={ariaLabel:"Toggle theme",activeLabel:"Active",switchToDark:"Switch to dark mode",switchToLight:"Switch to light mode"},this.value="",this.group="",this["prevent-autoupdate"]=!1,this.toggle=!1,this.isActive=!1,this.lshConfig={},this.$i18n={ariaLabel:"Toggle theme",activeLabel:"Active",switchToDark:"Switch to dark mode",switchToLight:"Switch to light mode"},this.$cls={button:"uk-lsh"},this.$stl={button:""},this.boundHandleExternalChange=this.handleExternalChange.bind(this)}connectedCallback(){super.connectedCallback(),this.initializeConfiguration(),this.updateActiveState(),this["prevent-autoupdate"]||document.addEventListener("uk-lsh:change",this.boundHandleExternalChange)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("uk-lsh:change",this.boundHandleExternalChange)}updated(t){super.updated(t),(t.has("value")||t.has("group"))&&this.updateActiveState(),t.has("prevent-autoupdate")&&(this["prevent-autoupdate"]?document.removeEventListener("uk-lsh:change",this.boundHandleExternalChange):document.addEventListener("uk-lsh:change",this.boundHandleExternalChange))}initializeConfiguration(){this.lshConfig.mode=document.documentElement.classList.contains("dark")?"dark":"light";const t=localStorage.getItem("__FRANKEN__");if(t)try{const e=JSON.parse(t);Object.keys(e).forEach(i=>{this.lshConfig[i]=e[i]})}catch(e){console.warn("[uk-lsh] Failed to parse stored configuration:",e)}}saveConfiguration(){try{localStorage.setItem("__FRANKEN__",JSON.stringify(this.lshConfig))}catch(t){console.warn("[uk-lsh] Failed to save configuration:",t)}}emitBeforeChangeEvent(t,e,i){const s=new CustomEvent(this["before-change-event"],{detail:{group:t,value:e,previousValue:i,config:{...this.lshConfig}},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(s)}emitChangeEvent(t,e,i){this.dispatchEvent(new CustomEvent(this["change-event"],{detail:{group:t,value:e,previousValue:i,config:{...this.lshConfig}},bubbles:!0,composed:!0}))}applyThemeValue(t,e){if(!t||!e)return;const i=this.lshConfig[t]||"";if(!this.emitBeforeChangeEvent(t,e,i))return;const n=document.documentElement;if(this.lshConfig[t]=e,t==="mode")e==="dark"?n.classList.add("dark"):n.classList.remove("dark");else{const r=e.split("-").slice(0,2).join("-")+"-",l=Array.from(n.classList).find(h=>h.startsWith(r));l&&n.classList.remove(l),n.classList.add(e)}this.saveConfiguration(),this.emitChangeEvent(t,e,i)}isValueActive(t,e){if(!t||!e)return!1;if(t==="mode"){const i=document.documentElement.classList.contains("dark");return e==="dark"&&i||e==="light"&&!i}else return this.lshConfig[t]===e}updateActiveState(){this.isActive=this.isValueActive(this.group,this.value)}handleExternalChange(t){const e=t;if(e.target===this)return;const{group:i}=e.detail;i===this.group&&this.updateActiveState()}handleClick(){if(this.toggle&&this.group==="mode"){const e=(document.documentElement.classList.contains("dark")?"dark":"light")==="dark"?"light":"dark";this.applyThemeValue("mode",e)}else this.applyThemeValue(this.group,this.value);this.updateActiveState()}handleKeydown(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.handleClick())}getAriaLabel(){if(this.toggle&&this.group==="mode"){const n=(document.documentElement.classList.contains("dark")?"dark":"light")==="dark"?this.getI18nText("switchToLight",this.defaultI18n):this.getI18nText("switchToDark",this.defaultI18n);return`${this.getI18nText("ariaLabel",this.defaultI18n)} (${n})`}const t=this.getI18nText("ariaLabel",this.defaultI18n),e=this.value||"",i=this.isActive?`, ${this.getI18nText("activeLabel",this.defaultI18n)}`:"";return`${t}: ${e}${i}`}render(){return c.html`
869
+ `}},S([u({type:String})],o.Select.prototype,"drop",2),S([u({type:Boolean})],o.Select.prototype,"searchable",2),S([u({type:Boolean})],o.Select.prototype,"insertable",2),S([u({type:String,attribute:"send-headers"})],o.Select.prototype,"send-headers",2),S([u({type:String,attribute:"send-url"})],o.Select.prototype,"send-url",2),S([u({type:String,attribute:"send-method"})],o.Select.prototype,"send-method",2),S([u({type:Boolean})],o.Select.prototype,"multiple",2),S([u({type:String})],o.Select.prototype,"icon",2),S([m()],o.Select.prototype,"$selected",2),S([m()],o.Select.prototype,"$cls",2),S([m()],o.Select.prototype,"$stl",2),o.Select=S([_("uk-select")],o.Select);var oi=Object.defineProperty,li=Object.getOwnPropertyDescriptor,M=(r,t,e,i)=>{for(var s=i>1?void 0:i?li(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&oi(t,e,s),s};return o.Lsh=class extends v{constructor(){super(...arguments),this["cls-default-element"]="button",this["stl-default-element"]="button",this["change-event"]="uk-lsh:change",this["before-change-event"]="uk-lsh:before-change",this.defaultI18n={"aria-label":"Toggle theme","active-label":"Active","switch-to-dark":"Switch to dark mode","switch-to-light":"Switch to light mode"},this.value="",this.group="",this["prevent-autoupdate"]=!1,this.toggle=!1,this.isActive=!1,this.lshConfig={},this.$cls={button:"uk-lsh"},this.$stl={button:""},this.boundHandleExternalChange=this.handleExternalChange.bind(this)}connectedCallback(){super.connectedCallback(),this.initializeConfiguration(),this.updateActiveState(),this["prevent-autoupdate"]||document.addEventListener("uk-lsh:change",this.boundHandleExternalChange)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("uk-lsh:change",this.boundHandleExternalChange)}updated(t){super.updated(t),(t.has("value")||t.has("group"))&&this.updateActiveState(),t.has("prevent-autoupdate")&&(this["prevent-autoupdate"]?document.removeEventListener("uk-lsh:change",this.boundHandleExternalChange):document.addEventListener("uk-lsh:change",this.boundHandleExternalChange))}initializeConfiguration(){this.lshConfig.mode=document.documentElement.classList.contains("dark")?"dark":"light";const t=localStorage.getItem("__FRANKEN__");if(t)try{const e=JSON.parse(t);Object.keys(e).forEach(i=>{this.lshConfig[i]=e[i]})}catch(e){console.warn("[uk-lsh] Failed to parse stored configuration:",e)}}saveConfiguration(){try{localStorage.setItem("__FRANKEN__",JSON.stringify(this.lshConfig))}catch(t){console.warn("[uk-lsh] Failed to save configuration:",t)}}emitBeforeChangeEvent(t,e,i){const s=new CustomEvent(this["before-change-event"],{detail:{group:t,value:e,previousValue:i,config:{...this.lshConfig}},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(s)}emitChangeEvent(t,e,i){this.dispatchEvent(new CustomEvent(this["change-event"],{detail:{group:t,value:e,previousValue:i,config:{...this.lshConfig}},bubbles:!0,composed:!0}))}applyThemeValue(t,e){if(!t||!e)return;const i=this.lshConfig[t]||"";if(!this.emitBeforeChangeEvent(t,e,i))return;const n=document.documentElement;if(this.lshConfig[t]=e,t==="mode")e==="dark"?n.classList.add("dark"):n.classList.remove("dark");else{const a=e.split("-").slice(0,2).join("-")+"-",h=Array.from(n.classList).find(l=>l.startsWith(a));h&&n.classList.remove(h),n.classList.add(e)}this.saveConfiguration(),this.emitChangeEvent(t,e,i)}isValueActive(t,e){if(!t||!e)return!1;if(t==="mode"){const i=document.documentElement.classList.contains("dark");return e==="dark"&&i||e==="light"&&!i}else return this.lshConfig[t]===e}updateActiveState(){this.isActive=this.isValueActive(this.group,this.value)}handleExternalChange(t){const e=t;if(e.target===this)return;const{group:i}=e.detail;i===this.group&&this.updateActiveState()}handleClick(){if(this.toggle&&this.group==="mode"){const e=(document.documentElement.classList.contains("dark")?"dark":"light")==="dark"?"light":"dark";this.applyThemeValue("mode",e)}else this.applyThemeValue(this.group,this.value);this.updateActiveState()}handleKeydown(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.handleClick())}getAriaLabel(){if(this.toggle&&this.group==="mode"){const n=(document.documentElement.classList.contains("dark")?"dark":"light")==="dark"?this.getI18nText("switch-to-light",this.defaultI18n):this.getI18nText("switch-to-dark",this.defaultI18n);return`${this.getI18nText("aria-label",this.defaultI18n)} (${n})`}const t=this.getI18nText("aria-label",this.defaultI18n),e=this.value||"",i=this.isActive?`, ${this.getI18nText("active-label",this.defaultI18n)}`:"";return`${t}: ${e}${i}`}render(){return c.html`
1098
870
  <button
1099
871
  data-host-inner
1100
872
  class="${this.$cls.button} ${this.isActive?"uk-active":""}"
@@ -1105,6 +877,6 @@ var __COMPONENTS__=(function(o,c,Ct,ee){"use strict";function ie(a){const t=Obje
1105
877
  aria-label="${this.getAriaLabel()}"
1106
878
  aria-pressed="${this.isActive}"
1107
879
  >
1108
- ${Ft(this.$template)}
880
+ ${Yt(this.$template)}
1109
881
  </button>
1110
- `}},D([u({type:String})],o.Lsh.prototype,"value",2),D([u({type:String})],o.Lsh.prototype,"group",2),D([u({type:Boolean,attribute:"prevent-autoupdate"})],o.Lsh.prototype,"prevent-autoupdate",2),D([u({type:Boolean})],o.Lsh.prototype,"toggle",2),D([m()],o.Lsh.prototype,"isActive",2),D([m()],o.Lsh.prototype,"lshConfig",2),D([m()],o.Lsh.prototype,"$i18n",2),D([m()],o.Lsh.prototype,"$cls",2),D([m()],o.Lsh.prototype,"$stl",2),o.Lsh=D([I("uk-lsh")],o.Lsh),Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),o})({},Lit,Lucide,ApexCharts);
882
+ `}},M([u({type:String})],o.Lsh.prototype,"value",2),M([u({type:String})],o.Lsh.prototype,"group",2),M([u({type:Boolean})],o.Lsh.prototype,"prevent-autoupdate",2),M([u({type:Boolean})],o.Lsh.prototype,"toggle",2),M([m()],o.Lsh.prototype,"isActive",2),M([m()],o.Lsh.prototype,"lshConfig",2),M([m()],o.Lsh.prototype,"$cls",2),M([m()],o.Lsh.prototype,"$stl",2),o.Lsh=M([_("uk-lsh")],o.Lsh),Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),o})({},Lit,Lucide,ApexCharts);