@benev/tact 0.1.0-1
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/LICENSE +23 -0
- package/README.md +299 -0
- package/package.json +60 -0
- package/s/demo/main.bundle.ts +14 -0
- package/s/demo/main.css +57 -0
- package/s/index.html.ts +42 -0
- package/s/index.ts +16 -0
- package/s/nubs/lookpad/styles.ts +21 -0
- package/s/nubs/lookpad/utils/listeners.ts +53 -0
- package/s/nubs/lookpad/view.ts +32 -0
- package/s/nubs/stick/device.ts +30 -0
- package/s/nubs/stick/styles.ts +22 -0
- package/s/nubs/stick/utils/calculate_new_vector_from_pointer_position.ts +27 -0
- package/s/nubs/stick/utils/find_closest_point_on_circle.ts +15 -0
- package/s/nubs/stick/utils/make_pointer_listeners.ts +50 -0
- package/s/nubs/stick/utils/within_radius.ts +6 -0
- package/s/nubs/stick/view.ts +50 -0
- package/s/nubs/stick-graphic/styles.ts +38 -0
- package/s/nubs/stick-graphic/types/basis.ts +5 -0
- package/s/nubs/stick-graphic/utils/calculate_basis.ts +19 -0
- package/s/nubs/stick-graphic/utils/stick_vector_to_pixels.ts +13 -0
- package/s/nubs/stick-graphic/utils/transform.ts +10 -0
- package/s/nubs/stick-graphic/view.ts +43 -0
- package/s/nubs/virtual-gamepad/device.ts +25 -0
- package/s/nubs/virtual-gamepad/styles.css.ts +133 -0
- package/s/nubs/virtual-gamepad/utils/gamepad-inputs.ts +42 -0
- package/s/nubs/virtual-gamepad/utils/prevent-default-touch-shenanigans.ts +12 -0
- package/s/nubs/virtual-gamepad/utils/touch-tracking.ts +75 -0
- package/s/nubs/virtual-gamepad/view.ts +139 -0
- package/s/station/devices/gamepad.ts +81 -0
- package/s/station/devices/infra/device.ts +7 -0
- package/s/station/devices/infra/group.ts +17 -0
- package/s/station/devices/infra/sampler.ts +22 -0
- package/s/station/devices/keyboard.ts +53 -0
- package/s/station/devices/pointer.ts +95 -0
- package/s/station/parts/action.ts +26 -0
- package/s/station/parts/defaults.ts +28 -0
- package/s/station/parts/resolver.ts +73 -0
- package/s/station/parts/routines/aggregate_samples_into_map.ts +20 -0
- package/s/station/parts/routines/build_updatable_actions_structure.ts +29 -0
- package/s/station/parts/routines/lensing_algorithm.ts +74 -0
- package/s/station/parts/switchboard-bindings.ts +21 -0
- package/s/station/station.test.ts +86 -0
- package/s/station/station.ts +47 -0
- package/s/station/switchboard.ts +107 -0
- package/s/station/testing/testing.ts +47 -0
- package/s/station/types.ts +72 -0
- package/s/station/utils/is-pressed.ts +5 -0
- package/s/station/utils/modprefix.ts +16 -0
- package/s/station/utils/tmax.ts +7 -0
- package/s/station/utils/tmin.ts +7 -0
- package/s/tests.test.ts +8 -0
- package/s/utils/evergreen.ts +10 -0
- package/s/utils/gamepads.ts +41 -0
- package/s/utils/split-axis.ts +7 -0
- package/x/demo/main.bundle.d.ts +1 -0
- package/x/demo/main.bundle.js +11 -0
- package/x/demo/main.bundle.js.map +1 -0
- package/x/demo/main.bundle.min.js +139 -0
- package/x/demo/main.bundle.min.js.map +7 -0
- package/x/demo/main.css +57 -0
- package/x/index.d.ts +13 -0
- package/x/index.html +97 -0
- package/x/index.html.d.ts +2 -0
- package/x/index.html.js +37 -0
- package/x/index.html.js.map +1 -0
- package/x/index.js +14 -0
- package/x/index.js.map +1 -0
- package/x/nubs/lookpad/styles.d.ts +1 -0
- package/x/nubs/lookpad/styles.js +21 -0
- package/x/nubs/lookpad/styles.js.map +1 -0
- package/x/nubs/lookpad/utils/listeners.d.ts +19 -0
- package/x/nubs/lookpad/utils/listeners.js +37 -0
- package/x/nubs/lookpad/utils/listeners.js.map +1 -0
- package/x/nubs/lookpad/view.d.ts +1 -0
- package/x/nubs/lookpad/view.js +24 -0
- package/x/nubs/lookpad/view.js.map +1 -0
- package/x/nubs/stick/device.d.ts +15 -0
- package/x/nubs/stick/device.js +27 -0
- package/x/nubs/stick/device.js.map +1 -0
- package/x/nubs/stick/styles.d.ts +1 -0
- package/x/nubs/stick/styles.js +22 -0
- package/x/nubs/stick/styles.js.map +1 -0
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.d.ts +3 -0
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.js +16 -0
- package/x/nubs/stick/utils/calculate_new_vector_from_pointer_position.js.map +1 -0
- package/x/nubs/stick/utils/find_closest_point_on_circle.d.ts +2 -0
- package/x/nubs/stick/utils/find_closest_point_on_circle.js +6 -0
- package/x/nubs/stick/utils/find_closest_point_on_circle.js.map +1 -0
- package/x/nubs/stick/utils/make_pointer_listeners.d.ts +16 -0
- package/x/nubs/stick/utils/make_pointer_listeners.js +34 -0
- package/x/nubs/stick/utils/make_pointer_listeners.js.map +1 -0
- package/x/nubs/stick/utils/within_radius.d.ts +2 -0
- package/x/nubs/stick/utils/within_radius.js +4 -0
- package/x/nubs/stick/utils/within_radius.js.map +1 -0
- package/x/nubs/stick/view.d.ts +2 -0
- package/x/nubs/stick/view.js +38 -0
- package/x/nubs/stick/view.js.map +1 -0
- package/x/nubs/stick-graphic/styles.d.ts +1 -0
- package/x/nubs/stick-graphic/styles.js +38 -0
- package/x/nubs/stick-graphic/styles.js.map +1 -0
- package/x/nubs/stick-graphic/types/basis.d.ts +4 -0
- package/x/nubs/stick-graphic/types/basis.js +2 -0
- package/x/nubs/stick-graphic/types/basis.js.map +1 -0
- package/x/nubs/stick-graphic/utils/calculate_basis.d.ts +2 -0
- package/x/nubs/stick-graphic/utils/calculate_basis.js +10 -0
- package/x/nubs/stick-graphic/utils/calculate_basis.js.map +1 -0
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.d.ts +2 -0
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.js +7 -0
- package/x/nubs/stick-graphic/utils/stick_vector_to_pixels.js.map +1 -0
- package/x/nubs/stick-graphic/utils/transform.d.ts +2 -0
- package/x/nubs/stick-graphic/utils/transform.js +7 -0
- package/x/nubs/stick-graphic/utils/transform.js.map +1 -0
- package/x/nubs/stick-graphic/view.d.ts +3 -0
- package/x/nubs/stick-graphic/view.js +30 -0
- package/x/nubs/stick-graphic/view.js.map +1 -0
- package/x/nubs/virtual-gamepad/device.d.ts +7 -0
- package/x/nubs/virtual-gamepad/device.js +20 -0
- package/x/nubs/virtual-gamepad/device.js.map +1 -0
- package/x/nubs/virtual-gamepad/styles.css.d.ts +2 -0
- package/x/nubs/virtual-gamepad/styles.css.js +133 -0
- package/x/nubs/virtual-gamepad/styles.css.js.map +1 -0
- package/x/nubs/virtual-gamepad/utils/gamepad-inputs.d.ts +29 -0
- package/x/nubs/virtual-gamepad/utils/gamepad-inputs.js +31 -0
- package/x/nubs/virtual-gamepad/utils/gamepad-inputs.js.map +1 -0
- package/x/nubs/virtual-gamepad/utils/prevent-default-touch-shenanigans.d.ts +1 -0
- package/x/nubs/virtual-gamepad/utils/prevent-default-touch-shenanigans.js +9 -0
- package/x/nubs/virtual-gamepad/utils/prevent-default-touch-shenanigans.js.map +1 -0
- package/x/nubs/virtual-gamepad/utils/touch-tracking.d.ts +6 -0
- package/x/nubs/virtual-gamepad/utils/touch-tracking.js +55 -0
- package/x/nubs/virtual-gamepad/utils/touch-tracking.js.map +1 -0
- package/x/nubs/virtual-gamepad/view.d.ts +2 -0
- package/x/nubs/virtual-gamepad/view.js +120 -0
- package/x/nubs/virtual-gamepad/view.js.map +1 -0
- package/x/station/devices/gamepad.d.ts +10 -0
- package/x/station/devices/gamepad.js +70 -0
- package/x/station/devices/gamepad.js.map +1 -0
- package/x/station/devices/infra/device.d.ts +4 -0
- package/x/station/devices/infra/device.js +3 -0
- package/x/station/devices/infra/device.js.map +1 -0
- package/x/station/devices/infra/group.d.ts +7 -0
- package/x/station/devices/infra/group.js +13 -0
- package/x/station/devices/infra/group.js.map +1 -0
- package/x/station/devices/infra/sampler.d.ts +8 -0
- package/x/station/devices/infra/sampler.js +17 -0
- package/x/station/devices/infra/sampler.js.map +1 -0
- package/x/station/devices/keyboard.d.ts +9 -0
- package/x/station/devices/keyboard.js +42 -0
- package/x/station/devices/keyboard.js.map +1 -0
- package/x/station/devices/pointer.d.ts +11 -0
- package/x/station/devices/pointer.js +79 -0
- package/x/station/devices/pointer.js.map +1 -0
- package/x/station/parts/action.d.ts +12 -0
- package/x/station/parts/action.js +23 -0
- package/x/station/parts/action.js.map +1 -0
- package/x/station/parts/defaults.d.ts +5 -0
- package/x/station/parts/defaults.js +22 -0
- package/x/station/parts/defaults.js.map +1 -0
- package/x/station/parts/resolver.d.ts +10 -0
- package/x/station/parts/resolver.js +63 -0
- package/x/station/parts/resolver.js.map +1 -0
- package/x/station/parts/routines/aggregate_samples_into_map.d.ts +3 -0
- package/x/station/parts/routines/aggregate_samples_into_map.js +11 -0
- package/x/station/parts/routines/aggregate_samples_into_map.js.map +1 -0
- package/x/station/parts/routines/build_updatable_actions_structure.d.ts +5 -0
- package/x/station/parts/routines/build_updatable_actions_structure.js +18 -0
- package/x/station/parts/routines/build_updatable_actions_structure.js.map +1 -0
- package/x/station/parts/routines/lensing_algorithm.d.ts +2 -0
- package/x/station/parts/routines/lensing_algorithm.js +42 -0
- package/x/station/parts/routines/lensing_algorithm.js.map +1 -0
- package/x/station/parts/switchboard-bindings.d.ts +2 -0
- package/x/station/parts/switchboard-bindings.js +19 -0
- package/x/station/parts/switchboard-bindings.js.map +1 -0
- package/x/station/station.d.ts +15 -0
- package/x/station/station.js +35 -0
- package/x/station/station.js.map +1 -0
- package/x/station/station.test.d.ts +11 -0
- package/x/station/station.test.js +80 -0
- package/x/station/station.test.js.map +1 -0
- package/x/station/switchboard.d.ts +30 -0
- package/x/station/switchboard.js +90 -0
- package/x/station/switchboard.js.map +1 -0
- package/x/station/testing/testing.d.ts +58 -0
- package/x/station/testing/testing.js +39 -0
- package/x/station/testing/testing.js.map +1 -0
- package/x/station/types.d.ts +56 -0
- package/x/station/types.js +5 -0
- package/x/station/types.js.map +1 -0
- package/x/station/utils/is-pressed.d.ts +1 -0
- package/x/station/utils/is-pressed.js +4 -0
- package/x/station/utils/is-pressed.js.map +1 -0
- package/x/station/utils/modprefix.d.ts +1 -0
- package/x/station/utils/modprefix.js +16 -0
- package/x/station/utils/modprefix.js.map +1 -0
- package/x/station/utils/tmax.d.ts +1 -0
- package/x/station/utils/tmax.js +6 -0
- package/x/station/utils/tmax.js.map +1 -0
- package/x/station/utils/tmin.d.ts +1 -0
- package/x/station/utils/tmin.js +6 -0
- package/x/station/utils/tmin.js.map +1 -0
- package/x/tests.test.d.ts +1 -0
- package/x/tests.test.js +6 -0
- package/x/tests.test.js.map +1 -0
- package/x/utils/evergreen.d.ts +1 -0
- package/x/utils/evergreen.js +10 -0
- package/x/utils/evergreen.js.map +1 -0
- package/x/utils/gamepads.d.ts +14 -0
- package/x/utils/gamepads.js +40 -0
- package/x/utils/gamepads.js.map +1 -0
- package/x/utils/split-axis.d.ts +1 -0
- package/x/utils/split-axis.js +6 -0
- package/x/utils/split-axis.js.map +1 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
function ne(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}var nt=globalThis,it=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jt=Symbol(),ie=new WeakMap,W=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==jt)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(it&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ie.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ie.set(e,t))}return t}toString(){return this.cssText}},ae=r=>new W(typeof r=="string"?r:r+"",void 0,jt),g=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,n)=>s+(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.")})(o)+r[n+1]),r[0]);return new W(e,r,jt)},at=(r,t)=>{if(it)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=nt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},I=it?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return ae(e)})(r):r;var{is:er,defineProperty:rr,getOwnPropertyDescriptor:sr,getOwnPropertyNames:or,getOwnPropertySymbols:nr,getPrototypeOf:ir}=Object,ct=globalThis,ce=ct.trustedTypes,ar=ce?ce.emptyScript:"",cr=ct.reactiveElementPolyfillSupport,Z=(r,t)=>r,Ot={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}},le=(r,t)=>!er(r,t),ue={attribute:!0,type:String,converter:Ot,reflect:!1,useDefault:!1,hasChanged:le};Symbol.metadata??=Symbol("metadata"),ct.litPropertyMetadata??=new WeakMap;var A=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 s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&rr(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:n}=sr(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let c=o?.call(this);n?.call(this,i),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ue}static _$Ei(){if(this.hasOwnProperty(Z("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(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let e=this.properties,s=[...or(e),...nr(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(I(o))}else t!==void 0&&e.push(I(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(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,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:Ot).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let n=s.getPropertyOptions(o),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Ot;this._$Em=o;let c=i.fromAttribute(e,n.type);this[o]=c??this._$Ej?.get(o)??c,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,n=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??le)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:n},i){s&&!(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||s||(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)}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[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,n]of s){let{wrapped:i}=n,c=this[o];i!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,n,c)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}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){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[Z("elementProperties")]=new Map,A[Z("finalized")]=new Map,cr?.({ReactiveElement:A}),(ct.reactiveElementVersions??=[]).push("2.1.1");var Tt=globalThis,ut=Tt.trustedTypes,he=ut?ut.createPolicy("lit-html",{createHTML:r=>r}):void 0,Nt="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,It="?"+B,ur=`<${It}>`,C=document,K=()=>C.createComment(""),Q=r=>r===null||typeof r!="object"&&typeof r!="function",Ht=Array.isArray,xe=r=>Ht(r)||typeof r?.[Symbol.iterator]=="function",zt=`[
|
|
2
|
+
\f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pe=/-->/g,fe=/>/g,k=RegExp(`>|${zt}(?:([^\\s"'>=/]+)(${zt}*=${zt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,me=/"/g,ge=/^(?:script|style|textarea|title)$/i,Ut=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),U=Ut(1),zr=Ut(2),Tr=Ut(3),P=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),ye=new WeakMap,M=C.createTreeWalker(C,129);function be(r,t){if(!Ht(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return he!==void 0?he.createHTML(t):t}var we=(r,t)=>{let e=r.length-1,s=[],o,n=t===2?"<svg>":t===3?"<math>":"",i=J;for(let c=0;c<e;c++){let a=r[c],u,h,l=-1,m=0;for(;m<a.length&&(i.lastIndex=m,h=i.exec(a),h!==null);)m=i.lastIndex,i===J?h[1]==="!--"?i=pe:h[1]!==void 0?i=fe:h[2]!==void 0?(ge.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=k):h[3]!==void 0&&(i=k):i===k?h[0]===">"?(i=o??J,l=-1):h[1]===void 0?l=-2:(l=i.lastIndex-h[2].length,u=h[1],i=h[3]===void 0?k:h[3]==='"'?me:de):i===me||i===de?i=k:i===pe||i===fe?i=J:(i=k,o=void 0);let S=i===k&&r[c+1].startsWith("/>")?" ":"";n+=i===J?a+ur:l>=0?(s.push(u),a.slice(0,l)+Nt+a.slice(l)+B+S):a+B+(l===-2?c:S)}return[be(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},Y=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[u,h]=we(t,e);if(this.el=r.createElement(u,s),M.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(o=M.nextNode())!==null&&a.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let l of o.getAttributeNames())if(l.endsWith(Nt)){let m=h[i++],S=o.getAttribute(l).split(B),ot=/([.?@])?(.*)/.exec(m);a.push({type:1,index:n,name:ot[2],strings:S,ctor:ot[1]==="."?ht:ot[1]==="?"?pt:ot[1]==="@"?ft:O}),o.removeAttribute(l)}else l.startsWith(B)&&(a.push({type:6,index:n}),o.removeAttribute(l));if(ge.test(o.tagName)){let l=o.textContent.split(B),m=l.length-1;if(m>0){o.textContent=ut?ut.emptyScript:"";for(let S=0;S<m;S++)o.append(l[S],K()),M.nextNode(),a.push({type:2,index:++n});o.append(l[m],K())}}}else if(o.nodeType===8)if(o.data===It)a.push({type:2,index:n});else{let l=-1;for(;(l=o.data.indexOf(B,l+1))!==-1;)a.push({type:7,index:n}),l+=B.length-1}n++}}static createElement(t,e){let s=C.createElement("template");return s.innerHTML=t,s}};function j(r,t,e=r,s){if(t===P)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,n=Q(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=j(r,o._$AS(r,t.values),o,s)),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:s}=this._$AD,o=(t?.creationScope??C).importNode(e,!0);M.currentNode=o;let n=M.nextNode(),i=0,c=0,a=s[0];for(;a!==void 0;){if(i===a.index){let u;a.type===2?u=new H(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new dt(n,this,t)),this._$AV.push(u),a=s[++c]}i!==a?.index&&(n=M.nextNode(),i++)}return M.currentNode=C,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.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=j(this,t,e),Q(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xe(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!==y&&Q(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Y.createElement(be(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new lt(o,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 Y(t)),e}k(t){Ht(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let n of t)o===e.length?e.push(s=new r(this.O(K()),this.O(K()),this,this.options)):s=e[o],s._$AI(n),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},O=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,n){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,o){let n=this.strings,i=!1;if(n===void 0)t=j(this,t,e,0),i=!Q(t)||t!==this._$AH&&t!==P,i&&(this._$AH=t);else{let c=t,a,u;for(t=n[0],a=0;a<n.length-1;a++)u=j(this,c[s+a],e,a),u===P&&(u=this._$AH[a]),i||=!Q(u)||u!==this._$AH[a],u===y?t=y:t!==y&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}i&&!o&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ht=class extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}},pt=class extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}},ft=class extends O{constructor(t,e,s,o,n){super(t,e,s,o,n),this.type=5}_$AI(t,e=this){if((t=j(this,t,e,0)??y)===P)return;let s=this._$AH,o=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==y&&(s===y||o);o&&this.element.removeEventListener(this.name,this,s),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)}},dt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){j(this,t)}},ve={M:Nt,P:B,A:It,C:1,L:we,R:lt,D:xe,V:j,I:H,H:O,N:pt,U:ft,B:ht,F:dt},lr=Tt.litHtmlPolyfillSupport;lr?.(Y,H),(Tt.litHtmlVersions??=[]).push("3.3.1");var E=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let n=e?.renderBefore??null;s._$litPart$=o=new H(t.insertBefore(K(),n),n,void 0,e??{})}return o._$AI(r),o};var Dt=globalThis,D=class extends A{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=E(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};D._$litElement$=!0,D.finalized=!0,Dt.litElementHydrateSupport?.({LitElement:D});var hr=Dt.litElementPolyfillSupport;hr?.({LitElement:D});(Dt.litElementVersions??=[]).push("4.2.1");function mt(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,n]of Object.entries(r)){let i=ne(o),c=customElements.get(i);e&&c||(customElements.define(i,n),s&&document.querySelectorAll(i).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function q(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`$1 ${r} not found`);return e}function pr(r,t=document){return Array.from(t.querySelectorAll(r))}q.maybe=(r,t=document)=>t.querySelector(r);q.all=pr;q.render=(r,...t)=>E(t,r);q.register=mt;var w=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;for(let e=0;e<=r.length;e++)if(r.at(e)!==t.at(e))return!1;return!0},random(r){return crypto.getRandomValues(new Uint8Array(r))}});var z=Object.freeze({fromBytes(r){return[...r].map(t=>t.toString(16).padStart(2,"0")).join("")},toBytes(r){if(r.length%2!==0)throw new Error("must have even number of hex characters");let t=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)t[e/2]=parseInt(r.slice(e,e+2),16);return t},random(r=32){return this.fromBytes(w.random(r))},string(r){return z.fromBytes(r)},bytes(r){return z.toBytes(r)}});var qt=58,yt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Rt=Object.freeze({fromBytes(r){let t=BigInt("0x"+z.fromBytes(r)),e="";for(;t>0;){let s=t%BigInt(qt);t=t/BigInt(qt),e=yt[Number(s)]+e}for(let s of r)if(s===0)e=yt[0]+e;else break;return e},toBytes(r){let t=BigInt(0);for(let i of r){let c=yt.indexOf(i);if(c===-1)throw new Error(`Invalid character '${i}' in base58 string`);t=t*BigInt(qt)+BigInt(c)}let e=t.toString(16);e.length%2!==0&&(e="0"+e);let s=z.toBytes(e),o=0;for(let i of r)if(i===yt[0])o++;else break;let n=new Uint8Array(o+s.length);return n.set(s,o),n},random(r=32){return this.fromBytes(w.random(r))},string(r){return Rt.fromBytes(r)},bytes(r){return Rt.toBytes(r)}});var $e=class{lexicon;static lexicons=Object.freeze({base2:{characters:"01"},hex:{characters:"0123456789abcdef"},base36:{characters:"0123456789abcdefghijklmnopqrstuvwxyz"},base58:{characters:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"},base62:{characters:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},base64url:{negativePrefix:"~",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},base64:{characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",padding:{character:"=",size:4}}});lookup;negativePrefix;constructor(t){this.lexicon=t,this.lookup=Object.fromEntries([...t.characters].map((e,s)=>[e,s])),this.negativePrefix=t.negativePrefix??"-"}toBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let c=0,a=0,u=[];for(let h of t){if(h===this.lexicon.padding?.character)continue;let l=this.lookup[h];if(l===void 0)throw new Error(`Invalid character: ${h}`);for(c=c<<e|l,a+=e;a>=8;)a-=8,u.push(c>>a&255)}return new Uint8Array(u)}let s=0n,o=BigInt(this.lexicon.characters.length),n=!1;t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),n=!0);for(let c of t){let a=this.lookup[c];if(a===void 0)throw new Error(`Invalid character: ${c}`);s=s*o+BigInt(a)}let i=[];for(;s>0n;)i.unshift(Number(s%256n)),s=s/256n;return new Uint8Array(i)}fromBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let i=0,c=0,a="";for(let u of t)for(i=i<<8|u,c+=8;c>=e;){c-=e;let h=i>>c&(1<<e)-1;a+=this.lexicon.characters[h]}if(c>0){let u=i<<e-c&(1<<e)-1;a+=this.lexicon.characters[u]}if(this.lexicon.padding)for(;a.length%this.lexicon.padding.size!==0;)a+=this.lexicon.padding.character;return a}let s=0n;for(let i of t)s=(s<<8n)+BigInt(i);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return n}toInteger(t){if(!t)return 0;let e=0n,s=!1,o=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),s=!0);for(let n of t){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);e=e*o+BigInt(i)}return Number(s?-e:e)}fromInteger(t){t=Math.floor(t);let e=t<0,s=BigInt(e?-t:t);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return e?`${this.negativePrefix}${n}`:n}random(t=32){return this.fromBytes(w.random(t))}};var Lt=Object.freeze({fromBytes(r){return typeof btoa=="function"?btoa(String.fromCharCode(...r)):Buffer.from(r).toString("base64")},toBytes(r){return typeof atob=="function"?Uint8Array.from(atob(r),t=>t.charCodeAt(0)):Uint8Array.from(Buffer.from(r,"base64"))},random(r=32){return this.fromBytes(w.random(r))},string(r){return Lt.fromBytes(r)},bytes(r){return Lt.toBytes(r)}});var _e=Object.freeze({fromBytes(r){return new TextDecoder().decode(r)},toBytes(r){return new TextEncoder().encode(r)},string(r){return _e.fromBytes(r)},bytes(r){return _e.toBytes(r)}});function Ae(r,t){let e,s,o=[];function n(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return n(),((...i)=>{e=i,s&&clearTimeout(s);let c=new Promise((a,u)=>{o.push({resolve:a,reject:u})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:u}of o)u(a);n()}).catch(a=>{for(let{reject:u}of o)u(a);n()})},r),c})}var Vt=Object.freeze({happy:r=>r!=null,sad:r=>r==null,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"});function X(){let r,t,e=new Promise((o,n)=>{r=o,t=n});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var R=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var Be=(r=0)=>new Promise(t=>setTimeout(t,r));function fr(r){return{map:t=>Se(r,t),filter:t=>Ee(r,t)}}fr.pipe=Object.freeze({map:r=>(t=>Se(t,r)),filter:r=>(t=>Ee(t,r))});var Se=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),Ee=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function ke(){let r=new Set;async function t(...a){await Promise.all([...r].map(u=>u(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function n(a){let{promise:u,resolve:h}=X(),l=o(async(...m)=>{a&&await a(...m),h(m),l()});return u}function i(){r.clear()}let c={pub:s,sub:o,publish:t,subscribe:e,on:e,next:n,clear:i};return Object.assign(o,c),Object.assign(s,c),c}function Me(r){let t=ke();return r&&t.sub(r),t.sub}function Ft(r){let t=ke();return r&&t.sub(r),t.pub}function Ce(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}var v=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;for(let e=0;e<=r.length;e++)if(r.at(e)!==t.at(e))return!1;return!0},random(r){return crypto.getRandomValues(new Uint8Array(r))}});var T=Object.freeze({fromBytes(r){return[...r].map(t=>t.toString(16).padStart(2,"0")).join("")},toBytes(r){if(r.length%2!==0)throw new Error("must have even number of hex characters");let t=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)t[e/2]=parseInt(r.slice(e,e+2),16);return t},random(r=32){return this.fromBytes(v.random(r))},string(r){return T.fromBytes(r)},bytes(r){return T.toBytes(r)}});var Wt=58,xt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Zt=Object.freeze({fromBytes(r){let t=BigInt("0x"+T.fromBytes(r)),e="";for(;t>0;){let s=t%BigInt(Wt);t=t/BigInt(Wt),e=xt[Number(s)]+e}for(let s of r)if(s===0)e=xt[0]+e;else break;return e},toBytes(r){let t=BigInt(0);for(let i of r){let c=xt.indexOf(i);if(c===-1)throw new Error(`Invalid character '${i}' in base58 string`);t=t*BigInt(Wt)+BigInt(c)}let e=t.toString(16);e.length%2!==0&&(e="0"+e);let s=T.toBytes(e),o=0;for(let i of r)if(i===xt[0])o++;else break;let n=new Uint8Array(o+s.length);return n.set(s,o),n},random(r=32){return this.fromBytes(v.random(r))},string(r){return Zt.fromBytes(r)},bytes(r){return Zt.toBytes(r)}});var Pe=class{lexicon;static lexicons=Object.freeze({base2:{characters:"01"},hex:{characters:"0123456789abcdef"},base36:{characters:"0123456789abcdefghijklmnopqrstuvwxyz"},base58:{characters:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"},base62:{characters:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},base64url:{negativePrefix:"~",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},base64:{characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",padding:{character:"=",size:4}}});lookup;negativePrefix;constructor(t){this.lexicon=t,this.lookup=Object.fromEntries([...t.characters].map((e,s)=>[e,s])),this.negativePrefix=t.negativePrefix??"-"}toBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let c=0,a=0,u=[];for(let h of t){if(h===this.lexicon.padding?.character)continue;let l=this.lookup[h];if(l===void 0)throw new Error(`Invalid character: ${h}`);for(c=c<<e|l,a+=e;a>=8;)a-=8,u.push(c>>a&255)}return new Uint8Array(u)}let s=0n,o=BigInt(this.lexicon.characters.length),n=!1;t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),n=!0);for(let c of t){let a=this.lookup[c];if(a===void 0)throw new Error(`Invalid character: ${c}`);s=s*o+BigInt(a)}let i=[];for(;s>0n;)i.unshift(Number(s%256n)),s=s/256n;return new Uint8Array(i)}fromBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let i=0,c=0,a="";for(let u of t)for(i=i<<8|u,c+=8;c>=e;){c-=e;let h=i>>c&(1<<e)-1;a+=this.lexicon.characters[h]}if(c>0){let u=i<<e-c&(1<<e)-1;a+=this.lexicon.characters[u]}if(this.lexicon.padding)for(;a.length%this.lexicon.padding.size!==0;)a+=this.lexicon.padding.character;return a}let s=0n;for(let i of t)s=(s<<8n)+BigInt(i);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return n}toInteger(t){if(!t)return 0;let e=0n,s=!1,o=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),s=!0);for(let n of t){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);e=e*o+BigInt(i)}return Number(s?-e:e)}fromInteger(t){t=Math.floor(t);let e=t<0,s=BigInt(e?-t:t);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return e?`${this.negativePrefix}${n}`:n}random(t=32){return this.fromBytes(v.random(t))}};var Jt=Object.freeze({fromBytes(r){return typeof btoa=="function"?btoa(String.fromCharCode(...r)):Buffer.from(r).toString("base64")},toBytes(r){return typeof atob=="function"?Uint8Array.from(atob(r),t=>t.charCodeAt(0)):Uint8Array.from(Buffer.from(r,"base64"))},random(r=32){return this.fromBytes(v.random(r))},string(r){return Jt.fromBytes(r)},bytes(r){return Jt.toBytes(r)}});var je=Object.freeze({fromBytes(r){return new TextDecoder().decode(r)},toBytes(r){return new TextEncoder().encode(r)},string(r){return je.fromBytes(r)},bytes(r){return je.toBytes(r)}});function Kt(r,t){let e,s,o=[];function n(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return n(),((...i)=>{e=i,s&&clearTimeout(s);let c=new Promise((a,u)=>{o.push({resolve:a,reject:u})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:u}of o)u(a);n()}).catch(a=>{for(let{reject:u}of o)u(a);n()})},r),c})}var Qt=Object.freeze({set:r=>r!=null,unset:r=>r==null,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"});function Oe(){let r,t,e=new Promise((o,n)=>{r=o,t=n});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}function dr(r){return{map:t=>ze(r,t),filter:t=>Te(r,t)}}dr.pipe=Object.freeze({map:r=>(t=>ze(t,r)),filter:r=>(t=>Te(t,r))});var ze=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),Te=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function mr(){let r=new Set;function t(n){return r.add(n),()=>{r.delete(n)}}async function e(...n){await Promise.all([...r].map(i=>i(...n)))}async function s(){let{promise:n,resolve:i}=Oe(),c=t((...a)=>{i(a),c()});return n}function o(){r.clear()}return t.pub=e,t.sub=t,t.on=t,t.next=s,t.clear=o,e.pub=e,e.sub=t,e.on=t,e.next=s,e.clear=o,[e,t]}function gt(r){let t=mr()[1];return r&&t.sub(r),t}var Yt=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=gt(),this.#e.set(t,e)),e}},b=globalThis[Symbol.for("e280.tracker")]??=new Yt;var{I:la}=ve;var Ne=r=>r.strings===void 0;var Ie={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},wt=r=>(...t)=>({_$litDirective$:r,values:t}),bt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var G=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),G(s,t);return!0},vt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},He=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),gr(t)}};function yr(r){this._$AN!==void 0?(vt(this),this._$AM=r,He(this)):this._$AM=r}function xr(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)G(s[n],!1),vt(s[n]);else s!=null&&(G(s,!1),vt(s));else G(this,r)}var gr=r=>{r.type==Ie.CHILD&&(r._$AP??=xr,r._$AQ??=yr)},$t=class extends bt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),He(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(G(this,t),vt(this))}setValue(t){if(Ne(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 Ue(r,t){for(let[e,s]of Object.entries(t))s===void 0||s===null?r.removeAttribute(e):typeof s=="string"?r.setAttribute(e,s):typeof s=="number"?r.setAttribute(e,s.toString()):typeof s=="boolean"?s===!0?r.setAttribute(e,""):r.removeAttribute(e):console.warn(`invalid attribute type ${e} is ${typeof s}`)}function _t(r,t){at(r,br(t))}function br(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(I(s))}else r!==void 0&&t.push(I(r));return t}function Xt(r,t=r){let{seen:e,result:s}=b.observe(r),o=Kt(0,t),n=[],i=()=>n.forEach(c=>c());for(let c of e){let a=b.subscribe(c,o);n.push(a)}return{result:s,dispose:i}}var wr={compare:(r,t)=>r===t};function L(r={}){return{...wr,...r}}var At=class{sneak;constructor(t){this.sneak=t}get(){return b.notifyRead(this),this.sneak}get value(){return this.get()}},Bt=class extends At{on=gt();dispose(){this.on.clear()}},tt=class extends Bt{_options;kind="signal";_lock=!1;constructor(t,e){super(t),this._options=e}async set(t){return!this._options.compare(this.sneak,t)&&await this.publish(t),t}get value(){return this.get()}set value(t){this.set(t)}async publish(t=this.get()){if(this._lock)throw new Error("forbid circularity");let e=Promise.resolve();try{this._lock=!0,this.sneak=t,e=Promise.all([b.notifyWrite(this),this.on.pub(t)])}finally{this._lock=!1}return await e,t}},et=class extends At{_formula;_options;kind="lazy";_dirty=!1;_effect;constructor(t,e){super(void 0),this._formula=t,this._options=e}get(){if(!this._effect){let{result:t,dispose:e}=Xt(this._formula,()=>this._dirty=!0);this._effect=e,this.sneak=t}if(this._dirty){this._dirty=!1;let t=this._formula();!this._options.compare(this.sneak,t)&&(this.sneak=t,b.notifyWrite(this))}return super.get()}get value(){return this.get()}dispose(){this._effect&&this._effect()}},rt=class extends Bt{_effect;static make(t,e,s){let{result:o,dispose:n}=Xt(e,async()=>{let i=e();!s.compare(t.sneak,i)&&(t.sneak=i,await Promise.all([b.notifyWrite(t),t.on.pub(i)]))});return new this(o,n)}kind="derived";constructor(t,e){super(t),this._effect=e}get value(){return this.get()}dispose(){super.dispose(),this._effect()}};function De(r,t={}){function e(){return e.value}let s=L(t),o=rt.make(e,r,s);return Object.setPrototypeOf(e,rt.prototype),Object.assign(e,o),e}function qe(r,t={}){function e(){return e.value}let s=L(t),o=new et(r,s);return Object.setPrototypeOf(e,et.prototype),Object.assign(e,o),e}function $(r,t={}){function e(n){return n!==void 0?e.set(n):e.get()}let s=L(t),o=new tt(r,s);return Object.setPrototypeOf(e,tt.prototype),Object.assign(e,o),e}$.lazy=qe;$.derive=De;var N={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>N.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var st=class{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static fn(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return N.all(...e)}signal;#t=0;#e=Ft();#r=Ft();constructor(t=["loading"]){this.signal=$(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal(["loading"])}async setReady(t){await this.signal(["ready",t]),await this.#e(t)}async setError(t){await this.signal(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){e===this.#t&&await this.setError(s)}}async fn(t){return this.promise(t())}get pod(){return this.signal()}set pod(t){this.signal(t)}get status(){return this.signal()[0]}get value(){return N.value(this.signal())}get error(){return N.error(this.signal())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return N.select(this.signal(),t)}morph(t){return N.morph(this.pod,t)}};var St=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 Re=(r,t)=>new Proxy(t,{get:(e,s)=>{let o=t[s],n=r.getAttribute(s);switch(o){case String:return n??void 0;case Number:return n!==null?Number(n):void 0;case Boolean:return n!==null;default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return r.setAttribute(s,o),!0;case Number:return r.setAttribute(s,o.toString()),!0;case Boolean:return o?r.setAttribute(s,""):r.removeAttribute(s),!0;default:throw new Error(`invalid attribute type for "${s}"`)}}});function Le(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var Gt=Symbol(),te=Symbol(),ee=Symbol(),Et=class{element;shadow;renderNow;render;#t=0;#e=0;#r=new R;#s=X();#o=new St;[Gt](t){this.#t++,this.#e=0,this.#s=X();let e=t();return this.#s.resolve(),e}[te](){this.#o.unmountAll()}[ee](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>_t(this.shadow,t))}css(...t){return this.styles(...t)}attrs(t){return this.mount(()=>Le(this.element,this.render)),this.once(()=>Re(this.element,t))}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>st.fn(s))}return e.fn=e,e.promise=s=>this.once(()=>st.promise(s)),e})();signal(t){return this.once(()=>$(t))}};var _=Ve({mode:"open"}),re=class extends HTMLElement{};mt({SlyView:re},{soft:!0,upgrade:!0});function Ve(r){function t(e){let s=i=>class extends $t{#t=i.getElement();#e=this.#t.attachShadow(r);#r=Ae(0,()=>this.#i());#s=new R;#o;#n=new Et(this.#t,this.#e,()=>this.#i(),this.#r);#a=(()=>{let a=e(this.#n);return this.#t.setAttribute("view",r.name??""),r.styles&&_t(this.#e,r.styles),a})();#i(){if(!this.#o||!this.isConnected)return;let{with:a,props:u}=this.#o;this.#n[Gt](()=>{Ue(this.#t,a.attrs);let{result:h,seen:l}=b.observe(()=>this.#a(...u));E(h,this.#e);for(let m of l)this.#s.guarantee(m,()=>b.subscribe(m,async()=>this.#r()));i.isComponent||E(a.children,this.#t)})}render(a,u){return this.#o={with:a,props:u},this.#i(),i.isComponent?null:this.#t}disconnected(){this.#n[te]();for(let a of this.#s.values())a();this.#s.clear()}reconnected(){this.#n[ee]()}},o=wt(s({getElement:()=>document.createElement(r.tag??"sly-view"),isComponent:!1}));function n(i){let c=(...a)=>o(i,a);return c.props=c,c.with=a=>n({...i,...a}),c.children=(...a)=>n({...i,children:a}),c.attrs=a=>n({...i,attrs:a}),c.attr=(a,u)=>n({...i,attrs:{...i.attrs,[a]:u}}),c.component=(...a)=>class extends HTMLElement{#t=wt(s({getElement:()=>this,isComponent:!0}));constructor(){super(),this.render(...a)}render(...u){this.isConnected&&E(this.#t(i,u),this)}},c}return n({attrs:{},children:null})}return t.view=t,t.settings=e=>Ve({...r,...e}),t.component=e=>t(s=>()=>e(s)).component(),t}var kt=g`
|
|
4
|
+
@layer reset {
|
|
5
|
+
* {
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
|
|
10
|
+
scrollbar-width: thin;
|
|
11
|
+
scrollbar-color: #888 transparent;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
::-webkit-scrollbar { width: 8px; }
|
|
15
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
16
|
+
::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
|
|
17
|
+
::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
18
|
+
}
|
|
19
|
+
`;function p(r,t){return()=>vr({hz:r,frames:t})}var vr=_(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(kt,$r);let s=r.signal(0);return r.mount(()=>Ce(async()=>{await Be(1e3/t);let o=s()+1;s(o>=e.length?0:o)})),e.at(s())}),$r=g`
|
|
20
|
+
:host {
|
|
21
|
+
font-family: monospace;
|
|
22
|
+
white-space: pre;
|
|
23
|
+
user-select: none;
|
|
24
|
+
}
|
|
25
|
+
`;var f=20,V=10,F=4,Bc=p(f,["|","/","-","\\"]),_r=p(f,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),Sc=p(f,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),Ec=p(f,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),kc=p(f,["\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),Mc=p(f,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1"]),Cc=p(f,["\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0"]),Pc=p(f,["\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588"]),jc=p(f,["\u2588\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2581\u2581\u2581"]),Oc=p(F,["\u{1F6B6}","\u{1F3C3}"]),zc=p(V,["\u25F7","\u25F6","\u25F5","\u25F4"]),Tc=p(f,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),Nc=p(f,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),Ic=p(V,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),Hc=p(V,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),Uc=p(V,[" "," ",". ",".. ","..."," .."," ."]),Dc=p(f,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),qc=p(f,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),Rc=p(f,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),Lc=p(f,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Vc=p(f,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),Fc=p(f,["000","100","110","111","011","001"]),Wc=p(f,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),Zc=p(f,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Jc=p(F,["\u{1F539}","\u{1F535}"]),Kc=p(V,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Qc=p(f,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Yc=p(f,["\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}"," \u{1F91C} \u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F4A5}\u{1F91B} ","\u{1F91C} \u{1F4A5} \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}"]),Xc=p(F,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),Gc=p(F,["\u{1F513}","\u{1F512}"]),tu=p(F,["\u{1F505}","\u{1F506}"]),eu=p(F,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),ru=p(V,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var Br=_(r=>t=>(r.name("error"),r.styles(kt,Sr),typeof t=="string"?t:t instanceof Error?U`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),Sr=g`
|
|
26
|
+
:host {
|
|
27
|
+
font-family: monospace;
|
|
28
|
+
color: red;
|
|
29
|
+
}
|
|
30
|
+
`;var x=class r{x;constructor(t){this.x=t}static new(t){return new this(t)}clone(){return new r(this.x)}set(t){return this.x=t,this}static isBetween(t,e=0,s=1){let o=Math.min(e,s),n=Math.max(e,s);return t>=o&&t<=n}isBetween(t=0,e=1){return r.isBetween(this.x,t,e)}static isNear(t,e,s=.01){return Math.abs(t-e)<=s}isNear(t,e=.01){return r.isNear(this.x,t,e)}static add(...t){let e=0;for(let s of t)e+=s;return e}add(...t){return this.x=r.add(this.x,...t),this}subtract(...t){for(let e of t)this.x-=e;return this}static atLeast(t,e=0){return Math.max(t,e)}atLeast(t=0){return this.x=r.atLeast(this.x,t),this}static atMost(t,e=1){return Math.min(t,e)}atMost(t=1){return this.x=r.atMost(this.x,t),this}static clamp(t,e=0,s=1){return t=r.atLeast(t,Math.min(e,s)),t=r.atMost(t,Math.max(e,s)),t}clamp(t=0,e=1){return this.x=r.clamp(this.x,t,e),this}static lerp(t,e,s,o){let i=(e-t)*s;return o!==void 0&&Math.abs(i)>o&&(i=Math.sign(i)*o),t+i}lerp(t,e,s){return this.x=r.lerp(this.x,t,e,s),this}static step(t,e,s){let o=e-t;return Math.abs(o)<=s?e:t+Math.sign(o)*s}step(t,e){return this.x=r.step(this.x,t,e),this}static creep(t,e,s,o){let n=t*(1-Math.exp(-e*s));if(o!==void 0){let i=o*s;Math.abs(n)>i&&(n=Math.sign(n)*i)}return n}static approach(t,e,s,o,n){let i=e-t,c=this.creep(i,s,o,n);return t+c}approach(t,e,s,o){return this.x=r.approach(this.x,t,e,s,o),this}static wrap(t,e=0,s=1){let o=Math.min(e,s),i=Math.max(e,s)-o,c=t-o,a=c<0?i- -c%i:c%i;return o+a}wrap(t=0,e=1){return this.x=r.wrap(this.x,t,e),this}static constrainProximity(t,e,s){let o=e-t,n=Math.abs(o),i=n>s?s:n,c=o<0?-i:i;return t+c}constrainProximity(t,e){return this.x=r.constrainProximity(this.x,t,e),this}static inverse(t){return 1-t}inverse(){return this.x=r.inverse(this.x),this}static center(t){return t*2-1}center(){return this.x=r.center(this.x),this}static uncenter(t){return(t+1)/2}uncenter(){return this.x=r.uncenter(this.x),this}static map(t,e,s){let n=(s-e)*t;return e+n}map(t,e){return this.x=r.map(this.x,t,e),this}static remap(t,e,s,o=0,n=1,i=!1){let a=(t-e)/(s-e)*(n-o)+o;return i?r.clamp(a,o,n):a}remap(t,e,s=0,o=1,n=!1){return this.x=r.remap(this.x,t,e,s,o,n),this}static magnify(t){return 4*Math.pow(t-.5,3)+.5}magnify(){return this.x=r.magnify(this.x),this}static floor(t){return Math.floor(t)}floor(){return this.x=r.floor(this.x),this}static ceil(t){return Math.ceil(t)}ceil(){return this.x=r.ceil(this.x),this}static round(t){return Math.round(t)}round(){return this.x=r.round(this.x),this}static smooth(t,e,s){return s<=1?e:t+(e-t)/s}smooth(t,e){return this.x=r.smooth(this.x,t,e),this}};var d=class r{x;y;constructor(t,e){this.x=t,this.y=e}static new(t,e){return new this(t,e)}static zero(){return new this(0,0)}static all(t){return new this(t,t)}static from(t){return Array.isArray(t)?new this(...t):new this(t.x,t.y)}static magnitudeSquared(t,e){return t*t+e*e}static magnitude(t,e){return Math.sqrt(this.magnitudeSquared(t,e))}static average(...t){return this.zero().add(...t).divideBy(t.length)}static min(...t){return new this(Math.min(...t.map(e=>e.x)),Math.min(...t.map(e=>e.y)))}static max(...t){return new this(Math.max(...t.map(e=>e.x)),Math.max(...t.map(e=>e.y)))}static fromAngle(t){return new this(Math.cos(t),Math.sin(t))}clone(){return new r(this.x,this.y)}*[Symbol.iterator](){yield this.x,yield this.y}toJSON(){return[this.x,this.y]}toString(){return`(Vec2 x${this.x.toFixed(2)}, y${this.y.toFixed(2)})`}set_(t,e){return this.x=t,this.y=e,this}set({x:t,y:e}){return this.x=t,this.y=e,this}magnitudeSquared(){return r.magnitudeSquared(this.x,this.y)}magnitude(){return r.magnitude(this.x,this.y)}rotation(){return Math.atan2(this.y,this.x)}equals_(t,e){return this.x===t&&this.y===e}equals(...t){return t.every(({x:e,y:s})=>this.equals_(e,s))}near_(t,e,s=1e-6){return Math.abs(this.x-t)<=s&&Math.abs(this.y-e)<=s}near({x:t,y:e},s=1e-6){return this.near_(t,e,s)}dot_(t,e){return this.x*t+this.y*e}dot({x:t,y:e}){return this.dot_(t,e)}distanceSquared_(t,e){return t=this.x-t,e=this.y-e,t*t+e*e}distanceSquared({x:t,y:e}){return this.distanceSquared_(t,e)}distance_(t,e){return Math.sqrt(this.distanceSquared_(t,e))}distance({x:t,y:e}){return this.distance_(t,e)}angleBetween_(t,e){let s=this.dot_(t,e),o=this.magnitude()*r.magnitude(t,e);if(o===0)return 0;let n=x.clamp(s/o,-1,1);return Math.acos(n)}angleBetween({x:t,y:e}){return this.angleBetween_(t,e)}normalize(){return this.divideBy(this.magnitude())}half(){return this.divideBy(2)}double(){return this.multiplyBy(2)}abs(){return this.map(t=>Math.abs(t))}rotate(t){let{x:e,y:s}=this;return this.x=e*Math.cos(t)-s*Math.sin(t),this.y=e*Math.sin(t)+s*Math.cos(t),this}perpendicular(){let{x:t,y:e}=this;return this.x=-e,this.y=t,this}clampMagnitude(t){return this.magnitude()>t&&this.normalize().multiplyBy(t),this}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}map(t){return this.x=t(this.x,0),this.y=t(this.y,1),this}clamp(t,e){return this.x=x.clamp(this.x,t.x,e.x),this.y=x.clamp(this.y,t.y,e.y),this}clampBy(t,e){return this.x=x.clamp(this.x,t,e),this.y=x.clamp(this.y,t,e),this}negate(){return this.map(t=>t*-1)}addBy(t){return this.x+=t,this.y+=t,this}subtractBy(t){return this.x-=t,this.y-=t,this}multiplyBy(t){return this.x*=t,this.y*=t,this}divideBy(t){return t===0?this:(this.x/=t,this.y/=t,this)}add_(t,e){return this.x+=t,this.y+=e,this}add(...t){for(let{x:e,y:s}of t)this.add_(e,s);return this}subtract_(t,e){return this.x-=t,this.y-=e,this}subtract(...t){for(let{x:e,y:s}of t)this.subtract_(e,s);return this}multiply_(t,e){return this.x*=t,this.y*=e,this}multiply(...t){for(let{x:e,y:s}of t)this.multiply_(e,s);return this}divide_(t,e){return t!==0&&(this.x/=t),e!==0&&(this.y/=e),this}divide(...t){for(let{x:e,y:s}of t)this.divide_(e,s);return this}lerp_(t,e,s){return this.x+=(t-this.x)*s,this.y+=(e-this.y)*s,this}lerp({x:t,y:e},s){return this.lerp_(t,e,s)}approach_(t,e,s,o,n){return this.x=x.approach(this.x,t,s,o,n),this.y=x.approach(this.y,e,s,o,n),this}approach({x:t,y:e},s,o,n){return this.approach_(t,e,s,o,n)}reflect_(t,e){let s=2*this.dot_(t,e);return this.x-=s*t,this.y-=s*e,this}reflect({x:t,y:e}){return this.reflect_(t,e)}rotateAroundPoint_(t,e,s){let o=this.x-t,n=this.y-e,i=Math.cos(s),c=Math.sin(s);return this.x=i*o-c*n+t,this.y=c*o+i*n+e,this}rotateAroundPoint({x:t,y:e},s){return this.rotateAroundPoint_(t,e,s)}smooth_(t,e,s){return this.x=x.smooth(this.x,t,s),this.y=x.smooth(this.y,e,s),this}smooth({x:t,y:e},s){return this.smooth_(t,e,s)}};var Fe=g`
|
|
31
|
+
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 8em;
|
|
35
|
+
aspect-ratio: 1 / 1;
|
|
36
|
+
touch-action: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.container {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[part="graphic"] {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`;var We=g`
|
|
50
|
+
|
|
51
|
+
:host {
|
|
52
|
+
display: block;
|
|
53
|
+
width: 8em;
|
|
54
|
+
height: 8em;
|
|
55
|
+
--size: var(--nub-stick-size, 66%);
|
|
56
|
+
--background: var(--nub-stick-background, black);
|
|
57
|
+
--color: var(--nub-stick-color, white);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[part="base"] {
|
|
61
|
+
position: relative;
|
|
62
|
+
aspect-ratio: 1/1;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
background: var(--background);
|
|
66
|
+
border-radius: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[part="over"], [part="under"] {
|
|
70
|
+
position: absolute;
|
|
71
|
+
inset: 0;
|
|
72
|
+
width: var(--size);
|
|
73
|
+
height: var(--size);
|
|
74
|
+
border-radius: 100%;
|
|
75
|
+
margin: auto;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
background: var(--color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[part="under"] {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`;var se=({x:r,y:t})=>`
|
|
85
|
+
transform: translate(
|
|
86
|
+
${r}px,
|
|
87
|
+
${t}px
|
|
88
|
+
);
|
|
89
|
+
`;function Ze(r,t){let e=r.getBoundingClientRect(),s=e.width/2,o=t.getBoundingClientRect().width/4;return{rect:e,radius:s-o}}function Je(r,t){return r!==void 0?t.clone().multiply_(r,-r):d.zero()}var Ke=_(r=>(t,e)=>{r.name("nub-stick-graphic"),r.styles(We);let s=r.signal(null);r.rendered.then(()=>{let c=r.shadow.querySelector('[part="base"]'),a=r.shadow.querySelector('[part="over"]');if(c&&a){let u=Ze(c,a);s.value=u,e(u)}});let o=Je(s.value?.radius,t),n=se(o),i=se(o.clone().half());return U`
|
|
90
|
+
<div part=base>
|
|
91
|
+
<div part=under style="${i}"></div>
|
|
92
|
+
<div part=over style="${n}"></div>
|
|
93
|
+
</div>
|
|
94
|
+
`});function Qe({set_vector:r,set_pointer_position:t}){let e;return{pointerdown:{handleEvent:s=>{s.preventDefault();let o=s.currentTarget;e&&o.releasePointerCapture(e),e=s.pointerId,o.setPointerCapture(e),t(d.new(s.clientX,s.clientY)),r(d.zero())}},pointermove:{passive:!1,handleEvent:s=>{s.preventDefault(),s.pointerId===e&&t(d.new(s.clientX,s.clientY))}},pointerup:{handleEvent:s=>{s.preventDefault(),e=void 0,r(d.zero())}}}}function Ye(r,{x:t,y:e}){return t**2+e**2<r**2}function Xe(r,{x:t,y:e}){let s=Math.sqrt(t**2+e**2);return d.new(t/s*r,e/s*r)}function Ge({radius:r,rect:{left:t,top:e,width:s,height:o}},{x:n,y:i}){let c=t+s/2,a=e+o/2,u=d.new(n-c,i-a);Ye(r,u)||(u=Xe(r,u));let[h,l]=u,m=d.new(h/r,-(l/r));return[...m].some(isNaN)?d.zero():m}var tr=_(r=>t=>{r.name("nub-stick"),r.styles(Fe);let e,s=n=>e=n,o=r.once(()=>Qe({set_vector:n=>t.vector.value=n,set_pointer_position:n=>{e&&(t.vector.value=Ge(e,n))}}));return r.mount(()=>(t.vector.set(d.zero()),()=>t.vector.set(d.zero()))),U`
|
|
95
|
+
<div
|
|
96
|
+
class=container
|
|
97
|
+
.vector="${t.vector}"
|
|
98
|
+
@pointerdown="${o.pointerdown}"
|
|
99
|
+
@pointermove="${o.pointermove}"
|
|
100
|
+
@pointerup="${o.pointerup}"
|
|
101
|
+
>
|
|
102
|
+
${Ke.attr("part","graphic").props(t.vector.get(),s)}
|
|
103
|
+
</div>
|
|
104
|
+
`});function oe(r){return r>=0?[0,r]:[Math.abs(r),0]}var Mt=class{};var Ct=class extends Mt{on=Me();#t=new Map;setSample(t,e){return this.#t.set(t,e),this.on.pub(t,e),this}takeSamples(){let t=[...this.#t];return this.#t.clear(),t}};var Pt=class extends Ct{channel;vector=$(d.zero());dispose;constructor(t="stick"){super(),this.channel=t,this.dispose=this.vector.on(()=>{let{up:e,down:s,left:o,right:n}=this.breakdown();this.setSample(`${t}.up`,e),this.setSample(`${t}.down`,s),this.setSample(`${t}.left`,o),this.setSample(`${t}.right`,n)})}breakdown(){let{x:t,y:e}=this.vector.get(),[s,o]=oe(e),[n,i]=oe(t);return{up:o,down:s,left:n,right:i}}};q.register({TactDemo:_.component(r=>{let t=r.once(()=>new Pt);return tr(t)})});console.log("tact");
|
|
105
|
+
/*! Bundled license information:
|
|
106
|
+
|
|
107
|
+
@lit/reactive-element/css-tag.js:
|
|
108
|
+
(**
|
|
109
|
+
* @license
|
|
110
|
+
* Copyright 2019 Google LLC
|
|
111
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
|
+
*)
|
|
113
|
+
|
|
114
|
+
@lit/reactive-element/reactive-element.js:
|
|
115
|
+
lit-html/lit-html.js:
|
|
116
|
+
lit-element/lit-element.js:
|
|
117
|
+
lit-html/directive.js:
|
|
118
|
+
lit-html/async-directive.js:
|
|
119
|
+
(**
|
|
120
|
+
* @license
|
|
121
|
+
* Copyright 2017 Google LLC
|
|
122
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
+
*)
|
|
124
|
+
|
|
125
|
+
lit-html/is-server.js:
|
|
126
|
+
(**
|
|
127
|
+
* @license
|
|
128
|
+
* Copyright 2022 Google LLC
|
|
129
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
130
|
+
*)
|
|
131
|
+
|
|
132
|
+
lit-html/directive-helpers.js:
|
|
133
|
+
(**
|
|
134
|
+
* @license
|
|
135
|
+
* Copyright 2020 Google LLC
|
|
136
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
|
+
*)
|
|
138
|
+
*/
|
|
139
|
+
//# sourceMappingURL=main.bundle.min.js.map
|