@nuralyui/checkbox 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle.js CHANGED
@@ -3,213 +3,386 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t=window,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),s=new WeakMap;class o{constructor(t,i,s){if(this._$cssResult$=!0,s!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&s.set(e,t))}return t}toString(){return this.cssText}}const h=(t,...i)=>{const s=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[s+1]),t[0]);return new o(s,t,e)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,e))(i)})(t):t
6
+ const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new WeakMap;class s{constructor(t,e,o){if(this._$cssResult$=!0,o!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=o.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(i,t))}return t}toString(){return this.cssText}}const r=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,i))(e)})(t):t
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */;var n;const l=window,c=l.trustedTypes,d=c?c.emptyScript:"",a=l.reactiveElementPolyfillSupport,u={toAttribute(t,i){switch(i){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},v=(t,i)=>i!==t&&(i==i||t==t),b={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:v},f="finalized";class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Ep(e,i);void 0!==s&&(this._$Ev.set(s,e),t.push(s))})),t}static createProperty(t,i=b){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const o=this[t];this[i]=s,this.requestUpdate(t,o,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||b}static finalize(){if(this.hasOwnProperty(f))return!1;this[f]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(r(t))}else void 0!==t&&i.push(r(t));return i}static _$Ep(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var e;const s=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,s)=>{i?e.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):s.forEach((i=>{const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=i.cssText,e.appendChild(s)}))})(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$EO(t,i,e=b){var s;const o=this.constructor._$Ep(t,e);if(void 0!==o&&!0===e.reflect){const h=(void 0!==(null===(s=e.converter)||void 0===s?void 0:s.toAttribute)?e.converter:u).toAttribute(i,e.type);this._$El=t,null==h?this.removeAttribute(o):this.setAttribute(o,h),this._$El=null}}_$AK(t,i){var e;const s=this.constructor,o=s._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=s.getPropertyOptions(o),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(e=t.converter)||void 0===e?void 0:e.fromAttribute)?t.converter:u;this._$El=o,this[o]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
11
+ */;var n;const l=window,c=l.trustedTypes,a=c?c.emptyScript:"",h=l.reactiveElementPolyfillSupport,d={toAttribute(t,e){switch(e){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},u=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:u},b="finalized";class k extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty(b))return!1;this[b]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var i;const o=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,o)=>{e?i.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((e=>{const o=document.createElement("style"),s=t.litNonce;void 0!==s&&o.setAttribute("nonce",s),o.textContent=e.cssText,i.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=v){var o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:d).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:d;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- var m;p[f]=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==a||a({ReactiveElement:p}),(null!==(n=l.reactiveElementVersions)&&void 0!==n?n:l.reactiveElementVersions=[]).push("1.6.3");const y=window,g=y.trustedTypes,k=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,x="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,$="?"+w,S=`<${$}>`,A=document,E=()=>A.createComment(""),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,_="[ \t\n\f\r]",R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,j=/>/g,T=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,O=/"/g,N=/^(?:script|style|textarea|title)$/i,I=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),P=new WeakMap,L=A.createTreeWalker(A,129,null,!1);function q(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(i):i}class B{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let o=0,h=0;const r=t.length-1,n=this.parts,[l,c]=((t,i)=>{const e=t.length-1,s=[];let o,h=2===i?"<svg>":"",r=R;for(let i=0;i<e;i++){const e=t[i];let n,l,c=-1,d=0;for(;d<e.length&&(r.lastIndex=d,l=r.exec(e),null!==l);)d=r.lastIndex,r===R?"!--"===l[1]?r=U:void 0!==l[1]?r=j:void 0!==l[2]?(N.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=T):void 0!==l[3]&&(r=T):r===T?">"===l[0]?(r=null!=o?o:R,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,n=l[1],r=void 0===l[3]?T:'"'===l[3]?O:M):r===O||r===M?r=T:r===U||r===j?r=R:(r=T,o=void 0);const a=r===T&&t[i+1].startsWith("/>")?" ":"";h+=r===R?e+S:c>=0?(s.push(n),e.slice(0,c)+x+e.slice(c)+w+a):e+w+(-2===c?(s.push(void 0),i):a)}return[q(t,h+(t[e]||"<?>")+(2===i?"</svg>":"")),s]})(t,i);if(this.el=B.createElement(l,e),L.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=L.nextNode())&&n.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith(x)||i.startsWith(w)){const e=c[h++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+x).split(w),i=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?W:"?"===i[1]?J:"@"===i[1]?G:V})}else n.push({type:6,index:o})}for(const i of t)s.removeAttribute(i)}if(N.test(s.tagName)){const t=s.textContent.split(w),i=t.length-1;if(i>0){s.textContent=g?g.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],E()),L.nextNode(),n.push({type:2,index:++o});s.append(t[i],E())}}}else if(8===s.nodeType)if(s.data===$)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(w,t+1));)n.push({type:7,index:o}),t+=w.length-1}o++}}static createElement(t,i){const e=A.createElement("template");return e.innerHTML=t,e}}function F(t,i,e=t,s){var o,h,r,n;if(i===I)return i;let l=void 0!==s?null===(o=e._$Co)||void 0===o?void 0:o[s]:e._$Cl;const c=z(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(h=null==l?void 0:l._$AO)||void 0===h||h.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,e,s)),void 0!==s?(null!==(r=(n=e)._$Co)&&void 0!==r?r:n._$Co=[])[s]=l:e._$Cl=l),void 0!==l&&(i=F(t,l._$AS(t,i.values),l,s)),i}class K{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:s}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:A).importNode(e,!0);L.currentNode=o;let h=L.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new H(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new Q(h,this,t)),this._$AV.push(i),l=s[++n]}r!==(null==l?void 0:l.index)&&(h=L.nextNode(),r++)}return L.currentNode=A,o}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,s){var o;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cp=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=F(this,t,i),z(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==I&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>C(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==D&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=B.createElement(q(s.h,s.h[0]),this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(e);else{const t=new K(o,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=P.get(t.strings);return void 0===i&&P.set(t.strings,i=new B(t)),i}T(t){C(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const o of t)s===i.length?i.push(e=new H(this.k(E()),this.k(E()),this,this.options)):e=i[s],e._$AI(o),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class V{constructor(t,i,e,s,o){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=o,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const o=this.strings;let h=!1;if(void 0===o)t=F(this,t,i,0),h=!z(t)||t!==this._$AH&&t!==I,h&&(this._$AH=t);else{const s=t;let r,n;for(t=o[0],r=0;r<o.length-1;r++)n=F(this,s[e+r],i,r),n===I&&(n=this._$AH[r]),h||(h=!z(n)||n!==this._$AH[r]),n===D?t=D:t!==D&&(t+=(null!=n?n:"")+o[r+1]),this._$AH[r]=n}h&&!s&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const Z=g?g.emptyScript:"";class J extends V{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class G extends V{constructor(t,i,e,s,o){super(t,i,e,s,o),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=F(this,t,i,0))&&void 0!==e?e:D)===I)return;const s=this._$AH,o=t===D&&s!==D||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==D&&(s===D||o);o&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}}const X=y.litHtmlPolyfillSupport;
17
+ var y;k[b]=!0,k.elementProperties=new Map,k.elementStyles=[],k.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:k}),(null!==(n=l.reactiveElementVersions)&&void 0!==n?n:l.reactiveElementVersions=[]).push("1.6.3");const f=window,m=f.trustedTypes,p=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,x="$lit$",g=`lit$${(Math.random()+"").slice(9)}$`,w="?"+g,$=`<${w}>`,S=document,E=()=>S.createComment(""),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,C="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,M=/>/g,I=RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),O=/'/g,L=/"/g,N=/^(?:script|style|textarea|title)$/i,B=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),U=new WeakMap,j=S.createTreeWalker(S,129,null,!1);function D(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==p?p.createHTML(e):e}class K{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[c,a]=((t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=T;for(let e=0;e<i;e++){const i=t[e];let l,c,a=-1,h=0;for(;h<i.length&&(n.lastIndex=h,c=n.exec(i),null!==c);)h=n.lastIndex,n===T?"!--"===c[1]?n=_:void 0!==c[1]?n=M:void 0!==c[2]?(N.test(c[2])&&(s=RegExp("</"+c[2],"g")),n=I):void 0!==c[3]&&(n=I):n===I?">"===c[0]?(n=null!=s?s:T,a=-1):void 0===c[1]?a=-2:(a=n.lastIndex-c[2].length,l=c[1],n=void 0===c[3]?I:'"'===c[3]?L:O):n===L||n===O?n=I:n===_||n===M?n=T:(n=I,s=void 0);const d=n===I&&t[e+1].startsWith("/>")?" ":"";r+=n===T?i+$:a>=0?(o.push(l),i.slice(0,a)+x+i.slice(a)+g+d):i+g+(-2===a?(o.push(void 0),e):d)}return[D(t,r+(t[i]||"<?>")+(2===e?"</svg>":"")),o]})(t,e);if(this.el=K.createElement(c,i),j.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=j.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(x)||e.startsWith(g)){const i=a[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+x).split(g),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?q:"?"===e[1]?W:"@"===e[1]?X:V})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(N.test(o.tagName)){const t=o.textContent.split(g),e=t.length-1;if(e>0){o.textContent=m?m.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],E()),j.nextNode(),l.push({type:2,index:++s});o.append(t[e],E())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(g,t+1));)l.push({type:7,index:s}),t+=g.length-1}s++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function P(t,e,i=t,o){var s,r,n,l;if(e===B)return e;let c=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const a=z(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(r=null==c?void 0:c._$AO)||void 0===r||r.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=c:i._$Cl=c),void 0!==c&&(e=P(t,c._$AS(t,e.values),c,o)),e}class H{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){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(i,!0);j.currentNode=s;let r=j.nextNode(),n=0,l=0,c=o[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new F(r,r.nextSibling,this,t):1===c.type?e=new c.ctor(r,c.name,c.strings,this,t):6===c.type&&(e=new Z(r,this,t)),this._$AV.push(e),c=o[++l]}n!==(null==c?void 0:c.index)&&(r=j.nextNode(),n++)}return j.currentNode=S,s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class F{constructor(t,e,i,o){var s;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),z(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>A(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==R&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(D(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new H(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new K(t)),e}T(t){A(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new F(this.k(E()),this.k(E()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class V{constructor(t,e,i,o,s){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=P(this,t,e,0),r=!z(t)||t!==this._$AH&&t!==B,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=P(this,o[i+n],e,n),l===B&&(l=this._$AH[n]),r||(r=!z(l)||l!==this._$AH[n]),l===R?t=R:t!==R&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const Y=m?m.emptyScript:"";class W extends V{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class X extends V{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=P(this,t,e,0))&&void 0!==i?i:R)===B)return;const o=this._$AH,s=t===R&&o!==R||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==R&&(o===R||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Z{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){P(this,t)}}const G=f.litHtmlPolyfillSupport;
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
22
  */
23
- var Y;null==X||X(B,H),(null!==(m=y.litHtmlVersions)&&void 0!==m?m:y.litHtmlVersions=[]).push("2.8.0");const tt=window,it=tt.trustedTypes,et=it?it.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,ht="?"+ot,rt=`<${ht}>`,nt=document,lt=()=>nt.createComment(""),ct=t=>null===t||"object"!=typeof t&&"function"!=typeof t,dt=Array.isArray,at="[ \t\n\f\r]",ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vt=/-->/g,bt=/>/g,ft=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,mt=/"/g,yt=/^(?:script|style|textarea|title)$/i,gt=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),kt=Symbol.for("lit-noChange"),xt=Symbol.for("lit-nothing"),wt=new WeakMap,$t=nt.createTreeWalker(nt,129,null,!1);function St(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==et?et.createHTML(i):i}const At=(t,i)=>{const e=t.length-1,s=[];let o,h=2===i?"<svg>":"",r=ut;for(let i=0;i<e;i++){const e=t[i];let n,l,c=-1,d=0;for(;d<e.length&&(r.lastIndex=d,l=r.exec(e),null!==l);)d=r.lastIndex,r===ut?"!--"===l[1]?r=vt:void 0!==l[1]?r=bt:void 0!==l[2]?(yt.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=ft):void 0!==l[3]&&(r=ft):r===ft?">"===l[0]?(r=null!=o?o:ut,c=-1):void 0===l[1]?c=-2:(c=r.lastIndex-l[2].length,n=l[1],r=void 0===l[3]?ft:'"'===l[3]?mt:pt):r===mt||r===pt?r=ft:r===vt||r===bt?r=ut:(r=ft,o=void 0);const a=r===ft&&t[i+1].startsWith("/>")?" ":"";h+=r===ut?e+rt:c>=0?(s.push(n),e.slice(0,c)+st+e.slice(c)+ot+a):e+ot+(-2===c?(s.push(void 0),i):a)}return[St(t,h+(t[e]||"<?>")+(2===i?"</svg>":"")),s]};class Et{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let o=0,h=0;const r=t.length-1,n=this.parts,[l,c]=At(t,i);if(this.el=Et.createElement(l,e),$t.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=$t.nextNode())&&n.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith(st)||i.startsWith(ot)){const e=c[h++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+st).split(ot),i=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?Ut:"?"===i[1]?Tt:"@"===i[1]?Mt:Rt})}else n.push({type:6,index:o})}for(const i of t)s.removeAttribute(i)}if(yt.test(s.tagName)){const t=s.textContent.split(ot),i=t.length-1;if(i>0){s.textContent=it?it.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],lt()),$t.nextNode(),n.push({type:2,index:++o});s.append(t[i],lt())}}}else if(8===s.nodeType)if(s.data===ht)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(ot,t+1));)n.push({type:7,index:o}),t+=ot.length-1}o++}}static createElement(t,i){const e=nt.createElement("template");return e.innerHTML=t,e}}function zt(t,i,e=t,s){var o,h,r,n;if(i===kt)return i;let l=void 0!==s?null===(o=e._$Co)||void 0===o?void 0:o[s]:e._$Cl;const c=ct(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(h=null==l?void 0:l._$AO)||void 0===h||h.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,e,s)),void 0!==s?(null!==(r=(n=e)._$Co)&&void 0!==r?r:n._$Co=[])[s]=l:e._$Cl=l),void 0!==l&&(i=zt(t,l._$AS(t,i.values),l,s)),i}class Ct{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:s}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:nt).importNode(e,!0);$t.currentNode=o;let h=$t.nextNode(),r=0,n=0,l=s[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new _t(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new Ot(h,this,t)),this._$AV.push(i),l=s[++n]}r!==(null==l?void 0:l.index)&&(h=$t.nextNode(),r++)}return $t.currentNode=nt,o}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class _t{constructor(t,i,e,s){var o;this.type=2,this._$AH=xt,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cp=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=zt(this,t,i),ct(t)?t===xt||null==t||""===t?(this._$AH!==xt&&this._$AR(),this._$AH=xt):t!==this._$AH&&t!==kt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>dt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==xt&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.$(nt.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Et.createElement(St(s.h,s.h[0]),this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(e);else{const t=new Ct(o,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=wt.get(t.strings);return void 0===i&&wt.set(t.strings,i=new Et(t)),i}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const o of t)s===i.length?i.push(e=new _t(this.k(lt()),this.k(lt()),this,this.options)):e=i[s],e._$AI(o),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Rt{constructor(t,i,e,s,o){this.type=1,this._$AH=xt,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=o,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=xt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const o=this.strings;let h=!1;if(void 0===o)t=zt(this,t,i,0),h=!ct(t)||t!==this._$AH&&t!==kt,h&&(this._$AH=t);else{const s=t;let r,n;for(t=o[0],r=0;r<o.length-1;r++)n=zt(this,s[e+r],i,r),n===kt&&(n=this._$AH[r]),h||(h=!ct(n)||n!==this._$AH[r]),n===xt?t=xt:t!==xt&&(t+=(null!=n?n:"")+o[r+1]),this._$AH[r]=n}h&&!s&&this.j(t)}j(t){t===xt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Ut extends Rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===xt?void 0:t}}const jt=it?it.emptyScript:"";class Tt extends Rt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==xt?this.element.setAttribute(this.name,jt):this.element.removeAttribute(this.name)}}class Mt extends Rt{constructor(t,i,e,s,o){super(t,i,e,s,o),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=zt(this,t,i,0))&&void 0!==e?e:xt)===kt)return;const s=this._$AH,o=t===xt&&s!==xt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==xt&&(s===xt||o);o&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Ot{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){zt(this,t)}}const Nt=tt.litHtmlPolyfillSupport;null==Nt||Nt(Et,_t),(null!==(Y=tt.litHtmlVersions)&&void 0!==Y?Y:tt.litHtmlVersions=[]).push("2.8.0");
23
+ var J;null==G||G(K,F),(null!==(y=f.litHtmlVersions)&&void 0!==y?y:f.litHtmlVersions=[]).push("2.8.0");const Q=window,tt=Q.trustedTypes,et=tt?tt.createPolicy("lit-html",{createHTML:t=>t}):void 0,it="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,st="?"+ot,rt=`<${st}>`,nt=document,lt=()=>nt.createComment(""),ct=t=>null===t||"object"!=typeof t&&"function"!=typeof t,at=Array.isArray,ht="[ \t\n\f\r]",dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,vt=/>/g,bt=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),kt=/'/g,yt=/"/g,ft=/^(?:script|style|textarea|title)$/i,mt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),pt=Symbol.for("lit-noChange"),xt=Symbol.for("lit-nothing"),gt=new WeakMap,wt=nt.createTreeWalker(nt,129,null,!1);function $t(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==et?et.createHTML(e):e}const St=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=dt;for(let e=0;e<i;e++){const i=t[e];let l,c,a=-1,h=0;for(;h<i.length&&(n.lastIndex=h,c=n.exec(i),null!==c);)h=n.lastIndex,n===dt?"!--"===c[1]?n=ut:void 0!==c[1]?n=vt:void 0!==c[2]?(ft.test(c[2])&&(s=RegExp("</"+c[2],"g")),n=bt):void 0!==c[3]&&(n=bt):n===bt?">"===c[0]?(n=null!=s?s:dt,a=-1):void 0===c[1]?a=-2:(a=n.lastIndex-c[2].length,l=c[1],n=void 0===c[3]?bt:'"'===c[3]?yt:kt):n===yt||n===kt?n=bt:n===ut||n===vt?n=dt:(n=bt,s=void 0);const d=n===bt&&t[e+1].startsWith("/>")?" ":"";r+=n===dt?i+rt:a>=0?(o.push(l),i.slice(0,a)+it+i.slice(a)+ot+d):i+ot+(-2===a?(o.push(void 0),e):d)}return[$t(t,r+(t[i]||"<?>")+(2===e?"</svg>":"")),o]};class Et{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[c,a]=St(t,e);if(this.el=Et.createElement(c,i),wt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=wt.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(it)||e.startsWith(ot)){const i=a[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+it).split(ot),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?_t:"?"===e[1]?It:"@"===e[1]?Ot:Tt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(ft.test(o.tagName)){const t=o.textContent.split(ot),e=t.length-1;if(e>0){o.textContent=tt?tt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],lt()),wt.nextNode(),l.push({type:2,index:++s});o.append(t[e],lt())}}}else if(8===o.nodeType)if(o.data===st)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(ot,t+1));)l.push({type:7,index:s}),t+=ot.length-1}s++}}static createElement(t,e){const i=nt.createElement("template");return i.innerHTML=t,i}}function zt(t,e,i=t,o){var s,r,n,l;if(e===pt)return e;let c=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const a=ct(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(r=null==c?void 0:c._$AO)||void 0===r||r.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=c:i._$Cl=c),void 0!==c&&(e=zt(t,c._$AS(t,e.values),c,o)),e}class At{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){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:nt).importNode(i,!0);wt.currentNode=s;let r=wt.nextNode(),n=0,l=0,c=o[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new Ct(r,r.nextSibling,this,t):1===c.type?e=new c.ctor(r,c.name,c.strings,this,t):6===c.type&&(e=new Lt(r,this,t)),this._$AV.push(e),c=o[++l]}n!==(null==c?void 0:c.index)&&(r=wt.nextNode(),n++)}return wt.currentNode=nt,s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ct{constructor(t,e,i,o){var s;this.type=2,this._$AH=xt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=zt(this,t,e),ct(t)?t===xt||null==t||""===t?(this._$AH!==xt&&this._$AR(),this._$AH=xt):t!==this._$AH&&t!==pt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>at(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==xt&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.$(nt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Et.createElement($t(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new At(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=gt.get(t.strings);return void 0===e&&gt.set(t.strings,e=new Et(t)),e}T(t){at(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new Ct(this.k(lt()),this.k(lt()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Tt{constructor(t,e,i,o,s){this.type=1,this._$AH=xt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=xt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=zt(this,t,e,0),r=!ct(t)||t!==this._$AH&&t!==pt,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=zt(this,o[i+n],e,n),l===pt&&(l=this._$AH[n]),r||(r=!ct(l)||l!==this._$AH[n]),l===xt?t=xt:t!==xt&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===xt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class _t extends Tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===xt?void 0:t}}const Mt=tt?tt.emptyScript:"";class It extends Tt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==xt?this.element.setAttribute(this.name,Mt):this.element.removeAttribute(this.name)}}class Ot extends Tt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=zt(this,t,e,0))&&void 0!==i?i:xt)===pt)return;const o=this._$AH,s=t===xt&&o!==xt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==xt&&(o===xt||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Lt{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){zt(this,t)}}const Nt=Q.litHtmlPolyfillSupport;null==Nt||Nt(Et,Ct),(null!==(J=Q.litHtmlVersions)&&void 0!==J?J:Q.litHtmlVersions=[]).push("2.8.0");
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- var It,Dt;class Pt extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,i,e)=>{var s,o;const h=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=h._$litPart$;if(void 0===r){const t=null!==(o=null==e?void 0:e.renderBefore)&&void 0!==o?o:null;h._$litPart$=r=new _t(i.insertBefore(lt(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return kt}}Pt.finalized=!0,Pt._$litElement$=!0,null===(It=globalThis.litElementHydrateSupport)||void 0===It||It.call(globalThis,{LitElement:Pt});const Lt=globalThis.litElementPolyfillSupport;null==Lt||Lt({LitElement:Pt}),(null!==(Dt=globalThis.litElementVersions)&&void 0!==Dt?Dt:globalThis.litElementVersions=[]).push("3.3.3");
29
+ var Bt,Rt;class Ut extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,s;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new Ct(e.insertBefore(lt(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return pt}}Ut.finalized=!0,Ut._$litElement$=!0,null===(Bt=globalThis.litElementHydrateSupport)||void 0===Bt||Bt.call(globalThis,{LitElement:Ut});const jt=globalThis.litElementPolyfillSupport;null==jt||jt({LitElement:Ut}),(null!==(Rt=globalThis.litElementVersions)&&void 0!==Rt?Rt:globalThis.litElementVersions=[]).push("3.3.3");
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  */
35
- const qt=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};
35
+ const Dt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};
36
36
  /**
37
37
  * @license
38
38
  * Copyright 2017 Google LLC
39
39
  * SPDX-License-Identifier: BSD-3-Clause
40
- */function Bt(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):qt(t,i)
40
+ */function Kt(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):Dt(t,e)
41
41
  /**
42
42
  * @license
43
43
  * Copyright 2021 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
- */}var Ft;null===(Ft=window.HTMLSlotElement)||void 0===Ft||Ft.prototype.assignedElements;const Kt=[h`
45
+ */}var Pt;null===(Pt=window.HTMLSlotElement)||void 0===Pt||Pt.prototype.assignedElements;const Ht=((t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new s(o,t,i)})`
46
+ /* ========================================
47
+ * CHECKBOX CSS VARIABLES - FALLBACK VALUES
48
+ * ========================================
49
+ * These fallback values ensure the component works even without theme files
50
+ */
51
+ :host {
52
+ /* Base checkbox appearance */
53
+ --nuraly-checkbox-background: var(--nuraly-color-checkbox-background, #ffffff);
54
+ --nuraly-checkbox-text-color: var(--nuraly-color-checkbox-text, rgba(0, 0, 0, 0.88));
55
+ --nuraly-checkbox-label-color: var(--nuraly-color-checkbox-label, rgba(0, 0, 0, 0.88));
56
+
57
+ /* Checkbox borders and outline */
58
+ --nuraly-checkbox-border: var(--nuraly-border-width-checkbox, 1px) solid var(--nuraly-color-checkbox-border, #d9d9d9);
59
+ --nuraly-checkbox-border-radius: var(--nuraly-border-radius-checkbox, 2px);
60
+ --nuraly-checkbox-border-focus: var(--nuraly-border-width-checkbox, 1px) solid var(--nuraly-color-checkbox-border-focus, #1890ff);
61
+ --nuraly-checkbox-border-hover: var(--nuraly-border-width-checkbox, 1px) solid var(--nuraly-color-checkbox-border-hover, #40a9ff);
62
+
63
+ /* Checked/active states */
64
+ --nuraly-checkbox-checked-background: var(--nuraly-color-checkbox-checked-background, #1890ff);
65
+ --nuraly-checkbox-checked-border: var(--nuraly-color-checkbox-checked-border, #1890ff);
66
+ --nuraly-checkbox-checkmark-color: var(--nuraly-color-checkbox-checkmark, #ffffff);
67
+ --nuraly-checkbox-indeterminate-background: var(--nuraly-color-checkbox-indeterminate-background, #1890ff);
68
+ --nuraly-checkbox-indeterminate-mark-color: var(--nuraly-color-checkbox-indeterminate-mark, #ffffff);
69
+
70
+ /* Disabled states */
71
+ --nuraly-checkbox-disabled-background: var(--nuraly-color-checkbox-disabled-background, #f5f5f5);
72
+ --nuraly-checkbox-disabled-border: var(--nuraly-color-checkbox-disabled-border, #d9d9d9);
73
+ --nuraly-checkbox-disabled-text-color: var(--nuraly-color-checkbox-disabled-text, rgba(0, 0, 0, 0.25));
74
+ --nuraly-checkbox-disabled-checkmark-color: var(--nuraly-color-checkbox-disabled-checkmark, rgba(0, 0, 0, 0.25));
75
+
76
+ /* Focus states */
77
+ --nuraly-checkbox-focus-outline: var(--nuraly-size-checkbox-focus-outline, 2px) solid var(--nuraly-color-checkbox-focus-outline, rgba(24, 144, 255, 0.2));
78
+
79
+ /* Typography */
80
+ --nuraly-checkbox-font-family: var(--nuraly-font-family-checkbox, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif);
81
+ --nuraly-checkbox-font-size: var(--nuraly-font-size-checkbox, 14px);
82
+ --nuraly-checkbox-font-weight: var(--nuraly-font-weight-checkbox, 400);
83
+ --nuraly-checkbox-line-height: var(--nuraly-line-height-checkbox, 1.5715);
84
+
85
+ /* Sizing */
86
+ --nuraly-checkbox-size-small: var(--nuraly-size-checkbox-small, 14px);
87
+ --nuraly-checkbox-size-medium: var(--nuraly-size-checkbox-medium, 16px);
88
+ --nuraly-checkbox-size-large: var(--nuraly-size-checkbox-large, 18px);
89
+
90
+ /* Spacing */
91
+ --nuraly-checkbox-gap: var(--nuraly-spacing-checkbox-gap, 8px);
92
+ --nuraly-checkbox-padding: var(--nuraly-spacing-checkbox-padding, 4px);
93
+
94
+ /* Animation */
95
+ --nuraly-checkbox-transition: var(--nuraly-transition-checkbox, all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1));
96
+
97
+ /* ========================================
98
+ * LEGACY COMPATIBILITY VARIABLES
99
+ * ========================================
100
+ * Keep old variable names for backward compatibility
101
+ * These will be deprecated in future versions
102
+ */
103
+
104
+ /* Legacy local variables for backward compatibility */
105
+ --nuraly-checkbox-local-filled-background-color: var(--nuraly-checkbox-checked-background);
106
+ --nuraly-checkbox-local-color: var(--nuraly-checkbox-text-color);
107
+ --nuraly-checkbox-local-empty-background-color: var(--nuraly-checkbox-background);
108
+ --nuraly-checkbox-local-disabled-background-color: var(--nuraly-checkbox-disabled-background);
109
+ --nuraly-checkbox-local-disabled-text-color: var(--nuraly-checkbox-disabled-text-color);
110
+ --nuraly-checkbox-local-empty-border: var(--nuraly-checkbox-border);
111
+ --nuraly-checkbox-local-symbol-color: var(--nuraly-checkbox-checkmark-color);
112
+ --nuraly-checkbox-local-focus-border: var(--nuraly-checkbox-border-focus);
113
+ --nuraly-checkbox-local-focus-outline: var(--nuraly-checkbox-focus-outline);
114
+ --nuraly-checkbox-local-font-family: var(--nuraly-checkbox-font-family);
115
+ --nuraly-checkbox-local-border-radius: var(--nuraly-checkbox-border-radius);
116
+ --nuraly-checkbox-local-gap: var(--nuraly-checkbox-gap);
117
+
118
+ /* Legacy size variables */
119
+ --nuraly-checkbox-local-medium-width: var(--nuraly-checkbox-size-medium);
120
+ --nuraly-checkbox-local-medium-height: var(--nuraly-checkbox-size-medium);
121
+ --nuraly-checkbox-local-small-width: var(--nuraly-checkbox-size-small);
122
+ --nuraly-checkbox-local-small-height: var(--nuraly-checkbox-size-small);
123
+ --nuraly-checkbox-local-large-width: var(--nuraly-checkbox-size-large);
124
+ --nuraly-checkbox-local-large-height: var(--nuraly-checkbox-size-large);
125
+
126
+ /* Legacy checkmark sizing */
127
+ --nuraly-checkbox-local-small-indeterminate-size: calc(var(--nuraly-checkbox-size-small) * 0.7);
128
+ --nuraly-checkbox-local-large-indeterminate-size: calc(var(--nuraly-checkbox-size-large) * 0.7);
129
+ --nuraly-checkbox-local-medium-indeterminate-size: calc(var(--nuraly-checkbox-size-medium) * 0.7);
130
+
131
+ --nuraly-checkbox-local-small-checked-width: calc(var(--nuraly-checkbox-size-small) * 0.14);
132
+ --nuraly-checkbox-local-small-checked-height: calc(var(--nuraly-checkbox-size-small) * 0.5);
133
+ --nuraly-checkbox-local-medium-checked-width: calc(var(--nuraly-checkbox-size-medium) * 0.19);
134
+ --nuraly-checkbox-local-medium-checked-height: calc(var(--nuraly-checkbox-size-medium) * 0.56);
135
+ --nuraly-checkbox-local-large-checked-width: calc(var(--nuraly-checkbox-size-large) * 0.22);
136
+ --nuraly-checkbox-local-large-checked-height: calc(var(--nuraly-checkbox-size-large) * 0.56);
137
+ }
138
+
139
+ /* ========================================
140
+ * CHECKBOX COMPONENT STYLES
141
+ * ========================================
142
+ * Modern checkbox component with theme-aware styling
143
+ * Uses CSS custom properties for consistent theming
144
+ */
145
+
46
146
  :host {
47
147
  display: flex;
48
148
  align-items: center;
49
149
  flex-wrap: wrap;
50
- gap: var(--hybrid-checkbox-gap, var(--hybrid-checkbox-local-gap));
51
- font-family: var(--hybrid-checkbox-font-family, var(--hybrid-checkbox-local-font-family));
52
- color: var(--hybrid-checkbox-color, var(--hybrid-checkbox-local-color));
150
+ gap: var(--nuraly-checkbox-gap);
151
+ font-family: var(--nuraly-checkbox-font-family);
152
+ font-size: var(--nuraly-checkbox-font-size);
153
+ font-weight: var(--nuraly-checkbox-font-weight);
154
+ line-height: var(--nuraly-checkbox-line-height);
155
+ color: var(--nuraly-checkbox-text-color);
156
+ cursor: pointer;
157
+ transition: var(--nuraly-checkbox-transition);
158
+ }
159
+
160
+ /* ========================================
161
+ * CHECKBOX INPUT ELEMENT STYLES
162
+ * ======================================== */
163
+
164
+ input {
165
+ appearance: none;
166
+ -webkit-appearance: none;
167
+ -moz-appearance: none;
168
+ cursor: pointer;
169
+ position: relative;
170
+ border-radius: var(--nuraly-checkbox-border-radius);
171
+ background-color: var(--nuraly-checkbox-background);
172
+ border: var(--nuraly-checkbox-border);
173
+ transition: var(--nuraly-checkbox-transition);
174
+ margin: 0;
175
+ outline: none;
176
+ }
177
+
178
+ /* ========================================
179
+ * SIZE VARIATIONS
180
+ * ======================================== */
181
+
182
+ /* Medium size (default) */
183
+ input {
184
+ width: var(--nuraly-checkbox-size-medium);
185
+ height: var(--nuraly-checkbox-size-medium);
186
+ }
187
+
188
+ :host([size='small']) input {
189
+ width: var(--nuraly-checkbox-size-small);
190
+ height: var(--nuraly-checkbox-size-small);
191
+ }
192
+
193
+ :host([size='large']) input {
194
+ width: var(--nuraly-checkbox-size-large);
195
+ height: var(--nuraly-checkbox-size-large);
53
196
  }
54
197
 
198
+ /* ========================================
199
+ * CHECKBOX STATE STYLES
200
+ * ======================================== */
201
+
202
+ /* Empty/unchecked state */
55
203
  :host(:not([checked]):not([indeterminate]):not([disabled])) input {
56
- background-color: var(--hybrid-checkbox-empty-background-color, var(--hybrid-checkbox-local-empty-background-color));
57
- border: var(--hybrid-checkbox-empty-border, var(--hybrid-checkbox-local-empty-border));
204
+ background-color: var(--nuraly-checkbox-background);
205
+ border: var(--nuraly-checkbox-border);
58
206
  }
59
207
 
208
+ /* Checked and indeterminate states */
60
209
  :host(:not([disabled])[checked]) input,
61
210
  :host(:not([disabled])[indeterminate]) input {
62
- background-color: var(--hybrid-checkbox-filled-background-color, var(--hybrid-checkbox-local-filled-background-color));
211
+ background-color: var(--nuraly-checkbox-checked-background);
212
+ border: 1px solid var(--nuraly-checkbox-checked-border);
213
+ }
214
+
215
+ /* Hover states for interactive elements */
216
+ :host(:not([disabled]):hover) input {
217
+ border: var(--nuraly-checkbox-border-hover);
218
+ }
219
+
220
+ :host(:not([disabled]):hover[checked]) input,
221
+ :host(:not([disabled]):hover[indeterminate]) input {
222
+ background-color: var(--nuraly-checkbox-checked-background);
223
+ border: 1px solid var(--nuraly-checkbox-border-hover);
224
+ filter: brightness(1.1);
63
225
  }
226
+
227
+ /* Focus states */
228
+ input:focus,
229
+ input:focus-visible {
230
+ border: var(--nuraly-checkbox-border-focus);
231
+ outline: var(--nuraly-checkbox-focus-outline);
232
+ outline-offset: 2px;
233
+ }
234
+
235
+ /* ========================================
236
+ * DISABLED STATE
237
+ * ======================================== */
238
+
64
239
  :host([disabled]) {
65
- color: var(--hybrid-checkbox-disabled-text-color, var(--hybrid-checkbox-local-disabled-text-color));
240
+ color: var(--nuraly-checkbox-disabled-text-color);
241
+ cursor: not-allowed;
66
242
  }
243
+
67
244
  :host([disabled]) input {
68
- background-color: var(--hybrid-checkbox-disabled-background-color, var(--hybrid-checkbox-local-disabled-background-color));
245
+ background-color: var(--nuraly-checkbox-disabled-background);
246
+ border: 1px solid var(--nuraly-checkbox-disabled-border);
69
247
  cursor: not-allowed;
70
248
  }
71
- input {
72
- appearance: none;
73
- width: var(--hybrid-checkbox-medium-width, var(--hybrid-checkbox-local-medium-width));
74
- height: var(--hybrid-checkbox-medium-height, var(--hybrid-checkbox-local-medium-height));
75
- cursor: pointer;
76
- position: relative;
77
- border-radius: var(--hybrid-checkbox-border-radius, var(--hybrid-checkbox-local-border-radius));
78
- }
249
+
250
+ /* ========================================
251
+ * CHECKMARK AND INDETERMINATE SYMBOLS
252
+ * ======================================== */
253
+
254
+ /* Base symbol styling */
79
255
  input:after {
80
- color: var(--hybrid-checkbox-symbol-color, var(--hybrid-checkbox-local-symbol-color));
256
+ color: var(--nuraly-checkbox-checkmark-color);
81
257
  position: absolute;
82
258
  left: 50%;
83
259
  top: 50%;
84
260
  transform: translate(-50%, -51%);
85
- }
86
- input:focus {
87
- border: var(--hybrid-checkbox-focus-border, var(--hybrid-checkbox-local-focus-border));
88
- outline: var(--hybrid-checkbox-focus-outline, var(--hybrid-checkbox-local-focus-outline));
89
- }
90
- :host([size='large']) input {
91
- width: var(--hybrid-checkbox-large-width, var(--hybrid-checkbox-local-large-width));
92
- height: var(--hybrid-checkbox-large-height, var(--hybrid-checkbox-local-large-height));
93
- }
94
- :host([size='small']) input {
95
- width: var(--hybrid-checkbox-small-width, var(--hybrid-checkbox-local-small-width));
96
- height: var(--hybrid-checkbox-small-height, var(--hybrid-checkbox-local-small-height));
97
- }
98
-
99
- :host([indeterminate][size='medium']) input:after {
100
- font-size: var(--hybrid-checkbox-medium-indeterminate-size, var(--hybrid-checkbox-local-medium-indeterminate-size));
101
- }
102
- :host([indeterminate][size='large']) input:after {
103
- font-size: var(--hybrid-checkbox-large-indeterminate-size, var(--hybrid-checkbox-local-large-indeterminate-size));
104
- }
105
-
106
- :host([indeterminate][size='small']) input:after {
107
- font-size: var(--hybrid-checkbox-small-indeterminate-size, var(--hybrid-checkbox-local-small-indeterminate-size));
261
+ transition: var(--nuraly-checkbox-transition);
108
262
  }
109
263
 
264
+ /* Checked state checkmark */
110
265
  :host([checked]) input:after {
111
- border: solid;
266
+ border: solid var(--nuraly-checkbox-checkmark-color);
112
267
  border-width: 0 2px 2px 0;
113
268
  transform: translate(-50%, -51%) rotate(45deg);
114
269
  content: '';
270
+ width: var(--nuraly-checkbox-local-medium-checked-width); /* Default to medium size */
271
+ height: var(--nuraly-checkbox-local-medium-checked-height); /* Default to medium size */
115
272
  }
273
+
274
+ /* Checkmark sizing per size variant */
116
275
  :host([checked][size='small']) input:after {
117
- width: var(--hybrid-checkbox-small-checked-width, var(--hybrid-checkbox-local-small-checked-width));
118
- height: var(--hybrid-checkbox-small-checked-height, var(--hybrid-checkbox-local-small-checked-height));
119
- }
120
- :host([checked][size='large']) input:after {
121
- width: var(--hybrid-checkbox-large-checked-width, var(--hybrid-checkbox-local-large-checked-width));
122
- height: var(--hybrid-checkbox-large-checked-height, var(--hybrid-checkbox-local-large-checked-height));
276
+ width: var(--nuraly-checkbox-local-small-checked-width);
277
+ height: var(--nuraly-checkbox-local-small-checked-height);
123
278
  }
279
+
124
280
  :host([checked][size='medium']) input:after {
125
- width: var(--hybrid-checkbox-medium-checked-width, var(--hybrid-checkbox-local-medium-checked-width));
126
- height: var(--hybrid-checkbox-medium-checked-height, var(--hybrid-checkbox-local-medium-checked-height));
281
+ width: var(--nuraly-checkbox-local-medium-checked-width);
282
+ height: var(--nuraly-checkbox-local-medium-checked-height);
283
+ }
284
+
285
+ :host([checked][size='large']) input:after {
286
+ width: var(--nuraly-checkbox-local-large-checked-width);
287
+ height: var(--nuraly-checkbox-local-large-checked-height);
127
288
  }
128
289
 
290
+ /* Indeterminate state symbol */
129
291
  :host([indeterminate]:not([checked])) input:after {
130
292
  content: '-';
293
+ color: var(--nuraly-checkbox-indeterminate-mark-color);
294
+ font-weight: bold;
295
+ transform: translate(-50%, -51%);
296
+ }
297
+
298
+ /* Indeterminate symbol sizing per size variant */
299
+ :host([indeterminate][size='small']) input:after {
300
+ font-size: var(--nuraly-checkbox-local-small-indeterminate-size);
301
+ }
302
+
303
+ :host([indeterminate][size='medium']) input:after {
304
+ font-size: var(--nuraly-checkbox-local-medium-indeterminate-size);
131
305
  }
306
+
307
+ :host([indeterminate][size='large']) input:after {
308
+ font-size: var(--nuraly-checkbox-local-large-indeterminate-size);
309
+ }
310
+
311
+ /* Empty state - no symbol */
132
312
  :host(:not([checked]):not([indeterminate])) input:after {
133
313
  content: '';
134
314
  }
135
315
 
136
316
  /* ========================================
137
- * DARK THEME OVERRIDES
138
- * ========================================
139
- * Dark theme styles using data-theme attribute on input element
140
- * These override the light theme defaults when data-theme="dark" is applied
141
- */
142
- input[data-theme="dark"] {
143
- --hybrid-checkbox-local-empty-border: 1px solid #ffffff;
144
- --hybrid-checkbox-local-empty-background-color: #161616;
145
- --hybrid-checkbox-local-filled-background-color: #ffffff;
146
- --hybrid-checkbox-local-symbol-color: #161616;
147
- --hybrid-checkbox-local-focus-outline: 2px solid #ffffff;
148
- --hybrid-checkbox-local-focus-border: 2px solid #161616;
149
- --hybrid-checkbox-local-disabled-background-color: #6f6f6f;
150
- --hybrid-checkbox-local-disabled-text-color: #6f6f6f;
317
+ * DISABLED STATE SYMBOLS
318
+ * ======================================== */
319
+
320
+ :host([disabled]) input:after {
321
+ color: var(--nuraly-checkbox-disabled-checkmark-color);
322
+ border-color: var(--nuraly-checkbox-disabled-checkmark-color);
151
323
  }
152
324
 
153
- :host([data-theme="dark"]) {
154
- --hybrid-checkbox-local-color: #ffffff;
325
+ /* ========================================
326
+ * LABEL TEXT STYLING
327
+ * ======================================== */
328
+
329
+ .checkbox-label {
330
+ flex: 1;
331
+ cursor: pointer;
332
+ user-select: none;
333
+ transition: var(--nuraly-checkbox-transition);
155
334
  }
156
- `,h`
157
- :host {
158
- /* Light theme defaults (local component properties) */
159
- --hybrid-checkbox-local-filled-background-color: #161616;
160
- --hybrid-checkbox-local-color: #000000;
161
- --hybrid-checkbox-local-empty-background-color: #ffffff;
162
- --hybrid-checkbox-local-disabled-background-color: #c6c6c6;
163
- --hybrid-checkbox-local-disabled-text-color: #c6c6c6;
164
- --hybrid-checkbox-local-empty-border: 1px solid #161616;
165
- --hybrid-checkbox-local-symbol-color: #ffffff;
166
- --hybrid-checkbox-local-focus-border: 2px solid #ffffff;
167
- --hybrid-checkbox-local-focus-outline: 2px solid #0f62fe;
168
- --hybrid-checkbox-local-font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, SFProLocalRange;
169
- --hybrid-checkbox-local-border-radius: 1px;
170
- --hybrid-checkbox-local-gap: 5px;
171
-
172
- /* Size variables */
173
- --hybrid-checkbox-local-medium-width: 20px;
174
- --hybrid-checkbox-local-medium-height: 20px;
175
- --hybrid-checkbox-local-small-width: 15px;
176
- --hybrid-checkbox-local-small-height: 15px;
177
- --hybrid-checkbox-local-large-width: 25px;
178
- --hybrid-checkbox-local-large-height: 25px;
179
-
180
- --hybrid-checkbox-local-small-indeterminate-size: 10px;
181
- --hybrid-checkbox-local-large-indeterminate-size: 18px;
182
- --hybrid-checkbox-local-medium-indeterminate-size: 13px;
183
-
184
- --hybrid-checkbox-local-small-checked-width: 2px;
185
- --hybrid-checkbox-local-small-checked-height: 7px;
186
- --hybrid-checkbox-local-medium-checked-width: 3px;
187
- --hybrid-checkbox-local-medium-checked-height: 9px;
188
- --hybrid-checkbox-local-large-checked-width: 4px;
189
- --hybrid-checkbox-local-large-checked-height: 10px;
190
- }
191
- `],Ht=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,i;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(i=this.mediaQuery)||void 0===i||i.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,i;const e=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return"dark"===e||"light"===e?e:(null===(i=window.matchMedia)||void 0===i?void 0:i.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"}setupThemeObserver(){this.themeObserver=new MutationObserver((()=>{this.requestUpdate()})),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},Vt=()=>{var t;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(t=process.env)||void 0===t?void 0:t.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},Wt=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(Vt())for(const t of this.requiredComponents)if(!this.isComponentAvailable(t))throw new Error(`Required component "${t}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${t}';`)}validateDependenciesWithHandler(t){if(!Vt())return!0;let i=!0;for(const e of this.requiredComponents)if(!this.isComponentAvailable(e)){i=!1;const s=new Error(`Required component "${e}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(e,s):console.error(s.message)}return i}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter((t=>!this.isComponentAvailable(t)))}areDependenciesAvailable(){return this.requiredComponents.every((t=>this.isComponentAvailable(t)))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const i=this.requiredComponents.indexOf(t);i>-1&&this.requiredComponents.splice(i,1)}},Zt=t=>class extends t{dispatchCustomEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,i){var e;const s=Object.assign(Object.assign({},i),{timestamp:Date.now(),componentName:(null===(e=this.tagName)||void 0===e?void 0:e.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,s)}dispatchInputEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,originalEvent:i.originalEvent},i);this.dispatchCustomEvent(t,e)}dispatchFocusEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,focused:i.focused,cursorPosition:i.cursorPosition,selectedText:i.selectedText},i);this.dispatchCustomEvent(t,e)}dispatchValidationEvent(t,i){var e;const s=Object.assign({target:i.target||this,value:i.value,isValid:null!==(e=i.isValid)&&void 0!==e&&e,error:i.error},i);this.dispatchCustomEvent(t,s)}dispatchActionEvent(t,i){const e=Object.assign({target:i.target||this,action:i.action,previousValue:i.previousValue,newValue:i.newValue},i);this.dispatchCustomEvent(t,e)}isReadonlyKeyAllowed(t){if(t.ctrlKey||t.metaKey){return["KeyA","KeyC"].includes(t.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return"Enter"===t.key||" "===t.key}},Jt=t=>class extends t{get checkboxElement(){var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('input[type="checkbox"]');if(!i)throw new Error("CheckboxFocusMixin requires a checkbox input element");return i}focus(t={}){const i=this.checkboxElement;i&&i.focus({preventScroll:t.preventScroll})}blur(){const t=this.checkboxElement;t&&t.blur()}isFocused(){const t=this.checkboxElement;return!!t&&document.activeElement===t}get nativeElement(){var t;return(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('input[type="checkbox"]'))||null}},Gt=t=>class extends t{handleChange(t){var i;const e=t.target.checked,s=this.name,o=this.value;this.indeterminate&&(this.indeterminate=!1),this.checked=e,null===(i=this.dispatchCustomEvent)||void 0===i||i.call(this,"nr-change",{checked:e,value:o,name:s,indeterminate:!1})}handleFocus(t){var i;null===(i=this.dispatchCustomEvent)||void 0===i||i.call(this,"nr-focus",{originalEvent:t})}handleBlur(t){var i;null===(i=this.dispatchCustomEvent)||void 0===i||i.call(this,"nr-blur",{originalEvent:t})}handleKeydown(t){var i,e,s;if(null===(i=this.isActivationKey)||void 0===i?void 0:i.call(this,t)){t.preventDefault();const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('input[type="checkbox"]'),s=this.disabled;i&&!s&&i.click()}null===(s=this.dispatchCustomEvent)||void 0===s||s.call(this,"nr-keydown",{key:t.key,code:t.code,originalEvent:t})}handleMouseEnter(t){var i;null===(i=this.dispatchCustomEvent)||void 0===i||i.call(this,"nr-mouseenter",{originalEvent:t})}handleMouseLeave(t){var i;null===(i=this.dispatchCustomEvent)||void 0===i||i.call(this,"nr-mouseleave",{originalEvent:t})}};
335
+
336
+ :host([disabled]) .checkbox-label {
337
+ cursor: not-allowed;
338
+ }
339
+
340
+ /* ========================================
341
+ * ACCESSIBILITY IMPROVEMENTS
342
+ * ======================================== */
343
+
344
+ @media (prefers-reduced-motion: reduce) {
345
+ :host,
346
+ input,
347
+ input:after,
348
+ .checkbox-label {
349
+ transition: none;
350
+ }
351
+ }
352
+
353
+ /* High contrast mode support */
354
+ @media (prefers-contrast: high) {
355
+ input {
356
+ border-width: 2px;
357
+ }
358
+
359
+ :host([checked]) input:after,
360
+ :host([indeterminate]) input:after {
361
+ font-weight: 900;
362
+ }
363
+ }
364
+ `,Ft=Ht,Vt=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupDesignSystemObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,e,i;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(e=this.designSystemObserver)||void 0===e||e.disconnect(),null===(i=this.mediaQuery)||void 0===i||i.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,e;const i=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return i||((null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const e=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===e?e:"default"}setupThemeObserver(){this.themeObserver=new MutationObserver((()=>{this.requestUpdate()})),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupDesignSystemObserver(){this.designSystemObserver=new MutationObserver((()=>{this.requestUpdate()})),this.designSystemObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["design-system"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},qt=()=>{var t;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(t=process.env)||void 0===t?void 0:t.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},Yt=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(qt())for(const t of this.requiredComponents)if(!this.isComponentAvailable(t))throw new Error(`Required component "${t}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${t}';`)}validateDependenciesWithHandler(t){if(!qt())return!0;let e=!0;for(const i of this.requiredComponents)if(!this.isComponentAvailable(i)){e=!1;const o=new Error(`Required component "${i}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(i,o):console.error(o.message)}return e}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter((t=>!this.isComponentAvailable(t)))}areDependenciesAvailable(){return this.requiredComponents.every((t=>this.isComponentAvailable(t)))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const e=this.requiredComponents.indexOf(t);e>-1&&this.requiredComponents.splice(e,1)}},Wt=t=>class extends t{dispatchCustomEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,e){var i;const o=Object.assign(Object.assign({},e),{timestamp:Date.now(),componentName:(null===(i=this.tagName)||void 0===i?void 0:i.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,o)}dispatchInputEvent(t,e){const i=Object.assign({target:e.target||this,value:e.value,originalEvent:e.originalEvent},e);this.dispatchCustomEvent(t,i)}dispatchFocusEvent(t,e){const i=Object.assign({target:e.target||this,value:e.value,focused:e.focused,cursorPosition:e.cursorPosition,selectedText:e.selectedText},e);this.dispatchCustomEvent(t,i)}dispatchValidationEvent(t,e){var i;const o=Object.assign({target:e.target||this,value:e.value,isValid:null!==(i=e.isValid)&&void 0!==i&&i,error:e.error},e);this.dispatchCustomEvent(t,o)}dispatchActionEvent(t,e){const i=Object.assign({target:e.target||this,action:e.action,previousValue:e.previousValue,newValue:e.newValue},e);this.dispatchCustomEvent(t,i)}isReadonlyKeyAllowed(t){if(t.ctrlKey||t.metaKey){return["KeyA","KeyC"].includes(t.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return"Enter"===t.key||" "===t.key}},Xt=t=>class extends t{get checkboxElement(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('input[type="checkbox"]');if(!e)throw new Error("CheckboxFocusMixin requires a checkbox input element");return e}focus(t={}){const e=this.checkboxElement;e&&e.focus({preventScroll:t.preventScroll})}blur(){const t=this.checkboxElement;t&&t.blur()}isFocused(){const t=this.checkboxElement;return!!t&&document.activeElement===t}get nativeElement(){var t;return(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('input[type="checkbox"]'))||null}},Zt=t=>class extends t{handleChange(t){var e;const i=t.target.checked,o=this.name,s=this.value;this.indeterminate&&(this.indeterminate=!1),this.checked=i,null===(e=this.dispatchCustomEvent)||void 0===e||e.call(this,"nr-change",{checked:i,value:s,name:o,indeterminate:!1})}handleFocus(t){var e;null===(e=this.dispatchCustomEvent)||void 0===e||e.call(this,"nr-focus",{originalEvent:t})}handleBlur(t){var e;null===(e=this.dispatchCustomEvent)||void 0===e||e.call(this,"nr-blur",{originalEvent:t})}handleKeydown(t){var e,i,o;if(null===(e=this.isActivationKey)||void 0===e?void 0:e.call(this,t)){t.preventDefault();const e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector('input[type="checkbox"]'),o=this.disabled;e&&!o&&e.click()}null===(o=this.dispatchCustomEvent)||void 0===o||o.call(this,"nr-keydown",{key:t.key,code:t.code,originalEvent:t})}handleMouseEnter(t){var e;null===(e=this.dispatchCustomEvent)||void 0===e||e.call(this,"nr-mouseenter",{originalEvent:t})}handleMouseLeave(t){var e;null===(e=this.dispatchCustomEvent)||void 0===e||e.call(this,"nr-mouseleave",{originalEvent:t})}};
192
365
  /**
193
366
  * @license
194
367
  * Copyright 2023 Nuraly, Laabidi Aymen
195
368
  * SPDX-License-Identifier: MIT
196
369
  */
197
- var Qt=function(t,i,e,s){for(var o,h=arguments.length,r=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,n=t.length-1;n>=0;n--)(o=t[n])&&(r=(h<3?o(r):h>3?o(i,e,r):o(i,e))||r);return h>3&&r&&Object.defineProperty(i,e,r),r};let Xt=class extends(Gt(Jt((t=>Wt(Ht(Zt(t))))(Pt)))){constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.indeterminate=!1,this._size="medium",this.autoFocus=!1,this.title="",this.tabIndex=0,this.required=!1,this.id=""}get size(){return this._size}set size(t){["small","medium","large"].includes(t)?this._size=t:(console.warn(`Invalid size value: ${t}. Using default size: medium`),this._size="medium")}connectedCallback(){super.connectedCallback(),this.validateDependencies(),this.autoFocus&&requestAnimationFrame((()=>{this.focus()}))}updated(t){super.updated(t),this.setAttribute("data-theme",this.currentTheme)}getCommonAttributes(){return{"data-theme":this.currentTheme,"data-size":this.size}}render(){var t,i,e;const s=this.getCommonAttributes();return gt`
370
+ var Gt=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Jt=class extends(Zt(Xt((t=>Yt(Vt(Wt(t))))(Ut)))){constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.indeterminate=!1,this._size="medium",this.autoFocus=!1,this.title="",this.tabIndex=0,this.required=!1,this.id=""}get size(){return this._size}set size(t){["small","medium","large"].includes(t)?this._size=t:(console.warn(`Invalid size value: ${t}. Using default size: medium`),this._size="medium")}connectedCallback(){super.connectedCallback(),this.validateDependencies(),this.autoFocus&&requestAnimationFrame((()=>{this.focus()}))}updated(t){super.updated(t),this.setAttribute("data-theme",this.currentTheme)}getCommonAttributes(){return{"data-theme":this.currentTheme,"data-size":this.size}}handleLabelClick(t){this.disabled||(t.preventDefault(),this.checked=!this.checked,this.dispatchEvent(new CustomEvent("nr-change",{detail:{checked:this.checked,value:this.value},bubbles:!0})))}render(){var t,e,i;const o=this.getCommonAttributes();return mt`
198
371
  <input
199
372
  type="checkbox"
200
373
  .checked=${this.checked}
201
374
  .disabled=${this.disabled}
202
375
  .indeterminate=${this.indeterminate}
203
376
  name=${null!==(t=this.name)&&void 0!==t?t:""}
204
- value=${null!==(i=this.value)&&void 0!==i?i:""}
377
+ value=${null!==(e=this.value)&&void 0!==e?e:""}
205
378
  id=${this.id}
206
379
  title=${this.title}
207
380
  ?required=${this.required}
208
- data-theme="${s["data-theme"]}"
209
- data-size="${s["data-size"]}"
381
+ data-theme="${o["data-theme"]}"
382
+ data-size="${o["data-size"]}"
210
383
  aria-checked=${this.indeterminate?"mixed":this.checked?"true":"false"}
211
384
  aria-disabled=${this.disabled?"true":"false"}
212
- tabindex=${this.disabled?-1:null!==(e=this.tabIndex)&&void 0!==e?e:0}
385
+ tabindex=${this.disabled?-1:null!==(i=this.tabIndex)&&void 0!==i?i:0}
213
386
  @change=${this.handleChange}
214
387
  @focus=${this.handleFocus}
215
388
  @blur=${this.handleBlur}
@@ -217,5 +390,7 @@ var Qt=function(t,i,e,s){for(var o,h=arguments.length,r=h<3?i:null===s?s=Object.
217
390
  @mouseenter=${this.handleMouseEnter}
218
391
  @mouseleave=${this.handleMouseLeave}
219
392
  />
220
- <slot></slot>
221
- `}};Xt.styles=Kt,Qt([Bt({type:Boolean,reflect:!0})],Xt.prototype,"checked",void 0),Qt([Bt({type:Boolean,reflect:!0})],Xt.prototype,"disabled",void 0),Qt([Bt({type:Boolean,reflect:!0})],Xt.prototype,"indeterminate",void 0),Qt([Bt({reflect:!0})],Xt.prototype,"size",null),Qt([Bt({type:String})],Xt.prototype,"name",void 0),Qt([Bt({type:String})],Xt.prototype,"value",void 0),Qt([Bt({type:Boolean})],Xt.prototype,"autoFocus",void 0),Qt([Bt({type:String})],Xt.prototype,"title",void 0),Qt([Bt({type:Number})],Xt.prototype,"tabIndex",void 0),Qt([Bt({type:Boolean})],Xt.prototype,"required",void 0),Qt([Bt({type:String})],Xt.prototype,"id",void 0),Xt=Qt([(t=>i=>"function"==typeof i?((t,i)=>(customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:s}=i;return{kind:e,elements:s,finisher(i){customElements.define(t,i)}}})(t,i))("nr-checkbox")],Xt);export{Xt as NrCheckboxElement};
393
+ <label class="checkbox-label" for=${this.id} @click=${this.handleLabelClick}>
394
+ <slot></slot>
395
+ </label>
396
+ `}};Jt.styles=Ft,Gt([Kt({type:Boolean,reflect:!0})],Jt.prototype,"checked",void 0),Gt([Kt({type:Boolean,reflect:!0})],Jt.prototype,"disabled",void 0),Gt([Kt({type:Boolean,reflect:!0})],Jt.prototype,"indeterminate",void 0),Gt([Kt({reflect:!0})],Jt.prototype,"size",null),Gt([Kt({type:String})],Jt.prototype,"name",void 0),Gt([Kt({type:String})],Jt.prototype,"value",void 0),Gt([Kt({type:Boolean})],Jt.prototype,"autoFocus",void 0),Gt([Kt({type:String})],Jt.prototype,"title",void 0),Gt([Kt({type:Number})],Jt.prototype,"tabIndex",void 0),Gt([Kt({type:Boolean})],Jt.prototype,"required",void 0),Gt([Kt({type:String})],Jt.prototype,"id",void 0),Jt=Gt([(t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){customElements.define(t,e)}}})(t,e))("nr-checkbox")],Jt);export{Jt as NrCheckboxElement};