@benev/tact 0.4.0-1 → 0.4.0-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -46
- package/package.json +7 -6
- package/s/demo/main.css +38 -3
- package/s/index.html.ts +26 -20
- package/s/lib/index.ts +1 -1
- package/s/lib/input/controller.ts +4 -1
- package/s/lib/input/data/intent/decode.ts +2 -2
- package/s/lib/input/data/intent/encode.ts +2 -2
- package/s/lib/input/data/intent/minihash.ts +5 -0
- package/s/lib/input/decoder.ts +2 -2
- package/s/lib/input/evaluate/context.ts +5 -1
- package/s/lib/input/evaluate/evaluate.ts +27 -14
- package/s/lib/input/investigate/hash-bindings.ts +5 -3
- package/s/lib/input/investigate/investigate.ts +24 -9
- package/s/lib/input/test.ts +52 -30
- package/s/lib/input/testing/quickbind.ts +3 -3
- package/s/lib/ui/deck/auto-gamepads.ts +1 -0
- package/s/lib/ui/deck/controls/internal/data.ts +7 -5
- package/s/lib/ui/deck/hub.ts +4 -3
- package/s/lib/ui/deck/players.ts +73 -0
- package/s/lib/ui/deck/setup/deck.ts +33 -20
- package/s/lib/ui/deck/setup/tact.ts +26 -11
- package/s/lib/ui/deck/setup/types.ts +1 -0
- package/s/lib/ui/deck/setup/utils/broadcast-channel.ts +17 -0
- package/s/lib/ui/deck/setup/utils/kv.ts +20 -0
- package/s/lib/ui/deck/types.ts +1 -1
- package/s/lib/ui/views/controllers/style.css.ts +1 -1
- package/s/lib/ui/views/controllers/view.ts +3 -2
- package/s/lib/ui/views/customize/style.css.ts +1 -1
- package/s/lib/ui/views/customize/view.ts +6 -5
- package/s/lib/ui/views/deck/style.css.ts +1 -1
- package/s/lib/ui/views/deck/view.ts +13 -7
- package/s/lib/ui/views/theme.css.ts +1 -1
- package/s/lib/ui/views/visualizer/style.css.ts +8 -6
- package/s/lib/ui/views/visualizer/view.ts +1 -0
- package/s/lib/utils/hash.ts +47 -0
- package/x/demo/main.bundle.min.js +330 -326
- package/x/demo/main.bundle.min.js.map +4 -4
- package/x/demo/main.css +38 -3
- package/x/gamepad/index.html +2 -2
- package/x/gamepad/main.bundle.min.js +8 -8
- package/x/gamepad/main.bundle.min.js.map +4 -4
- package/x/index.html +28 -22
- package/x/index.html.js +26 -20
- package/x/index.html.js.map +1 -1
- package/x/lib/index.d.ts +1 -1
- package/x/lib/index.js +1 -1
- package/x/lib/index.js.map +1 -1
- package/x/lib/input/controller.js +1 -1
- package/x/lib/input/controller.js.map +1 -1
- package/x/lib/input/data/intent/decode.d.ts +1 -1
- package/x/lib/input/data/intent/decode.js +2 -2
- package/x/lib/input/data/intent/decode.js.map +1 -1
- package/x/lib/input/data/intent/encode.d.ts +1 -1
- package/x/lib/input/data/intent/encode.js +2 -2
- package/x/lib/input/data/intent/encode.js.map +1 -1
- package/x/lib/input/data/intent/minihash.d.ts +1 -0
- package/x/lib/input/data/intent/minihash.js +4 -0
- package/x/lib/input/data/intent/minihash.js.map +1 -0
- package/x/lib/input/decoder.d.ts +1 -1
- package/x/lib/input/decoder.js +2 -2
- package/x/lib/input/decoder.js.map +1 -1
- package/x/lib/input/evaluate/context.d.ts +3 -1
- package/x/lib/input/evaluate/context.js.map +1 -1
- package/x/lib/input/evaluate/evaluate.js +24 -11
- package/x/lib/input/evaluate/evaluate.js.map +1 -1
- package/x/lib/input/investigate/hash-bindings.d.ts +1 -1
- package/x/lib/input/investigate/hash-bindings.js +5 -3
- package/x/lib/input/investigate/hash-bindings.js.map +1 -1
- package/x/lib/input/investigate/investigate.d.ts +2 -1
- package/x/lib/input/investigate/investigate.js +14 -9
- package/x/lib/input/investigate/investigate.js.map +1 -1
- package/x/lib/input/test.d.ts +4 -2
- package/x/lib/input/test.js +49 -22
- package/x/lib/input/test.js.map +1 -1
- package/x/lib/input/testing/quickbind.d.ts +3 -2
- package/x/lib/input/testing/quickbind.js +3 -3
- package/x/lib/input/testing/quickbind.js.map +1 -1
- package/x/lib/ui/deck/auto-gamepads.js +1 -0
- package/x/lib/ui/deck/auto-gamepads.js.map +1 -1
- package/x/lib/ui/deck/controls/internal/data.d.ts +1 -1
- package/x/lib/ui/deck/controls/internal/data.js +4 -1
- package/x/lib/ui/deck/controls/internal/data.js.map +1 -1
- package/x/lib/ui/deck/hub.js +4 -3
- package/x/lib/ui/deck/hub.js.map +1 -1
- package/x/lib/ui/deck/players.d.ts +16 -0
- package/x/lib/ui/deck/players.js +56 -0
- package/x/lib/ui/deck/players.js.map +1 -0
- package/x/lib/ui/deck/setup/deck.js +23 -13
- package/x/lib/ui/deck/setup/deck.js.map +1 -1
- package/x/lib/ui/deck/setup/tact.d.ts +3 -0
- package/x/lib/ui/deck/setup/tact.js +19 -8
- package/x/lib/ui/deck/setup/tact.js.map +1 -1
- package/x/lib/ui/deck/setup/types.d.ts +1 -0
- package/x/lib/ui/deck/setup/utils/broadcast-channel.d.ts +4 -0
- package/x/lib/ui/deck/setup/utils/broadcast-channel.js +10 -0
- package/x/lib/ui/deck/setup/utils/broadcast-channel.js.map +1 -0
- package/x/lib/ui/deck/setup/utils/kv.d.ts +5 -0
- package/x/lib/ui/deck/setup/utils/kv.js +12 -0
- package/x/lib/ui/deck/setup/utils/kv.js.map +1 -0
- package/x/lib/ui/deck/types.d.ts +1 -0
- package/x/lib/ui/views/controllers/style.css.js +1 -1
- package/x/lib/ui/views/controllers/view.js +3 -2
- package/x/lib/ui/views/controllers/view.js.map +1 -1
- package/x/lib/ui/views/customize/style.css.js +1 -1
- package/x/lib/ui/views/customize/view.js +6 -5
- package/x/lib/ui/views/customize/view.js.map +1 -1
- package/x/lib/ui/views/deck/style.css.js +1 -1
- package/x/lib/ui/views/deck/view.js +13 -6
- package/x/lib/ui/views/deck/view.js.map +1 -1
- package/x/lib/ui/views/theme.css.js +1 -1
- package/x/lib/ui/views/visualizer/style.css.js +8 -6
- package/x/lib/ui/views/visualizer/style.css.js.map +1 -1
- package/x/lib/ui/views/visualizer/view.js +1 -0
- package/x/lib/ui/views/visualizer/view.js.map +1 -1
- package/x/lib/utils/hash.d.ts +1 -0
- package/x/lib/utils/hash.js +47 -0
- package/x/lib/utils/hash.js.map +1 -0
- package/s/lib/ui/deck/collector.ts +0 -52
- package/x/lib/ui/deck/collector.d.ts +0 -13
- package/x/lib/ui/deck/collector.js +0 -35
- package/x/lib/ui/deck/collector.js.map +0 -1
package/x/demo/main.css
CHANGED
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
background: var(--bg);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
html {
|
|
57
|
+
scrollbar-gutter: stable;
|
|
58
|
+
}
|
|
59
|
+
|
|
56
60
|
body {
|
|
57
61
|
display: flex;
|
|
58
62
|
flex-direction: column;
|
|
@@ -67,10 +71,34 @@
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
> header {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
align-items: end;
|
|
78
|
+
gap: 1em;
|
|
70
79
|
padding: 0 2em;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
|
|
81
|
+
h1 small {
|
|
82
|
+
font-size: 0.6em;
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
blockquote {
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
font-style: italic;
|
|
89
|
+
padding-left: 1em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
label {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
align-items: end;
|
|
96
|
+
gap: 0.1em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.links span {
|
|
100
|
+
opacity: 0.5;
|
|
101
|
+
}
|
|
74
102
|
}
|
|
75
103
|
|
|
76
104
|
> section {
|
|
@@ -79,6 +107,13 @@
|
|
|
79
107
|
padding-left: 1em;
|
|
80
108
|
}
|
|
81
109
|
}
|
|
110
|
+
|
|
111
|
+
> footer {
|
|
112
|
+
padding: 1em 2em;
|
|
113
|
+
p {
|
|
114
|
+
opacity: 0.5;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
82
117
|
}
|
|
83
118
|
}
|
|
84
119
|
|
package/x/gamepad/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='0.9em' font-size='90'>🎮</text></svg>"/>
|
|
12
12
|
<link rel="stylesheet" href="main.css?v=75fb2961e712"/>
|
|
13
|
-
<script type="module" src="main.bundle.min.js?v=
|
|
13
|
+
<script type="module" src="main.bundle.min.js?v=41d7ef46fc02"></script>
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
<meta property="og:type" content="website"/>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<header>
|
|
27
27
|
<h1>
|
|
28
28
|
<strong>@benev/tact gamepad</strong>
|
|
29
|
-
<small>v0.4.0-
|
|
29
|
+
<small>v0.4.0-10</small>
|
|
30
30
|
</h1>
|
|
31
31
|
</header>
|
|
32
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),xe=/'/g,ye=/"/g,we=/^(?:script|style|textarea|title)$/i,Yt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),j=Yt(1),zr=Yt(2),qr=Yt(3),D=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),$e=new WeakMap,N=H.createTreeWalker(H,129);function Ae(r,t){if(!Qt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return me!==void 0?me.createHTML(t):t}var _e=(r,t)=>{let e=r.length-1,o=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=Y;for(let c=0;c<e;c++){let a=r[c],u,d,h=-1,S=0;for(;S<a.length&&(i.lastIndex=S,d=i.exec(a),d!==null);)S=i.lastIndex,i===Y?d[1]==="!--"?i=de:d[1]!==void 0?i=ge:d[2]!==void 0?(we.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=R):d[3]!==void 0&&(i=R):i===R?d[0]===">"?(i=s??Y,h=-1):d[1]===void 0?h=-2:(h=i.lastIndex-d[2].length,u=d[1],i=d[3]===void 0?R:d[3]==='"'?ye:xe):i===ye||i===xe?i=R:i===de||i===ge?i=Y:(i=R,s=void 0);let O=i===R&&r[c+1].startsWith("/>")?" ":"";n+=i===Y?a+ur:h>=0?(o.push(u),a.slice(0,h)+Kt+a.slice(h)+k+O):a+k+(h===-2?c:O)}return[Ae(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},et=class r{constructor({strings:t,_$litType$:e},o){let s;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[u,d]=_e(t,e);if(this.el=r.createElement(u,o),N.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=N.nextNode())!==null&&a.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(Kt)){let S=d[i++],O=s.getAttribute(h).split(k),at=/([.?@])?(.*)/.exec(S);a.push({type:1,index:n,name:at[2],strings:O,ctor:at[1]==="."?mt:at[1]==="?"?dt:at[1]==="@"?gt:U}),s.removeAttribute(h)}else h.startsWith(k)&&(a.push({type:6,index:n}),s.removeAttribute(h));if(we.test(s.tagName)){let h=s.textContent.split(k),S=h.length-1;if(S>0){s.textContent=ft?ft.emptyScript:"";for(let O=0;O<S;O++)s.append(h[O],X()),N.nextNode(),a.push({type:2,index:++n});s.append(h[S],X())}}}else if(s.nodeType===8)if(s.data===Zt)a.push({type:2,index:n});else{let h=-1;for(;(h=s.data.indexOf(k,h+1))!==-1;)a.push({type:7,index:n}),h+=k.length-1}n++}}static createElement(t,e){let o=H.createElement("template");return o.innerHTML=t,o}};function L(r,t,e=r,o){if(t===D)return t;let s=o!==void 0?e._$Co?.[o]:e._$Cl,n=tt(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,e,o)),o!==void 0?(e._$Co??=[])[o]=s:e._$Cl=s),s!==void 0&&(t=L(r,s._$AS(r,t.values),s,o)),t}var lt=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){let{el:{content:e},parts:o}=this._$AD,s=(t?.creationScope??H).importNode(e,!0);N.currentNode=s;let n=N.nextNode(),i=0,c=0,a=o[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new I(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new xt(n,this,t)),this._$AV.push(u),a=o[++c]}i!==a?.index&&(n=N.nextNode(),i++)}return N.currentNode=H,s}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},I=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,s){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,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=L(this,t,e),tt(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==D&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):be(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!==l&&tt(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,s=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=et.createElement(Ae(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(e);else{let n=new lt(s,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=$e.get(t.strings);return e===void 0&&$e.set(t.strings,e=new et(t)),e}k(t){Qt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,s=0;for(let n of t)s===e.length?e.push(o=new r(this.O(X()),this.O(X()),this,this.options)):o=e[s],o._$AI(n),s++;s<e.length&&(this._$AR(o&&o._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=le(t).nextSibling;le(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,s,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=l}_$AI(t,e=this,o,s){let n=this.strings,i=!1;if(n===void 0)t=L(this,t,e,0),i=!tt(t)||t!==this._$AH&&t!==D,i&&(this._$AH=t);else{let c=t,a,u;for(t=n[0],a=0;a<n.length-1;a++)u=L(this,c[o+a],e,a),u===D&&(u=this._$AH[a]),i||=!tt(u)||u!==this._$AH[a],u===l?t=l:t!==l&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!s&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},mt=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},dt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},gt=class extends U{constructor(t,e,o,s,n){super(t,e,o,s,n),this.type=5}_$AI(t,e=this){if((t=L(this,t,e,0)??l)===D)return;let o=this._$AH,s=t===l&&o!==l||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==l&&(o===l||s);s&&this.element.removeEventListener(this.name,this,o),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)}},xt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}},ve={M:Kt,P:k,A:Zt,C:1,L:_e,R:lt,D:be,V:L,I,H:U,N:dt,U:gt,B:mt,F:xt},hr=Jt.litHtmlPolyfillSupport;hr?.(et,I),(Jt.litHtmlVersions??=[]).push("3.3.3");var f=(r,t,e)=>{let o=e?.renderBefore??t,s=o._$litPart$;if(s===void 0){let n=e?.renderBefore??null;o._$litPart$=s=new I(t.insertBefore(X(),n),n,void 0,e??{})}return s._$AI(r),s};var Xt=globalThis,V=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=f(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};V._$litElement$=!0,V.finalized=!0,Xt.litElementHydrateSupport?.({LitElement:V});var fr=Xt.litElementPolyfillSupport;fr?.({LitElement:V});(Xt.litElementVersions??=[]).push("4.2.2");var $={string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},g={string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0),any:(r,t,e)=>{e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)},entries:(r,t)=>{for(let[e,o]of t)g.any(r,e,o)},record:(r,t)=>g.entries(r,Object.entries(t))};function Se(r,t={}){let e=document.createElement(r);return g.record(e,t),e}function Ee(r){let t=document.createDocumentFragment();return f(r,t),t.firstElementChild}function yt(r,t){let e=[];for(let[o,s]of Object.entries(t))if(typeof s=="function")r.addEventListener(o,s),e.push(()=>r.removeEventListener(o,s));else{let[n,i]=s;r.addEventListener(o,i,n),e.push(()=>r.removeEventListener(o,i))}return()=>e.forEach(o=>o())}function Ce(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var $t=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>$.string(this.element,e),set:(t,e,o)=>g.string(this.element,e,o)});numbers=new Proxy({},{get:(t,e)=>$.number(this.element,e),set:(t,e,o)=>g.number(this.element,e,o)});booleans=new Proxy({},{get:(t,e)=>$.boolean(this.element,e),set:(t,e,o)=>g.boolean(this.element,e,o)})};var ke=(r,t,e={})=>new Proxy(t,{get:(o,s)=>{switch(t[s]){case String:return $.string(r,s);case Number:return $.number(r,s);case Boolean:return $.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(o,s,n)=>{try{switch(e.beforeSet?.(s),t[s]){case String:return g.string(r,s,n);case Number:return g.number(r,s,n);case Boolean:return g.boolean(r,s,n);default:throw new Error(`invalid attribute type for "${s}"`)}}finally{e.afterSet?.(s)}}});function G(r){let t=new $t(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>Ce(r,e),spec:(e,o={})=>ke(r,e,o)}}G.get=$;G.set=g;function Me(r){return new te(r)}var te=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,e=!0){return this.#t.set(t,e),this}attrs(t){for(let[e,o]of Object.entries(t))this.attr(e,o);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return g.entries(t,this.#t),t.append(...this.#e),t}};function F(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`element not found (${r})`);return e}function bt(r,t=document){return t.querySelector(r)}function wt(r,t=document){return Array.from(t.querySelectorAll(r))}var At=class r{element;#t;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?F(t,this.element):t)}require(t){return F(t,this.element)}maybe(t){return bt(t,this.element)}all(t){return wt(t,this.element)}render(...t){return f(t,this.element)}get attrs(){return this.#t??=G(this.element)}events(t){return yt(this.element,t)}};function m(r,t=document){return F(r,t)}m.in=(r,t=document)=>new At(t).in(r);m.need=F;m.maybe=bt;m.all=wt;m.el=Se;m.elmer=Me;m.mk=Ee;m.events=yt;m.attrs=G;m.register=ae;m.render=(r,...t)=>f(t,r);function z(){let r,t,e=new Promise((o,s)=>{r=o,t=s});return e.resolve=r,e.reject=t,e.promise=e,e.entangle=o=>(o.then(r,t),e),e}function _t(r){let t=null;return((...e)=>(t?t.params=e:(t={params:e,deferred:z()},queueMicrotask(()=>{let{params:o,deferred:s}=t;t=null,Promise.resolve(r(...o)).then(s.resolve).catch(s.reject)})),t.deferred.promise))}function b(r,t=new Set){if(t.has(r))throw new Error("cannot clone circular reference");let e;return typeof r=="function"||r!==null&&typeof r=="object"?(t.add(r),Array.isArray(r)?e=r.map(o=>b(o,new Set(t))):r.constructor===Object?e=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,b(s,new Set(t))])):r instanceof Map?e=new Map(Array.from(r,([o,s])=>[o,b(s,new Set(t))])):r instanceof Set?e=new Set(Array.from(r,o=>b(o,new Set(t)))):r instanceof Date?e=new Date(r.getTime()):e=r,t.delete(r)):e=r,e}var rt=r=>typeof r=="object"&&r!==null;function lr(r){return r!=null}function mr(r){return r==null}var Jo=Object.freeze({happy:lr,sad:mr,boolean:r=>typeof r=="boolean",number:r=>typeof r=="number",string:r=>typeof r=="string",bigint:r=>typeof r=="bigint",object:r=>typeof r=="object"&&r!==null,array:r=>Array.isArray(r),fn:r=>typeof r=="function",symbol:r=>typeof r=="symbol"});var Oe=(r,t)=>{function e(o,s,n){if(!rt(o)||!rt(s))return o===s;if(n.includes(o))throw new Error("forbidden circularity detected in deep equal comparison");let i=[...n,o];if(o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(let[c,a]of o)if(!s.has(c)||!e(a,s.get(c),i))return!1}else if(o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(let c of o)if(!Array.from(s).some(a=>e(c,a,i)))return!1}else{let c=Object.keys(o),a=Object.keys(s);if(c.length!==a.length)return!1;for(let u of c)if(!a.includes(u)||!e(o[u],s[u],i))return!1}return!0}return e(r,t,[])};function Pe(r){function t(e,o){if(!rt(e)||o.includes(e))return e;let s=[...o,e];if(e instanceof Map)for(let n of e.entries())for(let i of n)t(i,s);else if(e instanceof Set)for(let n of e)t(n,s);else if(Array.isArray(e))for(let n of e)t(n,s);else for(let n of Object.values(e))t(n,s);return Object.freeze(e)}return t(r,[])}function Te(r){if(r.ok)return r.value;let{error:t}=r;throw t instanceof Error?t:typeof t=="string"?new Error(t):new Error("unknown")}function Re(r){if(r.ok)throw new Error("didn't get needed error");return r.error}function vt(r,t,e){if(r.has(t))return r.get(t);{let o=e();return r.set(t,o),o}}function St(r){let t,e=!1,o=()=>{e=!0,clearTimeout(t)},s=async()=>{e||(await r(o),!e&&(t=setTimeout(s,0)))};return s(),o}function Ne(){let r=[],t=()=>{let o=r;r=[];for(let s=o.length-1;s>=0;s--)o[s]()};function e(){t()}return e.dispose=t,e.schedule=(...o)=>(r.push(...o),e),e.own=(o,s)=>(r.push(()=>s(o)),o),e.disposable=o=>(r.push(()=>o.dispose()),o),e.disposables=e.disposable,e}function He(r,t){let e=Object.entries(t);for(let[o,s]of e)r.addEventListener(o,s);return()=>{for(let[o,s]of e)r.removeEventListener(o,s)}}var Et=(r=0)=>new Promise(t=>setTimeout(t,r));function J(r){let t=dr(),e=o=>t.on(o);return Object.assign(e,t),r&&t.on(r),e}function dr(){let r=new Set,t,e=()=>t??=z(),o=c=>{let a=t;t=void 0,a?.resolve(c)};return{set:r,on:c=>(r.add(c),()=>{r.delete(c)}),publish:(...c)=>{o(c);for(let a of[...r])a(...c)},publishAsync:async(...c)=>{o(c),await Promise.all([...r].map(async a=>a(...c)))},next:e}}var Ct=class{#t=new Set;#e=[];#r=new WeakMap;#o=0;#s=new Set;read(t){this.#e.at(-1)?.add(t)}write(t){let e=this.#r.get(t);if(e){for(let o of e)this.#s.add(o);this.#o===0&&this.#n()}}observe(t){let e=new Set;this.#e.push(e);try{let o=t();return{seen:e,value:o}}finally{this.#e.pop()}}subscribe(t,e){let o=vt(this.#r,t,()=>new Set);return o.add(e),()=>{o.delete(e),o.size===0&&this.#r.delete(t)}}batch=t=>{this.#o++;try{return t()}finally{this.#o--,this.#o===0&&this.#n()}};#i(t){if(this.#t.has(t))throw new Error("circularity forbidden");this.#t.add(t);try{t()}finally{this.#t.delete(t)}}#n(){for(;this.#s.size>0;){let t=[...this.#s];this.#s.clear();for(let e of t)this.#i(e)}}};var p=globalThis[Symbol.for("e280.tracker.2")]??=new Ct;function P(r){let t;function e(){return arguments.length===0?(p.read(e),r):(r=arguments[0],p.write(e),t?.publish(r),r)}return e.get=()=>e(),e.set=o=>e(o),e.on=o=>(t??=J())(o),e}var kt=class extends Map{get size(){return p.read(this),super.size}[Symbol.iterator](){return p.read(this),super[Symbol.iterator]()}forEach(t){p.read(this);for(let[e,o]of this)t(o,e,this);return this}keys(){return p.read(this),super.keys()}values(){return p.read(this),super.values()}entries(){return p.read(this),super.entries()}has(t){return p.read(this),super.has(t)}get(t){return p.read(this),super.get(t)}set(t,e){return super.set(t,e),p.write(this),this}delete(t){let e=super.delete(t);return p.write(this),e}clear(){return super.clear(),p.write(this),this}};var Mt=class extends Set{get size(){return p.read(this),super.size}[Symbol.iterator](){return p.read(this),super[Symbol.iterator]()}forEach(t){p.read(this);for(let e of this)t(e,e,this);return this}values(){return p.read(this),super.values()}has(t){return p.read(this),super.has(t)}add(t){return super.add(t),p.write(this),this}delete(t){let e=super.delete(t);return p.write(this),e}clear(){return super.clear(),p.write(this),this}};var Hs=p.batch;function Le(r){return Pe(b(r))}var w=Symbol("optic");var ot=class{calculate;#t=!1;#e;constructor(t){this.calculate=t,this.#e=t()}get(){return this.#t&&(this.#t=!1,this.#e=this.calculate()),this.#e}invalidate(){this.#t=!0}};var Ot=class r{[w];#t;#e;#r;#o=J();constructor(t){this[w]=t,this.#t=b(t.getState()),this.#e=new ot(()=>b(t.getState())),this.#r=new ot(()=>Le(t.getState()))}get on(){return this.#o.on}update(){let t=this[w].getState();!Oe(t,this.#t)&&(this.#e.invalidate(),this.#r.invalidate(),this.#t=b(t),p.write(this),this.#o.set.size&&this.#o.publish(this.#e.get()))}get state(){return p.read(this),this.#e.get()}get frozen(){return p.read(this),this.#r.get()}mutate(t){return this[w].mutate(t)}lens(t){let e=new r({getState:()=>t(this[w].getState()),mutate:o=>this[w].mutate(s=>o(t(s))),registerLens:this[w].registerLens});return this[w].registerLens(e),e}};function Ue(r){if(!r.done)throw new Error("wait not done");return Te(r)}function je(r){if(!r.done)throw new Error("wait not done");return Re(r)}var ze=r=>!r.done;var re=r=>r.done&&r.ok;function qe(r,t){let{pending:e=()=>{},ok:o=()=>{},err:s=()=>{}}=t;return ze(r)?e():re(r)?o(Ue(r)):s(je(r))}var Pt=E`
|
|
1
|
+
function ne(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function ie(r,t={}){let{soft:e=!1,upgrade:o=!0}=t;for(let[s,n]of Object.entries(r)){let i=ne(s),c=customElements.get(i);e&&c||(customElements.define(i,n),o&&document.querySelectorAll(i).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}var ct=globalThis,pt=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),ae=new WeakMap,Q=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==It)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(pt&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=ae.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&ae.set(e,t))}return t}toString(){return this.cssText}},ce=r=>new Q(typeof r=="string"?r:r+"",void 0,It),C=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((o,s,n)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[n+1],r[0]);return new Q(e,r,It)},ut=(r,t)=>{if(pt)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),s=ct.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=e.cssText,r.appendChild(o)}},I=pt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return ce(e)})(r):r;var{is:er,defineProperty:rr,getOwnPropertyDescriptor:or,getOwnPropertyNames:sr,getOwnPropertySymbols:nr,getPrototypeOf:ir}=Object,ht=globalThis,pe=ht.trustedTypes,ar=pe?pe.emptyScript:"",cr=ht.reactiveElementPolyfillSupport,Y=(r,t)=>r,Vt={toAttribute(r,t){switch(t){case Boolean:r=r?ar:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},he=(r,t)=>!er(r,t),ue={attribute:!0,type:String,converter:Vt,reflect:!1,useDefault:!1,hasChanged:he};Symbol.metadata??=Symbol("metadata"),ht.litPropertyMetadata??=new WeakMap;var 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=ue){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){let o=Symbol(),s=this.getPropertyDescriptor(t,o,e);s!==void 0&&rr(this.prototype,t,s)}}static getPropertyDescriptor(t,e,o){let{get:s,set:n}=or(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:s,set(i){let c=s?.call(this);n?.call(this,i),this.requestUpdate(t,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ue}static _$Ei(){if(this.hasOwnProperty(Y("elementProperties")))return;let t=ir(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Y("properties"))){let e=this.properties,o=[...sr(e),...nr(e)];for(let s of o)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,s]of e)this.elementProperties.set(o,s)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let s=this._$Eu(e,o);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let s of o)e.unshift(I(s))}else t!==void 0&&e.push(I(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o: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_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ut(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,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){let n=(o.converter?.toAttribute!==void 0?o.converter:Vt).toAttribute(e,o.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){let o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let n=o.getPropertyOptions(s),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Vt;this._$Em=s;let c=i.fromAttribute(e,n.type);this[s]=c??this._$Ej?.get(s)??c,this._$Em=null}}requestUpdate(t,e,o,s=!1,n){if(t!==void 0){let i=this.constructor;if(s===!1&&(n=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??he)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:s,wrapped:n},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let 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(let[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[s,n]of o){let{wrapped:i}=n,c=this[s];i!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,n,c)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}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[Y("elementProperties")]=new Map,k[Y("finalized")]=new Map,cr?.({ReactiveElement:k}),(ht.reactiveElementVersions??=[]).push("2.1.2");var Ft=globalThis,fe=r=>r,ft=Ft.trustedTypes,le=ft?ft.createPolicy("lit-html",{createHTML:r=>r}):void 0,Jt="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,Kt="?"+M,pr=`<${Kt}>`,H=document,tt=()=>H.createComment(""),et=r=>r===null||typeof r!="object"&&typeof r!="function",Zt=Array.isArray,$e=r=>Zt(r)||typeof r?.[Symbol.iterator]=="function",Gt=`[
|
|
2
|
+
\f\r]`,X=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,me=/-->/g,de=/>/g,R=RegExp(`>|${Gt}(?:([^\\s"'>=/]+)(${Gt}*=${Gt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ge=/'/g,xe=/"/g,be=/^(?:script|style|textarea|title)$/i,Qt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),j=Qt(1),jr=Qt(2),zr=Qt(3),D=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),ye=new WeakMap,N=H.createTreeWalker(H,129);function we(r,t){if(!Zt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return le!==void 0?le.createHTML(t):t}var Ae=(r,t)=>{let e=r.length-1,o=[],s,n=t===2?"<svg>":t===3?"<math>":"",i=X;for(let c=0;c<e;c++){let a=r[c],u,d,h=-1,E=0;for(;E<a.length&&(i.lastIndex=E,d=i.exec(a),d!==null);)E=i.lastIndex,i===X?d[1]==="!--"?i=me:d[1]!==void 0?i=de:d[2]!==void 0?(be.test(d[2])&&(s=RegExp("</"+d[2],"g")),i=R):d[3]!==void 0&&(i=R):i===R?d[0]===">"?(i=s??X,h=-1):d[1]===void 0?h=-2:(h=i.lastIndex-d[2].length,u=d[1],i=d[3]===void 0?R:d[3]==='"'?xe:ge):i===xe||i===ge?i=R:i===me||i===de?i=X:(i=R,s=void 0);let P=i===R&&r[c+1].startsWith("/>")?" ":"";n+=i===X?a+pr:h>=0?(o.push(u),a.slice(0,h)+Jt+a.slice(h)+M+P):a+M+(h===-2?c:P)}return[we(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},rt=class r{constructor({strings:t,_$litType$:e},o){let s;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[u,d]=Ae(t,e);if(this.el=r.createElement(u,o),N.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=N.nextNode())!==null&&a.length<c;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(Jt)){let E=d[i++],P=s.getAttribute(h).split(M),at=/([.?@])?(.*)/.exec(E);a.push({type:1,index:n,name:at[2],strings:P,ctor:at[1]==="."?mt:at[1]==="?"?dt:at[1]==="@"?gt:U}),s.removeAttribute(h)}else h.startsWith(M)&&(a.push({type:6,index:n}),s.removeAttribute(h));if(be.test(s.tagName)){let h=s.textContent.split(M),E=h.length-1;if(E>0){s.textContent=ft?ft.emptyScript:"";for(let P=0;P<E;P++)s.append(h[P],tt()),N.nextNode(),a.push({type:2,index:++n});s.append(h[E],tt())}}}else if(s.nodeType===8)if(s.data===Kt)a.push({type:2,index:n});else{let h=-1;for(;(h=s.data.indexOf(M,h+1))!==-1;)a.push({type:7,index:n}),h+=M.length-1}n++}}static createElement(t,e){let o=H.createElement("template");return o.innerHTML=t,o}};function L(r,t,e=r,o){if(t===D)return t;let s=o!==void 0?e._$Co?.[o]:e._$Cl,n=et(t)?void 0:t._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,e,o)),o!==void 0?(e._$Co??=[])[o]=s:e._$Cl=s),s!==void 0&&(t=L(r,s._$AS(r,t.values),s,o)),t}var lt=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){let{el:{content:e},parts:o}=this._$AD,s=(t?.creationScope??H).importNode(e,!0);N.currentNode=s;let n=N.nextNode(),i=0,c=0,a=o[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new V(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new xt(n,this,t)),this._$AV.push(u),a=o[++c]}i!==a?.index&&(n=N.nextNode(),i++)}return N.currentNode=H,s}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},V=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,s){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,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=L(this,t,e),et(t)?t===l||t==null||t===""?(this._$AH!==l&&this._$AR(),this._$AH=l):t!==this._$AH&&t!==D&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):$e(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!==l&&et(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,s=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=rt.createElement(we(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(e);else{let n=new lt(s,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=ye.get(t.strings);return e===void 0&&ye.set(t.strings,e=new rt(t)),e}k(t){Zt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,s=0;for(let n of t)s===e.length?e.push(o=new r(this.O(tt()),this.O(tt()),this,this.options)):o=e[s],o._$AI(n),s++;s<e.length&&(this._$AR(o&&o._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=fe(t).nextSibling;fe(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,s,n){this.type=1,this._$AH=l,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=l}_$AI(t,e=this,o,s){let n=this.strings,i=!1;if(n===void 0)t=L(this,t,e,0),i=!et(t)||t!==this._$AH&&t!==D,i&&(this._$AH=t);else{let c=t,a,u;for(t=n[0],a=0;a<n.length-1;a++)u=L(this,c[o+a],e,a),u===D&&(u=this._$AH[a]),i||=!et(u)||u!==this._$AH[a],u===l?t=l:t!==l&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!s&&this.j(t)}j(t){t===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},mt=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===l?void 0:t}},dt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==l)}},gt=class extends U{constructor(t,e,o,s,n){super(t,e,o,s,n),this.type=5}_$AI(t,e=this){if((t=L(this,t,e,0)??l)===D)return;let o=this._$AH,s=t===l&&o!==l||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==l&&(o===l||s);s&&this.element.removeEventListener(this.name,this,o),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)}},xt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}},_e={M:Jt,P:M,A:Kt,C:1,L:Ae,R:lt,D:$e,V:L,I:V,H:U,N:dt,U:gt,B:mt,F:xt},ur=Ft.litHtmlPolyfillSupport;ur?.(rt,V),(Ft.litHtmlVersions??=[]).push("3.3.3");var f=(r,t,e)=>{let o=e?.renderBefore??t,s=o._$litPart$;if(s===void 0){let n=e?.renderBefore??null;o._$litPart$=s=new V(t.insertBefore(tt(),n),n,void 0,e??{})}return s._$AI(r),s};var Yt=globalThis,G=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=f(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};G._$litElement$=!0,G.finalized=!0,Yt.litElementHydrateSupport?.({LitElement:G});var hr=Yt.litElementPolyfillSupport;hr?.({LitElement:G});(Yt.litElementVersions??=[]).push("4.2.2");var $={string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},g={string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0),any:(r,t,e)=>{e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)},entries:(r,t)=>{for(let[e,o]of t)g.any(r,e,o)},record:(r,t)=>g.entries(r,Object.entries(t))};function ve(r,t={}){let e=document.createElement(r);return g.record(e,t),e}function Se(r){let t=document.createDocumentFragment();return f(r,t),t.firstElementChild}function yt(r,t){let e=[];for(let[o,s]of Object.entries(t))if(typeof s=="function")r.addEventListener(o,s),e.push(()=>r.removeEventListener(o,s));else{let[n,i]=s;r.addEventListener(o,i,n),e.push(()=>r.removeEventListener(o,i))}return()=>e.forEach(o=>o())}function Ee(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var $t=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>$.string(this.element,e),set:(t,e,o)=>g.string(this.element,e,o)});numbers=new Proxy({},{get:(t,e)=>$.number(this.element,e),set:(t,e,o)=>g.number(this.element,e,o)});booleans=new Proxy({},{get:(t,e)=>$.boolean(this.element,e),set:(t,e,o)=>g.boolean(this.element,e,o)})};var Ce=(r,t,e={})=>new Proxy(t,{get:(o,s)=>{switch(t[s]){case String:return $.string(r,s);case Number:return $.number(r,s);case Boolean:return $.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(o,s,n)=>{try{switch(e.beforeSet?.(s),t[s]){case String:return g.string(r,s,n);case Number:return g.number(r,s,n);case Boolean:return g.boolean(r,s,n);default:throw new Error(`invalid attribute type for "${s}"`)}}finally{e.afterSet?.(s)}}});function F(r){let t=new $t(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>Ee(r,e),spec:(e,o={})=>Ce(r,e,o)}}F.get=$;F.set=g;function ke(r){return new Xt(r)}var Xt=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,e=!0){return this.#t.set(t,e),this}attrs(t){for(let[e,o]of Object.entries(t))this.attr(e,o);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return g.entries(t,this.#t),t.append(...this.#e),t}};function J(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`element not found (${r})`);return e}function bt(r,t=document){return t.querySelector(r)}function wt(r,t=document){return Array.from(t.querySelectorAll(r))}var At=class r{element;#t;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?J(t,this.element):t)}require(t){return J(t,this.element)}maybe(t){return bt(t,this.element)}all(t){return wt(t,this.element)}render(...t){return f(t,this.element)}get attrs(){return this.#t??=F(this.element)}events(t){return yt(this.element,t)}};function m(r,t=document){return J(r,t)}m.in=(r,t=document)=>new At(t).in(r);m.need=J;m.maybe=bt;m.all=wt;m.el=ve;m.elmer=ke;m.mk=Se;m.events=yt;m.attrs=F;m.register=ie;m.render=(r,...t)=>f(t,r);function z(){let r,t,e=new Promise((o,s)=>{r=o,t=s});return e.resolve=r,e.reject=t,e.promise=e,e.entangle=o=>(o.then(r,t),e),e}function _t(r){let t=null;return((...e)=>(t?t.params=e:(t={params:e,deferred:z()},queueMicrotask(()=>{let{params:o,deferred:s}=t;t=null,Promise.resolve(r(...o)).then(s.resolve).catch(s.reject)})),t.deferred.promise))}function b(r,t=new Set){if(t.has(r))throw new Error("cannot clone circular reference");let e;return typeof r=="function"||r!==null&&typeof r=="object"?(t.add(r),Array.isArray(r)?e=r.map(o=>b(o,new Set(t))):r.constructor===Object?e=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,b(s,new Set(t))])):r instanceof Map?e=new Map(Array.from(r,([o,s])=>[o,b(s,new Set(t))])):r instanceof Set?e=new Set(Array.from(r,o=>b(o,new Set(t)))):r instanceof Date?e=new Date(r.getTime()):e=r,t.delete(r)):e=r,e}var ot=r=>typeof r=="object"&&r!==null;function fr(r){return r!=null}function lr(r){return r==null}var Fo=Object.freeze({happy:fr,sad:lr,boolean:r=>typeof r=="boolean",number:r=>typeof r=="number",string:r=>typeof r=="string",bigint:r=>typeof r=="bigint",object:r=>typeof r=="object"&&r!==null,array:r=>Array.isArray(r),fn:r=>typeof r=="function",symbol:r=>typeof r=="symbol"});var Me=(r,t)=>{function e(o,s,n){if(!ot(o)||!ot(s))return o===s;if(n.includes(o))throw new Error("forbidden circularity detected in deep equal comparison");let i=[...n,o];if(o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(let[c,a]of o)if(!s.has(c)||!e(a,s.get(c),i))return!1}else if(o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(let c of o)if(!Array.from(s).some(a=>e(c,a,i)))return!1}else{let c=Object.keys(o),a=Object.keys(s);if(c.length!==a.length)return!1;for(let u of c)if(!a.includes(u)||!e(o[u],s[u],i))return!1}return!0}return e(r,t,[])};function Oe(r){function t(e,o){if(!ot(e)||o.includes(e))return e;let s=[...o,e];if(e instanceof Map)for(let n of e.entries())for(let i of n)t(i,s);else if(e instanceof Set)for(let n of e)t(n,s);else if(Array.isArray(e))for(let n of e)t(n,s);else for(let n of Object.values(e))t(n,s);return Object.freeze(e)}return t(r,[])}function Pe(r){if(r.ok)return r.value;let{error:t}=r;throw t instanceof Error?t:typeof t=="string"?new Error(t):new Error("unknown")}function Te(r){if(r.ok)throw new Error("didn't get needed error");return r.error}function vt(r,t,e){if(r.has(t))return r.get(t);{let o=e();return r.set(t,o),o}}function St(r){let t,e=!1,o=()=>{e=!0,clearTimeout(t)},s=async()=>{e||(await r(o),!e&&(t=setTimeout(s,0)))};return s(),o}function Re(){let r=[],t=()=>{let o=r;r=[];for(let s=o.length-1;s>=0;s--)o[s]()};function e(){t()}return e.dispose=t,e.schedule=(...o)=>(r.push(...o),e),e.own=(o,s)=>(r.push(()=>s(o)),o),e.disposable=o=>(r.push(()=>o.dispose()),o),e.disposables=e.disposable,e}function Ne(r,t){let e=Object.entries(t);for(let[o,s]of e)r.addEventListener(o,s);return()=>{for(let[o,s]of e)r.removeEventListener(o,s)}}var Et=(r=0)=>new Promise(t=>setTimeout(t,r));function K(r){let t=mr(),e=o=>t.on(o);return Object.assign(e,t),r&&t.on(r),e}function mr(){let r=new Set,t,e=()=>t??=z(),o=c=>{let a=t;t=void 0,a?.resolve(c)};return{set:r,on:c=>(r.add(c),()=>{r.delete(c)}),publish:(...c)=>{o(c);for(let a of[...r])a(...c)},publishAsync:async(...c)=>{o(c),await Promise.all([...r].map(async a=>a(...c)))},next:e}}var Ct=class{#t=new Set;#e=[];#r=new WeakMap;#o=0;#s=new Set;read(t){this.#e.at(-1)?.add(t)}write(t){let e=this.#r.get(t);if(e){for(let o of e)this.#s.add(o);this.#o===0&&this.#n()}}observe(t){let e=new Set;this.#e.push(e);try{let o=t();return{seen:e,value:o}}finally{this.#e.pop()}}subscribe(t,e){let o=vt(this.#r,t,()=>new Set);return o.add(e),()=>{o.delete(e),o.size===0&&this.#r.delete(t)}}batch=t=>{this.#o++;try{return t()}finally{this.#o--,this.#o===0&&this.#n()}};#i(t){if(this.#t.has(t))throw new Error("circularity forbidden");this.#t.add(t);try{t()}finally{this.#t.delete(t)}}#n(){for(;this.#s.size>0;){let t=[...this.#s];this.#s.clear();for(let e of t)this.#i(e)}}};var p=globalThis[Symbol.for("e280.tracker.2")]??=new Ct;function T(r){let t;function e(){return arguments.length===0?(p.read(e),r):(r=arguments[0],p.write(e),t?.publish(r),r)}return e.get=()=>e(),e.set=o=>e(o),e.on=o=>(t??=K())(o),e}var kt=class extends Map{get size(){return p.read(this),super.size}[Symbol.iterator](){return p.read(this),super[Symbol.iterator]()}forEach(t){p.read(this);for(let[e,o]of this)t(o,e,this);return this}keys(){return p.read(this),super.keys()}values(){return p.read(this),super.values()}entries(){return p.read(this),super.entries()}has(t){return p.read(this),super.has(t)}get(t){return p.read(this),super.get(t)}set(t,e){return super.set(t,e),p.write(this),this}delete(t){let e=super.delete(t);return p.write(this),e}clear(){return super.clear(),p.write(this),this}};var Mt=class extends Set{get size(){return p.read(this),super.size}[Symbol.iterator](){return p.read(this),super[Symbol.iterator]()}forEach(t){p.read(this);for(let e of this)t(e,e,this);return this}values(){return p.read(this),super.values()}has(t){return p.read(this),super.has(t)}add(t){return super.add(t),p.write(this),this}delete(t){let e=super.delete(t);return p.write(this),e}clear(){return super.clear(),p.write(this),this}};var Ns=p.batch;function De(r){return Oe(b(r))}var w=Symbol("optic");var st=class{calculate;#t=!1;#e;constructor(t){this.calculate=t,this.#e=t()}get(){return this.#t&&(this.#t=!1,this.#e=this.calculate()),this.#e}invalidate(){this.#t=!0}};var Ot=class r{[w];#t;#e;#r;#o=K();constructor(t){this[w]=t,this.#t=b(t.getState()),this.#e=new st(()=>b(t.getState())),this.#r=new st(()=>De(t.getState()))}get on(){return this.#o.on}update(){let t=this[w].getState();!Me(t,this.#t)&&(this.#e.invalidate(),this.#r.invalidate(),this.#t=b(t),p.write(this),this.#o.set.size&&this.#o.publish(this.#e.get()))}get state(){return p.read(this),this.#e.get()}get frozen(){return p.read(this),this.#r.get()}mutate(t){return this[w].mutate(t)}lens(t){let e=new r({getState:()=>t(this[w].getState()),mutate:o=>this[w].mutate(s=>o(t(s))),registerLens:this[w].registerLens});return this[w].registerLens(e),e}};function Le(r){if(!r.done)throw new Error("wait not done");return Pe(r)}function Ue(r){if(!r.done)throw new Error("wait not done");return Te(r)}var je=r=>!r.done;var ee=r=>r.done&&r.ok;function ze(r,t){let{pending:e=()=>{},ok:o=()=>{},err:s=()=>{}}=t;return je(r)?e():ee(r)?o(Le(r)):s(Ue(r))}var Pt=C`
|
|
4
4
|
* {
|
|
5
5
|
margin: 0;
|
|
6
6
|
padding: 0;
|
|
@@ -14,18 +14,18 @@ function ie(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}func
|
|
|
14
14
|
::-webkit-scrollbar-track { background: transparent; }
|
|
15
15
|
::-webkit-scrollbar-thumb { background: #888; border-radius: 1em; }
|
|
16
16
|
::-webkit-scrollbar-thumb:hover { background: #999; }
|
|
17
|
-
`;var Tt=class r extends HTMLElement{static register(){m.register({SlyShadow:r},{soft:!0})}connectedCallback(){this.hasAttribute("view")||this.setAttribute("view","")}};var Rt=class{render;count=0;rendered=z();constructor(t){this.render=t}doneRender(){this.count++,this.rendered.resolve(),this.rendered=z()}},
|
|
17
|
+
`;var Tt=class r extends HTMLElement{static register(){m.register({SlyShadow:r},{soft:!0})}connectedCallback(){this.hasAttribute("view")||this.setAttribute("view","")}};var Rt=class{render;count=0;rendered=z();constructor(t){this.render=t}doneRender(){this.count++,this.rendered.resolve(),this.rendered=z()}},A=class extends Rt{host;shadow;constructor(t,e,o){super(t),this.host=e,this.shadow=o}};var re=class{#t=[];get scope(){let t=this.#t.at(-1);if(!t)throw new Error("hooks must be called within a render fn");return t}increment(){let t=this.scope,e=t.position++;return{scope:t,position:e}}wrap(t,e){t.position=0,this.#t.push(t);try{return e()}finally{this.#t.pop()}}},y=globalThis[Symbol.for("e280.hooks")]??=new re;var q=class{#t=[];clear(){this.#t.forEach(t=>t()),this.#t=[]}observe(t,e){let{seen:o,value:s}=p.observe(t);this.clear();for(let n of o){let i=p.subscribe(n,e);this.#t.push(i)}return s}};var Nt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var B=class{cx;position=0;values=new Map;mounts=new Nt;constructor(t){this.cx=t}};var{I:Ii}=_e;var qe=r=>r.strings===void 0;var Be={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Dt=r=>(...t)=>({_$litDirective$:r,values:t}),Ht=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var nt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),nt(o,t);return!0},Lt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},We=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),wr(t)}};function $r(r){this._$AN!==void 0?(Lt(this),this._$AM=r,We(this)):this._$AM=r}function br(r,t=!1,e=0){let o=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(o))for(let n=e;n<o.length;n++)nt(o[n],!1),Lt(o[n]);else o!=null&&(nt(o,!1),Lt(o));else nt(this,r)}var wr=r=>{r.type==Be.CHILD&&(r._$AP??=br,r._$AQ??=$r)},it=class extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),We(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(nt(this,t),Lt(this))}setValue(t){if(qe(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};function Ie(r,t){for(let[e,o]of Object.entries(t))_r(r,e,o)}function _r(r,t,e){let o=r.getAttribute(t),s=vr(e);s!==o&&(s===null?r.removeAttribute(t):r.setAttribute(t,s))}function vr(r){return typeof r=="string"?r:typeof r=="number"?r.toString():r?"":null}function Sr(){Tt.register();let r=document.createElement("sly-shadow"),t=r.attachShadow({mode:"open"});return{host:r,shadow:t}}function Z(r){return Ve(Sr,r)}Z.setup=r=>(t=>Ve(r,t));function Ve(r,t){let e=Dt(class extends it{#t;#e;#r;#o=new q;constructor(s){super(s);let{host:n,shadow:i}=r(),c=_t(()=>{if(!this.#r)throw new Error("cannot render before props");if(!this.isConnected)return;let a=this.#s(this.#r);f(a,this.#t.shadow),this.#t.doneRender()});this.#t=new A(c,n,i),this.#e=new B(this.#t)}#s(s){return this.#r=s,this.#o.observe(()=>y.wrap(this.#e,()=>t(...this.#r)),this.#t.render)}render({props:s,children:n,attrs:i}){let{host:c}=this.#t;return this.isConnected&&(i&&Ie(c,i),f(n,this.#t.host),f(this.#s(s),this.#t.shadow),this.#t.doneRender()),c}disconnected(){f(null,this.#t.shadow),f(null,this.#t.host),this.#e.mounts.unmountAll(),this.#o.clear()}reconnected(){this.#e.mounts.remountAll(),this.#t.render()}});function o(...s){return e({props:s})}return o.with=e,o}function oe(r){return class extends HTMLElement{#t;#e;#r=new q;#o=this.attachShadow({mode:"open"});constructor(){super();let t=_t(()=>{if(!this.isConnected)return;let e=this.#s();f(e,this.#t.shadow),this.#t.doneRender()});this.#t=new A(t,this,this.#o),this.#e=new B(this.#t)}#s(){return this.#r.observe(()=>y.wrap(this.#e,()=>r()),this.#t.render)}render(){f(this.#s(),this.#t.shadow),this.#t.doneRender()}connectedCallback(){this.#e.mounts.remountAll(),this.#t.render()}disconnectedCallback(){this.#e.mounts.unmountAll(),this.#r.clear()}}}function x(r){let{scope:t,position:e}=y.increment();return vt(t.values,e,r)}function W(){return y.increment().scope.cx}function se(){let r=W();if(!(r instanceof A))throw new Error("this hook only works on shadow views (but was called in a light view)");return r}function O(r){let{scope:t}=y.increment();return x(()=>t.mounts.mount(r))}function Fe(){return se().shadow}function Je(r,t){ut(r,Cr(t))}function Cr(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let o of e)t.unshift(I(o))}else r!==void 0&&t.push(I(r));return t}function Ut(...r){let t=Fe();x(()=>Je(t,r))}function jt(r=""){let t=W();x(()=>{t instanceof A&&t.host.setAttribute("view",r)})}function Ke(r){return x(()=>T(r))}var zt=Ut;function _(r,t){return()=>Mr({hz:r,frames:t})}var Mr=Z(({hz:r,frames:t})=>{jt("loading"),zt(Pt,Or);let e=Ke(0);return O(()=>St(async()=>{await Et(1e3/r);let o=e()+1;e(o>=t.length?0:o)})),t.at(e())}),Or=C`
|
|
18
18
|
:host {
|
|
19
19
|
font-family: monospace;
|
|
20
20
|
white-space: pre;
|
|
21
21
|
user-select: none;
|
|
22
22
|
}
|
|
23
|
-
`;var
|
|
23
|
+
`;var v=Z(r=>(jt("error"),zt(Pt,Pr),typeof r=="string"?r:r instanceof Error?j`<strong>${r.name}:</strong> <span>${r.message}</span>`:"error")),Pr=C`
|
|
24
24
|
:host {
|
|
25
25
|
font-family: monospace;
|
|
26
26
|
color: red;
|
|
27
27
|
}
|
|
28
|
-
`;function
|
|
28
|
+
`;function S(r,t){return(e,o)=>ze(e,{pending:r,err:t,ok:o})}var Fp=S(_(10,[" "," ",". ",".. ","..."," .."," ."]),v);var Yp=S(_(3,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),v);var ou=S(_(10,["\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F311}","\u{1F311}"]),v);var cu=S(_(16,["|","/","-","\\"]),v);var lu=S(_(20,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),v);var Qe=C`
|
|
29
29
|
|
|
30
30
|
* {
|
|
31
31
|
padding: 0;
|
|
@@ -98,7 +98,7 @@ function ie(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}func
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
`;var
|
|
101
|
+
`;var qt=class{get;constructor(t){this.get=t}get gamepad(){return this.get()}};function Ye(r,t){let e=r;return()=>{let o=t();return o!=null&&(e=o),e}}function Xe(r){let t=new Map;function e(){o(),s()}function o(){for(let i of navigator.getGamepads())if(i?.connected&&!t.has(i.index)){let c=()=>navigator.getGamepads()[i.index],a=new qt(Ye(i,c)),u=r(a);t.set(i.index,{pad:a,dispose:u})}}function s(){for(let[i,{pad:c,dispose:a}]of t)navigator.getGamepads()[c.gamepad.index]?.connected||(a(),t.delete(i))}e();let n=Ne(window,{gamepadconnected:e,gamepaddisconnected:e});return()=>{n();for(let{dispose:i}of t.values())i();t.clear()}}var Bt=class{onSample=K();dispose=Re()};var Wt=class extends Bt{pad;#t=new Map;constructor(t){super(),this.pad=t}get gamepad(){return this.pad.gamepad}poll(){let t=this.gamepad;this.#r(t),this.#o(t)}#e(t,e){let o=this.#t.get(t)??0;e!==o&&(this.#t.set(t,e),this.onSample.publish({code:t,value:e}))}#r(t){let e=0;for(let[o,s]of t.buttons.entries()){let n=s.value;this.#e(`gamepad.${o+1}`,n),e=Math.max(e,n)}this.#e("gamepad.any",e>=.9?1:0)}#o(t){for(let[e,o]of t.axes.entries())this.#e(`gamepad.axis.${e+1}`,o)}};var tr=oe(()=>{Ut(Qe);let r=x(()=>new Mt);O(()=>Xe(o=>{let s=new Wt(o),n={source:s,samples:new kt},i=s.onSample(c=>n.samples.set(c.code,c.value));return r.add(n),()=>{i(),r.delete(n)}})),O(()=>St(async()=>{for(let o of r)o.source.poll();await Et(1e3/60)}));let t=([o,s])=>j`
|
|
102
102
|
<li ?data-neg="${s<0}" style="${`--percent: ${Math.abs(s)*100}%;`}">
|
|
103
103
|
<span>${o}</span>
|
|
104
104
|
<span>${s.toFixed(3)}</span>
|
|
@@ -125,6 +125,6 @@ function ie(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}func
|
|
|
125
125
|
<h2>no gamepads detected :(</h2>
|
|
126
126
|
`}
|
|
127
127
|
</div>
|
|
128
|
-
`});m.register({GamepadApp:
|
|
128
|
+
`});m.register({GamepadApp:tr});
|
|
129
129
|
/*! For license information please see main.bundle.min.js.LEGAL.txt */
|
|
130
130
|
//# sourceMappingURL=main.bundle.min.js.map
|