UNPKG

cmd-dialog

Version:

Command dialog and keyboard shortcuts palette for web apps

55 lines 89.4 kB
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const n of o)if(n.type==="childList")for(const s of n.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function e(o){const n={};return o.integrity&&(n.integrity=o.integrity),o.referrerPolicy&&(n.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?n.credentials="include":o.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(o){if(o.ep)return;o.ep=!0;const n=e(o);fetch(o.href,n)}})();function B(i){return Array.isArray?Array.isArray(i):ne(i)==="[object Array]"}function $e(i){if(typeof i=="string")return i;let t=i+"";return t=="0"&&1/i==-1/0?"-0":t}function _e(i){return i==null?"":$e(i)}function _(i){return typeof i=="string"}function re(i){return typeof i=="number"}function Ee(i){return i===!0||i===!1||Ce(i)&&ne(i)=="[object Boolean]"}function oe(i){return typeof i=="object"}function Ce(i){return oe(i)&&i!==null}function b(i){return i!=null}function mt(i){return!i.trim().length}function ne(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Me="Incorrect 'index' type",Se=i=>`Invalid value for key ${i}`,Be=i=>`Pattern length exceeds max of ${i}.`,De=i=>`Missing ${i} property in key`,Ie=i=>`Property 'weight' in key '${i}' must be a positive integer`,Nt=Object.prototype.hasOwnProperty;class ze{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(r=>{let o=se(r);this._keys.push(o),this._keyMap[o.id]=o,e+=o.weight}),this._keys.forEach(r=>{r.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function se(i){let t=null,e=null,r=null,o=1,n=null;if(_(i)||B(i))r=i,t=jt(i),e=xt(i);else{if(!Nt.call(i,"name"))throw new Error(De("name"));const s=i.name;if(r=s,Nt.call(i,"weight")&&(o=i.weight,o<=0))throw new Error(Ie(s));t=jt(s),e=xt(s),n=i.getFn}return{path:t,id:e,weight:o,src:r,getFn:n}}function jt(i){return B(i)?i:i.split(".")}function xt(i){return B(i)?i.join("."):i}function Oe(i,t){let e=[],r=!1;const o=(n,s,l)=>{if(b(n))if(!s[l])e.push(n);else{let a=s[l];const c=n[a];if(!b(c))return;if(l===s.length-1&&(_(c)||re(c)||Ee(c)))e.push(_e(c));else if(B(c)){r=!0;for(let d=0,h=c.length;d<h;d+=1)o(c[d],s,l+1)}else s.length&&o(c,s,l+1)}};return o(i,_(t)?t.split("."):t,0),r?e:e[0]}const Fe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Pe={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(i,t)=>i.score===t.score?i.idx<t.idx?-1:1:i.score<t.score?-1:1},Te={location:0,threshold:.6,distance:100},Re={useExtendedSearch:!1,getFn:Oe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var g={...Pe,...Fe,...Te,...Re};const Le=/[^ ]+/g;function Ne(i=1,t=3){const e=new Map,r=Math.pow(10,t);return{get(o){const n=o.match(Le).length;if(e.has(n))return e.get(n);const s=1/Math.pow(n,.5*i),l=parseFloat(Math.round(s*r)/r);return e.set(n,l),l},clear(){e.clear()}}}class St{constructor({getFn:t=g.getFn,fieldNormWeight:e=g.fieldNormWeight}={}){this.norm=Ne(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,r)=>{this._keysMap[e.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();_(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,r=this.size();e<r;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!b(t)||mt(t))return;let r={v:t,i:e,n:this.norm.get(t)};this.records.push(r)}_addObject(t,e){let r={i:e,$:{}};this.keys.forEach((o,n)=>{let s=o.getFn?o.getFn(t):this.getFn(t,o.path);if(b(s)){if(B(s)){let l=[];const a=[{nestedArrIndex:-1,value:s}];for(;a.length;){const{nestedArrIndex:c,value:d}=a.pop();if(b(d))if(_(d)&&!mt(d)){let h={v:d,i:c,n:this.norm.get(d)};l.push(h)}else B(d)&&d.forEach((h,u)=>{a.push({nestedArrIndex:u,value:h})})}r.$[n]=l}else if(_(s)&&!mt(s)){let l={v:s,n:this.norm.get(s)};r.$[n]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function ae(i,t,{getFn:e=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){const o=new St({getFn:e,fieldNormWeight:r});return o.setKeys(i.map(se)),o.setSources(t),o.create(),o}function je(i,{getFn:t=g.getFn,fieldNormWeight:e=g.fieldNormWeight}={}){const{keys:r,records:o}=i,n=new St({getFn:t,fieldNormWeight:e});return n.setKeys(r),n.setIndexRecords(o),n}function ot(i,{errors:t=0,currentLocation:e=0,expectedLocation:r=0,distance:o=g.distance,ignoreLocation:n=g.ignoreLocation}={}){const s=t/i.length;if(n)return s;const l=Math.abs(r-e);return o?s+l/o:l?1:s}function Ue(i=[],t=g.minMatchCharLength){let e=[],r=-1,o=-1,n=0;for(let s=i.length;n<s;n+=1){let l=i[n];l&&r===-1?r=n:!l&&r!==-1&&(o=n-1,o-r+1>=t&&e.push([r,o]),r=-1)}return i[n-1]&&n-r>=t&&e.push([r,n-1]),e}const L=32;function He(i,t,e,{location:r=g.location,distance:o=g.distance,threshold:n=g.threshold,findAllMatches:s=g.findAllMatches,minMatchCharLength:l=g.minMatchCharLength,includeMatches:a=g.includeMatches,ignoreLocation:c=g.ignoreLocation}={}){if(t.length>L)throw new Error(Be(L));const d=t.length,h=i.length,u=Math.max(0,Math.min(r,h));let p=n,f=u;const m=l>1||a,v=m?Array(h):[];let A;for(;(A=i.indexOf(t,f))>-1;){let x=ot(t,{currentLocation:A,expectedLocation:u,distance:o,ignoreLocation:c});if(p=Math.min(x,p),f=A+d,m){let D=0;for(;D<d;)v[A+D]=1,D+=1}}f=-1;let M=[],H=1,P=d+h;const Ae=1<<d-1;for(let x=0;x<d;x+=1){let D=0,I=P;for(;D<I;)ot(t,{errors:x,currentLocation:u+I,expectedLocation:u,distance:o,ignoreLocation:c})<=p?D=I:P=I,I=Math.floor((P-D)/2+D);P=I;let Rt=Math.max(1,u-I+1),wt=s?h:Math.min(u+I,h)+d,W=Array(wt+2);W[wt+1]=(1<<x)-1;for(let $=wt;$>=Rt;$-=1){let rt=$-1,Lt=e[i.charAt(rt)];if(m&&(v[rt]=+!!Lt),W[$]=(W[$+1]<<1|1)&Lt,x&&(W[$]|=(M[$+1]|M[$])<<1|1|M[$+1]),W[$]&Ae&&(H=ot(t,{errors:x,currentLocation:rt,expectedLocation:u,distance:o,ignoreLocation:c}),H<=p)){if(p=H,f=rt,f<=u)break;Rt=Math.max(1,2*u-f)}}if(ot(t,{errors:x+1,currentLocation:u,expectedLocation:u,distance:o,ignoreLocation:c})>p)break;M=W}const ft={isMatch:f>=0,score:Math.max(.001,H)};if(m){const x=Ue(v,l);x.length?a&&(ft.indices=x):ft.isMatch=!1}return ft}function We(i){let t={};for(let e=0,r=i.length;e<r;e+=1){const o=i.charAt(e);t[o]=(t[o]||0)|1<<r-e-1}return t}const st=String.prototype.normalize?i=>i.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):i=>i;class le{constructor(t,{location:e=g.location,threshold:r=g.threshold,distance:o=g.distance,includeMatches:n=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:l=g.minMatchCharLength,isCaseSensitive:a=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:d=g.ignoreLocation}={}){if(this.options={location:e,threshold:r,distance:o,includeMatches:n,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:a,ignoreDiacritics:c,ignoreLocation:d},t=a?t:t.toLowerCase(),t=c?st(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const h=(p,f)=>{this.chunks.push({pattern:p,alphabet:We(p),startIndex:f})},u=this.pattern.length;if(u>L){let p=0;const f=u%L,m=u-f;for(;p<m;)h(this.pattern.substr(p,L),p),p+=L;if(f){const v=u-L;h(this.pattern.substr(v),v)}}else h(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:r,includeMatches:o}=this.options;if(t=e?t:t.toLowerCase(),t=r?st(t):t,this.pattern===t){let m={isMatch:!0,score:0};return o&&(m.indices=[[0,t.length-1]]),m}const{location:n,distance:s,threshold:l,findAllMatches:a,minMatchCharLength:c,ignoreLocation:d}=this.options;let h=[],u=0,p=!1;this.chunks.forEach(({pattern:m,alphabet:v,startIndex:A})=>{const{isMatch:M,score:H,indices:P}=He(t,m,v,{location:n+A,distance:s,threshold:l,findAllMatches:a,minMatchCharLength:c,includeMatches:o,ignoreLocation:d});M&&(p=!0),u+=H,M&&P&&(h=[...h,...P])});let f={isMatch:p,score:p?u/this.chunks.length:1};return p&&o&&(f.indices=h),f}}class F{constructor(t){this.pattern=t}static isMultiMatch(t){return Ut(t,this.multiRegex)}static isSingleMatch(t){return Ut(t,this.singleRegex)}search(){}}function Ut(i,t){const e=i.match(t);return e?e[1]:null}class Ke extends F{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ve extends F{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Ge extends F{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ye extends F{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Je extends F{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Qe extends F{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class ce extends F{constructor(t,{location:e=g.location,threshold:r=g.threshold,distance:o=g.distance,includeMatches:n=g.includeMatches,findAllMatches:s=g.findAllMatches,minMatchCharLength:l=g.minMatchCharLength,isCaseSensitive:a=g.isCaseSensitive,ignoreDiacritics:c=g.ignoreDiacritics,ignoreLocation:d=g.ignoreLocation}={}){super(t),this._bitapSearch=new le(t,{location:e,threshold:r,distance:o,includeMatches:n,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:a,ignoreDiacritics:c,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class he extends F{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,r;const o=[],n=this.pattern.length;for(;(r=t.indexOf(this.pattern,e))>-1;)e=r+n,o.push([r,e-1]);const s=!!o.length;return{isMatch:s,score:s?0:1,indices:o}}}const kt=[Ke,he,Ge,Ye,Qe,Je,Ve,ce],Ht=kt.length,qe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Xe="|";function Ze(i,t={}){return i.split(Xe).map(e=>{let r=e.trim().split(qe).filter(n=>n&&!!n.trim()),o=[];for(let n=0,s=r.length;n<s;n+=1){const l=r[n];let a=!1,c=-1;for(;!a&&++c<Ht;){const d=kt[c];let h=d.isMultiMatch(l);h&&(o.push(new d(h,t)),a=!0)}if(!a)for(c=-1;++c<Ht;){const d=kt[c];let h=d.isSingleMatch(l);if(h){o.push(new d(h,t));break}}}return o})}const ti=new Set([ce.type,he.type]);class ei{constructor(t,{isCaseSensitive:e=g.isCaseSensitive,ignoreDiacritics:r=g.ignoreDiacritics,includeMatches:o=g.includeMatches,minMatchCharLength:n=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:l=g.findAllMatches,location:a=g.location,threshold:c=g.threshold,distance:d=g.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:n,findAllMatches:l,ignoreLocation:s,location:a,threshold:c,distance:d},t=e?t:t.toLowerCase(),t=r?st(t):t,this.pattern=t,this.query=Ze(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:o,ignoreDiacritics:n}=this.options;t=o?t:t.toLowerCase(),t=n?st(t):t;let s=0,l=[],a=0;for(let c=0,d=e.length;c<d;c+=1){const h=e[c];l.length=0,s=0;for(let u=0,p=h.length;u<p;u+=1){const f=h[u],{isMatch:m,indices:v,score:A}=f.search(t);if(m){if(s+=1,a+=A,r){const M=f.constructor.type;ti.has(M)?l=[...l,...v]:l.push(v)}}else{a=0,s=0,l.length=0;break}}if(s){let u={isMatch:!0,score:a/s};return r&&(u.indices=l),u}}return{isMatch:!1,score:1}}}const At=[];function ii(...i){At.push(...i)}function $t(i,t){for(let e=0,r=At.length;e<r;e+=1){let o=At[e];if(o.condition(i,t))return new o(i,t)}return new le(i,t)}const at={AND:"$and",OR:"$or"},_t={PATH:"$path",PATTERN:"$val"},Et=i=>!!(i[at.AND]||i[at.OR]),ri=i=>!!i[_t.PATH],oi=i=>!B(i)&&oe(i)&&!Et(i),Wt=i=>({[at.AND]:Object.keys(i).map(t=>({[t]:i[t]}))});function de(i,t,{auto:e=!0}={}){const r=o=>{let n=Object.keys(o);const s=ri(o);if(!s&&n.length>1&&!Et(o))return r(Wt(o));if(oi(o)){const a=s?o[_t.PATH]:n[0],c=s?o[_t.PATTERN]:o[a];if(!_(c))throw new Error(Se(a));const d={keyId:xt(a),pattern:c};return e&&(d.searcher=$t(c,t)),d}let l={children:[],operator:n[0]};return n.forEach(a=>{const c=o[a];B(c)&&c.forEach(d=>{l.children.push(r(d))})}),l};return Et(i)||(i=Wt(i)),r(i)}function ni(i,{ignoreFieldNorm:t=g.ignoreFieldNorm}){i.forEach(e=>{let r=1;e.matches.forEach(({key:o,norm:n,score:s})=>{const l=o?o.weight:null;r*=Math.pow(s===0&&l?Number.EPSILON:s,(l||1)*(t?1:n))}),e.score=r})}function si(i,t){const e=i.matches;t.matches=[],b(e)&&e.forEach(r=>{if(!b(r.indices)||!r.indices.length)return;const{indices:o,value:n}=r;let s={indices:o,value:n};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),t.matches.push(s)})}function ai(i,t){t.score=i.score}function li(i,t,{includeMatches:e=g.includeMatches,includeScore:r=g.includeScore}={}){const o=[];return e&&o.push(si),r&&o.push(ai),i.map(n=>{const{idx:s}=n,l={item:t[s],refIndex:s};return o.length&&o.forEach(a=>{a(n,l)}),l})}class J{constructor(t,e={},r){this.options={...g,...e},this.options.useExtendedSearch,this._keyStore=new ze(this.options.keys),this.setCollection(t,r)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof St))throw new Error(Me);this._myIndex=e||ae(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){b(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let r=0,o=this._docs.length;r<o;r+=1){const n=this._docs[r];t(n,r)&&(this.removeAt(r),r-=1,o-=1,e.push(n))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:r,includeScore:o,shouldSort:n,sortFn:s,ignoreFieldNorm:l}=this.options;let a=_(t)?_(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return ni(a,{ignoreFieldNorm:l}),n&&a.sort(s),re(e)&&e>-1&&(a=a.slice(0,e)),li(a,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const e=$t(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:n,i:s,n:l})=>{if(!b(n))return;const{isMatch:a,score:c,indices:d}=e.searchIn(n);a&&o.push({item:n,idx:s,matches:[{score:c,value:n,norm:l,indices:d}]})}),o}_searchLogical(t){const e=de(t,this.options),r=(l,a,c)=>{if(!l.children){const{keyId:h,searcher:u}=l,p=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(a,h),searcher:u});return p&&p.length?[{idx:c,item:a,matches:p}]:[]}const d=[];for(let h=0,u=l.children.length;h<u;h+=1){const p=l.children[h],f=r(p,a,c);if(f.length)d.push(...f);else if(l.operator===at.AND)return[]}return d},o=this._myIndex.records,n={},s=[];return o.forEach(({$:l,i:a})=>{if(b(l)){let c=r(e,l,a);c.length&&(n[a]||(n[a]={idx:a,item:l,matches:[]},s.push(n[a])),c.forEach(({matches:d})=>{n[a].matches.push(...d)}))}}),s}_searchObjectList(t){const e=$t(t,this.options),{keys:r,records:o}=this._myIndex,n=[];return o.forEach(({$:s,i:l})=>{if(!b(s))return;let a=[];r.forEach((c,d)=>{a.push(...this._findMatches({key:c,value:s[d],searcher:e}))}),a.length&&n.push({idx:l,item:s,matches:a})}),n}_findMatches({key:t,value:e,searcher:r}){if(!b(e))return[];let o=[];if(B(e))e.forEach(({v:n,i:s,n:l})=>{if(!b(n))return;const{isMatch:a,score:c,indices:d}=r.searchIn(n);a&&o.push({score:c,key:t,value:n,idx:s,norm:l,indices:d})});else{const{v:n,n:s}=e,{isMatch:l,score:a,indices:c}=r.searchIn(n);l&&o.push({score:a,key:t,value:n,norm:s,indices:c})}return o}}J.version="7.1.0";J.createIndex=ae;J.parseIndex=je;J.config=g;J.parseQuery=de;ii(ei);/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const nt=globalThis,Bt=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ue=Symbol(),Kt=new WeakMap;let ci=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==ue)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Bt&&t===void 0){const r=e!==void 0&&e.length===1;r&&(t=Kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Kt.set(e,t))}return t}toString(){return this.cssText}};const Dt=i=>new ci(typeof i=="string"?i:i+"",void 0,ue),hi=(i,t)=>{if(Bt)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const r=document.createElement("style"),o=nt.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,i.appendChild(r)}},Vt=Bt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return Dt(e)})(i):i;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:di,defineProperty:ui,getOwnPropertyDescriptor:pi,getOwnPropertyNames:gi,getOwnPropertySymbols:fi,getPrototypeOf:wi}=Object,ht=globalThis,Gt=ht.trustedTypes,mi=Gt?Gt.emptyScript:"",vi=ht.reactiveElementPolyfillSupport,Z=(i,t)=>i,lt={toAttribute(i,t){switch(t){case Boolean:i=i?mi:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},It=(i,t)=>!di(i,t),Yt={attribute:!0,type:String,converter:lt,reflect:!1,useDefault:!1,hasChanged:It};Symbol.metadata??=Symbol("metadata"),ht.litPropertyMetadata??=new WeakMap;let K=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&ui(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){const{get:o,set:n}=pi(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:o,set(s){const l=o?.call(this);n?.call(this,s),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Yt}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;const t=wi(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){const e=this.properties,r=[...gi(e),...fi(e)];for(const o of r)this.createProperty(o,e[o])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const o of r)e.unshift(Vt(o))}else t!==void 0&&e.push(Vt(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return hi(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:lt).toAttribute(e,r.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){const r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const n=r.getPropertyOptions(o),s=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:lt;this._$Em=o,this[o]=s.fromAttribute(e,n.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){const o=this.constructor,n=this[t];if(r??=o.getPropertyOptions(t),!((r.hasChanged??It)(n,e)||r.useDefault&&r.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:n},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),n!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[o,n]of r){const{wrapped:s}=n,l=this[o];s!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,n,l)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};K.elementStyles=[],K.shadowRootOptions={mode:"open"},K[Z("elementProperties")]=new Map,K[Z("finalized")]=new Map,vi?.({ReactiveElement:K}),(ht.reactiveElementVersions??=[]).push("2.1.0");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const zt=globalThis,ct=zt.trustedTypes,Jt=ct?ct.createPolicy("lit-html",{createHTML:i=>i}):void 0,pe="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,ge="?"+z,bi=`<${ge}>`,j=document,tt=()=>j.createComment(""),et=i=>i===null||typeof i!="object"&&typeof i!="function",Ot=Array.isArray,yi=i=>Ot(i)||typeof i?.[Symbol.iterator]=="function",vt=`[ \f\r]`,q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qt=/-->/g,qt=/>/g,T=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Xt=/'/g,Zt=/"/g,fe=/^(?:script|style|textarea|title)$/i,xi=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),O=xi(1),y=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),te=new WeakMap,N=j.createTreeWalker(j,129);function we(i,t){if(!Ot(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}const ki=(i,t)=>{const e=i.length-1,r=[];let o,n=t===2?"<svg>":t===3?"<math>":"",s=q;for(let l=0;l<e;l++){const a=i[l];let c,d,h=-1,u=0;for(;u<a.length&&(s.lastIndex=u,d=s.exec(a),d!==null);)u=s.lastIndex,s===q?d[1]==="!--"?s=Qt:d[1]!==void 0?s=qt:d[2]!==void 0?(fe.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=T):d[3]!==void 0&&(s=T):s===T?d[0]===">"?(s=o??q,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?T:d[3]==='"'?Zt:Xt):s===Zt||s===Xt?s=T:s===Qt||s===qt?s=q:(s=T,o=void 0);const p=s===T&&i[l+1].startsWith("/>")?" ":"";n+=s===q?a+bi:h>=0?(r.push(c),a.slice(0,h)+pe+a.slice(h)+z+p):a+z+(h===-2?l:p)}return[we(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};class it{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let n=0,s=0;const l=t.length-1,a=this.parts,[c,d]=ki(t,e);if(this.el=it.createElement(c,r),N.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=N.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(const h of o.getAttributeNames())if(h.endsWith(pe)){const u=d[s++],p=o.getAttribute(h).split(z),f=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:f[2],strings:p,ctor:f[1]==="."?$i:f[1]==="?"?_i:f[1]==="@"?Ei:dt}),o.removeAttribute(h)}else h.startsWith(z)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(fe.test(o.tagName)){const h=o.textContent.split(z),u=h.length-1;if(u>0){o.textContent=ct?ct.emptyScript:"";for(let p=0;p<u;p++)o.append(h[p],tt()),N.nextNode(),a.push({type:2,index:++n});o.append(h[u],tt())}}}else if(o.nodeType===8)if(o.data===ge)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf(z,h+1))!==-1;)a.push({type:7,index:n}),h+=z.length-1}n++}}static createElement(t,e){const r=j.createElement("template");return r.innerHTML=t,r}}function G(i,t,e=i,r){if(t===y)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl;const n=et(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(i),o._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=G(i,o._$AS(i,t.values),o,r)),t}let Ai=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??j).importNode(e,!0);N.currentNode=o;let n=N.nextNode(),s=0,l=0,a=r[0];for(;a!==void 0;){if(s===a.index){let c;a.type===2?c=new Q(n,n.nextSibling,this,t):a.type===1?c=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(c=new Ci(n,this,t)),this._$AV.push(c),a=r[++l]}s!==a?.index&&(n=N.nextNode(),s++)}return N.currentNode=j,o}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}};class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),et(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==y&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):yi(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==w&&et(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=it.createElement(we(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{const n=new Ai(o,this),s=n.u(this.options);n.p(e),this.T(s),this._$AH=n}}_$AC(t){let e=te.get(t.strings);return e===void 0&&te.set(t.strings,e=new it(t)),e}k(t){Ot(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,o=0;for(const n of t)o===e.length?e.push(r=new Q(this.O(tt()),this.O(tt()),this,this.options)):r=e[o],r._$AI(n),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,n){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=w}_$AI(t,e=this,r,o){const n=this.strings;let s=!1;if(n===void 0)t=G(this,t,e,0),s=!et(t)||t!==this._$AH&&t!==y,s&&(this._$AH=t);else{const l=t;let a,c;for(t=n[0],a=0;a<n.length-1;a++)c=G(this,l[r+a],e,a),c===y&&(c=this._$AH[a]),s||=!et(c)||c!==this._$AH[a],c===w?t=w:t!==w&&(t+=(c??"")+n[a+1]),this._$AH[a]=c}s&&!o&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $i extends dt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}}class _i extends dt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w)}}class Ei extends dt{constructor(t,e,r,o,n){super(t,e,r,o,n),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??w)===y)return;const r=this._$AH,o=t===w&&r!==w||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==w&&(r===w||o);o&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ci{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const Mi={I:Q},Si=zt.litHtmlPolyfillSupport;Si?.(it,Q),(zt.litHtmlVersions??=[]).push("3.3.0");const Bi=(i,t,e)=>{const r=e?.renderBefore??t;let o=r._$litPart$;if(o===void 0){const n=e?.renderBefore??null;r._$litPart$=o=new Q(t.insertBefore(tt(),n),n,void 0,e??{})}return o._$AI(i),o};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ft=globalThis;let V=class extends K{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Bi(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return y}};V._$litElement$=!0,V.finalized=!0,Ft.litElementHydrateSupport?.({LitElement:V});const Di=Ft.litElementPolyfillSupport;Di?.({LitElement:V});(Ft.litElementVersions??=[]).push("4.2.0");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const me=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ii={attribute:!0,type:String,converter:lt,reflect:!1,hasChanged:It},zi=(i=Ii,t,e)=>{const{kind:r,metadata:o}=e;let n=globalThis.litPropertyMetadata.get(o);if(n===void 0&&globalThis.litPropertyMetadata.set(o,n=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(e.name,i),r==="accessor"){const{name:s}=e;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(s,a,i)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){const{name:s}=e;return function(l){const a=this[s];t.call(this,l),this.requestUpdate(s,a,i)}}throw Error("Unsupported decorator location: "+r)};function E(i){return(t,e)=>typeof e=="object"?zi(i,t,e):((r,o,n)=>{const s=o.hasOwnProperty(n);return o.constructor.createProperty(n,r),s?Object.getOwnPropertyDescriptor(o,n):void 0})(i,t,e)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function Pt(i){return E({...i,state:!0,attribute:!1})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const S={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},ut=i=>(...t)=>({_$litDirective$:i,values:t});let pt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{I:Oi}=Mi,Fi=i=>i.strings===void 0,ee=()=>document.createComment(""),X=(i,t,e)=>{const r=i._$AA.parentNode,o=t===void 0?i._$AB:t._$AA;if(e===void 0){const n=r.insertBefore(ee(),o),s=r.insertBefore(ee(),o);e=new Oi(n,s,i,i.options)}else{const n=e._$AB.nextSibling,s=e._$AM,l=s!==i;if(l){let a;e._$AQ?.(i),e._$AM=i,e._$AP!==void 0&&(a=i._$AU)!==s._$AU&&e._$AP(a)}if(n!==o||l){let a=e._$AA;for(;a!==n;){const c=a.nextSibling;r.insertBefore(a,o),a=c}}}return e},R=(i,t,e=i)=>(i._$AI(t,e),i),Pi={},ve=(i,t=Pi)=>i._$AH=t,Ti=i=>i._$AH,bt=i=>{i._$AP?.(!1,!0);let t=i._$AA;const e=i._$AB.nextSibling;for(;t!==e;){const r=t.nextSibling;t.remove(),t=r}};/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ri=ut(class extends pt{constructor(i){if(super(i),i.type!==S.PROPERTY&&i.type!==S.ATTRIBUTE&&i.type!==S.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Fi(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===y||t===w)return t;const e=i.element,r=i.name;if(i.type===S.PROPERTY){if(t===e[r])return y}else if(i.type===S.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return y}else if(i.type===S.ATTRIBUTE&&e.getAttribute(r)===t+"")return y;return ve(i),t}});/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const ie=(i,t,e)=>{const r=new Map;for(let o=t;o<=e;o++)r.set(i[o],o);return r},be=ut(class extends pt{constructor(i){if(super(i),i.type!==S.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,t,e){let r;e===void 0?e=t:t!==void 0&&(r=t);const o=[],n=[];let s=0;for(const l of i)o[s]=r?r(l,s):s,n[s]=e(l,s),s++;return{values:n,keys:o}}render(i,t,e){return this.dt(i,t,e).values}update(i,[t,e,r]){const o=Ti(i),{values:n,keys:s}=this.dt(t,e,r);if(!Array.isArray(o))return this.ut=s,n;const l=this.ut??=[],a=[];let c,d,h=0,u=o.length-1,p=0,f=n.length-1;for(;h<=u&&p<=f;)if(o[h]===null)h++;else if(o[u]===null)u--;else if(l[h]===s[p])a[p]=R(o[h],n[p]),h++,p++;else if(l[u]===s[f])a[f]=R(o[u],n[f]),u--,f--;else if(l[h]===s[f])a[f]=R(o[h],n[f]),X(i,a[f+1],o[h]),h++,f--;else if(l[u]===s[p])a[p]=R(o[u],n[p]),X(i,o[h],o[u]),u--,p++;else if(c===void 0&&(c=ie(s,p,f),d=ie(l,h,u)),c.has(l[h]))if(c.has(l[u])){const m=d.get(s[p]),v=m!==void 0?o[m]:null;if(v===null){const A=X(i,o[h]);R(A,n[p]),a[p]=A}else a[p]=R(v,n[p]),X(i,o[h],v),o[m]=null;p++}else bt(o[u]),u--;else bt(o[h]),h++;for(;p<=f;){const m=X(i,a[f+1]);R(m,n[p]),a[p++]=m}for(;h<=u;){const m=o[h++];m!==null&&bt(m)}return this.ut=s,ve(i,a),y}});/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let Ct=class extends pt{constructor(t){if(super(t),this.it=w,t.type!==S.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===w||t==null)return this._t=void 0,this.it=t;if(t===y)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Ct.directiveName="unsafeHTML",Ct.resultType=1;const ye=ut(Ct);var Li=["Shift","Meta","Alt","Control"],xe=typeof navigator=="object"?navigator.platform:"",ke=/Mac|iPod|iPhone|iPad/.test(xe),Ni=ke?"Meta":"Control",ji=xe==="Win32"?["Control","Alt"]:ke?["Alt"]:[];function Mt(i,t){return typeof i.getModifierState=="function"&&(i.getModifierState(t)||ji.includes(t)&&i.getModifierState("AltGraph"))}function Ui(i){return i.trim().split(" ").map(function(t){var e=t.split(/\b\+/),r=e.pop(),o=r.match(/^\((.+)\)$/);return o&&(r=new RegExp("^"+o[1]+"$")),[e=e.map(function(n){return n==="$mod"?Ni:n}),r]})}function Hi(i,t){var e=t[0],r=t[1];return!((r instanceof RegExp?!r.test(i.key)&&!r.test(i.code):r.toUpperCase()!==i.key.toUpperCase()&&r!==i.code)||e.find(function(o){return!Mt(i,o)})||Li.find(function(o){return!e.includes(o)&&r!==o&&Mt(i,o)}))}function Wi(i,t){var e;t===void 0&&(t={});var r=(e=t.timeout)!=null?e:1e3,o=Object.keys(i).map(function(l){return[Ui(l),i[l]]}),n=new Map,s=null;return function(l){l instanceof KeyboardEvent&&(o.forEach(function(a){var c=a[0],d=a[1],h=n.get(c)||c;Hi(l,h[0])?h.length>1?n.set(c,h.slice(1)):(n.delete(c),d(l)):Mt(l,l.key)||n.delete(c)}),s&&clearTimeout(s),s=setTimeout(n.clear.bind(n),r))}}function yt(i,t,e){var r={},o=r.event,n=o===void 0?"keydown":o,s=r.capture,l=Wi(t,{timeout:r.timeout});return i.addEventListener(n,l,s),function(){i.removeEventListener(n,l,s)}}/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ki=ut(class extends pt{constructor(i){if(super(i),i.type!==S.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(t=>i[t]).join(" ")+" "}update(i,[t]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in t)t[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(t)}const e=i.element.classList;for(const r of this.st)r in t||(e.remove(r),this.st.delete(r));for(const r in t){const o=!!t[r];o===this.st.has(r)||this.nt?.has(r)||(o?(e.add(r),this.st.add(r)):(e.remove(r),this.st.delete(r)))}return y}}),Vi='/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-border-style:solid;--tw-divide-y-reverse:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-neutral-50:oklch(98.5% 0 0);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-500:oklch(55.6% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-white:#fff;--spacing:.25rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--leading-normal:1.5;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}dialog::backdrop{--tw-backdrop-brightness:brightness(75%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}dialog{padding:calc(var(--spacing)*0);font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-leading:var(--leading-normal);line-height:var(--leading-normal);--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-shadow-color:#1717171a}@supports (color:color-mix(in lab,red,red)){dialog{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-neutral-900)10%,transparent)var(--tw-shadow-alpha),transparent)}}dialog{width:100%;max-width:var(--container-2xl);border-radius:var(--radius-xl);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200);margin-inline:auto;overflow:hidden}:where(dialog>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)));border-color:#e5e5e5cc}@supports (color:color-mix(in lab,red,red)){:where(dialog>:not(:last-child)){border-color:color-mix(in oklab,var(--color-neutral-200)80%,transparent)}}dialog{background-color:var(--color-neutral-50);margin-inline:auto;margin-top:20vh;positi