godown 3.0.1 → 3.0.2
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/build/godown+lit.iife.js +5 -5
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +4 -4
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +2 -2
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +2 -2
- package/build/godown.js +2 -2
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +2 -2
- package/build/godown.umd.js.map +1 -1
- package/components/alert.js +1 -1
- package/components/alert.js.map +1 -1
- package/components/breath.js +1 -1
- package/components/breath.js.map +1 -1
- package/components/button.js +1 -1
- package/components/button.js.map +1 -1
- package/components/details.js +1 -1
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +3 -2
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +1 -1
- package/components/dialog.js.map +1 -1
- package/components/progress.js +1 -1
- package/components/progress.js.map +1 -1
- package/components/router.d.ts +1 -1
- package/components/router.d.ts.map +1 -1
- package/components/router.js +1 -1
- package/components/router.js.map +1 -1
- package/components/split.js +1 -1
- package/components/split.js.map +1 -1
- package/core/super-input.d.ts +1 -0
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js +1 -1
- package/core/super-input.js.map +1 -1
- package/custom-elements.json +1 -1
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +1 -4
- package/dev/components/button.js.map +1 -1
- package/dev/components/dialog.d.ts +3 -2
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +2 -8
- package/dev/components/dialog.js.map +1 -1
- package/dev/components/router.d.ts +1 -1
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +5 -1
- package/dev/components/router.js.map +1 -1
- package/dev/core/super-input.d.ts +1 -0
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js +4 -1
- package/dev/core/super-input.js.map +1 -1
- package/package.json +3 -3
- package/src/components/button.ts +1 -4
- package/src/components/dialog.ts +5 -4
- package/src/components/router.ts +6 -1
- package/src/core/super-input.ts +5 -1
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/build/godown.umd.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("lit")):"function"==typeof define&&define.amd?define(["exports","lit"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Godown={},t.Lit)}(this,(function(t,e){"use strict";
|
2
2
|
/**
|
3
3
|
* @license MIT
|
4
|
-
* @version 3.0.
|
4
|
+
* @version 3.0.2
|
5
5
|
* Require Lit Core ("Lit" in globalThis)
|
6
6
|
*/function o(t,e,o,r){var s,a=arguments.length,l=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,o,r);else for(var h=t.length-1;h>=0;h--)(s=t[h])&&(l=(a<3?s(l):a>3?s(e,o,l):s(e,o))||l);return a>3&&l&&Object.defineProperty(e,o,l),l}"function"==typeof SuppressedError&&SuppressedError;const r=t=>null==t,s=t=>!isNaN(+t),a=(t,e=" ")=>{if(!t||!e)return t;let o=t.length;for(;o>0&&t.slice(o-e.length,o)===e;)o-=e.length;return t.slice(0,o)},l=(t,e=" ")=>{if(!t||!e)return t;let o=0;for(;o<t.length&&t.slice(o,o+e.length)===e;)o+=e.length;return t.slice(o)},h=(t,e)=>a(l(t,e),e),c=(t,...e)=>Object.keys(t).reduce(((o,r)=>(e.includes(r)||(o[r]=t[r]),o)),{}),d="-";const p=(...t)=>e=>{const o=[];for(let t=Object.getPrototypeOf(e);t.styles;t=Object.getPrototypeOf(t))o.push(t.styles);e.styles=[...o,...t]},u=(t,e)=>o=>{t||=o.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o.protoName=t;(({tagName:t,styles:e,autoDefine:o=!1,registry:r=customElements})=>s=>{s.elementTagName=t,e&&p(e)(s),o&&!r.get(t)&&r.define(t,s)})({tagName:o.godownConfig.tag(t),...e})(o)}
|
7
7
|
/**
|
@@ -44,5 +44,5 @@ const D={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:z},j=(t=D,e,
|
|
44
44
|
* @license
|
45
45
|
* Copyright 2017 Google LLC
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
47
|
-
*/,H=6;let F=class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const q=(t,e,o)=>{r(o)||!1===o?t.removeAttribute(e):(!0===o||"string"==typeof o||"number"==typeof o&&!isNaN(o))&&t.setAttribute(e,!0===o?"":String(o))};const W=(t=>(...e)=>({_$litDirective$:t,values:e}))(class AttrDirective extends F{render(t,e){}update(t,[o,r]){if(!o)return e.noChange;if(t.type===H){for(const e in o)(r||q)(t.element,e,o[e]);return e.noChange}}}),Y=((t,e)=>o=>t({...e,...o}))(W,{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),X=(t,e)=>t?t+(e?" "+e:""):e,Z=(...t)=>t.reduce(((t,e)=>{if(Array.isArray(e))return X(t,e.join(" "));if("object"==typeof e){const o=Object.entries(e).reduce(((t,[e,o])=>o?X(t,e):t),"");return X(t,o)}return X(t,e)}),""),K=(t,o)=>e.html`<slot name="${t||e.nothing}" @slotchange=${null}></slot>`;function Q(t,e,o,s){const a={};return Object.keys(e).forEach(((l,h)=>{const c=t.reduce(((t,o,a)=>{let h=e[l][a];return h=s?s(h,a):h,r(h)||t.push(`${o}:${h}`),t}),[]);a[l]=`${o?o(l,h):l}{${c.join(";")}}`})),a}function J(t){return Object.keys(t).reduce(((e,o)=>{const r=t[o];if(!r)return e;const s="string"==typeof r?r:tt(r);return s?e+`${o}{${s}}`:e}),"")}function tt(t){return Object.keys(t).reduce(((e,o)=>{const s=t[o];return r(s)?e:e+`${o}:${s};`}),"")}function et(t,e){return t?`var(${t})`:""}const ot=(t,o)=>{if(!t)return e.nothing;const r="string"==typeof t?t:J(t);return r?e.html`<style media="${e.nothing}">${r}</style>`:e.nothing},it=t=>(o,...r)=>{const s=e.svg(o,r),a=t,l=t=>e.html`<svg viewBox="${a}" ${Y(t)}>${s}</svg>`;return l.body=s,l.viewBox=a,l};function rt(t,e=document.body){const o=[];if(!e||!t)return o;e.shadowRoot&&o.push(...rt(t,e.shadowRoot));const r=e.querySelectorAll(t);o.push(...Array.from(r));for(const r of e.children)o.push(...rt(t,r));return[...new Set(o)]}function st(t,e=document.body){if(!e||!t)return null;if(e.shadowRoot)return st(t,e.shadowRoot);const o=e.querySelector(t);if(o)return o;for(const o of e.children){const e=st(t,o);if(e)return e}return null}class Events{constructor(){this.m=new Map}add(t,e,o,r){const s=this.m.get(e)||new Map,a=s.get(t)||new Set;return a.add(o),s.set(t,a),this.m.set(e,s),t.addEventListener(e,o,r),o}remove(t,e,o,r){if(o){const s=this.m.get(e);if(s){const r=s.get(t);r&&(r.delete(o),r.size||(s.delete(t),s.size||this.m.delete(e)))}t.removeEventListener(e,o,r)}}removeAll(){this.m.forEach(((t,e)=>{t.forEach(((t,o)=>{t.forEach((t=>{o.removeEventListener(e,t)}))})),t.clear(),this.m.delete(e)}))}}class GodownElement extends e.LitElement{static define(t=this.elementTagName,e){this.isDefined()||this.godownConfig.define(t,this,e)}static isDefined(){return!!this.getDefined()}static getDefined(){return this.godownConfig.get(this.elementTagName)}get observedRecord(){return Object.fromEntries(this.scopedObservedAttributes.map((t=>[t,this[t]])))}get scopedObservedAttributes(){return this.globalObservedAttributes.filter((t=>!GodownElement.observedAttributes.includes(t)))}get globalObservedAttributes(){return this.constructor.observedAttributes}get _slot(){return this.shadowRoot.querySelector("slot:not([name])")}get _slotAll(){return[...this.shadowRoot.querySelectorAll("slot")]}get _slottedAll(){return[...this.querySelectorAll("[slot]")]}get _slottedNames(){return this._slottedAll.map((t=>t.getAttribute("slot"))).filter((t=>t))}getBoundingClientRect(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getClientRects():super.getClientRects()}get stylex(){return this.__stylex.css}set stylex(t){t=t.trim(),/^[\s\S]*{[\s\S]*}$/.test(t)||(t=`:host{${t}}`),this.shadowRoot?(this.__stylex.index&&this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index,1),this.__stylex.css=t,this.__stylex.index=this.adoptStyles(t)):this.__stylex.lazy=t}constructor(t){super(),this.events=new Events,this.__stylex={},this.assign={...GodownElement.godownConfig?.assign||{},...t}}connectedCallback(){super.connectedCallback(),this.assign&&(Object.assign(this,this.assign),this.assign=null);const{lazy:t}=this.__stylex;t&&(this.adoptStyles(t),this.__stylex.lazy="")}disconnectedCallback(){this.events.removeAll()}mount(t){this.firstUpdated(t)}unmount(){this.disconnectedCallback()}remount(t){this.unmount(),this.connectedCallback(),this.mount(t)}deepQuerySelector(t){return st(t,this)}deepQuerySelectorAll(t){return rt(t,this)}adoptStyles(...t){const e=this.shadowRoot.adoptedStyleSheets;if(t.length){const o=new CSSStyleSheet;t.forEach((t=>o.insertRule(t.toString()))),e.push(o)}return e.length-1}dispatchCustomEvent(t,e,o){this.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0,...o}))}}GodownElement.godownConfig=new class GodownConfig{constructor(t){this.assign=null,this.prefix="godown",this.suffix="",this.components=new Map,this.registry=customElements,t&&Object.assign(this,t)}tag(t){return h(a(this.prefix,d)+d+t+d+l(this.suffix,d),d)}define(t,e,o){this.registry.define(t,e,o),this.components.set(t,e)}get(t){return this.registry.get(t)}getName(t){const{getName:e}=this.registry;return e?e(t):[...this.components.entries()].find((([,e])=>e===t))?.[0]||null}whenDefined(t){return this.registry.whenDefined(t)}upgrade(t){this.registry.upgrade(t)}},o([B({type:Boolean,reflect:!0})],GodownElement.prototype,"contents",void 0),o([B({reflect:!0})],GodownElement.prototype,"stylex",null);class RouteTree{constructor(){this.matchType=RouteTree.matchType.strict,this.children=[]}insert(t,e,o=0){if(e||(e=RouteTree.split(t)),e.length===o)return void(this.pattern=t);const r=e[o];let s=this.findStrict(r);s||(s=new RouteTree,s.part=r,s.matchType=RouteTree.dynamic(r).matchType,this.children.push(s),this.sorted=!1),s.insert(t,e,o+1)}search(t,e=0){if("string"==typeof t&&(t=RouteTree.split(t)),this.sorted||this.sort(),t.length===e||RouteTree.dynamic(this.part).matchType===RouteTree.matchType.multi)return this.pattern?this:null;const o=t[e],r=this.filterWide(o);for(const o of r){const r=o.search(t,e+1);if(null!==r)return r}return null}findStrict(t){return this.children.find((e=>e.part===t))||null}filterWide(t){return this.children.filter((e=>e.part===t||e.matchType))}static parseParams(t,e){const o=RouteTree.split(t),r=RouteTree.split(e),s={};for(let t=0;t<r.length;t++){const e=r[t],{key:a,carry:l,matchType:h}=RouteTree.dynamic(e);if(h===RouteTree.matchType.single)s[a.slice(l)]=o[t];else if(h===RouteTree.matchType.multi){s[a.slice(l)]=o.slice(t).join("/");break}}return s}static dynamic(t){if(t){if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")){t=t.slice(1,-1);const e=RouteTree.dynamic(t);return e.matchType||=RouteTree.matchType.single,e}if(t.length>1){const e=t[0];if(":"===e)return{key:t,carry:1,matchType:RouteTree.matchType.single};if("*"===e)return{key:t,carry:1,matchType:RouteTree.matchType.multi};if(t.startsWith("..."))return{key:t,carry:3,matchType:RouteTree.matchType.multi}}}return{key:t,carry:0,matchType:RouteTree.matchType.strict}}static join(...t){return t.map((t=>h(t,"/"))).join("/")}static split(t){return t.split("/").filter((t=>t))}sort(){const{children:t}=this;if(t.length){t.sort(((t,e)=>t.matchType-e.matchType));for(const e of t)e.sort()}this.sorted=!0}}RouteTree.matchType={strict:0,single:1,multi:2};var nt=it("0 0 56 56")`<path fill="currentColor" d="M28 4c13.255 0 24 10.745 24 24S41.255 52 28 52S4 41.255 4 28S14.745 4 28 4m0 4C16.954 8 8 16.954 8 28s8.954 20 20 20s20-8.954 20-20S39.046 8 28 8m10.788 11.93c.67.67.67 1.756 0 2.425l-13.36 13.36a1.715 1.715 0 0 1-2.424 0l-5.645-5.646a1.714 1.714 0 0 1 2.425-2.424l3.22 3.22c.67.67 1.755.67 2.425 0l10.934-10.934c.67-.67 1.755-.67 2.425 0"/>`,at=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.023-15.68c1.124 0 1.757-.633 1.78-1.851l.352-12.375c.024-1.196-.914-2.086-2.156-2.086c-1.266 0-2.156.867-2.133 2.062l.305 12.399c.023 1.195.68 1.851 1.852 1.851m0 7.617c1.335 0 2.53-1.078 2.53-2.437c0-1.383-1.171-2.438-2.53-2.438c-1.383 0-2.532 1.078-2.532 2.438c0 1.336 1.172 2.437 2.532 2.437"/>`,lt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.211-28.266c1.71 0 3.047-1.36 3.047-3.047c0-1.71-1.336-3.07-3.047-3.07s-3.047 1.36-3.047 3.07a3.026 3.026 0 0 0 3.047 3.047m-3.914 21.235h9.562c.961 0 1.711-.68 1.711-1.641c0-.914-.75-1.64-1.71-1.64H30.53V25.68c0-1.266-.656-2.11-1.828-2.11h-4.43c-.937 0-1.687.727-1.687 1.64c0 .962.75 1.642 1.687 1.642h2.532v10.757h-2.93c-.938 0-1.688.727-1.688 1.641c0 .96.75 1.64 1.688 1.64"/>`,ht=it("0 0 56 56")`<path fill="currentColor" d="M19.504 43.152h16.969c.797 0 1.289-.492 1.289-1.289v-3.75c0-5.672 8.25-9.328 8.25-19.453C46.012 7.996 38.793.871 27.988.871s-18 7.125-18 17.79c0 10.124 8.227 13.78 8.227 19.452v3.75c0 .797.515 1.29 1.289 1.29m2.203-4.992c0-6.89-8.18-10.57-8.18-19.476c0-8.579 5.79-14.274 14.461-14.274c8.672 0 14.485 5.695 14.485 14.274c0 8.906-8.203 12.586-8.203 19.476v1.453H21.707Zm-1.336 11.32h15.235c1.195 0 2.156-.984 2.156-2.203s-.961-2.203-2.157-2.203H20.371c-1.195 0-2.156.985-2.156 2.203c0 1.22.96 2.203 2.156 2.203m7.617 5.649c3.235 0 5.508-1.477 5.742-3.75H22.246c.211 2.273 2.484 3.75 5.742 3.75"/>`,ct=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.492-15.07c1.172 0 1.898-.727 1.898-1.664v-.282c0-1.312.75-2.133 2.39-3.21c2.274-1.5 3.891-2.884 3.891-5.673c0-3.914-3.468-6-7.453-6c-4.031 0-6.68 1.899-7.312 4.055c-.117.399-.211.774-.211 1.172c0 1.031.844 1.617 1.617 1.617c1.336 0 1.547-.726 2.297-1.594c.773-1.289 1.898-2.062 3.469-2.062c2.133 0 3.515 1.195 3.515 3c0 1.594-.984 2.367-3.023 3.773c-1.688 1.172-2.953 2.414-2.953 4.711V31c0 1.242.68 1.852 1.875 1.852m-.047 7.007c1.36 0 2.531-1.078 2.531-2.437c0-1.383-1.148-2.438-2.531-2.438s-2.531 1.078-2.531 2.438c0 1.336 1.171 2.437 2.53 2.437"/>`,dt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-8.156-9.727c.656 0 1.148-.28 1.664-.797l15.75-15.984c.492-.492.797-1.078.797-1.617c0-1.078-.891-1.945-1.97-1.945c-.562 0-1.1.28-1.616.796L18.742 34.61c-.539.516-.797 1.102-.797 1.641c0 1.055.774 1.945 1.899 1.945"/>`,pt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-8.016-9.984c.516 0 .985-.211 1.336-.586l6.657-6.68l6.656 6.68c.351.351.82.586 1.36.586c1.03 0 1.874-.868 1.874-1.899c0-.539-.21-.984-.562-1.336l-6.657-6.656l6.68-6.703c.375-.399.563-.797.563-1.313a1.865 1.865 0 0 0-1.875-1.875c-.493 0-.915.164-1.313.563l-6.727 6.703l-6.703-6.68c-.351-.375-.773-.539-1.289-.539c-1.054 0-1.875.797-1.875 1.852c0 .515.188.96.563 1.312l6.656 6.68l-6.656 6.68c-.375.328-.563.796-.563 1.312c0 1.031.82 1.898 1.875 1.898"/>`,ut=it("0 0 56 56")`<path fill="currentColor" d="M10.023 43.023c-.796.797-.82 2.157 0 2.954c.82.796 2.157.796 2.977 0l15-15l15 15c.797.796 2.156.82 2.977 0c.796-.82.796-2.157 0-2.954L30.953 28l15.024-15c.796-.797.82-2.156 0-2.953c-.844-.82-2.18-.82-2.977 0l-15 15l-15-15c-.82-.82-2.18-.844-2.977 0c-.796.82-.796 2.156 0 2.953l15 15Z"/>`;const vt=(t,e,o)=>({r:t,g:e,b:o,toString(){return`${this.r} ${this.g} ${this.b}`}}),mt={darkgray:[vt(121,121,121),vt(109,109,109),vt(97,97,97),vt(85,85,85),vt(73,73,73),vt(61,61,61),vt(48,48,48),vt(36,36,36),vt(24,24,24),vt(12,12,12)],lightgray:[vt(243,243,243),vt(231,231,231),vt(219,219,219),vt(206,206,206),vt(194,194,194),vt(182,182,182),vt(170,170,170),vt(158,158,158),vt(146,146,146),vt(133,133,133)],teal:[vt(213,249,248),vt(170,243,241),vt(128,237,234),vt(85,231,226),vt(43,225,219),vt(0,219,212),vt(0,175,170),vt(0,131,127),vt(0,88,85),vt(0,44,42)],blue:[vt(213,240,255),vt(170,224,255),vt(128,209,255),vt(85,193,255),vt(43,178,255),vt(0,162,255),vt(0,130,204),vt(0,97,153),vt(0,65,102),vt(0,32,51)],green:[vt(221,243,221),vt(186,231,186),vt(152,219,152),vt(117,206,117),vt(82,194,82),vt(48,182,48),vt(38,146,38),vt(29,109,29),vt(19,73,19),vt(10,36,10)],red:[vt(251,221,221),vt(247,186,187),vt(243,152,154),vt(239,118,120),vt(235,83,86),vt(231,49,52),vt(185,39,42),vt(139,29,31),vt(92,20,21),vt(46,10,10)],purple:[vt(242,228,253),vt(229,201,250),vt(217,174,248),vt(204,146,245),vt(191,119,243),vt(178,92,240),vt(142,74,192),vt(107,55,144),vt(71,37,96),vt(36,18,48)],orange:[vt(255,235,213),vt(255,216,170),vt(255,196,128),vt(255,176,85),vt(255,157,43),vt(255,137,0),vt(204,110,0),vt(153,82,0),vt(102,55,0),vt(51,27,0)],yellow:[vt(251,252,216),vt(247,248,177),vt(243,245,138),vt(239,242,98),vt(235,238,59),vt(231,235,20),vt(185,188,16),vt(139,141,12),vt(92,94,8),vt(46,47,4)],pink:[vt(254,222,233),vt(253,189,211),vt(252,156,190),vt(251,123,168),vt(250,90,146),vt(249,57,124),vt(199,46,99),vt(149,34,74),vt(100,23,50),vt(50,11,25)]};class GlobalStyle extends GodownElement{}const ft=h(GlobalStyle.godownConfig.prefix,"-");function gt(t,o=1){return function(t){return e.unsafeCSS(`--${t}`)}(ft+"-".repeat(o)+t)}const yt={foreground:gt("foreground",2),background:gt("background",2),clipBackground:gt("clip-background",2),active:gt("active",2),passive:gt("passive",2),_colors:{},input:gt("input",2),white:gt("color-white",2),black:gt("color-black",2)};var bt,$t;GlobalStyle.styles=[e.unsafeCSS(`:host{${yt.black}:rgb(0 0 0);${yt.white}:rgb(255 255 255);`+(bt=(t,o,r)=>{yt._colors[t]||=[],yt._colors[t].push(e.unsafeCSS(gt("color",2)+"-"+t+"-"+o));const s=`-${t}-${o}`;return`${gt("color",2)+s}:rgb(${r});`},$t=mt,Object.entries($t).flatMap((([t,e])=>e.map(((e,o)=>bt(t,o,e)))))).join("")+tt({[yt.background+""]:`var(${yt._colors.darkgray[9]})`,[yt.foreground+""]:`var(${yt._colors.lightgray[0]})`,[yt.active+""]:`var(${yt._colors.blue[6]})`,[yt.passive+""]:`var(${yt._colors.darkgray[6]})`,[yt.clipBackground+""]:`linear-gradient(to bottom, var(${yt.foreground}), var(${yt.passive}))`})+"}"),e.css`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];const wt="alert",_t=gt(wt),kt=["color","background"].map((t=>`${_t}--${t}`)),xt=t=>[yt._colors[t][5],yt._colors[t][9]],St=Q(kt,{green:xt("green"),blue:xt("blue"),orange:xt("orange"),red:xt("red"),yellow:xt("yellow"),purple:xt("purple"),teal:xt("teal"),pink:xt("pink"),gray:[yt._colors.lightgray[5],yt._colors.darkgray[5]],white:[yt._colors.lightgray[2],yt._colors.darkgray[7]],black:[yt._colors.darkgray[8],yt._colors.lightgray[5]]},(()=>":host"),(t=>et(t))),Ct=t=>[yt._colors[t][6],yt._colors[t][0]],Et=Q(kt,{green:Ct("green"),blue:Ct("blue"),orange:Ct("orange"),red:Ct("red"),yellow:Ct("yellow"),purple:Ct("purple"),teal:Ct("teal"),pink:Ct("pink"),gray:[yt._colors.darkgray[5],yt._colors.lightgray[7]],white:[yt._colors.lightgray[0],yt._colors.darkgray[0]],black:[yt._colors.darkgray[7],yt._colors.lightgray[3]]},(()=>":host"),(t=>et(t))),Rt={tip:{color:"teal",icon:ht},success:{color:"green",icon:nt},info:{color:"blue",icon:lt},warning:{color:"orange",icon:at},danger:{color:"red",icon:pt},error:{color:"red",icon:pt},help:{color:"purple",icon:ct},deprecated:{color:"gray",icon:dt}};let Tt=class Alert extends GlobalStyle{constructor(){super(...arguments),this.color="blue",this.autoclose=0,this.hideClose=!1,this.variant="dark"}render(){const t=Rt[this.call]?.color||this.color,o=this.call?Rt[this.call].icon():K("icon");return e.html`<div part="root" ${W(this.observedRecord)}><div part="icon">${o}</div><div part="content"><strong part="title">${this.title||K("title")}</strong> ${this.content||K()}</div>${this.hideClose||"blockquote"===this.variant?"":e.html`<div part="close" tabindex="0" @click="${this.close}">${ut()}</div>`} ${ot("dark"===this.variant?St[t]:Et[t])}</div>`}close(){this.remove(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}firstUpdated(){this.autoclose&&setTimeout((()=>this.close()),this.autoclose)}static alert(t,e){const o=new this;return Object.assign(o,e),t.appendChild(o),o}};o([B()],Tt.prototype,"call",void 0),o([B()],Tt.prototype,"color",void 0),o([B({type:Number})],Tt.prototype,"autoclose",void 0),o([B()],Tt.prototype,"title",void 0),o([B()],Tt.prototype,"content",void 0),o([B({type:Boolean})],Tt.prototype,"hideClose",void 0),o([B()],Tt.prototype,"variant",void 0),Tt=o([u(wt),p(e.css`:host,:where(:host([contents]) [part=root]){border-radius:var(${_t}--border-radius);${_t}--border-radius:.25em;${_t}--border-width:.075em;${_t}--blockquote-width:.2em;${_t}--padding:.5em;display:block;width:100%}[part=root]{--color:var(${_t}--color);background:var(${_t}--background);border:var(${_t}--border-width) solid var(--color);border-radius:inherit;color:var(--color);display:flex;justify-content:space-between;padding:var(${_t}--padding);transition:.25s;width:100%}[variant=blockquote]{background:0 0;border:none;border-left:var(${_t}--blockquote-width) solid var(--color);border-radius:0}[part=content]{color:var(--color)}[part=root]{align-items:center;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}[part=title]{line-height:2em}[part=icon]{align-items:center;display:inline-grid;height:2em}[part=icon] svg{height:1.25em;margin-right:.5em;width:1.25em}[part=content]{grid-row:span 2/span 2;line-height:1.5em}`)],Tt);var At=Tt;At.define();const Pt="avatar",Mt=gt(Pt);let zt=class Avatar extends GlobalStyle{constructor(){super(...arguments),this.name="",this.round=!1}render(){return e.html`<div part="root" ${W(c(this.observedRecord,"src"))}>${this._renderAvatar()}</div>`}_renderAvatar(){return this.src?e.html`<img part="image" src="${this.src}" alt="${this.name}" @error="${this._handleError}">`:this.name?e.html`<span part="name">${this.format()}</span>`:K()}format(){return this.name}_handleError(){this.src=void 0}};o([B()],zt.prototype,"src",void 0),o([B()],zt.prototype,"name",void 0),o([B({type:Boolean})],zt.prototype,"round",void 0),zt=o([u(Pt),p(e.css`:host{${Mt}--size:2em;height:var(${Mt}--size);vertical-align:bottom;width:var(${Mt}--size)}:host,[part=root]{display:inline-flex}:host([contents]) [part=root]{display:inline-flex;height:inherit;width:inherit}:host([round]){border-radius:50%}[part=image]{height:100%;object-fit:cover;width:100%}[part=root]{align-items:center;border-radius:inherit;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}`)],zt);var Ot=zt;Ot.define();const It="badge",Dt=gt(It);let jt=class Badge extends GlobalStyle{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${K()} ${this.value||this.dot?e.html`<div part="badge">${this.dot?"":this.formatValue(this.value)}</div>`:""}</div>`}};o([B()],jt.prototype,"position",void 0),o([B({type:Number})],jt.prototype,"value",void 0),o([B({type:Boolean})],jt.prototype,"dot",void 0),o([B({type:Number})],jt.prototype,"max",void 0),jt=o([u(It),p(e.css`:host{${Dt}--background:var(${yt.active});${Dt}--offset:0%;${Dt}--offset-x:var(${Dt}--offset);${Dt}--offset-y:var(${Dt}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=badge]{background:var(${Dt}--background);border-radius:calc(infinity * 1px);font-size:75%;left:var(--left);padding:0 .5em;position:absolute;top:var(--top);transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=badge]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top]{--top:calc(var(${Dt}--offset-y))}[position$=right]{--left:calc(100% - var(${Dt}--offset-x))}[position^=bottom]{--top:calc(100% - var(${Dt}--offset-y))}[position$=left]{--left:calc(var(${Dt}--offset-x))}`)],jt);var Bt=jt;Bt.define();const Nt="breath",Ut=gt(Nt);let Lt=class Breath extends GlobalStyle{render(){const t=this.getTexts();return e.html`<div part="root" ${W(this.observedRecord)}>${[t.map(this.renderText),ot(this._computeStyle(t.length))]}</div>`}renderText(t){return e.html`<span class="rel"><span class="nocolor">${t}</span> <span class="colorful">${t}</span></span>`}getTexts(){return Array.isArray(this.text)?this.text:(this.text||this.textContent).split(/\s+/).filter((t=>t))}_computeStyle(t){const e=50/t,o=this.parseDuration()||2*t+2;let r="";for(let e=1;e<=t;e++)r+=`.rel:nth-child(${e}) .colorful{animation-delay:${-o/t*(t-e+1)}s;background:var(${Ut}--${e},var(${Ut}--${(e-1)%3+1}));}`;return`.colorful{animation-duration:${o}s;}@keyframes colorfulN{0%,${3*e}%{opacity:0;}${e}%,${2*e}%{opacity:1;}}${r}`}parseDuration(){const{duration:t}=this;if(t){if(t.endsWith("s"))return Number.parseFloat(t.slice(0,-1));if(t.endsWith("ms"))return Number.parseFloat(t.slice(0,-2))/1e3}}};o([B()],Lt.prototype,"text",void 0),o([B()],Lt.prototype,"duration",void 0),Lt=o([u(Nt),p(e.css`:host{${Ut}--deg:60deg;${Ut}--1-1:var(${yt._colors.red[5]});${Ut}--1-2:var(${yt._colors.yellow[5]});${Ut}--2-1:var(${yt._colors.green[5]});${Ut}--2-2:var(${yt._colors.purple[5]});${Ut}--3-1:var(${yt._colors.blue[5]});${Ut}--3-2:var(${yt._colors.pink[5]});${Ut}--1:linear-gradient(var(${Ut}--deg),var(${Ut}--1-1),var(${Ut}--1-2));${Ut}--2:linear-gradient(var(${Ut}--deg),var(${Ut}--2-1),var(${Ut}--2-2));${Ut}--3:linear-gradient(var(${Ut}--deg),var(${Ut}--3-1),var(${Ut}--3-2))}`,e.css`:host{align-items:center;direction:ltr;font-size:2em;margin:auto;width:-moz-fit-content;width:fit-content}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}::selection{background:0 0}.rel{font-size:inherit;font-weight:800;letter-spacing:-.05em;position:relative}`,e.css`.colorful,.nocolor{animation-iteration-count:infinite;-webkit-background-clip:text!important;background-clip:text!important;box-sizing:border-box;color:transparent;display:inline-block;padding:0 .05em}.colorful{animation-name:colorfulN;opacity:0}.nocolor{background:var(${yt.clipBackground});position:absolute;top:0}`)],Lt);var Vt=Lt;Vt.define();const Gt="button",Ht=gt(Gt),Ft=yt.white,qt=yt.black,Wt=Q(["color","background","gradients"].map((t=>`${Ht}--${t}`)),{black:[Ft,yt._colors.darkgray[7],yt._colors.darkgray[5]],gray:[Ft,yt._colors.darkgray[1],yt._colors.lightgray[8]],white:[qt,yt._colors.lightgray[3],yt._colors.lightgray[0]],blue:[Ft,yt._colors.blue[6],yt._colors.blue[4]],green:[Ft,yt._colors.green[6],yt._colors.green[4]],red:[Ft,yt._colors.red[6],yt._colors.red[4]],orange:[Ft,yt._colors.orange[6],yt._colors.orange[4]],pink:[Ft,yt._colors.pink[6],yt._colors.pink[4]],purple:[Ft,yt._colors.purple[6],yt._colors.purple[4]],yellow:[qt,yt._colors.yellow[6],yt._colors.yellow[4]],teal:[Ft,yt._colors.teal[6],yt._colors.teal[4]]},(()=>":host"),(t=>et(t)));let Yt=class Button extends GlobalStyle{constructor(){super(...arguments),this.disabled=!1,this.ghost=!1,this.active=!1,this.round=!1,this.color="black"}render(){const t=this.nextColor();return e.html`<div part="root" ${W(this.observedRecord)}><span part="modal-root"></span><div part="content">${[this.content||K(),ot(Wt[t])]}</div></div>`}focus(){this.disabled||(this.active=!0,super.focus())}blur(){this.active=!1,super.blur()}firstUpdated(){this.events.add(this,"click",this._handelClick,!0)}_handelClick(t){if(this.disabled)return t.stopPropagation(),void t.preventDefault();this._handleModal(t)}_handleModal(t){const e=document.createElement("i"),o=this._root.getBoundingClientRect(),{height:r,width:s}=o,a=2*Math.sqrt(r*r+s*s)+"px";e.style.height=a,e.style.width=a,e.style.left=t.clientX-o.left+"px",e.style.top=t.clientY-o.y+"px",e.style.animationName="kf",this._modalRoot.appendChild(e),e.addEventListener("animationend",(()=>e.remove()),{once:!0})}nextColor(){return this.color}};o([B({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"ghost",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"active",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"round",void 0),o([B({reflect:!0})],Yt.prototype,"color",void 0),o([B()],Yt.prototype,"content",void 0),o([G("modal-root")],Yt.prototype,"_modalRoot",void 0),o([G("root")],Yt.prototype,"_root",void 0),Yt=o([u(Gt),p(e.css`:host(:not([disabled]):active){transform:scale(var(${Ht}--focus-scale))}:host([round]){${Ht}--padding-x:.75em;border-radius:calc(infinity * 1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([ghost]){${Ht}--modal-background:var(${Ht}--ghost-color);background:0 0;box-shadow:inset 0 0 0 var(${Ht}--ghost-width) var(${Ht}--ghost-color);color:var(${Ht}--ghost-color)}`,e.css`:host{${Ht}--padding-x:.5em;${Ht}--padding-y:min(calc(var(${Ht}--padding-x)/2),.25em);${Ht}--padding:var(${Ht}--padding-y) var(${Ht}--padding-x);${Ht}--modal-animation-duration:1s;${Ht}--ghost-width:.08em;${Ht}--focus-scale:.97;${Ht}--deg:45deg;${Ht}--ghost-color:var(${Ht}--background);background:linear-gradient(var(${Ht}--deg),var(${Ht}--background),var(${Ht}--gradients,var(${Ht}--background)));border-radius:.3em;color:var(${Ht}--color,inherit);cursor:pointer;display:block;overflow:hidden;padding:0!important;text-align:center;transition:.1s;width:-moz-fit-content;width:fit-content}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{border-radius:inherit;height:100%;overflow:hidden;position:relative;transition:none;transition-duration:inherit;-webkit-user-select:none;user-select:none;width:100%}[part=content]{padding:var(${Ht}--padding)}i{animation-duration:var(${Ht}--modal-animation-duration);background:var(${Ht}--modal-background,currentColor);border-radius:50%;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible;width:100%}@keyframes kf{0%{opacity:var(${Ht}--modal-opacity,.1);transform:scale(0) translate(-50%,-50%)}80%{transform:scale(1) translate(-50%,-50%)}to{opacity:0}}`)],Yt);var Xt=Yt;Xt.define();const Zt="card",Kt=gt(Zt);let Qt=class Card extends GlobalStyle{constructor(){super(...arguments),this.footer=!1,this.header=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[this.header?K("header"):"",K(),this.footer?K("footer"):""]}</div>`}};o([B({type:Boolean})],Qt.prototype,"footer",void 0),o([B({type:Boolean})],Qt.prototype,"header",void 0),Qt=o([u(Zt),p(e.css`:host{${Kt}--background:var(${yt.background});${Kt}--border-width:.0375em;${Kt}--border-color:transparent;${Kt}--border-background:var(${yt.passive});${Kt}--padding:.75em;background:var(${Kt}--background);border-width:var(${Kt}--border-width);box-sizing:border-box;color:var(${yt.foreground});display:block;flex-shrink:0;overflow:hidden;position:relative}slot{display:block;padding:var(${Kt}--padding)}:host,slot{border-color:var(${Kt}--border-background);border-style:solid}[name=footer]{border-top-width:var(${Kt}--border-width)}[name=header]{border-bottom-width:var(${Kt}--border-width)}`)],Qt);var Jt=Qt;Jt.define();var te=it("0 0 56 56")`<path fill="currentColor" d="M35.805 47.723c.398.398.914.633 1.523.633c1.219 0 2.133-.915 2.133-2.133c0-.586-.234-1.125-.61-1.524L21.79 28.012l17.063-16.688c.375-.398.609-.96.609-1.523c0-1.219-.914-2.157-2.133-2.157c-.61 0-1.125.235-1.523.633L17.242 26.441c-.445.375-.703.961-.703 1.57c0 .587.258 1.126.703 1.571Z"/>`,ee=it("0 0 56 56")`<path fill="currentColor" d="M18.695 48.367c.586 0 1.102-.234 1.524-.633L38.78 29.57c.446-.445.68-.984.68-1.57c0-.61-.234-1.172-.68-1.57L20.22 8.289a2.07 2.07 0 0 0-1.524-.656a2.12 2.12 0 0 0-2.156 2.156c0 .563.258 1.125.633 1.524L34.21 28L17.17 44.688c-.374.398-.632.937-.632 1.523c0 1.219.938 2.156 2.156 2.156"/>`;let oe=class Carousel extends GlobalStyle{constructor(){super(...arguments),this.index=0,this.autoChange=0}render(){return e.html`<div part="root" ${W(this.observedRecord)}><i part="prev" @click="${this.prev}">${te()}</i><div part="move-root" style="transform:${`translateX(-${this.index+1}00%)`}">${K()}</div><i part="next" @click="${this.next}">${ee()} </i>${ot(`:host,:host([contents]) [part=root]{width:${this.width};}`)}</div>`}async firstUpdated(){await this.updateComplete,this.children.length&&(this.width||=`${this.firstElementChild.offsetWidth}px`,this._cloneFirst?.remove(),this._cloneLast?.remove(),this._cloneLast=this.firstElementChild.cloneNode(!0),this._cloneFirst=this.lastElementChild.cloneNode(!0),this.appendChild(this._cloneLast),this.insertBefore(this._cloneFirst,this.firstElementChild),this.show(this.index)),this.checkInterval()}disconnectedCallback(){clearInterval(this.intervalID)}show(t){this.index=t,this.dispatchEvent(new CustomEvent("change",{detail:t,composed:!0}))}next(){this.index===this.childElementCount-3?(this._doTranslateX("0",!0),this.show(0)):this.show(this.index+1),this.checkInterval()}prev(){0===this.index?(this._doTranslateX(`-${this.childElementCount-1}00%`,!0),this.show(this.children.length-3)):this.show(this.index-1),this.checkInterval()}_doTranslateX(t,e){this._moveRoot.style.transform=`translateX(${t})`,e&&(this._moveRoot.style.transition="none"),this._moveRoot.getBoundingClientRect()}checkInterval(){this.autoChange&&(this.intervalID&&clearInterval(this.intervalID),this.intervalID=setInterval((()=>{this.next()}),this.autoChange))}};o([B({type:Number})],oe.prototype,"index",void 0),o([B({type:Number})],oe.prototype,"autoChange",void 0),o([B()],oe.prototype,"width",void 0),o([G("move-root")],oe.prototype,"_moveRoot",void 0),oe=o([u("carousel"),p(e.css`:host{display:block;transition:.3s}[part=root]{direction:ltr;overflow:hidden}[part=move-root],[part=root]{display:flex;height:100%;position:relative;transition:inherit;width:100%}[part=next],[part=prev]{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;-webkit-user-select:none;user-select:none;width:1.5em;z-index:1}[part=prev]{left:0}[part=next]{right:0}slot::slotted(*){flex-shrink:0!important}`)],oe);var ie=oe;ie.define();var re=it("0 0 56 56")`<path fill="currentColor" d="M28 39.46a2.1 2.1 0 0 0 1.57-.679l18.164-18.586a2.1 2.1 0 0 0 .633-1.5a2.12 2.12 0 0 0-2.156-2.156a2.27 2.27 0 0 0-1.523.61L28 34.21L11.313 17.148a2.23 2.23 0 0 0-1.524-.609a2.12 2.12 0 0 0-2.156 2.156c0 .586.234 1.102.633 1.524L26.43 38.78c.445.446.96.68 1.57.68"/>`;class SuperOpenable extends GlobalStyle{constructor(){super(...arguments),this.open=!1}toggle(t=!this.open){this.open=t}close(){this.open=!1}show(){this.open=!0}updated(t){void 0!==t.get("open")&&this.dispatchEvent(new CustomEvent("change",{detail:this.open,composed:!0}))}_handelClick(t){this.toggle()}}o([B({type:Boolean,reflect:!0})],SuperOpenable.prototype,"open",void 0);const se="details",ne=gt(se);let ae=class Details extends SuperOpenable{constructor(){super(...arguments),this.fill=!1,this.summary=""}render(){return e.html`<dl part="root" ${W(this.observedRecord)}><dt part="title" @click="${this._handelClick}"><span part="summary">${this.summary||K("summary")}</span> <span><i part="icon">${re()}</i></span></dt><dd part="details" @click="${this.fill?()=>this.toggle():null}"><div style="min-height:0">${K()}</div></dd></dl>`}};o([B({type:Boolean})],ae.prototype,"fill",void 0),o([B()],ae.prototype,"summary",void 0),ae=o([u(se),p(e.css`:host{${ne}--icon-deg-open:0deg;${ne}--icon-deg-close:90deg;${ne}--icon-space:0.3em;${ne}--summary-direction:row;${ne}--transition:.3s;display:block;height:-moz-fit-content;height:fit-content;transition:var(${ne}--transition)}[part=root]{height:100%;overflow:hidden;position:relative}[part=title]{align-items:center;background:inherit;direction:ltr;display:flex;flex-direction:var(${ne}--summary-direction);flex-wrap:nowrap;height:100%;justify-content:space-between}[part=details]{display:grid;grid-template-rows:0fr;overflow:hidden;transition:var(${ne}--transition);transition-property:grid-template-rows}:host([open]) [part=details]{grid-template-rows:1fr}:host([float]) [part=details]{position:absolute;top:100%}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;padding:var(${ne}--icon-space);transform:rotate(var(${ne}--icon-deg-close));transition:var(${ne}--transition)}:host([open]) [part=icon]{transform:rotate(var(${ne}--icon-deg-open))}`)],ae);var le=ae;le.define();const he="dialog",ce=gt(he);let de=class Dialog extends SuperOpenable{constructor(){super(...arguments),this.direction="center",this.modal=!1,this.key="Escape",this._modalInvoke=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}><div part="modal"></div><div part="container">${K()}</div></div>`}showModal(){this.modal||(this.modal=!0,this._modalInvoke=!0),this.show()}updated(t){t.has("open")&&(this.open?(this._submitEvent=this.events.add(this,"submit",this._handelSubmit),this.key&&(this._keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this)))):(this.events.remove(this,"submit",this._submitEvent),this.events.remove(document,"keydown",this._keydownEvent)))}_handleKeydown(t){t.preventDefault();const e=this.key.split(/[\s,]/);(e.includes(t.key)||e.includes(t.code))&&this.close()}_handelSubmit(t){"dialog"===t.target.method&&this.close()}close(){this._modalInvoke&&(this.modal=!1,this._modalInvoke=!1),this.open=!1}};o([B()],de.prototype,"direction",void 0),o([B({type:Boolean,reflect:!0})],de.prototype,"modal",void 0),o([B()],de.prototype,"key",void 0),de=o([u(he),p(e.css`:host{${ce}--background:none;${ce}--background-modal:var(${yt.background});${ce}--opacity-modal:0.2;background:var(${ce}--background);inset:0;pointer-events:none;position:fixed;visibility:hidden;z-index:1}:host([open]){visibility:visible}:host([open][modal]) [part=modal]{opacity:var(${ce}--opacity-modal);pointer-events:all;visibility:visible}[part=modal]{background:var(${ce}--background-modal);height:100%;opacity:0;position:absolute;visibility:hidden;width:100%}[part=root]{align-items:center;display:flex;height:100%;justify-content:center;position:relative;width:100%}[part=container]{pointer-events:all;position:absolute}[direction^=top] [part=container]{top:0}[direction^=bottom] [part=container]{bottom:0}[direction$=right] [part=container]{right:0}[direction$=left] [part=container]{left:0}`)],de);var pe=de;pe.define();let ue=class Divider extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}></div>`}};o([B({type:Boolean,reflect:!0})],ue.prototype,"vertical",void 0),ue=o([u("divider"),p(e.css`:host{background:currentColor;display:block;height:.05em;margin:auto;width:100%}:host([vertical]){height:max(1em,100%);width:.05em}:host([contents]) [part=root]{background:currentColor;display:block;height:.05em;margin:auto;width:100%}[part=root]{display:contents}`)],ue);var ve=ue;ve.define();let me=class Dragbox extends GlobalStyle{constructor(){super(...arguments),this.drag=!1,this.x="auto",this.y="auto"}get offsetsWidth(){return this.offsetParent?.clientWidth??document.body.offsetWidth}get offsetsHeight(){return this.offsetParent?.clientHeight??document.body.offsetHeight}render(){return e.html`<div part="root" ${W(this.observedRecord)} @mousedown="${this._handleDragStart}" @mouseup="${this._handleDragEnd}">${K()}</div>`}firstUpdated(){this.reset()}_handleDragStart(t){this.cx=t.clientX,this.cy=t.clientY,this.t=this.offsetTop,this.l=this.offsetLeft,this.drag=!0,this._handleMouseMove=this.events.add(document,"mousemove",this._handleDrag.bind(this)),this._handleMouseLeave=this.events.add(document,"mouseleave",this._handleDragEnd.bind(this))}_handleDragEnd(){this.drag=!1,this.events.remove(document,"mousemove",this._handleMouseMove),this.events.remove(document,"mouseleave",this._handleMouseLeave)}_handleDrag(t){if(!this.drag)return;const e=t.clientX-(this.cx-this.l),o=t.clientY-(this.cy-this.t),{style:r,offsetsWidth:s,offsetsHeight:a,offsetWidth:l,offsetHeight:h}=this;r.left=e<0?"0":e<s-l?`${e}px`:s-l+'"px"',r.top=o<0?"0":o<a-h?`${o}px`:a-h+"px"}reset(){const{x:t,y:e,style:o,offsetsWidth:r,offsetsHeight:s,offsetWidth:a,offsetHeight:l,offsetLeft:h,offsetTop:c}=this;o.left=t||"0",o.top=e||"0",h>r-a&&(o.left=r-a+"px"),c>s-l&&(o.top=s-l+"px")}};o([B()],me.prototype,"x",void 0),o([B()],me.prototype,"y",void 0),me=o([u("dragbox"),p(e.css`:host{display:block;position:absolute}:host(:active){-webkit-user-select:none;user-select:none}`)],me);var fe=me;fe.define();let ge=class Flex extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[K(),ot(J({":host":{gap:this.gap,"flex-flow":this.flexFlow,"flex-direction":this.vertical&&"column","align-items":this.items,"justify-content":this.content}}))]}</div>`}};o([B({attribute:"flex-flow"})],ge.prototype,"flexFlow",void 0),o([B()],ge.prototype,"gap",void 0),o([B()],ge.prototype,"content",void 0),o([B()],ge.prototype,"items",void 0),o([B({type:Boolean})],ge.prototype,"vertical",void 0),ge=o([u("flex"),p(e.css`:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}`)],ge);var ye,be=ge;be.define();let $e=ye=class Form extends GlobalStyle{constructor(){super(...arguments),this.name="",this.nameValue=this.namevalue}get value(){return ye.buildValue(this._slot.assignedElements())}render(){return K()}reset(){this.deepQuerySelectorAll("*").forEach((t=>{t.tagName!==this.tagName&&t.reset&&t.reset()}))}namevalue(){return[this.name,this.value]}static buildValue(t){const e={};for(const o of t)if("FORM"===o.tagName)Object.assign(e,Object.fromEntries(new FormData(o).entries()));else if(o.namevalue){const[t,r]=o.namevalue();t&&(e[t]=r)}else if(o.name&&void 0!==o.value)e[o.name]=o.value;else if(o.shadowRoot)for(const t of o.shadowRoot.querySelectorAll("slot"))Object.assign(e,this.buildValue(t.assignedElements()));return e}};o([B()],$e.prototype,"name",void 0),$e=ye=o([u("form"),p(e.css`:host{display:block}`)],$e);var we=$e;we.define();let _e=class Grid extends GlobalStyle{render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[K(),ot(J({":host":{gap:this.gap,"grid-template-columns":s(this.columns)?`repeat(${this.columns},1fr)`:this.columns,"grid-template-rows":s(this.rows)?`repeat(${this.rows},1fr)`:this.rows,"place-content":this.content,"place-items":this.items}}))]}</div>`}};o([B()],_e.prototype,"gap",void 0),o([B()],_e.prototype,"columns",void 0),o([B()],_e.prototype,"rows",void 0),o([B()],_e.prototype,"content",void 0),o([B()],_e.prototype,"items",void 0),_e=o([u("grid"),p(e.css`:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}`)],_e);var ke=_e;ke.define();let xe=class Heading extends GlobalStyle{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){return e.html`<a part="root" href="${this.id?"#"+this.id:e.nothing}" ${W(this.observedRecord)}>${this.wrapHeading(K(),this.id?e.html`<i part="anchor">${this.anchor}</i>`:"")}</a>`}wrapHeading(...t){switch(this.as){case"h2":return e.html`<h2>${t}</h2>`;case"h3":return e.html`<h3>${t}</h3>`;case"h4":return e.html`<h4>${t}</h4>`;case"h5":return e.html`<h5>${t}</h5>`;case"h6":return e.html`<h6>${t}</h6>`;default:return e.html`<h1>${t}</h1>`}}};o([B()],xe.prototype,"as",void 0),o([B()],xe.prototype,"anchor",void 0),o([B()],xe.prototype,"side",void 0),xe=o([u("heading"),p(e.css`:host{display:block;text-align:start}[part=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[side=left] [part=anchor]{right:100%}[side=right] [part=anchor]{left:100%}a{color:inherit}h1,h2,h3,h4,h5,h6{direction:ltr;font-size:revert;position:relative;width:-moz-fit-content;width:fit-content}`)],xe);var Se=xe;Se.define();var Ce=it("0 0 56 56")`<path fill="currentColor" d="M43.95 47.323c.304.305.732.468 1.119.468c.814 0 1.567-.733 1.567-1.568c0-.407-.163-.814-.468-1.12L12.112 11.069a1.57 1.57 0 0 0-1.12-.448c-.814 0-1.567.733-1.567 1.547c0 .428.143.835.448 1.12Zm1.913-5.761C52.255 37.43 56 32.056 56 29.674c0-4.132-11.297-17.303-27.99-17.303c-3.46 0-6.697.59-9.669 1.567l5.313 5.293a11 11 0 0 1 4.356-.896c6.31 0 11.38 4.988 11.38 11.339c0 1.547-.326 3.033-.958 4.336ZM28.01 46.977c3.766 0 7.267-.672 10.402-1.771l-5.394-5.395a10.8 10.8 0 0 1-5.008 1.201c-6.35 0-11.379-5.15-11.4-11.338c0-1.832.428-3.562 1.202-5.09l-7.084-7.124C4.01 21.592 0 27.231 0 29.674c0 4.112 11.501 17.303 28.01 17.303m6.473-17.73a6.446 6.446 0 0 0-6.473-6.454c-.264 0-.53.02-.773.041l7.206 7.206c.02-.244.04-.529.04-.794m-12.966-.041c0 3.582 2.951 6.473 6.514 6.473c.285 0 .55-.02.834-.04l-7.308-7.309c-.02.285-.04.59-.04.876"/>`;const Ee=e.css`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:0 0;color:inherit;height:100%;padding:0 var(${yt.input}-space);width:100%}.input-field.outline,.input-field:focus-within{box-shadow:var(${yt.input}-box-shadow)}.input-field [part=icon]{align-items:center;display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(${yt.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${yt.input}-space)}`,Re=e.css`:host{${yt.input}-width:10em;${yt.input}-height:1.6em;${yt.input}-space:.2em;${yt.input}-background:var(${yt.background});${yt.input}-control:var(${yt.foreground});${yt.input}-control-edge:var(${yt.active});${yt.input}-radius:.2em;${yt.input}-box-shadow:0 0 0 .1em var(${yt.active});border-radius:var(${yt.input}-radius)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let Te=class SuperInput extends GlobalStyle{constructor(){super(...arguments),this.autofocus=!1,this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchEvent(new CustomEvent("input",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0})))}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return e.html`<label for="${this.makeId}" part="prefix">${K("prefix")}</label>`}_renderSuffix(){const t="password";return e.html`<label for="${this.makeId}" part="suffix">${"password"===this.type?e.html`<i part="icon" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}">${Ce()}</i>`:K("suffix")}</label>`}};o([B()],Te.prototype,"autocomplete",void 0),o([B({type:Boolean,reflect:!0})],Te.prototype,"disabled",void 0),o([B({reflect:!0})],Te.prototype,"type",void 0),o([B({reflect:!0})],Te.prototype,"placeholder",void 0),o([B({reflect:!0})],Te.prototype,"name",void 0),o([B()],Te.prototype,"value",void 0),o([B()],Te.prototype,"default",void 0),o([G("input")],Te.prototype,"_input",void 0),Te=o([p(Ee,Re)],Te);var Ae=Te;let Pe=class Input extends Ae{constructor(){super(...arguments),this.type="text",this.variant="default"}render(){return e.html`<div part="root" ${W(this.observedRecord)} class="${Z("input-field",this.variant)}">${[this._renderPrefix(),e.html`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||e.nothing}" autocomplete="${this.autocomplete||e.nothing}" placeholder="${this.placeholder||e.nothing}" id="${this.makeId}" @input="${this._handleInput}">`,this._renderSuffix()]}</div>`}reset(){this._input.value=this.default,this.value=this.default}};o([B()],Pe.prototype,"variant",void 0),o([G("input")],Pe.prototype,"_input",void 0),Pe=o([u("input"),p(e.css`:host{background:var(${yt.input}-background);border-radius:var(${yt.input}-radius);color:var(${yt.foreground});display:block;height:var(${yt.input}-height);width:var(${yt.input}-width)}`)],Pe);var Me=Pe;Me.define();let ze=class Layout extends GlobalStyle{constructor(){super(...arguments),this.noHeader=!1,this.noFooter=!1,this.sticky=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${this.noHeader?"":e.html`<header part="header">${K("header")}</header>`}<main part="main">${K()}</main>${this.noFooter?"":e.html`<footer part="footer">${K("footer")}</footer>`}</div>`}};o([B({type:Boolean})],ze.prototype,"noHeader",void 0),o([B({type:Boolean})],ze.prototype,"noFooter",void 0),o([B({type:Boolean})],ze.prototype,"sticky",void 0),ze=o([u("layout"),p(e.css`:host,:host([contents]) [part=root]{display:flex;flex-direction:column;min-height:100%}[part=root]{display:contents}[sticky] header{position:sticky;top:0;z-index:1}[part=main]{flex:1;position:relative;width:100%}footer,header,main{width:100%}`)],ze);var Oe=ze;Oe.define();let Ie=class SuperAnchor extends GlobalStyle{constructor(){super(...arguments),this.href=void 0,this.target="_self"}render(){return e.html`<a part="root" ${W(this.observedRecord)} href="${this.href||e.nothing}" target="${this.target}" @click="${this._handleClick}">${K()}</a>`}_handleClick(t){}};o([B()],Ie.prototype,"href",void 0),o([B()],Ie.prototype,"target",void 0),Ie=o([p(e.css`:host{color:currentColor;cursor:default;display:inline-block;text-decoration:none}:host([href]){cursor:pointer}[part=root]{color:inherit;display:inline-block;text-decoration:inherit;width:100%}`)],Ie);var De,je=Ie;let Be=De=class Router extends GlobalStyle{constructor(){super(...arguments),this.__fieldRouteTree=new RouteTree,this.__slottedRouteTree=new RouteTree,this.__cacheRecord=new Map,this.component=null,this.pathname=location.pathname,this.default=K(),this.type="united",this.cache=!1,this.routeChangeCallback=null,this.handlePopstate=this.events.add(window,"popstate",(()=>{this.pathname=location.pathname}))}get params(){return RouteTree.parseParams(this.pathname,this.path)}set routes(t){this.__routes=t,this.collectFieldRoutes(t)}get routes(){return this.__routes}clear(){this.__cacheRecord.clear()}render(){if(this.cache){const t=this.__cacheRecord.get(this.pathname);if(t)return Object.assign(this,t),this.component}switch(this.type){case"field":this.component=this.fieldComponent();break;case"slotted":this.component=this.slottedComponent();break;default:this.component=this.fieldComponent()??this.slottedComponent()}return this.component??this.default}connectedCallback(){super.connectedCallback(),De.routerInstances.add(this),"field"!==this.type&&(new MutationObserver(this.collectSlottedRoutes).observe(this,{attributeFilter:["slot"],attributes:!0,subtree:!0}),this.collectSlottedRoutes())}disconnectedCallback(){super.disconnectedCallback(),De.routerInstances.delete(this)}useRouter(){return{pathname:this.pathname,params:this.params,path:this.path,component:this.component}}updated(t){if(t.has("pathname")||t.has("path")){const t=this.useRouter(),e=!this.__cacheRecord.has(this.pathname);e&&this.__cacheRecord.set(this.pathname,t),this.routeChangeCallback?.(t,e),this.dispatchEvent(new CustomEvent("change",{detail:t}))}}fieldComponent(t){if(t||=this.__fieldRouteTree.search(this.pathname)?.pattern,this.path=t,!t)return null;const e=this.routes.find((e=>e.path===t));return e?"render"in e?e.render?.(c(this.useRouter(),"component"))||null:e.component:null}slottedComponent(t){const e=this._slottedNames;return t||=this.__slottedRouteTree.search(this.pathname)?.pattern,this.path=t,t?(this.path=e.find((e=>e===t)),this.path?K(this.path):null):null}collectSlottedRoutes(){this.__slottedRouteTree=new RouteTree,this.clear(),this._slottedNames.forEach((t=>{this.__slottedRouteTree.insert(t)}))}collectFieldRoutes(t){this.__fieldRouteTree=new RouteTree,this.clear(),t.forEach((({path:t})=>{this.__fieldRouteTree.insert(t)}))}static updateAll(){this.routerInstances.forEach((t=>{t.handlePopstate()}))}};Be.routerInstances=new Set,o([N()],Be.prototype,"component",void 0),o([N()],Be.prototype,"path",void 0),o([B()],Be.prototype,"pathname",void 0),o([N()],Be.prototype,"default",void 0),o([B()],Be.prototype,"type",void 0),o([B({type:Boolean})],Be.prototype,"cache",void 0),o([N()],Be.prototype,"routes",null),Be=De=o([u("router"),p(e.css`:host{display:contents}`)],Be);var Ne=Be;let Ue=class Link extends je{constructor(){super(...arguments),this.type="normal",this.suppress=!1}_handleClick(t){"push"!==this.type&&"replace"!==this.type||(t.preventDefault(),history[`${this.type}State`](null,"",this.href),this.suppress||Ne.updateAll())}};o([B()],Ue.prototype,"type",void 0),o([B({type:Boolean})],Ue.prototype,"suppress",void 0),Ue=o([u("link")],Ue);var Le=Ue;Le.define();let Ve=class Progress extends GlobalStyle{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,o=20;return r(this.value)||(o=this.parsePercent(this.value),t="static"),e.html`<div part="root" ${W(this.observedRecord)} class="${t}"><i part="value" style="width:${o}"></i></div>`}parsePercent(t="0"){return String(t).includes("%")?parseFloat(String(t)):parseFloat(String(t))/(this.max-this.min)*100}};o([B({type:Number})],Ve.prototype,"max",void 0),o([B({type:Number})],Ve.prototype,"min",void 0),o([B({type:Number})],Ve.prototype,"value",void 0),Ve=o([u("progress"),p(e.css`:host{background:var(${yt.passive});border-radius:.25em;color:var(${yt.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;height:inherit;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],Ve);var Ge=Ve;Ge.define();const He="range",Fe=gt(He);let qe=class Range extends Ae{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this._focusStack=[]}get reverse(){return!!this.range&&this.value[0]>this.value[1]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:o}=this,r=t-o.length;return r>0?new Array(r).fill(e).concat(o):o}render(){const t=this.padValue(2),o=Math.min(...t),r=Math.max(...t),s=this.max-this.min;return e.html`<div part="root" ${W(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${tt({"--from":(o-this.min)/s*100+"%","--to":(r-this.min)/s*100+"%",...this.range?Object.fromEntries(t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/s*100+"%"]))):{}})}"><div part="track"></div>${this.range?this.value.map(((t,e)=>this.renderHandle(e))):this.renderHandle(0)}</div>`}renderHandle(t){const{range:o}=this,r=!o||t===this.value.length-1;return e.html`<i tabindex="0" part="handle" class="${Z({"last-focus":this.lastFocus===t})}" @mousedown="${this.disabled?null:this.createMouseDown(t)}" @focus="${this.disabled?null:()=>this.focusHandle(t)}" @blur="${this.disabled?null:this.blurHandle}" style="z-index:${this._focusStack.indexOf(t)+1};--handle:var(--${!o&&r?"to":`handle-${t}`})"></i>`}focusHandle(t){this.lastFocus=t;const e=this._focusStack.indexOf(t);-1!==e&&this._focusStack.splice(e,1),this._focusStack.push(t);const o=this._handles.item(t);o?.focus(),this._keydownEvent||(this._keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t))),this.dispatchEvent(new CustomEvent("focus",{detail:t}))}blurHandle(){this.lastFocus=void 0,this._keydownEvent=this.events.remove(document,"keydown",this._keydownEvent),this.dispatchEvent(new CustomEvent("blur"))}createKeydownEvent(t){return this.range||(t=0),e=>{"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)((t=>t-this.step))):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)((t=>t+this.step)))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const o="number"==typeof e?this.normalizeValue(e):e(this.rangeValue[t]);let r=o;this.range&&(r=[...this.rangeValue],r[t]=o),this.value=r,this.dispatchEvent(new CustomEvent("range",{detail:this.value}))}}_computeValue(t){const e=this._root.getBoundingClientRect(),o=this.vertical?(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,r=Math.round(o*(this.max-this.min)/this.step)*this.step;return this.normalizeValue(r)}normalizeValue(t){return t>this.max?t-=this.step:t<this.min&&(t+=this.step),t}_handleMousedownRoot(t){const e=this._computeValue(t),o=this.range?this.rangeValue.reduce(((t,o,r)=>Math.abs(e-o)<Math.abs(e-this.rangeValue[t])?r:t),0):0,r=this.createSetValue(o);r(e),this.createMousedownListener(r)(t),this.focusHandle(o)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const o=this.createMousemoveListener(t);this.events.add(document,"mousemove",o);const r=()=>{this.events.remove(document,"mousemove",o),this.events.remove(document,"mouseup",r)};this.events.add(document,"mouseup",r)}}createMousemoveListener(t){return e=>{const o=this._computeValue(e);o>this.max||o<this.min||t?.call(this,o)}}_connectedInit(){const t=this.max-this.min;this.step||=t/100,r(this.value)&&(r(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};o([B({type:Number})],qe.prototype,"min",void 0),o([B({type:Number})],qe.prototype,"max",void 0),o([B({type:Number})],qe.prototype,"step",void 0),o([B({type:Boolean,reflect:!0})],qe.prototype,"vertical",void 0),o([B({type:Array})],qe.prototype,"value",void 0),o([B({type:Array})],qe.prototype,"default",void 0),o([G("root")],qe.prototype,"_root",void 0),o([function(t){return(e,o)=>U(e,o,{get(){return(this.renderRoot??(V??=document.createDocumentFragment())).querySelectorAll(t)}})}("[part=handle]")],qe.prototype,"_handles",void 0),o([N()],qe.prototype,"lastFocus",void 0),qe=o([u(He),p(e.css`:host{${Fe}--handle-active:var(${yt.active});${Fe}--track-width:.5em;${Fe}--length:var(${yt.input}-width);background:var(${yt.input}-background);display:block;width:var(${Fe}--length)}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:var(${Fe}--length);width:-moz-fit-content;width:fit-content}:host(:not([disabled])) .last-focus{${Fe}--handle-scale:1.05;background:var(${Fe}--handle-active)}[part=root]{position:relative;width:100%;--from:0%;--to:50%;height:var(${Fe}--track-width)}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${yt.active});height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=handle],[part=track]{display:flex;position:absolute}[part=handle]{align-items:center;background:var(${yt.active});border:.1em solid;border-color:var(${yt.input}-control);border-radius:50%;height:1em;justify-content:center;transform:scale(var(${Fe}--handle-scale,1)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,e.css`[vertical]{height:inherit;width:var(${Fe}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,e.css`[part=handle]{left:var(--handle);top:0}[vertical] [part=handle]{left:0;top:var(--handle)}`)],qe);var We=qe;We.define();const Ye="rotate",Xe=gt(Ye);let Ze=class Rotate extends GlobalStyle{render(){return e.html`<div part="root"><div part="slot" @mousemove="${this._handleRotate}">${K()}</div><i @mouseleave="${this.reset}"></i></div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:e,rotateY:o}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${e}rad) rotateY(${o}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:e,top:o,width:r,height:s}=this._root.getBoundingClientRect(),{clientX:a,clientY:l}=t;return{rotateX:-(l-o-s/2)/s/2,rotateY:(a-e-r/2)/r/2}}};o([G("root")],Ze.prototype,"_root",void 0),Ze=o([u(Ye),p(e.css`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${Xe}--padding:.75em;${Xe}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${Xe}--offset)*-1);padding:var(${Xe}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],Ze);var Ke=Ze;function Qe(t,e){return t&&e&&t.toLowerCase().includes(e.toLowerCase())}function Je(t,e){if(t){const o="checked";e?t.setAttribute(o,""):t.removeAttribute(o)}}Ke.define(),Ne.define();let to=class Select extends Me{constructor(){super(...arguments),this.multiple=!1,this.visible=!1,this.autoDirection="bottom",this._store=[]}render(){return e.html`<div part="root" ${W({...this.observedRecord,direction:this.direction||this.autoDirection})} class="input-field">${[this._renderPrefix(),e.html`<input part="input" type="${this.type}" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||e.nothing}" autocomplete="${this.autocomplete||e.nothing}" placeholder="${this.placeholder||e.nothing}" id="${this.makeId}" @focus="${this._handleFocus}" @input="${this._handleInput}">`,e.html`<label for="${this.makeId}" part="suffix"><i part="icon">${re()}</i></label>`,e.html`<label for="${this.makeId}" part="content">${K()}</label>`]}</div>`}_handleFocus(){if(!this.direction){const{top:t,bottom:e}=this.getBoundingClientRect();window.innerHeight-e<this._content.clientHeight&&t>this._content.clientHeight?this.autoDirection="top":this.autoDirection="bottom"}this.visible=!0}firstUpdated(){this.events.add(this._content,"click",(t=>{t.preventDefault(),t.stopPropagation();const{target:e}=t,o=this.optionValue(e);if(o){const t=this.select(o,e.textContent);this.multiple||Je(this.lastChecked,0),Je(e,t),this.lastChecked=e}this._input.focus()})),this.events.add(document,"click",(t=>{t.stopPropagation();const e=t.composedPath()[0];e&&!this.shadowRoot.contains(e)&&this.blur()}))}_connectedInit(){if(!this.value){const t=[...this.querySelectorAll("[checked]")];(this.multiple?t:t.length?[this.lastChecked=t[0]]:[]).forEach((t=>{Je(t,this.select(this.optionValue(t),t.textContent))})),this.default=this.value,this.defaultText=this.text,this.defaultChecked=t}this.text||(this.text="")}reset(){this.value=this.default,this.text=this.defaultText,this.querySelectorAll("[checked]").forEach((t=>Je(t,0))),this.defaultChecked.forEach((t=>Je(t,1)))}select(t,e){e||=t;let o=0;if(this.multiple){const r=this._store.findIndex((e=>e.value===t));r>-1?this._store.splice(r,1):(this._store.push({value:t,text:e}),o=1),this.value=this._store.map((t=>t.value)),this.text=this._store.map((t=>t.text)).join(", ")}else this.value===t?(this.value="",this.text=""):(this.value=t,this.text=e,o=1);return this.dispatchEvent(new CustomEvent("select",{detail:this.value,composed:!0})),this.filter(),o}filter(t){t=t?.trim(),[...this.children].forEach((e=>{this.filterCallback(e,!t||Qe(this.optionValue(e),t)||Qe(e.textContent,t),t)}))}filterCallback(t,e,o){t.style.display=e?"":"none"}_handleInput(t){if(t.stopPropagation(),this.compositing)return;const e=this._input.value;this.filter(this.multiple?function(t,e){const o=e.slice(0,t).lastIndexOf(",")+1||0,r=e.indexOf(",",t)||e.length;return e.slice(o,r)}(this._input.selectionStart,e):e),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0}))}focus(t){this._input.focus(t),this.visible=!0}blur(){this._input.blur(),this.visible=!1,super.blur()}optionValue(t){return t.value||t.getAttribute("value")||""}};o([B()],to.prototype,"text",void 0),o([G("content")],to.prototype,"_content",void 0),o([B()],to.prototype,"direction",void 0),o([B({type:Boolean})],to.prototype,"multiple",void 0),o([B({type:Boolean})],to.prototype,"visible",void 0),o([N()],to.prototype,"autoDirection",void 0),to=o([u("select"),p(e.css`[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;visibility:hidden;width:100%}[direction=bottom] [part=content]{top:100%}[direction=top] [part=content]{bottom:100%}[visible] [part=content]{visibility:visible}`)],to);var eo=to;eo.define();var oo=it("0 0 56 56")`<path fill="currentColor" d="M7.715 49.574h40.57c4.899 0 7.36-2.437 7.36-7.265V13.69c0-4.828-2.461-7.265-7.36-7.265H7.715C2.84 6.426.355 8.84.355 13.69v28.62c0 4.851 2.485 7.265 7.36 7.265m31.57-21.633c-1.055-.937-2.25-1.43-3.515-1.43c-1.313 0-2.462.446-3.54 1.407l-10.593 9.469l-4.336-3.938c-.985-.867-2.04-1.336-3.164-1.336c-1.032 0-2.04.446-3 1.313L4.129 39.73V13.88c0-2.438 1.312-3.68 3.656-3.68h40.43c2.32 0 3.656 1.242 3.656 3.68v25.875Zm-21.469.258c3.024 0 5.508-2.484 5.508-5.531c0-3.023-2.484-5.531-5.508-5.531c-3.046 0-5.53 2.508-5.53 5.531a5.54 5.54 0 0 0 5.53 5.531"/>`;const io="skeleton",ro=gt(io);let so=class Skeleton extends GlobalStyle{constructor(){super(...arguments),this.animation="position",this.loading=!0}render(){return this.loading?e.html`<div part="root" ${W(this.observedRecord)}>${"image"===this.type?oo():""} ${K("loading")}</div>`:K()}};o([B()],so.prototype,"type",void 0),o([B()],so.prototype,"animation",void 0),o([N()],so.prototype,"loading",void 0),so=o([u(io),p(e.css`:host{${ro}--from:var(${yt._colors.darkgray[9]});${ro}--to:var(${yt._colors.darkgray[7]});${ro}--deg:95deg;${ro}--duration:1.5s;${ro}--icon-size:5em;${ro}--icon-margin:.25em;background:var(${ro}--from);color:var(${yt._colors.darkgray[5]});display:block;flex-shrink:0;min-height:1.5em;overflow:hidden;width:100%}[part=root]{animation:var(${ro}--duration) ease-in-out 0s infinite none running;height:100%;min-height:inherit;text-align:center}svg{--size:var(${ro}--icon-size);font-size:var(--size);margin:calc(var(--size)*.05)}[animation=position]{animation-name:po;background-color:transparent;background-image:linear-gradient(var(${ro}--deg),var(${ro}--from) 36%,var(${ro}--to) 50%,var(${ro}--from) 64%);background-size:200% 100%}@keyframes po{0%{background-position:150%}to{background-position:-50%}}[animation=opacity]{animation-direction:alternate;animation-name:op}@keyframes op{50%{opacity:.25}to{opacity:1}}`)],so);var no=so;no.define();const ao="split",lo=gt(ao);let ho=class Split extends Ae{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${((t,e)=>{const o=new Array(t);for(let r=0;r<t;r++)o[r]=e(r);return o})(this.len,(t=>e.html`<span part="input-box" class="${Z({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};o([B({type:Number})],ho.prototype,"len",void 0),o([B({type:Number})],ho.prototype,"index",void 0),o([N()],ho.prototype,"current",void 0),o([N()],ho.prototype,"currentValue",void 0),ho=o([u(ao),p(e.css`:host{border-radius:1px;color:var(${yt.foreground});display:block;width:-moz-fit-content;width:fit-content;${lo}--size:1.45em;${lo}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${lo}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${yt.input}-background);height:var(${lo}--size);text-align:center;width:var(${lo}--size)}[part=input]{background:0 0;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${yt.input}-box-shadow)}`)],ho);var co=ho;co.define();const po="switch",uo=gt(po);let vo=class Switch extends Ae{constructor(){super(...arguments),this.round=!1,this.checked=!1,this.disabled=!1,this.default="false",this.value="on"}render(){return e.html`<div part="root" ${W(this.observedRecord)} class="${this.round?"round":"rect"}"><input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.checked}" name="${this.name}" id="${this.makeId}" @change="${this._handleChange}"> <span part="handle" class="${this.checked}"></span></div>`}reset(){this.checked="true"===this.default,this._input.checked=this.checked}connectedCallback(){super.connectedCallback(),this.checked&&(this.default="true"),"true"===this.default&&(this.checked=!0)}_handleChange(){this.checked=this._input.checked,this.dispatchEvent(new CustomEvent("change",{detail:this.checked,composed:!0}))}namevalue(){return[this.name,this.checked]}};o([B({type:Boolean,reflect:!0})],vo.prototype,"round",void 0),o([B({type:Boolean,reflect:!0})],vo.prototype,"checked",void 0),o([B({type:Boolean,reflect:!0})],vo.prototype,"disabled",void 0),o([B()],vo.prototype,"default",void 0),o([B()],vo.prototype,"value",void 0),o([L("input")],vo.prototype,"_input",void 0),vo=o([u(po),p(e.css`:host,:host([contents]) [part=root]{display:inline-block;height:var(${uo}-height);width:var(${uo}-width)}:host{${uo}-width:3em;${uo}-height:calc(var(${uo}-width)/2);${uo}-handle-size:1.25em;${uo}-handle-space:.125em;${uo}-transition:.2s ease-in-out;background:var(${yt.input}-background);border-radius:0;vertical-align:bottom}[part=handle],[part=root]{transition:var(${uo}-transition)}[part=root]{border-radius:inherit;height:inherit;position:relative}[part=input]{-webkit-appearance:none;appearance:none;height:100%;opacity:0;width:100%}[part=handle]{align-items:center;border-radius:inherit;display:inline-flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;width:50%}:host([round]){background:var(${yt.passive});border-radius:calc(var(${uo}-height)/2)}:host([checked]) [part=handle]{left:50%}.rect .true{background:var(${yt.active})}.rect .false{background:var(${yt.passive})}.round [part=handle]{--size:var(${uo}-handle-size);background:var(--godown--input-control);border-radius:100%;height:var(--size);margin:var(${uo}-handle-space);width:var(--size)}:host([checked]) .round{background:var(${yt.active})}`)],vo);var mo=vo;mo.define();const fo="text",go=gt(fo);let yo=class Text extends GlobalStyle{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return e.html`<span part="root" ${W(this.observedRecord)} class="${Z(this.underline)}">${K()}</span>`}};o([B()],yo.prototype,"underline",void 0),o([B({type:Boolean})],yo.prototype,"clip",void 0),yo=o([u(fo),p(e.css`:host{${go}--color:currentColor;${go}--color-hover:currentColor;${go}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${go}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${go}--color-hover,var(${go}--color))}[part=root]:active{color:var(${go}--color-active,var(${go}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${yt.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],yo);var bo=yo;function $o(t,e=2){return t.toString().padStart(e,"0").split("")}bo.define();let wo=class Time extends GlobalStyle{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss UTFZ",this.time=new Date}render(){return e.html`<span part="root" ${W(this.observedRecord)}>${function(t,e=new Date,o="%"){var r;if(!t)return t;if(isNaN(e.getTime()))return;const s=`${o}${o}`,a=[];t=t.replace(new RegExp(`${o}([ZYMDhmsS${o}])`,"g"),((t,e)=>(a.push(e),s)));const l=e.getTimezoneOffset()/-60,h={Z:[l>=0?"+"+l.toString():l.toString()],Y:e.getFullYear().toString().split(""),M:$o(e.getMonth()+1),D:$o(e.getDate()),h:$o(e.getHours()),m:$o(e.getMinutes()),s:$o(e.getSeconds()),S:$o(e.getMilliseconds(),3)},c=[];for(const e of t.split("").reverse()){const t=null===(r=h[e])||void 0===r?void 0:r.pop();t?c.push(t):c.push(e)}return c.reverse().join("").replace(new RegExp(s,"g"),(()=>a.shift()))}(this.format,this.time,this.escape)}</span>`}firstUpdated(){this.timeout&&(this.timeoutId=this.startTimeout())}updated(t){t.has("timeout")&&(clearInterval(this.timeoutId),this.timeout&&(this.timeoutId=this.startTimeout()))}disconnectedCallback(){clearInterval(this.timeoutId)}startTimeout(){return setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))}};o([B()],wo.prototype,"escape",void 0),o([B()],wo.prototype,"format",void 0),o([B({type:Object})],wo.prototype,"time",void 0),o([B({type:Number})],wo.prototype,"timeout",void 0),o([B({type:Number})],wo.prototype,"gap",void 0),wo=o([u("time"),p(e.css`:host{text-align:center}`)],wo);var _o,ko=wo;ko.define();const xo="tooltip",So=gt(xo);let Co=_o=class Tooltip extends SuperOpenable{constructor(){super(...arguments),this.direction="top",this.align="center",this.propagation=!1,this.type="hover"}render(){const t=_o.aligns[this.align]||"inherit",o="focus"===this.type;return e.html`<div part="root" ${W(this.observedRecord)} tabindex="${o?0:-1}" @focus="${o?()=>this.open=!0:null}" @blur="${o?()=>this.open=!1:null}" @mouseenter="${o?null:()=>this.open=!0}" @mouseleave="${o?null:()=>this.open=!1}" style="justify-content:${t};align-items:${t}">${K()}<div part="tip">${this.tip?e.html`<span class="passive">${this.tip}</span>`:K("tip")}</div></div>`}};Co.aligns={start:"flex-start",end:"flex-end",center:"center","flex-start":"flex-start","flex-end":"flex-end"},o([B()],Co.prototype,"tip",void 0),o([B()],Co.prototype,"direction",void 0),o([B()],Co.prototype,"align",void 0),o([B({type:Boolean})],Co.prototype,"propagation",void 0),o([B()],Co.prototype,"type",void 0),Co=_o=o([u(xo),p(e.css`:host{${So}--tip-background:inherit;width:-moz-fit-content;width:fit-content}:host,[part=root]{display:inline-flex}[part=root]{border-radius:inherit;position:relative;transition:inherit}[part=tip]{height:-moz-fit-content;height:fit-content;position:absolute;transition:inherit;-webkit-user-select:none;user-select:none;visibility:hidden;width:-moz-fit-content;width:fit-content}:host([open]) [part=tip]{visibility:visible}.passive{background:var(${So}--tip-background)}[propagation] [part=tip]{pointer-events:none}`,e.css`[direction^=top] [part=tip]{bottom:100%}[direction^=bottom] [part=tip]{top:100%}[direction$=right] [part=tip]{left:100%}[direction$=left] [part=tip]{right:100%}`)],Co);var Eo=Co;Eo.define();const Ro="typewriter",To=gt(Ro);let Ao=class Typewriter extends GlobalStyle{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${K()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||((t=0,e=1)=>{const o=Math.max(t,e),r=Math.min(t,e);return Math.random()*(o-r)+r})(this.max,this.min);this.timeoutID=setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e)}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};o([B()],Ao.prototype,"content",void 0),o([B({type:Boolean})],Ao.prototype,"ended",void 0),o([B({type:Number})],Ao.prototype,"max",void 0),o([B({type:Number})],Ao.prototype,"min",void 0),o([B({type:Number})],Ao.prototype,"delay",void 0),o([B({type:Number})],Ao.prototype,"index",void 0),o([N()],Ao.prototype,"contentInternal",void 0),o([L("i")],Ao.prototype,"_i",void 0),Ao=o([u(Ro),p(e.css`:host{${To}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${To}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],Ao);var Po=Ao;Po.define(),t.Alert=At,t.Avatar=Ot,t.Badge=Bt,t.Breath=Vt,t.Button=Xt,t.Card=Jt,t.Carousel=ie,t.Details=le,t.Dialog=pe,t.Divider=ve,t.Dragbox=fe,t.Flex=be,t.Form=we,t.Grid=ke,t.Heading=Se,t.Input=Me,t.Layout=Oe,t.Link=Le,t.Progress=Ge,t.Range=We,t.Rotate=Ke,t.Router=Ne,t.Select=eo,t.Skeleton=no,t.Split=co,t.Switch=mo,t.Text=bo,t.Time=ko,t.Tooltip=Eo,t.Typewriter=Po}));
|
47
|
+
*/,H=6;let F=class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const q=(t,e,o)=>{r(o)||!1===o?t.removeAttribute(e):(!0===o||"string"==typeof o||"number"==typeof o&&!isNaN(o))&&t.setAttribute(e,!0===o?"":String(o))};const W=(t=>(...e)=>({_$litDirective$:t,values:e}))(class AttrDirective extends F{render(t,e){}update(t,[o,r]){if(!o)return e.noChange;if(t.type===H){for(const e in o)(r||q)(t.element,e,o[e]);return e.noChange}}}),Y=((t,e)=>o=>t({...e,...o}))(W,{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),X=(t,e)=>t?t+(e?" "+e:""):e,Z=(...t)=>t.reduce(((t,e)=>{if(Array.isArray(e))return X(t,e.join(" "));if("object"==typeof e){const o=Object.entries(e).reduce(((t,[e,o])=>o?X(t,e):t),"");return X(t,o)}return X(t,e)}),""),K=(t,o)=>e.html`<slot name="${t||e.nothing}" @slotchange=${null}></slot>`;function Q(t,e,o,s){const a={};return Object.keys(e).forEach(((l,h)=>{const c=t.reduce(((t,o,a)=>{let h=e[l][a];return h=s?s(h,a):h,r(h)||t.push(`${o}:${h}`),t}),[]);a[l]=`${o?o(l,h):l}{${c.join(";")}}`})),a}function J(t){return Object.keys(t).reduce(((e,o)=>{const r=t[o];if(!r)return e;const s="string"==typeof r?r:tt(r);return s?e+`${o}{${s}}`:e}),"")}function tt(t){return Object.keys(t).reduce(((e,o)=>{const s=t[o];return r(s)?e:e+`${o}:${s};`}),"")}function et(t,e){return t?`var(${t})`:""}const ot=(t,o)=>{if(!t)return e.nothing;const r="string"==typeof t?t:J(t);return r?e.html`<style media="${e.nothing}">${r}</style>`:e.nothing},it=t=>(o,...r)=>{const s=e.svg(o,r),a=t,l=t=>e.html`<svg viewBox="${a}" ${Y(t)}>${s}</svg>`;return l.body=s,l.viewBox=a,l};function rt(t,e=document.body){const o=[];if(!e||!t)return o;e.shadowRoot&&o.push(...rt(t,e.shadowRoot));const r=e.querySelectorAll(t);o.push(...Array.from(r));for(const r of e.children)o.push(...rt(t,r));return[...new Set(o)]}function st(t,e=document.body){if(!e||!t)return null;if(e.shadowRoot)return st(t,e.shadowRoot);const o=e.querySelector(t);if(o)return o;for(const o of e.children){const e=st(t,o);if(e)return e}return null}class Events{constructor(){this.m=new Map}add(t,e,o,r){const s=this.m.get(e)||new Map,a=s.get(t)||new Set;return a.add(o),s.set(t,a),this.m.set(e,s),t.addEventListener(e,o,r),o}remove(t,e,o,r){if(o){const s=this.m.get(e);if(s){const r=s.get(t);r&&(r.delete(o),r.size||(s.delete(t),s.size||this.m.delete(e)))}t.removeEventListener(e,o,r)}}removeAll(){this.m.forEach(((t,e)=>{t.forEach(((t,o)=>{t.forEach((t=>{o.removeEventListener(e,t)}))})),t.clear(),this.m.delete(e)}))}}class GodownElement extends e.LitElement{static define(t=this.elementTagName,e){this.isDefined()||this.godownConfig.define(t,this,e)}static isDefined(){return!!this.getDefined()}static getDefined(){return this.godownConfig.get(this.elementTagName)}get observedRecord(){return Object.fromEntries(this.scopedObservedAttributes.map((t=>[t,this[t]])))}get scopedObservedAttributes(){return this.globalObservedAttributes.filter((t=>!GodownElement.observedAttributes.includes(t)))}get globalObservedAttributes(){return this.constructor.observedAttributes}get _slot(){return this.shadowRoot.querySelector("slot:not([name])")}get _slotAll(){return[...this.shadowRoot.querySelectorAll("slot")]}get _slottedAll(){return[...this.querySelectorAll("[slot]")]}get _slottedNames(){return this._slottedAll.map((t=>t.getAttribute("slot"))).filter((t=>t))}getBoundingClientRect(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){let t;return this.contents&&(t=this.contentsRoot||this.shadowRoot?.firstElementChild)&&t!==this?t.getClientRects():super.getClientRects()}get stylex(){return this.__stylex.css}set stylex(t){t=t.trim(),/^[\s\S]*{[\s\S]*}$/.test(t)||(t=`:host{${t}}`),this.shadowRoot?(this.__stylex.index&&this.shadowRoot.adoptedStyleSheets.splice(this.__stylex.index,1),this.__stylex.css=t,this.__stylex.index=this.adoptStyles(t)):this.__stylex.lazy=t}constructor(t){super(),this.events=new Events,this.__stylex={},this.assign={...GodownElement.godownConfig?.assign||{},...t}}connectedCallback(){super.connectedCallback(),this.assign&&(Object.assign(this,this.assign),this.assign=null);const{lazy:t}=this.__stylex;t&&(this.adoptStyles(t),this.__stylex.lazy="")}disconnectedCallback(){this.events.removeAll()}mount(t){this.firstUpdated(t)}unmount(){this.disconnectedCallback()}remount(t){this.unmount(),this.connectedCallback(),this.mount(t)}deepQuerySelector(t){return st(t,this)}deepQuerySelectorAll(t){return rt(t,this)}adoptStyles(...t){const e=this.shadowRoot.adoptedStyleSheets;if(t.length){const o=new CSSStyleSheet;t.forEach((t=>o.insertRule(t.toString()))),e.push(o)}return e.length-1}dispatchCustomEvent(t,e,o){this.dispatchEvent(new CustomEvent(t,{detail:e,composed:!0,...o}))}}GodownElement.godownConfig=new class GodownConfig{constructor(t){this.assign=null,this.prefix="godown",this.suffix="",this.components=new Map,this.registry=customElements,t&&Object.assign(this,t)}tag(t){return h(a(this.prefix,d)+d+t+d+l(this.suffix,d),d)}define(t,e,o){this.registry.define(t,e,o),this.components.set(t,e)}get(t){return this.registry.get(t)}getName(t){const{getName:e}=this.registry;return e?e(t):[...this.components.entries()].find((([,e])=>e===t))?.[0]||null}whenDefined(t){return this.registry.whenDefined(t)}upgrade(t){this.registry.upgrade(t)}},o([B({type:Boolean,reflect:!0})],GodownElement.prototype,"contents",void 0),o([B({reflect:!0})],GodownElement.prototype,"stylex",null);class RouteTree{constructor(){this.matchType=RouteTree.matchType.strict,this.children=[]}insert(t,e,o=0){if(e||(e=RouteTree.split(t)),e.length===o)return void(this.pattern=t);const r=e[o];let s=this.findStrict(r);s||(s=new RouteTree,s.part=r,s.matchType=RouteTree.dynamic(r).matchType,this.children.push(s),this.sorted=!1),s.insert(t,e,o+1)}search(t,e=0){if("string"==typeof t&&(t=RouteTree.split(t)),this.sorted||this.sort(),t.length===e||RouteTree.dynamic(this.part).matchType===RouteTree.matchType.multi)return this.pattern?this:null;const o=t[e],r=this.filterWide(o);for(const o of r){const r=o.search(t,e+1);if(null!==r)return r}return null}findStrict(t){return this.children.find((e=>e.part===t))||null}filterWide(t){return this.children.filter((e=>e.part===t||e.matchType))}static parseParams(t,e){const o=RouteTree.split(t),r=RouteTree.split(e),s={};for(let t=0;t<r.length;t++){const e=r[t],{key:a,carry:l,matchType:h}=RouteTree.dynamic(e);if(h===RouteTree.matchType.single)s[a.slice(l)]=o[t];else if(h===RouteTree.matchType.multi){s[a.slice(l)]=o.slice(t).join("/");break}}return s}static dynamic(t){if(t){if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")){t=t.slice(1,-1);const e=RouteTree.dynamic(t);return e.matchType||=RouteTree.matchType.single,e}if(t.length>1){const e=t[0];if(":"===e)return{key:t,carry:1,matchType:RouteTree.matchType.single};if("*"===e)return{key:t,carry:1,matchType:RouteTree.matchType.multi};if(t.startsWith("..."))return{key:t,carry:3,matchType:RouteTree.matchType.multi}}}return{key:t,carry:0,matchType:RouteTree.matchType.strict}}static join(...t){return t.map((t=>h(t,"/"))).join("/")}static split(t){return t.split("/").filter((t=>t))}sort(){const{children:t}=this;if(t.length){t.sort(((t,e)=>t.matchType-e.matchType));for(const e of t)e.sort()}this.sorted=!0}}RouteTree.matchType={strict:0,single:1,multi:2};var nt=it("0 0 56 56")`<path fill="currentColor" d="M28 4c13.255 0 24 10.745 24 24S41.255 52 28 52S4 41.255 4 28S14.745 4 28 4m0 4C16.954 8 8 16.954 8 28s8.954 20 20 20s20-8.954 20-20S39.046 8 28 8m10.788 11.93c.67.67.67 1.756 0 2.425l-13.36 13.36a1.715 1.715 0 0 1-2.424 0l-5.645-5.646a1.714 1.714 0 0 1 2.425-2.424l3.22 3.22c.67.67 1.755.67 2.425 0l10.934-10.934c.67-.67 1.755-.67 2.425 0"/>`,at=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.023-15.68c1.124 0 1.757-.633 1.78-1.851l.352-12.375c.024-1.196-.914-2.086-2.156-2.086c-1.266 0-2.156.867-2.133 2.062l.305 12.399c.023 1.195.68 1.851 1.852 1.851m0 7.617c1.335 0 2.53-1.078 2.53-2.437c0-1.383-1.171-2.438-2.53-2.438c-1.383 0-2.532 1.078-2.532 2.438c0 1.336 1.172 2.437 2.532 2.437"/>`,lt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.211-28.266c1.71 0 3.047-1.36 3.047-3.047c0-1.71-1.336-3.07-3.047-3.07s-3.047 1.36-3.047 3.07a3.026 3.026 0 0 0 3.047 3.047m-3.914 21.235h9.562c.961 0 1.711-.68 1.711-1.641c0-.914-.75-1.64-1.71-1.64H30.53V25.68c0-1.266-.656-2.11-1.828-2.11h-4.43c-.937 0-1.687.727-1.687 1.64c0 .962.75 1.642 1.687 1.642h2.532v10.757h-2.93c-.938 0-1.688.727-1.688 1.641c0 .96.75 1.64 1.688 1.64"/>`,ht=it("0 0 56 56")`<path fill="currentColor" d="M19.504 43.152h16.969c.797 0 1.289-.492 1.289-1.289v-3.75c0-5.672 8.25-9.328 8.25-19.453C46.012 7.996 38.793.871 27.988.871s-18 7.125-18 17.79c0 10.124 8.227 13.78 8.227 19.452v3.75c0 .797.515 1.29 1.289 1.29m2.203-4.992c0-6.89-8.18-10.57-8.18-19.476c0-8.579 5.79-14.274 14.461-14.274c8.672 0 14.485 5.695 14.485 14.274c0 8.906-8.203 12.586-8.203 19.476v1.453H21.707Zm-1.336 11.32h15.235c1.195 0 2.156-.984 2.156-2.203s-.961-2.203-2.157-2.203H20.371c-1.195 0-2.156.985-2.156 2.203c0 1.22.96 2.203 2.156 2.203m7.617 5.649c3.235 0 5.508-1.477 5.742-3.75H22.246c.211 2.273 2.484 3.75 5.742 3.75"/>`,ct=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-.492-15.07c1.172 0 1.898-.727 1.898-1.664v-.282c0-1.312.75-2.133 2.39-3.21c2.274-1.5 3.891-2.884 3.891-5.673c0-3.914-3.468-6-7.453-6c-4.031 0-6.68 1.899-7.312 4.055c-.117.399-.211.774-.211 1.172c0 1.031.844 1.617 1.617 1.617c1.336 0 1.547-.726 2.297-1.594c.773-1.289 1.898-2.062 3.469-2.062c2.133 0 3.515 1.195 3.515 3c0 1.594-.984 2.367-3.023 3.773c-1.688 1.172-2.953 2.414-2.953 4.711V31c0 1.242.68 1.852 1.875 1.852m-.047 7.007c1.36 0 2.531-1.078 2.531-2.437c0-1.383-1.148-2.438-2.531-2.438s-2.531 1.078-2.531 2.438c0 1.336 1.171 2.437 2.53 2.437"/>`,dt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-8.156-9.727c.656 0 1.148-.28 1.664-.797l15.75-15.984c.492-.492.797-1.078.797-1.617c0-1.078-.891-1.945-1.97-1.945c-.562 0-1.1.28-1.616.796L18.742 34.61c-.539.516-.797 1.102-.797 1.641c0 1.055.774 1.945 1.899 1.945"/>`,pt=it("0 0 56 56")`<path fill="currentColor" d="M28 51.906c13.055 0 23.906-10.828 23.906-23.906c0-13.055-10.875-23.906-23.93-23.906C14.899 4.094 4.095 14.945 4.095 28c0 13.078 10.828 23.906 23.906 23.906m0-3.984C16.937 47.922 8.1 39.062 8.1 28c0-11.04 8.813-19.922 19.876-19.922c11.039 0 19.921 8.883 19.945 19.922c.023 11.063-8.883 19.922-19.922 19.922m-8.016-9.984c.516 0 .985-.211 1.336-.586l6.657-6.68l6.656 6.68c.351.351.82.586 1.36.586c1.03 0 1.874-.868 1.874-1.899c0-.539-.21-.984-.562-1.336l-6.657-6.656l6.68-6.703c.375-.399.563-.797.563-1.313a1.865 1.865 0 0 0-1.875-1.875c-.493 0-.915.164-1.313.563l-6.727 6.703l-6.703-6.68c-.351-.375-.773-.539-1.289-.539c-1.054 0-1.875.797-1.875 1.852c0 .515.188.96.563 1.312l6.656 6.68l-6.656 6.68c-.375.328-.563.796-.563 1.312c0 1.031.82 1.898 1.875 1.898"/>`,ut=it("0 0 56 56")`<path fill="currentColor" d="M10.023 43.023c-.796.797-.82 2.157 0 2.954c.82.796 2.157.796 2.977 0l15-15l15 15c.797.796 2.156.82 2.977 0c.796-.82.796-2.157 0-2.954L30.953 28l15.024-15c.796-.797.82-2.156 0-2.953c-.844-.82-2.18-.82-2.977 0l-15 15l-15-15c-.82-.82-2.18-.844-2.977 0c-.796.82-.796 2.156 0 2.953l15 15Z"/>`;const vt=(t,e,o)=>({r:t,g:e,b:o,toString(){return`${this.r} ${this.g} ${this.b}`}}),mt={darkgray:[vt(121,121,121),vt(109,109,109),vt(97,97,97),vt(85,85,85),vt(73,73,73),vt(61,61,61),vt(48,48,48),vt(36,36,36),vt(24,24,24),vt(12,12,12)],lightgray:[vt(243,243,243),vt(231,231,231),vt(219,219,219),vt(206,206,206),vt(194,194,194),vt(182,182,182),vt(170,170,170),vt(158,158,158),vt(146,146,146),vt(133,133,133)],teal:[vt(213,249,248),vt(170,243,241),vt(128,237,234),vt(85,231,226),vt(43,225,219),vt(0,219,212),vt(0,175,170),vt(0,131,127),vt(0,88,85),vt(0,44,42)],blue:[vt(213,240,255),vt(170,224,255),vt(128,209,255),vt(85,193,255),vt(43,178,255),vt(0,162,255),vt(0,130,204),vt(0,97,153),vt(0,65,102),vt(0,32,51)],green:[vt(221,243,221),vt(186,231,186),vt(152,219,152),vt(117,206,117),vt(82,194,82),vt(48,182,48),vt(38,146,38),vt(29,109,29),vt(19,73,19),vt(10,36,10)],red:[vt(251,221,221),vt(247,186,187),vt(243,152,154),vt(239,118,120),vt(235,83,86),vt(231,49,52),vt(185,39,42),vt(139,29,31),vt(92,20,21),vt(46,10,10)],purple:[vt(242,228,253),vt(229,201,250),vt(217,174,248),vt(204,146,245),vt(191,119,243),vt(178,92,240),vt(142,74,192),vt(107,55,144),vt(71,37,96),vt(36,18,48)],orange:[vt(255,235,213),vt(255,216,170),vt(255,196,128),vt(255,176,85),vt(255,157,43),vt(255,137,0),vt(204,110,0),vt(153,82,0),vt(102,55,0),vt(51,27,0)],yellow:[vt(251,252,216),vt(247,248,177),vt(243,245,138),vt(239,242,98),vt(235,238,59),vt(231,235,20),vt(185,188,16),vt(139,141,12),vt(92,94,8),vt(46,47,4)],pink:[vt(254,222,233),vt(253,189,211),vt(252,156,190),vt(251,123,168),vt(250,90,146),vt(249,57,124),vt(199,46,99),vt(149,34,74),vt(100,23,50),vt(50,11,25)]};class GlobalStyle extends GodownElement{}const ft=h(GlobalStyle.godownConfig.prefix,"-");function gt(t,o=1){return function(t){return e.unsafeCSS(`--${t}`)}(ft+"-".repeat(o)+t)}const yt={foreground:gt("foreground",2),background:gt("background",2),clipBackground:gt("clip-background",2),active:gt("active",2),passive:gt("passive",2),_colors:{},input:gt("input",2),white:gt("color-white",2),black:gt("color-black",2)};var bt,$t;GlobalStyle.styles=[e.unsafeCSS(`:host{${yt.black}:rgb(0 0 0);${yt.white}:rgb(255 255 255);`+(bt=(t,o,r)=>{yt._colors[t]||=[],yt._colors[t].push(e.unsafeCSS(gt("color",2)+"-"+t+"-"+o));const s=`-${t}-${o}`;return`${gt("color",2)+s}:rgb(${r});`},$t=mt,Object.entries($t).flatMap((([t,e])=>e.map(((e,o)=>bt(t,o,e)))))).join("")+tt({[yt.background+""]:`var(${yt._colors.darkgray[9]})`,[yt.foreground+""]:`var(${yt._colors.lightgray[0]})`,[yt.active+""]:`var(${yt._colors.blue[6]})`,[yt.passive+""]:`var(${yt._colors.darkgray[6]})`,[yt.clipBackground+""]:`linear-gradient(to bottom, var(${yt.foreground}), var(${yt.passive}))`})+"}"),e.css`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];const wt="alert",_t=gt(wt),kt=["color","background"].map((t=>`${_t}--${t}`)),xt=t=>[yt._colors[t][5],yt._colors[t][9]],St=Q(kt,{green:xt("green"),blue:xt("blue"),orange:xt("orange"),red:xt("red"),yellow:xt("yellow"),purple:xt("purple"),teal:xt("teal"),pink:xt("pink"),gray:[yt._colors.lightgray[5],yt._colors.darkgray[5]],white:[yt._colors.lightgray[2],yt._colors.darkgray[7]],black:[yt._colors.darkgray[8],yt._colors.lightgray[5]]},(()=>":host"),(t=>et(t))),Ct=t=>[yt._colors[t][6],yt._colors[t][0]],Et=Q(kt,{green:Ct("green"),blue:Ct("blue"),orange:Ct("orange"),red:Ct("red"),yellow:Ct("yellow"),purple:Ct("purple"),teal:Ct("teal"),pink:Ct("pink"),gray:[yt._colors.darkgray[5],yt._colors.lightgray[7]],white:[yt._colors.lightgray[0],yt._colors.darkgray[0]],black:[yt._colors.darkgray[7],yt._colors.lightgray[3]]},(()=>":host"),(t=>et(t))),Rt={tip:{color:"teal",icon:ht},success:{color:"green",icon:nt},info:{color:"blue",icon:lt},warning:{color:"orange",icon:at},danger:{color:"red",icon:pt},error:{color:"red",icon:pt},help:{color:"purple",icon:ct},deprecated:{color:"gray",icon:dt}};let Tt=class Alert extends GlobalStyle{constructor(){super(...arguments),this.color="blue",this.autoclose=0,this.hideClose=!1,this.variant="dark"}render(){const t=Rt[this.call]?.color||this.color,o=this.call?Rt[this.call].icon():K("icon");return e.html`<div part="root" ${W(this.observedRecord)}><div part="icon">${o}</div><div part="content"><strong part="title">${this.title||K("title")}</strong> ${this.content||K()}</div>${this.hideClose||"blockquote"===this.variant?"":e.html`<div part="close" tabindex="0" @click="${this.close}">${ut()}</div>`} ${ot("dark"===this.variant?St[t]:Et[t])}</div>`}close(){this.remove(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}firstUpdated(){this.autoclose&&setTimeout((()=>this.close()),this.autoclose)}static alert(t,e){const o=new this;return Object.assign(o,e),t.appendChild(o),o}};o([B()],Tt.prototype,"call",void 0),o([B()],Tt.prototype,"color",void 0),o([B({type:Number})],Tt.prototype,"autoclose",void 0),o([B()],Tt.prototype,"title",void 0),o([B()],Tt.prototype,"content",void 0),o([B({type:Boolean})],Tt.prototype,"hideClose",void 0),o([B()],Tt.prototype,"variant",void 0),Tt=o([u(wt),p(e.css`:host,:where(:host([contents]) [part=root]){border-radius:var(${_t}--border-radius);${_t}--border-radius:.25em;${_t}--border-width:.075em;${_t}--blockquote-width:.2em;${_t}--padding:.5em;display:block;width:100%}[part=root]{--color:var(${_t}--color);background:var(${_t}--background);border:var(${_t}--border-width) solid var(--color);border-radius:inherit;color:var(--color);display:flex;justify-content:space-between;padding:var(${_t}--padding);transition:.25s;width:100%}[variant=blockquote]{background:transparent;border:none;border-left:var(${_t}--blockquote-width) solid var(--color);border-radius:0}[part=content]{color:var(--color)}[part=root]{align-items:center;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}[part=title]{line-height:2em}[part=icon]{align-items:center;display:inline-grid;height:2em}[part=icon] svg{height:1.25em;margin-right:.5em;width:1.25em}[part=content]{grid-row:span 2/span 2;line-height:1.5em}`)],Tt);var At=Tt;At.define();const Pt="avatar",Mt=gt(Pt);let zt=class Avatar extends GlobalStyle{constructor(){super(...arguments),this.name="",this.round=!1}render(){return e.html`<div part="root" ${W(c(this.observedRecord,"src"))}>${this._renderAvatar()}</div>`}_renderAvatar(){return this.src?e.html`<img part="image" src="${this.src}" alt="${this.name}" @error="${this._handleError}">`:this.name?e.html`<span part="name">${this.format()}</span>`:K()}format(){return this.name}_handleError(){this.src=void 0}};o([B()],zt.prototype,"src",void 0),o([B()],zt.prototype,"name",void 0),o([B({type:Boolean})],zt.prototype,"round",void 0),zt=o([u(Pt),p(e.css`:host{${Mt}--size:2em;height:var(${Mt}--size);vertical-align:bottom;width:var(${Mt}--size)}:host,[part=root]{display:inline-flex}:host([contents]) [part=root]{display:inline-flex;height:inherit;width:inherit}:host([round]){border-radius:50%}[part=image]{height:100%;object-fit:cover;width:100%}[part=root]{align-items:center;border-radius:inherit;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}`)],zt);var Ot=zt;Ot.define();const It="badge",Dt=gt(It);let jt=class Badge extends GlobalStyle{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${K()} ${this.value||this.dot?e.html`<div part="badge">${this.dot?"":this.formatValue(this.value)}</div>`:""}</div>`}};o([B()],jt.prototype,"position",void 0),o([B({type:Number})],jt.prototype,"value",void 0),o([B({type:Boolean})],jt.prototype,"dot",void 0),o([B({type:Number})],jt.prototype,"max",void 0),jt=o([u(It),p(e.css`:host{${Dt}--background:var(${yt.active});${Dt}--offset:0%;${Dt}--offset-x:var(${Dt}--offset);${Dt}--offset-y:var(${Dt}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=badge]{background:var(${Dt}--background);border-radius:calc(infinity * 1px);font-size:75%;left:var(--left);padding:0 .5em;position:absolute;top:var(--top);transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=badge]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top]{--top:calc(var(${Dt}--offset-y))}[position$=right]{--left:calc(100% - var(${Dt}--offset-x))}[position^=bottom]{--top:calc(100% - var(${Dt}--offset-y))}[position$=left]{--left:calc(var(${Dt}--offset-x))}`)],jt);var Bt=jt;Bt.define();const Nt="breath",Ut=gt(Nt);let Lt=class Breath extends GlobalStyle{render(){const t=this.getTexts();return e.html`<div part="root" ${W(this.observedRecord)}>${[t.map(this.renderText),ot(this._computeStyle(t.length))]}</div>`}renderText(t){return e.html`<span class="rel"><span class="nocolor">${t}</span> <span class="colorful">${t}</span></span>`}getTexts(){return Array.isArray(this.text)?this.text:(this.text||this.textContent).split(/\s+/).filter((t=>t))}_computeStyle(t){const e=50/t,o=this.parseDuration()||2*t+2;let r="";for(let e=1;e<=t;e++)r+=`.rel:nth-child(${e}) .colorful{animation-delay:${-o/t*(t-e+1)}s;background:var(${Ut}--${e},var(${Ut}--${(e-1)%3+1}));}`;return`.colorful{animation-duration:${o}s;}@keyframes colorfulN{0%,${3*e}%{opacity:0;}${e}%,${2*e}%{opacity:1;}}${r}`}parseDuration(){const{duration:t}=this;if(t){if(t.endsWith("s"))return Number.parseFloat(t.slice(0,-1));if(t.endsWith("ms"))return Number.parseFloat(t.slice(0,-2))/1e3}}};o([B()],Lt.prototype,"text",void 0),o([B()],Lt.prototype,"duration",void 0),Lt=o([u(Nt),p(e.css`:host{${Ut}--deg:60deg;${Ut}--1-1:var(${yt._colors.red[5]});${Ut}--1-2:var(${yt._colors.yellow[5]});${Ut}--2-1:var(${yt._colors.green[5]});${Ut}--2-2:var(${yt._colors.purple[5]});${Ut}--3-1:var(${yt._colors.blue[5]});${Ut}--3-2:var(${yt._colors.pink[5]});${Ut}--1:linear-gradient(var(${Ut}--deg),var(${Ut}--1-1),var(${Ut}--1-2));${Ut}--2:linear-gradient(var(${Ut}--deg),var(${Ut}--2-1),var(${Ut}--2-2));${Ut}--3:linear-gradient(var(${Ut}--deg),var(${Ut}--3-1),var(${Ut}--3-2))}`,e.css`:host{align-items:center;direction:ltr;font-size:2em;margin:auto;width:-moz-fit-content;width:fit-content}:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}::selection{background:none}.rel{font-size:inherit;font-weight:800;letter-spacing:-.05em;position:relative}`,e.css`.colorful,.nocolor{animation-iteration-count:infinite;-webkit-background-clip:text!important;background-clip:text!important;box-sizing:border-box;color:transparent;display:inline-block;padding:0 .05em}.colorful{animation-name:colorfulN;opacity:0}.nocolor{background:var(${yt.clipBackground});position:absolute;top:0}`)],Lt);var Vt=Lt;Vt.define();const Gt="button",Ht=gt(Gt),Ft=yt.white,qt=yt.black,Wt=Q(["color","background","gradients"].map((t=>`${Ht}--${t}`)),{black:[Ft,yt._colors.darkgray[7],yt._colors.darkgray[5]],gray:[Ft,yt._colors.darkgray[1],yt._colors.lightgray[8]],white:[qt,yt._colors.lightgray[3],yt._colors.lightgray[0]],blue:[Ft,yt._colors.blue[6],yt._colors.blue[4]],green:[Ft,yt._colors.green[6],yt._colors.green[4]],red:[Ft,yt._colors.red[6],yt._colors.red[4]],orange:[Ft,yt._colors.orange[6],yt._colors.orange[4]],pink:[Ft,yt._colors.pink[6],yt._colors.pink[4]],purple:[Ft,yt._colors.purple[6],yt._colors.purple[4]],yellow:[qt,yt._colors.yellow[6],yt._colors.yellow[4]],teal:[Ft,yt._colors.teal[6],yt._colors.teal[4]]},(()=>":host"),(t=>et(t)));let Yt=class Button extends GlobalStyle{constructor(){super(...arguments),this.disabled=!1,this.ghost=!1,this.active=!1,this.round=!1,this.color="black"}render(){const t=this.nextColor();return e.html`<div part="root" ${W(this.observedRecord)}><span part="modal-root"></span><div part="content">${[this.content||K(),ot(Wt[t])]}</div></div>`}focus(){this.disabled||(this.active=!0,super.focus())}blur(){this.active=!1,super.blur()}firstUpdated(){this.events.add(this,"click",this._handelClick,!0)}_handelClick(t){if(this.disabled)return t.stopPropagation(),void t.preventDefault();this._handleModal(t)}_handleModal(t){const e=document.createElement("i"),o=this._root.getBoundingClientRect(),{height:r,width:s}=o,a=2*Math.sqrt(r*r+s*s)+"px";e.style.height=a,e.style.width=a,e.style.left=t.clientX-o.left+"px",e.style.top=t.clientY-o.y+"px",e.style.animationName="kf",this._modalRoot.appendChild(e),e.addEventListener("animationend",(()=>e.remove()),{once:!0})}nextColor(){return this.color}};o([B({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"ghost",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"active",void 0),o([B({type:Boolean,reflect:!0})],Yt.prototype,"round",void 0),o([B({reflect:!0})],Yt.prototype,"color",void 0),o([B()],Yt.prototype,"content",void 0),o([G("modal-root")],Yt.prototype,"_modalRoot",void 0),o([G("root")],Yt.prototype,"_root",void 0),Yt=o([u(Gt),p(e.css`:host(:not([disabled]):active){transform:scale(var(${Ht}--focus-scale))}:host([round]){${Ht}--padding-x:.75em;border-radius:calc(infinity * 1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([ghost]){${Ht}--modal-background:var(${Ht}--ghost-color);background:transparent;box-shadow:inset 0 0 0 var(${Ht}--ghost-width) var(${Ht}--ghost-color);color:var(${Ht}--ghost-color)}`,e.css`:host{${Ht}--padding-x:.5em;${Ht}--padding-y:min(calc(var(${Ht}--padding-x)/2),.125em);${Ht}--padding:var(${Ht}--padding-y) var(${Ht}--padding-x);${Ht}--modal-animation-duration:1s;${Ht}--ghost-width:.08em;${Ht}--focus-scale:.97;${Ht}--deg:45deg;${Ht}--ghost-color:var(${Ht}--background);background:linear-gradient(var(${Ht}--deg),var(${Ht}--background),var(${Ht}--gradients,var(${Ht}--background)));border-radius:.3em;color:var(${Ht}--color,inherit);cursor:pointer;display:block;overflow:hidden;padding:0!important;text-align:center;transition:.1s;width:-moz-fit-content;width:fit-content}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{border-radius:inherit;overflow:hidden;padding:var(${Ht}--padding);position:relative;transition:none;transition-duration:inherit;-webkit-user-select:none;user-select:none}[part=root],i{height:100%;width:100%}i{animation-duration:var(${Ht}--modal-animation-duration);background:var(${Ht}--modal-background,currentColor);border-radius:50%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible}@keyframes kf{0%{opacity:var(${Ht}--modal-opacity,.1);transform:scale(0) translate(-50%,-50%)}80%{transform:scale(1) translate(-50%,-50%)}to{opacity:0}}`)],Yt);var Xt=Yt;Xt.define();const Zt="card",Kt=gt(Zt);let Qt=class Card extends GlobalStyle{constructor(){super(...arguments),this.footer=!1,this.header=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[this.header?K("header"):"",K(),this.footer?K("footer"):""]}</div>`}};o([B({type:Boolean})],Qt.prototype,"footer",void 0),o([B({type:Boolean})],Qt.prototype,"header",void 0),Qt=o([u(Zt),p(e.css`:host{${Kt}--background:var(${yt.background});${Kt}--border-width:.0375em;${Kt}--border-color:transparent;${Kt}--border-background:var(${yt.passive});${Kt}--padding:.75em;background:var(${Kt}--background);border-width:var(${Kt}--border-width);box-sizing:border-box;color:var(${yt.foreground});display:block;flex-shrink:0;overflow:hidden;position:relative}slot{display:block;padding:var(${Kt}--padding)}:host,slot{border-color:var(${Kt}--border-background);border-style:solid}[name=footer]{border-top-width:var(${Kt}--border-width)}[name=header]{border-bottom-width:var(${Kt}--border-width)}`)],Qt);var Jt=Qt;Jt.define();var te=it("0 0 56 56")`<path fill="currentColor" d="M35.805 47.723c.398.398.914.633 1.523.633c1.219 0 2.133-.915 2.133-2.133c0-.586-.234-1.125-.61-1.524L21.79 28.012l17.063-16.688c.375-.398.609-.96.609-1.523c0-1.219-.914-2.157-2.133-2.157c-.61 0-1.125.235-1.523.633L17.242 26.441c-.445.375-.703.961-.703 1.57c0 .587.258 1.126.703 1.571Z"/>`,ee=it("0 0 56 56")`<path fill="currentColor" d="M18.695 48.367c.586 0 1.102-.234 1.524-.633L38.78 29.57c.446-.445.68-.984.68-1.57c0-.61-.234-1.172-.68-1.57L20.22 8.289a2.07 2.07 0 0 0-1.524-.656a2.12 2.12 0 0 0-2.156 2.156c0 .563.258 1.125.633 1.524L34.21 28L17.17 44.688c-.374.398-.632.937-.632 1.523c0 1.219.938 2.156 2.156 2.156"/>`;let oe=class Carousel extends GlobalStyle{constructor(){super(...arguments),this.index=0,this.autoChange=0}render(){return e.html`<div part="root" ${W(this.observedRecord)}><i part="prev" @click="${this.prev}">${te()}</i><div part="move-root" style="transform:${`translateX(-${this.index+1}00%)`}">${K()}</div><i part="next" @click="${this.next}">${ee()} </i>${ot(`:host,:host([contents]) [part=root]{width:${this.width};}`)}</div>`}async firstUpdated(){await this.updateComplete,this.children.length&&(this.width||=`${this.firstElementChild.offsetWidth}px`,this._cloneFirst?.remove(),this._cloneLast?.remove(),this._cloneLast=this.firstElementChild.cloneNode(!0),this._cloneFirst=this.lastElementChild.cloneNode(!0),this.appendChild(this._cloneLast),this.insertBefore(this._cloneFirst,this.firstElementChild),this.show(this.index)),this.checkInterval()}disconnectedCallback(){clearInterval(this.intervalID)}show(t){this.index=t,this.dispatchEvent(new CustomEvent("change",{detail:t,composed:!0}))}next(){this.index===this.childElementCount-3?(this._doTranslateX("0",!0),this.show(0)):this.show(this.index+1),this.checkInterval()}prev(){0===this.index?(this._doTranslateX(`-${this.childElementCount-1}00%`,!0),this.show(this.children.length-3)):this.show(this.index-1),this.checkInterval()}_doTranslateX(t,e){this._moveRoot.style.transform=`translateX(${t})`,e&&(this._moveRoot.style.transition="none"),this._moveRoot.getBoundingClientRect()}checkInterval(){this.autoChange&&(this.intervalID&&clearInterval(this.intervalID),this.intervalID=setInterval((()=>{this.next()}),this.autoChange))}};o([B({type:Number})],oe.prototype,"index",void 0),o([B({type:Number})],oe.prototype,"autoChange",void 0),o([B()],oe.prototype,"width",void 0),o([G("move-root")],oe.prototype,"_moveRoot",void 0),oe=o([u("carousel"),p(e.css`:host{display:block;transition:.3s}[part=root]{direction:ltr;overflow:hidden}[part=move-root],[part=root]{display:flex;height:100%;position:relative;transition:inherit;width:100%}[part=next],[part=prev]{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;-webkit-user-select:none;user-select:none;width:1.5em;z-index:1}[part=prev]{left:0}[part=next]{right:0}slot::slotted(*){flex-shrink:0!important}`)],oe);var ie=oe;ie.define();var re=it("0 0 56 56")`<path fill="currentColor" d="M28 39.46a2.1 2.1 0 0 0 1.57-.679l18.164-18.586a2.1 2.1 0 0 0 .633-1.5a2.12 2.12 0 0 0-2.156-2.156a2.27 2.27 0 0 0-1.523.61L28 34.21L11.313 17.148a2.23 2.23 0 0 0-1.524-.609a2.12 2.12 0 0 0-2.156 2.156c0 .586.234 1.102.633 1.524L26.43 38.78c.445.446.96.68 1.57.68"/>`;class SuperOpenable extends GlobalStyle{constructor(){super(...arguments),this.open=!1}toggle(t=!this.open){this.open=t}close(){this.open=!1}show(){this.open=!0}updated(t){void 0!==t.get("open")&&this.dispatchEvent(new CustomEvent("change",{detail:this.open,composed:!0}))}_handelClick(t){this.toggle()}}o([B({type:Boolean,reflect:!0})],SuperOpenable.prototype,"open",void 0);const se="details",ne=gt(se);let ae=class Details extends SuperOpenable{constructor(){super(...arguments),this.fill=!1,this.summary=""}render(){return e.html`<dl part="root" ${W(this.observedRecord)}><dt part="title" @click="${this._handelClick}"><span part="summary">${this.summary||K("summary")}</span> <span><i part="icon">${re()}</i></span></dt><dd part="details" @click="${this.fill?()=>this.toggle():null}"><div style="min-height: 0;">${K()}</div></dd></dl>`}};o([B({type:Boolean})],ae.prototype,"fill",void 0),o([B()],ae.prototype,"summary",void 0),ae=o([u(se),p(e.css`:host{${ne}--icon-deg-open:0deg;${ne}--icon-deg-close:90deg;${ne}--icon-space:0.3em;${ne}--summary-direction:row;${ne}--transition:.3s;display:block;height:-moz-fit-content;height:fit-content;transition:var(${ne}--transition)}[part=root]{height:100%;overflow:hidden;position:relative}[part=title]{align-items:center;background:inherit;direction:ltr;display:flex;flex-direction:var(${ne}--summary-direction);flex-wrap:nowrap;height:100%;justify-content:space-between}[part=details]{display:grid;grid-template-rows:0fr;overflow:hidden;transition:var(${ne}--transition);transition-property:grid-template-rows}:host([open]) [part=details]{grid-template-rows:1fr}:host([float]) [part=details]{position:absolute;top:100%}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;padding:var(${ne}--icon-space);transform:rotate(var(${ne}--icon-deg-close));transition:var(${ne}--transition)}:host([open]) [part=icon]{transform:rotate(var(${ne}--icon-deg-open))}`)],ae);var le=ae;le.define();const he="dialog",ce=gt(he);let de=class Dialog extends SuperOpenable{constructor(){super(...arguments),this.modal=!1,this.key="Escape",this._modalInvoke=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}><div part="modal"></div><div part="container">${K()}</div></div>`}showModal(){this.modal||(this.modal=!0,this._modalInvoke=!0),this.show()}updated(t){t.has("open")&&(this.open?(this._submitEvent=this.events.add(this,"submit",this._handelSubmit),this.key&&(this._keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this)))):(this.events.remove(this,"submit",this._submitEvent),this.events.remove(document,"keydown",this._keydownEvent)))}_handleKeydown(t){const e=this.key.split(/[\s,]/);(e.includes(t.key)||e.includes(t.code))&&(t.preventDefault(),this.close())}_handelSubmit(t){"dialog"===t.target.method&&(t.preventDefault(),this.close())}close(){this._modalInvoke&&(this.modal=!1,this._modalInvoke=!1),this.open=!1}};o([B({type:Boolean,reflect:!0})],de.prototype,"modal",void 0),o([B()],de.prototype,"key",void 0),de=o([u(he),p(e.css`:host{${ce}--background:none;${ce}--background-modal:var(${yt.background});${ce}--opacity-modal:0.2;background:var(${ce}--background);inset:0;pointer-events:none;position:fixed;visibility:hidden;z-index:1}:host([open]){visibility:visible}:host([open][modal]) [part=modal]{opacity:var(${ce}--opacity-modal);pointer-events:all;visibility:visible}[part=modal]{background:var(${ce}--background-modal);height:100%;opacity:0;position:absolute;visibility:hidden;width:100%}[part=root]{align-items:center;display:flex;height:100%;justify-content:center;position:relative;width:100%}[part=container]{pointer-events:all;position:absolute}[direction^=top] [part=container]{top:0}[direction^=bottom] [part=container]{bottom:0}[direction$=right] [part=container]{right:0}[direction$=left] [part=container]{left:0}`)],de);var pe=de;pe.define();let ue=class Divider extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}></div>`}};o([B({type:Boolean,reflect:!0})],ue.prototype,"vertical",void 0),ue=o([u("divider"),p(e.css`:host{background:currentColor;display:block;height:.05em;margin:auto;width:100%}:host([vertical]){height:max(1em,100%);width:.05em}:host([contents]) [part=root]{background:currentColor;display:block;height:.05em;margin:auto;width:100%}[part=root]{display:contents}`)],ue);var ve=ue;ve.define();let me=class Dragbox extends GlobalStyle{constructor(){super(...arguments),this.drag=!1,this.x="auto",this.y="auto"}get offsetsWidth(){return this.offsetParent?.clientWidth??document.body.offsetWidth}get offsetsHeight(){return this.offsetParent?.clientHeight??document.body.offsetHeight}render(){return e.html`<div part="root" ${W(this.observedRecord)} @mousedown="${this._handleDragStart}" @mouseup="${this._handleDragEnd}">${K()}</div>`}firstUpdated(){this.reset()}_handleDragStart(t){this.cx=t.clientX,this.cy=t.clientY,this.t=this.offsetTop,this.l=this.offsetLeft,this.drag=!0,this._handleMouseMove=this.events.add(document,"mousemove",this._handleDrag.bind(this)),this._handleMouseLeave=this.events.add(document,"mouseleave",this._handleDragEnd.bind(this))}_handleDragEnd(){this.drag=!1,this.events.remove(document,"mousemove",this._handleMouseMove),this.events.remove(document,"mouseleave",this._handleMouseLeave)}_handleDrag(t){if(!this.drag)return;const e=t.clientX-(this.cx-this.l),o=t.clientY-(this.cy-this.t),{style:r,offsetsWidth:s,offsetsHeight:a,offsetWidth:l,offsetHeight:h}=this;r.left=e<0?"0":e<s-l?`${e}px`:s-l+'"px"',r.top=o<0?"0":o<a-h?`${o}px`:a-h+"px"}reset(){const{x:t,y:e,style:o,offsetsWidth:r,offsetsHeight:s,offsetWidth:a,offsetHeight:l,offsetLeft:h,offsetTop:c}=this;o.left=t||"0",o.top=e||"0",h>r-a&&(o.left=r-a+"px"),c>s-l&&(o.top=s-l+"px")}};o([B()],me.prototype,"x",void 0),o([B()],me.prototype,"y",void 0),me=o([u("dragbox"),p(e.css`:host{display:block;position:absolute}:host(:active){-webkit-user-select:none;user-select:none}`)],me);var fe=me;fe.define();let ge=class Flex extends GlobalStyle{constructor(){super(...arguments),this.vertical=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[K(),ot(J({":host":{gap:this.gap,"flex-flow":this.flexFlow,"flex-direction":this.vertical&&"column","align-items":this.items,"justify-content":this.content}}))]}</div>`}};o([B({attribute:"flex-flow"})],ge.prototype,"flexFlow",void 0),o([B()],ge.prototype,"gap",void 0),o([B()],ge.prototype,"content",void 0),o([B()],ge.prototype,"items",void 0),o([B({type:Boolean})],ge.prototype,"vertical",void 0),ge=o([u("flex"),p(e.css`:host,:host([contents]) [part=root]{display:flex}[part=root]{display:contents}`)],ge);var ye,be=ge;be.define();let $e=ye=class Form extends GlobalStyle{constructor(){super(...arguments),this.name="",this.nameValue=this.namevalue}get value(){return ye.buildValue(this._slot.assignedElements())}render(){return K()}reset(){this.deepQuerySelectorAll("*").forEach((t=>{t.tagName!==this.tagName&&t.reset&&t.reset()}))}namevalue(){return[this.name,this.value]}static buildValue(t){const e={};for(const o of t)if("FORM"===o.tagName)Object.assign(e,Object.fromEntries(new FormData(o).entries()));else if(o.namevalue){const[t,r]=o.namevalue();t&&(e[t]=r)}else if(o.name&&void 0!==o.value)e[o.name]=o.value;else if(o.shadowRoot)for(const t of o.shadowRoot.querySelectorAll("slot"))Object.assign(e,this.buildValue(t.assignedElements()));return e}};o([B()],$e.prototype,"name",void 0),$e=ye=o([u("form"),p(e.css`:host{display:block}`)],$e);var we=$e;we.define();let _e=class Grid extends GlobalStyle{render(){return e.html`<div part="root" ${W(this.observedRecord)}>${[K(),ot(J({":host":{gap:this.gap,"grid-template-columns":s(this.columns)?`repeat(${this.columns},1fr)`:this.columns,"grid-template-rows":s(this.rows)?`repeat(${this.rows},1fr)`:this.rows,"place-content":this.content,"place-items":this.items}}))]}</div>`}};o([B()],_e.prototype,"gap",void 0),o([B()],_e.prototype,"columns",void 0),o([B()],_e.prototype,"rows",void 0),o([B()],_e.prototype,"content",void 0),o([B()],_e.prototype,"items",void 0),_e=o([u("grid"),p(e.css`:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}`)],_e);var ke=_e;ke.define();let xe=class Heading extends GlobalStyle{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){return e.html`<a part="root" href="${this.id?"#"+this.id:e.nothing}" ${W(this.observedRecord)}>${this.wrapHeading(K(),this.id?e.html`<i part="anchor">${this.anchor}</i>`:"")}</a>`}wrapHeading(...t){switch(this.as){case"h2":return e.html`<h2>${t}</h2>`;case"h3":return e.html`<h3>${t}</h3>`;case"h4":return e.html`<h4>${t}</h4>`;case"h5":return e.html`<h5>${t}</h5>`;case"h6":return e.html`<h6>${t}</h6>`;default:return e.html`<h1>${t}</h1>`}}};o([B()],xe.prototype,"as",void 0),o([B()],xe.prototype,"anchor",void 0),o([B()],xe.prototype,"side",void 0),xe=o([u("heading"),p(e.css`:host{display:block;text-align:start}[part=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[side=left] [part=anchor]{right:100%}[side=right] [part=anchor]{left:100%}a{color:inherit}h1,h2,h3,h4,h5,h6{direction:ltr;font-size:revert;position:relative;width:-moz-fit-content;width:fit-content}`)],xe);var Se=xe;Se.define();var Ce=it("0 0 56 56")`<path fill="currentColor" d="M43.95 47.323c.304.305.732.468 1.119.468c.814 0 1.567-.733 1.567-1.568c0-.407-.163-.814-.468-1.12L12.112 11.069a1.57 1.57 0 0 0-1.12-.448c-.814 0-1.567.733-1.567 1.547c0 .428.143.835.448 1.12Zm1.913-5.761C52.255 37.43 56 32.056 56 29.674c0-4.132-11.297-17.303-27.99-17.303c-3.46 0-6.697.59-9.669 1.567l5.313 5.293a11 11 0 0 1 4.356-.896c6.31 0 11.38 4.988 11.38 11.339c0 1.547-.326 3.033-.958 4.336ZM28.01 46.977c3.766 0 7.267-.672 10.402-1.771l-5.394-5.395a10.8 10.8 0 0 1-5.008 1.201c-6.35 0-11.379-5.15-11.4-11.338c0-1.832.428-3.562 1.202-5.09l-7.084-7.124C4.01 21.592 0 27.231 0 29.674c0 4.112 11.501 17.303 28.01 17.303m6.473-17.73a6.446 6.446 0 0 0-6.473-6.454c-.264 0-.53.02-.773.041l7.206 7.206c.02-.244.04-.529.04-.794m-12.966-.041c0 3.582 2.951 6.473 6.514 6.473c.285 0 .55-.02.834-.04l-7.308-7.309c-.02.285-.04.59-.04.876"/>`;const Ee=e.css`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:transparent;color:inherit;height:100%;padding:0 var(${yt.input}-space);width:100%}.input-field.outline,.input-field:focus-within{box-shadow:var(${yt.input}-box-shadow)}.input-field [part=icon]{align-items:center;display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(${yt.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${yt.input}-space)}`,Re=e.css`:host{${yt.input}-width:10em;${yt.input}-height:1.6em;${yt.input}-space:0.2em;${yt.input}-background:var(${yt.background});${yt.input}-control:var(${yt.foreground});${yt.input}-control-edge:var(${yt.active});${yt.input}-radius:0.2em;${yt.input}-box-shadow:0px 0px 0px .1em var(${yt.active});border-radius:var(${yt.input}-radius)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let Te=class SuperInput extends GlobalStyle{constructor(){super(...arguments),this.autofocus=!1,this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return c(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchEvent(new CustomEvent("input",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0})))}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return e.html`<label for="${this.makeId}" part="prefix">${K("prefix")}</label>`}_renderSuffix(){const t="password";return e.html`<label for="${this.makeId}" part="suffix">${"password"===this.type?e.html`<i part="icon" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}">${Ce()}</i>`:K("suffix")}</label>`}};o([B()],Te.prototype,"autocomplete",void 0),o([B({type:Boolean,reflect:!0})],Te.prototype,"disabled",void 0),o([B({reflect:!0})],Te.prototype,"type",void 0),o([B({reflect:!0})],Te.prototype,"placeholder",void 0),o([B({reflect:!0})],Te.prototype,"name",void 0),o([B()],Te.prototype,"value",void 0),o([B()],Te.prototype,"default",void 0),o([G("input")],Te.prototype,"_input",void 0),Te=o([p(Ee,Re)],Te);var Ae=Te;let Pe=class Input extends Ae{constructor(){super(...arguments),this.type="text",this.variant="default"}render(){return e.html`<div part="root" ${W(this.observedRecord)} class="${Z("input-field",this.variant)}">${[this._renderPrefix(),e.html`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||e.nothing}" autocomplete="${this.autocomplete||e.nothing}" placeholder="${this.placeholder||e.nothing}" id="${this.makeId}" @input="${this._handleInput}">`,this._renderSuffix()]}</div>`}reset(){this._input.value=this.default,this.value=this.default}};o([B()],Pe.prototype,"variant",void 0),o([G("input")],Pe.prototype,"_input",void 0),Pe=o([u("input"),p(e.css`:host{background:var(${yt.input}-background);border-radius:var(${yt.input}-radius);color:var(${yt.foreground});display:block;height:var(${yt.input}-height);width:var(${yt.input}-width)}`)],Pe);var Me=Pe;Me.define();let ze=class Layout extends GlobalStyle{constructor(){super(...arguments),this.noHeader=!1,this.noFooter=!1,this.sticky=!1}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${this.noHeader?"":e.html`<header part="header">${K("header")}</header>`}<main part="main">${K()}</main>${this.noFooter?"":e.html`<footer part="footer">${K("footer")}</footer>`}</div>`}};o([B({type:Boolean})],ze.prototype,"noHeader",void 0),o([B({type:Boolean})],ze.prototype,"noFooter",void 0),o([B({type:Boolean})],ze.prototype,"sticky",void 0),ze=o([u("layout"),p(e.css`:host,:host([contents]) [part=root]{display:flex;flex-direction:column;min-height:100%}[part=root]{display:contents}[sticky] header{position:sticky;top:0;z-index:1}[part=main]{flex:1;position:relative;width:100%}footer,header,main{width:100%}`)],ze);var Oe=ze;Oe.define();let Ie=class SuperAnchor extends GlobalStyle{constructor(){super(...arguments),this.href=void 0,this.target="_self"}render(){return e.html`<a part="root" ${W(this.observedRecord)} href="${this.href||e.nothing}" target="${this.target}" @click="${this._handleClick}">${K()}</a>`}_handleClick(t){}};o([B()],Ie.prototype,"href",void 0),o([B()],Ie.prototype,"target",void 0),Ie=o([p(e.css`:host{color:currentColor;cursor:default;display:inline-block;text-decoration:none}:host([href]){cursor:pointer}[part=root]{color:inherit;display:inline-block;text-decoration:inherit;width:100%}`)],Ie);var De,je=Ie;let Be=De=class Router extends GlobalStyle{constructor(){super(...arguments),this.__fieldRouteTree=new RouteTree,this.__slottedRouteTree=new RouteTree,this.__cacheRecord=new Map,this.component=null,this.pathname=location.pathname,this.default=K(),this.type="united",this.cache=!1,this.routeChangeCallback=null,this.handlePopstate=this.events.add(window,"popstate",(()=>{this.pathname=location.pathname}))}get params(){return this.path?RouteTree.parseParams(this.pathname,this.path):{}}set routes(t){this.__routes=t,this.collectFieldRoutes(t)}get routes(){return this.__routes}clear(){this.__cacheRecord.clear()}render(){if(this.cache){const t=this.__cacheRecord.get(this.pathname);if(t)return Object.assign(this,t),this.component}switch(this.type){case"field":this.component=this.fieldComponent();break;case"slotted":this.component=this.slottedComponent();break;default:this.component=this.fieldComponent()??this.slottedComponent()}return this.component??this.default}connectedCallback(){super.connectedCallback(),De.routerInstances.add(this),"field"!==this.type&&(new MutationObserver(this.collectSlottedRoutes).observe(this,{attributeFilter:["slot"],attributes:!0,subtree:!0}),this.collectSlottedRoutes())}disconnectedCallback(){super.disconnectedCallback(),De.routerInstances.delete(this)}useRouter(){return{pathname:this.pathname,params:this.params,path:this.path,component:this.component}}updated(t){if(t.has("pathname")||t.has("path")){const t=this.useRouter(),e=!this.__cacheRecord.has(this.pathname);e&&this.__cacheRecord.set(this.pathname,t),this.routeChangeCallback?.(t,e),this.dispatchEvent(new CustomEvent("change",{detail:t}))}}fieldComponent(t){if(t||=this.__fieldRouteTree.search(this.pathname)?.pattern,this.path=t,!t)return null;const e=this.routes.find((e=>e.path===t));return e?(console.log(this.path),"render"in e?e.render?.(c(this.useRouter(),"component"))||null:e.component):null}slottedComponent(t){const e=this._slottedNames;return t||=this.__slottedRouteTree.search(this.pathname)?.pattern,this.path=t,t?(this.path=e.find((e=>e===t)),this.path?K(this.path):null):null}collectSlottedRoutes(){this.__slottedRouteTree=new RouteTree,this.clear(),this._slottedNames.forEach((t=>{this.__slottedRouteTree.insert(t)}))}collectFieldRoutes(t){this.__fieldRouteTree=new RouteTree,this.clear(),t.forEach((({path:t})=>{this.__fieldRouteTree.insert(t)}))}static updateAll(){this.routerInstances.forEach((t=>{t.handlePopstate()}))}};Be.routerInstances=new Set,o([N()],Be.prototype,"component",void 0),o([N()],Be.prototype,"path",void 0),o([B()],Be.prototype,"pathname",void 0),o([N()],Be.prototype,"default",void 0),o([B()],Be.prototype,"type",void 0),o([B({type:Boolean})],Be.prototype,"cache",void 0),o([N()],Be.prototype,"routes",null),Be=De=o([u("router"),p(e.css`:host{display:contents}`)],Be);var Ne=Be;let Ue=class Link extends je{constructor(){super(...arguments),this.type="normal",this.suppress=!1}_handleClick(t){"push"!==this.type&&"replace"!==this.type||(t.preventDefault(),history[`${this.type}State`](null,"",this.href),this.suppress||Ne.updateAll())}};o([B()],Ue.prototype,"type",void 0),o([B({type:Boolean})],Ue.prototype,"suppress",void 0),Ue=o([u("link")],Ue);var Le=Ue;Le.define();let Ve=class Progress extends GlobalStyle{constructor(){super(...arguments),this.max=1,this.min=0}render(){let t,o=20;return r(this.value)||(o=this.parsePercent(this.value),t="static"),e.html`<div part="root" ${W(this.observedRecord)} class="${t}"><i part="value" style="width:${o}%;"></i></div>`}parsePercent(t="0"){return String(t).includes("%")?parseFloat(String(t)):parseFloat(String(t))/(this.max-this.min)*100}};o([B({type:Number})],Ve.prototype,"max",void 0),o([B({type:Number})],Ve.prototype,"min",void 0),o([B({type:Number})],Ve.prototype,"value",void 0),Ve=o([u("progress"),p(e.css`:host{background:var(${yt.passive});border-radius:.25em;color:var(${yt.active});height:.5em;width:100%}:host,[part=root]{display:block}[part=root]{border-radius:inherit;height:inherit;position:relative;z-index:1}[part=value]{animation:progress 1.8s ease-in-out infinite alternate;background:currentColor;border-radius:inherit;height:100%;left:0;position:absolute;top:0;transition:all .3s;z-index:2}@keyframes progress{0%{left:0}to{left:80%}}.static [part=value]{animation:none}`)],Ve);var Ge=Ve;Ge.define();const He="range",Fe=gt(He);let qe=class Range extends Ae{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this._focusStack=[]}get reverse(){return!!this.range&&this.value[0]>this.value[1]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:o}=this,r=t-o.length;return r>0?new Array(r).fill(e).concat(o):o}render(){const t=this.padValue(2),o=Math.min(...t),r=Math.max(...t),s=this.max-this.min;return e.html`<div part="root" ${W(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${tt({"--from":(o-this.min)/s*100+"%","--to":(r-this.min)/s*100+"%",...this.range?Object.fromEntries(t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/s*100+"%"]))):{}})}"><div part="track"></div>${this.range?this.value.map(((t,e)=>this.renderHandle(e))):this.renderHandle(0)}</div>`}renderHandle(t){const{range:o}=this,r=!o||t===this.value.length-1;return e.html`<i tabindex="0" part="handle" class="${Z({"last-focus":this.lastFocus===t})}" @mousedown="${this.disabled?null:this.createMouseDown(t)}" @focus="${this.disabled?null:()=>this.focusHandle(t)}" @blur="${this.disabled?null:this.blurHandle}" style="z-index:${this._focusStack.indexOf(t)+1};--handle:var(--${!o&&r?"to":`handle-${t}`})"></i>`}focusHandle(t){this.lastFocus=t;const e=this._focusStack.indexOf(t);-1!==e&&this._focusStack.splice(e,1),this._focusStack.push(t);const o=this._handles.item(t);o?.focus(),this._keydownEvent||(this._keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t))),this.dispatchEvent(new CustomEvent("focus",{detail:t}))}blurHandle(){this.lastFocus=void 0,this._keydownEvent=this.events.remove(document,"keydown",this._keydownEvent),this.dispatchEvent(new CustomEvent("blur"))}createKeydownEvent(t){return this.range||(t=0),e=>{"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)((t=>t-this.step))):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)((t=>t+this.step)))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const o="number"==typeof e?this.normalizeValue(e):e(this.rangeValue[t]);let r=o;this.range&&(r=[...this.rangeValue],r[t]=o),this.value=r,this.dispatchEvent(new CustomEvent("range",{detail:this.value}))}}_computeValue(t){const e=this._root.getBoundingClientRect(),o=this.vertical?(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,r=Math.round(o*(this.max-this.min)/this.step)*this.step;return this.normalizeValue(r)}normalizeValue(t){return t>this.max?t-=this.step:t<this.min&&(t+=this.step),t}_handleMousedownRoot(t){const e=this._computeValue(t),o=this.range?this.rangeValue.reduce(((t,o,r)=>Math.abs(e-o)<Math.abs(e-this.rangeValue[t])?r:t),0):0,r=this.createSetValue(o);r(e),this.createMousedownListener(r)(t),this.focusHandle(o)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const o=this.createMousemoveListener(t);this.events.add(document,"mousemove",o);const r=()=>{this.events.remove(document,"mousemove",o),this.events.remove(document,"mouseup",r)};this.events.add(document,"mouseup",r)}}createMousemoveListener(t){return e=>{const o=this._computeValue(e);o>this.max||o<this.min||t?.call(this,o)}}_connectedInit(){const t=this.max-this.min;this.step||=t/100,r(this.value)&&(r(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};o([B({type:Number})],qe.prototype,"min",void 0),o([B({type:Number})],qe.prototype,"max",void 0),o([B({type:Number})],qe.prototype,"step",void 0),o([B({type:Boolean,reflect:!0})],qe.prototype,"vertical",void 0),o([B({type:Array})],qe.prototype,"value",void 0),o([B({type:Array})],qe.prototype,"default",void 0),o([G("root")],qe.prototype,"_root",void 0),o([function(t){return(e,o)=>U(e,o,{get(){return(this.renderRoot??(V??=document.createDocumentFragment())).querySelectorAll(t)}})}("[part=handle]")],qe.prototype,"_handles",void 0),o([N()],qe.prototype,"lastFocus",void 0),qe=o([u(He),p(e.css`:host{${Fe}--handle-active:var(${yt.active});${Fe}--track-width:.5em;${Fe}--length:var(${yt.input}-width);background:var(${yt.input}-background);display:block;width:var(${Fe}--length)}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:var(${Fe}--length);width:-moz-fit-content;width:fit-content}:host(:not([disabled])) .last-focus{${Fe}--handle-scale:1.05;background:var(${Fe}--handle-active)}[part=root]{position:relative;width:100%;--from:0%;--to:50%;height:var(${Fe}--track-width)}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${yt.active});height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=handle],[part=track]{display:flex;position:absolute}[part=handle]{align-items:center;background:var(${yt.active});border:.1em solid;border-color:var(${yt.input}-control);border-radius:50%;height:1em;justify-content:center;transform:scale(var(${Fe}--handle-scale,1)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,e.css`[vertical]{height:inherit;width:var(${Fe}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,e.css`[part=handle]{left:var(--handle);top:0}[vertical] [part=handle]{left:0;top:var(--handle)}`)],qe);var We=qe;We.define();const Ye="rotate",Xe=gt(Ye);let Ze=class Rotate extends GlobalStyle{render(){return e.html`<div part="root"><div part="slot" @mousemove="${this._handleRotate}">${K()}</div><i @mouseleave="${this.reset}"></i></div>`}reset(){this._root.style.removeProperty("transform"),this._root.style.removeProperty("transition")}_handleRotate(t){const{rotateX:e,rotateY:o}=this._computeOffset(t);this._root.style.setProperty("transform",`rotateX(${e}rad) rotateY(${o}rad)`),this._root.style.setProperty("transition","0s")}_computeOffset(t){const{left:e,top:o,width:r,height:s}=this._root.getBoundingClientRect(),{clientX:a,clientY:l}=t;return{rotateX:-(l-o-s/2)/s/2,rotateY:(a-e-r/2)/r/2}}};o([G("root")],Ze.prototype,"_root",void 0),Ze=o([u(Ye),p(e.css`:host{display:block;transition:all .5s ease-in-out;width:-moz-fit-content;width:fit-content;${Xe}--padding:.75em;${Xe}--offset:.5em}div{position:relative;transition:inherit;transition-property:transform}i{box-sizing:content-box;height:100%;margin:calc(var(${Xe}--offset)*-1);padding:var(${Xe}--offset);position:absolute;top:0;width:100%}[part=slot]{z-index:2}`)],Ze);var Ke=Ze;function Qe(t,e){return t&&e&&t.toLowerCase().includes(e.toLowerCase())}function Je(t,e){if(t){const o="checked";e?t.setAttribute(o,""):t.removeAttribute(o)}}Ke.define(),Ne.define();let to=class Select extends Me{constructor(){super(...arguments),this.multiple=!1,this.visible=!1,this.autoDirection="bottom",this._store=[]}render(){return e.html`<div part="root" ${W({...this.observedRecord,direction:this.direction||this.autoDirection})} class="input-field">${[this._renderPrefix(),e.html`<input part="input" type="${this.type}" .value="${this.text}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||e.nothing}" autocomplete="${this.autocomplete||e.nothing}" placeholder="${this.placeholder||e.nothing}" id="${this.makeId}" @focus="${this._handleFocus}" @input="${this._handleInput}">`,e.html`<label for="${this.makeId}" part="suffix"><i part="icon">${re()}</i></label>`,e.html`<label for="${this.makeId}" part="content">${K()}</label>`]}</div>`}_handleFocus(){if(!this.direction){const{top:t,bottom:e}=this.getBoundingClientRect();window.innerHeight-e<this._content.clientHeight&&t>this._content.clientHeight?this.autoDirection="top":this.autoDirection="bottom"}this.visible=!0}firstUpdated(){this.events.add(this._content,"click",(t=>{t.preventDefault(),t.stopPropagation();const{target:e}=t,o=this.optionValue(e);if(o){const t=this.select(o,e.textContent);this.multiple||Je(this.lastChecked,0),Je(e,t),this.lastChecked=e}this._input.focus()})),this.events.add(document,"click",(t=>{t.stopPropagation();const e=t.composedPath()[0];e&&!this.shadowRoot.contains(e)&&this.blur()}))}_connectedInit(){if(!this.value){const t=[...this.querySelectorAll("[checked]")];(this.multiple?t:t.length?[this.lastChecked=t[0]]:[]).forEach((t=>{Je(t,this.select(this.optionValue(t),t.textContent))})),this.default=this.value,this.defaultText=this.text,this.defaultChecked=t}this.text||(this.text="")}reset(){this.value=this.default,this.text=this.defaultText,this.querySelectorAll("[checked]").forEach((t=>Je(t,0))),this.defaultChecked.forEach((t=>Je(t,1)))}select(t,e){e||=t;let o=0;if(this.multiple){const r=this._store.findIndex((e=>e.value===t));r>-1?this._store.splice(r,1):(this._store.push({value:t,text:e}),o=1),this.value=this._store.map((t=>t.value)),this.text=this._store.map((t=>t.text)).join(", ")}else this.value===t?(this.value="",this.text=""):(this.value=t,this.text=e,o=1);return this.dispatchEvent(new CustomEvent("select",{detail:this.value,composed:!0})),this.filter(),o}filter(t){t=t?.trim(),[...this.children].forEach((e=>{this.filterCallback(e,!t||Qe(this.optionValue(e),t)||Qe(e.textContent,t),t)}))}filterCallback(t,e,o){t.style.display=e?"":"none"}_handleInput(t){if(t.stopPropagation(),this.compositing)return;const e=this._input.value;this.filter(this.multiple?function(t,e){const o=e.slice(0,t).lastIndexOf(",")+1||0,r=e.indexOf(",",t)||e.length;return e.slice(o,r)}(this._input.selectionStart,e):e),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0}))}focus(t){this._input.focus(t),this.visible=!0}blur(){this._input.blur(),this.visible=!1,super.blur()}optionValue(t){return t.value||t.getAttribute("value")||""}};o([B()],to.prototype,"text",void 0),o([G("content")],to.prototype,"_content",void 0),o([B()],to.prototype,"direction",void 0),o([B({type:Boolean})],to.prototype,"multiple",void 0),o([B({type:Boolean})],to.prototype,"visible",void 0),o([N()],to.prototype,"autoDirection",void 0),to=o([u("select"),p(e.css`[part=input]{text-overflow:ellipsis}[part=content]{position:absolute;visibility:hidden;width:100%}[direction=bottom] [part=content]{top:100%}[direction=top] [part=content]{bottom:100%}[visible] [part=content]{visibility:visible}`)],to);var eo=to;eo.define();var oo=it("0 0 56 56")`<path fill="currentColor" d="M7.715 49.574h40.57c4.899 0 7.36-2.437 7.36-7.265V13.69c0-4.828-2.461-7.265-7.36-7.265H7.715C2.84 6.426.355 8.84.355 13.69v28.62c0 4.851 2.485 7.265 7.36 7.265m31.57-21.633c-1.055-.937-2.25-1.43-3.515-1.43c-1.313 0-2.462.446-3.54 1.407l-10.593 9.469l-4.336-3.938c-.985-.867-2.04-1.336-3.164-1.336c-1.032 0-2.04.446-3 1.313L4.129 39.73V13.88c0-2.438 1.312-3.68 3.656-3.68h40.43c2.32 0 3.656 1.242 3.656 3.68v25.875Zm-21.469.258c3.024 0 5.508-2.484 5.508-5.531c0-3.023-2.484-5.531-5.508-5.531c-3.046 0-5.53 2.508-5.53 5.531a5.54 5.54 0 0 0 5.53 5.531"/>`;const io="skeleton",ro=gt(io);let so=class Skeleton extends GlobalStyle{constructor(){super(...arguments),this.animation="position",this.loading=!0}render(){return this.loading?e.html`<div part="root" ${W(this.observedRecord)}>${"image"===this.type?oo():""} ${K("loading")}</div>`:K()}};o([B()],so.prototype,"type",void 0),o([B()],so.prototype,"animation",void 0),o([N()],so.prototype,"loading",void 0),so=o([u(io),p(e.css`:host{${ro}--from:var(${yt._colors.darkgray[9]});${ro}--to:var(${yt._colors.darkgray[7]});${ro}--deg:95deg;${ro}--duration:1.5s;${ro}--icon-size:5em;${ro}--icon-margin:.25em;background:var(${ro}--from);color:var(${yt._colors.darkgray[5]});display:block;flex-shrink:0;min-height:1.5em;overflow:hidden;width:100%}[part=root]{animation:var(${ro}--duration) ease-in-out 0s infinite none running;height:100%;min-height:inherit;text-align:center}svg{--size:var(${ro}--icon-size);font-size:var(--size);margin:calc(var(--size)*.05)}[animation=position]{animation-name:po;background-color:transparent;background-image:linear-gradient(var(${ro}--deg),var(${ro}--from) 36%,var(${ro}--to) 50%,var(${ro}--from) 64%);background-size:200% 100%}@keyframes po{0%{background-position:150%}to{background-position:-50%}}[animation=opacity]{animation-direction:alternate;animation-name:op}@keyframes op{50%{opacity:.25}to{opacity:1}}`)],so);var no=so;no.define();const ao="split",lo=gt(ao);let ho=class Split extends Ae{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${((t,e)=>{const o=new Array(t);for(let r=0;r<t;r++)o[r]=e(r);return o})(this.len,(t=>e.html`<span part="input-box" class="${Z({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};o([B({type:Number})],ho.prototype,"len",void 0),o([B({type:Number})],ho.prototype,"index",void 0),o([N()],ho.prototype,"current",void 0),o([N()],ho.prototype,"currentValue",void 0),ho=o([u(ao),p(e.css`:host{border-radius:1px;color:var(${yt.foreground});display:block;width:-moz-fit-content;width:fit-content;${lo}--size:1.45em;${lo}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${lo}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${yt.input}-background);height:var(${lo}--size);text-align:center;width:var(${lo}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${yt.input}-box-shadow)}`)],ho);var co=ho;co.define();const po="switch",uo=gt(po);let vo=class Switch extends Ae{constructor(){super(...arguments),this.round=!1,this.checked=!1,this.disabled=!1,this.default="false",this.value="on"}render(){return e.html`<div part="root" ${W(this.observedRecord)} class="${this.round?"round":"rect"}"><input part="input" type="checkbox" ?disabled="${this.disabled}" ?checked="${this.checked}" name="${this.name}" id="${this.makeId}" @change="${this._handleChange}"> <span part="handle" class="${this.checked}"></span></div>`}reset(){this.checked="true"===this.default,this._input.checked=this.checked}connectedCallback(){super.connectedCallback(),this.checked&&(this.default="true"),"true"===this.default&&(this.checked=!0)}_handleChange(){this.checked=this._input.checked,this.dispatchEvent(new CustomEvent("change",{detail:this.checked,composed:!0}))}namevalue(){return[this.name,this.checked]}};o([B({type:Boolean,reflect:!0})],vo.prototype,"round",void 0),o([B({type:Boolean,reflect:!0})],vo.prototype,"checked",void 0),o([B({type:Boolean,reflect:!0})],vo.prototype,"disabled",void 0),o([B()],vo.prototype,"default",void 0),o([B()],vo.prototype,"value",void 0),o([L("input")],vo.prototype,"_input",void 0),vo=o([u(po),p(e.css`:host,:host([contents]) [part=root]{display:inline-block;height:var(${uo}-height);width:var(${uo}-width)}:host{${uo}-width:3em;${uo}-height:calc(var(${uo}-width)/2);${uo}-handle-size:1.25em;${uo}-handle-space:.125em;${uo}-transition:.2s ease-in-out;background:var(${yt.input}-background);border-radius:0;vertical-align:bottom}[part=handle],[part=root]{transition:var(${uo}-transition)}[part=root]{border-radius:inherit;height:inherit;position:relative}[part=input]{-webkit-appearance:none;appearance:none;height:100%;opacity:0;width:100%}[part=handle]{align-items:center;border-radius:inherit;display:inline-flex;height:100%;justify-content:center;left:0;pointer-events:none;position:absolute;width:50%}:host([round]){background:var(${yt.passive});border-radius:calc(var(${uo}-height)/2)}:host([checked]) [part=handle]{left:50%}.rect .true{background:var(${yt.active})}.rect .false{background:var(${yt.passive})}.round [part=handle]{--size:var(${uo}-handle-size);background:var(--godown--input-control);border-radius:100%;height:var(--size);margin:var(${uo}-handle-space);width:var(--size)}:host([checked]) .round{background:var(${yt.active})}`)],vo);var mo=vo;mo.define();const fo="text",go=gt(fo);let yo=class Text extends GlobalStyle{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return e.html`<span part="root" ${W(this.observedRecord)} class="${Z(this.underline)}">${K()}</span>`}};o([B()],yo.prototype,"underline",void 0),o([B({type:Boolean})],yo.prototype,"clip",void 0),yo=o([u(fo),p(e.css`:host{${go}--color:currentColor;${go}--color-hover:currentColor;${go}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${go}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${go}--color-hover,var(${go}--color))}[part=root]:active{color:var(${go}--color-active,var(${go}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${yt.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],yo);var bo=yo;function $o(t,e=2){return t.toString().padStart(e,"0").split("")}bo.define();let wo=class Time extends GlobalStyle{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss UTFZ",this.time=new Date}render(){return e.html`<span part="root" ${W(this.observedRecord)}>${function(t,e=new Date,o="%"){var r;if(!t)return t;if(isNaN(e.getTime()))return;const s=`${o}${o}`,a=[];t=t.replace(new RegExp(`${o}([ZYMDhmsS${o}])`,"g"),((t,e)=>(a.push(e),s)));const l=e.getTimezoneOffset()/-60,h={Z:[l>=0?"+"+l.toString():l.toString()],Y:e.getFullYear().toString().split(""),M:$o(e.getMonth()+1),D:$o(e.getDate()),h:$o(e.getHours()),m:$o(e.getMinutes()),s:$o(e.getSeconds()),S:$o(e.getMilliseconds(),3)},c=[];for(const e of t.split("").reverse()){const t=null===(r=h[e])||void 0===r?void 0:r.pop();t?c.push(t):c.push(e)}return c.reverse().join("").replace(new RegExp(s,"g"),(()=>a.shift()))}(this.format,this.time,this.escape)}</span>`}firstUpdated(){this.timeout&&(this.timeoutId=this.startTimeout())}updated(t){t.has("timeout")&&(clearInterval(this.timeoutId),this.timeout&&(this.timeoutId=this.startTimeout()))}disconnectedCallback(){clearInterval(this.timeoutId)}startTimeout(){return setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))}};o([B()],wo.prototype,"escape",void 0),o([B()],wo.prototype,"format",void 0),o([B({type:Object})],wo.prototype,"time",void 0),o([B({type:Number})],wo.prototype,"timeout",void 0),o([B({type:Number})],wo.prototype,"gap",void 0),wo=o([u("time"),p(e.css`:host{text-align:center}`)],wo);var _o,ko=wo;ko.define();const xo="tooltip",So=gt(xo);let Co=_o=class Tooltip extends SuperOpenable{constructor(){super(...arguments),this.direction="top",this.align="center",this.propagation=!1,this.type="hover"}render(){const t=_o.aligns[this.align]||"inherit",o="focus"===this.type;return e.html`<div part="root" ${W(this.observedRecord)} tabindex="${o?0:-1}" @focus="${o?()=>this.open=!0:null}" @blur="${o?()=>this.open=!1:null}" @mouseenter="${o?null:()=>this.open=!0}" @mouseleave="${o?null:()=>this.open=!1}" style="justify-content:${t};align-items:${t}">${K()}<div part="tip">${this.tip?e.html`<span class="passive">${this.tip}</span>`:K("tip")}</div></div>`}};Co.aligns={start:"flex-start",end:"flex-end",center:"center","flex-start":"flex-start","flex-end":"flex-end"},o([B()],Co.prototype,"tip",void 0),o([B()],Co.prototype,"direction",void 0),o([B()],Co.prototype,"align",void 0),o([B({type:Boolean})],Co.prototype,"propagation",void 0),o([B()],Co.prototype,"type",void 0),Co=_o=o([u(xo),p(e.css`:host{${So}--tip-background:inherit;width:-moz-fit-content;width:fit-content}:host,[part=root]{display:inline-flex}[part=root]{border-radius:inherit;position:relative;transition:inherit}[part=tip]{height:-moz-fit-content;height:fit-content;position:absolute;transition:inherit;-webkit-user-select:none;user-select:none;visibility:hidden;width:-moz-fit-content;width:fit-content}:host([open]) [part=tip]{visibility:visible}.passive{background:var(${So}--tip-background)}[propagation] [part=tip]{pointer-events:none}`,e.css`[direction^=top] [part=tip]{bottom:100%}[direction^=bottom] [part=tip]{top:100%}[direction$=right] [part=tip]{left:100%}[direction$=left] [part=tip]{right:100%}`)],Co);var Eo=Co;Eo.define();const Ro="typewriter",To=gt(Ro);let Ao=class Typewriter extends GlobalStyle{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return e.html`<div part="root" ${W(this.observedRecord)}>${K()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||((t=0,e=1)=>{const o=Math.max(t,e),r=Math.min(t,e);return Math.random()*(o-r)+r})(this.max,this.min);this.timeoutID=setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e)}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};o([B()],Ao.prototype,"content",void 0),o([B({type:Boolean})],Ao.prototype,"ended",void 0),o([B({type:Number})],Ao.prototype,"max",void 0),o([B({type:Number})],Ao.prototype,"min",void 0),o([B({type:Number})],Ao.prototype,"delay",void 0),o([B({type:Number})],Ao.prototype,"index",void 0),o([N()],Ao.prototype,"contentInternal",void 0),o([L("i")],Ao.prototype,"_i",void 0),Ao=o([u(Ro),p(e.css`:host{${To}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${To}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],Ao);var Po=Ao;Po.define(),t.Alert=At,t.Avatar=Ot,t.Badge=Bt,t.Breath=Vt,t.Button=Xt,t.Card=Jt,t.Carousel=ie,t.Details=le,t.Dialog=pe,t.Divider=ve,t.Dragbox=fe,t.Flex=be,t.Form=we,t.Grid=ke,t.Heading=Se,t.Input=Me,t.Layout=Oe,t.Link=Le,t.Progress=Ge,t.Range=We,t.Rotate=Ke,t.Router=Ne,t.Select=eo,t.Skeleton=no,t.Split=co,t.Switch=mo,t.Text=bo,t.Time=ko,t.Tooltip=Eo,t.Typewriter=Po}));
|
48
48
|
//# sourceMappingURL=godown.umd.js.map
|