nish-ui 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -8
- package/dist/chart.js +1 -1
- package/dist/elements-all.js +13 -13
- package/dist/elements-charts.js +1 -1
- package/dist/elements-data.js +1 -1
- package/dist/elements-forms.js +1 -1
- package/dist/elements.js +3 -3
- package/dist/esm/components/app-shell.js +145 -45
- package/dist/esm/components/breadcrumbs.js +1 -1
- package/dist/esm/components/calendar-classes.js +325 -0
- package/dist/esm/components/calendar.js +263 -0
- package/dist/esm/components/canvas/route.js +56 -20
- package/dist/esm/components/carousel-classes.js +27 -0
- package/dist/esm/components/carousel.js +317 -0
- package/dist/esm/components/command.js +2 -27
- package/dist/esm/components/context-menu.js +199 -0
- package/dist/esm/components/date-picker.js +208 -0
- package/dist/esm/components/display-classes.js +10 -13
- package/dist/esm/components/display.js +22 -19
- package/dist/esm/components/drawer.js +139 -0
- package/dist/esm/components/filters.js +1 -1
- package/dist/esm/components/flow.js +1 -1
- package/dist/esm/components/hover-card.js +221 -0
- package/dist/esm/components/icons.js +17 -0
- package/dist/esm/components/inbox.js +2 -1
- package/dist/esm/components/lazy-module.js +53 -0
- package/dist/esm/components/menu.js +344 -0
- package/dist/esm/components/modal.js +173 -0
- package/dist/esm/components/more-sheet.js +52 -0
- package/dist/esm/components/multi-select.js +420 -0
- package/dist/esm/components/nav-items.js +138 -0
- package/dist/esm/components/nav.js +13 -174
- package/dist/esm/components/navigate.js +33 -0
- package/dist/esm/components/overlay-core.js +221 -0
- package/dist/esm/components/overlay-dialog.js +255 -0
- package/dist/esm/components/overlay-position.js +163 -0
- package/dist/esm/components/overlay.js +7 -1441
- package/dist/esm/components/popover.js +92 -0
- package/dist/esm/components/segmented.js +2 -1
- package/dist/esm/components/split.js +1 -1
- package/dist/esm/components/strings.js +25 -0
- package/dist/esm/components/tooltip.js +177 -0
- package/dist/esm/components/tree-view-classes.js +57 -0
- package/dist/esm/components/tree-view.js +319 -0
- package/dist/esm/components/virtual-table.js +245 -0
- package/dist/esm/components/virtual.js +291 -0
- package/dist/esm/inbox.js +12 -0
- package/dist/esm/index.js +61 -2
- package/dist/esm/runtime.js +1 -1
- package/dist/esm/service-tokens.js +6 -0
- package/dist/esm/theme.js +2 -2
- package/dist/esm/virtual-range.js +73 -0
- package/dist/format.js +1 -1
- package/dist/inbox.d.ts +238 -0
- package/dist/index.d.ts +1030 -777
- package/dist/nish-components.css +2 -0
- package/dist/nish-components.min.css +1 -1
- package/dist/service-tokens.d.ts +60 -0
- package/dist/theme.d.ts +50 -0
- package/dist/theme.global.js +28 -3
- package/dist/theme.js +28 -3
- package/package.json +17 -1
package/dist/elements-forms.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ge=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var T=function(n,e,t,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!s:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(n,t):s?s.value=t:e.set(n,t),t},_=function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},V,oe,ae,F,xe,G,le,I,q,k,he,qe;var g={__proto__:null};g.enumerable=!0;Object.freeze(g);var $e=(k=class{constructor(e,t={}){if(V.set(this,!1),oe.set(this,!1),ae.set(this,!1),F.set(this,!1),xe.set(this,Date.now()),G.set(this,!1),le.set(this,void 0),I.set(this,void 0),q.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:i,cancelable:s,composed:r}=t;T(this,V,!!s,"f"),T(this,oe,!!i,"f"),T(this,ae,!!r,"f"),T(this,le,`${e}`,"f"),T(this,I,null,"f"),T(this,q,!1,"f")}initEvent(e,t,i){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){T(this,F,!0,"f")}get target(){return _(this,I,"f")}get currentTarget(){return _(this,I,"f")}get srcElement(){return _(this,I,"f")}get type(){return _(this,le,"f")}get cancelable(){return _(this,V,"f")}get defaultPrevented(){return _(this,V,"f")&&_(this,F,"f")}get timeStamp(){return _(this,xe,"f")}composedPath(){return _(this,q,"f")?[_(this,I,"f")]:[]}get returnValue(){return!_(this,V,"f")||!_(this,F,"f")}get bubbles(){return _(this,oe,"f")}get composed(){return _(this,ae,"f")}get eventPhase(){return _(this,q,"f")?k.AT_TARGET:k.NONE}get cancelBubble(){return _(this,G,"f")}set cancelBubble(e){e&&T(this,G,!0,"f")}stopPropagation(){T(this,G,!0,"f")}get isTrusted(){return!1}},V=new WeakMap,oe=new WeakMap,ae=new WeakMap,F=new WeakMap,xe=new WeakMap,G=new WeakMap,le=new WeakMap,I=new WeakMap,q=new WeakMap,k.NONE=0,k.CAPTURING_PHASE=1,k.AT_TARGET=2,k.BUBBLING_PHASE=3,k);Object.defineProperties($e.prototype,{initEvent:g,stopImmediatePropagation:g,preventDefault:g,target:g,currentTarget:g,srcElement:g,type:g,cancelable:g,defaultPrevented:g,timeStamp:g,composedPath:g,returnValue:g,bubbles:g,composed:g,eventPhase:g,cancelBubble:g,stopPropagation:g,isTrusted:g});var Ke=(qe=class extends $e{constructor(e,t={}){super(e,t),he.set(this,void 0),T(this,he,t?.detail??null,"f")}initCustomEvent(e,t,i,s){throw new Error("Method not implemented.")}get detail(){return _(this,he,"f")}},he=new WeakMap,qe);Object.defineProperties(Ke.prototype,{detail:g});var M=$e,Ce=Ke;var w;var Ai=(w=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},w.STYLE_RULE=1,w.CHARSET_RULE=2,w.IMPORT_RULE=3,w.MEDIA_RULE=4,w.FONT_FACE_RULE=5,w.PAGE_RULE=6,w.NAMESPACE_RULE=10,w.KEYFRAMES_RULE=7,w.KEYFRAME_RULE=8,w.SUPPORTS_RULE=12,w.COUNTER_STYLE_RULE=11,w.FONT_FEATURE_VALUES_RULE=14,w.MARGIN_RULE=9,w);globalThis.Event??=M;globalThis.CustomEvent??=Ce;var Le=Symbol(),Ye=n=>typeof n=="boolean"?n:n?.capture??!1,R={__proto__:null};R.enumerable=!0;Object.freeze(R);var ce=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,i){if(t==null)return;let s=Ye(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof i=="object"&&i?i:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,i)),r.set(t,o??{})}removeEventListener(e,t,i){if(t==null)return;let s=Ye(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let i=!1,s=!1,r=M.NONE,o=null,l=null,a=null,u=e.stopPropagation,h=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??l},...R},srcElement:{get(){return e.target},...R},currentTarget:{get(){return a},...R},eventPhase:{get(){return r},...R},composedPath:{value:()=>t,...R},stopPropagation:{value:()=>{i=!0,u.call(e)},...R},stopImmediatePropagation:{value:()=>{s=!0,h.call(e)},...R}});let c=(b,x,H)=>{typeof b=="function"?b(e):typeof b?.handleEvent=="function"&&b.handleEvent(e),x.once&&H.delete(b)},d=()=>(a=null,r=M.NONE,!e.defaultPrevented),v=t.slice().reverse();o=!this.__host||!e.composed?this:null;let f=b=>{for(l=this;l.__host&&b.includes(l.__host);)l=l.__host};for(let b of v){!o&&(!l||l===b.__host)&&f(v.slice(v.indexOf(b))),a=b,r=b===e.target?M.AT_TARGET:M.CAPTURING_PHASE;let x=b.__captureEventListeners.get(e.type);if(x){for(let[H,m]of x)if(c(H,m,x),s)return d()}if(i)return d()}let C=e.bubbles?t:[this];l=null;for(let b of C){!o&&(!l||b===l.__host)&&f(C.slice(0,C.indexOf(b)+1)),a=b,r=b===e.target?M.AT_TARGET:M.BUBBLING_PHASE;let x=b.__eventListeners.get(e.type);if(x){for(let[H,m]of x)if(c(H,m,x),s)return d()}if(i)return d()}return d()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Je,Ut]}};var Xe=new WeakMap,K=n=>{let e=Xe.get(n);return e===void 0&&Xe.set(n,e=new Map),e},Y=class extends ce{getRootNode(e){return e?.composed?Te:this.__host?.__shadowRoot??Te}};var Ze=class extends Y{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Je=new Ze,Te=Je;var Qe=class extends Y{constructor(e){if(super(),e!==Le)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ue,customElements:Re,document:Te,Document:Ze,Element:et,EventTarget:ce,HTMLElement:tt,Node:Y,ShadowRoot:it,window:this,Window:Qe})}};var et=class extends Y{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(K(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){K(this).set(e,String(t))}removeAttribute(e){K(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return K(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new it(Le,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new Ge(this);return this.__internals=e,e}getAttribute(e){return K(this).get(e)??null}};var tt=class extends et{},Me=tt;var it=class extends Y{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new Me,"localName",{get(){return"lit-server-root"}});function It(){let n,e;return{promise:new Promise((i,s)=>{n=i,e=s}),resolve:n,reject:e}}var ue=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
2
|
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let i=this.__pendingWhenDefineds.get(e);return i||(i=It(),this.__pendingWhenDefineds.set(e,i)),i.promise}},Bt=ue;var Re=new Bt,Ut=new Qe(Le);var X=globalThis,pe=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),st=new WeakMap,de=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(pe&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=st.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&st.set(t,e))}return e}toString(){return this.cssText}},rt=n=>new de(typeof n=="string"?n:n+"",void 0,nt);var ot=(n,e)=>{if(pe)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)}},Ne=pe||X.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return rt(t)})(n):n;var{is:Dt,defineProperty:zt,getOwnPropertyDescriptor:Vt,getOwnPropertyNames:Wt,getOwnPropertySymbols:jt,getPrototypeOf:Ft}=Object,J=globalThis;J.customElements??=Re;var at=J.trustedTypes,Gt=at?at.emptyScript:"",qt=J.reactiveElementPolyfillSupport,Z=(n,e)=>n,ke={toAttribute(n,e){switch(e){case Boolean:n=n?Gt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},ht=(n,e)=>!Dt(n,e),lt={attribute:!0,type:String,converter:ke,reflect:!1,useDefault:!1,hasChanged:ht};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;var N=class extends(globalThis.HTMLElement??Me){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=lt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&zt(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:r}=Vt(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let l=s?.call(this);r?.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??lt}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let e=Ft(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let t=this.properties,i=[...Wt(t),...jt(t)];for(let s of i)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let s of i)t.unshift(Ne(s))}else e!==void 0&&t.push(Ne(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ot(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){let r=(i.converter?.toAttribute!==void 0?i.converter:ke).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=i.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:ke;this._$Em=s;let l=o.fromAttribute(t,r.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,i,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),i??=o.getPropertyOptions(e),!((i.hasChanged??ht)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[s,r]of i){let{wrapped:o}=r,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,r,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[Z("elementProperties")]=new Map,N[Z("finalized")]=new Map,qt?.({ReactiveElement:N}),(J.reactiveElementVersions??=[]).push("2.1.2");var fe=globalThis,ct=n=>n,me=fe.trustedTypes,ut=me?me.createPolicy("lit-html",{createHTML:n=>n}):void 0,vt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,gt="?"+P,Kt=`<${gt}>`,D=fe.document===void 0?{createTreeWalker:()=>({})}:document,ee=()=>D.createComment(""),te=n=>n===null||typeof n!="object"&&typeof n!="function",De=Array.isArray,Yt=n=>De(n)||typeof n?.[Symbol.iterator]=="function",Pe=`[
|
|
3
3
|
\f\r]`,Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dt=/-->/g,pt=/>/g,B=RegExp(`>|${Pe}(?:([^\\s"'>=/]+)(${Pe}*=${Pe}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,ft=/"/g,Et=/^(?:script|style|textarea|title)$/i,ze=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),S=ze(1),$=ze(2),ns=ze(3),z=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),bt=new WeakMap,U=D.createTreeWalker(D,129);function yt(n,e){if(!De(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(e):e}var Xt=(n,e)=>{let t=n.length-1,i=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=Q;for(let l=0;l<t;l++){let a=n[l],u,h,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,h=o.exec(a),h!==null);)d=o.lastIndex,o===Q?h[1]==="!--"?o=dt:h[1]!==void 0?o=pt:h[2]!==void 0?(Et.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=B):h[3]!==void 0&&(o=B):o===B?h[0]===">"?(o=s??Q,c=-1):h[1]===void 0?c=-2:(c=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?B:h[3]==='"'?ft:mt):o===ft||o===mt?o=B:o===dt||o===pt?o=Q:(o=B,s=void 0);let v=o===B&&n[l+1].startsWith("/>")?" ":"";r+=o===Q?a+Kt:c>=0?(i.push(u),a.slice(0,c)+vt+a.slice(c)+P+v):a+P+(c===-2?l:v)}return[yt(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ie=class n{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,o=0,l=e.length-1,a=this.parts,[u,h]=Xt(e,t);if(this.el=n.createElement(u,i),U.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=U.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(vt)){let d=h[o++],v=s.getAttribute(c).split(P),f=/([.?@])?(.*)/.exec(d);a.push({type:1,index:r,name:f[2],strings:v,ctor:f[1]==="."?He:f[1]==="?"?Ie:f[1]==="@"?Be:j}),s.removeAttribute(c)}else c.startsWith(P)&&(a.push({type:6,index:r}),s.removeAttribute(c));if(Et.test(s.tagName)){let c=s.textContent.split(P),d=c.length-1;if(d>0){s.textContent=me?me.emptyScript:"";for(let v=0;v<d;v++)s.append(c[v],ee()),U.nextNode(),a.push({type:2,index:++r});s.append(c[d],ee())}}}else if(s.nodeType===8)if(s.data===gt)a.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(P,c+1))!==-1;)a.push({type:7,index:r}),c+=P.length-1}r++}}static createElement(e,t){let i=D.createElement("template");return i.innerHTML=e,i}};function W(n,e,t=n,i){if(e===z)return e;let s=i!==void 0?t._$Co?.[i]:t._$Cl,r=te(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(n),s._$AT(n,t,i)),i!==void 0?(t._$Co??=[])[i]=s:t._$Cl=s),s!==void 0&&(e=W(n,s._$AS(n,e.values),s,i)),e}var Oe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??D).importNode(t,!0);U.currentNode=s;let r=U.nextNode(),o=0,l=0,a=i[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new se(r,r.nextSibling,this,e):a.type===1?u=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(u=new Ue(r,this,e)),this._$AV.push(u),a=i[++l]}o!==a?.index&&(r=U.nextNode(),o++)}return U.currentNode=D,s}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},se=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),te(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Yt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&te(this._$AH)?this._$AA.nextSibling.data=e:this.T(D.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ie.createElement(yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new Oe(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=bt.get(e.strings);return t===void 0&&bt.set(e.strings,t=new ie(e)),t}k(e){De(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let r of e)s===t.length?t.push(i=new n(this.O(ee()),this.O(ee()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let i=ct(e).nextSibling;ct(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}_$AI(e,t=this,i,s){let r=this.strings,o=!1;if(r===void 0)e=W(this,e,t,0),o=!te(e)||e!==this._$AH&&e!==z,o&&(this._$AH=e);else{let l=e,a,u;for(e=r[0],a=0;a<r.length-1;a++)u=W(this,l[i+a],t,a),u===z&&(u=this._$AH[a]),o||=!te(u)||u!==this._$AH[a],u===p?e=p:e!==p&&(e+=(u??"")+r[a+1]),this._$AH[a]=u}o&&!s&&this.j(e)}j(e){e===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},He=class extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p?void 0:e}},Ie=class extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p)}},Be=class extends j{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=W(this,e,t,0)??p)===z)return;let i=this._$AH,s=e===p&&i!==p||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==p&&(i===p||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ue=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e)}};var Zt=fe.litHtmlPolyfillSupport;Zt?.(ie,se),(fe.litHtmlVersions??=[]).push("3.3.3");var _t=(n,e,t)=>{let i=t?.renderBefore??e,s=i._$litPart$;if(s===void 0){let r=t?.renderBefore??null;i._$litPart$=s=new se(e.insertBefore(ee(),r),r,void 0,t??{})}return s._$AI(n),s};var Ve=globalThis,O=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_t(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return z}};O._$litElement$=!0,O.finalized=!0,Ve.litElementHydrateSupport?.({LitElement:O});var Jt=Ve.litElementPolyfillSupport;Jt?.({LitElement:O});(Ve.litElementVersions??=[]).push("4.2.2");var Qt="2.0.2";var ei=Symbol.for("nish-ui.runtime.v1");function ti(){let n=globalThis;return n[ei]??={versions:new Set,slots:{}}}function ii(n){n.versions.add(Qt),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var St=!1;function wt(n,e){let t=ti();return St||(St=!0,ii(t)),n in t.slots||(t.slots[n]=e()),t.slots[n]}var At={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function We(){return wt("element-strings",()=>({values:{...At},listeners:new Set}))}function si(n){let e=We(),t={...e.values};for(let[i,s]of Object.entries(n))s!==void 0&&Object.hasOwn(At,i)&&(t[i]=s);e.values=t;for(let i of Array.from(e.listeners))i()}function A(){return We().values}function xt(n){let e=We().listeners;return e.add(n),()=>{e.delete(n)}}var E=class extends O{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=xt(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function L(n){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n,{once:!0}):n()}function y(n,e){customElements.get(n)||customElements.define(n,e)}function ne(n){return!!n&&getComputedStyle(n).direction==="rtl"}var $t="http://www.w3.org/2000/svg";function ni(n,e){let t=document.createElementNS($t,"svg");for(let[i,s]of Object.entries({width:String(n),height:String(n),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))t.setAttribute(i,s);for(let i of e){let s=document.createElementNS($t,"path");s.setAttribute("d",i),t.appendChild(s)}return t}var Ct=n=>ni(n,["M18 6 6 18M6 6l12 12"]);var be=class extends E{static properties={label:{type:String,reflect:!0},scrollable:{attribute:"scroll",type:Boolean,reflect:!0},single:{type:Boolean,reflect:!0}};#e=null;#i=null;#t=null;#n=e=>this.#d(e);constructor(){super(),this.label="",this.scrollable=!1,this.single=!1}get values(){return this.#e?this.#a().filter(e=>e.getAttribute("aria-pressed")==="true").map(e=>this.#r(e)):this.#t??[]}set values(e){if(!this.#e){this.#t=[...e];return}let t=new Set(e),i=!1;for(let s of this.#a()){let r=t.has(this.#r(s))&&!(this.single&&i);r&&(i=!0),s.setAttribute("aria-pressed",String(r))}}connectedCallback(){super.connectedCallback(),L(()=>this.#l())}disconnectedCallback(){super.disconnectedCallback(),this.#i?.disconnect(),this.#i=null,this.#e?.removeEventListener("click",this.#n),this.#e=null}updated(e){this.#s(),this.#o()}#o(){if(!this.#e)return;let e=A();for(let t of this.#a()){let i=t.querySelector(":scope > [data-nish-remove]");if(!i)continue;let s=this.#c(t);i.setAttribute("aria-label",s?e.removeNamed(s):e.remove)}}#a(){return this.#e?Array.from(this.#e.querySelectorAll(":scope > button, :scope > .nish-chip")):[]}#c(e){let t="";return e.childNodes.forEach(i=>{(i.nodeType===Node.TEXT_NODE||i instanceof HTMLElement&&!i.hasAttribute("data-nish-remove"))&&(t+=i.textContent??"")}),t.trim()}#r(e){return e.getAttribute("value")??this.#c(e)}#l(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > div.nish-chips");if(!e){for(e=document.createElement("div"),e.className="nish-chips";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,e.setAttribute("role","group"),e.addEventListener("click",this.#n),this.#s(),this.#u(),this.#t&&(this.values=this.#t,this.#t=null),this.#i=new MutationObserver(()=>{this.#i?.disconnect(),this.#u(),this.#h()}),this.#h()}#h(){this.#e&&this.#i?.observe(this.#e,{childList:!0})}#s(){this.#e&&(this.label?this.#e.setAttribute("aria-label",this.label):this.#e.removeAttribute("aria-label"),this.#e.classList.toggle("nish-chips--scroll",this.scrollable))}#u(){for(let e of this.#a())if(e.classList.add("nish-chip"),e instanceof HTMLButtonElement)e.hasAttribute("type")||(e.type="button"),e.hasAttribute("aria-pressed")||e.setAttribute("aria-pressed","false");else if(e.hasAttribute("data-removable")&&!e.querySelector(":scope > [data-nish-remove]")){let t=this.#c(e),i=document.createElement("button");i.type="button",i.className="nish-icon-btn nish-icon-btn--xs",i.setAttribute("data-nish-remove",""),i.setAttribute("aria-label",t?A().removeNamed(t):A().remove),i.appendChild(Ct(12)),e.appendChild(i)}}#d(e){let t=e.target;if(!t||!this.#e)return;let i=t.closest("[data-nish-remove]");if(i&&this.#e.contains(i)){let o=i.parentElement,l=this.#r(o);o.remove(),this.dispatchEvent(new CustomEvent("nish-remove",{bubbles:!0,detail:{value:l}}));return}let s=t.closest("button");if(!s||s.parentElement!==this.#e||s.disabled||!s.hasAttribute("aria-pressed"))return;let r=s.getAttribute("aria-pressed")!=="true";if(r&&this.single)for(let o of this.#a())o!==s&&o.hasAttribute("aria-pressed")&&o.setAttribute("aria-pressed","false");s.setAttribute("aria-pressed",String(r)),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:{values:this.values}}))}};y("nish-chip-group",be);var Tt=(n,e)=>{let t=e.trim().toLowerCase();return t?n.label.toLowerCase().includes(t)||(n.hint?.toLowerCase().includes(t)??!1):!0};var ai=0,Lt="http://www.w3.org/2000/svg",li="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function Mt(n){let e=document.createElementNS(Lt,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","16"),e.setAttribute("height","16"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("aria-hidden","true");let t=document.createElementNS(Lt,"path");return t.setAttribute("d",n),e.append(t),e}var ve=class extends E{static properties={value:{type:String,reflect:!0},placeholder:{type:String},label:{type:String},allowCustom:{type:Boolean,attribute:"allow-custom",reflect:!0},emptyText:{type:String,attribute:"empty-text"},size:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},loading:{type:Boolean,reflect:!0},name:{type:String},options:{attribute:!1},filter:{attribute:!1}};#e=++ai;#i=null;#t=null;#n=null;#o=null;#a=null;#c=null;#r=!1;#l="";#h=!1;#s=-1;#u;#d=!1;constructor(){super(),this.value=null,this.placeholder=null,this.label=null,this.allowCustom=!1,this.emptyText="",this.size=null,this.disabled=!1,this.loading=!1,this.name=null,this.options=[],this.filter=null}get input(){return this.#t}connectedCallback(){if(super.connectedCallback(),this.#i){this.#p();return}this.#d||(this.#d=!0,L(()=>{this.#d=!1,this.isConnected&&this.#f()}))}disconnectedCallback(){super.disconnectedCallback(),window.clearTimeout(this.#u),this.#m()}#f(){if(this.#i)return;let e=Array.from(this.querySelectorAll(":scope > option")),t=e.map(a=>({value:a.value,label:a.textContent?.trim()??a.value,hint:a.dataset.hint||void 0,disabled:a.disabled||void 0}));for(let a of e)a.remove();this.options.length===0&&t.length>0&&(this.options=t);let i=document.createElement("div");i.className="nish-combobox";let s=document.createElement("input");s.type="text",s.className="nish-input nish-combobox-input",s.setAttribute("role","combobox"),s.setAttribute("aria-autocomplete","list"),s.setAttribute("aria-expanded","false"),s.autocomplete="off",s.setAttribute("autocapitalize","off"),s.spellcheck=!1,s.addEventListener("input",()=>this.#M(s.value)),s.addEventListener("keydown",a=>this.#R(a)),s.addEventListener("focus",()=>this.#A()),s.addEventListener("click",()=>this.#A()),s.addEventListener("blur",()=>{this.#$()||(this.#m(),this.#E(),this.#p())}),s.addEventListener("change",a=>a.stopPropagation());let r=document.createElement("button");r.type="button",r.className="nish-icon-btn nish-combobox-clear",r.tabIndex=-1,r.hidden=!0,r.append(Mt("M18 6 6 18M6 6l12 12")),r.addEventListener("mousedown",a=>a.preventDefault()),r.addEventListener("click",()=>{this.#m(),this.#g(null,null),s.focus()});let o=document.createElement("span");o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.style.cssText=li;let l=document.createElement("input");l.type="hidden",i.append(s,r,o),this.append(i,l),this.#i=i,this.#t=s,this.#n=r,this.#o=o,this.#c=l,this.#p()}updated(e){e.has("value")&&e.get("value")!==void 0&&this.#E(),e.has("disabled")&&this.disabled&&this.#m(),(e.has("options")||e.has("filter")||e.has("loading"))&&this.#T(),this.#p()}get#b(){return this.options.find(e=>e.value===this.value)??null}get#w(){return this.value!=null&&this.value!==""}get#C(){return this.#h?this.#l:this.#b?.label??this.value??""}get#v(){let e=this.filter??Tt;return(this.#h?this.options.filter(i=>e(i,this.#l)):this.options).slice(0,50)}#T(){this.#s>=this.#v.length&&(this.#s=-1)}#E(){this.#h=!1,this.#l=""}#A(){if(this.#r||this.disabled||!this.#t)return;this.#r=!0;let e=this.#b,t=e?this.#v.findIndex(i=>i.value===e.value):-1;this.#s=t>=0?t:-1,this.#p()}#m(){this.#r=!1,this.#s=-1,this.#a?.remove(),this.#a=null,this.#t&&(this.#t.setAttribute("aria-expanded","false"),this.#t.removeAttribute("aria-controls"),this.#t.removeAttribute("aria-activedescendant")),this.#o&&(this.#o.textContent="")}#y(e,t){let i=this.#v,s=i.length;if(s===0)return-1;let r=e;for(let o=0;o<s;o++)if(r=(r+t+s)%s,!i[r].disabled)return r;return-1}#_(e){return e===1?this.#y(-1,1):this.#y(0,-1)}#g(e,t){this.value=e,this.#E(),this.#p();let i={value:e,option:t};this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:i}))}#x(e){e.disabled||(this.#m(),this.#g(e.value,e))}#$(){return!this.#h||this.#l.trim()!==""||!this.#w?!1:(this.#m(),this.#g(null,null),!0)}#L(){let e=this.#l.trim();if(!this.allowCustom||!this.#h||!e)return!1;let t=this.options.find(i=>!i.disabled&&i.label.toLowerCase()===e.toLowerCase());return this.#m(),t?this.#g(t.value,t):this.#g(e,null),!0}#M(e){this.#l=e,this.#h=!0,this.#r=!0,this.allowCustom||e.trim()===""?this.#s=-1:this.#s=this.#v.findIndex(t=>!t.disabled),window.clearTimeout(this.#u),this.#u=window.setTimeout(()=>{this.dispatchEvent(new CustomEvent("nish-query",{bubbles:!0,detail:{query:e}}))},200),this.#p()}#R(e){if(this.disabled)return;let t=this.#v;switch(e.key){case"ArrowDown":case"ArrowUp":{e.preventDefault();let i=e.key==="ArrowDown"?1:-1;if(this.#r){this.#S(this.#s<0?this.#_(i):this.#y(this.#s,i));break}else{this.#r=!0;let s=this.#b,r=s?t.findIndex(o=>o.value===s.value):-1;this.#s=r>=0?r:this.#_(i)}this.#p();break}case"Home":case"End":this.#r&&(e.preventDefault(),this.#S(this.#_(e.key==="Home"?1:-1)));break;case"Enter":this.#r&&this.#s>=0&&t[this.#s]?(e.preventDefault(),this.#x(t[this.#s])):(this.#$()||this.#L()||this.#r)&&e.preventDefault();break;case"Escape":this.#r?(e.preventDefault(),e.stopPropagation(),this.#m(),this.#p()):this.#h&&(e.preventDefault(),e.stopPropagation(),this.#E(),this.#p());break;case"Tab":this.#m();break}}#p(){let e=this.#t,t=this.#i;if(!e||!t||!this.#n||!this.#c||!this.#o)return;t.classList.toggle("nish-combobox--sm",this.size==="sm");let i=this.#C;e.value!==i&&(e.value=i),e.disabled=this.disabled,this.placeholder?e.placeholder=this.placeholder:e.removeAttribute("placeholder"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"),this.#n.setAttribute("aria-label",A().clear),this.#n.hidden=!(this.#w&&!this.disabled);let s=this.#c;if(this.name?s.name=this.name:s.removeAttribute("name"),s.value=this.value??"",s.disabled=this.disabled,!this.#r){this.#a&&this.#m();return}this.#N(e,t,this.#o)}#S(e){let t=this.#s;this.#s=e;let i=this.#a,s=this.#t;if(!i||!s||!this.#r){this.#p();return}i.querySelector("[data-active]")?.removeAttribute("data-active");let r=e>=0?i.querySelector(`[data-index="${e}"]`):null;if(!r){t!==e?this.#p():s.removeAttribute("aria-activedescendant");return}r.dataset.active="",s.setAttribute("aria-activedescendant",r.id),r.scrollIntoView?.({block:"nearest"})}#N(e,t,i){let s=A(),r=`nish-cb-list-${this.#e}`,o=this.#v,l=this.#b,a=this.#a;if(!a){a=document.createElement("ul"),a.id=r,a.className="nish-combobox-list",a.setAttribute("role","listbox");let h=c=>{let d=c.target?.closest("li[data-index]");if(!d||!a.contains(d))return null;let v=Number(d.dataset.index),f=this.#v[v];return f?{o:f,i:v}:null};a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("mousemove",c=>{let d=h(c);d&&!d.o.disabled&&this.#s!==d.i&&this.#S(d.i)}),a.addEventListener("click",c=>{let d=h(c);d&&this.#x(d.o)}),this.#a=a,t.append(a)}this.label?(a.setAttribute("aria-label",this.label),a.removeAttribute("aria-labelledby")):(a.removeAttribute("aria-label"),e.id||(e.id=`nish-cb-${this.#e}`),a.setAttribute("aria-labelledby",e.id));let u=o.map((h,c)=>{let d=document.createElement("li");d.id=`${r}-opt-${c}`,d.className="nish-combobox-option",d.setAttribute("role","option"),d.dataset.index=String(c),d.setAttribute("aria-selected",String(l?.value===h.value)),h.disabled&&d.setAttribute("aria-disabled","true"),c===this.#s&&(d.dataset.active="");let v=document.createElement("span");if(v.className="nish-combobox-label",v.textContent=h.label,d.append(v),h.hint){let f=document.createElement("span");f.className="nish-combobox-hint",f.textContent=h.hint,d.append(f)}return l?.value===h.value&&d.append(Mt("M20 6 9 17l-5-5")),d});if(this.loading){let h=document.createElement("li");h.setAttribute("role","presentation"),h.className="nish-combobox-loading";let c=document.createElement("span");c.className="nish-spinner nish-spinner--sm",c.setAttribute("aria-hidden","true"),h.append(c,document.createTextNode(s.searching)),u.push(h)}else if(o.length===0){let h=document.createElement("li");h.setAttribute("role","presentation"),h.className="nish-combobox-empty",h.textContent=this.emptyText||s.noMatches,u.push(h)}a.replaceChildren(...u),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls",r),this.#s>=0&&o[this.#s]?e.setAttribute("aria-activedescendant",`${r}-opt-${this.#s}`):e.removeAttribute("aria-activedescendant"),i.textContent=this.loading?s.searching:o.length===0?this.emptyText||s.noMatches:s.resultCount(o.length),this.#k(a,e),a.querySelector(`[data-index="${this.#s}"]`)?.scrollIntoView?.({block:"nearest"})}#k(e,t){e.style.top="",e.style.bottom="",e.style.marginTop="",e.style.marginBottom="",delete e.dataset.above;let i=t.getBoundingClientRect(),s=e.getBoundingClientRect().height,r=window.innerHeight-i.bottom;s>r&&i.top>r&&(e.dataset.above="",e.style.top="auto",e.style.bottom="100%",e.style.marginTop="0",e.style.marginBottom="4px")}};y("nish-combobox",ve);var Rt=1500,Nt="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0",hi=$`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>`,ci=$`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--nish-ok)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg>`;async function ui(n){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(n),!0}catch{}let e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.cssText="position:fixed;top:-1000px;opacity:0";let t=document.activeElement;document.body.appendChild(e),e.select();let i=!1;try{i=document.execCommand("copy")}catch{i=!1}return e.remove(),t?.focus?.(),i}var ge=class extends E{static properties={value:{type:String,reflect:!0},for:{type:String,reflect:!0},label:{type:String,reflect:!0},copiedLabel:{attribute:"copied-label",reflect:!0},icon:{type:Boolean,reflect:!0},copied:{state:!0},manual:{state:!0}};#e=null;constructor(){super(),this.value=null,this.for=null,this.label="",this.copiedLabel="",this.icon=!1,this.copied=!1,this.manual=!1}disconnectedCallback(){super.disconnectedCallback(),this.#e&&clearTimeout(this.#e),this.#e=null,this.copied=!1,this.manual=!1}#i(){return this.value!=null?this.value:(this.for?document.getElementById(this.for):null)?.textContent??""}async#t(){let e=this.#i();if(!await ui(e)){await this.#n();return}this.manual=!1,this.copied=!0,this.dispatchEvent(new CustomEvent("nish-copy",{bubbles:!0,detail:{text:e}})),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.copied=!1,this.#e=null},Rt)}async#n(){this.copied=!1,this.manual=!0,await this.updateComplete;let e=this.value==null&&this.for?document.getElementById(this.for):null;if(e){let t=document.createRange();t.selectNodeContents(e);let i=window.getSelection();i?.removeAllRanges(),i?.addRange(t)}else{let t=this.querySelector("textarea[data-copy-source]");t?.focus(),t?.select()}this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{document.activeElement?.matches("textarea[data-copy-source]")&&this.contains(document.activeElement)&&this.querySelector("button")?.focus(),this.manual=!1,this.#e=null},Rt)}render(){let e=A(),t=this.copiedLabel||e.copied,i=this.copied?t:this.manual?e.copyManual:this.label||e.copy,s=this.copied?ci:hi;return S`${this.icon?S`<button type="button" class="nish-icon-btn nish-icon-btn--sm nish-copy-btn" aria-label=${i} title=${i} ?data-copied=${this.copied} @click=${()=>this.#t()}>
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,ft=/"/g,Et=/^(?:script|style|textarea|title)$/i,ze=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),S=ze(1),$=ze(2),ns=ze(3),z=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),bt=new WeakMap,U=D.createTreeWalker(D,129);function yt(n,e){if(!De(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(e):e}var Xt=(n,e)=>{let t=n.length-1,i=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=Q;for(let l=0;l<t;l++){let a=n[l],u,h,c=-1,d=0;for(;d<a.length&&(o.lastIndex=d,h=o.exec(a),h!==null);)d=o.lastIndex,o===Q?h[1]==="!--"?o=dt:h[1]!==void 0?o=pt:h[2]!==void 0?(Et.test(h[2])&&(s=RegExp("</"+h[2],"g")),o=B):h[3]!==void 0&&(o=B):o===B?h[0]===">"?(o=s??Q,c=-1):h[1]===void 0?c=-2:(c=o.lastIndex-h[2].length,u=h[1],o=h[3]===void 0?B:h[3]==='"'?ft:mt):o===ft||o===mt?o=B:o===dt||o===pt?o=Q:(o=B,s=void 0);let v=o===B&&n[l+1].startsWith("/>")?" ":"";r+=o===Q?a+Kt:c>=0?(i.push(u),a.slice(0,c)+vt+a.slice(c)+P+v):a+P+(c===-2?l:v)}return[yt(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ie=class n{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,o=0,l=e.length-1,a=this.parts,[u,h]=Xt(e,t);if(this.el=n.createElement(u,i),U.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=U.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(vt)){let d=h[o++],v=s.getAttribute(c).split(P),f=/([.?@])?(.*)/.exec(d);a.push({type:1,index:r,name:f[2],strings:v,ctor:f[1]==="."?He:f[1]==="?"?Ie:f[1]==="@"?Be:j}),s.removeAttribute(c)}else c.startsWith(P)&&(a.push({type:6,index:r}),s.removeAttribute(c));if(Et.test(s.tagName)){let c=s.textContent.split(P),d=c.length-1;if(d>0){s.textContent=me?me.emptyScript:"";for(let v=0;v<d;v++)s.append(c[v],ee()),U.nextNode(),a.push({type:2,index:++r});s.append(c[d],ee())}}}else if(s.nodeType===8)if(s.data===gt)a.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(P,c+1))!==-1;)a.push({type:7,index:r}),c+=P.length-1}r++}}static createElement(e,t){let i=D.createElement("template");return i.innerHTML=e,i}};function W(n,e,t=n,i){if(e===z)return e;let s=i!==void 0?t._$Co?.[i]:t._$Cl,r=te(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(n),s._$AT(n,t,i)),i!==void 0?(t._$Co??=[])[i]=s:t._$Cl=s),s!==void 0&&(e=W(n,s._$AS(n,e.values),s,i)),e}var Oe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??D).importNode(t,!0);U.currentNode=s;let r=U.nextNode(),o=0,l=0,a=i[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new se(r,r.nextSibling,this,e):a.type===1?u=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(u=new Ue(r,this,e)),this._$AV.push(u),a=i[++l]}o!==a?.index&&(r=U.nextNode(),o++)}return U.currentNode=D,s}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},se=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),te(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Yt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&te(this._$AH)?this._$AA.nextSibling.data=e:this.T(D.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ie.createElement(yt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new Oe(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=bt.get(e.strings);return t===void 0&&bt.set(e.strings,t=new ie(e)),t}k(e){De(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let r of e)s===t.length?t.push(i=new n(this.O(ee()),this.O(ee()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let i=ct(e).nextSibling;ct(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},j=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}_$AI(e,t=this,i,s){let r=this.strings,o=!1;if(r===void 0)e=W(this,e,t,0),o=!te(e)||e!==this._$AH&&e!==z,o&&(this._$AH=e);else{let l=e,a,u;for(e=r[0],a=0;a<r.length-1;a++)u=W(this,l[i+a],t,a),u===z&&(u=this._$AH[a]),o||=!te(u)||u!==this._$AH[a],u===p?e=p:e!==p&&(e+=(u??"")+r[a+1]),this._$AH[a]=u}o&&!s&&this.j(e)}j(e){e===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},He=class extends j{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===p?void 0:e}},Ie=class extends j{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==p)}},Be=class extends j{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=W(this,e,t,0)??p)===z)return;let i=this._$AH,s=e===p&&i!==p||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==p&&(i===p||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ue=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e)}};var Zt=fe.litHtmlPolyfillSupport;Zt?.(ie,se),(fe.litHtmlVersions??=[]).push("3.3.3");var _t=(n,e,t)=>{let i=t?.renderBefore??e,s=i._$litPart$;if(s===void 0){let r=t?.renderBefore??null;i._$litPart$=s=new se(e.insertBefore(ee(),r),r,void 0,t??{})}return s._$AI(n),s};var Ve=globalThis,O=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_t(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return z}};O._$litElement$=!0,O.finalized=!0,Ve.litElementHydrateSupport?.({LitElement:O});var Jt=Ve.litElementPolyfillSupport;Jt?.({LitElement:O});(Ve.litElementVersions??=[]).push("4.2.2");var Qt="2.1.0";var ei=Symbol.for("nish-ui.runtime.v1");function ti(){let n=globalThis;return n[ei]??={versions:new Set,slots:{}}}function ii(n){n.versions.add(Qt),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var St=!1;function wt(n,e){let t=ti();return St||(St=!0,ii(t)),n in t.slots||(t.slots[n]=e()),t.slots[n]}var At={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function We(){return wt("element-strings",()=>({values:{...At},listeners:new Set}))}function si(n){let e=We(),t={...e.values};for(let[i,s]of Object.entries(n))s!==void 0&&Object.hasOwn(At,i)&&(t[i]=s);e.values=t;for(let i of Array.from(e.listeners))i()}function A(){return We().values}function xt(n){let e=We().listeners;return e.add(n),()=>{e.delete(n)}}var E=class extends O{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=xt(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function L(n){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n,{once:!0}):n()}function y(n,e){customElements.get(n)||customElements.define(n,e)}function ne(n){return!!n&&getComputedStyle(n).direction==="rtl"}var $t="http://www.w3.org/2000/svg";function ni(n,e){let t=document.createElementNS($t,"svg");for(let[i,s]of Object.entries({width:String(n),height:String(n),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))t.setAttribute(i,s);for(let i of e){let s=document.createElementNS($t,"path");s.setAttribute("d",i),t.appendChild(s)}return t}var Ct=n=>ni(n,["M18 6 6 18M6 6l12 12"]);var be=class extends E{static properties={label:{type:String,reflect:!0},scrollable:{attribute:"scroll",type:Boolean,reflect:!0},single:{type:Boolean,reflect:!0}};#e=null;#i=null;#t=null;#n=e=>this.#d(e);constructor(){super(),this.label="",this.scrollable=!1,this.single=!1}get values(){return this.#e?this.#a().filter(e=>e.getAttribute("aria-pressed")==="true").map(e=>this.#r(e)):this.#t??[]}set values(e){if(!this.#e){this.#t=[...e];return}let t=new Set(e),i=!1;for(let s of this.#a()){let r=t.has(this.#r(s))&&!(this.single&&i);r&&(i=!0),s.setAttribute("aria-pressed",String(r))}}connectedCallback(){super.connectedCallback(),L(()=>this.#l())}disconnectedCallback(){super.disconnectedCallback(),this.#i?.disconnect(),this.#i=null,this.#e?.removeEventListener("click",this.#n),this.#e=null}updated(e){this.#s(),this.#o()}#o(){if(!this.#e)return;let e=A();for(let t of this.#a()){let i=t.querySelector(":scope > [data-nish-remove]");if(!i)continue;let s=this.#c(t);i.setAttribute("aria-label",s?e.removeNamed(s):e.remove)}}#a(){return this.#e?Array.from(this.#e.querySelectorAll(":scope > button, :scope > .nish-chip")):[]}#c(e){let t="";return e.childNodes.forEach(i=>{(i.nodeType===Node.TEXT_NODE||i instanceof HTMLElement&&!i.hasAttribute("data-nish-remove"))&&(t+=i.textContent??"")}),t.trim()}#r(e){return e.getAttribute("value")??this.#c(e)}#l(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > div.nish-chips");if(!e){for(e=document.createElement("div"),e.className="nish-chips";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,e.setAttribute("role","group"),e.addEventListener("click",this.#n),this.#s(),this.#u(),this.#t&&(this.values=this.#t,this.#t=null),this.#i=new MutationObserver(()=>{this.#i?.disconnect(),this.#u(),this.#h()}),this.#h()}#h(){this.#e&&this.#i?.observe(this.#e,{childList:!0})}#s(){this.#e&&(this.label?this.#e.setAttribute("aria-label",this.label):this.#e.removeAttribute("aria-label"),this.#e.classList.toggle("nish-chips--scroll",this.scrollable))}#u(){for(let e of this.#a())if(e.classList.add("nish-chip"),e instanceof HTMLButtonElement)e.hasAttribute("type")||(e.type="button"),e.hasAttribute("aria-pressed")||e.setAttribute("aria-pressed","false");else if(e.hasAttribute("data-removable")&&!e.querySelector(":scope > [data-nish-remove]")){let t=this.#c(e),i=document.createElement("button");i.type="button",i.className="nish-icon-btn nish-icon-btn--xs",i.setAttribute("data-nish-remove",""),i.setAttribute("aria-label",t?A().removeNamed(t):A().remove),i.appendChild(Ct(12)),e.appendChild(i)}}#d(e){let t=e.target;if(!t||!this.#e)return;let i=t.closest("[data-nish-remove]");if(i&&this.#e.contains(i)){let o=i.parentElement,l=this.#r(o);o.remove(),this.dispatchEvent(new CustomEvent("nish-remove",{bubbles:!0,detail:{value:l}}));return}let s=t.closest("button");if(!s||s.parentElement!==this.#e||s.disabled||!s.hasAttribute("aria-pressed"))return;let r=s.getAttribute("aria-pressed")!=="true";if(r&&this.single)for(let o of this.#a())o!==s&&o.hasAttribute("aria-pressed")&&o.setAttribute("aria-pressed","false");s.setAttribute("aria-pressed",String(r)),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:{values:this.values}}))}};y("nish-chip-group",be);var Tt=(n,e)=>{let t=e.trim().toLowerCase();return t?n.label.toLowerCase().includes(t)||(n.hint?.toLowerCase().includes(t)??!1):!0};var ai=0,Lt="http://www.w3.org/2000/svg",li="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function Mt(n){let e=document.createElementNS(Lt,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","16"),e.setAttribute("height","16"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("aria-hidden","true");let t=document.createElementNS(Lt,"path");return t.setAttribute("d",n),e.append(t),e}var ve=class extends E{static properties={value:{type:String,reflect:!0},placeholder:{type:String},label:{type:String},allowCustom:{type:Boolean,attribute:"allow-custom",reflect:!0},emptyText:{type:String,attribute:"empty-text"},size:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},loading:{type:Boolean,reflect:!0},name:{type:String},options:{attribute:!1},filter:{attribute:!1}};#e=++ai;#i=null;#t=null;#n=null;#o=null;#a=null;#c=null;#r=!1;#l="";#h=!1;#s=-1;#u;#d=!1;constructor(){super(),this.value=null,this.placeholder=null,this.label=null,this.allowCustom=!1,this.emptyText="",this.size=null,this.disabled=!1,this.loading=!1,this.name=null,this.options=[],this.filter=null}get input(){return this.#t}connectedCallback(){if(super.connectedCallback(),this.#i){this.#p();return}this.#d||(this.#d=!0,L(()=>{this.#d=!1,this.isConnected&&this.#f()}))}disconnectedCallback(){super.disconnectedCallback(),window.clearTimeout(this.#u),this.#m()}#f(){if(this.#i)return;let e=Array.from(this.querySelectorAll(":scope > option")),t=e.map(a=>({value:a.value,label:a.textContent?.trim()??a.value,hint:a.dataset.hint||void 0,disabled:a.disabled||void 0}));for(let a of e)a.remove();this.options.length===0&&t.length>0&&(this.options=t);let i=document.createElement("div");i.className="nish-combobox";let s=document.createElement("input");s.type="text",s.className="nish-input nish-combobox-input",s.setAttribute("role","combobox"),s.setAttribute("aria-autocomplete","list"),s.setAttribute("aria-expanded","false"),s.autocomplete="off",s.setAttribute("autocapitalize","off"),s.spellcheck=!1,s.addEventListener("input",()=>this.#M(s.value)),s.addEventListener("keydown",a=>this.#R(a)),s.addEventListener("focus",()=>this.#A()),s.addEventListener("click",()=>this.#A()),s.addEventListener("blur",()=>{this.#$()||(this.#m(),this.#E(),this.#p())}),s.addEventListener("change",a=>a.stopPropagation());let r=document.createElement("button");r.type="button",r.className="nish-icon-btn nish-combobox-clear",r.tabIndex=-1,r.hidden=!0,r.append(Mt("M18 6 6 18M6 6l12 12")),r.addEventListener("mousedown",a=>a.preventDefault()),r.addEventListener("click",()=>{this.#m(),this.#g(null,null),s.focus()});let o=document.createElement("span");o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.style.cssText=li;let l=document.createElement("input");l.type="hidden",i.append(s,r,o),this.append(i,l),this.#i=i,this.#t=s,this.#n=r,this.#o=o,this.#c=l,this.#p()}updated(e){e.has("value")&&e.get("value")!==void 0&&this.#E(),e.has("disabled")&&this.disabled&&this.#m(),(e.has("options")||e.has("filter")||e.has("loading"))&&this.#T(),this.#p()}get#b(){return this.options.find(e=>e.value===this.value)??null}get#w(){return this.value!=null&&this.value!==""}get#C(){return this.#h?this.#l:this.#b?.label??this.value??""}get#v(){let e=this.filter??Tt;return(this.#h?this.options.filter(i=>e(i,this.#l)):this.options).slice(0,50)}#T(){this.#s>=this.#v.length&&(this.#s=-1)}#E(){this.#h=!1,this.#l=""}#A(){if(this.#r||this.disabled||!this.#t)return;this.#r=!0;let e=this.#b,t=e?this.#v.findIndex(i=>i.value===e.value):-1;this.#s=t>=0?t:-1,this.#p()}#m(){this.#r=!1,this.#s=-1,this.#a?.remove(),this.#a=null,this.#t&&(this.#t.setAttribute("aria-expanded","false"),this.#t.removeAttribute("aria-controls"),this.#t.removeAttribute("aria-activedescendant")),this.#o&&(this.#o.textContent="")}#y(e,t){let i=this.#v,s=i.length;if(s===0)return-1;let r=e;for(let o=0;o<s;o++)if(r=(r+t+s)%s,!i[r].disabled)return r;return-1}#_(e){return e===1?this.#y(-1,1):this.#y(0,-1)}#g(e,t){this.value=e,this.#E(),this.#p();let i={value:e,option:t};this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:i}))}#x(e){e.disabled||(this.#m(),this.#g(e.value,e))}#$(){return!this.#h||this.#l.trim()!==""||!this.#w?!1:(this.#m(),this.#g(null,null),!0)}#L(){let e=this.#l.trim();if(!this.allowCustom||!this.#h||!e)return!1;let t=this.options.find(i=>!i.disabled&&i.label.toLowerCase()===e.toLowerCase());return this.#m(),t?this.#g(t.value,t):this.#g(e,null),!0}#M(e){this.#l=e,this.#h=!0,this.#r=!0,this.allowCustom||e.trim()===""?this.#s=-1:this.#s=this.#v.findIndex(t=>!t.disabled),window.clearTimeout(this.#u),this.#u=window.setTimeout(()=>{this.dispatchEvent(new CustomEvent("nish-query",{bubbles:!0,detail:{query:e}}))},200),this.#p()}#R(e){if(this.disabled)return;let t=this.#v;switch(e.key){case"ArrowDown":case"ArrowUp":{e.preventDefault();let i=e.key==="ArrowDown"?1:-1;if(this.#r){this.#S(this.#s<0?this.#_(i):this.#y(this.#s,i));break}else{this.#r=!0;let s=this.#b,r=s?t.findIndex(o=>o.value===s.value):-1;this.#s=r>=0?r:this.#_(i)}this.#p();break}case"Home":case"End":this.#r&&(e.preventDefault(),this.#S(this.#_(e.key==="Home"?1:-1)));break;case"Enter":this.#r&&this.#s>=0&&t[this.#s]?(e.preventDefault(),this.#x(t[this.#s])):(this.#$()||this.#L()||this.#r)&&e.preventDefault();break;case"Escape":this.#r?(e.preventDefault(),e.stopPropagation(),this.#m(),this.#p()):this.#h&&(e.preventDefault(),e.stopPropagation(),this.#E(),this.#p());break;case"Tab":this.#m();break}}#p(){let e=this.#t,t=this.#i;if(!e||!t||!this.#n||!this.#c||!this.#o)return;t.classList.toggle("nish-combobox--sm",this.size==="sm");let i=this.#C;e.value!==i&&(e.value=i),e.disabled=this.disabled,this.placeholder?e.placeholder=this.placeholder:e.removeAttribute("placeholder"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"),this.#n.setAttribute("aria-label",A().clear),this.#n.hidden=!(this.#w&&!this.disabled);let s=this.#c;if(this.name?s.name=this.name:s.removeAttribute("name"),s.value=this.value??"",s.disabled=this.disabled,!this.#r){this.#a&&this.#m();return}this.#N(e,t,this.#o)}#S(e){let t=this.#s;this.#s=e;let i=this.#a,s=this.#t;if(!i||!s||!this.#r){this.#p();return}i.querySelector("[data-active]")?.removeAttribute("data-active");let r=e>=0?i.querySelector(`[data-index="${e}"]`):null;if(!r){t!==e?this.#p():s.removeAttribute("aria-activedescendant");return}r.dataset.active="",s.setAttribute("aria-activedescendant",r.id),r.scrollIntoView?.({block:"nearest"})}#N(e,t,i){let s=A(),r=`nish-cb-list-${this.#e}`,o=this.#v,l=this.#b,a=this.#a;if(!a){a=document.createElement("ul"),a.id=r,a.className="nish-combobox-list",a.setAttribute("role","listbox");let h=c=>{let d=c.target?.closest("li[data-index]");if(!d||!a.contains(d))return null;let v=Number(d.dataset.index),f=this.#v[v];return f?{o:f,i:v}:null};a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("mousemove",c=>{let d=h(c);d&&!d.o.disabled&&this.#s!==d.i&&this.#S(d.i)}),a.addEventListener("click",c=>{let d=h(c);d&&this.#x(d.o)}),this.#a=a,t.append(a)}this.label?(a.setAttribute("aria-label",this.label),a.removeAttribute("aria-labelledby")):(a.removeAttribute("aria-label"),e.id||(e.id=`nish-cb-${this.#e}`),a.setAttribute("aria-labelledby",e.id));let u=o.map((h,c)=>{let d=document.createElement("li");d.id=`${r}-opt-${c}`,d.className="nish-combobox-option",d.setAttribute("role","option"),d.dataset.index=String(c),d.setAttribute("aria-selected",String(l?.value===h.value)),h.disabled&&d.setAttribute("aria-disabled","true"),c===this.#s&&(d.dataset.active="");let v=document.createElement("span");if(v.className="nish-combobox-label",v.textContent=h.label,d.append(v),h.hint){let f=document.createElement("span");f.className="nish-combobox-hint",f.textContent=h.hint,d.append(f)}return l?.value===h.value&&d.append(Mt("M20 6 9 17l-5-5")),d});if(this.loading){let h=document.createElement("li");h.setAttribute("role","presentation"),h.className="nish-combobox-loading";let c=document.createElement("span");c.className="nish-spinner nish-spinner--sm",c.setAttribute("aria-hidden","true"),h.append(c,document.createTextNode(s.searching)),u.push(h)}else if(o.length===0){let h=document.createElement("li");h.setAttribute("role","presentation"),h.className="nish-combobox-empty",h.textContent=this.emptyText||s.noMatches,u.push(h)}a.replaceChildren(...u),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls",r),this.#s>=0&&o[this.#s]?e.setAttribute("aria-activedescendant",`${r}-opt-${this.#s}`):e.removeAttribute("aria-activedescendant"),i.textContent=this.loading?s.searching:o.length===0?this.emptyText||s.noMatches:s.resultCount(o.length),this.#k(a,e),a.querySelector(`[data-index="${this.#s}"]`)?.scrollIntoView?.({block:"nearest"})}#k(e,t){e.style.top="",e.style.bottom="",e.style.marginTop="",e.style.marginBottom="",delete e.dataset.above;let i=t.getBoundingClientRect(),s=e.getBoundingClientRect().height,r=window.innerHeight-i.bottom;s>r&&i.top>r&&(e.dataset.above="",e.style.top="auto",e.style.bottom="100%",e.style.marginTop="0",e.style.marginBottom="4px")}};y("nish-combobox",ve);var Rt=1500,Nt="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0",hi=$`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>`,ci=$`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--nish-ok)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg>`;async function ui(n){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(n),!0}catch{}let e=document.createElement("textarea");e.value=n,e.setAttribute("readonly",""),e.style.cssText="position:fixed;top:-1000px;opacity:0";let t=document.activeElement;document.body.appendChild(e),e.select();let i=!1;try{i=document.execCommand("copy")}catch{i=!1}return e.remove(),t?.focus?.(),i}var ge=class extends E{static properties={value:{type:String,reflect:!0},for:{type:String,reflect:!0},label:{type:String,reflect:!0},copiedLabel:{attribute:"copied-label",reflect:!0},icon:{type:Boolean,reflect:!0},copied:{state:!0},manual:{state:!0}};#e=null;constructor(){super(),this.value=null,this.for=null,this.label="",this.copiedLabel="",this.icon=!1,this.copied=!1,this.manual=!1}disconnectedCallback(){super.disconnectedCallback(),this.#e&&clearTimeout(this.#e),this.#e=null,this.copied=!1,this.manual=!1}#i(){return this.value!=null?this.value:(this.for?document.getElementById(this.for):null)?.textContent??""}async#t(){let e=this.#i();if(!await ui(e)){await this.#n();return}this.manual=!1,this.copied=!0,this.dispatchEvent(new CustomEvent("nish-copy",{bubbles:!0,detail:{text:e}})),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.copied=!1,this.#e=null},Rt)}async#n(){this.copied=!1,this.manual=!0,await this.updateComplete;let e=this.value==null&&this.for?document.getElementById(this.for):null;if(e){let t=document.createRange();t.selectNodeContents(e);let i=window.getSelection();i?.removeAllRanges(),i?.addRange(t)}else{let t=this.querySelector("textarea[data-copy-source]");t?.focus(),t?.select()}this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{document.activeElement?.matches("textarea[data-copy-source]")&&this.contains(document.activeElement)&&this.querySelector("button")?.focus(),this.manual=!1,this.#e=null},Rt)}render(){let e=A(),t=this.copiedLabel||e.copied,i=this.copied?t:this.manual?e.copyManual:this.label||e.copy,s=this.copied?ci:hi;return S`${this.icon?S`<button type="button" class="nish-icon-btn nish-icon-btn--sm nish-copy-btn" aria-label=${i} title=${i} ?data-copied=${this.copied} @click=${()=>this.#t()}>
|
|
5
5
|
${s}
|
|
6
6
|
</button>`:S`<button type="button" class="nish-btn nish-btn--sm nish-copy-btn" ?data-copied=${this.copied} @click=${()=>this.#t()}>
|
|
7
7
|
${s}${i}
|
package/dist/elements.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var Kt=["emerald","indigo","amber","lime","rose","sky","violet","teal"],Wn=["accent","ok","loss","warn","info",...Kt],B={emerald:"#34d399",indigo:"#8b93ff",amber:"#fbbf24",lime:"#a3e635",rose:"#fb7185",sky:"#38bdf8",violet:"#c084fc",teal:"#2dd4bf"},Xt={emerald:"#046d4f",indigo:"#4e45e3",amber:"#9b4708",lime:"#41690d",rose:"#b8113a",sky:"#036499",violet:"#7e22ce",teal:"#0e6b64"},Zt=["#8b93ff","#34d399","#fbbf24","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"],Jt=["#6366f1","#059669","#c96d06","#f43f5e","#0284c7","#a855f7","#ea580c","#5a910c"],P=t=>Object.fromEntries(t.map((e,n)=>[`chart-${n+1}`,e])),Qt={dark:{label:"Dark",scheme:"dark",colors:{bg:"#0a0b0f",surface:"#111218",elevated:"#191b23",overlay:"#22252f",line:"#262935","line-strong":"#3a3e4d","line-control":"#666975",hi:"#ececf1",hi2:"#a8aab7",hi3:"#8a8d9b",ghost:"#6b6e7c",accent:"#8b93ff",accent2:"#c084fc","on-accent":"#0a0b0f",ok:"#34d399",loss:"#f87171",warn:"#fbbf24",info:"#38bdf8",scrim:"#000000","invert-bg":"#ececf1","invert-text":"#111218",...P(Zt),...B}},light:{label:"Light",scheme:"light",colors:{bg:"#f7f6f3",surface:"#ffffff",elevated:"#f1f0ec",overlay:"#e6e4de",line:"#e2e0da","line-strong":"#c9c6bd","line-control":"#8a8881",hi:"#17171c",hi2:"#4f515c",hi3:"#626470",ghost:"#8a8c98",accent:"#4338ca",accent2:"#7e22ce","on-accent":"#ffffff","on-accent2":"#ffffff","on-ok":"#0a0a0c","on-loss":"#ffffff","on-warn":"#0a0a0c","on-info":"#0a0a0c",ok:"#065f46","ok-fill":"#059669","loss-fill":"#dc2626","warn-fill":"#c96d06","info-fill":"#0284c7",loss:"#a91b1b",warn:"#92400e",info:"#075985",scrim:"#17171c","invert-bg":"#17171c","invert-text":"#f7f6f3",...P(Jt),...Xt}},slate:{label:"Slate",scheme:"dark",colors:{bg:"#18181b",surface:"#202024",elevated:"#2c2c32",overlay:"#36363d",line:"#3a3a42","line-strong":"#52525b","line-control":"#77777e",hi:"#f4f4f5",hi2:"#b8b8c0",hi3:"#a0a0a8",ghost:"#71717a",accent:"#a5b4fc",accent2:"#c084fc","on-accent":"#18181b",ok:"#4ade80",loss:"#fda4af",warn:"#facc15",info:"#38bdf8",scrim:"#000000","invert-bg":"#f4f4f5","invert-text":"#202024",...P(["#818cf8","#4ade80","#facc15","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"]),...B,indigo:"#9aa1ff",rose:"#fc8395",violet:"#c792fc"}},terminal:{label:"Terminal",scheme:"dark",colors:{bg:"#050807",surface:"#0c110e",elevated:"#141c17",overlay:"#1c2820",line:"#233028","line-strong":"#34483b","line-control":"#5c6c61",hi:"#d1fae5",hi2:"#8fc4a8",hi3:"#74a68b",ghost:"#4f7a62",accent:"#34d399",accent2:"#2dd4bf","on-accent":"#050807",ok:"#4ade80",loss:"#f87171",warn:"#fbbf24",info:"#67e8f9",scrim:"#000000","invert-bg":"#d1fae5","invert-text":"#0c110e",...P(["#34d399","#67e8f9","#fbbf24","#f87171","#a3e635","#c084fc","#fb923c","#2dd4bf"]),...B}},mocha:{label:"Mocha",scheme:"dark",colors:{bg:"#1c1917",surface:"#292524",elevated:"#393432",overlay:"#44403c",line:"#44403c","line-strong":"#57534e","line-control":"#83807c",hi:"#f5f0eb",hi2:"#c6c0bb",hi3:"#b2ada8",ghost:"#78716c",accent:"#fdba74",accent2:"#f472b6","on-accent":"#1c1917",ok:"#4ade80",loss:"#fca5a5",warn:"#facc15",info:"#7dd3fc",scrim:"#000000","invert-bg":"#f5f0eb","invert-text":"#292524",...P(["#fb923c","#4ade80","#facc15","#f472b6","#7dd3fc","#c4b5fd","#f87171","#bef264"]),...B,indigo:"#a9afff",rose:"#fc99a7",sky:"#3ebff8",violet:"#cfa2fd"}},ocean:{label:"Ocean",scheme:"dark",colors:{bg:"#020c18",surface:"#061528",elevated:"#0a243e",overlay:"#103658",line:"#123050","line-strong":"#1f4a72","line-control":"#507291",hi:"#e0f2fe",hi2:"#9ccde6",hi3:"#6fa9c6",ghost:"#3f7392",accent:"#38bdf8",accent2:"#a78bfa","on-accent":"#020c18",ok:"#34d399",loss:"#fb7185",warn:"#fbbf24",info:"#7dd3fc",scrim:"#000000","invert-bg":"#38bdf8","invert-text":"#020c18",...P(["#38bdf8","#34d399","#fbbf24","#fb7185","#a78bfa","#2dd4bf","#fb923c","#a3e635"]),...B}},contrast:{label:"High contrast",scheme:"dark",colors:{bg:"#000000",surface:"#080808",elevated:"#141414",overlay:"#222222",line:"#4a4a4a","line-strong":"#8a8a8a","line-control":"#8a8a8a",hi:"#ffffff",hi2:"#d4d4d4",hi3:"#bdbdbd",ghost:"#8f8f8f",accent:"#ffd60a",accent2:"#7dd3fc","on-accent":"#000000",ok:"#4ade80",loss:"#ff6b6b",warn:"#ffd60a",info:"#7dd3fc",scrim:"#000000","invert-bg":"#ffffff","invert-text":"#000000",...P(["#ffd60a","#4ade80","#7dd3fc","#ff6b6b","#c4b5fd","#fb923c","#f9a8d4","#bef264"]),...B}}},en=t=>{let e=t.colors,n=Object.fromEntries(["ok","loss","warn","info"].flatMap(i=>[[`${i}-fill`,e[`${i}-fill`]??e[i]],[`on-${i}`,e[`on-${i}`]??e["on-accent"]]]));return{...t,colors:{...e,...n,"on-accent2":e["on-accent2"]??e["on-accent"]}}},z=Object.fromEntries(Object.entries(Qt).map(([t,e])=>[t,en(e)])),Xe="dark";var tn="2.0.2";var nn=Symbol.for("nish-ui.runtime.v1");function sn(){let t=globalThis;return t[nn]??={versions:new Set,slots:{}}}function rn(t){t.versions.add(tn),t.versions.size>1&&!t.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(t.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...t.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var Ze=!1;function ce(t,e){let n=sn();return Ze||(Ze=!0,rn(n)),t in n.slots||(n.slots[t]=e()),n.slots[t]}function Je(t){if(t==null)return null;let e=String(t),n=0,i=e.length;for(;n<i&&e.charCodeAt(n)<=32;)n++;for(;i>n&&e.charCodeAt(i-1)<=32;)i--;let s=e.slice(n,i).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var F={close:"Close",cancel:"Cancel",menu:"Menu",back:"Back: ",dismiss:"Dismiss",moreCount:t=>`${t} more`,copy:"Copy",copied:"Copied",hubTitle:"Back to nish.software",hubLabel:"\u2190 nish.software",moreActions:"More actions",more:"More",legend:"Legend",optional:"Optional",search:"Search",clearSearch:"Clear search",remove:"Remove",removeNamed:t=>`Remove ${t}`,noMatches:"No matches",clear:"Clear",searching:"Searching\u2026",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",loading:"Loading",failedToLoad:"Failed to load",retry:"Retry",actions:"Actions",offline:"You're offline",nothingHere:"Nothing here yet",loadingNamed:t=>`Loading ${t}`,sortBy:"Sort by",sortDefault:"Default",noData:"No data",noDataNamed:t=>`${t}: no data`,filters:"Filters",clearFilters:"Clear filters",done:"Done",activeCount:t=>`${t} active`,newCount:t=>`${t} new`,sections:"Sections",theme:"Theme",sidebar:"Sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",skipToContent:"Skip to content",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(t,e)=>`Theme: ${t}. Switch to ${e}`,themePreset:"Theme preset",themePresetPlaceholder:"Preset\u2026",errorStaleTitle:"A new version is available",errorStaleBody:"Reload the page to get the latest version.",errorTitle:"Something went wrong",errorBody:"An unexpected error occurred.",errorDetails:"Details",errorTryAgain:"Try again",errorReload:"Reload page",saving:"Saving\u2026",saved:"Saved",saveFailed:"Could not save",enterNumber:"Enter a number",resizeColumns:"Resize columns",resizeRows:"Resize rows",layoutPresets:"Layout presets",live:"Live",offlineBadge:"Offline",progress:"Progress",workflow:"Workflow",activity:"Activity",other:"Other",waiting:"Waiting",noActivity:"No activity yet",systemMap:"System map",zoomOut:"Zoom out",zoomIn:"Zoom in",fitToScreen:"Fit to screen",followActivity:"Follow activity",canvasLines:"Lines",serviceTokens:"Service tokens",serviceTokensIntro:"Machine clients, like the nish MCP server, use these tokens to read this app. Revoking one stops it at once.",loadingServiceTokens:"Loading service tokens",tokenRevoke:"Revoke",tokenRevoked:"Revoked",tokenRevokedAt:t=>`Revoked ${t}`,tokenRevokeNamed:t=>`Revoke ${t}`,tokenRevokeTitle:t=>`Revoke ${t}?`,tokenRevokeFailed:"Could not revoke the token.",inboxMarkHandled:"Mark handled",inboxSnooze:"Snooze",inboxActions:"Actions",inboxViews:"Inbox views",inboxOpen:"Open",inboxSnoozed:"Snoozed",inboxHandled:"Handled",inboxFilterBySource:"Filter by source",inboxHappened:t=>`Happened ${t} times`,previousPage:"Previous page",nextPage:"Next page",pageLabel:t=>`Page ${t}`,paginationLabel:"Pagination",breadcrumbs:"Breadcrumbs",removeTag:t=>`Remove ${t}`,dropzoneLabel:"Drop files here or browse",browseFiles:"Browse files",removeFile:t=>`Remove ${t}`,avatar:"Avatar",avatarMore:t=>`${t} more`,sliderMin:"Minimum",sliderMax:"Maximum",accordion:"Accordion",progressIndeterminate:"Loading"};var Qe="nish-theme",et="nish.software",on=3600*24*365,W=()=>ce("theme",()=>({extra:{},listeners:new Set,watching:!1,switchId:0})),an=t=>{globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: ${t}`)};function ue(){if(typeof document>"u")return Qe;let t=document.documentElement.getAttribute("data-nish-storage-key");return t&&/^[A-Za-z0-9_-]+$/.test(t)?t:Qe}var K=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function $e(t){return typeof t=="string"&&(K(z,t)||K(W().extra,t))}function ln(){if(typeof document>"u")return null;try{let t=document.cookie.match(new RegExp(`(?:^|;\\s*)${ue()}=([a-z0-9-]+)`));return t?t[1]:null}catch{return null}}var tt=(t,e)=>e===t||e.endsWith("."+t);function cn(t,e){let n=t.toLowerCase(),i=(e??"").trim().toLowerCase().replace(/^\./,"");return i?tt(i,n)?i:null:tt(et,n)?et:null}function dn(){return typeof location>"u"||typeof document>"u"?null:cn(location.hostname,document.documentElement.getAttribute("data-nish-domain"))}function V(){let t=null;try{t=ln()??localStorage.getItem(ue())}catch{}return t==="system"||$e(t)?t:"system"}function hn(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":Xe}function un(){let t=document.documentElement.getAttribute("data-nish-themes");return t?t.split(/\s+/).filter($e):null}function ot(t=V()){let e=t==="system"?hn():t,n=typeof document>"u"?null:un();return n&&!n.includes(e)&&(e=he(e)),e}function he(t){let{extra:e}=W();return K(z,t)?z[t].scheme:K(e,t)?e[t]:"dark"}function at(t=V()){let e=ot(t),n=document.documentElement,i=n.getAttribute("data-theme");return i&&i!==e&&mn(n),n.setAttribute("data-theme",e),n.setAttribute("data-scheme",he(e)),n.setAttribute("data-theme-choice",t),n.style.colorScheme=he(e),gn(),W().listeners.forEach(s=>s(t,e)),e}function mn(t){let e=W(),n=++e.switchId;t.setAttribute("data-nish-theme-switching","");let i=()=>{e.switchId===n&&t.removeAttribute("data-nish-theme-switching")};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(i)):setTimeout(i,32)}function pn(t){if(t!=="system"&&!$e(t))return an(`unknown theme "${String(t)}" ignored. Register it with registerThemes() first.`),ot(V());let e=ue();try{localStorage.setItem(e,t)}catch{}try{let n=dn();if(n){let i=location.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; Domain=.${n}; Path=/; Max-Age=${on}; SameSite=Lax${i}`}}catch{}return at(t)}function fn(t){return getComputedStyle(document.documentElement).getPropertyValue(`--nish-${t}`).trim()}function gn(){let t=fn("bg");if(!t)return;let e=document.querySelector('meta[name="theme-color"][data-nish]')??document.querySelector('meta[name="theme-color"]:not([media]):not([data-nish-keep])');e||(e=document.createElement("meta"),e.name="theme-color",(document.head||document.documentElement).appendChild(e)),e.setAttribute("data-nish",""),e.content=t}function bn(){let t=W();if(t.watching||typeof window>"u")return;t.watching=!0;let e=()=>{let n=V();(n!==document.documentElement.getAttribute("data-theme-choice")||n==="system")&&at(n)};typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",e),window.addEventListener("storage",n=>{n.key===ue()&&e()}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function vn(t){bn();let{listeners:e}=W();return e.add(t),()=>{e.delete(t)}}var de=["system","light","dark"];function En(){let t=lt(V());return pn(t),t}var nt="http://www.w3.org/2000/svg";function Re(t,e,n={}){let i=document.createElementNS(nt,"svg"),s={width:String(t),height:String(t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",...n};for(let r of Object.keys(s))i.setAttribute(r,s[r]);for(let[r,o]of e){let d=document.createElementNS(nt,r);for(let c of Object.keys(o))d.setAttribute(c,o[c]);i.appendChild(d)}return i}var it={system:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["path",{d:"M8 21h8M12 17v4"}]],light:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2M12 20v2m-7.07-2.93 1.41-1.41M17.66 6.34l1.41-1.41M2 12h2m16 0h2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41"}]],dark:[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9"}]]},yn=()=>({system:F.themeSystem,light:F.themeLight,dark:F.themeDark}),_n="set on another site";function lt(t){let e=de.indexOf(t);return de[(e+1)%de.length]}function Ce(t,e){return t==="system"||t==="light"||t==="dark"?e[t]:K(z,t)?z[t].label:t.charAt(0).toUpperCase()+t.slice(1)}function ct(t,e={}){let n={...yn(),...e.labels},i=e.strings?.themeToggleLabel??F.themeToggleLabel,s=e.elsewhereLabel??_n;t.tagName==="BUTTON"&&!t.getAttribute("type")&&t.setAttribute("type","button");let r=Object.keys(it).map(l=>Re(16,it[l],{"data-icon":l}));if(e.showLabel){let l=document.createElement("span");l.setAttribute("data-theme-word",""),l.setAttribute("aria-hidden","true"),r.push(l)}t.replaceChildren(...r);let o=t.querySelector("[data-theme-word]"),d=l=>{let h=l==="system"||l==="light"||l==="dark"?l:he(l);t.setAttribute("data-choice",l),t.querySelectorAll("svg[data-icon]").forEach(g=>{g.getAttribute("data-icon")===h?g.removeAttribute("display"):g.setAttribute("display","none")});let p=de.includes(l)?"":` (${s})`,b=i(`${Ce(l,n)}${p}`,Ce(lt(l),n));t.setAttribute("aria-label",b),t.setAttribute("title",b),o&&(o.textContent=Ce(l,n))},c=()=>{En()};t.addEventListener("click",c);let u=vn(l=>d(l));return d(V()),()=>{t.removeEventListener("click",c),u()}}var st=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4M12 17h.01"}]],rt=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4M12 8h.01"}]],Sn={neutral:rt,info:rt,ok:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]],warn:st,loss:st},wn=6e3,$=null,Y=null;function dt(t,e={}){Y?.(),(!$||!$.isConnected)&&($=document.createElement("div"),$.setAttribute("role","status"),$.setAttribute("aria-live","polite"),$.className="nish-toast-region",document.body.appendChild($));let n=$,i=document.createElement("div");i.className="nish-toast"+(e.tone&&e.tone!=="neutral"?` nish-toast--${e.tone}`:"");let s=document.createElement("span");s.className="nish-toast-icon",s.setAttribute("aria-hidden","true"),s.append(Re(15,Sn[e.tone??"neutral"])),i.append(s);let r=document.createElement("p");r.className="nish-toast-body",r.append(typeof t=="string"?document.createTextNode(t):t),i.append(r);let o=null,d=e.duration==="sticky"?1/0:e.duration??wn,c=0,u=0,l=()=>{o!=null&&clearTimeout(o),o=null,i.remove(),Y===l&&(Y=null)},h=a=>{Number.isFinite(a)&&(c=Date.now(),o=setTimeout(l,a))},p=()=>{u+=1,!(u>1||o==null)&&(clearTimeout(o),o=null,d=Math.max(0,d-(Date.now()-c)))},b=()=>{u!==0&&(u-=1,u===0&&h(Math.max(d,1e3)))},g=e.action,S=g?.href!=null?Je(g.href):null;if(g&&(g.href==null||S!=null)){let a=document.createElement(g.href!=null?"a":"button");a.className="nish-toast-action",a.textContent=g.label,S!=null?a.href=S:a.type="button",a.addEventListener("click",()=>{g.onClick?.(),l()}),i.append(a)}let m=document.createElement("button");return m.type="button",m.className="nish-toast-close",m.setAttribute("aria-label",e.dismissLabel??e.strings?.dismiss??F.dismiss),m.append(Re(14,[["path",{d:"M18 6 6 18M6 6l12 12"}]])),m.addEventListener("click",l),i.append(m),i.addEventListener("pointerenter",a=>a.pointerType==="mouse"&&p()),i.addEventListener("pointerleave",a=>a.pointerType==="mouse"&&b()),i.addEventListener("focusin",a=>!i.contains(a.relatedTarget)&&p()),i.addEventListener("focusout",a=>!i.contains(a.relatedTarget)&&b()),i.addEventListener("keydown",a=>{a.key==="Escape"&&l()}),setTimeout(()=>{Y===l&&(n.append(i),h(d))},50),Y=l,l}var Tn=()=>typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function ht(t){if(typeof document>"u")return()=>{};if(t.open)return()=>s();let e=document.activeElement instanceof HTMLElement?document.activeElement:null,n=!1,i=!1;function s(){if(n||!t.open)return;n=!0;let a,f=()=>{t.removeEventListener("animationend",w),a!==void 0&&clearTimeout(a),t.removeAttribute("data-closing"),t.style.transform="",t.style.transition="",n=!1,t.open&&t.close()},w=Yt=>{Yt.target===t&&f()};if(Tn()){f();return}t.style.transform="",t.setAttribute("data-closing",""),t.addEventListener("animationend",w),a=setTimeout(f,260)}let r=a=>{a.preventDefault(),s()},o=a=>{a.key==="Escape"&&a.stopPropagation()},d=a=>{if(a.target===t){let f=t.getBoundingClientRect();a.clientX>=f.left&&a.clientX<=f.right&&a.clientY>=f.top&&a.clientY<=f.bottom||s();return}a.target instanceof Element&&a.target.closest("[data-sheet-close]")&&s()},c=0,u=0,l=0,h=0,p=1,b=a=>{if(a.pointerType==="mouse"||n||!a.isPrimary||typeof matchMedia<"u"&&matchMedia("(min-width: 640px)").matches)return;let f=t.getBoundingClientRect();!(a.target instanceof Element&&a.target.closest(".nish-sheet-header")!=null)&&a.clientY-f.top>28||(i=!0,c=u=a.clientY,l=a.timeStamp,h=0,p=f.height||1,t.style.transition="none",t.setPointerCapture?.(a.pointerId))},g=a=>{if(!i)return;let f=a.clientY-c,w=a.timeStamp-l;w>0&&(h=(a.clientY-u)/w),u=a.clientY,l=a.timeStamp,t.style.transform=`translateY(${f>=0?f:f*.3}px)`},S=a=>{if(!i)return;i=!1,t.releasePointerCapture?.(a.pointerId);let f=a.clientY-c;if(a.type!=="pointercancel"&&(f>p*.3||h>.5)){s();return}t.style.transition="transform 180ms var(--nish-ease-out, ease-out)",t.style.transform="",setTimeout(()=>{n||(t.style.transition="")},200)},m=()=>{t.removeEventListener("cancel",r),t.removeEventListener("keydown",o),t.removeEventListener("click",d),t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",g),t.removeEventListener("pointerup",S),t.removeEventListener("pointercancel",S),t.removeEventListener("close",m),e?.isConnected&&e.focus()};return t.addEventListener("cancel",r),t.addEventListener("keydown",o),t.addEventListener("click",d),t.addEventListener("pointerdown",b),t.addEventListener("pointermove",g),t.addEventListener("pointerup",S),t.addEventListener("pointercancel",S),t.addEventListener("close",m),t.showModal(),s}function ut(t,e){if(typeof document>"u")return()=>{};let n=document.documentElement,i=()=>{let r=t.offsetHeight;r>0?n.style.setProperty(e,`${r}px`):n.style.removeProperty(e)};i();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(i),s.observe(t)):window.addEventListener("resize",i),()=>{s?.disconnect(),window.removeEventListener("resize",i),n.style.removeProperty(e)}}var mt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var x=function(t,e,n,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n},y=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},j,me,pe,X,Me,Z,fe,O,J,M,ge,pt;var v={__proto__:null};v.enumerable=!0;Object.freeze(v);var ke=(M=class{constructor(e,n={}){if(j.set(this,!1),me.set(this,!1),pe.set(this,!1),X.set(this,!1),Me.set(this,Date.now()),Z.set(this,!1),fe.set(this,void 0),O.set(this,void 0),J.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof n!="object"||!n)throw new Error('The "options" argument must be an object');let{bubbles:i,cancelable:s,composed:r}=n;x(this,j,!!s,"f"),x(this,me,!!i,"f"),x(this,pe,!!r,"f"),x(this,fe,`${e}`,"f"),x(this,O,null,"f"),x(this,J,!1,"f")}initEvent(e,n,i){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){x(this,X,!0,"f")}get target(){return y(this,O,"f")}get currentTarget(){return y(this,O,"f")}get srcElement(){return y(this,O,"f")}get type(){return y(this,fe,"f")}get cancelable(){return y(this,j,"f")}get defaultPrevented(){return y(this,j,"f")&&y(this,X,"f")}get timeStamp(){return y(this,Me,"f")}composedPath(){return y(this,J,"f")?[y(this,O,"f")]:[]}get returnValue(){return!y(this,j,"f")||!y(this,X,"f")}get bubbles(){return y(this,me,"f")}get composed(){return y(this,pe,"f")}get eventPhase(){return y(this,J,"f")?M.AT_TARGET:M.NONE}get cancelBubble(){return y(this,Z,"f")}set cancelBubble(e){e&&x(this,Z,!0,"f")}stopPropagation(){x(this,Z,!0,"f")}get isTrusted(){return!1}},j=new WeakMap,me=new WeakMap,pe=new WeakMap,X=new WeakMap,Me=new WeakMap,Z=new WeakMap,fe=new WeakMap,O=new WeakMap,J=new WeakMap,M.NONE=0,M.CAPTURING_PHASE=1,M.AT_TARGET=2,M.BUBBLING_PHASE=3,M);Object.defineProperties(ke.prototype,{initEvent:v,stopImmediatePropagation:v,preventDefault:v,target:v,currentTarget:v,srcElement:v,type:v,cancelable:v,defaultPrevented:v,timeStamp:v,composedPath:v,returnValue:v,bubbles:v,composed:v,eventPhase:v,cancelBubble:v,stopPropagation:v,isTrusted:v});var ft=(pt=class extends ke{constructor(e,n={}){super(e,n),ge.set(this,void 0),x(this,ge,n?.detail??null,"f")}initCustomEvent(e,n,i,s){throw new Error("Method not implemented.")}get detail(){return y(this,ge,"f")}},ge=new WeakMap,pt);Object.defineProperties(ft.prototype,{detail:v});var A=ke,Ne=ft;var _;var si=(_=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},_.STYLE_RULE=1,_.CHARSET_RULE=2,_.IMPORT_RULE=3,_.MEDIA_RULE=4,_.FONT_FACE_RULE=5,_.PAGE_RULE=6,_.NAMESPACE_RULE=10,_.KEYFRAMES_RULE=7,_.KEYFRAME_RULE=8,_.SUPPORTS_RULE=12,_.COUNTER_STYLE_RULE=11,_.FONT_FEATURE_VALUES_RULE=14,_.MARGIN_RULE=9,_);globalThis.Event??=A;globalThis.CustomEvent??=Ne;var Oe=Symbol(),gt=t=>typeof t=="boolean"?t:t?.capture??!1,L={__proto__:null};L.enumerable=!0;Object.freeze(L);var be=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,n,i){if(n==null)return;let s=gt(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(n))return;let o=typeof i=="object"&&i?i:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,n,i)),r.set(n,o??{})}removeEventListener(e,n,i){if(n==null)return;let s=gt(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(n),r.size||s.delete(e))}dispatchEvent(e){let n=this.__resolveFullEventPath();!e.composed&&this.__host&&(n=n.slice(0,n.indexOf(this.__host)));let i=!1,s=!1,r=A.NONE,o=null,d=null,c=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??d},...L},srcElement:{get(){return e.target},...L},currentTarget:{get(){return c},...L},eventPhase:{get(){return r},...L},composedPath:{value:()=>n,...L},stopPropagation:{value:()=>{i=!0,u.call(e)},...L},stopImmediatePropagation:{value:()=>{s=!0,l.call(e)},...L}});let h=(m,a,f)=>{typeof m=="function"?m(e):typeof m?.handleEvent=="function"&&m.handleEvent(e),a.once&&f.delete(m)},p=()=>(c=null,r=A.NONE,!e.defaultPrevented),b=n.slice().reverse();o=!this.__host||!e.composed?this:null;let g=m=>{for(d=this;d.__host&&m.includes(d.__host);)d=d.__host};for(let m of b){!o&&(!d||d===m.__host)&&g(b.slice(b.indexOf(m))),c=m,r=m===e.target?A.AT_TARGET:A.CAPTURING_PHASE;let a=m.__captureEventListeners.get(e.type);if(a){for(let[f,w]of a)if(h(f,w,a),s)return p()}if(i)return p()}let S=e.bubbles?n:[this];d=null;for(let m of S){!o&&(!d||m===d.__host)&&g(S.slice(0,S.indexOf(m)+1)),c=m,r=m===e.target?A.AT_TARGET:A.BUBBLING_PHASE;let a=m.__eventListeners.get(e.type);if(a){for(let[f,w]of a)if(h(f,w,a),s)return p()}if(i)return p()}return p()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Et,Ln]}};var bt=new WeakMap,Q=t=>{let e=bt.get(t);return e===void 0&&bt.set(t,e=new Map),e},ee=class extends be{getRootNode(e){return e?.composed?Pe:this.__host?.__shadowRoot??Pe}};var vt=class extends ee{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Et=new vt,Pe=Et;var yt=class extends ee{constructor(e){if(super(),e!==Oe)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ve,customElements:De,document:Pe,Document:vt,Element:_t,EventTarget:be,HTMLElement:St,Node:ee,ShadowRoot:wt,window:this,Window:yt})}};var _t=class extends ee{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(Q(this)).map(([e,n])=>({name:e,value:n}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,n){Q(this).set(e,String(n))}removeAttribute(e){Q(this).delete(e)}toggleAttribute(e,n){if(this.hasAttribute(e)){if(n===void 0||!n)return this.removeAttribute(e),!1}else return n===void 0||n?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return Q(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let n=new wt(Oe,e);return n.__eventTargetParent=this,n.__host=this,this.__shadowRoot=n}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new mt(this);return this.__internals=e,e}getAttribute(e){return Q(this).get(e)??null}};var St=class extends _t{},He=St;var wt=class extends ee{get host(){return this.__host}constructor(e,n){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=n.mode}};globalThis.litServerRoot??=Object.defineProperty(new He,"localName",{get(){return"lit-server-root"}});function xn(){let t,e;return{promise:new Promise((i,s)=>{t=i,e=s}),resolve:t,reject:e}}var ve=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,n){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
|
-
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(n))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(n)}`);n.__localName=e,this.__definitions.set(e,{ctor:n,observedAttributes:n.observedAttributes??[]}),this.__reverseDefinitions.set(n,e),this.__pendingWhenDefineds.get(e)?.resolve(n),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let n=this.__definitions.get(e);if(n)return n.ctor;let i=this.__pendingWhenDefineds.get(e);return i||(i=xn(),this.__pendingWhenDefineds.set(e,i)),i.promise}},An=ve;var De=new An,Ln=new yt(Oe);var te=globalThis,ye=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),
|
|
1
|
+
var Kt=["emerald","indigo","amber","lime","rose","sky","violet","teal"],Wn=["accent","ok","loss","warn","info",...Kt],B={emerald:"#34d399",indigo:"#8b93ff",amber:"#fbbf24",lime:"#a3e635",rose:"#fb7185",sky:"#38bdf8",violet:"#c084fc",teal:"#2dd4bf"},Xt={emerald:"#046d4f",indigo:"#4e45e3",amber:"#9b4708",lime:"#41690d",rose:"#b8113a",sky:"#036499",violet:"#7e22ce",teal:"#0e6b64"},Zt=["#8b93ff","#34d399","#fbbf24","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"],Jt=["#6366f1","#059669","#c96d06","#f43f5e","#0284c7","#a855f7","#ea580c","#5a910c"],P=t=>Object.fromEntries(t.map((e,n)=>[`chart-${n+1}`,e])),Qt={dark:{label:"Dark",scheme:"dark",colors:{bg:"#0a0b0f",surface:"#111218",elevated:"#191b23",overlay:"#22252f",line:"#262935","line-strong":"#3a3e4d","line-control":"#666975",hi:"#ececf1",hi2:"#a8aab7",hi3:"#8a8d9b",ghost:"#6b6e7c",accent:"#8b93ff",accent2:"#c084fc","on-accent":"#0a0b0f",ok:"#34d399",loss:"#f87171",warn:"#fbbf24",info:"#38bdf8",scrim:"#000000","invert-bg":"#ececf1","invert-text":"#111218",...P(Zt),...B}},light:{label:"Light",scheme:"light",colors:{bg:"#f7f6f3",surface:"#ffffff",elevated:"#f1f0ec",overlay:"#e6e4de",line:"#e2e0da","line-strong":"#c9c6bd","line-control":"#8a8881",hi:"#17171c",hi2:"#4f515c",hi3:"#626470",ghost:"#8a8c98",accent:"#4338ca",accent2:"#7e22ce","on-accent":"#ffffff","on-accent2":"#ffffff","on-ok":"#0a0a0c","on-loss":"#ffffff","on-warn":"#0a0a0c","on-info":"#0a0a0c",ok:"#065f46","ok-fill":"#059669","loss-fill":"#dc2626","warn-fill":"#c96d06","info-fill":"#0284c7",loss:"#a91b1b",warn:"#92400e",info:"#075985",scrim:"#17171c","invert-bg":"#17171c","invert-text":"#f7f6f3",...P(Jt),...Xt}},slate:{label:"Slate",scheme:"dark",colors:{bg:"#18181b",surface:"#202024",elevated:"#2c2c32",overlay:"#36363d",line:"#3a3a42","line-strong":"#52525b","line-control":"#77777e",hi:"#f4f4f5",hi2:"#b8b8c0",hi3:"#a0a0a8",ghost:"#71717a",accent:"#a5b4fc",accent2:"#c084fc","on-accent":"#18181b",ok:"#4ade80",loss:"#fda4af",warn:"#facc15",info:"#38bdf8",scrim:"#000000","invert-bg":"#f4f4f5","invert-text":"#202024",...P(["#818cf8","#4ade80","#facc15","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"]),...B,indigo:"#9aa1ff",rose:"#fc8395",violet:"#c792fc"}},terminal:{label:"Terminal",scheme:"dark",colors:{bg:"#050807",surface:"#0c110e",elevated:"#141c17",overlay:"#1c2820",line:"#233028","line-strong":"#34483b","line-control":"#5c6c61",hi:"#d1fae5",hi2:"#8fc4a8",hi3:"#74a68b",ghost:"#4f7a62",accent:"#34d399",accent2:"#2dd4bf","on-accent":"#050807",ok:"#4ade80",loss:"#f87171",warn:"#fbbf24",info:"#67e8f9",scrim:"#000000","invert-bg":"#d1fae5","invert-text":"#0c110e",...P(["#34d399","#67e8f9","#fbbf24","#f87171","#a3e635","#c084fc","#fb923c","#2dd4bf"]),...B}},mocha:{label:"Mocha",scheme:"dark",colors:{bg:"#1c1917",surface:"#292524",elevated:"#393432",overlay:"#44403c",line:"#44403c","line-strong":"#57534e","line-control":"#83807c",hi:"#f5f0eb",hi2:"#c6c0bb",hi3:"#b2ada8",ghost:"#78716c",accent:"#fdba74",accent2:"#f472b6","on-accent":"#1c1917",ok:"#4ade80",loss:"#fca5a5",warn:"#facc15",info:"#7dd3fc",scrim:"#000000","invert-bg":"#f5f0eb","invert-text":"#292524",...P(["#fb923c","#4ade80","#facc15","#f472b6","#7dd3fc","#c4b5fd","#f87171","#bef264"]),...B,indigo:"#a9afff",rose:"#fc99a7",sky:"#3ebff8",violet:"#cfa2fd"}},ocean:{label:"Ocean",scheme:"dark",colors:{bg:"#020c18",surface:"#061528",elevated:"#0a243e",overlay:"#103658",line:"#123050","line-strong":"#1f4a72","line-control":"#507291",hi:"#e0f2fe",hi2:"#9ccde6",hi3:"#6fa9c6",ghost:"#3f7392",accent:"#38bdf8",accent2:"#a78bfa","on-accent":"#020c18",ok:"#34d399",loss:"#fb7185",warn:"#fbbf24",info:"#7dd3fc",scrim:"#000000","invert-bg":"#38bdf8","invert-text":"#020c18",...P(["#38bdf8","#34d399","#fbbf24","#fb7185","#a78bfa","#2dd4bf","#fb923c","#a3e635"]),...B}},contrast:{label:"High contrast",scheme:"dark",colors:{bg:"#000000",surface:"#080808",elevated:"#141414",overlay:"#222222",line:"#4a4a4a","line-strong":"#8a8a8a","line-control":"#8a8a8a",hi:"#ffffff",hi2:"#d4d4d4",hi3:"#bdbdbd",ghost:"#8f8f8f",accent:"#ffd60a",accent2:"#7dd3fc","on-accent":"#000000",ok:"#4ade80",loss:"#ff6b6b",warn:"#ffd60a",info:"#7dd3fc",scrim:"#000000","invert-bg":"#ffffff","invert-text":"#000000",...P(["#ffd60a","#4ade80","#7dd3fc","#ff6b6b","#c4b5fd","#fb923c","#f9a8d4","#bef264"]),...B}}},en=t=>{let e=t.colors,n=Object.fromEntries(["ok","loss","warn","info"].flatMap(i=>[[`${i}-fill`,e[`${i}-fill`]??e[i]],[`on-${i}`,e[`on-${i}`]??e["on-accent"]]]));return{...t,colors:{...e,...n,"on-accent2":e["on-accent2"]??e["on-accent"]}}},z=Object.fromEntries(Object.entries(Qt).map(([t,e])=>[t,en(e)])),Xe="dark";var tn="2.1.0";var nn=Symbol.for("nish-ui.runtime.v1");function sn(){let t=globalThis;return t[nn]??={versions:new Set,slots:{}}}function rn(t){t.versions.add(tn),t.versions.size>1&&!t.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(t.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...t.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var Ze=!1;function ce(t,e){let n=sn();return Ze||(Ze=!0,rn(n)),t in n.slots||(n.slots[t]=e()),n.slots[t]}function Je(t){if(t==null)return null;let e=String(t),n=0,i=e.length;for(;n<i&&e.charCodeAt(n)<=32;)n++;for(;i>n&&e.charCodeAt(i-1)<=32;)i--;let s=e.slice(n,i).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var F={close:"Close",cancel:"Cancel",menu:"Menu",back:"Back: ",contextMenu:"Actions",sortAnnounce:(t,e)=>e?`Sorted by ${t}, ${e==="asc"?"ascending":"descending"}`:"Sorting cleared",dismiss:"Dismiss",moreCount:t=>`${t} more`,copy:"Copy",copied:"Copied",hubTitle:"Back to nish.software",hubLabel:"\u2190 nish.software",moreActions:"More actions",more:"More",legend:"Legend",optional:"Optional",search:"Search",clearSearch:"Clear search",remove:"Remove",removeNamed:t=>`Remove ${t}`,noMatches:"No matches",clear:"Clear",searching:"Searching\u2026",invalidDate:"Enter a valid date.",chooseDate:"Choose date",changeDate:t=>`Change date, ${t}`,previousMonth:"Previous month",nextMonth:"Next month",month:"Month",year:"Year",dayToken:"DD",monthToken:"MM",yearToken:"YYYY",optionAdded:t=>`Added ${t}`,optionRemoved:t=>`Removed ${t}`,clearAll:"Clear all",maxSelected:t=>`You can pick up to ${t}`,carouselRole:"carousel",slideRole:"slide",slideLabel:(t,e)=>`${t} of ${e}`,previousSlide:"Previous slide",nextSlide:"Next slide",goToSlide:t=>`Go to slide ${t}`,slidePicker:"Choose slide",startRotation:"Start slide rotation",stopRotation:"Stop slide rotation",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",loading:"Loading",failedToLoad:"Failed to load",retry:"Retry",actions:"Actions",offline:"You're offline",nothingHere:"Nothing here yet",loadingNamed:t=>`Loading ${t}`,sortBy:"Sort by",sortDefault:"Default",noData:"No data",noDataNamed:t=>`${t}: no data`,filters:"Filters",clearFilters:"Clear filters",done:"Done",activeCount:t=>`${t} active`,newCount:t=>`${t} new`,sections:"Sections",theme:"Theme",sidebar:"Sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",skipToContent:"Skip to content",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(t,e)=>`Theme: ${t}. Switch to ${e}`,themePreset:"Theme preset",themePresetPlaceholder:"Preset\u2026",errorStaleTitle:"A new version is available",errorStaleBody:"Reload the page to get the latest version.",errorTitle:"Something went wrong",errorBody:"An unexpected error occurred.",errorDetails:"Details",errorTryAgain:"Try again",errorReload:"Reload page",saving:"Saving\u2026",saved:"Saved",saveFailed:"Could not save",enterNumber:"Enter a number",resizeColumns:"Resize columns",resizeRows:"Resize rows",layoutPresets:"Layout presets",live:"Live",offlineBadge:"Offline",progress:"Progress",workflow:"Workflow",activity:"Activity",other:"Other",waiting:"Waiting",noActivity:"No activity yet",systemMap:"System map",zoomOut:"Zoom out",zoomIn:"Zoom in",fitToScreen:"Fit to screen",followActivity:"Follow activity",canvasLines:"Lines",serviceTokens:"Service tokens",serviceTokensIntro:"Machine clients, like the nish MCP server, use these tokens to read this app. Revoking one stops it at once.",loadingServiceTokens:"Loading service tokens",tokenRevoke:"Revoke",tokenRevoked:"Revoked",tokenRevokedAt:t=>`Revoked ${t}`,tokenRevokeNamed:t=>`Revoke ${t}`,tokenRevokeTitle:t=>`Revoke ${t}?`,tokenRevokeFailed:"Could not revoke the token.",inboxMarkHandled:"Mark handled",inboxSnooze:"Snooze",inboxActions:"Actions",inboxViews:"Inbox views",inboxOpen:"Open",inboxSnoozed:"Snoozed",inboxHandled:"Handled",inboxFilterBySource:"Filter by source",inboxHappened:t=>`Happened ${t} times`,previousPage:"Previous page",nextPage:"Next page",pageLabel:t=>`Page ${t}`,paginationLabel:"Pagination",breadcrumbs:"Breadcrumbs",removeTag:t=>`Remove ${t}`,dropzoneLabel:"Drop files here or browse",browseFiles:"Browse files",removeFile:t=>`Remove ${t}`,avatar:"Avatar",avatarMore:t=>`${t} more`,sliderMin:"Minimum",sliderMax:"Maximum",accordion:"Accordion",progressIndeterminate:"Loading"};var Qe="nish-theme",et="nish.software",on=3600*24*365,W=()=>ce("theme",()=>({extra:{},listeners:new Set,watching:!1,switchId:0})),an=t=>{globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: ${t}`)};function ue(){if(typeof document>"u")return Qe;let t=document.documentElement.getAttribute("data-nish-storage-key");return t&&/^[A-Za-z0-9_-]+$/.test(t)?t:Qe}var K=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function $e(t){return typeof t=="string"&&(K(z,t)||K(W().extra,t))}function ln(){if(typeof document>"u")return null;try{let t=document.cookie.match(new RegExp(`(?:^|;\\s*)${ue()}=([a-z0-9-]+)`));return t?t[1]:null}catch{return null}}var tt=(t,e)=>e===t||e.endsWith("."+t);function cn(t,e){let n=t.toLowerCase(),i=(e??"").trim().toLowerCase().replace(/^\./,"");return i?tt(i,n)?i:null:tt(et,n)?et:null}function dn(){return typeof location>"u"||typeof document>"u"?null:cn(location.hostname,document.documentElement.getAttribute("data-nish-domain"))}function V(){let t=null;try{t=ln()??localStorage.getItem(ue())}catch{}return t==="system"||$e(t)?t:"system"}function hn(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":Xe}function un(){let t=document.documentElement.getAttribute("data-nish-themes");return t?t.split(/\s+/).filter($e):null}function ot(t=V()){let e=t==="system"?hn():t,n=typeof document>"u"?null:un();return n&&!n.includes(e)&&(e=he(e)),e}function he(t){let{extra:e}=W();return K(z,t)?z[t].scheme:K(e,t)?e[t]:"dark"}function at(t=V()){let e=ot(t),n=document.documentElement,i=n.getAttribute("data-theme");return i&&i!==e&&mn(n),n.setAttribute("data-theme",e),n.setAttribute("data-scheme",he(e)),n.setAttribute("data-theme-choice",t),n.style.colorScheme=he(e),gn(),W().listeners.forEach(s=>s(t,e)),e}function mn(t){let e=W(),n=++e.switchId;t.setAttribute("data-nish-theme-switching","");let i=()=>{e.switchId===n&&t.removeAttribute("data-nish-theme-switching")};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(i)):setTimeout(i,32)}function pn(t){if(t!=="system"&&!$e(t))return an(`unknown theme "${String(t)}" ignored. Register it with registerThemes() first.`),ot(V());let e=ue();try{localStorage.setItem(e,t)}catch{}try{let n=dn();if(n){let i=location.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; Domain=.${n}; Path=/; Max-Age=${on}; SameSite=Lax${i}`}}catch{}return at(t)}function fn(t){return getComputedStyle(document.documentElement).getPropertyValue(`--nish-${t}`).trim()}function gn(){let t=fn("bg");if(!t)return;let e=document.querySelector('meta[name="theme-color"][data-nish]')??document.querySelector('meta[name="theme-color"]:not([media]):not([data-nish-keep])');e||(e=document.createElement("meta"),e.name="theme-color",(document.head||document.documentElement).appendChild(e)),e.setAttribute("data-nish",""),e.content=t}function bn(){let t=W();if(t.watching||typeof window>"u")return;t.watching=!0;let e=()=>{let n=V();(n!==document.documentElement.getAttribute("data-theme-choice")||n==="system")&&at(n)};typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",e),window.addEventListener("storage",n=>{n.key===ue()&&e()}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function vn(t){bn();let{listeners:e}=W();return e.add(t),()=>{e.delete(t)}}var de=["system","light","dark"];function En(){let t=lt(V());return pn(t),t}var nt="http://www.w3.org/2000/svg";function Ce(t,e,n={}){let i=document.createElementNS(nt,"svg"),s={width:String(t),height:String(t),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",...n};for(let r of Object.keys(s))i.setAttribute(r,s[r]);for(let[r,o]of e){let d=document.createElementNS(nt,r);for(let c of Object.keys(o))d.setAttribute(c,o[c]);i.appendChild(d)}return i}var it={system:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["path",{d:"M8 21h8M12 17v4"}]],light:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2M12 20v2m-7.07-2.93 1.41-1.41M17.66 6.34l1.41-1.41M2 12h2m16 0h2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41"}]],dark:[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9"}]]},yn=()=>({system:F.themeSystem,light:F.themeLight,dark:F.themeDark}),Sn="set on another site";function lt(t){let e=de.indexOf(t);return de[(e+1)%de.length]}function Re(t,e){return t==="system"||t==="light"||t==="dark"?e[t]:K(z,t)?z[t].label:t.charAt(0).toUpperCase()+t.slice(1)}function ct(t,e={}){let n={...yn(),...e.labels},i=e.strings?.themeToggleLabel??F.themeToggleLabel,s=e.elsewhereLabel??Sn;t.tagName==="BUTTON"&&!t.getAttribute("type")&&t.setAttribute("type","button");let r=Object.keys(it).map(l=>Ce(16,it[l],{"data-icon":l}));if(e.showLabel){let l=document.createElement("span");l.setAttribute("data-theme-word",""),l.setAttribute("aria-hidden","true"),r.push(l)}t.replaceChildren(...r);let o=t.querySelector("[data-theme-word]"),d=l=>{let h=l==="system"||l==="light"||l==="dark"?l:he(l);t.setAttribute("data-choice",l),t.querySelectorAll("svg[data-icon]").forEach(g=>{g.getAttribute("data-icon")===h?g.removeAttribute("display"):g.setAttribute("display","none")});let p=de.includes(l)?"":` (${s})`,b=i(`${Re(l,n)}${p}`,Re(lt(l),n));t.setAttribute("aria-label",b),t.setAttribute("title",b),o&&(o.textContent=Re(l,n))},c=()=>{En()};t.addEventListener("click",c);let u=vn(l=>d(l));return d(V()),()=>{t.removeEventListener("click",c),u()}}var st=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4M12 17h.01"}]],rt=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4M12 8h.01"}]],_n={neutral:rt,info:rt,ok:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]],warn:st,loss:st},Tn=6e3,$=null,q=null;function dt(t,e={}){q?.(),(!$||!$.isConnected)&&($=document.createElement("div"),$.setAttribute("role","status"),$.setAttribute("aria-live","polite"),$.className="nish-toast-region",document.body.appendChild($));let n=$,i=document.createElement("div");i.className="nish-toast"+(e.tone&&e.tone!=="neutral"?` nish-toast--${e.tone}`:"");let s=document.createElement("span");s.className="nish-toast-icon",s.setAttribute("aria-hidden","true"),s.append(Ce(15,_n[e.tone??"neutral"])),i.append(s);let r=document.createElement("p");r.className="nish-toast-body",r.append(typeof t=="string"?document.createTextNode(t):t),i.append(r);let o=null,d=e.duration==="sticky"?1/0:e.duration??Tn,c=0,u=0,l=()=>{o!=null&&clearTimeout(o),o=null,i.remove(),q===l&&(q=null)},h=a=>{Number.isFinite(a)&&(c=Date.now(),o=setTimeout(l,a))},p=()=>{u+=1,!(u>1||o==null)&&(clearTimeout(o),o=null,d=Math.max(0,d-(Date.now()-c)))},b=()=>{u!==0&&(u-=1,u===0&&h(Math.max(d,1e3)))},g=e.action,_=g?.href!=null?Je(g.href):null;if(g&&(g.href==null||_!=null)){let a=document.createElement(g.href!=null?"a":"button");a.className="nish-toast-action",a.textContent=g.label,_!=null?a.href=_:a.type="button",a.addEventListener("click",()=>{g.onClick?.(),l()}),i.append(a)}let m=document.createElement("button");return m.type="button",m.className="nish-toast-close",m.setAttribute("aria-label",e.dismissLabel??e.strings?.dismiss??F.dismiss),m.append(Ce(14,[["path",{d:"M18 6 6 18M6 6l12 12"}]])),m.addEventListener("click",l),i.append(m),i.addEventListener("pointerenter",a=>a.pointerType==="mouse"&&p()),i.addEventListener("pointerleave",a=>a.pointerType==="mouse"&&b()),i.addEventListener("focusin",a=>!i.contains(a.relatedTarget)&&p()),i.addEventListener("focusout",a=>!i.contains(a.relatedTarget)&&b()),i.addEventListener("keydown",a=>{a.key==="Escape"&&l()}),setTimeout(()=>{q===l&&(n.append(i),h(d))},50),q=l,l}var wn=()=>typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function ht(t){if(typeof document>"u")return()=>{};let e=!1,n=!1;if(t.open)return()=>s();let i=document.activeElement instanceof HTMLElement?document.activeElement:null;function s(){if(e||!t.open)return;e=!0;let a,f=()=>{t.removeEventListener("animationend",T),a!==void 0&&clearTimeout(a),t.removeAttribute("data-closing"),t.style.transform="",t.style.transition="",e=!1,t.open&&t.close()},T=qt=>{qt.target===t&&f()};if(wn()){f();return}t.style.transform="",t.setAttribute("data-closing",""),t.addEventListener("animationend",T),a=setTimeout(f,260)}let r=a=>{a.preventDefault(),s()},o=a=>{a.key==="Escape"&&a.stopPropagation()},d=a=>{if(a.target===t){let f=t.getBoundingClientRect();a.clientX>=f.left&&a.clientX<=f.right&&a.clientY>=f.top&&a.clientY<=f.bottom||s();return}a.target instanceof Element&&a.target.closest("[data-sheet-close]")&&s()},c=0,u=0,l=0,h=0,p=1,b=a=>{if(a.pointerType==="mouse"||e||!a.isPrimary||typeof matchMedia<"u"&&matchMedia("(min-width: 640px)").matches)return;let f=t.getBoundingClientRect();!(a.target instanceof Element&&a.target.closest(".nish-sheet-header")!=null)&&a.clientY-f.top>28||(n=!0,c=u=a.clientY,l=a.timeStamp,h=0,p=f.height||1,t.style.transition="none",t.setPointerCapture?.(a.pointerId))},g=a=>{if(!n)return;let f=a.clientY-c,T=a.timeStamp-l;T>0&&(h=(a.clientY-u)/T),u=a.clientY,l=a.timeStamp,t.style.transform=`translateY(${f>=0?f:f*.3}px)`},_=a=>{if(!n)return;n=!1,t.releasePointerCapture?.(a.pointerId);let f=a.clientY-c;if(a.type!=="pointercancel"&&(f>p*.3||h>.5)){s();return}t.style.transition="transform 180ms var(--nish-ease-out, ease-out)",t.style.transform="",setTimeout(()=>{e||(t.style.transition="")},200)},m=()=>{t.removeEventListener("cancel",r),t.removeEventListener("keydown",o),t.removeEventListener("click",d),t.removeEventListener("pointerdown",b),t.removeEventListener("pointermove",g),t.removeEventListener("pointerup",_),t.removeEventListener("pointercancel",_),t.removeEventListener("close",m),i?.isConnected&&i.focus()};return t.addEventListener("cancel",r),t.addEventListener("keydown",o),t.addEventListener("click",d),t.addEventListener("pointerdown",b),t.addEventListener("pointermove",g),t.addEventListener("pointerup",_),t.addEventListener("pointercancel",_),t.addEventListener("close",m),t.showModal(),s}function ut(t,e){if(typeof document>"u")return()=>{};let n=document.documentElement,i=()=>{let r=t.offsetHeight;r>0?n.style.setProperty(e,`${r}px`):n.style.removeProperty(e)};i();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(i),s.observe(t)):window.addEventListener("resize",i),()=>{s?.disconnect(),window.removeEventListener("resize",i),n.style.removeProperty(e)}}var mt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var x=function(t,e,n,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n},y=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},j,me,pe,X,Me,Z,fe,O,J,M,ge,pt;var v={__proto__:null};v.enumerable=!0;Object.freeze(v);var ke=(M=class{constructor(e,n={}){if(j.set(this,!1),me.set(this,!1),pe.set(this,!1),X.set(this,!1),Me.set(this,Date.now()),Z.set(this,!1),fe.set(this,void 0),O.set(this,void 0),J.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof n!="object"||!n)throw new Error('The "options" argument must be an object');let{bubbles:i,cancelable:s,composed:r}=n;x(this,j,!!s,"f"),x(this,me,!!i,"f"),x(this,pe,!!r,"f"),x(this,fe,`${e}`,"f"),x(this,O,null,"f"),x(this,J,!1,"f")}initEvent(e,n,i){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){x(this,X,!0,"f")}get target(){return y(this,O,"f")}get currentTarget(){return y(this,O,"f")}get srcElement(){return y(this,O,"f")}get type(){return y(this,fe,"f")}get cancelable(){return y(this,j,"f")}get defaultPrevented(){return y(this,j,"f")&&y(this,X,"f")}get timeStamp(){return y(this,Me,"f")}composedPath(){return y(this,J,"f")?[y(this,O,"f")]:[]}get returnValue(){return!y(this,j,"f")||!y(this,X,"f")}get bubbles(){return y(this,me,"f")}get composed(){return y(this,pe,"f")}get eventPhase(){return y(this,J,"f")?M.AT_TARGET:M.NONE}get cancelBubble(){return y(this,Z,"f")}set cancelBubble(e){e&&x(this,Z,!0,"f")}stopPropagation(){x(this,Z,!0,"f")}get isTrusted(){return!1}},j=new WeakMap,me=new WeakMap,pe=new WeakMap,X=new WeakMap,Me=new WeakMap,Z=new WeakMap,fe=new WeakMap,O=new WeakMap,J=new WeakMap,M.NONE=0,M.CAPTURING_PHASE=1,M.AT_TARGET=2,M.BUBBLING_PHASE=3,M);Object.defineProperties(ke.prototype,{initEvent:v,stopImmediatePropagation:v,preventDefault:v,target:v,currentTarget:v,srcElement:v,type:v,cancelable:v,defaultPrevented:v,timeStamp:v,composedPath:v,returnValue:v,bubbles:v,composed:v,eventPhase:v,cancelBubble:v,stopPropagation:v,isTrusted:v});var ft=(pt=class extends ke{constructor(e,n={}){super(e,n),ge.set(this,void 0),x(this,ge,n?.detail??null,"f")}initCustomEvent(e,n,i,s){throw new Error("Method not implemented.")}get detail(){return y(this,ge,"f")}},ge=new WeakMap,pt);Object.defineProperties(ft.prototype,{detail:v});var A=ke,Ne=ft;var S;var si=(S=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},S.STYLE_RULE=1,S.CHARSET_RULE=2,S.IMPORT_RULE=3,S.MEDIA_RULE=4,S.FONT_FACE_RULE=5,S.PAGE_RULE=6,S.NAMESPACE_RULE=10,S.KEYFRAMES_RULE=7,S.KEYFRAME_RULE=8,S.SUPPORTS_RULE=12,S.COUNTER_STYLE_RULE=11,S.FONT_FEATURE_VALUES_RULE=14,S.MARGIN_RULE=9,S);globalThis.Event??=A;globalThis.CustomEvent??=Ne;var Oe=Symbol(),gt=t=>typeof t=="boolean"?t:t?.capture??!1,L={__proto__:null};L.enumerable=!0;Object.freeze(L);var be=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,n,i){if(n==null)return;let s=gt(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(n))return;let o=typeof i=="object"&&i?i:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,n,i)),r.set(n,o??{})}removeEventListener(e,n,i){if(n==null)return;let s=gt(i)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(n),r.size||s.delete(e))}dispatchEvent(e){let n=this.__resolveFullEventPath();!e.composed&&this.__host&&(n=n.slice(0,n.indexOf(this.__host)));let i=!1,s=!1,r=A.NONE,o=null,d=null,c=null,u=e.stopPropagation,l=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??d},...L},srcElement:{get(){return e.target},...L},currentTarget:{get(){return c},...L},eventPhase:{get(){return r},...L},composedPath:{value:()=>n,...L},stopPropagation:{value:()=>{i=!0,u.call(e)},...L},stopImmediatePropagation:{value:()=>{s=!0,l.call(e)},...L}});let h=(m,a,f)=>{typeof m=="function"?m(e):typeof m?.handleEvent=="function"&&m.handleEvent(e),a.once&&f.delete(m)},p=()=>(c=null,r=A.NONE,!e.defaultPrevented),b=n.slice().reverse();o=!this.__host||!e.composed?this:null;let g=m=>{for(d=this;d.__host&&m.includes(d.__host);)d=d.__host};for(let m of b){!o&&(!d||d===m.__host)&&g(b.slice(b.indexOf(m))),c=m,r=m===e.target?A.AT_TARGET:A.CAPTURING_PHASE;let a=m.__captureEventListeners.get(e.type);if(a){for(let[f,T]of a)if(h(f,T,a),s)return p()}if(i)return p()}let _=e.bubbles?n:[this];d=null;for(let m of _){!o&&(!d||m===d.__host)&&g(_.slice(0,_.indexOf(m)+1)),c=m,r=m===e.target?A.AT_TARGET:A.BUBBLING_PHASE;let a=m.__eventListeners.get(e.type);if(a){for(let[f,T]of a)if(h(f,T,a),s)return p()}if(i)return p()}return p()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Et,Ln]}};var bt=new WeakMap,Q=t=>{let e=bt.get(t);return e===void 0&&bt.set(t,e=new Map),e},ee=class extends be{getRootNode(e){return e?.composed?Pe:this.__host?.__shadowRoot??Pe}};var vt=class extends ee{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Et=new vt,Pe=Et;var yt=class extends ee{constructor(e){if(super(),e!==Oe)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ve,customElements:De,document:Pe,Document:vt,Element:St,EventTarget:be,HTMLElement:_t,Node:ee,ShadowRoot:Tt,window:this,Window:yt})}};var St=class extends ee{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(Q(this)).map(([e,n])=>({name:e,value:n}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,n){Q(this).set(e,String(n))}removeAttribute(e){Q(this).delete(e)}toggleAttribute(e,n){if(this.hasAttribute(e)){if(n===void 0||!n)return this.removeAttribute(e),!1}else return n===void 0||n?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return Q(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let n=new Tt(Oe,e);return n.__eventTargetParent=this,n.__host=this,this.__shadowRoot=n}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new mt(this);return this.__internals=e,e}getAttribute(e){return Q(this).get(e)??null}};var _t=class extends St{},He=_t;var Tt=class extends ee{get host(){return this.__host}constructor(e,n){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=n.mode}};globalThis.litServerRoot??=Object.defineProperty(new He,"localName",{get(){return"lit-server-root"}});function xn(){let t,e;return{promise:new Promise((i,s)=>{t=i,e=s}),resolve:t,reject:e}}var ve=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,n){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
|
+
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(n))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(n)}`);n.__localName=e,this.__definitions.set(e,{ctor:n,observedAttributes:n.observedAttributes??[]}),this.__reverseDefinitions.set(n,e),this.__pendingWhenDefineds.get(e)?.resolve(n),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let n=this.__definitions.get(e);if(n)return n.ctor;let i=this.__pendingWhenDefineds.get(e);return i||(i=xn(),this.__pendingWhenDefineds.set(e,i)),i.promise}},An=ve;var De=new An,Ln=new yt(Oe);var te=globalThis,ye=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),wt=new WeakMap,Ee=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==xt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o,n=this.t;if(ye&&e===void 0){let i=n!==void 0&&n.length===1;i&&(e=wt.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&wt.set(n,e))}return e}toString(){return this.cssText}},At=t=>new Ee(typeof t=="string"?t:t+"",void 0,xt);var Lt=(t,e)=>{if(ye)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of e){let i=document.createElement("style"),s=te.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=n.cssText,t.appendChild(i)}},Ie=ye||te.CSSStyleSheet===void 0?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(let i of e.cssRules)n+=i.cssText;return At(n)})(t):t;var{is:Rn,defineProperty:Cn,getOwnPropertyDescriptor:$n,getOwnPropertyNames:Mn,getOwnPropertySymbols:kn,getPrototypeOf:Nn}=Object,ie=globalThis;ie.customElements??=De;var Rt=ie.trustedTypes,Pn=Rt?Rt.emptyScript:"",On=ie.reactiveElementPolyfillSupport,ne=(t,e)=>t,Ue={toAttribute(t,e){switch(e){case Boolean:t=t?Pn:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},$t=(t,e)=>!Rn(t,e),Ct={attribute:!0,type:String,converter:Ue,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),ie.litPropertyMetadata??=new WeakMap;var R=class extends(globalThis.HTMLElement??He){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=Ct){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,n);s!==void 0&&Cn(this.prototype,e,s)}}static getPropertyDescriptor(e,n,i){let{get:s,set:r}=$n(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:s,set(o){let d=s?.call(this);r?.call(this,o),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ct}static _$Ei(){if(this.hasOwnProperty(ne("elementProperties")))return;let e=Nn(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ne("properties"))){let n=this.properties,i=[...Mn(n),...kn(n)];for(let s of i)this.createProperty(s,n[s])}let e=this[Symbol.metadata];if(e!==null){let n=litPropertyMetadata.get(e);if(n!==void 0)for(let[i,s]of n)this.elementProperties.set(i,s)}this._$Eh=new Map;for(let[n,i]of this.elementProperties){let s=this._$Eu(n,i);s!==void 0&&this._$Eh.set(s,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let n=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let s of i)n.unshift(Ie(s))}else e!==void 0&&n.push(Ie(e));return n}static _$Eu(e,n){let i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,n=this.constructor.elementProperties;for(let i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Lt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$ET(e,n){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){let r=(i.converter?.toAttribute!==void 0?i.converter:Ue).toAttribute(n,i.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,n){let i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=i.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Ue;this._$Em=s;let d=o.fromAttribute(n,r.type);this[s]=d??this._$Ej?.get(s)??d,this._$Em=null}}requestUpdate(e,n,i,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),i??=o.getPropertyOptions(e),!((i.hasChanged??$t)(r,n)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(n=void 0),this._$AL.set(e,n)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[s,r]of i){let{wrapped:o}=r,d=this[s];o!==!0||this._$AL.has(s)||d===void 0||this.C(s,void 0,r,d)}}let e=!1,n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(n)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};R.elementStyles=[],R.shadowRootOptions={mode:"open"},R[ne("elementProperties")]=new Map,R[ne("finalized")]=new Map,On?.({ReactiveElement:R}),(ie.reactiveElementVersions??=[]).push("2.1.2");var _e=globalThis,Mt=t=>t,Se=_e.trustedTypes,kt=Se?Se.createPolicy("lit-html",{createHTML:t=>t}):void 0,It="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+k,Hn=`<${Ut}>`,I=_e.document===void 0?{createTreeWalker:()=>({})}:document,re=()=>I.createComment(""),oe=t=>t===null||typeof t!="object"&&typeof t!="function",Ge=Array.isArray,Dn=t=>Ge(t)||typeof t?.[Symbol.iterator]=="function",Be=`[
|
|
3
3
|
\f\r]`,se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Nt=/-->/g,Pt=/>/g,H=RegExp(`>|${Be}(?:([^\\s"'>=/]+)(${Be}*=${Be}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Ht=/"/g,Bt=/^(?:script|style|textarea|title)$/i,qe=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Ii=qe(1),Ui=qe(2),Bi=qe(3),U=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Dt=new WeakMap,D=I.createTreeWalker(I,129);function zt(t,e){if(!Ge(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return kt!==void 0?kt.createHTML(e):e}var In=(t,e)=>{let n=t.length-1,i=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=se;for(let d=0;d<n;d++){let c=t[d],u,l,h=-1,p=0;for(;p<c.length&&(o.lastIndex=p,l=o.exec(c),l!==null);)p=o.lastIndex,o===se?l[1]==="!--"?o=Nt:l[1]!==void 0?o=Pt:l[2]!==void 0?(Bt.test(l[2])&&(s=RegExp("</"+l[2],"g")),o=H):l[3]!==void 0&&(o=H):o===H?l[0]===">"?(o=s??se,h=-1):l[1]===void 0?h=-2:(h=o.lastIndex-l[2].length,u=l[1],o=l[3]===void 0?H:l[3]==='"'?Ht:Ot):o===Ht||o===Ot?o=H:o===Nt||o===Pt?o=se:(o=H,s=void 0);let b=o===H&&t[d+1].startsWith("/>")?" ":"";r+=o===se?c+Hn:h>=0?(i.push(u),c.slice(0,h)+It+c.slice(h)+k+b):c+k+(h===-2?d:b)}return[zt(t,r+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ae=class t{constructor({strings:e,_$litType$:n},i){let s;this.parts=[];let r=0,o=0,d=e.length-1,c=this.parts,[u,l]=In(e,n);if(this.el=t.createElement(u,i),D.currentNode=this.el.content,n===2||n===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=D.nextNode())!==null&&c.length<d;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(It)){let p=l[o++],b=s.getAttribute(h).split(k),g=/([.?@])?(.*)/.exec(p);c.push({type:1,index:r,name:g[2],strings:b,ctor:g[1]==="."?Fe:g[1]==="?"?We:g[1]==="@"?Ve:q}),s.removeAttribute(h)}else h.startsWith(k)&&(c.push({type:6,index:r}),s.removeAttribute(h));if(Bt.test(s.tagName)){let h=s.textContent.split(k),p=h.length-1;if(p>0){s.textContent=_e?_e.emptyScript:"";for(let b=0;b<p;b++)s.append(h[b],re()),D.nextNode(),c.push({type:2,index:++r});s.append(h[p],re())}}}else if(s.nodeType===8)if(s.data===Ut)c.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(k,h+1))!==-1;)c.push({type:7,index:r}),h+=k.length-1}r++}}static createElement(e,n){let i=I.createElement("template");return i.innerHTML=e,i}};function G(t,e,n=t,i){if(e===U)return e;let s=i!==void 0?n._$Co?.[i]:n._$Cl,r=oe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(t),s._$AT(t,n,i)),i!==void 0?(n._$Co??=[])[i]=s:n._$Cl=s),s!==void 0&&(e=G(t,s._$AS(t,e.values),s,i)),e}var ze=class{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:n},parts:i}=this._$AD,s=(e?.creationScope??I).importNode(n,!0);D.currentNode=s;let r=D.nextNode(),o=0,d=0,c=i[0];for(;c!==void 0;){if(o===c.index){let u;c.type===2?u=new le(r,r.nextSibling,this,e):c.type===1?u=new c.ctor(r,c.name,c.strings,this,e):c.type===6&&(u=new je(r,this,e)),this._$AV.push(u),c=i[++d]}o!==c?.index&&(r=D.nextNode(),o++)}return D.currentNode=I,s}p(e){let n=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}},le=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,i,s){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=G(this,e,n),oe(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Dn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(I.createTextNode(e)),this._$AH=e}$(e){let{values:n,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ae.createElement(zt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(n);else{let r=new ze(s,this),o=r.u(this.options);r.p(n),this.T(o),this._$AH=r}}_$AC(e){let n=Dt.get(e.strings);return n===void 0&&Dt.set(e.strings,n=new ae(e)),n}k(e){Ge(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,i,s=0;for(let r of e)s===n.length?n.push(i=new t(this.O(re()),this.O(re()),this,this.options)):i=n[s],i._$AI(r),s++;s<n.length&&(this._$AR(i&&i._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){let i=Mt(e).nextSibling;Mt(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(e,n=this,i,s){let r=this.strings,o=!1;if(r===void 0)e=G(this,e,n,0),o=!oe(e)||e!==this._$AH&&e!==U,o&&(this._$AH=e);else{let d=e,c,u;for(e=r[0],c=0;c<r.length-1;c++)u=G(this,d[i+c],n,c),u===U&&(u=this._$AH[c]),o||=!oe(u)||u!==this._$AH[c],u===E?e=E:e!==E&&(e+=(u??"")+r[c+1]),this._$AH[c]=u}o&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Fe=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},We=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},Ve=class extends q{constructor(e,n,i,s,r){super(e,n,i,s,r),this.type=5}_$AI(e,n=this){if((e=G(this,e,n,0)??E)===U)return;let i=this._$AH,s=e===E&&i!==E||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==E&&(i===E||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},je=class{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){G(this,e)}};var Un=Se.litHtmlPolyfillSupport;Un?.(ae,le),(Se.litHtmlVersions??=[]).push("3.3.3");var Ft=(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(s===void 0){let r=n?.renderBefore??null;i._$litPart$=s=new le(e.insertBefore(re(),r),r,void 0,n??{})}return s._$AI(t),s};var Ye=globalThis,N=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ft(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};N._$litElement$=!0,N.finalized=!0,Ye.litElementHydrateSupport?.({LitElement:N});var Bn=Ye.litElementPolyfillSupport;Bn?.({LitElement:N});(Ye.litElementVersions??=[]).push("4.2.2");var Wt={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:t=>`${t} result${t===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:t=>`${t} active`,remove:"Remove",removeNamed:t=>`Remove ${t}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:t=>`${t}: no data`,seriesNumber:t=>`Series ${t}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function Ke(){return ce("element-strings",()=>({values:{...Wt},listeners:new Set}))}function zn(t){let e=Ke(),n={...e.values};for(let[i,s]of Object.entries(t))s!==void 0&&Object.hasOwn(Wt,i)&&(n[i]=s);e.values=n;for(let i of Array.from(e.listeners))i()}function we(){return Ke().values}function Vt(t){let e=Ke().listeners;return e.add(t),()=>{e.delete(t)}}var T=class extends N{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=Vt(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function jt(t){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}function R(t,e){customElements.get(t)||customElements.define(t,e)}function Gt(t,e){let n=null,i=()=>Array.from(t.querySelectorAll(":scope > a")),s=()=>{let o=location.pathname,d=null,c=-1;for(let u of i()){if(e?.(u),!u.getAttribute("href"))continue;let l;try{l=new URL(u.getAttribute("href"),location.href)}catch{continue}if(l.origin!==location.origin)continue;if(l.hash&&l.pathname===location.pathname){l.hash===location.hash&&(d=u,c=1/0);continue}let h=l.pathname;(h==="/"?o==="/":o===h||o.startsWith(h.endsWith("/")?h:`${h}/`))&&h.length>c&&(d=u,c=h.length)}if(!d){n?.removeAttribute("aria-current"),n=null;return}for(let u of i())u.removeAttribute("aria-current");d.setAttribute("aria-current","page"),n=d},r=new MutationObserver(()=>{r.disconnect(),s(),r.observe(t,{childList:!0})});return s(),window.addEventListener("popstate",s),window.addEventListener("hashchange",s),r.observe(t,{childList:!0}),()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),r.disconnect()}}var Te=class extends T{static properties={label:{type:String,reflect:!0},lg:{type:Boolean,reflect:!0}};#e=null;#t=null;#n=null;constructor(){super(),this.label="",this.lg=!1}connectedCallback(){super.connectedCallback(),jt(()=>this.#s())}#s(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-bottom-nav");if(!e){for(e=document.createElement("nav"),e.className="nish-bottom-nav";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#i(),this.#n=Gt(e,n=>n.classList.add("nish-bottom-nav-item")),this.#t=ut(e,"--nish-bottom-nav-h")}disconnectedCallback(){super.disconnectedCallback(),this.#e=null,this.#n?.(),this.#n=null,this.#t?.(),this.#t=null}updated(e){this.#i()}#i(){this.#e&&(this.#e.setAttribute("aria-label",this.label||we().sections),this.#e.classList.toggle("nish-bottom-nav--lg",this.lg))}};R("nish-bottom-nav",Te);var qt=0,xe=class extends T{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;opener=null;value="";waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.value="",this.open=!1,this.dialog.close())}show(){this.open=!0}close(e=""){this.dialog?.open&&(this.value=e),this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let n=e.target.closest("[data-dialog-open]");n&&n.getAttribute("data-dialog-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-dialog",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("click",this.onDialogClick),e.addEventListener("keydown",this.onKey),e.addEventListener("cancel",this.onCancel),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let n=e.querySelector(".nish-dialog-title"),i=e.querySelector(".nish-dialog-body");n?(n.id||(n.id=`nish-dialog-title-${++qt}`),e.setAttribute("aria-labelledby",n.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label")),i?(i.id||(i.id=`nish-dialog-body-${++qt}`),e.setAttribute("aria-describedby",i.id)):e.removeAttribute("aria-describedby")}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?(this.opener=document.activeElement instanceof HTMLElement?document.activeElement:null,e.returnValue="",e.showModal()):!this.open&&e.open&&e.close())}onDialogClick=e=>{let n=this.dialog;if(n){if(e.target===n){let i=n.getBoundingClientRect();e.clientX>=i.left&&e.clientX<=i.right&&e.clientY>=i.top&&e.clientY<=i.bottom||this.close();return}if(e.target instanceof Element){let i=e.target.closest("[data-dialog-close]");i&&i.closest("dialog")===n&&this.close(i.getAttribute("value")??"")}}};onKey=e=>{e.key==="Escape"&&e.stopPropagation()};onCancel=e=>{e.preventDefault(),this.close()};onDialogClose=()=>{let e=this.value||this.dialog?.returnValue||"";this.value="",this.open&&(this.open=!1);let n=this.opener;this.opener=null,n?.isConnected&&n.focus(),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0,detail:{value:e}}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};R("nish-dialog",xe);var Fn=0,Ae=class extends T{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;closeSheet=null;waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.open=!1,this.dialog.close())}show(){this.open=!0}close(){this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let n=e.target.closest("[data-sheet-open]");n&&n.getAttribute("data-sheet-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-sheet",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let n=e.querySelector(".nish-sheet-title");n?(n.id||(n.id=`nish-sheet-title-${++Fn}`),e.setAttribute("aria-labelledby",n.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"))}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?this.closeSheet=ht(e):!this.open&&e.open&&this.closeSheet?.())}onDialogClose=()=>{this.closeSheet=null,this.open&&(this.open=!1),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};R("nish-sheet",Ae);var Le=class extends T{static properties={labelled:{type:Boolean,reflect:!0},pill:{type:Boolean,reflect:!0},labelSystem:{attribute:"label-system"},labelLight:{attribute:"label-light"},labelDark:{attribute:"label-dark"}};#e=null;#t=null;constructor(){super(),this.labelled=!1,this.pill=!1}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#r()}updated(e){this.#e&&this.#n!==this.#i()&&this.#o()}#n="";#s(){let e=we();return[this.labelSystem||e.themeSystem,this.labelLight||e.themeLight,this.labelDark||e.themeDark]}#i(){return JSON.stringify([this.labelled,this.pill,...this.#s()])}#r(){this.#t?.(),this.#t=null,this.#e?.remove(),this.#e=null}#o(){this.#r(),this.#n=this.#i();let e=document.createElement("button");e.className="nish-theme-btn",e.classList.toggle("nish-theme-btn--labelled",this.labelled),e.classList.toggle("nish-theme-btn--pill",this.pill),this.prepend(e),this.#e=e;let[n,i,s]=this.#s(),r={system:n,light:i,dark:s};this.#t=ct(e,{showLabel:this.labelled,labels:r})}};R("nish-theme-toggle",Le);export{Te as NishBottomNav,xe as NishDialog,T as NishElement,Ae as NishSheet,Le as NishThemeToggle,zn as configureStrings,R as define,dt as toast};
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Ht=/"/g,Bt=/^(?:script|style|textarea|title)$/i,Ye=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Ii=Ye(1),Ui=Ye(2),Bi=Ye(3),U=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Dt=new WeakMap,D=I.createTreeWalker(I,129);function zt(t,e){if(!Ge(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return kt!==void 0?kt.createHTML(e):e}var In=(t,e)=>{let n=t.length-1,i=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=se;for(let d=0;d<n;d++){let c=t[d],u,l,h=-1,p=0;for(;p<c.length&&(o.lastIndex=p,l=o.exec(c),l!==null);)p=o.lastIndex,o===se?l[1]==="!--"?o=Nt:l[1]!==void 0?o=Pt:l[2]!==void 0?(Bt.test(l[2])&&(s=RegExp("</"+l[2],"g")),o=H):l[3]!==void 0&&(o=H):o===H?l[0]===">"?(o=s??se,h=-1):l[1]===void 0?h=-2:(h=o.lastIndex-l[2].length,u=l[1],o=l[3]===void 0?H:l[3]==='"'?Ht:Ot):o===Ht||o===Ot?o=H:o===Nt||o===Pt?o=se:(o=H,s=void 0);let b=o===H&&t[d+1].startsWith("/>")?" ":"";r+=o===se?c+Hn:h>=0?(i.push(u),c.slice(0,h)+It+c.slice(h)+k+b):c+k+(h===-2?d:b)}return[zt(t,r+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ae=class t{constructor({strings:e,_$litType$:n},i){let s;this.parts=[];let r=0,o=0,d=e.length-1,c=this.parts,[u,l]=In(e,n);if(this.el=t.createElement(u,i),D.currentNode=this.el.content,n===2||n===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=D.nextNode())!==null&&c.length<d;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(It)){let p=l[o++],b=s.getAttribute(h).split(k),g=/([.?@])?(.*)/.exec(p);c.push({type:1,index:r,name:g[2],strings:b,ctor:g[1]==="."?Fe:g[1]==="?"?We:g[1]==="@"?Ve:Y}),s.removeAttribute(h)}else h.startsWith(k)&&(c.push({type:6,index:r}),s.removeAttribute(h));if(Bt.test(s.tagName)){let h=s.textContent.split(k),p=h.length-1;if(p>0){s.textContent=Se?Se.emptyScript:"";for(let b=0;b<p;b++)s.append(h[b],re()),D.nextNode(),c.push({type:2,index:++r});s.append(h[p],re())}}}else if(s.nodeType===8)if(s.data===Ut)c.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(k,h+1))!==-1;)c.push({type:7,index:r}),h+=k.length-1}r++}}static createElement(e,n){let i=I.createElement("template");return i.innerHTML=e,i}};function G(t,e,n=t,i){if(e===U)return e;let s=i!==void 0?n._$Co?.[i]:n._$Cl,r=oe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(t),s._$AT(t,n,i)),i!==void 0?(n._$Co??=[])[i]=s:n._$Cl=s),s!==void 0&&(e=G(t,s._$AS(t,e.values),s,i)),e}var ze=class{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:n},parts:i}=this._$AD,s=(e?.creationScope??I).importNode(n,!0);D.currentNode=s;let r=D.nextNode(),o=0,d=0,c=i[0];for(;c!==void 0;){if(o===c.index){let u;c.type===2?u=new le(r,r.nextSibling,this,e):c.type===1?u=new c.ctor(r,c.name,c.strings,this,e):c.type===6&&(u=new je(r,this,e)),this._$AV.push(u),c=i[++d]}o!==c?.index&&(r=D.nextNode(),o++)}return D.currentNode=I,s}p(e){let n=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}},le=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,i,s){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=G(this,e,n),oe(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Dn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(I.createTextNode(e)),this._$AH=e}$(e){let{values:n,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ae.createElement(zt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(n);else{let r=new ze(s,this),o=r.u(this.options);r.p(n),this.T(o),this._$AH=r}}_$AC(e){let n=Dt.get(e.strings);return n===void 0&&Dt.set(e.strings,n=new ae(e)),n}k(e){Ge(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,i,s=0;for(let r of e)s===n.length?n.push(i=new t(this.O(re()),this.O(re()),this,this.options)):i=n[s],i._$AI(r),s++;s<n.length&&(this._$AR(i&&i._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){let i=Mt(e).nextSibling;Mt(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Y=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(e,n=this,i,s){let r=this.strings,o=!1;if(r===void 0)e=G(this,e,n,0),o=!oe(e)||e!==this._$AH&&e!==U,o&&(this._$AH=e);else{let d=e,c,u;for(e=r[0],c=0;c<r.length-1;c++)u=G(this,d[i+c],n,c),u===U&&(u=this._$AH[c]),o||=!oe(u)||u!==this._$AH[c],u===E?e=E:e!==E&&(e+=(u??"")+r[c+1]),this._$AH[c]=u}o&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Fe=class extends Y{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},We=class extends Y{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},Ve=class extends Y{constructor(e,n,i,s,r){super(e,n,i,s,r),this.type=5}_$AI(e,n=this){if((e=G(this,e,n,0)??E)===U)return;let i=this._$AH,s=e===E&&i!==E||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==E&&(i===E||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},je=class{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){G(this,e)}};var Un=_e.litHtmlPolyfillSupport;Un?.(ae,le),(_e.litHtmlVersions??=[]).push("3.3.3");var Ft=(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(s===void 0){let r=n?.renderBefore??null;i._$litPart$=s=new le(e.insertBefore(re(),r),r,void 0,n??{})}return s._$AI(t),s};var qe=globalThis,N=class extends R{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ft(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};N._$litElement$=!0,N.finalized=!0,qe.litElementHydrateSupport?.({LitElement:N});var Bn=qe.litElementPolyfillSupport;Bn?.({LitElement:N});(qe.litElementVersions??=[]).push("4.2.2");var Wt={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:t=>`${t} result${t===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:t=>`${t} active`,remove:"Remove",removeNamed:t=>`Remove ${t}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:t=>`${t}: no data`,seriesNumber:t=>`Series ${t}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function Ke(){return ce("element-strings",()=>({values:{...Wt},listeners:new Set}))}function zn(t){let e=Ke(),n={...e.values};for(let[i,s]of Object.entries(t))s!==void 0&&Object.hasOwn(Wt,i)&&(n[i]=s);e.values=n;for(let i of Array.from(e.listeners))i()}function Te(){return Ke().values}function Vt(t){let e=Ke().listeners;return e.add(t),()=>{e.delete(t)}}var w=class extends N{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=Vt(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function jt(t){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}function C(t,e){customElements.get(t)||customElements.define(t,e)}function Gt(t,e){let n=null,i=()=>Array.from(t.querySelectorAll(":scope > a")),s=()=>{let o=location.pathname,d=null,c=-1;for(let u of i()){if(e?.(u),!u.getAttribute("href"))continue;let l;try{l=new URL(u.getAttribute("href"),location.href)}catch{continue}if(l.origin!==location.origin)continue;if(l.hash&&l.pathname===location.pathname){l.hash===location.hash&&(d=u,c=1/0);continue}let h=l.pathname;(h==="/"?o==="/":o===h||o.startsWith(h.endsWith("/")?h:`${h}/`))&&h.length>c&&(d=u,c=h.length)}if(!d){n?.removeAttribute("aria-current"),n=null;return}for(let u of i())u.removeAttribute("aria-current");d.setAttribute("aria-current","page"),n=d},r=new MutationObserver(()=>{r.disconnect(),s(),r.observe(t,{childList:!0})});return s(),window.addEventListener("popstate",s),window.addEventListener("hashchange",s),r.observe(t,{childList:!0}),()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),r.disconnect()}}var we=class extends w{static properties={label:{type:String,reflect:!0},lg:{type:Boolean,reflect:!0}};#e=null;#t=null;#n=null;constructor(){super(),this.label="",this.lg=!1}connectedCallback(){super.connectedCallback(),jt(()=>this.#s())}#s(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-bottom-nav");if(!e){for(e=document.createElement("nav"),e.className="nish-bottom-nav";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#i(),this.#n=Gt(e,n=>n.classList.add("nish-bottom-nav-item")),this.#t=ut(e,"--nish-bottom-nav-h")}disconnectedCallback(){super.disconnectedCallback(),this.#e=null,this.#n?.(),this.#n=null,this.#t?.(),this.#t=null}updated(e){this.#i()}#i(){this.#e&&(this.#e.setAttribute("aria-label",this.label||Te().sections),this.#e.classList.toggle("nish-bottom-nav--lg",this.lg))}};C("nish-bottom-nav",we);var Yt=0,xe=class extends w{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;opener=null;value="";waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.value="",this.open=!1,this.dialog.close())}show(){this.open=!0}close(e=""){this.dialog?.open&&(this.value=e),this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let n=e.target.closest("[data-dialog-open]");n&&n.getAttribute("data-dialog-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-dialog",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("click",this.onDialogClick),e.addEventListener("keydown",this.onKey),e.addEventListener("cancel",this.onCancel),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let n=e.querySelector(".nish-dialog-title"),i=e.querySelector(".nish-dialog-body");n?(n.id||(n.id=`nish-dialog-title-${++Yt}`),e.setAttribute("aria-labelledby",n.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label")),i?(i.id||(i.id=`nish-dialog-body-${++Yt}`),e.setAttribute("aria-describedby",i.id)):e.removeAttribute("aria-describedby")}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?(this.opener=document.activeElement instanceof HTMLElement?document.activeElement:null,e.returnValue="",e.showModal()):!this.open&&e.open&&e.close())}onDialogClick=e=>{let n=this.dialog;if(n){if(e.target===n){let i=n.getBoundingClientRect();e.clientX>=i.left&&e.clientX<=i.right&&e.clientY>=i.top&&e.clientY<=i.bottom||this.close();return}if(e.target instanceof Element){let i=e.target.closest("[data-dialog-close]");i&&i.closest("dialog")===n&&this.close(i.getAttribute("value")??"")}}};onKey=e=>{e.key==="Escape"&&e.stopPropagation()};onCancel=e=>{e.preventDefault(),this.close()};onDialogClose=()=>{let e=this.value||this.dialog?.returnValue||"";this.value="",this.open&&(this.open=!1);let n=this.opener;this.opener=null,n?.isConnected&&n.focus(),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0,detail:{value:e}}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};C("nish-dialog",xe);var Fn=0,Ae=class extends w{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;closeSheet=null;waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.open=!1,this.dialog.close())}show(){this.open=!0}close(){this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let n=e.target.closest("[data-sheet-open]");n&&n.getAttribute("data-sheet-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-sheet",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let n=e.querySelector(".nish-sheet-title");n?(n.id||(n.id=`nish-sheet-title-${++Fn}`),e.setAttribute("aria-labelledby",n.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"))}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?this.closeSheet=ht(e):!this.open&&e.open&&this.closeSheet?.())}onDialogClose=()=>{this.closeSheet=null,this.open&&(this.open=!1),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};C("nish-sheet",Ae);var Le=class extends w{static properties={labelled:{type:Boolean,reflect:!0},pill:{type:Boolean,reflect:!0},labelSystem:{attribute:"label-system"},labelLight:{attribute:"label-light"},labelDark:{attribute:"label-dark"}};#e=null;#t=null;constructor(){super(),this.labelled=!1,this.pill=!1}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#r()}updated(e){this.#e&&this.#n!==this.#i()&&this.#o()}#n="";#s(){let e=Te();return[this.labelSystem||e.themeSystem,this.labelLight||e.themeLight,this.labelDark||e.themeDark]}#i(){return JSON.stringify([this.labelled,this.pill,...this.#s()])}#r(){this.#t?.(),this.#t=null,this.#e?.remove(),this.#e=null}#o(){this.#r(),this.#n=this.#i();let e=document.createElement("button");e.className="nish-theme-btn",e.classList.toggle("nish-theme-btn--labelled",this.labelled),e.classList.toggle("nish-theme-btn--pill",this.pill),this.prepend(e),this.#e=e;let[n,i,s]=this.#s(),r={system:n,light:i,dark:s};this.#t=ct(e,{showLabel:this.labelled,labels:r})}};C("nish-theme-toggle",Le);export{we as NishBottomNav,xe as NishDialog,w as NishElement,Ae as NishSheet,Le as NishThemeToggle,zn as configureStrings,C as define,dt as toast};
|
|
5
5
|
/*! Bundled license information:
|
|
6
6
|
|
|
7
7
|
@lit-labs/ssr-dom-shim/lib/element-internals.js:
|