(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();function c(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const D=o=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(o,e)})):customElements.define(o,e)};/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Rt=globalThis,Yr=Rt.ShadowRoot&&(Rt.ShadyCSS===void 0||Rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xr=Symbol(),To=new WeakMap;let di=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Xr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Yr&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=To.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&To.set(t,e))}return e}toString(){return this.cssText}};const ln=o=>new di(typeof o=="string"?o:o+"",void 0,Xr),C=(o,...e)=>{const t=o.length===1?o[0]:e.reduce(((r,i,n)=>r+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new di(t,o,Xr)},cn=(o,e)=>{if(Yr)o.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const r=document.createElement("style"),i=Rt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,o.appendChild(r)}},Io=Yr?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return ln(t)})(o):o;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:dn,defineProperty:un,getOwnPropertyDescriptor:hn,getOwnPropertyNames:pn,getOwnPropertySymbols:mn,getPrototypeOf:fn}=Object,Vt=globalThis,So=Vt.trustedTypes,vn=So?So.emptyScript:"",gn=Vt.reactiveElementPolyfillSupport,Ye=(o,e)=>o,Lt={toAttribute(o,e){switch(e){case Boolean:o=o?vn:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Zr=(o,e)=>!dn(o,e),Ro={attribute:!0,type:String,converter:Lt,reflect:!1,useDefault:!1,hasChanged:Zr};Symbol.metadata??=Symbol("metadata"),Vt.litPropertyMetadata??=new WeakMap;let Oe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ro){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&un(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:n}=hn(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const s=i?.call(this);n?.call(this,a),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ro}static _$Ei(){if(this.hasOwnProperty(Ye("elementProperties")))return;const e=fn(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ye("properties"))){const t=this.properties,r=[...pn(t),...mn(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Io(i))}else e!==void 0&&t.push(Io(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return cn(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:Lt).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Lt;this._$Em=i;const s=a.fromAttribute(t,n.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??Zr)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:n},a){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),n!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:a}=n,s=this[i];a!==!0||this._$AL.has(i)||s===void 0||this.C(i,void 0,n,s)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Oe.elementStyles=[],Oe.shadowRootOptions={mode:"open"},Oe[Ye("elementProperties")]=new Map,Oe[Ye("finalized")]=new Map,gn?.({ReactiveElement:Oe}),(Vt.reactiveElementVersions??=[]).push("2.1.1");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const bn={attribute:!0,type:String,converter:Lt,reflect:!1,hasChanged:Zr},yn=(o=bn,e,t)=>{const{kind:r,metadata:i}=t;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(t.name,o),r==="accessor"){const{name:a}=t;return{set(s){const l=e.get.call(this);e.set.call(this,s),this.requestUpdate(a,l,o)},init(s){return s!==void 0&&this.C(a,void 0,o,s),s}}}if(r==="setter"){const{name:a}=t;return function(s){const l=this[a];e.call(this,s),this.requestUpdate(a,l,o)}}throw Error("Unsupported decorator location: "+r)};function h(o){return(e,t)=>typeof t=="object"?yn(o,e,t):((r,i,n)=>{const a=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),a?Object.getOwnPropertyDescriptor(i,n):void 0})(o,e,t)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function F(o){return h({...o,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Wt=(o,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(o,e,t),t);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function L(o,e){return(t,r,i)=>{const n=a=>a.renderRoot?.querySelector(o)??null;return Wt(t,r,{get(){return n(this)}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let xn;function _n(o){return(e,t)=>Wt(e,t,{get(){return(this.renderRoot??(xn??=document.createDocumentFragment())).querySelectorAll(o)}})}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function me(o){return(e,t)=>{const{slot:r,selector:i}=o??{},n="slot"+(r?`[name=${r}]`:":not([name])");return Wt(e,t,{get(){const a=this.renderRoot?.querySelector(n),s=a?.assignedElements(o)??[];return i===void 0?s:s.filter((l=>l.matches(i)))}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function wn(o){return(e,t)=>{const{slot:r}=o??{},i="slot"+(r?`[name=${r}]`:":not([name])");return Wt(e,t,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(o)??[]}})}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Jr=globalThis,Ot=Jr.trustedTypes,Lo=Ot?Ot.createPolicy("lit-html",{createHTML:o=>o}):void 0,ui="$lit$",ge=`lit$${Math.random().toFixed(9).slice(2)}$`,hi="?"+ge,kn=`<${hi}>`,Ee=document,et=()=>Ee.createComment(""),tt=o=>o===null||typeof o!="object"&&typeof o!="function",Qr=Array.isArray,En=o=>Qr(o)||typeof o?.[Symbol.iterator]=="function",tr=`[ 	
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oo=/-->/g,Po=/>/g,xe=RegExp(`>|${tr}(?:([^\\s"'>=/]+)(${tr}*=${tr}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),zo=/'/g,Bo=/"/g,pi=/^(?:script|style|textarea|title)$/i,$n=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),y=$n(1),X=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Mo=new WeakMap,_e=Ee.createTreeWalker(Ee,129);function mi(o,e){if(!Qr(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lo!==void 0?Lo.createHTML(e):e}const An=(o,e)=>{const t=o.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",a=Ne;for(let s=0;s<t;s++){const l=o[s];let d,u,p=-1,f=0;for(;f<l.length&&(a.lastIndex=f,u=a.exec(l),u!==null);)f=a.lastIndex,a===Ne?u[1]==="!--"?a=Oo:u[1]!==void 0?a=Po:u[2]!==void 0?(pi.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=xe):u[3]!==void 0&&(a=xe):a===xe?u[0]===">"?(a=i??Ne,p=-1):u[1]===void 0?p=-2:(p=a.lastIndex-u[2].length,d=u[1],a=u[3]===void 0?xe:u[3]==='"'?Bo:zo):a===Bo||a===zo?a=xe:a===Oo||a===Po?a=Ne:(a=xe,i=void 0);const v=a===xe&&o[s+1].startsWith("/>")?" ":"";n+=a===Ne?l+kn:p>=0?(r.push(d),l.slice(0,p)+ui+l.slice(p)+ge+v):l+ge+(p===-2?s:v)}return[mi(o,n+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let mr=class fi{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let n=0,a=0;const s=e.length-1,l=this.parts,[d,u]=An(e,t);if(this.el=fi.createElement(d,r),_e.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=_e.nextNode())!==null&&l.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ui)){const f=u[a++],v=i.getAttribute(p).split(ge),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:g[2],strings:v,ctor:g[1]==="."?Tn:g[1]==="?"?In:g[1]==="@"?Sn:jt}),i.removeAttribute(p)}else p.startsWith(ge)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(pi.test(i.tagName)){const p=i.textContent.split(ge),f=p.length-1;if(f>0){i.textContent=Ot?Ot.emptyScript:"";for(let v=0;v<f;v++)i.append(p[v],et()),_e.nextNode(),l.push({type:2,index:++n});i.append(p[f],et())}}}else if(i.nodeType===8)if(i.data===hi)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(ge,p+1))!==-1;)l.push({type:7,index:n}),p+=ge.length-1}n++}}static createElement(e,t){const r=Ee.createElement("template");return r.innerHTML=e,r}};function Be(o,e,t=o,r){if(e===X)return e;let i=r!==void 0?t._$Co?.[r]:t._$Cl;const n=tt(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=i:t._$Cl=i),i!==void 0&&(e=Be(o,i._$AS(o,e.values),i,r)),e}let Cn=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??Ee).importNode(t,!0);_e.currentNode=i;let n=_e.nextNode(),a=0,s=0,l=r[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new nt(n,n.nextSibling,this,e):l.type===1?d=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(d=new Rn(n,this,e)),this._$AV.push(d),l=r[++s]}a!==l?.index&&(n=_e.nextNode(),a++)}return _e.currentNode=Ee,i}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}};class nt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Be(this,e,t),tt(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==X&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):En(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&tt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ee.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=mr.createElement(mi(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new Cn(i,this),a=n.u(this.options);n.p(t),this.T(a),this._$AH=n}}_$AC(e){let t=Mo.get(e.strings);return t===void 0&&Mo.set(e.strings,t=new mr(e)),t}k(e){Qr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,i=0;for(const n of e)i===t.length?t.push(r=new nt(this.O(et()),this.O(et()),this,this.options)):r=t[i],r._$AI(n),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let jt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=m}_$AI(e,t=this,r,i){const n=this.strings;let a=!1;if(n===void 0)e=Be(this,e,t,0),a=!tt(e)||e!==this._$AH&&e!==X,a&&(this._$AH=e);else{const s=e;let l,d;for(e=n[0],l=0;l<n.length-1;l++)d=Be(this,s[r+l],t,l),d===X&&(d=this._$AH[l]),a||=!tt(d)||d!==this._$AH[l],d===m?e=m:e!==m&&(e+=(d??"")+n[l+1]),this._$AH[l]=d}a&&!i&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class Tn extends jt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}}let In=class extends jt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}},Sn=class extends jt{constructor(e,t,r,i,n){super(e,t,r,i,n),this.type=5}_$AI(e,t=this){if((e=Be(this,e,t,0)??m)===X)return;const r=this._$AH,i=e===m&&r!==m||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==m&&(r===m||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Rn=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}};const Ln=Jr.litHtmlPolyfillSupport;Ln?.(mr,nt),(Jr.litHtmlVersions??=[]).push("3.3.1");const vi=(o,e,t)=>{const r=t?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=t?.renderBefore??null;r._$litPart$=i=new nt(e.insertBefore(et(),n),n,void 0,t??{})}return i._$AI(o),i};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const eo=globalThis;let I=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=vi(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}};I._$litElement$=!0,I.finalized=!0,eo.litElementHydrateSupport?.({LitElement:I});const On=eo.litElementPolyfillSupport;On?.({LitElement:I});(eo.litElementVersions??=[]).push("4.2.1");/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Pn extends I{render(){return y`<slot></slot>`}connectedCallback(){if(super.connectedCallback(),this.getAttribute("aria-hidden")==="false"){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const zn=C`:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let fr=class extends Pn{};fr.styles=[zn];fr=c([D("md-icon")],fr);/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Bn extends I{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return y`<span class="shadow"></span>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Mn=C`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let vr=class extends Bn{};vr.styles=[Mn];vr=c([D("md-elevation")],vr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const gi=Symbol("attachableController");let bi;bi=new MutationObserver(o=>{for(const e of o)e.target[gi]?.hostConnected()});class yi{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){e===null?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[gi]=this,bi?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Dn=["focusin","focusout","pointerdown"];class to extends I{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new yi(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[Do]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1;break}e[Do]=!0}}onControlChange(e,t){for(const r of Dn)e?.removeEventListener(r,this),t?.addEventListener(r,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}c([h({type:Boolean,reflect:!0})],to.prototype,"visible",void 0);c([h({type:Boolean,reflect:!0})],to.prototype,"inward",void 0);const Do=Symbol("handledByFocusRing");/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Nn=C`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let gr=class extends to{};gr.styles=[Nn];gr=c([D("md-focus-ring")],gr);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const ve={ATTRIBUTE:1,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},ro=o=>(...e)=>({_$litDirective$:o,values:e});let oo=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const J=ro(class extends oo{constructor(o){if(super(o),o.type!==ve.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((e=>o[e])).join(" ")+" "}update(o,[e]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const t=o.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return X}});/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ne={STANDARD:"cubic-bezier(0.2, 0, 0, 1)",EMPHASIZED:"cubic-bezier(.3,0,0,1)",EMPHASIZED_ACCELERATE:"cubic-bezier(.3,0,.8,.15)"};function Fn(){let o=null;return{start(){return o?.abort(),o=new AbortController,o.signal},finish(){o=null}}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const qn=450,No=225,Hn=.2,Un=10,Vn=75,Wn=.35,jn="::after",Kn="forwards";var W;(function(o){o[o.INACTIVE=0]="INACTIVE",o[o.TOUCH_DELAY=1]="TOUCH_DELAY",o[o.HOLDING=2]="HOLDING",o[o.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(W||(W={}));const Gn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],Yn=150,Xn=window.matchMedia("(forced-colors: active)");class at extends I{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=W.INACTIVE,this.attachableController=new yi(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return y`<div class="surface ${J(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==W.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state===W.HOLDING){this.state=W.WAITING_FOR_CLICK;return}if(this.state===W.TOUCH_DELAY){this.state=W.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e)){this.state=W.WAITING_FOR_CLICK,this.startPressAnimation(e);return}this.state=W.TOUCH_DELAY,await new Promise(t=>{setTimeout(t,Yn)}),this.state===W.TOUCH_DELAY&&(this.state=W.HOLDING,this.startPressAnimation(e))}}handleClick(){if(!this.disabled){if(this.state===W.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===W.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||this.endPressAnimation()}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),r=Math.max(e,t),i=Math.max(Wn*r,Vn),n=this.currentCSSZoom??1,a=Math.floor(r*Hn/n),l=Math.sqrt(t**2+e**2)+Un;this.initialSize=a;const d=(l+i)/a;this.rippleScale=`${d/n}`,this.rippleSize=`${a}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:r}=window,{left:i,top:n}=this.getBoundingClientRect(),a=t+i,s=r+n,{pageX:l,pageY:d}=e,u=this.currentCSSZoom??1;return{x:(l-a)/u,y:(d-s)/u}}getTranslationCoordinates(e){const{height:t,width:r}=this.getBoundingClientRect(),i=this.currentCSSZoom??1,n={x:(r/i-this.initialSize)/2,y:(t/i-this.initialSize)/2};let a;return e instanceof PointerEvent?a=this.getNormalizedPointerEventCoords(e):a={x:r/i/2,y:t/i/2},a={x:a.x-this.initialSize/2,y:a.y-this.initialSize/2},{startPoint:a,endPoint:n}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:r}=this.getTranslationCoordinates(e),i=`${t.x}px, ${t.y}px`,n=`${r.x}px, ${r.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${i}) scale(1)`,`translate(${n}) scale(${this.rippleScale})`]},{pseudoElement:jn,duration:qn,easing:ne.STANDARD,fill:Kn})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=W.INACTIVE;const e=this.growAnimation;let t=1/0;if(typeof e?.currentTime=="number"?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=No){this.pressed=!1;return}await new Promise(r=>{setTimeout(r,No-t)}),this.growAnimation===e&&(this.pressed=!1)}shouldReactToEvent(e){if(this.disabled||!e.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if(e.type==="pointerenter"||e.type==="pointerleave")return!this.isTouch(e);const t=e.buttons===1;return this.isTouch(e)||t}isTouch({pointerType:e}){return e==="touch"}async handleEvent(e){if(!Xn?.matches)switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e);break}}onControlChange(e,t){for(const r of Gn)e?.removeEventListener(r,this),t?.addEventListener(r,this)}}c([h({type:Boolean,reflect:!0})],at.prototype,"disabled",void 0);c([F()],at.prototype,"hovered",void 0);c([F()],at.prototype,"pressed",void 0);c([L(".surface")],at.prototype,"mdRoot",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Zn=C`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let br=class extends at{};br.styles=[Zn];br=c([D("md-ripple")],br);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const xi=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],Jn=xi.map(_i);function rr(o){return Jn.includes(o)}function _i(o){return o.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const pt=Symbol("privateIgnoreAttributeChangesFor");function Ae(o){var e;class t extends o{constructor(){super(...arguments),this[e]=new Set}attributeChangedCallback(i,n,a){if(!rr(i)){super.attributeChangedCallback(i,n,a);return}if(this[pt].has(i))return;this[pt].add(i),this.removeAttribute(i),this[pt].delete(i);const s=xr(i);a===null?delete this.dataset[s]:this.dataset[s]=a,this.requestUpdate(xr(i),n)}getAttribute(i){return rr(i)?super.getAttribute(yr(i)):super.getAttribute(i)}removeAttribute(i){super.removeAttribute(i),rr(i)&&(super.removeAttribute(yr(i)),this.requestUpdate())}}return e=pt,Qn(t),t}function Qn(o){for(const e of xi){const t=_i(e),r=yr(t),i=xr(t);o.createProperty(e,{attribute:t,noAccessor:!0}),o.createProperty(Symbol(r),{attribute:r,noAccessor:!0}),Object.defineProperty(o.prototype,e,{configurable:!0,enumerable:!0,get(){return this.dataset[i]??null},set(n){const a=this.dataset[i]??null;n!==a&&(n===null?delete this.dataset[i]:this.dataset[i]=n,this.requestUpdate(e,a))}})}}function yr(o){return`data-${o}`}function xr(o){return o.replace(/-\w/,e=>e[1].toUpperCase())}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const q=Symbol("internals"),or=Symbol("privateInternals");function st(o){class e extends o{get[q](){return this[or]||(this[or]=this.attachInternals()),this[or]}}return e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function wi(o){o.addInitializer(e=>{const t=e;t.addEventListener("click",async r=>{const{type:i,[q]:n}=t,{form:a}=n;if(!(!a||i==="button")&&(await new Promise(s=>{setTimeout(s)}),!r.defaultPrevented)){if(i==="reset"){a.reset();return}a.addEventListener("submit",s=>{Object.defineProperty(s,"submitter",{configurable:!0,enumerable:!0,get:()=>t})},{capture:!0,once:!0}),n.setFormValue(t.value),a.requestSubmit()}})})}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function ki(o){const e=new MouseEvent("click",{bubbles:!0});return o.dispatchEvent(e),e}function io(o){return o.currentTarget!==o.target||o.composedPath()[0]!==o.target||o.target.disabled?!1:!ea(o)}function ea(o){const e=_r;return e&&(o.preventDefault(),o.stopImmediatePropagation()),ta(),e}let _r=!1;async function ta(){_r=!0,await null,_r=!1}/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ra=Ae(st(I));class H extends ra{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[q].form}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.href="",this.download="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.addEventListener("click",this.handleClick.bind(this))}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled||this.softDisabled,t=this.href?this.renderLink():this.renderButton(),r=this.href?"link":"button";return y`
      ${this.renderElevationOrOutline?.()}
      <div class="background"></div>
      <md-focus-ring part="focus-ring" for=${r}></md-focus-ring>
      <md-ripple
        part="ripple"
        for=${r}
        ?disabled="${e}"></md-ripple>
      ${t}
    `}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return y`<button
      id="button"
      class="button"
      ?disabled=${this.disabled}
      aria-disabled=${this.softDisabled||m}
      aria-label="${e||m}"
      aria-haspopup="${t||m}"
      aria-expanded="${r||m}">
      ${this.renderContent()}
    </button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:r}=this;return y`<a
      id="link"
      class="button"
      aria-label="${e||m}"
      aria-haspopup="${t||m}"
      aria-expanded="${r||m}"
      aria-disabled=${this.disabled||this.softDisabled||m}
      tabindex="${this.disabled&&!this.softDisabled?-1:m}"
      href=${this.href}
      download=${this.download||m}
      target=${this.target||m}
      >${this.renderContent()}
    </a>`}renderContent(){const e=y`<slot
      name="icon"
      @slotchange="${this.handleSlotChange}"></slot>`;return y`
      <span class="touch"></span>
      ${this.trailingIcon?m:e}
      <span class="label"><slot></slot></span>
      ${this.trailingIcon?e:m}
    `}handleClick(e){if(this.softDisabled||this.disabled&&this.href){e.stopImmediatePropagation(),e.preventDefault();return}!io(e)||!this.buttonElement||(this.focus(),ki(this.buttonElement))}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}wi(H);H.formAssociated=!0;H.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],H.prototype,"disabled",void 0);c([h({type:Boolean,attribute:"soft-disabled",reflect:!0})],H.prototype,"softDisabled",void 0);c([h()],H.prototype,"href",void 0);c([h()],H.prototype,"download",void 0);c([h()],H.prototype,"target",void 0);c([h({type:Boolean,attribute:"trailing-icon",reflect:!0})],H.prototype,"trailingIcon",void 0);c([h({type:Boolean,attribute:"has-icon",reflect:!0})],H.prototype,"hasIcon",void 0);c([h()],H.prototype,"type",void 0);c([h({reflect:!0})],H.prototype,"value",void 0);c([L(".button")],H.prototype,"buttonElement",void 0);c([me({slot:"icon",flatten:!0})],H.prototype,"assignedIcons",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class oa extends H{renderElevationOrOutline(){return y`<md-elevation part="elevation"></md-elevation>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ia=C`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const na=C`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const no=C`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let wr=class extends oa{};wr.styles=[no,na,ia];wr=c([D("md-filled-button")],wr);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class aa extends H{renderElevationOrOutline(){return y`<div class="outline"></div>`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const sa=C`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let kr=class extends aa{};kr.styles=[no,sa];kr=c([D("md-outlined-button")],kr);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class la extends H{}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ca=C`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Er=class extends la{};Er.styles=[no,ca];Er=c([D("md-text-button")],Er);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function ao(o,e){e.bubbles&&(!o.shadowRoot||e.composed)&&e.stopPropagation();const t=Reflect.construct(e.constructor,[e.type,e]),r=o.dispatchEvent(t);return r||e.preventDefault(),r}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const rt=Symbol("createValidator"),ot=Symbol("getValidityAnchor"),ir=Symbol("privateValidator"),ue=Symbol("privateSyncValidity"),mt=Symbol("privateCustomValidationMessage");function so(o){var e;class t extends o{constructor(){super(...arguments),this[e]=""}get validity(){return this[ue](),this[q].validity}get validationMessage(){return this[ue](),this[q].validationMessage}get willValidate(){return this[ue](),this[q].willValidate}checkValidity(){return this[ue](),this[q].checkValidity()}reportValidity(){return this[ue](),this[q].reportValidity()}setCustomValidity(i){this[mt]=i,this[ue]()}requestUpdate(i,n,a){super.requestUpdate(i,n,a),this[ue]()}firstUpdated(i){super.firstUpdated(i),this[ue]()}[(e=mt,ue)](){this[ir]||(this[ir]=this[rt]());const{validity:i,validationMessage:n}=this[ir].getValidity(),a=!!this[mt],s=this[mt]||n;this[q].setValidity({...i,customError:a},s,this[ot]()??void 0)}[rt](){throw new Error("Implement [createValidator]")}[ot](){throw new Error("Implement [getValidityAnchor]")}}return t}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ze=Symbol("getFormValue"),Pt=Symbol("getFormState");function lo(o){class e extends o{get form(){return this[q].form}get labels(){return this[q].labels}get name(){return this.getAttribute("name")??""}set name(r){this.setAttribute("name",r)}get disabled(){return this.hasAttribute("disabled")}set disabled(r){this.toggleAttribute("disabled",r)}attributeChangedCallback(r,i,n){if(r==="name"||r==="disabled"){const a=r==="disabled"?i!==null:i;this.requestUpdate(r,a);return}super.attributeChangedCallback(r,i,n)}requestUpdate(r,i,n){super.requestUpdate(r,i,n),this[q].setFormValue(this[ze](),this[Pt]())}[ze](){throw new Error("Implement [getFormValue]")}[Pt](){return this[ze]()}formDisabledCallback(r){this.disabled=r}}return e.formAssociated=!0,c([h({noAccessor:!0})],e.prototype,"name",null),c([h({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class co{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:r,validationMessage:i}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:i,validity:{badInput:r.badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing}},this.currentValidity}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class da extends co{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ua=Ae(so(lo(st(I))));class le extends ua{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",e=>{!io(e)||!this.input||(this.focus(),ki(this.input))})}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,r=this.prevIndeterminate,i=this.checked&&!this.indeterminate,n=this.indeterminate,a=J({disabled:this.disabled,selected:i||n,unselected:!i&&!n,checked:i,indeterminate:n,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":r,"prev-disabled":this.prevDisabled}),{ariaLabel:s,ariaInvalid:l}=this;return y`
      <div class="container ${a}">
        <input
          type="checkbox"
          id="input"
          aria-checked=${n?"mixed":m}
          aria-label=${s||m}
          aria-invalid=${l||m}
          ?disabled=${this.disabled}
          ?required=${this.required}
          .indeterminate=${this.indeterminate}
          .checked=${this.checked}
          @input=${this.handleInput}
          @change=${this.handleChange} />

        <div class="outline"></div>
        <div class="background"></div>
        <md-focus-ring part="focus-ring" for="input"></md-focus-ring>
        <md-ripple for="input" ?disabled=${this.disabled}></md-ripple>
        <svg class="icon" viewBox="0 0 18 18" aria-hidden="true">
          <rect class="mark short" />
          <rect class="mark long" />
        </svg>
      </div>
    `}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){ao(this,e)}[ze](){return!this.checked||this.indeterminate?null:this.value}[Pt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new da(()=>this)}[ot](){return this.input}}le.shadowRootOptions={...I.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean})],le.prototype,"checked",void 0);c([h({type:Boolean})],le.prototype,"indeterminate",void 0);c([h({type:Boolean})],le.prototype,"required",void 0);c([h()],le.prototype,"value",void 0);c([F()],le.prototype,"prevChecked",void 0);c([F()],le.prototype,"prevDisabled",void 0);c([F()],le.prototype,"prevIndeterminate",void 0);c([L("input")],le.prototype,"input",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ha=C`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}
`;/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let $r=class extends le{};$r.styles=[ha];$r=c([D("md-checkbox")],$r);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Kt extends I{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}}c([h({type:Boolean,reflect:!0})],Kt.prototype,"inset",void 0);c([h({type:Boolean,reflect:!0,attribute:"inset-start"})],Kt.prototype,"insetStart",void 0);c([h({type:Boolean,reflect:!0,attribute:"inset-end"})],Kt.prototype,"insetEnd",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const pa=C`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Ar=class extends Kt{};Ar.styles=[pa];Ar=c([D("md-divider")],Ar);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ma={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:ne.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:ne.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},fa={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:ne.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:ne.EMPHASIZED_ACCELERATE,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const va=Ae(I);class B extends va{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute("open",""),this.show()):(this.removeAttribute("open"),this.close()))}constructor(){super(),this.quick=!1,this.returnValue="",this.noFocusTrap=!1,this.getOpenAnimation=()=>ma,this.getCloseAnimation=()=>fa,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event("open",{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),this.querySelector("[autofocus]")?.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;const t=this.dialog;if(!t.open||this.isOpening){this.open=!1;return}const r=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event("close",{cancelable:!0}))){this.returnValue=r;return}await this.animateDialog(this.getCloseAnimation()),t.close(e),this.open=!1,this.dispatchEvent(new Event("closed"))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){const e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),t={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},r=this.open&&!this.noFocusTrap,i=y`
      <div
        class="focus-trap"
        tabindex="0"
        aria-hidden="true"
        @focus=${this.handleFocusTrapFocus}></div>
    `,{ariaLabel:n}=this;return y`
      <div class="scrim"></div>
      <dialog
        class=${J(t)}
        aria-label=${n||m}
        aria-labelledby=${this.hasHeadline?"headline":m}
        role=${this.type==="alert"?"alertdialog":m}
        @cancel=${this.handleCancel}
        @click=${this.handleDialogClick}
        @close=${this.handleClose}
        @keydown=${this.handleKeydown}
        .returnValue=${this.returnValue||m}>
        ${r?i:m}
        <div class="container" @click=${this.handleContentClick}>
          <div class="headline">
            <div class="icon" aria-hidden="true">
              <slot name="icon" @slotchange=${this.handleIconChange}></slot>
            </div>
            <h2 id="headline" aria-hidden=${!this.hasHeadline||m}>
              <slot
                name="headline"
                @slotchange=${this.handleHeadlineChange}></slot>
            </h2>
            <md-divider></md-divider>
          </div>
          <div class="scroller">
            <div class="content">
              <div class="top anchor"></div>
              <slot name="content"></slot>
              <div class="bottom anchor"></div>
            </div>
          </div>
          <div class="actions">
            <md-divider></md-divider>
            <slot name="actions" @slotchange=${this.handleActionsChange}></slot>
          </div>
        </div>
        ${r?i:m}
      </dialog>
    `}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const t=e.target,{submitter:r}=e;t.getAttribute("method")!=="dialog"||!r||this.close(r.getAttribute("value")??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const t=!ao(this,e);e.preventDefault(),!t&&this.close()}handleClose(){this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,this.dialog?.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){e.key==="Escape"&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:t,scrim:r,container:i,headline:n,content:a,actions:s}=this;if(!t||!r||!i||!n||!a||!s)return;const{container:l,dialog:d,scrim:u,headline:p,content:f,actions:v}=e,g=[[t,d??[]],[r,u??[]],[i,l??[]],[n,p??[]],[a,f??[]],[s,v??[]]],b=[];for(const[A,T]of g)for(const E of T){const z=A.animate(...E);this.cancelAnimations.signal.addEventListener("abort",()=>{z.cancel()}),b.push(z)}await Promise.all(b.map(A=>A.finished.catch(()=>{})))}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){const{target:t,isIntersecting:r}=e;t===this.topAnchor&&(this.isAtScrollTop=r),t===this.bottomAnchor&&(this.isAtScrollBottom=r)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){const[t,r]=this.getFirstAndLastFocusableChildren();if(!t||!r){this.dialog?.focus();return}const i=e.target===this.firstFocusTrap,n=!i,a=e.relatedTarget===t,s=e.relatedTarget===r,l=!a&&!s;if(n&&s||i&&l){t.focus();return}if(i&&a||n&&l){r.focus();return}}getFirstAndLastFocusableChildren(){if(!this.treewalker)return[null,null];let e=null,t=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){const r=this.treewalker.currentNode;ga(r)&&(e||(e=r),t=r)}return[e,t]}}c([h({type:Boolean})],B.prototype,"open",null);c([h({type:Boolean})],B.prototype,"quick",void 0);c([h({attribute:!1})],B.prototype,"returnValue",void 0);c([h()],B.prototype,"type",void 0);c([h({type:Boolean,attribute:"no-focus-trap"})],B.prototype,"noFocusTrap",void 0);c([L("dialog")],B.prototype,"dialog",void 0);c([L(".scrim")],B.prototype,"scrim",void 0);c([L(".container")],B.prototype,"container",void 0);c([L(".headline")],B.prototype,"headline",void 0);c([L(".content")],B.prototype,"content",void 0);c([L(".actions")],B.prototype,"actions",void 0);c([F()],B.prototype,"isAtScrollTop",void 0);c([F()],B.prototype,"isAtScrollBottom",void 0);c([L(".scroller")],B.prototype,"scroller",void 0);c([L(".top.anchor")],B.prototype,"topAnchor",void 0);c([L(".bottom.anchor")],B.prototype,"bottomAnchor",void 0);c([L(".focus-trap")],B.prototype,"firstFocusTrap",void 0);c([F()],B.prototype,"hasHeadline",void 0);c([F()],B.prototype,"hasActions",void 0);c([F()],B.prototype,"hasIcon",void 0);function ga(o){const e=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",t=":not(:disabled,[disabled])";return o.matches(e+t+':not([tabindex^="-"])')?!0:!o.localName.includes("-")||!o.matches(t)?!1:o.shadowRoot?.delegatesFocus??!1}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ba=C`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Cr=class extends B{};Cr.styles=[ba];Cr=c([D("md-dialog")],Cr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ya=Ae(I);class lt extends ya{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return y`
      <button
        class="fab ${J(this.getRenderClasses())}"
        aria-label=${e||m}>
        <md-elevation part="elevation"></md-elevation>
        <md-focus-ring part="focus-ring"></md-focus-ring>
        <md-ripple class="ripple"></md-ripple>
        ${this.renderTouchTarget()} ${this.renderIcon()} ${this.renderLabel()}
      </button>
    `}getRenderClasses(){const e=!!this.label;return{lowered:this.lowered,small:this.size==="small"&&!e,large:this.size==="large"&&!e,extended:e}}renderTouchTarget(){return y`<div class="touch-target"></div>`}renderLabel(){return this.label?y`<span class="label">${this.label}</span>`:""}renderIcon(){const{ariaLabel:e}=this;return y`<span class="icon">
      <slot
        name="icon"
        aria-hidden=${e||this.label?"true":m}>
        <span></span>
      </slot>
    </span>`}}lt.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({reflect:!0})],lt.prototype,"size",void 0);c([h()],lt.prototype,"label",void 0);c([h({type:Boolean})],lt.prototype,"lowered",void 0);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Ei extends lt{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}c([h()],Ei.prototype,"variant",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const xa=C`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const _a=C`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const wa=C`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Tr=class extends Ei{};Tr.styles=[wa,xa,_a];Tr=c([D("md-fab")],Tr);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ka=C`:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}
`;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const $i=Symbol.for(""),Ea=o=>{if(o?.r===$i)return o?._$litStatic$},we=(o,...e)=>({_$litStatic$:e.reduce(((t,r,i)=>t+(n=>{if(n._$litStatic$!==void 0)return n._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${n}. Use 'unsafeStatic' to pass non-literal values, but
            take care to ensure page security.`)})(r)+o[i+1]),o[0]),r:$i}),Fo=new Map,$a=o=>(e,...t)=>{const r=t.length;let i,n;const a=[],s=[];let l,d=0,u=!1;for(;d<r;){for(l=e[d];d<r&&(n=t[d],(i=Ea(n))!==void 0);)l+=i+e[++d],u=!0;d!==r&&s.push(n),a.push(l),d++}if(d===r&&a.push(e[r]),u){const p=a.join("$$lit$$");(e=Fo.get(p))===void 0&&(a.raw=a,Fo.set(p,e=a)),t=s}return o(e,...t)},uo=$a(y);/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function qo(o,e=!0){return e&&getComputedStyle(o).getPropertyValue("direction").trim()==="rtl"}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Aa=Ae(st(I));class U extends Aa{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[q].form}get labels(){return this[q].labels}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.flipIconInRtl=!1,this.href="",this.download="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=qo(this,this.flipIconInRtl),this.addEventListener("click",this.handleClick.bind(this))}willUpdate(){this.href&&(this.disabled=!1,this.softDisabled=!1)}render(){const e=this.href?we`div`:we`button`,{ariaLabel:t,ariaHasPopup:r,ariaExpanded:i}=this,n=t&&this.ariaLabelSelected,a=this.toggle?this.selected:m;let s=m;return this.href||(s=n&&this.selected?this.ariaLabelSelected:t),uo`<${e}
        class="icon-button ${J(this.getRenderClasses())}"
        id="button"
        aria-label="${s||m}"
        aria-haspopup="${!this.href&&r||m}"
        aria-expanded="${!this.href&&i||m}"
        aria-pressed="${a}"
        aria-disabled=${!this.href&&this.softDisabled||m}
        ?disabled="${!this.href&&this.disabled}"
        @click="${this.handleClickOnChild}">
        ${this.renderFocusRing()}
        ${this.renderRipple()}
        ${this.selected?m:this.renderIcon()}
        ${this.selected?this.renderSelectedIcon():m}
        ${this.href?this.renderLink():this.renderTouchTarget()}
  </${e}>`}renderLink(){const{ariaLabel:e}=this;return y`
      <a
        class="link"
        id="link"
        href="${this.href}"
        download="${this.download||m}"
        target="${this.target||m}"
        aria-label="${e||m}">
        ${this.renderTouchTarget()}
      </a>
    `}getRenderClasses(){return{"flip-icon":this.flipIcon,selected:this.toggle&&this.selected}}renderIcon(){return y`<span class="icon"><slot></slot></span>`}renderSelectedIcon(){return y`<span class="icon icon--selected"
      ><slot name="selected"><slot></slot></slot
    ></span>`}renderTouchTarget(){return y`<span class="touch"></span>`}renderFocusRing(){return y`<md-focus-ring
      part="focus-ring"
      for=${this.href?"link":"button"}></md-focus-ring>`}renderRipple(){const e=!this.href&&(this.disabled||this.softDisabled);return y`<md-ripple
      for=${this.href?"link":m}
      ?disabled="${e}"></md-ripple>`}connectedCallback(){this.flipIcon=qo(this,this.flipIconInRtl),super.connectedCallback()}handleClick(e){if(!this.href&&this.softDisabled){e.stopImmediatePropagation(),e.preventDefault();return}}async handleClickOnChild(e){await 0,!(!this.toggle||this.disabled||this.softDisabled||e.defaultPrevented)&&(this.selected=!this.selected,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}}wi(U);U.formAssociated=!0;U.shadowRootOptions={mode:"open",delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],U.prototype,"disabled",void 0);c([h({type:Boolean,attribute:"soft-disabled",reflect:!0})],U.prototype,"softDisabled",void 0);c([h({type:Boolean,attribute:"flip-icon-in-rtl"})],U.prototype,"flipIconInRtl",void 0);c([h()],U.prototype,"href",void 0);c([h()],U.prototype,"download",void 0);c([h()],U.prototype,"target",void 0);c([h({attribute:"aria-label-selected"})],U.prototype,"ariaLabelSelected",void 0);c([h({type:Boolean})],U.prototype,"toggle",void 0);c([h({type:Boolean,reflect:!0})],U.prototype,"selected",void 0);c([h()],U.prototype,"type",void 0);c([h({reflect:!0})],U.prototype,"value",void 0);c([F()],U.prototype,"flipIcon",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ai=C`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{display:grid;height:100%;outline:none;place-items:center;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Ir=class extends U{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};Ir.styles=[Ai,ka];Ir=c([D("md-filled-icon-button")],Ir);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ca=C`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Sr=class extends U{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};Sr.styles=[Ai,Ca];Sr=c([D("md-icon-button")],Sr);/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ci="important",Ta=" !"+Ci,Rr=ro(class extends oo{constructor(o){if(super(o),o.type!==ve.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((e,t)=>{const r=o[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(o,[e]){const{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(Ta);r.includes("-")||n?t.setProperty(r,n?i.slice(0,-11):i,n?Ci:""):t[r]=i}}return X}});/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Ti(o,e=ce){const t=Gt(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ii(o,e=ce){const t=Si(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ia(o,e=ce){const t=Xe(o,e);return t&&(t.item.tabIndex=-1),t}function Xe(o,e=ce){for(let t=0;t<o.length;t++){const r=o[t];if(r.tabIndex===0&&e(r))return{item:r,index:t}}return null}function Gt(o,e=ce){for(const t of o)if(e(t))return t;return null}function Si(o,e=ce){for(let t=o.length-1;t>=0;t--){const r=o[t];if(e(r))return r}return null}function Sa(o,e,t=ce,r=!0){for(let i=1;i<o.length;i++){const n=(i+e)%o.length;if(n<e&&!r)return null;const a=o[n];if(t(a))return a}return o[e]?o[e]:null}function Ra(o,e,t=ce,r=!0){for(let i=1;i<o.length;i++){const n=(e-i+o.length)%o.length;if(n>e&&!r)return null;const a=o[n];if(t(a))return a}return o[e]?o[e]:null}function Ho(o,e,t=ce,r=!0){if(e){const i=Sa(o,e.index,t,r);return i&&(i.tabIndex=0,i.focus()),i}else return Ti(o,t)}function Uo(o,e,t=ce,r=!0){if(e){const i=Ra(o,e.index,t,r);return i&&(i.tabIndex=0,i.focus()),i}else return Ii(o,t)}function ft(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function La(){return new Event("request-activation",{bubbles:!0,composed:!0})}function ce(o){return!o.disabled}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const V={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Oa{constructor(e){this.handleKeydown=u=>{const p=u.key;if(u.defaultPrevented||!this.isNavigableKey(p))return;const f=this.items;if(!f.length)return;const v=Xe(f,this.isActivatable);u.preventDefault();const g=this.isRtl(),b=g?V.ArrowRight:V.ArrowLeft,A=g?V.ArrowLeft:V.ArrowRight;let T=null;switch(p){case V.ArrowDown:case A:T=Ho(f,v,this.isActivatable,this.wrapNavigation());break;case V.ArrowUp:case b:T=Uo(f,v,this.isActivatable,this.wrapNavigation());break;case V.Home:T=Ti(f,this.isActivatable);break;case V.End:T=Ii(f,this.isActivatable);break}T&&v&&v.item!==T&&(v.item.tabIndex=-1)},this.onDeactivateItems=()=>{const u=this.items;for(const p of u)this.deactivateItem(p)},this.onRequestActivation=u=>{this.onDeactivateItems();const p=u.target;this.activateItem(p),p.focus()},this.onSlotchange=()=>{const u=this.items;let p=!1;for(const v of u){if(!v.disabled&&v.tabIndex>-1&&!p){p=!0,v.tabIndex=0;continue}v.tabIndex=-1}if(p)return;const f=Gt(u,this.isActivatable);f&&(f.tabIndex=0)};const{isItem:t,getPossibleItems:r,isRtl:i,deactivateItem:n,activateItem:a,isNavigableKey:s,isActivatable:l,wrapNavigation:d}=e;this.isItem=t,this.getPossibleItems=r,this.isRtl=i,this.deactivateItem=n,this.activateItem=a,this.isNavigableKey=s,this.isActivatable=l,this.wrapNavigation=d??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const r of e){if(this.isItem(r)){t.push(r);continue}const n=r.item;n&&this.isItem(n)&&t.push(n)}return t}activateNextItem(){const e=this.items,t=Xe(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ho(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=Xe(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Uo(e,t,this.isActivatable,this.wrapNavigation())}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */function Pa(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Vo=Pa;function za(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function nr(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const fe={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},Ze={SPACE:"Space",ENTER:"Enter"},Lr={CLICK_SELECTION:"click-selection",KEYDOWN:"keydown"},Or={ESCAPE:"Escape",SPACE:Ze.SPACE,ENTER:Ze.ENTER};function Ri(o){return Object.values(Or).some(e=>e===o)}function Wo(o,e){const t=new Event("md-contains",{bubbles:!0,composed:!0});let r=[];const i=a=>{r=a.composedPath()};return e.addEventListener("md-contains",i),o.dispatchEvent(t),e.removeEventListener("md-contains",i),r.length>0}const Se={NONE:"none",LIST_ROOT:"list-root",FIRST_ITEM:"first-item",LAST_ITEM:"last-item"};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const zt={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class Ba{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:r,surfaceCorner:i,positioning:n,xOffset:a,yOffset:s,disableBlockFlip:l,disableInlineFlip:d,repositionStrategy:u}=this.getProperties(),p=r.toLowerCase().trim(),f=i.toLowerCase().trim();if(!e||!t)return;const v=window.innerWidth,g=window.innerHeight,b=document.createElement("div");b.style.opacity="0",b.style.position="fixed",b.style.display="block",b.style.inset="0",document.body.appendChild(b);const A=b.getBoundingClientRect();b.remove();const T=window.innerHeight-A.bottom,E=window.innerWidth-A.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const z=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),N=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[R,Y]=f.split("-"),[K,ye]=p.split("-"),ut=getComputedStyle(e).direction==="ltr";let{blockInset:Te,blockOutOfBoundsCorrection:oe,surfaceBlockProperty:Ao}=this.calculateBlock({surfaceRect:z,anchorRect:N,anchorBlock:K,surfaceBlock:R,yOffset:s,positioning:n,windowInnerHeight:g,blockScrollbarHeight:T});if(oe&&!l){const Qt=R==="start"?"end":"start",er=K==="start"?"end":"start",de=this.calculateBlock({surfaceRect:z,anchorRect:N,anchorBlock:er,surfaceBlock:Qt,yOffset:s,positioning:n,windowInnerHeight:g,blockScrollbarHeight:T});oe>de.blockOutOfBoundsCorrection&&(Te=de.blockInset,oe=de.blockOutOfBoundsCorrection,Ao=de.surfaceBlockProperty)}let{inlineInset:ht,inlineOutOfBoundsCorrection:Ie,surfaceInlineProperty:Co}=this.calculateInline({surfaceRect:z,anchorRect:N,anchorInline:ye,surfaceInline:Y,xOffset:a,positioning:n,isLTR:ut,windowInnerWidth:v,inlineScrollbarWidth:E});if(Ie&&!d){const Qt=Y==="start"?"end":"start",er=ye==="start"?"end":"start",de=this.calculateInline({surfaceRect:z,anchorRect:N,anchorInline:er,surfaceInline:Qt,xOffset:a,positioning:n,isLTR:ut,windowInnerWidth:v,inlineScrollbarWidth:E});Math.abs(Ie)>Math.abs(de.inlineOutOfBoundsCorrection)&&(ht=de.inlineInset,Ie=de.inlineOutOfBoundsCorrection,Co=de.surfaceInlineProperty)}u==="move"&&(Te=Te-oe,ht=ht-Ie),this.surfaceStylesInternal={display:"block",opacity:"1",[Ao]:`${Te}px`,[Co]:`${ht}px`},u==="resize"&&(oe&&(this.surfaceStylesInternal.height=`${z.height-oe}px`),Ie&&(this.surfaceStylesInternal.width=`${z.width-Ie}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:r,anchorBlock:i,surfaceBlock:n,yOffset:a,positioning:s,windowInnerHeight:l,blockScrollbarHeight:d}=e,u=s==="fixed"||s==="document"?1:0,p=s==="document"?1:0,f=n==="start"?1:0,v=n==="end"?1:0,b=(i!==n?1:0)*r.height+a,A=f*r.top+v*(l-r.bottom-d),T=f*window.scrollY-v*window.scrollY,E=Math.abs(Math.min(0,l-A-b-t.height));return{blockInset:u*A+p*T+b,blockOutOfBoundsCorrection:E,surfaceBlockProperty:n==="start"?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:r,anchorInline:i,anchorRect:n,surfaceRect:a,xOffset:s,positioning:l,windowInnerWidth:d,inlineScrollbarWidth:u}=e,p=l==="fixed"||l==="document"?1:0,f=l==="document"?1:0,v=t?1:0,g=t?0:1,b=r==="start"?1:0,A=r==="end"?1:0,E=(i!==r?1:0)*n.width+s,z=b*n.left+A*(d-n.right-u),N=b*(d-n.right-u)+A*n.left,R=v*z+g*N,Y=b*window.scrollX-A*window.scrollX,K=A*window.scrollX-b*window.scrollX,ye=v*Y+g*K,ut=Math.abs(Math.min(0,d-R-E-a.width)),Te=p*R+E+f*ye;let oe=r==="start"?"inset-inline-start":"inset-inline-end";return(l==="document"||l==="fixed")&&(r==="start"&&t||r==="end"&&!t?oe="left":oe="right"),{inlineInset:Te,inlineOutOfBoundsCorrection:ut,surfaceInlineProperty:oe}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[a,s]of Object.entries(e))if(t=t||s!==this.lastValues[a],t)break;const r=this.lastValues.isOpen!==e.isOpen,i=!!e.anchorEl,n=!!e.surfaceEl;t&&i&&n&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):r&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ee={INDEX:0,ITEM:1,TEXT:2};class Ma{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=t=>{this.isTypingAhead?this.typeahead(t):this.beginTypeahead(t)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code==="Space"||e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((t,r)=>[r,t,t.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(t=>t[ee.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1);return}e.code==="Space"&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[ee.INDEX]:-1,r=this.typeaheadRecords.length,i=l=>(l[ee.INDEX]+r-t)%r,n=this.typeaheadRecords.filter(l=>!l[ee.ITEM].disabled&&l[ee.TEXT].startsWith(this.typaheadBuffer)).sort((l,d)=>i(l)-i(d));if(n.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.endTypeahead();return}const a=this.typaheadBuffer.length===1;let s;this.lastActiveRecord===n[0]&&a?s=n[1]??n[0]:s=n[0],this.lastActiveRecord&&(this.lastActiveRecord[ee.ITEM].tabIndex=-1),this.lastActiveRecord=s,s[ee.ITEM].tabIndex=0,s[ee.ITEM].focus()}}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Da=200,Li=new Set([V.ArrowDown,V.ArrowUp,V.Home,V.End]),Na=new Set([V.ArrowLeft,V.ArrowRight,...Li]);function Fa(o=document){let e=o.activeElement;for(;e&&e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}class O extends I{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.noHorizontalFlip=!1,this.noVerticalFlip=!1,this.typeaheadDelay=Da,this.anchorCorner=zt.END_START,this.menuCorner=zt.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Se.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=Fn(),this.listController=new Oa({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return Na.has(e);const r=getComputedStyle(this).direction==="rtl"?V.ArrowLeft:V.ArrowRight;return e===r?!0:Li.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Ma(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Ba(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,disableBlockFlip:this.noVerticalFlip,disableInlineFlip:this.noHorizontalFlip,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(Wo(e.relatedTarget,this)||this.pointerPath.length!==0&&Wo(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const r=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=r},this.onOpened=async()=>{this.lastFocusedElement=Fa();const e=this.items,t=Xe(e);t&&this.defaultFocus!==Se.NONE&&(t.item.tabIndex=-1);let r=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):r=!!await this.animateOpen(),this.defaultFocus){case Se.FIRST_ITEM:const i=Gt(e);i&&(i.tabIndex=0,i.focus(),await i.updateComplete);break;case Se.LAST_ITEM:const n=Si(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case Se.LIST_ROOT:this.focus();break;default:case Se.NONE:break}r||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has("open")){if(this.open){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&this.positioning==="popover"&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return y`
      <div
        class="menu ${J(this.getSurfaceClasses())}"
        style=${Rr(this.menuPositionController.surfaceStyles)}
        popover=${this.positioning==="popover"?"manual":m}>
        ${this.renderElevation()}
        <div class="items">
          <div class="item-padding"> ${this.renderMenuItems()} </div>
        </div>
      </div>
    `}renderMenuItems(){return y`<slot
      @close-menu=${this.onCloseMenu}
      @deactivate-items=${this.onDeactivateItems}
      @request-activation=${this.onRequestActivation}
      @deactivate-typeahead=${this.handleDeactivateTypeahead}
      @activate-typeahead=${this.handleActivateTypeahead}
      @stay-open-on-focusout=${this.handleStayOpenOnFocusout}
      @close-on-focusout=${this.handleCloseOnFocusout}
      @slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return y`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning==="fixed","has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Ri(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const r=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const i=this.openCloseAnimationSignal.start(),n=e.offsetHeight,a=r==="UP",s=this.items,l=500,d=50,u=250,p=(l-u)/s.length,f=e.animate([{height:"0px"},{height:`${n}px`}],{duration:l,easing:ne.EMPHASIZED}),v=t.animate([{transform:a?`translateY(-${n}px)`:""},{transform:""}],{duration:l,easing:ne.EMPHASIZED}),g=e.animate([{opacity:0},{opacity:1}],d),b=[];for(let E=0;E<s.length;E++){const z=a?s.length-1-E:E,N=s[z],R=N.animate([{opacity:0},{opacity:1}],{duration:u,delay:p*E});N.classList.toggle("md-menu-hidden",!0),R.addEventListener("finish",()=>{N.classList.toggle("md-menu-hidden",!1)}),b.push([N,R])}let A=E=>{};const T=new Promise(E=>{A=E});return i.addEventListener("abort",()=>{f.cancel(),v.cancel(),g.cancel(),b.forEach(([E,z])=>{E.classList.toggle("md-menu-hidden",!1),z.cancel()}),A(!0)}),f.addEventListener("finish",()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),A(!1)}),await T}animateClose(){let e;const t=new Promise(R=>{e=R}),r=this.surfaceEl,i=this.slotEl;if(!r||!i)return e(!1),t;const a=this.openDirection==="UP";this.dispatchEvent(new Event("closing")),r.classList.toggle("animating",!0);const s=this.openCloseAnimationSignal.start(),l=r.offsetHeight,d=this.items,u=150,p=50,f=u-p,v=50,g=50,b=.35,A=(u-g-v)/d.length,T=r.animate([{height:`${l}px`},{height:`${l*b}px`}],{duration:u,easing:ne.EMPHASIZED_ACCELERATE}),E=i.animate([{transform:""},{transform:a?`translateY(-${l*(1-b)}px)`:""}],{duration:u,easing:ne.EMPHASIZED_ACCELERATE}),z=r.animate([{opacity:1},{opacity:0}],{duration:p,delay:f}),N=[];for(let R=0;R<d.length;R++){const Y=a?R:d.length-1-R,K=d[Y],ye=K.animate([{opacity:1},{opacity:0}],{duration:v,delay:g+A*R});ye.addEventListener("finish",()=>{K.classList.toggle("md-menu-hidden",!0)}),N.push([K,ye])}return s.addEventListener("abort",()=>{T.cancel(),E.cancel(),z.cancel(),N.forEach(([R,Y])=>{Y.cancel(),R.classList.toggle("md-menu-hidden",!1)}),e(!1)}),T.addEventListener("finish",()=>{r.classList.toggle("animating",!1),N.forEach(([R])=>{R.classList.toggle("md-menu-hidden",!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown),document.addEventListener("resize",this.onWindowResize,{passive:!0}),window.addEventListener("resize",this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown),document.removeEventListener("resize",this.onWindowResize),window.removeEventListener("resize",this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(t=>{t.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}}c([L(".menu")],O.prototype,"surfaceEl",void 0);c([L("slot")],O.prototype,"slotEl",void 0);c([h()],O.prototype,"anchor",void 0);c([h()],O.prototype,"positioning",void 0);c([h({type:Boolean})],O.prototype,"quick",void 0);c([h({type:Boolean,attribute:"has-overflow"})],O.prototype,"hasOverflow",void 0);c([h({type:Boolean,reflect:!0})],O.prototype,"open",void 0);c([h({type:Number,attribute:"x-offset"})],O.prototype,"xOffset",void 0);c([h({type:Number,attribute:"y-offset"})],O.prototype,"yOffset",void 0);c([h({type:Boolean,attribute:"no-horizontal-flip"})],O.prototype,"noHorizontalFlip",void 0);c([h({type:Boolean,attribute:"no-vertical-flip"})],O.prototype,"noVerticalFlip",void 0);c([h({type:Number,attribute:"typeahead-delay"})],O.prototype,"typeaheadDelay",void 0);c([h({attribute:"anchor-corner"})],O.prototype,"anchorCorner",void 0);c([h({attribute:"menu-corner"})],O.prototype,"menuCorner",void 0);c([h({type:Boolean,attribute:"stay-open-on-outside-click"})],O.prototype,"stayOpenOnOutsideClick",void 0);c([h({type:Boolean,attribute:"stay-open-on-focusout"})],O.prototype,"stayOpenOnFocusout",void 0);c([h({type:Boolean,attribute:"skip-restore-focus"})],O.prototype,"skipRestoreFocus",void 0);c([h({attribute:"default-focus"})],O.prototype,"defaultFocus",void 0);c([h({type:Boolean,attribute:"no-navigation-wrap"})],O.prototype,"noNavigationWrap",void 0);c([me({flatten:!0})],O.prototype,"slotItems",void 0);c([F()],O.prototype,"typeaheadActive",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const qa=C`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:var(--md-menu-top-space, 8px) var(--md-menu-bottom-space, 8px)}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Pr=class extends O{};Pr.styles=[qa];Pr=c([D("md-menu")],Pr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ho extends I{constructor(){super(...arguments),this.multiline=!1}render(){return y`
      <slot name="container"></slot>
      <slot class="non-text" name="start"></slot>
      <div class="text">
        <slot name="overline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          class="default-slot"
          @slotchange=${this.handleTextSlotChange}></slot>
        <slot name="headline" @slotchange=${this.handleTextSlotChange}></slot>
        <slot
          name="supporting-text"
          @slotchange=${this.handleTextSlotChange}></slot>
      </div>
      <slot class="non-text" name="trailing-supporting-text"></slot>
      <slot class="non-text" name="end"></slot>
    `}handleTextSlotChange(){let e=!1,t=0;for(const r of this.textSlots)if(Ha(r)&&(t+=1),t>1){e=!0;break}this.multiline=e}}c([h({type:Boolean,reflect:!0})],ho.prototype,"multiline",void 0);c([_n(".text slot")],ho.prototype,"textSlots",void 0);function Ha(o){for(const e of o.assignedNodes({flatten:!0})){const t=e.nodeType===Node.ELEMENT_NODE,r=e.nodeType===Node.TEXT_NODE&&e.textContent?.match(/\S/);if(t||r)return!0}return!1}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ua=C`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let zr=class extends ho{};zr.styles=[Ua];zr=c([D("md-item")],zr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Va{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Vo(this.host,{kind:Lr.CLICK_SELECTION}))},this.onKeydown=r=>{if(this.host.href&&r.code==="Enter"){const n=this.getInteractiveElement();n instanceof HTMLAnchorElement&&n.click()}if(r.defaultPrevented)return;const i=r.code;this.host.keepOpen&&i!=="Escape"||Ri(i)&&(r.preventDefault(),this.host.dispatchEvent(Vo(this.host,{kind:Lr.KEYDOWN,key:i})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(r=>{r.textContent&&r.textContent.trim()&&t.push(r.textContent.trim())}),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:case"menuitem":case"option":return"li"}}get role(){return this.host.type==="option"?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Wa=Ae(I);class G extends Wa{constructor(){super(...arguments),this.disabled=!1,this.type="menuitem",this.href="",this.target="",this.keepOpen=!1,this.selected=!1,this.menuItemController=new Va(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.menuItemController.typeaheadText}set typeaheadText(e){this.menuItemController.setTypeaheadText(e)}render(){return this.renderListItem(y`
      <md-item>
        <div slot="container">
          ${this.renderRipple()} ${this.renderFocusRing()}
        </div>
        <slot name="start" slot="start"></slot>
        <slot name="end" slot="end"></slot>
        ${this.renderBody()}
      </md-item>
    `)}renderListItem(e){const t=this.type==="link";let r;switch(this.menuItemController.tagName){case"a":r=we`a`;break;case"button":r=we`button`;break;default:case"li":r=we`li`;break}const i=t&&this.target?this.target:m;return uo`
      <${r}
        id="item"
        tabindex=${this.disabled&&!t?-1:0}
        role=${this.menuItemController.role}
        aria-label=${this.ariaLabel||m}
        aria-selected=${this.ariaSelected||m}
        aria-checked=${this.ariaChecked||m}
        aria-expanded=${this.ariaExpanded||m}
        aria-haspopup=${this.ariaHasPopup||m}
        class="list-item ${J(this.getRenderClasses())}"
        href=${this.href||m}
        target=${i}
        @click=${this.menuItemController.onClick}
        @keydown=${this.menuItemController.onKeydown}
      >${e}</${r}>
    `}renderRipple(){return y` <md-ripple
      part="ripple"
      for="item"
      ?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return y` <md-focus-ring
      part="focus-ring"
      for="item"
      inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return y`
      <slot></slot>
      <slot name="overline" slot="overline"></slot>
      <slot name="headline" slot="headline"></slot>
      <slot name="supporting-text" slot="supporting-text"></slot>
      <slot
        name="trailing-supporting-text"
        slot="trailing-supporting-text"></slot>
    `}focus(){this.listItemRoot?.focus()}}G.shadowRootOptions={...I.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],G.prototype,"disabled",void 0);c([h()],G.prototype,"type",void 0);c([h()],G.prototype,"href",void 0);c([h()],G.prototype,"target",void 0);c([h({type:Boolean,attribute:"keep-open"})],G.prototype,"keepOpen",void 0);c([h({type:Boolean})],G.prototype,"selected",void 0);c([L(".list-item")],G.prototype,"listItemRoot",void 0);c([me({slot:"headline"})],G.prototype,"headlineElements",void 0);c([me({slot:"supporting-text"})],G.prototype,"supportingTextElements",void 0);c([wn({slot:""})],G.prototype,"defaultElements",void 0);c([h({attribute:"typeahead-text"})],G.prototype,"typeaheadText",null);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ja=C`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Br=class extends G{};Br.styles=[ja];Br=c([D("md-menu-item")],Br);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class be extends I{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=zt.START_END,this.menuCorner=zt.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!this.menu?.open&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener("mouseenter",this.onMouseenter),this.addEventListener("mouseleave",this.onMouseleave)}render(){return y`
      <slot
        name="item"
        @click=${this.onClick}
        @keydown=${this.onKeydown}
        @slotchange=${this.onSlotchange}>
      </slot>
      <slot
        name="menu"
        @keydown=${this.onSubMenuKeydown}
        @close-menu=${this.onCloseSubmenu}
        @slotchange=${this.onSlotchange}>
      </slot>
    `}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(nr()),this.dispatchEvent(ft()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(ft()),this.dispatchEvent(za()),this.item.selected=!0,!t){let r=n=>{};const i=new Promise(n=>{r=n});e.addEventListener("opened",r,{once:!0}),await i}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(nr()),e.quick=!0,e.close(),this.dispatchEvent(ft());let t=i=>{};const r=new Promise(i=>{t=i});e.addEventListener("closed",t,{once:!0}),await r}onSlotchange(){if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",this.menu?.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const r=t&&(fe.LEFT===e.code||fe.RIGHT===e.code);if((e.code===Ze.SPACE||r)&&(e.preventDefault(),r&&e.stopPropagation()),!t)return;const i=this.menu;if(!i)return;const n=i.items,a=Gt(n);if(a){await this.show(),a.tabIndex=0,a.focus();return}}onCloseSubmenu(e){const{itemPath:t,reason:r}=e.detail;if(t.push(this.item),this.dispatchEvent(nr()),r.kind===Lr.KEYDOWN&&r.key===Or.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(La());return}this.dispatchEvent(ft())}async onSubMenuKeydown(e){if(e.defaultPrevented)return;const{close:t,keyCode:r}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(r===fe.LEFT||r===fe.RIGHT)&&e.stopPropagation(),await this.close(),Ia(this.menu.items),this.item?.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const r=getComputedStyle(this).direction==="rtl"?fe.LEFT:fe.RIGHT;switch(e){case r:case Ze.SPACE:case Ze.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const r=getComputedStyle(this).direction==="rtl"?fe.RIGHT:fe.LEFT;switch(e){case r:case Or.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}}c([h({attribute:"anchor-corner"})],be.prototype,"anchorCorner",void 0);c([h({attribute:"menu-corner"})],be.prototype,"menuCorner",void 0);c([h({type:Number,attribute:"hover-open-delay"})],be.prototype,"hoverOpenDelay",void 0);c([h({type:Number,attribute:"hover-close-delay"})],be.prototype,"hoverCloseDelay",void 0);c([h({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],be.prototype,"isSubMenu",void 0);c([me({slot:"item",flatten:!0})],be.prototype,"items",void 0);c([me({slot:"menu",flatten:!0})],be.prototype,"menus",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Ka=C`:host{position:relative;display:flex;flex-direction:column}
`;/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Mr=class extends be{};Mr.styles=[Ka];Mr=c([D("md-sub-menu")],Mr);/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const vt=Symbol("isFocusable"),ar=Symbol("privateIsFocusable"),gt=Symbol("externalTabIndex"),bt=Symbol("isUpdatingTabIndex"),yt=Symbol("updateTabIndex");function Ga(o){var e,t,r;class i extends o{constructor(){super(...arguments),this[e]=!0,this[t]=null,this[r]=!1}get[vt](){return this[ar]}set[vt](a){this[vt]!==a&&(this[ar]=a,this[yt]())}connectedCallback(){super.connectedCallback(),this[yt]()}attributeChangedCallback(a,s,l){if(a!=="tabindex"){super.attributeChangedCallback(a,s,l);return}if(this.requestUpdate("tabIndex",Number(s??-1)),!this[bt]){if(!this.hasAttribute("tabindex")){this[gt]=null,this[yt]();return}this[gt]=this.tabIndex}}[(e=ar,t=gt,r=bt,yt)](){const a=this[vt]?0:-1,s=this[gt]??a;this[bt]=!0,this.tabIndex=s,this[bt]=!1}}return c([h({noAccessor:!0})],i.prototype,"tabIndex",void 0),i}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Ya extends co{computeValidity(e){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let t=!1,r=!1;for(const{checked:i,required:n}of e)n&&(t=!0),i&&(r=!0);return this.radioElement.checked=r,this.radioElement.required=t,{validity:{valueMissing:t&&!r},validationMessage:this.radioElement.validationMessage}}equals(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],n=t[r];if(i.checked!==n.checked||i.required!==n.required)return!1}return!0}copy(e){return e.map(({checked:t,required:r})=>({checked:t,required:r}))}}/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class Xa{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const r=t.key==="ArrowDown",i=t.key==="ArrowUp",n=t.key==="ArrowLeft",a=t.key==="ArrowRight";if(!n&&!a&&!r&&!i)return;const s=this.controls;if(!s.length)return;t.preventDefault();const d=getComputedStyle(this.host).direction==="rtl"?n||r:a||r,u=s.indexOf(this.host);let p=d?u+1:u-1;for(;p!==u;){p>=s.length?p=0:p<0&&(p=s.length-1);const f=s[p];if(f.hasAttribute("disabled")){d?p++:p--;continue}for(const v of s)v!==f&&(v.checked=!1,v.tabIndex=-1,v.blur());f.checked=!0,f.tabIndex=0,f.focus(),f.dispatchEvent(new Event("change",{bubbles:!0}));break}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),queueMicrotask(()=>{this.updateTabIndices()})}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),queueMicrotask(()=>{this.updateTabIndices(),this.root=null})}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){const e=this.controls,t=e.find(r=>r.checked);if(t||this.focused){const r=t||this.host;r.tabIndex=0;for(const i of e)i!==r&&(i.tabIndex=-1);return}for(const r of e)r.tabIndex=0}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */var jo;const sr=Symbol("checked");let Za=0;const Ja=so(lo(st(Ga(I))));class ct extends Ja{get checked(){return this[sr]}set checked(e){const t=this.checked;t!==e&&(this[sr]=e,this.requestUpdate("checked",t),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++Za}`,this[jo]=!1,this.required=!1,this.value="on",this.selectionController=new Xa(this),this.addController(this.selectionController),this[q].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e={checked:this.checked};return y`
      <div class="container ${J(e)}" aria-hidden="true">
        <md-ripple
          part="ripple"
          .control=${this}
          ?disabled=${this.disabled}></md-ripple>
        <md-focus-ring part="focus-ring" .control=${this}></md-focus-ring>
        <svg class="icon" viewBox="0 0 20 20">
          <mask id="${this.maskId}">
            <rect width="100%" height="100%" fill="white" />
            <circle cx="10" cy="10" r="8" fill="black" />
          </mask>
          <circle
            class="outer circle"
            cx="10"
            cy="10"
            r="10"
            mask="url(#${this.maskId})" />
          <circle class="inner circle" cx="10" cy="10" r="5" />
        </svg>

        <div class="touch-target"></div>
      </div>
    `}updated(){this[q].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(io(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(jo=sr,ze)](){return this.checked?this.value:null}[Pt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new Ya(()=>this.selectionController?this.selectionController.controls:[this])}[ot](){return this.container}}c([h({type:Boolean})],ct.prototype,"checked",null);c([h({type:Boolean})],ct.prototype,"required",void 0);c([h()],ct.prototype,"value",void 0);c([L(".container")],ct.prototype,"container",void 0);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Qa=C`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
`;/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Dr=class extends ct{};Dr.styles=[Qa];Dr=c([D("md-radio")],Dr);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class P extends I{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),r=this.renderOutline?.(e),i={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return y`
      <div class="field ${J(i)}">
        <div class="container-overflow">
          ${this.renderBackground?.()}
          <slot name="container"></slot>
          ${this.renderStateLayer?.()} ${this.renderIndicator?.()} ${r}
          <div class="container">
            <div class="start">
              <slot name="start"></slot>
            </div>
            <div class="middle">
              <div class="label-wrapper">
                ${t} ${r?m:e}
              </div>
              <div class="content">
                <slot></slot>
              </div>
            </div>
            <div class="end">
              <slot name="end"></slot>
            </div>
          </div>
        </div>
        ${this.renderSupportingText()}
      </div>
    `}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame(()=>{this.refreshErrorAlert=!1}),this.disableTransitions&&requestAnimationFrame(()=>{this.disableTransitions=!1})}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return m;const r=y`<span>${e}</span>`,i=t?y`<span class="counter">${t}</span>`:m,a=this.error&&this.errorText&&!this.refreshErrorAlert?"alert":m;return y`
      <div class="supporting-text" role=${a}>${r}${i}</div>
      <slot
        name="aria-describedby"
        @slotchange=${this.updateSlottedAriaDescribedBy}></slot>
    `}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)vi(y`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return m;let t;e?t=this.focused||this.populated||this.isAnimating:t=!this.focused&&!this.populated&&!this.isAnimating;const r={hidden:!t,floating:e,resting:!e},i=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return y`
      <span class="label ${J(r)}" aria-hidden=${!t}
        >${i}</span
      >
    `}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){if(!this.label)return;e??=this.focused,t??=this.populated;const r=e||t,i=this.focused||this.populated;r!==i&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:ne.STANDARD}),this.labelAnimation?.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:r,y:i,height:n}=e.getBoundingClientRect(),{x:a,y:s,height:l}=t.getBoundingClientRect(),d=e.scrollWidth,u=t.scrollWidth,p=u/d,f=a-r,v=s-i+Math.round((l-n*p)/2),g=`translateX(${f}px) translateY(${v}px) scale(${p})`,b="translateX(0) translateY(0) scale(1)",A=t.clientWidth,E=u>A?`${A/p}px`:"";return this.focused||this.populated?[{transform:g,width:E},{transform:b,width:E}]:[{transform:b,width:E},{transform:g,width:E}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}c([h({type:Boolean})],P.prototype,"disabled",void 0);c([h({type:Boolean})],P.prototype,"error",void 0);c([h({type:Boolean})],P.prototype,"focused",void 0);c([h()],P.prototype,"label",void 0);c([h({type:Boolean,attribute:"no-asterisk"})],P.prototype,"noAsterisk",void 0);c([h({type:Boolean})],P.prototype,"populated",void 0);c([h({type:Boolean})],P.prototype,"required",void 0);c([h({type:Boolean})],P.prototype,"resizable",void 0);c([h({attribute:"supporting-text"})],P.prototype,"supportingText",void 0);c([h({attribute:"error-text"})],P.prototype,"errorText",void 0);c([h({type:Number})],P.prototype,"count",void 0);c([h({type:Number})],P.prototype,"max",void 0);c([h({type:Boolean,attribute:"has-start"})],P.prototype,"hasStart",void 0);c([h({type:Boolean,attribute:"has-end"})],P.prototype,"hasEnd",void 0);c([me({slot:"aria-describedby"})],P.prototype,"slottedAriaDescribedBy",void 0);c([F()],P.prototype,"isAnimating",void 0);c([F()],P.prototype,"refreshErrorAlert",void 0);c([F()],P.prototype,"disableTransitions",void 0);c([L(".label.floating")],P.prototype,"floatingLabelEl",void 0);c([L(".label.resting")],P.prototype,"restingLabelEl",void 0);c([L(".container")],P.prototype,"containerEl",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class es extends P{renderOutline(e){return y`
      <div class="outline">
        <div class="outline-start"></div>
        <div class="outline-notch">
          <div class="outline-panel-inactive"></div>
          <div class="outline-panel-active"></div>
          <div class="outline-label">${e}</div>
        </div>
        <div class="outline-end"></div>
      </div>
    `}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ts=C`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-outlined-field-content-space, 16px);--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_with-leading-content-leading-space: var(--md-outlined-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-outlined-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
`;/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const rs=C`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}slot[name=container]{border-radius:inherit}slot[name=container]::slotted(*){border-radius:inherit;inset:0;pointer-events:none;position:absolute}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let Nr=class extends es{};Nr.styles=[rs,ts];Nr=c([D("md-outlined-field")],Nr);/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const os=C`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-space: var(--_icon-input-space);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
`;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const is=o=>o.strings===void 0,ns={},as=(o,e=ns)=>o._$AH=e;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ko=ro(class extends oo{constructor(o){if(super(o),o.type!==ve.PROPERTY&&o.type!==ve.ATTRIBUTE&&o.type!==ve.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!is(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[e]){if(e===X||e===m)return e;const t=o.element,r=o.name;if(o.type===ve.PROPERTY){if(e===t[r])return X}else if(o.type===ve.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(r))return X}else if(o.type===ve.ATTRIBUTE&&t.getAttribute(r)===e+"")return X;return as(o),e}});/**
 * @license
 * Copyright 2022 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ss={fromAttribute(o){return o??""},toAttribute(o){return o||null}};/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const Fr=Symbol("onReportValidity"),xt=Symbol("privateCleanupFormListeners"),_t=Symbol("privateDoNotReportInvalid"),wt=Symbol("privateIsSelfReportingValidity"),kt=Symbol("privateCallOnReportValidity");function ls(o){var e,t,r;class i extends o{constructor(...a){super(...a),this[e]=new AbortController,this[t]=!1,this[r]=!1,this.addEventListener("invalid",s=>{this[_t]||!s.isTrusted||this.addEventListener("invalid",()=>{this[kt](s)},{once:!0})},{capture:!0})}checkValidity(){this[_t]=!0;const a=super.checkValidity();return this[_t]=!1,a}reportValidity(){this[wt]=!0;const a=super.reportValidity();return a&&this[kt](null),this[wt]=!1,a}[(e=xt,t=_t,r=wt,kt)](a){const s=a?.defaultPrevented;s||(this[Fr](a),!(!s&&a?.defaultPrevented))||(this[wt]||us(this[q].form,this))&&this.focus()}[Fr](a){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(a){super.formAssociatedCallback&&super.formAssociatedCallback(a),this[xt].abort(),a&&(this[xt]=new AbortController,cs(this,a,()=>{this[kt](null)},this[xt].signal))}}return i}function cs(o,e,t,r){const i=ds(e);let n=!1,a,s=!1;i.addEventListener("before",()=>{s=!0,a=new AbortController,n=!1,o.addEventListener("invalid",()=>{n=!0},{signal:a.signal})},{signal:r}),i.addEventListener("after",()=>{s=!1,a?.abort(),!n&&t()},{signal:r}),e.addEventListener("submit",()=>{s||t()},{signal:r})}const lr=new WeakMap;function ds(o){if(!lr.has(o)){const e=new EventTarget;lr.set(o,e);for(const t of["reportValidity","requestSubmit"]){const r=o[t];o[t]=function(){e.dispatchEvent(new Event("before"));const i=Reflect.apply(r,this,arguments);return e.dispatchEvent(new Event("after")),i}}}return lr.get(o)}function us(o,e){if(!o)return!0;let t;for(const r of o.elements)if(r.matches(":invalid")){t=r;break}return t===e}/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class hs extends co{computeValidity({state:e,renderedControl:t}){let r=t;Fe(e)&&!r?(r=this.inputControl||document.createElement("input"),this.inputControl=r):r||(r=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=r);const i=Fe(e)?r:null;if(i&&(i.type=e.type),r.value!==e.value&&(r.value=e.value),r.required=e.required,i){const n=e;n.pattern?i.pattern=n.pattern:i.removeAttribute("pattern"),n.min?i.min=n.min:i.removeAttribute("min"),n.max?i.max=n.max:i.removeAttribute("max"),n.step?i.step=n.step:i.removeAttribute("step")}return(e.minLength??-1)>-1?r.setAttribute("minlength",String(e.minLength)):r.removeAttribute("minlength"),(e.maxLength??-1)>-1?r.setAttribute("maxlength",String(e.maxLength)):r.removeAttribute("maxlength"),{validity:r.validity,validationMessage:r.validationMessage}}equals({state:e},{state:t}){const r=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return!Fe(e)||!Fe(t)?r:r&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:Fe(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:r,min:i,max:n,step:a}=e;return{...this.copySharedState(e),type:t,pattern:r,min:i,max:n,step:a}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:r,maxLength:i}){return{value:e,required:t,minLength:r,maxLength:i}}}function Fe(o){return o.type!=="textarea"}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const ps=Ae(ls(so(lo(st(I)))));class w extends ps{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,r){this.getInputOrTextarea().setSelectionRange(e,t,r)}showPicker(){const e=this.getInput();e&&e.showPicker()}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,r){e==="value"&&this.dirty||super.attributeChangedCallback(e,t,r)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type==="textarea","no-spinner":this.noSpinner};return y`
      <span class="text-field ${J(e)}">
        ${this.renderField()}
      </span>
    `}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return uo`<${this.fieldTag}
      class="field"
      count=${this.value.length}
      ?disabled=${this.disabled}
      ?error=${this.hasError}
      error-text=${this.getErrorText()}
      ?focused=${this.focused}
      ?has-end=${this.hasTrailingIcon}
      ?has-start=${this.hasLeadingIcon}
      label=${this.label}
      ?no-asterisk=${this.noAsterisk}
      max=${this.maxLength}
      ?populated=${!!this.value}
      ?required=${this.required}
      ?resizable=${this.type==="textarea"}
      supporting-text=${this.supportingText}
    >
      ${this.renderLeadingIcon()}
      ${this.renderInputOrTextarea()}
      ${this.renderTrailingIcon()}
      <div id="description" slot="aria-describedby"></div>
      <slot name="container" slot="container"></slot>
    </${this.fieldTag}>`}renderLeadingIcon(){return y`
      <span class="icon leading" slot="start">
        <slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
      </span>
    `}renderTrailingIcon(){return y`
      <span class="icon trailing" slot="end">
        <slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
      </span>
    `}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||m,r=this.autocomplete,i=(this.maxLength??-1)>-1,n=(this.minLength??-1)>-1;if(this.type==="textarea")return y`
        <textarea
          class="input"
          style=${Rr(e)}
          aria-describedby="description"
          aria-invalid=${this.hasError}
          aria-label=${t}
          autocomplete=${r||m}
          name=${this.name||m}
          ?disabled=${this.disabled}
          maxlength=${i?this.maxLength:m}
          minlength=${n?this.minLength:m}
          placeholder=${this.placeholder||m}
          ?readonly=${this.readOnly}
          ?required=${this.required}
          rows=${this.rows}
          cols=${this.cols}
          .value=${Ko(this.value)}
          @change=${this.redispatchEvent}
          @focus=${this.handleFocusChange}
          @blur=${this.handleFocusChange}
          @input=${this.handleInput}
          @select=${this.redispatchEvent}></textarea>
      `;const a=this.renderPrefix(),s=this.renderSuffix(),l=this.inputMode;return y`
      <div class="input-wrapper">
        ${a}
        <input
          class="input"
          style=${Rr(e)}
          aria-describedby="description"
          aria-invalid=${this.hasError}
          aria-label=${t}
          autocomplete=${r||m}
          name=${this.name||m}
          ?disabled=${this.disabled}
          inputmode=${l||m}
          max=${this.max||m}
          maxlength=${i?this.maxLength:m}
          min=${this.min||m}
          minlength=${n?this.minLength:m}
          pattern=${this.pattern||m}
          placeholder=${this.placeholder||m}
          ?readonly=${this.readOnly}
          ?required=${this.required}
          ?multiple=${this.multiple}
          step=${this.step||m}
          type=${this.type}
          .value=${Ko(this.value)}
          @change=${this.redispatchEvent}
          @focus=${this.handleFocusChange}
          @blur=${this.handleFocusChange}
          @input=${this.handleInput}
          @select=${this.redispatchEvent} />
        ${s}
      </div>
    `}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?y`<span class="${J({suffix:t,prefix:!t})}">${e}</span>`:m}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(":focus")??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){ao(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[ze](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[rt](){return new hs(()=>({state:this,renderedControl:this.inputOrTextarea}))}[ot](){return this.inputOrTextarea}[Fr](e){e?.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}}w.shadowRootOptions={...I.shadowRootOptions,delegatesFocus:!0};c([h({type:Boolean,reflect:!0})],w.prototype,"error",void 0);c([h({attribute:"error-text"})],w.prototype,"errorText",void 0);c([h()],w.prototype,"label",void 0);c([h({type:Boolean,attribute:"no-asterisk"})],w.prototype,"noAsterisk",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"required",void 0);c([h()],w.prototype,"value",void 0);c([h({attribute:"prefix-text"})],w.prototype,"prefixText",void 0);c([h({attribute:"suffix-text"})],w.prototype,"suffixText",void 0);c([h({type:Boolean,attribute:"has-leading-icon"})],w.prototype,"hasLeadingIcon",void 0);c([h({type:Boolean,attribute:"has-trailing-icon"})],w.prototype,"hasTrailingIcon",void 0);c([h({attribute:"supporting-text"})],w.prototype,"supportingText",void 0);c([h({attribute:"text-direction"})],w.prototype,"textDirection",void 0);c([h({type:Number})],w.prototype,"rows",void 0);c([h({type:Number})],w.prototype,"cols",void 0);c([h({reflect:!0})],w.prototype,"inputMode",void 0);c([h()],w.prototype,"max",void 0);c([h({type:Number})],w.prototype,"maxLength",void 0);c([h()],w.prototype,"min",void 0);c([h({type:Number})],w.prototype,"minLength",void 0);c([h({type:Boolean,attribute:"no-spinner"})],w.prototype,"noSpinner",void 0);c([h()],w.prototype,"pattern",void 0);c([h({reflect:!0,converter:ss})],w.prototype,"placeholder",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"readOnly",void 0);c([h({type:Boolean,reflect:!0})],w.prototype,"multiple",void 0);c([h()],w.prototype,"step",void 0);c([h({reflect:!0})],w.prototype,"type",void 0);c([h({reflect:!0})],w.prototype,"autocomplete",void 0);c([F()],w.prototype,"dirty",void 0);c([F()],w.prototype,"focused",void 0);c([F()],w.prototype,"nativeError",void 0);c([F()],w.prototype,"nativeErrorText",void 0);c([L(".input")],w.prototype,"inputOrTextarea",void 0);c([L(".field")],w.prototype,"field",void 0);c([me({slot:"leading-icon"})],w.prototype,"leadingIcons",void 0);c([me({slot:"trailing-icon"})],w.prototype,"trailingIcons",void 0);/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class ms extends w{constructor(){super(...arguments),this.fieldTag=we`md-outlined-field`}}/**
 * @license
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const fs=C`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
`;/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */let qr=class extends ms{constructor(){super(...arguments),this.fieldTag=we`md-outlined-field`}};qr.styles=[fs,os];qr=c([D("md-outlined-text-field")],qr);let vs=0;function Oi(o){return`${o}_callback_${Date.now()}_${vs++}`}function _(o,e={}){return new Promise((t,r)=>{const i=Oi("exec");window[i]=(a,s,l)=>{t({errno:a,stdout:s,stderr:l}),n(i)};function n(a){delete window[a]}try{typeof ksu<"u"?ksu.exec(o,JSON.stringify(e),i):t({errno:1,stdout:"",stderr:"ksu is not defined"})}catch(a){r(a),n(i)}})}class cr{constructor(){this.listeners={}}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach(r=>r(...t))}}function Q(o,e=[],t={}){const r={listeners:{},stdout:new cr,stderr:new cr,stdin:new cr,on(n,a){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(a)},emit(n,...a){this.listeners[n]&&this.listeners[n].forEach(s=>s(...a))}},i=Oi("spawn");window[i]=r,r.on("exit",()=>delete window[i]);try{typeof ksu<"u"?ksu.spawn(o,JSON.stringify(e),JSON.stringify(t),i):setTimeout(()=>{r.stderr.emit("data","ksu is not defined"),r.emit("exit",1)},0)}catch(n){r.emit("error",n),delete window[i]}return r}function Me(o){typeof ksu<"u"?ksu.toast(o):console.log(o)}async function Go(o="all"){const t={all:()=>globalThis.ksu?.listAllPackages(),user:()=>globalThis.ksu?.listUserPackages(),system:()=>globalThis.ksu?.listSystemPackages()}[o];if(typeof t=="function")try{return JSON.parse(t())}catch{}return new Promise((r,i)=>{const n={all:[],user:["-3"],system:["-s"]};if(!(o in n))return i(new Error(`Unknown listPackages type: ${o}`));let a=[],s="";const l=Q("pm",["list","packages",...n[o]]);l.stdout.on("data",d=>{d.trim()!==""&&a.push(d.trim().replace(/^package:/,""))}),l.stderr.on("data",d=>s+=d),l.on("exit",d=>{if(d!==0)return i(new Error(`pm process exited with code ${d}: ${s.trim()}`));r(a)}),l.on("error",d=>{i(d)})})}function gs(o){return new Promise((e,t)=>{if(!o)return e([]);if(typeof globalThis.ksu?.getPackagesInfo!="function")return t(new Error("ksu.getPackagesInfo is not available."));const r=Array.isArray(o)?o:[o];if(r.length===0)return e([]);try{const i=ksu.getPackagesInfo(JSON.stringify(r)),n=JSON.parse(i);!Array.isArray(o)&&n.length===1?e(n[0]):e(n)}catch(i){t(new Error(`Failed to get package info: ${i.message}`))}})}function bs(o,e=100){return new Promise((t,r)=>{if(!o)return t([]);if(typeof globalThis.ksu?.getPackagesIcons!="function")return r(new Error("ksu.getPackagesIcons is not available."));const i=Array.isArray(o)?o:[o];if(i.length===0)return t([]);try{const n=ksu.getPackagesIcons(JSON.stringify(i),e),a=JSON.parse(n);!Array.isArray(o)&&a.length===1?t(a[0]):t(a)}catch(n){r(new Error(`Failed to get package icon: ${n.message}`))}})}class Yo extends Event{_wxOrigin;_wxData;get wxOrigin(){return this._wxOrigin}set wxOrigin(e){this._wxOrigin=e}get wx(){return this._wxData}set wx(e){this._wxData=e}constructor(e){super(e,{bubbles:!0,cancelable:!0,composed:!0})}}var ys={cordova:!1};class po{_initialized=!1;_handlers=new WeakMap;_eventTypes;get eventTypes(){return this._eventTypes}constructor(e=ys){this._initialized||(this._initialized=!0,this._eventTypes={WX_ON_BACK:e.cordova?"backbutton":"back",WX_ON_RESUME:"resume",WX_ON_REFRESH:"refresh",WX_ON_PAUSE:"pause",WX_ON_KEYBOARD:"keyboard",WX_ON_INSETS:"insets"},window.addEventListener("message",t=>{try{if(typeof t.data!="string")return;let r=JSON.parse(t.data);if(!r?.type)return;let i=this._eventTypes[r.type]??r.type;this._dispatch(window,i,r)}catch(r){console.error("[WXEvent] Message error:",r)}}))}_dispatch(e,t,r){let i=new Yo(t);i.wx=r.data,i.wxOrigin="system",e.dispatchEvent(i)}on(e,t,r){this._initialized||new po;let i=a=>{if(!(a instanceof Yo)){console.warn("[WXEvent] Event is not a WXEvent:",a);return}a.wxOrigin==="system"&&(typeof r=="function"?r(a):r&&typeof r.handleEvent=="function"&&r.handleEvent(a))};this._handlers.has(e)||this._handlers.set(e,new Map);let n=this._handlers.get(e);return n.has(t)||n.set(t,new Set),n.get(t).add({handler:r,wrapper:i}),e.addEventListener(t,i),()=>this.off(e,t,r)}off(e,t,r){let i=this._handlers.get(e);if(i?.has(t)){for(let n of i.get(t))if(n.handler===r){e.removeEventListener(t,n.wrapper),i.get(t).delete(n);break}}}}var Pi={chunkSize:1048576,headers:{"Content-Type":"application/octet-stream"}};async function xs(o,e={}){let t={...Pi,...e};return new Promise((r,i)=>{let n;try{if(n=o,!n)throw new Error("Failed to open file input stream")}catch(d){i(d);return}let a=()=>{try{n?.close()}catch(d){console.error("Error during abort cleanup:",d)}i(new DOMException("The operation was aborted.","AbortError"))};if(t.signal){if(t.signal.aborted){a();return}t.signal.addEventListener("abort",a)}let s=new ReadableStream({async pull(d){try{let u=_s(n,t.chunkSize);if(!u){d.close(),l();return}d.enqueue(u)}catch(u){l(),d.error(u),i(new Error(`Error reading file chunk: ${u}`))}},cancel(d){console.warn("Stream canceled:",d),l()}});function l(){try{t.signal&&t.signal.removeEventListener("abort",a),n?.close()}catch(d){console.error(`Error during cleanup: ${d}`)}}r(s)})}function _s(o,e){try{let t=e?o.readChunk(e):o.read();if(typeof t=="number")return new Uint8Array([t]);if(typeof t=="string"){let r=JSON.parse(t);return r&&Array.isArray(r)&&r.length>0?new Uint8Array(r):null}return null}catch(t){throw new Error("Error reading chunk data: "+t)}}async function ws(o,e={}){let t={...Pi,...e};try{let r=await xs(o,t);return new Response(r,t)}catch(r){throw new Error(`wrapInputStream failed: ${r}`)}}const ks=document.getElementById("app-template").content,ae=document.getElementById("apps-list"),it=document.getElementById("update-card");let Je=[];async function zi(){await _("cat /data/adb/tricky_store/target.txt").then(({errno:a,stdout:s})=>{a===0?Je=Xo(s):typeof ksu>"u"?Je=Xo(`com.example.one
com.example.two!
com.example.three?`):Me("Failed to read target.txt!")});let o={};try{o=(await(await fetch("applist.json")).json()).reduce((l,d)=>(l[d.package_name]=d.app_name,l),{})}catch(a){typeof ksu>"u"?o={"com.example.one":"One","com.example.two":"Two","com.example.three":"Three"}:(console.warn("Failed to fetch applist.json:",a),o={})}let e=[],t=[];const r=await _('cat "/data/adb/tricky_store/system_app" || true'),[i,n]=await Promise.all([Go("user").catch(()=>[]),Go("system").catch(()=>[])]);t.push(...i),r.stdout.split(`
`).forEach(a=>{a&&n.includes(a)&&t.push(a)}),t=Array.from(new Set(t)),typeof ksu>"u"&&(t=["com.example.one","com.example.two","com.example.three","com.example.four","com.example.five","com.example.six"]),e=await Promise.all(t.map(async a=>{if(o[a]&&o[a].trim()!=="")return{appName:o[a].trim(),packageName:a};try{return{appName:(await gs(a)).appLabel,packageName:a}}catch{return typeof $packageManager<"u"?{appName:$packageManager.getApplicationInfo(a,0,0).getLabel(),packageName:a}:new Promise(l=>{const d=Q("sh",[`${S}/common/get_extra.sh`,"--appname",a],{env:{PATH:`$PATH:${S}/common/bin:/data/data/com.termux/files/usr/bin`}});d.stdout.on("data",u=>{l({appName:u.trim()===""?a:u.trim(),packageName:a})}),d.on("exit",u=>{u!==0&&l({appName:a,packageName:a})})})}})),Es(e)}function Es(o){const e=o.sort((i,n)=>{const a=Je.includes(i.packageName),s=Je.includes(n.packageName);return a!==s?a?-1:1:(i.appName||"").localeCompare(n.appName||"")});ae.innerHTML="",on.style.display="none",document.querySelector(".floating-btn").classList.remove("hide"),it&&ae.appendChild(it);let t=!1;(typeof $packageManager<"u"||typeof ksu<"u"&&typeof ksu.getPackagesIcons=="function")&&(t=!0);const r=i=>{if(i>=e.length){document.querySelector(".uninstall-container").style.display="flex",Ts(),Is(),Bi(),ql(),t&&$s();return}const{appName:n,packageName:a}=e[i],s=document.importNode(ks,!0);s.querySelector(".content").setAttribute("data-package",a);const d=s.querySelector(".name");d.setAttribute("for",`checkbox-${a}`),d.innerHTML=`
            <div class="app-icon-container" style="display:${t?"flex":"none"};">
                <div class="loader" data-package="${a}"></div>
                <img class="app-icon" data-package="${a}" />
            </div>
            <div class="app-info">
                <div class="app-name">${n}</div>
                <div class="package-name">${a}</div>
            </div>
        `;const u=s.querySelector("md-checkbox");u.id=`checkbox-${a}`,Je.includes(a)&&(u.checked=!0,s.querySelector(".card").classList.add("selected")),ae.appendChild(s),r(i+1)};r(0)}function $s(){const o=new IntersectionObserver(t=>{t.forEach(r=>{if(r.isIntersecting){const i=r.target,n=i.querySelector(".app-icon").getAttribute("data-package");n&&(As(n),o.unobserve(i))}})},{rootMargin:"100px",threshold:.1});document.querySelectorAll(".app-icon-container").forEach(t=>{o.observe(t)})}const Et=new Map;function As(o){const e=document.querySelector(`.app-icon[data-package="${o}"]`),t=document.querySelector(`.loader[data-package="${o}"]`);if(Et.has(o))e.src=Et.get(o),t.style.display="none",e.style.opacity="1";else if(typeof ksu.getPackagesIcons=="function")bs(o,100).then(r=>{Et.set(o,r.icon),e.src=r.icon,t.style.display="none",e.style.opacity="1"}).catch(r=>{console.error("Failed to load icon:",r),t.style.display="none"});else if(typeof $packageManager<"u"){const r=$packageManager.getApplicationIcon(o,0,0);ws(r).then(i=>i.arrayBuffer()).then(i=>{const n="data:image/png;base64,"+Cs(i);Et.set(o,n),e.src=n,t.style.display="none",e.style.opacity="1"})}}function Cs(o){const e=new Uint8Array(o);let t="";return e.forEach(r=>t+=String.fromCharCode(r)),btoa(t)}function Xo(o){return he.length=0,pe.length=0,o.split(`
`).map(t=>{const r=t.trim();return r.endsWith("!")?he.push(r.slice(0,-1)):r.endsWith("?")&&pe.push(r.slice(0,-1)),r.replace(/[!?]/g,"")}).filter(t=>t.trim()!=="")}let dr=!1;function Ts(){ae.querySelectorAll(".card").forEach(e=>{const t=e.querySelector(".checkbox");e.onclick=()=>{dr||(t.checked=!t.checked,e.classList.toggle("selected"))}}),document.querySelectorAll("md-menu").forEach(e=>{e.dataset.closeListener||(e.addEventListener("closing",()=>dr=!0),e.addEventListener("closed",()=>dr=!1),e.dataset.closeListener="true")})}function Is(){const o=document.getElementById("mode-dialog"),e=document.getElementById("mode-dialog-appname");let t,r=null;function i(u){r=u;const p=u.getAttribute("data-package"),f=u.querySelector(".app-name"),v=f?f.textContent:p;e.innerHTML=`${v}<br>${p}`;const g=he.includes(p),b=pe.includes(p);document.getElementById("mode-default").checked=!g&&!b,document.getElementById("mode-generate").checked=g,document.getElementById("mode-hack").checked=b,o.show()}function n(u){if(!r||!u){o.close(),r=null;return}const p=r.getAttribute("data-package"),f=he.indexOf(p);f>-1&&he.splice(f,1);const v=pe.indexOf(p);v>-1&&pe.splice(v,1),u==="generate"?he.push(p):u==="hack"&&pe.push(p),Bi(),r=null,setTimeout(()=>o.close(),200)}const a=document.getElementById("mode-default"),s=document.getElementById("mode-generate"),l=document.getElementById("mode-hack");a.addEventListener("click",()=>n("normal")),s.addEventListener("click",()=>n("generate")),l.addEventListener("click",()=>n("hack")),document.getElementById("mode-cancel").addEventListener("click",()=>n()),ae.querySelectorAll(".card").forEach(u=>{u.addEventListener("pointerdown",p=>{const f=u.querySelector("md-checkbox");f&&f.checked&&(t=setTimeout(()=>i(u),500))}),u.addEventListener("pointerup",()=>clearTimeout(t)),u.addEventListener("pointercancel",()=>clearTimeout(t))})}function Bi(){ae.querySelectorAll(".card").forEach(e=>{const t=e.getAttribute("data-package"),r=e.querySelector("md-checkbox");r.classList.remove("checkbox-checked-generate","checkbox-checked-hack"),he.includes(t)?r.classList.add("checkbox-checked-generate"):pe.includes(t)?r.classList.add("checkbox-checked-hack"):r.checked&&r.classList.remove("checkbox-checked-generate","checkbox-checked-hack")})}const $t=document.getElementById("language-menu"),Ss=["ar","fa","he","ur","ps","sd","ku","yi","dv"];let ke={},At={},Ct=["en"],Mi={};function Zo(o){const r=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("string"),i={};for(let n=0;n<r.length;n++){const a=r[n],s=a.getAttribute("name"),l=a.textContent;i[s]=l}return i}async function Rs(){const o=navigator.language||navigator.userLanguage,e=o.split("-")[0];try{const r=await(await fetch("locales/languages.json")).json();Ct=Object.keys(r),Mi=r;const i=localStorage.getItem("trickyAddonLanguage");return i!=="default"&&Ct.includes(i)?i:Ct.includes(o)?o:Ct.includes(e)?e:(localStorage.removeItem("trickyAddonLanguage"),"en")}catch(t){return console.error("Error detecting user language:",t),"en"}}async function Ls(){try{const e=await(await fetch("./locales/strings/en.xml")).text();At=Zo(e);const t=await Rs();if(t!=="en"){const n=await(await fetch(`locales/strings/${t}.xml`)).text(),a=Zo(n);ke={...At,...a}}else ke=At;const r=Ss.includes(t.split("-")[0]);document.documentElement.setAttribute("dir",r?"rtl":"ltr"),await Ps()}catch(o){console.error("Error loading translations:",o),ke=At}Os()}function Os(){document.querySelectorAll("[data-i18n]").forEach(o=>{const e=o.getAttribute("data-i18n"),t=ke[e];t&&(o.hasAttribute("placeholder")?o.setAttribute("placeholder",t):o.hasAttribute("label")?o.setAttribute("label",t):o.textContent=t)})}function Jo(o){localStorage.setItem("trickyAddonLanguage",o),window.location.reload()}async function Ps(){$t.innerHTML="";const o=document.createElement("md-menu-item");o.setAttribute("data-i18n","system_default"),o.onclick=()=>Jo("default"),$t.appendChild(o),Object.entries(Mi).map(([r,i])=>({lang:r,name:i})).sort((r,i)=>r.name.localeCompare(i.name)).forEach(({lang:r,name:i})=>{const n=document.createElement("md-menu-item");n.textContent=i,n.onclick=()=>Jo(r),$t.appendChild(n)});const t=document.createElement("md-menu-item");t.textContent=ke.more_language,t.onclick=()=>Jt("https://github.com/KOWX712/Tricky-Addon-Update-Target-List/blob/main/module/webui/locales/GUIDE.md"),$t.appendChild(t)}let Bt;const Z=document.getElementById("file-selector-dialog");let M="/storage/emulated/0/Download";function Di(){const o=Z.querySelector(".current-path"),e=M.split("/").filter(Boolean),t=e.map((r,i)=>`<span class="path-segment" data-path="${"/"+e.slice(0,i+1).join("/")}">${r}</span>`).join('<span class="separator">›</span>');o.innerHTML=t,o.scrollTo({left:o.scrollWidth,behavior:"smooth"})}async function Yt(o,e=!1){const t=Z.querySelector(".file-list");e||(t.classList.add("switching"),await new Promise(i=>setTimeout(i,150)));const r=await _(`
        cd "${o}"
        find . -maxdepth 1 -type f -name "*.${Bt}" -o -type d ! -name ".*" -o -type l | sort
    `);if(r.errno===0){const i=r.stdout.split(`
`).filter(Boolean).map(n=>({path:o+"/"+n.replace(/^\.\//,""),name:n.split("/").pop(),isDirectory:!n.endsWith("."+Bt)}));if(t.innerHTML="",M!=="/storage/emulated/0"){const n=document.createElement("div");n.className="file-item",n.innerHTML=`
                <md-ripple></md-ripple>
                <md-icon>folder</md-icon>
                <span>..</span>
            `,n.addEventListener("click",()=>{Z.querySelector(".back-button").click()}),t.appendChild(n)}i.forEach(n=>{if(n.path===o)return;const a=document.createElement("div");a.className="file-item",a.innerHTML=`
                <md-ripple></md-ripple>
                <md-icon>${n.isDirectory?"folder":"description"}</md-icon>
                <span>${n.name}</span>
            `,a.addEventListener("click",async()=>{if(n.isDirectory){M=n.path;const s=document.querySelector(".current-path");s.innerHTML=M.split("/").filter(Boolean).join('<span class="separator">›</span>'),s.scrollTo({left:s.scrollWidth,behavior:"smooth"}),await Yt(n.path)}}),t.appendChild(a)}),e||t.classList.remove("switching")}else console.error("Error listing files:",r.stderr),e||t.classList.remove("switching");Di()}Z.querySelector(".current-path").addEventListener("click",async o=>{const e=o.target.closest(".path-segment");if(!e)return;const t=e.dataset.path;if(!t||t===M)return;const r=e.textContent;(r==="storage"||r==="emulated")&&M==="/storage/emulated/0"||(t.split("/").length<=3?M="/storage/emulated/0":M=t,Di(),await Yt(M))});Z.querySelector(".back-button").addEventListener("click",async()=>{if(M==="/storage/emulated/0")return;M=M.split("/").slice(0,-1).join("/"),M===""&&(M="/storage/emulated/0");const o=Z.querySelector(".current-path");o.innerHTML=M.split("/").filter(Boolean).join('<span class="separator">›</span>'),o.scrollTo({left:o.scrollWidth,behavior:"smooth"}),await Yt(M)});Z.querySelector(".close-selector").addEventListener("click",()=>Z.close());async function zs(o){Bt=o,M="/storage/emulated/0/Download",Z.show();const e=Z.querySelector(".current-path");return e.innerHTML=M.split("/").filter(Boolean).join('<span class="separator">›</span>'),e.scrollTo({left:e.scrollWidth,behavior:"smooth"}),await Yt(M,!0),new Promise((t,r)=>{Z.querySelector(".file-list").addEventListener("click",n=>{const a=n.target.closest(".file-item");a&&a.querySelector("span").textContent.endsWith("."+Bt)&&_(`cat ${M}/${a.querySelector("span").textContent}`).then(({errno:s,stdout:l,stderr:d})=>{s===0?t(l):r(d),Z.close()})})})}function Ni(o){document.querySelectorAll("md-checkbox").forEach(e=>{e.closest(".card").style.display!=="none"&&(e.checked=o,e.closest(".card").classList.toggle("selected",o))})}document.getElementById("select-all").onclick=()=>Ni(!0);document.getElementById("deselect-all").onclick=()=>Ni(!1);document.getElementById("select-denylist").onclick=()=>{_(`magisk --denylist ls 2>/dev/null | awk -F'|' '{print $1}' | grep -v "isolated" | sort -u`).then(({errno:o,stdout:e})=>{if(o===0){const t=e.split(`
`).map(r=>r.trim()).filter(Boolean);document.querySelectorAll(".card").forEach(r=>{const i=r.getAttribute("data-package");t.includes(i)&&(r.querySelector("md-checkbox").checked=!0,r.classList.add("selected"))}),_('touch "/data/adb/tricky_store/target_from_denylist"')}else Me("Failed to read DenyList!")})};document.getElementById("deselect-unnecessary").onclick=async()=>{try{const o=await fetch("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/more-exclude.json").then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()}).catch(async()=>fetch("https://raw.gitmirror.com/KOWX712/Tricky-Addon-Update-Target-List/main/more-exclude.json").then(e=>{if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return e.json()})).then(e=>e.data.flatMap(t=>t.apps).map(t=>t["package-name"]).join(`
`)).catch(e=>{throw Me("Failed to download unnecessary apps!"),e});_(`sh ${S}/common/get_extra.sh --xposed`).then(({stdout:e})=>{const t=o.split(`
`).map(r=>r.trim()).filter(Boolean).concat(e.split(`
`).map(r=>r.trim()).filter(Boolean));document.querySelectorAll(".card").forEach(r=>{const i=r.getAttribute("data-package");t.includes(i)&&(r.querySelector("md-checkbox").checked=!1,r.classList.remove("selected"))})})}catch(o){Me("Failed to get unnecessary apps!"),console.error("Failed to get unnecessary apps:",o)}};async function Bs(){const o=document.getElementById("add-system-app-dialog");document.getElementById("add-system-app").onclick=()=>{e(),o.show()},document.getElementById("add-system-app-button").onclick=async()=>{const t=document.getElementById("system-app-input"),r=t.value.trim();r&&_(`pm list packages -s | grep -q ${r}`).then(({errno:i})=>{i!==0?x("prompt_system_app_not_found",!1):(_(`
                            touch "/data/adb/tricky_store/system_app"
                            echo "${r}" >> "/data/adb/tricky_store/system_app"
                            echo "${r}" >> "/data/adb/tricky_store/target.txt"
                        `),t.value="",o.close(),Ht())})},document.getElementById("cancel-add-system-app").onclick=()=>o.close();async function e(){const t=document.querySelector(".current-system-app-list"),r=document.querySelector(".current-system-app-list-content");r.innerHTML="";const{errno:i,stdout:n}=await _(`[ -f "/data/adb/tricky_store/system_app" ] && cat "/data/adb/tricky_store/system_app" | sed '/^#/d; /^$/d'`);i!==0||n.trim()===""?t.style.display="none":n.split(`
`).forEach(a=>{a.trim()!==""&&(r.innerHTML+=`
                        <div class="system-app-item">
                            <span>${a}</span>
                            <md-filled-icon-button class="remove-system-app-button">
                                <md-icon>delete</md-icon>
                            </md-filled-icon-button>
                        </div>
                    `)}),document.querySelectorAll(".remove-system-app-button").forEach(a=>{a.onclick=()=>{const s=a.closest(".system-app-item").querySelector("span").textContent;_(`
                    sed -i "/${s}/d" "/data/adb/tricky_store/system_app"
                    sed -i "/${s}/d" "/data/adb/tricky_store/target.txt"
                `).then(()=>{o.close(),Ht()})}})}}async function mo(o){const{errno:e}=await _(`
        mv -f /data/adb/tricky_store/keybox.xml /data/adb/tricky_store/keybox.xml.bak 2>/dev/null
        cat << 'KB_EOF' > /data/adb/tricky_store/keybox.xml
${o}
KB_EOF
        chmod 644 /data/adb/tricky_store/keybox.xml
    `);return e===0}async function Ms(){const{stdout:o}=await _(`xxd -r -p ${S}/common/.default | base64 -d`),e=await mo(o);x(e?"prompt_aosp_key_set":"prompt_key_set_error",e)}document.getElementById("aospkb").onclick=Ms;async function Ds(o,e){fetch(o).then(t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.text()}).catch(async()=>fetch(e).then(t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.text()})).then(async t=>{if(!t.trim()){x("prompt_no_valid",!1);return}try{const r=new Uint8Array(t.match(/.{1,2}/g).map(s=>parseInt(s,16))),i=new TextDecoder().decode(r),n=atob(i);if(await mo(n))x("prompt_valid_key_set");else throw new Error("Failed to copy valid keybox")}catch{throw new Error("Failed to decode keybox data")}}).catch(async t=>{x("prompt_no_internet",!1)})}document.getElementById("devicekb").onclick=async()=>{Q("sh",[`${S}/common/get_extra.sh`,"--unknown-kb"],{cwd:"/data/local/tmp",env:{PATH:`${S}/common/bin:$PATH`}}).on("exit",e=>{x(e===0?"prompt_unknown_key_set":"prompt_key_set_error",e===0)})};document.getElementById("validkb").onclick=()=>{Ds("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/.extra","https://raw.gitmirror.com/KOWX712/Tricky-Addon-Update-Target-List/main/.extra")};document.getElementById("customkb").onclick=async()=>{try{const o=await zs("xml"),e=await mo(o);x(e?"prompt_custom_key_set":"prompt_key_set_error",e)}catch{x("prompt_key_set_error",!1)}};const Fi=document.getElementById("help-dialog");document.getElementById("help").onclick=()=>Fi.show();document.getElementById("close-help").onclick=()=>Fi.close();const se=document.getElementById("search"),fo=document.getElementById("search-button"),Ns=document.getElementById("clear-btn"),Fs=document.getElementById("menu-button"),Qo=document.getElementById("menu-options");fo.onclick=()=>{se.classList.add("show"),se.focus()};se.addEventListener("focus",()=>{fo.style.pointerEvents="none",document.querySelectorAll(".search-bg").forEach(o=>{o.classList.add("hide")})});se.addEventListener("blur",()=>{se.value===""&&(se.classList.remove("show"),fo.style.pointerEvents="auto",document.querySelectorAll(".search-bg").forEach(o=>{o.classList.remove("hide")}))});se.addEventListener("input",o=>{const e=o.target.value.toLowerCase();ae.querySelectorAll(".card").forEach(r=>{const i=r.querySelector(".name").textContent.toLowerCase();r.style.display=i.includes(e)?"flex":"none",window.scrollTo(0,0)})});Ns.addEventListener("click",()=>{se.value="",se.blur(),window.scrollTo(0,0),ae.querySelectorAll(".card").forEach(e=>e.style.display="flex")});Fs.addEventListener("click",()=>{Qo.open=!Qo.open});function vo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ce=vo();function qi(o){Ce=o}var Qe={exec:()=>null};function k(o,e=""){let t=typeof o=="string"?o:o.source,r={replace:(i,n)=>{let a=typeof n=="string"?n:n.source;return a=a.replace(j.caret,"$1"),t=t.replace(i,a),r},getRegex:()=>new RegExp(t,e)};return r}var j={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},qs=/^(?:[ \t]*(?:\n|$))+/,Hs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Us=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,go=/(?:[*+-]|\d{1,9}[.)])/,Hi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ui=k(Hi).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ws=k(Hi).replace(/bull/g,go).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,js=/^[^\n]+/,yo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ks=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gs=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,go).getRegex(),Xt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ys=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",xo).replace("tag",Xt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vi=k(bo).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex(),Xs=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vi).getRegex(),_o={blockquote:Xs,code:Hs,def:Ks,fences:Us,heading:Vs,hr:dt,html:Ys,lheading:Ui,list:Gs,newline:qs,paragraph:Vi,table:Qe,text:js},ei=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex(),Zs={..._o,lheading:Ws,table:ei,paragraph:k(bo).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ei).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xt).getRegex()},Js={..._o,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(bo).replace("hr",dt).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ui).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,el=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wi=/^( {2,}|\\)\n(?!\s*$)/,tl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zt=/[\p{P}\p{S}]/u,wo=/[\s\p{P}\p{S}]/u,ji=/[^\s\p{P}\p{S}]/u,rl=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wo).getRegex(),Ki=/(?!~)[\p{P}\p{S}]/u,ol=/(?!~)[\s\p{P}\p{S}]/u,il=/(?:[^\s\p{P}\p{S}]|~)/u,nl=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Gi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,al=k(Gi,"u").replace(/punct/g,Zt).getRegex(),sl=k(Gi,"u").replace(/punct/g,Ki).getRegex(),Yi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ll=k(Yi,"gu").replace(/notPunctSpace/g,ji).replace(/punctSpace/g,wo).replace(/punct/g,Zt).getRegex(),cl=k(Yi,"gu").replace(/notPunctSpace/g,il).replace(/punctSpace/g,ol).replace(/punct/g,Ki).getRegex(),dl=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ji).replace(/punctSpace/g,wo).replace(/punct/g,Zt).getRegex(),ul=k(/\\(punct)/,"gu").replace(/punct/g,Zt).getRegex(),hl=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pl=k(xo).replace("(?:-->|$)","-->").getRegex(),ml=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Mt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,fl=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Mt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Xi=k(/^!?\[(label)\]\[(ref)\]/).replace("label",Mt).replace("ref",yo).getRegex(),Zi=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",yo).getRegex(),vl=k("reflink|nolink(?!\\()","g").replace("reflink",Xi).replace("nolink",Zi).getRegex(),ti=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ko={_backpedal:Qe,anyPunctuation:ul,autolink:hl,blockSkip:nl,br:Wi,code:el,del:Qe,emStrongLDelim:al,emStrongRDelimAst:ll,emStrongRDelimUnd:dl,escape:Qs,link:fl,nolink:Zi,punctuation:rl,reflink:Xi,reflinkSearch:vl,tag:ml,text:tl,url:Qe},gl={...ko,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",Mt).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Mt).getRegex()},Hr={...ko,emStrongRDelimAst:cl,emStrongLDelim:sl,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ti).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ti).getRegex()},bl={...Hr,br:k(Wi).replace("{2,}","*").getRegex(),text:k(Hr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Tt={normal:_o,gfm:Zs,pedantic:Js},qe={normal:ko,gfm:Hr,breaks:bl,pedantic:gl},yl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ri=o=>yl[o];function ie(o,e){if(e){if(j.escapeTest.test(o))return o.replace(j.escapeReplace,ri)}else if(j.escapeTestNoEncode.test(o))return o.replace(j.escapeReplaceNoEncode,ri);return o}function oi(o){try{o=encodeURI(o).replace(j.percentDecode,"%")}catch{return null}return o}function ii(o,e){let t=o.replace(j.findPipe,(n,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),r=t.split(j.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(j.slashPipe,"|");return r}function He(o,e,t){let r=o.length;if(r===0)return"";let i=0;for(;i<r&&o.charAt(r-i-1)===e;)i++;return o.slice(0,r-i)}function xl(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===e[0])t++;else if(o[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function ni(o,e,t,r,i){let n=e.href,a=e.title||null,s=o[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:o[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function _l(o,e,t){let r=o.match(t.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
`).map(n=>{let a=n.match(t.other.beginningSpace);if(a===null)return n;let[s]=a;return s.length>=i.length?n.slice(i.length):n}).join(`
`)}var Dt=class{options;rules;lexer;constructor(o){this.options=o||Ce}space(o){let e=this.rules.block.newline.exec(o);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(o){let e=this.rules.block.code.exec(o);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:He(t,`
`)}}}fences(o){let e=this.rules.block.fences.exec(o);if(e){let t=e[0],r=_l(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(o){let e=this.rules.block.heading.exec(o);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let r=He(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(o){let e=this.rules.block.hr.exec(o);if(e)return{type:"hr",raw:He(e[0],`
`)}}blockquote(o){let e=this.rules.block.blockquote.exec(o);if(e){let t=He(e[0],`
`).split(`
`),r="",i="",n=[];for(;t.length>0;){let a=!1,s=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),a=!0;else if(!a)s.push(t[l]);else break;t=t.slice(l);let d=s.join(`
`),u=d.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${d}`:d,i=i?`${i}
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=p,t.length===0)break;let f=n.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let v=f,g=v.raw+`
`+t.join(`
`),b=this.blockquote(g);n[n.length-1]=b,r=r.substring(0,r.length-v.raw.length)+b.raw,i=i.substring(0,i.length-v.text.length)+b.text;break}else if(f?.type==="list"){let v=f,g=v.raw+`
`+t.join(`
`),b=this.list(g);n[n.length-1]=b,r=r.substring(0,r.length-f.raw.length)+b.raw,i=i.substring(0,i.length-v.raw.length)+b.raw,t=g.substring(n.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(o){let e=this.rules.block.list.exec(o);if(e){let t=e[1].trim(),r=t.length>1,i={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");let n=this.rules.other.listItemRegex(t),a=!1;for(;o;){let l=!1,d="",u="";if(!(e=n.exec(o))||this.rules.block.hr.test(o))break;d=e[0],o=o.substring(d.length);let p=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),f=o.split(`
`,1)[0],v=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):v?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=e[1].length),v&&this.rules.other.blankLine.test(f)&&(d+=f+`
`,o=o.substring(f.length+1),l=!0),!l){let T=this.rules.other.nextBulletRegex(g),E=this.rules.other.hrRegex(g),z=this.rules.other.fencesBeginRegex(g),N=this.rules.other.headingBeginRegex(g),R=this.rules.other.htmlBeginRegex(g);for(;o;){let Y=o.split(`
`,1)[0],K;if(f=Y,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,"  "),K=f):K=f.replace(this.rules.other.tabCharGlobal,"    "),z.test(f)||N.test(f)||R.test(f)||T.test(f)||E.test(f))break;if(K.search(this.rules.other.nonSpaceChar)>=g||!f.trim())u+=`
`+K.slice(g);else{if(v||p.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||z.test(p)||N.test(p)||E.test(p))break;u+=`
`+f}!v&&!f.trim()&&(v=!0),d+=Y+`
`,o=o.substring(Y.length+1),p=K.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0));let b=null,A;this.options.gfm&&(b=this.rules.other.listIsTask.exec(u),b&&(A=b[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:d,task:!!b,checked:A,loose:!1,text:u,tokens:[]}),i.raw+=d}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){let d=i.items[l].tokens.filter(p=>p.type==="space"),u=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=u}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(o){let e=this.rules.block.html.exec(o);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(o){let e=this.rules.block.def.exec(o);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(o){let e=this.rules.block.table.exec(o);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ii(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let a=0;a<t.length;a++)n.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:n.align[a]});for(let a of i)n.rows.push(ii(a,n.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:n.align[l]})));return n}}lheading(o){let e=this.rules.block.lheading.exec(o);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(o){let e=this.rules.block.paragraph.exec(o);if(e){let t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(o){let e=this.rules.block.text.exec(o);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(o){let e=this.rules.inline.escape.exec(o);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(o){let e=this.rules.inline.tag.exec(o);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(o){let e=this.rules.inline.link.exec(o);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=He(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=xl(e[2],"()");if(n===-2)return;if(n>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(r);n&&(r=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),ni(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(o,e){let t;if((t=this.rules.inline.reflink.exec(o))||(t=this.rules.inline.nolink.exec(o))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return ni(t,i,t[0],this.lexer,this.rules)}}emStrong(o,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||r[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!t||this.rules.inline.punctuation.exec(t))){let i=[...r[0]].length-1,n,a,s=i,l=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*o.length+i);(r=d.exec(e))!=null;){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(a=[...n].length,r[3]||r[4]){s+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let u=[...r[0]][0].length,p=o.slice(0,i+r.index+u+a);if(Math.min(i,a)%2){let v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(o){let e=this.rules.inline.code.exec(o);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(o){let e=this.rules.inline.br.exec(o);if(e)return{type:"br",raw:e[0]}}del(o){let e=this.rules.inline.del.exec(o);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(o){let e=this.rules.inline.autolink.exec(o);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(o){let e;if(e=this.rules.inline.url.exec(o)){let t,r;if(e[2]==="@")t=e[0],r="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(o){let e=this.rules.inline.text.exec(o);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},te=class Ur{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ce,this.options.tokenizer=this.options.tokenizer||new Dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:j,block:Tt.normal,inline:qe.normal};this.options.pedantic?(t.block=Tt.pedantic,t.inline=qe.pedantic):this.options.gfm&&(t.block=Tt.gfm,this.options.breaks?t.inline=qe.breaks:t.inline=qe.gfm),this.tokenizer.rules=t}static get rules(){return{block:Tt,inline:qe}}static lex(e,t){return new Ur(t).lex(e)}static lexInline(e,t){return new Ur(t).inlineTokens(e)}lex(e){e=e.replace(j.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.options.pedantic&&(e=e.replace(j.tabCharGlobal,"    ").replace(j.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=t.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let n=e;if(this.options.extensions?.startBlock){let a=1/0,s=e.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},s),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(n=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let a=t.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i),r=n.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
`)?"":`
`)+i.raw,a.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r=e,i=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,a="";for(;e;){n||(a=""),n=!1;let s;if(this.options.extensions?.inline?.some(d=>(s=d.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);let d=t.at(-1);s.type==="text"&&d?.type==="text"?(d.raw+=s.raw,d.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,r,a)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startInline){let d=1/0,u=e.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(a=s.raw.slice(-1)),n=!0;let d=t.at(-1);d?.type==="text"?(d.raw+=s.raw,d.text+=s.text):t.push(s);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},Nt=class{options;parser;constructor(o){this.options=o||Ce}space(o){return""}code({text:o,lang:e,escaped:t}){let r=(e||"").match(j.notSpaceStart)?.[0],i=o.replace(j.endingNewline,"")+`
`;return r?'<pre><code class="language-'+ie(r)+'">'+(t?i:ie(i,!0))+`</code></pre>
`:"<pre><code>"+(t?i:ie(i,!0))+`</code></pre>
`}blockquote({tokens:o}){return`<blockquote>
${this.parser.parse(o)}</blockquote>
`}html({text:o}){return o}def(o){return""}heading({tokens:o,depth:e}){return`<h${e}>${this.parser.parseInline(o)}</h${e}>
`}hr(o){return`<hr>
`}list(o){let e=o.ordered,t=o.start,r="";for(let a=0;a<o.items.length;a++){let s=o.items[a];r+=this.listitem(s)}let i=e?"ol":"ul",n=e&&t!==1?' start="'+t+'"':"";return"<"+i+n+`>
`+r+"</"+i+`>
`}listitem(o){let e="";if(o.task){let t=this.checkbox({checked:!!o.checked});o.loose?o.tokens[0]?.type==="paragraph"?(o.tokens[0].text=t+" "+o.tokens[0].text,o.tokens[0].tokens&&o.tokens[0].tokens.length>0&&o.tokens[0].tokens[0].type==="text"&&(o.tokens[0].tokens[0].text=t+" "+ie(o.tokens[0].tokens[0].text),o.tokens[0].tokens[0].escaped=!0)):o.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(o.tokens,!!o.loose),`<li>${e}</li>
`}checkbox({checked:o}){return"<input "+(o?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:o}){return`<p>${this.parser.parseInline(o)}</p>
`}table(o){let e="",t="";for(let i=0;i<o.header.length;i++)t+=this.tablecell(o.header[i]);e+=this.tablerow({text:t});let r="";for(let i=0;i<o.rows.length;i++){let n=o.rows[i];t="";for(let a=0;a<n.length;a++)t+=this.tablecell(n[a]);r+=this.tablerow({text:t})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+r+`</table>
`}tablerow({text:o}){return`<tr>
${o}</tr>
`}tablecell(o){let e=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+e+`</${t}>
`}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${ie(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:e,tokens:t}){let r=this.parser.parseInline(t),i=oi(o);if(i===null)return r;o=i;let n='<a href="'+o+'"';return e&&(n+=' title="'+ie(e)+'"'),n+=">"+r+"</a>",n}image({href:o,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let i=oi(o);if(i===null)return ie(t);o=i;let n=`<img src="${o}" alt="${t}"`;return e&&(n+=` title="${ie(e)}"`),n+=">",n}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:ie(o.text)}},Eo=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}},re=class Vr{options;renderer;textRenderer;constructor(e){this.options=e||Ce,this.options.renderer=this.options.renderer||new Nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Eo}static parse(e,t){return new Vr(t).parse(e)}static parseInline(e,t){return new Vr(t).parseInline(e)}parse(e,t=!0){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=l||"";continue}}let a=n;switch(a.type){case"space":{r+=this.renderer.space(a);continue}case"hr":{r+=this.renderer.hr(a);continue}case"heading":{r+=this.renderer.heading(a);continue}case"code":{r+=this.renderer.code(a);continue}case"table":{r+=this.renderer.table(a);continue}case"blockquote":{r+=this.renderer.blockquote(a);continue}case"list":{r+=this.renderer.list(a);continue}case"html":{r+=this.renderer.html(a);continue}case"def":{r+=this.renderer.def(a);continue}case"paragraph":{r+=this.renderer.paragraph(a);continue}case"text":{let s=a,l=this.renderer.text(s);for(;i+1<e.length&&e[i+1].type==="text";)s=e[++i],l+=`
`+this.renderer.text(s);t?r+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):r+=l;continue}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(e,t=this.renderer){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let s=this.options.extensions.renderers[n.type].call({parser:this},n);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=s||"";continue}}let a=n;switch(a.type){case"escape":{r+=t.text(a);break}case"html":{r+=t.html(a);break}case"link":{r+=t.link(a);break}case"image":{r+=t.image(a);break}case"strong":{r+=t.strong(a);break}case"em":{r+=t.em(a);break}case"codespan":{r+=t.codespan(a);break}case"br":{r+=t.br(a);break}case"del":{r+=t.del(a);break}case"text":{r+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}},Ve=class{options;block;constructor(o){this.options=o||Ce}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(){return this.block?te.lex:te.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},wl=class{defaults=vo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=Nt;TextRenderer=Eo;Lexer=te;Tokenizer=Dt;Hooks=Ve;constructor(...o){this.use(...o)}walkTokens(o,e){let t=[];for(let r of o)switch(t=t.concat(e.call(this,r)),r.type){case"table":{let i=r;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let a of n)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=r;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let a=i[n].flat(1/0);t=t.concat(this.walkTokens(a,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...o){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...a){let s=i.renderer.apply(this,a);return s===!1&&(s=n.apply(this,a)),s}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),t.renderer){let i=this.defaults.renderer||new Nt(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,s=t.renderer[a],l=i[a];i[a]=(...d)=>{let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u||""}}r.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new Dt(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,s=t.tokenizer[a],l=i[a];i[a]=(...d)=>{let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u}}r.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Ve;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,s=t.hooks[a],l=i[a];Ve.passThroughHooks.has(n)?i[a]=d=>{if(this.defaults.async&&Ve.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await s.call(i,d);return l.call(i,p)})();let u=s.call(i,d);return l.call(i,u)}:i[a]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await s.apply(i,d);return p===!1&&(p=await l.apply(i,d)),p})();let u=s.apply(i,d);return u===!1&&(u=l.apply(i,d)),u}}r.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(a){let s=[];return s.push(n.call(this,a)),i&&(s=s.concat(i.call(this,a))),s}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,e){return te.lex(o,e??this.defaults)}parser(o,e){return re.parse(o,e??this.defaults)}parseMarkdown(o){return(e,t)=>{let r={...t},i={...this.defaults,...r},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=o),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,s=await(i.hooks?await i.hooks.provideLexer():o?te.lex:te.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(s):s;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let d=await(i.hooks?await i.hooks.provideParser():o?re.parse:re.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(d):d})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer():o?te.lex:te.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let s=(i.hooks?i.hooks.provideParser():o?re.parse:re.parseInline)(a,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}catch(a){return n(a)}}}onError(o,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+ie(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},$e=new wl;function $(o,e){return $e.parse(o,e)}$.options=$.setOptions=function(o){return $e.setOptions(o),$.defaults=$e.defaults,qi($.defaults),$};$.getDefaults=vo;$.defaults=Ce;$.use=function(...o){return $e.use(...o),$.defaults=$e.defaults,qi($.defaults),$};$.walkTokens=function(o,e){return $e.walkTokens(o,e)};$.parseInline=$e.parseInline;$.Parser=re;$.parser=re.parse;$.Renderer=Nt;$.TextRenderer=Eo;$.Lexer=te;$.lexer=te.lex;$.Tokenizer=Dt;$.Hooks=Ve;$.parse=$;$.options;$.setOptions;$.use;$.walkTokens;$.parseInline;re.parse;te.lex;const It=document.getElementById("update-dialog"),kl=document.getElementById("close-update"),El=document.querySelector(".changelog"),Ue=document.querySelector(".install"),ur=document.querySelector(".reboot");let ai,Ji,Qi,en,hr=!1,Wr=!0;function $l(o,e){return new Promise((t,r)=>{fetch(o).then(i=>{if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.blob()}).then(i=>{const n=new File([i],e,{type:i.type}),a=new FileReader;a.onload=()=>{const s=a.result.split(",")[1];_(`echo ${s} | base64 -d > ${S}/common/tmp/${e}`).then(({errno:l,stderr:d})=>{l===0?t():r(d)})},a.readAsDataURL(n)}).catch(r)})}async function tn(){try{const o=await fetch("https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json").catch(async()=>fetch("https://raw.gitmirror.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json"));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);Wr=!0;const e=await o.json();ai=e.versionCode,Ji=e.version,Qi=e.zipUrl,en=e.changelog,Q("sh",[`${S}/common/get_extra.sh`,"--check-update",`${ai}`]).stdout.on("data",r=>{r.includes("update")&&(it.style.display="flex",Al())})}catch(o){console.error("Error fetching JSON or executing command:",o),x("prompt_no_internet",!1),Wr=!1}}function si(){_(`sh ${S}/common/get_extra.sh --release-note ${Ji}`).then(({stdout:o})=>{window.linkRedirect=Jt,$.setOptions({sanitize:!0,walkTokens(r){if(r.type==="link"){const i=r.href;r.href="javascript:void(0);",r.type="html",r.text=`<a href="javascript:void(0);" onclick="linkRedirect('${i}')">${r.text}</a>`}}});const e=o.split(`
`).filter(r=>r.trim()!=="").join(`
`),t=$.parse(e);El.innerHTML=t})}function Al(){it.addEventListener("click",async()=>{const{stdout:o}=await _(`
            [ -f ${S}/common/tmp/module.zip ] || echo "noModule"
            [ -f ${S}/common/tmp/changelog.md ] || echo "noChangelog"
            [ ! -f /data/adb/modules/TA_utl/update ] || echo "updated"
        `);if(o.trim().includes("updated"))Ue.style.display="none",ur.style.display="flex",It.show();else if(o.trim().includes("noChangelog"))x("prompt_downloading"),await $l(en,"changelog.md"),si(),It.show(),setTimeout(()=>{it.click()},200);else if(o.trim().includes("noModule")){if(hr)return;hr=!0,Q("sh",[`${S}/common/get_extra.sh`,"--get-update",`${Qi}`],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin"}}).on("exit",t=>{hr=!1,t===0?(x("prompt_downloaded"),Ue.style.display="flex"):x("prompt_download_fail",!1)})}else Ue.style.display="flex",si(),It.show()}),kl.addEventListener("click",()=>It.close()),Ue.addEventListener("click",async()=>{x("prompt_installing");const o=Q("sh",[`${S}/common/get_extra.sh`,"--install-update"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});o.stderr.on("data",e=>{console.error("Error during installation:",e)}),o.on("exit",e=>{e===0?(x("prompt_installed"),Ue.style.display="none",ur.style.display="flex"):x("prompt_install_fail",!1)})}),ur.addEventListener("click",async()=>{try{x("prompt_rebooting"),await new Promise(o=>setTimeout(o,1e3)),await _("svc power reboot")}catch(o){x("prompt_reboot_fail",!1),console.error("Fail to reboot:",o)}})}let De=!1;const Re=document.getElementById("security-patch-dialog"),Cl=document.querySelector(".advanced-toggle"),Ft=document.getElementById("advanced-mode"),qt=document.getElementById("normal-mode-inputs"),jr=document.getElementById("advanced-mode-inputs"),Tl=document.getElementById("devconfig-mode-inputs"),We=document.getElementById("all-patch"),je=document.getElementById("boot-patch"),Ke=document.getElementById("system-patch"),Ge=document.getElementById("vendor-patch"),Il=document.getElementById("devconfig-securityPatch"),Sl=document.getElementById("get-patch"),Rl=document.getElementById("auto-config"),Ll=document.getElementById("save-patch"),rn=["securityPatch","osVersion","brand","device","product","manufacturer","model","serial","meid","imei","imei2"];function Le(o,e=null){if(o==="disable")_(`
            rm -f /data/adb/tricky_store/security_patch_auto_config || true
            rm -f /data/adb/tricky_store/security_patch.txt || true
            rm -f /data/adb/tricky_store/devconfig.toml || true
        `).then(({errno:t})=>(x("security_patch_value_empty"),t===0));else if(o==="manual"){const t=De?"/data/adb/tricky_store/devconfig.toml":"/data/adb/tricky_store/security_patch.txt";_(`
            ${De?"":"rm -f /data/adb/tricky_store/security_patch_auto_config || true"}
            echo "${e}" > ${t}
            chmod 644 ${t}
        `).then(({errno:r})=>{const i=r===0;return x(i?"security_patch_save_success":"security_patch_save_failed",i),i})}}async function pr(){let o,e,t,r;try{const{errno:i}=await _("[ -f /data/adb/tricky_store/security_patch_auto_config ]");if(De){const{stdout:n}=await _("cat /data/adb/tricky_store/devconfig.toml");if(n.trim()!==""){const a=n.split(`
`);for(const s of a)for(const l of rn){if(s.trim().startsWith(`${l} =`)){const d=s.split("=")[1].trim().replace(/"/g,"");document.getElementById(`devconfig-${l}`).value=d}n.includes(l)||(document.getElementById(`devconfig-${l}`).value="")}}}else if(i===0)o=null,e=null,t=null,r=null;else{const{stdout:n}=await _("cat /data/adb/tricky_store/security_patch.txt");if(n.trim()!==""){const a=n.split(`
`);for(const s of a)s.startsWith("all=")?(o=s.split("=")[1]||null,o!==null&&(We.value=o)):o=null,s.startsWith("system=")?(e=s.split("=")[1]||null,e!==null&&(Ke.value=e)):e=null,s.startsWith("boot=")?(t=s.split("=")[1]||null,t!==null&&(je.value=t)):t=null,s.startsWith("vendor=")?(r=s.split("=")[1]||null,r!==null&&(Ge.value=r)):r=null}o===null&&(t||e||r)&&Kr(!0)}}catch(i){console.error("Failed to load security patch config:",i)}}function Kr(o){De||(o?(Ft.checked=!0,qt.classList.add("hidden"),jr.classList.remove("hidden")):(Ft.checked=!1,qt.classList.remove("hidden"),jr.classList.add("hidden")))}window.formatDate=function(o){let e=o.value.replace(/-/g,""),t=e.slice(0,4);if(e==="no")return o.value="no",o.setSelectionRange(2,2),"no";if(e.startsWith("n")){if(e.length>1&&e[1]!=="o"&&(e="n"),t=e.slice(0,2),e.length>2)return o.value=t,o.setSelectionRange(2,2),t}else{const s=e.replace(/\D/g,"");s!==e&&(o.value=s,e=s,t=s.slice(0,4)),e.length>=4&&(t+="-"+e.slice(4,6)),e.length>=6&&(t+="-"+e.slice(6,8))}const r=e.slice(-1);(r==="-"||isNaN(r)&&!["n"].includes(r))&&(t=t.slice(0,-1));const i=o.selectionStart;o.value=t;const n=t.length,a=(e.length===4||e.length===6)&&n>i;return o.setSelectionRange(a?n:i,a?n:i),t};function li(o){return o==="no"?!0:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/.test(o)}function Ol(o){return o==="prop"?!0:/^\d{6}$/.test(o)}function Pl(o){return/^\d{8}$/.test(o)}function zl(){_('grep -q "James" "/data/adb/modules/tricky_store/module.prop" && ! grep -q "beakthoven" "/data/adb/modules/tricky_store/module.prop"').then(({errno:o})=>{o===0&&(De=!0,document.getElementById("security-patch").textContent=ke.menu_set_devconfig,Cl.style.display="none",qt.classList.add("hidden"),Tl.classList.remove("hidden"))}),document.getElementById("security-patch").addEventListener("click",()=>{Re.show(),pr()}),Ft.addEventListener("change",()=>{qt.classList.toggle("hidden"),jr.classList.toggle("hidden")}),Rl.addEventListener("click",()=>{const o=Q("sh",[`${S}/common/get_extra.sh`,"--security-patch"]);o.stdout.on("data",e=>{e.includes("not set")&&x("security_patch_auto_failed",!1)}),o.on("exit",e=>{e===0?(_("touch /data/adb/tricky_store/security_patch_auto_config"),We.value="",Ke.value="",je.value="",Ge.value="",Kr(!1),x("security_patch_auto_success")):x("security_patch_auto_failed",!1),Re.close(),pr()})}),Ll.addEventListener("click",async()=>{if(De){const o=new Map;for(const n of rn){const a=document.getElementById(`devconfig-${n}`);a.value.trim()!==""&&o.set(n,a.value.trim())}if(o.size===0){Le("disable"),Re.close();return}o.has("securityPatch")||_("rm -f /data/adb/tricky_store/security_patch_auto_config || true");const e=["securityPatch","osVersion"],t=[],r=[];for(const[n,a]of o.entries())e.includes(n)?n==="osVersion"?t.push(`${n} = ${a}`):t.push(`${n} = "${a}"`):r.push(`${n} = "${a}"`);let i=t.join(`
`);r.length>0&&(i+=`
[deviceProps]
`+r.join(`
`)),Le("manual",i)}else if(Ft.checked){const o=formatDate(je,"boot"),e=Ke.value.trim(),t=Ge.value.trim();if(!o&&!e&&!t){Le("disable"),Re.close();return}if(e&&!Ol(e)){x("security_patch_invalid_system",!1);return}if(o&&!li(o)){x("security_patch_invalid_boot",!1);return}if(t&&!li(t)){x("security_patch_invalid_vendor",!1);return}const r=[e?`system=${e}`:"",o?`boot=${o}`:"",t?`vendor=${t}`:""].filter(Boolean).join(`
`);Le("manual",r)&&(We.value="")}else{const o=We.value.trim();if(!o){Le("disable"),Re.close();return}if(!Pl(o)){x("security_patch_invalid_all",!1);return}const e=`all=${o}`;Le("manual",e)&&(Ke.value="",je.value="",Ge.value="")}Re.close(),pr()}),Sl.addEventListener("click",async()=>{x("security_patch_fetching");const o=Q("sh",[`${S}/common/get_extra.sh`,"--get-security-patch"],{cwd:"/data/local/tmp",env:{PATH:"/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH"}});o.stdout.on("data",e=>{x("security_patch_fetched",!0,1e3),Kr(!0),We.value=e.replace(/-/g,""),Ke.value="prop",je.value=e,Ge.value=e,Il.value=e}),o.stderr.on("data",e=>{e.includes("failed")?x("security_patch_unable_to_connect",!1):console.error(e)}),o.on("exit",e=>{e!==0&&x("security_patch_get_failed",!1)})})}document.body.removeAttribute("unresolved");const on=document.querySelector(".loading"),St=document.getElementById("prompt"),nn=document.querySelector(".floating-btn");let S;const he=[],pe=[],Bl=[];let Gr=!1;window.wx=new po;async function Ml(){try{const{errno:o}=await _("[ -d /data/adb/modules/.TA_utl ]");S=o===0?"/data/adb/modules/.TA_utl":"/data/adb/modules/TA_utl"}catch(o){console.error("Error getting base path:",o)}}function Dl(){_(`grep '^version=' ${S}/common/update/module.prop | cut -d'=' -f2`).then(({stdout:o})=>{document.getElementById("module-version").textContent=o})}async function Ht(){Gr=!0,nn.classList.add("hide"),se.value="",ae.innerHTML="",on.style.display="flex",document.querySelector(".uninstall-container").style.display="none",window.scrollTo(0,0),Wr===!1&&(tn(),_(`rm -f "${S}/common/tmp/exclude-list"`)),zi(),Gr=!1}function Nl(){const o=document.getElementById("security-patch");_(`
        TS_version=$(grep "versionCode=" "/data/adb/modules/tricky_store/module.prop" | cut -d'=' -f2)
        if grep -qE "James|beakthoven" "/data/adb/modules/tricky_store/module.prop"; then
            echo 0
        elif [ "$TS_version" -ge 158 ]; then
            echo 0
        else
            echo $TS_version
        fi
    `).then(({stdout:e})=>{e.trim()==="0"||typeof ksu>"u"?o.style.display="flex":console.log("Tricky Store version:",e.trim())}).catch(e=>{console.error("Error checking Tricky Store version:",e),o.style.display="flex"})}function Fl(){const o=document.getElementById("select-denylist");_("command -v magisk").then(({errno:e})=>{e===0&&(o.style.display="flex")})}function ql(){_("echo $TMPDIR").then(o=>{o.errno===0&&o.stdout.includes("com.sukisu.ultra")&&_("cat /data/data/com.sukisu.ultra/shared_prefs/card_settings.xml").then(e=>{if(e.errno===0)try{const r=new DOMParser().parseFromString(e.stdout,"text/xml"),i=r.querySelector('float[name="card_alpha"]'),n=r.querySelector('float[name="card_dim"]');if(i&&i.getAttribute("value")&&n&&n.getAttribute("value")){const a=parseFloat(i.getAttribute("value")),s=parseFloat(n.getAttribute("value"));if(!isNaN(a)&&!isNaN(s)){const l=Math.round(a*100)/100,d=Math.round(s*100)/100;document.querySelectorAll(".card-alpha").forEach(u=>{let f=window.getComputedStyle(u).backgroundColor||u.style.backgroundColor||"";const v=Hl(f,l,d);v&&(u.style.backgroundColor=v)})}}}catch{}})})}function Hl(o,e,t){if(!o)return null;o=o.trim();let r,i,n;const a=o.match(/rgba?\(([^)]+)\)/i);if(a)[r,i,n]=a[1].split(",").map(g=>parseInt(g.trim())||0);else{const v=o.replace("#",""),g=v.length;if(g===3||g===6||g===8){const b=g===3?v.replace(/./g,"$&$&"):v;r=parseInt(b.slice(0,2),16)||0,i=parseInt(b.slice(2,4),16)||0,n=parseInt(b.slice(4,6),16)||0}else return null}r/=255,i/=255,n/=255;const s=Math.max(r,i,n),l=Math.min(r,i,n);let d,u,p=(s+l)/2;if(s===l)d=u=0;else{const v=s-l;switch(u=p>.5?v/(2-s-l):v/(s+l),s){case r:d=(i-n)/v+(i<n?6:0);break;case i:d=(n-r)/v+2;break;case n:d=(r-i)/v+4;break}d/=6}const f=t/100;return p=p*(1-f),d=Math.round(d*360),u=Math.round(u*100),p=Math.round(p*100),`hsla(${d}, ${u}%, ${p}%, ${e})`}function x(o,e=!0,t=3e3){St.textContent=ke[o],St.classList.toggle("error",!e),St.classList.add("show"),window.promptTimeout&&clearTimeout(window.promptTimeout),window.promptTimeout=setTimeout(()=>{St.classList.remove("show")},t)}function Jt(o){Me("Redirecting to "+o),setTimeout(()=>{_(`am start -a android.intent.action.VIEW -d ${o}`).then(({errno:e})=>{e!==0&&Me("Failed to open link")})},100)}document.getElementById("save").onclick=()=>{const o=Array.from(ae.querySelectorAll("md-checkbox")).filter(i=>i.checked).map(i=>i.closest(".card").getAttribute("data-package"));let e=new Set(o);Bl.forEach(i=>{e.add(i)}),e=Array.from(e);const r=e.map(i=>he.includes(i)?`${i}!`:pe.includes(i)?`${i}?`:i).join(`
`);_(`echo "${r}" | sort -u > /data/adb/tricky_store/target.txt`).then(({errno:i})=>{if(i===0){for(const n of he)_(`sed -i 's/^${n}$/${n}!/' /data/adb/tricky_store/target.txt`);for(const n of pe)_(`sed -i 's/^${n}$/${n}?/' /data/adb/tricky_store/target.txt`);x("prompt_saved_target"),Ht()}else x("prompt_save_error",!1)})};document.querySelector(".uninstall-container").onclick=()=>{const o=document.getElementById("uninstall-confirmation-dialog");o.show(),document.getElementById("cancel-uninstall").onclick=()=>{o.close()},document.getElementById("confirm-uninstall").onclick=()=>{_(`sh ${S}/common/get_extra.sh --uninstall`).then(({errno:e})=>{e===0?x("prompt_uninstall_prompt"):x("prompt_uninstall_failed",!1)}),o.close()}};function Ul(){window.$tricky_store&&Object.keys($tricky_store).length>0&&$tricky_store.setLightStatusBars(!window.matchMedia("(prefers-color-scheme: dark)").matches)}function Vl(){const o=r=>{document.documentElement.classList.toggle("dialog-open",r),document.body.style.overflow=r?"hidden":"",document.documentElement.style.touchAction=r?"none":""},e=r=>{o(!!r.open),new MutationObserver(n=>{for(const a of n)a.type==="attributes"&&a.attributeName==="open"&&o(!!r.open)}).observe(r,{attributes:!0,attributeFilter:["open"]})};document.querySelectorAll("md-dialog").forEach(e),new MutationObserver(r=>{for(const i of r){for(const n of i.addedNodes){if(n.nodeType!==Node.ELEMENT_NODE)continue;const a=n;a.tagName&&a.tagName.toLowerCase()==="md-dialog"?e(a):a.querySelectorAll&&a.querySelectorAll("md-dialog").forEach(e)}i.removedNodes&&i.removedNodes.length&&(document.querySelectorAll("md-dialog[open]").length>0||o(!1))}}).observe(document.body,{childList:!0,subtree:!0})}let ci=window.scrollY;window.addEventListener("scroll",()=>{if(document.querySelectorAll("md-menu").forEach(e=>e.close()),Gr)return;const o=window.scrollY>ci&&window.scrollY>40;nn.classList.toggle("hide",o),document.querySelectorAll(".header-bg").forEach(e=>{e.classList.toggle("scroll",window.scrollY>10)}),ci=window.scrollY});wx.on(window,"back",()=>{for(const o of document.querySelectorAll("md-dialog"))if(o.open){o.close();return}webui.exit()});document.addEventListener("DOMContentLoaded",async()=>{await Ls(),await Ml(),Ul(),Dl(),Bs(),zi(),Nl(),Fl(),tn(),zl(),Vl(),document.getElementById("refresh").onclick=Ht});const an=document.getElementById("about-dialog"),Wl=document.getElementById("close-about");let Pe=!1;document.getElementById("about").addEventListener("click",()=>{an.show()});Wl.onclick=()=>an.close();document.getElementById("telegram").onclick=()=>{Jt("https://t.me/kowchannel")};document.getElementById("github").onclick=()=>{Jt("https://github.com/KOWX712/Tricky-Addon-Update-Target-List")};document.getElementById("canary").onclick=()=>{if(Pe)return;Pe=!0,x("prompt_checking_update",!0,1e4);let o="";const t=Q("sh",[`${S}/common/get_extra.sh`,"--download","https://nightly.link/KOWX712/Tricky-Addon-Update-Target-List/workflows/build/main?preview"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});t.stdout.on("data",r=>{o+=r}),t.on("exit",async r=>{if(r===0){const a=new DOMParser().parseFromString(o,"text/html").querySelector('a[href$=".zip"]')?.href;if(a){const s=a.split("-"),l=s.length>=2?s[s.length-2]:null;Q("sh",[`${S}/common/get_extra.sh`,"--check-update",`${l}`],{env:{CANARY:"true"}}).on("exit",u=>{u===0?(x("prompt_no_update"),Pe=!1):u===1&&jl(a)})}else console.error("No link found.")}else console.error("Error fetching ZIP link"),Pe=!1})};function jl(o){x("prompt_downloading",!0,2e4),Q("sh",[`${S}/common/get_extra.sh`,"--get-update",`${o}`],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin"}}).on("exit",t=>{t===0?Kl():(x("prompt_download_fail",!1),Pe=!1)})}function Kl(){x("prompt_installing");const o=Q("sh",[`${S}/common/get_extra.sh`,"--install-update"],{env:{PATH:"$PATH:/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk"}});o.stderr.on("data",e=>{console.error("Error during installation:",e)}),o.on("exit",e=>{e===0?x("prompt_installed"):x("prompt_install_fail",!1),Pe=!1})}const $o=document.getElementById("boot-hash-dialog"),Ut=document.getElementById("boot-hash-input"),sn=document.getElementById("boot-hash-save-button"),Gl=document.getElementById("cancel-boot-hash");window.trimInput=o=>{o.value=o.value.replace(/\s+/g,"").toLowerCase()};document.getElementById("boot-hash").addEventListener("click",async()=>{$o.show(),_("sed '/[^#]/d; /^$/d' /data/adb/boot_hash").then(({errno:o,stdout:e})=>{if(o!==0)Ut.value="";else{const t=e.trim();Ut.value=t||""}})});sn.addEventListener("click",async()=>{const o=Ut.value.trim();_(`
        resetprop -n ro.boot.vbmeta.digest "${o}"
        [ -z "${o}" ] && rm -f /data/adb/boot_hash || {
            echo "${o}" > /data/adb/boot_hash
            chmod 644 /data/adb/boot_hash
        }
    `,{env:{PATH:"/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH"}}).then(()=>{x("prompt_boot_hash_set"),$o.close()})});Gl.addEventListener("click",()=>{$o.close()});Ut.addEventListener("keydown",o=>{o.key==="Enter"&&sn.click()});
