/**
 * Minified by jsDelivr using Terser v5.19.2.
 * Original file: /npm/@sats-connect/ui@0.0.7/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
function st(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return t[n]=Object.assign({},r),ze(r.value)&&!ut(r.value)&&!Array.isArray(r.value)&&(t[n].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[n].value=r.value.slice(0)),t}),{})}function ot(e){return e?Object.keys(e).reduce(((t,n)=>{const r=e[n];return t[n]=ze(r)&&"value"in r?r:{value:r},t[n].attribute||(t[n].attribute=ct(n)),t[n].parse="parse"in t[n]?t[n].parse:"string"!=typeof t[n].value,t}),{}):{}}function lt(e){return Object.keys(e).reduce(((t,n)=>(t[n]=e[n].value,t)),{})}function at(e,t){const n=st(t);return Object.keys(t).forEach((t=>{const r=n[t],o=e.getAttribute(r.attribute),i=e[t];o&&(r.value=r.parse?Ne(o):o),null!=i&&(r.value=Array.isArray(i)?i.slice(0):i),r.reflect&&$e(e,r.attribute,r.value),Object.defineProperty(e,t,{get:()=>r.value,set(e){const n=r.value;r.value=e,r.reflect&&$e(this,r.attribute,r.value);for(let r=0,o=this.__propertyChangedCallbacks.length;r<o;r++)this.__propertyChangedCallbacks[r](t,e,n)},enumerable:!0,configurable:!0})})),n}function Ne(e){if(e)try{return JSON.parse(e)}catch{return e}}function $e(e,t,n){if(null==n||!1===n)return e.removeAttribute(t);let r=JSON.stringify(n);e.__updating[t]=!0,"true"===r&&(r=""),e.setAttribute(t,r),Promise.resolve().then((()=>delete e.__updating[t]))}function ct(e){return e.replace(/\.?([A-Z]+)/g,((e,t)=>"-"+t.toLowerCase())).replace("_","-").replace(/^-/,"")}function ze(e){return null!=e&&("object"==typeof e||"function"==typeof e)}function ut(e){return"[object Function]"===Object.prototype.toString.call(e)}function dt(e){return"function"==typeof e&&0===e.toString().indexOf("class")}let ue;function ft(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map((e=>t[e].attribute))}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=at(this,t);const e=lt(this.props),n=this.Component,r=ue;try{ue=this,this.__initialized=!0,dt(n)?new n(e,{element:this}):n(e,{element:this})}finally{ue=r}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,r){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e))in t){if(null==r&&!this[e])return;this[e]=t[e].parse?Ne(r):r}}lookupProp(e){if(t)return n.find((n=>e===n||e===t[n].attribute))}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}function ht(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:o}=n;return n=>{if(!e)throw new Error("tag is required to register a Component");let i=customElements.get(e);return i?(i.prototype.Component=n,i):(i=ft(r,ot(t)),i.prototype.Component=n,i.prototype.registeredTag=e,customElements.define(e,i,o),i)}}const pt=(e,t)=>e===t,me=Symbol("solid-proxy"),yt=Symbol("solid-track"),J={equals:pt};let Re=De;const M=1,Q=2,Ie={owned:null,cleanups:null,context:null,owner:null};var w=null;let de=null,gt=null,m=null,S=null,I=null,ne=0;function Z(e,t){const n=m,r=w,o=0===e.length,i=void 0===t?r:t,s=o?Ie:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=o?e:()=>e((()=>T((()=>ie(s)))));w=s,m=null;try{return V(l,!0)}finally{m=n,w=r}}function j(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},J,t):J).equals||void 0};return[Ke.bind(n),e=>("function"==typeof e&&(e=e(n.value)),Be(n,e))]}function A(e,t,n){q(_e(e,t,!1,M))}function Fe(e,t,n){Re=Ct;const r=_e(e,t,!1,M);(!n||!n.render)&&(r.user=!0),I?I.push(r):q(r)}function F(e,t,n){n=n?Object.assign({},J,n):J;const r=_e(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,q(r),Ke.bind(r)}function mt(e){return V(e,!1)}function T(e){if(null===m)return e();const t=m;m=null;try{return e()}finally{m=t}}function bt(e){Fe((()=>T(e)))}function Me(e){return null===w||(null===w.cleanups?w.cleanups=[e]:w.cleanups.push(e)),e}function wt(e){const t=F(e),n=F((()=>be(t())));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function Ke(){if(this.sources&&this.state)if(this.state===M)q(this);else{const e=S;S=null,V((()=>te(this)),!1),S=e}if(m){const e=this.observers?this.observers.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(e)):(m.sources=[this],m.sourceSlots=[e]),this.observers?(this.observers.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}return this.value}function Be(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&V((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=de&&de.running;r&&de.disposed.has(n),(r?!n.tState:!n.state)&&(n.pure?S.push(n):I.push(n),n.observers&&Ue(n)),r||(n.state=M)}if(S.length>1e6)throw S=[],new Error}),!1)),t}function q(e){if(!e.fn)return;ie(e);const t=ne;vt(e,e.value,t)}function vt(e,t,n){let r;const o=w,i=m;m=w=e;try{r=e.fn(t)}catch(t){return e.pure&&(e.state=M,e.owned&&e.owned.forEach(ie),e.owned=null),e.updatedAt=n+1,We(t)}finally{m=i,w=o}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?Be(e,r):e.value=r,e.updatedAt=n)}function _e(e,t,n,r=M,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:w,context:w?w.context:null,pure:n};return null===w||w!==Ie&&(w.owned?w.owned.push(i):w.owned=[i]),i}function ee(e){if(0===e.state)return;if(e.state===Q)return te(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ne);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===M)q(e);else if(e.state===Q){const n=S;S=null,V((()=>te(e,t[0])),!1),S=n}}function V(e,t){if(S)return e();let n=!1;t||(S=[]),I?n=!0:I=[],ne++;try{const t=e();return xt(n),t}catch(e){n||(I=null),S=null,We(e)}}function xt(e){if(S&&(De(S),S=null),e)return;const t=I;I=null,t.length&&V((()=>Re(t)),!1)}function De(e){for(let t=0;t<e.length;t++)ee(e[t])}function Ct(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:ee(r)}for(t=0;t<n;t++)ee(e[t])}function te(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===M?r!==t&&(!r.updatedAt||r.updatedAt<ne)&&ee(r):e===Q&&te(r,t)}}}function Ue(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Q,n.pure?S.push(n):I.push(n),n.observers&&Ue(n))}}function ie(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ie(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Pt(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}function We(e,t=w){throw Pt(e)}function be(e){if("function"==typeof e&&!e.length)return be(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=be(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}const St=Symbol("fallback");function Ae(e){for(let t=0;t<e.length;t++)e[t]()}function _t(e,t,n={}){let r=[],o=[],i=[],s=0,l=t.length>1?[]:null;return Me((()=>Ae(i))),()=>{let a,c,d=e()||[];return d[yt],T((()=>{let e,t,p,f,h,y,g,b,m,v=d.length;if(0===v)0!==s&&(Ae(i),i=[],r=[],o=[],s=0,l&&(l=[])),n.fallback&&(r=[St],o[0]=Z((e=>(i[0]=e,n.fallback()))),s=1);else if(0===s){for(o=new Array(v),c=0;c<v;c++)r[c]=d[c],o[c]=Z(u);s=v}else{for(p=new Array(v),f=new Array(v),l&&(h=new Array(v)),y=0,g=Math.min(s,v);y<g&&r[y]===d[y];y++);for(g=s-1,b=v-1;g>=y&&b>=y&&r[g]===d[b];g--,b--)p[b]=o[g],f[b]=i[g],l&&(h[b]=l[g]);for(e=new Map,t=new Array(b+1),c=b;c>=y;c--)m=d[c],a=e.get(m),t[c]=void 0===a?-1:a,e.set(m,c);for(a=y;a<=g;a++)m=r[a],c=e.get(m),void 0!==c&&-1!==c?(p[c]=o[a],f[c]=i[a],l&&(h[c]=l[a]),c=t[c],e.set(m,c)):i[a]();for(c=y;c<v;c++)c in p?(o[c]=p[c],i[c]=f[c],l&&(l[c]=h[c],l[c](c))):o[c]=Z(u);o=o.slice(0,s=v),r=d.slice(0)}return o}));function u(e){if(i[c]=e,l){const[e,n]=j(c);return l[c]=n,t(d[c],e)}return t(d[c])}}}function g(e,t){return T((()=>e(t||{})))}function Y(){return!0}const Et={get:(e,t,n)=>t===me?n:e.get(t),has:(e,t)=>t===me||e.has(t),set:Y,deleteProperty:Y,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:Y,deleteProperty:Y}),ownKeys:e=>e.keys()};function fe(e){return(e="function"==typeof e?e():e)?e:{}}function kt(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function $t(...e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];t=t||!!r&&me in r,e[n]="function"==typeof r?(t=!0,F(r)):r}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=fe(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in fe(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(fe(e[n])));return[...new Set(t)]}},Et);const n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){const o=e[t];if(!o)continue;const i=Object.getOwnPropertyNames(o);for(let e=i.length-1;e>=0;e--){const t=i[e];if("__proto__"===t||"constructor"===t)continue;const s=Object.getOwnPropertyDescriptor(o,t);if(r[t]){const e=n[t];e&&(s.get?e.push(s.get.bind(o)):void 0!==s.value&&e.push((()=>s.value)))}else r[t]=s.get?{enumerable:!0,configurable:!0,get:kt.bind(n[t]=[s.get.bind(o)])}:void 0!==s.value?s:void 0}}const o={},i=Object.keys(r);for(let e=i.length-1;e>=0;e--){const t=i[e],n=r[t];n&&n.get?Object.defineProperty(o,t,n):o[t]=n?n.value:void 0}return o}const Ve=e=>`Stale read from <${e}>.`;function At(e){const t="fallback"in e&&{fallback:()=>e.fallback};return F(_t((()=>e.each),e.children,t||void 0))}function he(e){const t=e.keyed,n=F((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return F((()=>{const r=n();if(r){const o=e.children;return"function"==typeof o&&o.length>0?T((()=>o(t?r:()=>{if(!T(n))throw Ve("Show");return e.when}))):o}return e.fallback}),void 0,void 0)}function Lt(e){let t=!1;const n=wt((()=>e.children)),r=F((()=>{let e=n();Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){const r=e[n].when;if(r)return t=!!e[n].keyed,[n,r,e[n]]}return[-1]}),void 0,{equals:(e,n)=>(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return F((()=>{const[n,o,i]=r();if(n<0)return e.fallback;const s=i.children;return"function"==typeof s&&s.length>0?T((()=>s(t?o:()=>{if(T(r)[0]!==n)throw Ve("Match");return i.when}))):s}),void 0,void 0)}function pe(e){return e}const Ot=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],jt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ot]),Tt=new Set(["innerHTML","textContent","innerText","children"]),Nt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),zt=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Rt(e,t){const n=zt[e];return"object"==typeof n?n[t]?n.$:void 0:n}const It=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ft={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Mt(e,t,n){let r=n.length,o=t.length,i=r,s=0,l=0,a=t[o-1].nextSibling,c=null;for(;s<o||l<i;)if(t[s]!==n[l]){for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const t=i<r?l?n[l-1].nextSibling:n[i-l]:a;for(;l<i;)e.insertBefore(n[l++],t)}else if(i===l)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[l]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=l;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[s]);if(null!=r)if(l<r&&r<i){let a,d=s,u=1;for(;++d<o&&d<i&&null!=(a=c.get(t[d]))&&a===r+u;)u++;if(u>r-l){const o=t[s];for(;l<r;)e.insertBefore(n[l++],o)}else e.replaceChild(n[l++],t[s++])}else s++;else t[s++].remove()}}else s++,l++}const Le="_$DX_DELEGATE";function C(e,t,n){let r;const o=()=>{const t=document.createElement("template");return t.innerHTML=e,n?t.content.firstChild.firstChild:t.content.firstChild},i=t?()=>T((()=>document.importNode(r||(r=o()),!0))):()=>(r||(r=o())).cloneNode(!0);return i.cloneNode=i,i}function Kt(e,t=window.document){const n=t[Le]||(t[Le]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Ht))}}function N(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function Bt(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function Dt(e,t){null==t?e.removeAttribute("class"):e.className=t}function Ut(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n)}function Wt(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const r=o[i];!r||"undefined"===r||t[r]||(Oe(e,r,!1),delete n[r])}for(i=0,s=r.length;i<s;i++){const o=r[i],s=!!t[o];!o||"undefined"===o||n[o]===s||!s||(Oe(e,o,!0),n[o]=s)}return n}function L(e,t,n){if(!t)return n?N(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Vt(e,t={},n,r){const o={};return r||A((()=>o.children=U(e,t.children,o.children))),A((()=>t.ref&&t.ref(e))),A((()=>Xt(e,t,n,!0,o,!0))),o}function ye(e,t,n){return T((()=>e(t,n)))}function b(e,t,n,r){if(void 0!==n&&!r&&(r=[]),"function"!=typeof t)return U(e,t,r,n);A((r=>U(e,t(),r,n)),r)}function Xt(e,t,n,r,o={},i=!1){t||(t={});for(const r in o)if(!(r in t)){if("children"===r)continue;o[r]=je(e,r,null,o[r],n,i)}for(const s in t){if("children"===s){r||U(e,t.children);continue}const l=t[s];o[s]=je(e,s,l,o[s],n,i)}}function qt(e){return e.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase()))}function Oe(e,t,n){const r=t.trim().split(/\s+/);for(let t=0,o=r.length;t<o;t++)e.classList.toggle(r[t],n)}function je(e,t,n,r,o,i){let s,l,a,c,d;if("style"===t)return L(e,n,r);if("classList"===t)return Wt(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r),n&&e.addEventListener(o,n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=It.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(Ut(e,o,n,i),i&&Kt([o]))}else if("attr:"===t.slice(0,5))N(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(a=Tt.has(t))||!o&&((c=Rt(t,e.tagName))||(l=jt.has(t)))||(s=e.nodeName.includes("-")))d&&(t=t.slice(5),l=!0),"class"===t||"className"===t?Dt(e,n):!s||l||a?e[c||t]=n:e[qt(t)]=n;else{const r=o&&t.indexOf(":")>-1&&Ft[t.split(":")[0]];r?Bt(e,r,t,n):N(e,Nt[t]||t,n)}return n}function Ht(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document});n;){const r=n[t];if(r&&!n.disabled){const o=n[`${t}Data`];if(void 0!==o?r.call(n,o,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function U(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==r;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let o=n[0];o&&3===o.nodeType?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=D(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i)n=D(e,n,r);else{if("function"===i)return A((()=>{let o=t();for(;"function"==typeof o;)o=o();n=U(e,o,n,r)})),()=>n;if(Array.isArray(t)){const i=[],l=n&&Array.isArray(n);if(we(i,t,n,o))return A((()=>n=U(e,i,n,r,!0))),()=>n;if(0===i.length){if(n=D(e,n,r),s)return n}else l?0===n.length?Te(e,i,r):Mt(e,n,i):(n&&D(e),Te(e,i));n=i}else if(t.nodeType){if(Array.isArray(n)){if(s)return n=D(e,n,r,t);D(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function we(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let s,l=t[i],a=n&&n[e.length];if(null!=l&&!0!==l&&!1!==l)if("object"==(s=typeof l)&&l.nodeType)e.push(l);else if(Array.isArray(l))o=we(e,l,a)||o;else if("function"===s)if(r){for(;"function"==typeof l;)l=l();o=we(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||o}else e.push(l),o=!0;else{const t=String(l);a&&3===a.nodeType&&a.data===t?e.push(a):e.push(document.createTextNode(t))}}return o}function Te(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function D(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(o!==s){const t=s.parentNode===e;r||i?t&&s.remove():t?e.replaceChild(o,s):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}function Yt(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[o,i]=j(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(e){i((()=>e))}})}return n}function Gt(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&(!t.assignedSlot||!t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Zt(e){return(t,n)=>{const{element:r}=n;return Z((o=>{const i=Yt(t);r.addPropertyChangedCallback(((e,t)=>i[e]=t)),r.addReleaseCallback((()=>{r.renderRoot.textContent="",o()}));const s=e(i,n);return b(r.renderRoot,s)}),Gt(r))}}function Jt(e,t,n){return 2===arguments.length&&(n=t,t={}),ht(e,t)(Zt(n))}const ve="sats-connect_wallet-provider-selector_select",xe="sats-connect_wallet-provider-selector_cancel",Ce="sats-connect_wallet-provider-selector_open",Pe="sats-connect_wallet-provider-selector_close",Xe="sats-connect_wallet-provider-selector_walletOpen",qe="sats-connect_wallet-provider-selector_walletClose",re={color:"#181818","font-size":"18px","font-weight":"700","line-height":"1.4"},W={color:"#181818","font-size":"14px","font-weight":"400","line-height":"1.4"},Qt={color:"#181818","font-size":"14px","font-weight":"500"};var en=C('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><g id=XCircle><path id=Vector d="M12 2.25C10.0716 2.25 8.18657 2.82183 6.58319 3.89317C4.97982 4.96451 3.73013 6.48726 2.99218 8.26884C2.25422 10.0504 2.06114 12.0108 2.43735 13.9021C2.81355 15.7934 3.74215 17.5307 5.10571 18.8943C6.46928 20.2579 8.20656 21.1865 10.0979 21.5627C11.9892 21.9389 13.9496 21.7458 15.7312 21.0078C17.5127 20.2699 19.0355 19.0202 20.1068 17.4168C21.1782 15.8134 21.75 13.9284 21.75 12C21.745 9.41566 20.7162 6.93859 18.8888 5.11118C17.0614 3.28378 14.5843 2.25496 12 2.25ZM15.5344 14.4656C15.6752 14.6078 15.7542 14.7999 15.7542 15C15.7542 15.2001 15.6752 15.3922 15.5344 15.5344C15.391 15.673 15.1994 15.7505 15 15.7505C14.8006 15.7505 14.609 15.673 14.4656 15.5344L12 13.0594L9.53438 15.5344C9.39102 15.673 9.19942 15.7505 9 15.7505C8.80059 15.7505 8.60898 15.673 8.46563 15.5344C8.32479 15.3922 8.24578 15.2001 8.24578 15C8.24578 14.7999 8.32479 14.6078 8.46563 14.4656L10.9406 12L8.46563 9.53437C8.34603 9.38865 8.28491 9.20366 8.29416 9.01537C8.30341 8.82708 8.38236 8.64896 8.51566 8.51566C8.64896 8.38236 8.82708 8.3034 9.01537 8.29416C9.20366 8.28491 9.38866 8.34603 9.53438 8.46563L12 10.9406L14.4656 8.46563C14.6114 8.34603 14.7963 8.28491 14.9846 8.29416C15.1729 8.3034 15.351 8.38236 15.4843 8.51566C15.6176 8.64896 15.6966 8.82708 15.7058 9.01537C15.7151 9.20366 15.654 9.38865 15.5344 9.53437L13.0594 12L15.5344 14.4656Z"fill=black fill-opacity=0.3>'),tn=C("<style>\n          .close-selector-button:focus-visible {\n            outline: 2px solid #181818;\n            outline-offset: -0.25px;\n          }\n        "),nn=C("<div role=button tabindex=0 class=close-selector-button>");function rn(e){return(t=en()).style.setProperty("display","block"),Vt(t,e,!0,!0),t;var t}function sn(e){function t(t){("Enter"===t.key||" "===t.key)&&e.onClose()}return[tn(),(n=nn(),n.style.setProperty("position","absolute"),n.style.setProperty("top","16px"),n.style.setProperty("right","16px"),n.style.setProperty("background","none"),n.style.setProperty("border","none"),n.style.setProperty("cursor","pointer"),n.style.setProperty("padding","0"),n.style.setProperty("margin","0"),n.style.setProperty("border-radius","50%"),n.addEventListener("click",e.onClose),n.addEventListener("keydown",t),b(n,g(rn,{})),n)];var n}var on=C("<style>\n/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n::before,\n::after {\n\tbox-sizing: border-box;\n\tmargin: 0; /* Remove all margins from everywhere. */\n}\n\n:host {\n\t/* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */\n\tfont-family:\n\t\t'DM Sans', /* Note: not part of modern-normalize, added specifically for this project. */\n\t\tsystem-ui,\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n\tline-height: 1.15; /* 1. Correct the line height in all browsers. */\n\t-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */\n\t-moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */\n\ttab-size: 4; /* 3 */\n}\n\n/*\nSections\n========\n*/\n\n:host {\n\tmargin: 0; /* Remove the margin in all browsers. */\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n\theight: 0; /* 1 */\n\tcolor: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n\ttext-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n\tfont-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n\tfont-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n\tfont-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n\tfont-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n\tfont-size: 75%;\n\tline-height: 0;\n\tposition: relative;\n\tvertical-align: baseline;\n}\n\nsub {\n\tbottom: -0.25em;\n}\n\nsup {\n\ttop: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n\ttext-indent: 0; /* 1 */\n\tborder-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n\tfont-family: inherit; /* 1 */\n\tfont-size: 100%; /* 1 */\n\tline-height: 1.15; /* 1 */\n\tmargin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n\ttext-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n\t-webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n::-moz-focus-inner {\n\tborder-style: none;\n\tpadding: 0;\n}\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n:-moz-focusring {\n\toutline: 1px dotted ButtonText;\n}\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n:-moz-ui-invalid {\n\tbox-shadow: none;\n}\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n\tpadding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n\tvertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n\theight: auto;\n}\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n\t-webkit-appearance: textfield; /* 1 */\n\toutline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n\t-webkit-appearance: none;\n}\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n::-webkit-file-upload-button {\n\t-webkit-appearance: button; /* 1 */\n\tfont: inherit; /* 2 */\n}\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n\tdisplay: list-item;\n}\n");function ln(){return on()}var an=C("<div class=divider><div>");function cn(){return e=an(),(t=e.firstChild).style.setProperty("height","100%"),t.style.setProperty("width","1px"),t.style.setProperty("background","#dcdcdc"),e;var e,t}var un=C("<div>");function dn(e){return(t=un()).style.setProperty("padding","24px"),t.style.setProperty("height","100%"),b(t,(()=>e.children)),t;var t}var fn=C("<div>");function hn(e){return(t=fn()).style.setProperty("display","flex"),t.style.setProperty("flex-direction","column"),t.style.setProperty("justify-content","center"),t.style.setProperty("align-items","center"),t.style.setProperty("height","100%"),b(t,(()=>e.children)),t;var t}var pn=C("<div><div>🤔</div><div>What is a wallet?</div><p>Wallets let you send, receive, store and display digital assets like Bitcoin, Stacks, Ordinals & NFTs.</p><p>Explore Bitcoin apps by connecting your wallet.");function yn(){return e=pn(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,o=r.nextSibling,e.style.setProperty("display","flex"),e.style.setProperty("flex-direction","column"),e.style.setProperty("row-gap","8px"),e.style.setProperty("justify-content","center"),e.style.setProperty("align-items","center"),t.style.setProperty("font-size","50px"),t.style.setProperty("line-height","140%"),A((e=>{var t=re,i=W,s=W;return e.e=L(n,t,e.e),e.t=L(r,i,e.t),e.a=L(o,s,e.a),e}),{e:void 0,t:void 0,a:void 0}),e;var e,t,n,r,o}function Se(e){var t;const n=null==(t=e.installPrompt)?void 0:t.url;n?window.open(n,"_blank"):console.error("No install prompt URL found for",e.id)}var gn=C("<style>\n          .install-prompt-button:focus-visible {\n            outline: 2px solid #181818;\n            outline-offset: 2px;\n          }\n        "),mn=C("<div><img><h1>Don't have <!>?</h1><p>Download it on the Chrome web store.</p><div class=install-prompt-button role=button tabindex=0>Get");function bn(e){function t(t){("Enter"===t.key||" "===t.key)&&Se(e.option)}function n(){Se(e.option)}return[gn(),(()=>{var r=mn(),o=r.firstChild,i=o.nextSibling,s=i.firstChild.nextSibling;s.nextSibling;var l=i.nextSibling,a=l.nextSibling;return r.style.setProperty("display","flex"),r.style.setProperty("flex-direction","column"),r.style.setProperty("align-items","center"),r.style.setProperty("row-gap","16px"),o.style.setProperty("border-radius","12px"),o.style.setProperty("height","64px"),o.style.setProperty("width","64px"),o.style.setProperty("object-fit","cover"),b(i,(()=>e.option.name),s),a.addEventListener("click",n),a.addEventListener("keydown",t),A((t=>{var n=e.option.icon,r=e.option.name,s={...re,"text-align":"center"},c=W,d={...Qt,cursor:"pointer","border-radius":"12px",background:"#181818",color:"white",padding:"12px 16px"};return n!==t.e&&N(o,"src",t.e=n),r!==t.t&&N(o,"alt",t.t=r),t.a=L(i,s,t.a),t.o=L(l,c,t.o),t.i=L(a,d,t.i),t}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()]}var wn=C('<svg width=20 height=20 viewBox="0 0 20 20"xmlns=http://www.w3.org/2000/svg><circle cx=10 cy=10 r=9.05 stroke=black stroke-width=1.9 fill=none stroke-dasharray="42.65 14.22"stroke-dashoffset=0><animateTransform attributeName=transform attributeType=XML type=rotate from="0 10 10"to="360 10 10"dur=0.75s repeatCount=indefinite>'),vn=C("<div>");const xn=()=>wn();function Cn(){return(e=vn()).style.setProperty("display","flex"),e.style.setProperty("justify-content","center"),e.style.setProperty("align-items","center"),e.style.setProperty("height","100%"),e.style.setProperty("animation","spin 1s linear infinite"),b(e,g(xn,{})),e;var e}var Pn=C("<div><img><h1>Opening <!>...</h1><p>Confirm the operation in ");function Sn(e){return(()=>{var t=Pn(),n=t.firstChild,r=n.nextSibling,o=r.firstChild.nextSibling;o.nextSibling;var i=r.nextSibling;return i.firstChild,t.style.setProperty("display","flex"),t.style.setProperty("flex-direction","column"),t.style.setProperty("align-items","center"),t.style.setProperty("row-gap","16px"),n.style.setProperty("border-radius","12px"),n.style.setProperty("height","64px"),n.style.setProperty("width","64px"),n.style.setProperty("object-fit","cover"),b(r,(()=>e.option.name),o),b(i,(()=>e.option.name),null),b(t,g(Cn,{}),null),A((t=>{var o=e.option.icon,s=e.option.name,l={...re,"text-align":"center"},a=W;return o!==t.e&&N(n,"src",t.e=o),s!==t.t&&N(n,"alt",t.t=s),t.a=L(r,l,t.a),t.o=L(i,a,t.o),t}),{e:void 0,t:void 0,a:void 0,o:void 0}),t})()}var _n=C("<div><div tabindex=0><img><div>");function En(e){function t(){e.onProviderSelected(e.id)}const n=F((()=>ke(e)?"button":"link"));function r(e){"link"!==n()?"button"!==n()||("Enter"===e.key||" "===e.key)&&t():"Enter"===e.key&&t()}const[o,i]=j(!1),[s,l]=j(!1),a=()=>o()||s();return c=_n(),d=c.firstChild,u=d.firstChild,p=u.nextSibling,c.style.setProperty("aspect-ratio","1 / 1"),c.style.setProperty("overflow","hidden"),d.style.setProperty("display","flex"),d.style.setProperty("flex-direction","column"),d.style.setProperty("row-gap","12px"),d.style.setProperty("align-items","center"),d.style.setProperty("cursor","pointer"),d.style.setProperty("outline","none"),d.style.setProperty("padding-top","10px"),d.addEventListener("click",t),d.addEventListener("keydown",r),d.addEventListener("mouseenter",(()=>i(!0))),d.addEventListener("mouseleave",(()=>i(!1))),d.addEventListener("focus",(()=>l(!0))),d.addEventListener("blur",(()=>l(!1))),u.style.setProperty("width","56px"),u.style.setProperty("height","56px"),u.style.setProperty("object-fit","cover"),u.style.setProperty("border-radius","12px"),b(p,(()=>e.name)),A((t=>{var r=n(),o=a()?"6px solid rgba(24, 24, 24, 0.20)":"none",i=e.icon,s=e.name,l={...W,color:a()?"rgba(24, 24, 24, 0.60)":void 0,"text-align":"center"};return r!==t.e&&N(d,"role",t.e=r),o!==t.t&&(null!=(t.t=o)?u.style.setProperty("outline",o):u.style.removeProperty("outline")),i!==t.a&&N(u,"src",t.a=i),s!==t.o&&N(u,"alt",t.o=s),t.i=L(p,l,t.i),t}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),c;var c,d,u,p}var kn=C('<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&amp;display=swap"rel=stylesheet>'),$n=C("<div class=side-panel>"),An=C('<div><div></div><div><div class=card-width-container><div class=card-height-container><div class=card><div class=card-grid><div class=main-panel><div></div><div></div><div class=wallets-grid-container data-desc="wallet grid container for padding"><div class=wallets-grid data-desc="wallet grid container">'),Ln=C("<div><style>\n        @keyframes wallet-selector-fade-in {\n          from {opacity: 0; transform: translateY(40px);}\n          to {opacity: 1; transform: translateY(0);}\n        }\n\n        @keyframes wallet-selector-fade-out {\n          from {opacity: 1; transform: translateY(0);}\n          to {opacity: 0; transform: translateY(40px);}\n        }\n        @keyframes wallet-selector-blur-in {\n          from {opacity: 0; backdrop-filter: blur(0px);}\n          to {opacity: 1; backdrop-filter: blur(10px);}\n        }\n\n        @keyframes wallet-selector-blur-out {\n          from {opacity: 1; backdrop-filter: blur(10px);}\n          to {opacity: 0; backdrop-filter: blur(0px);}\n        }\n      </style><style>");const G="24px";function On(){const[e,t]=j(),[n,r]=j(),[o,i]=j();const[s,l]=j(!1),[a,c]=j(!1),[d,u]=j([]),[p,f]=j({type:"none"}),h=()=>d().some((e=>jn(e))),y=()=>l(!1);function m(){const e=new CustomEvent(xe,{bubbles:!0,composed:!0});window.dispatchEvent(e),y()}function v(e){"Escape"===e.key&&m()}function w(t){const n=d().find((e=>e.id===t));if(ke(n))return void(!function(){const t=e(),n=o();return!(!t||!n||!t.contains(n)||"none"===getComputedStyle(n).display)}()?Se(n):f({type:"install-wallet-prompt",option:n}));const r=new CustomEvent(ve,{detail:t,bubbles:!0,composed:!0});window.dispatchEvent(r)}function x(e){mt((()=>{l(!0),c(!0);const t=e.detail.options;u(t),t.some((e=>!e.installPrompt))?f({type:"explainer"}):f({type:"none"})}))}function C(){l(!1)}Fe((()=>{s()?window.addEventListener("keydown",v):window.removeEventListener("keydown",v)}));const P=()=>{s()||c(!1)};function k(e){const t=e.detail;f({type:"opening-wallet",option:d().find((e=>e.id===t))})}function S(){f({type:"explainer"})}function E(e){const t=e.target;if(!t)return;const r=n();r&&(r.contains(t)||m())}return bt((()=>{window.addEventListener(Ce,x),window.addEventListener(Pe,C),window.addEventListener(Xe,k),window.addEventListener(qe,S),document.head.appendChild(kn())})),Me((()=>{window.removeEventListener(Ce,x),window.removeEventListener(Pe,C)})),_=Ln(),O=_.firstChild,N=O.nextSibling,ye(t,_),_.style.setProperty("inset","0"),_.addEventListener("click",E),_.addEventListener("keydown",(()=>{console.log("Inside root keydown")})),b(_,g(ln,{}),O),b(N,(()=>`\n        .card-width-container {\n          container: card-width-container / inline-size;\n          display: flex;\n          justify-content: center;\n          align-items: center;\n          height: 100%;\n          width: 740px;\n        }\n\n        .card-height-container {\n          display: flex;\n          flex-direction: column;\n          align-items: center;\n          justify-content: flex-end;\n          height: 100%;\n          width: 100%;\n        }\n\n        .card {\n          min-height: 340px;\n          max-height: calc(100vh - 8rem);\n          width: 100%;\n          border-top-left-radius: ${G};\n          border-top-right-radius: ${G};\n\n          background: rgb(196, 177, 217);\n          overflow: hidden;\n\n          display: flex;\n          flex-direction: column;\n\n          position: "relative"; /* For the close button */\n          background-color: #ffffff;\n          display: ${a()?"block":"none"};\n\n          box-shadow: 0px 8px 64px 0px rgba(0, 0, 0, 0.25);\n          animation: ${s()?"wallet-selector-fade-in 0.4s cubic-bezier(.05, .7, .1, 1) forwards":"wallet-selector-fade-out 0.2s cubic-bezier(.3, 0, .8, .15) forwards"};\n        }\n\n        .card-grid {\n          flex-grow: 1;\n          height: 100%;\n          \n          display: grid;\n          grid-template-columns: 1fr;\n          grid-template-areas: "mainPanel";\n        }\n\n        .main-panel {\n          height: 100%;\n          overflow: hidden;\n          display: flex;\n          flex-direction: column;\n          grid-area: mainPanel;\n        }\n\n        .wallets-grid-container {\n          overflow: auto;\n          flex-grow: 1;\n        }\n\n        .wallets-grid {\n          display: grid;\n          grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));\n          align-content: start;\n\n          padding-left: 24px;\n          padding-right: 24px;\n          padding-bottom: 40px;\n        }\n\n        .divider {\n          display: none;\n          grid-area: divider;\n        }\n\n        .side-panel {\n          display: none;\n          grid-area: sidePanel;\n        }\n\n        @container card-width-container (width > 400px) {\n          .card-height-container {\n            justify-content: center;\n          }\n\n          .card {\n            max-width: calc(100vw - 2rem);\n            max-height: 460px;\n            ${h()?"":"width: 360px;"}\n            border-bottom-left-radius: ${G};\n            border-bottom-right-radius: ${G};\n          }\n\n          .card-grid {\n            grid-template-columns: ${h()?"5fr auto 4fr":"1fr"};\n            grid-template-areas: ${h()?'"mainPanel divider sidePanel"':'"mainPanel"'};\n          }\n\n          .divider {\n            display: block;\n          }\n\n          .side-panel {\n            display: flex;\n            flex-direction: column;\n            justify-content: center;\n            align-items: center;\n          }\n        }\n      `)),b(_,g(he,{get when(){return a()},get children(){var e=An(),t=e.firstChild,n=t.nextSibling,o=n.firstChild.firstChild.firstChild,l=o.firstChild,a=l.firstChild.firstChild,c=a.nextSibling,u=c.nextSibling.firstChild;return e.style.setProperty("position","fixed"),e.style.setProperty("inset","0"),t.style.setProperty("background-color","#FFFFFF80"),t.style.setProperty("position","absolute"),t.style.setProperty("inset","0"),n.style.setProperty("display","flex"),n.style.setProperty("justify-content","center"),n.style.setProperty("align-items","center"),n.style.setProperty("height","100%"),ye(r,o),o.addEventListener("animationend",P),b(a,(()=>h()?"Choose wallet to connect":"Don't have a wallet?")),b(c,(()=>h()?"Start by selecting one of the wallets below and confirming the connection.":"Start by installing one of the wallets below.")),b(u,g(At,{get each(){return d()},children:e=>g(En,$t(e,{onProviderSelected:w}))})),b(l,g(he,{get when(){return"none"!==p().type},get children(){return g(cn,{})}}),null),b(l,g(he,{get when(){return"none"!==p().type},get children(){var e=$n();return ye(i,e),b(e,g(dn,{get children(){return g(hn,{get children(){return g(Lt,{fallback:null,get children(){return[g(pe,{get when(){return"install-wallet-prompt"===p().type},get children(){return g(bn,{get option(){return p().option}})}}),g(pe,{get when(){return"explainer"===p().type},get children(){return g(yn,{})}}),g(pe,{get when(){return"opening-wallet"===p().type},get children(){return g(Sn,{get option(){return p().option}})}})]}})}})}})),e}}),null),b(o,g(sn,{onClose:m}),null),A((e=>{var n=s()?"wallet-selector-blur-in 0.2s cubic-bezier(.05, .7, .1, 1) forwards":"wallet-selector-blur-out 0.2s cubic-bezier(.3, 0, .8, .15) forwards",r={...re,margin:"0","padding-top":"24px","padding-left":"24px","padding-right":"24px","padding-bottom":"16px"},o={...W,"padding-left":"24px","padding-right":"24px","padding-bottom":"30px"};return n!==e.e&&(null!=(e.e=n)?t.style.setProperty("animation",n):t.style.removeProperty("animation")),e.t=L(a,r,e.t),e.a=L(c,o,e.a),e}),{e:void 0,t:void 0,a:void 0}),e}}),null),A((()=>null!=(a()?"fixed":"static")?_.style.setProperty("position",a()?"fixed":"static"):_.style.removeProperty("position"))),_;var _,O,N}const Ee="sats-connect-wallet-provider-selector",ge=Ee;function He(){return document.getElementById(Ee)}function Nn(){if(customElements.get(ge))return;Jt(ge,On);const e=document.createElement(ge);e.id=Ee,e.style.position="relative",e.style.zIndex="999999",document.body.appendChild(e)}function zn(){const e=He();e&&e.remove()}function ke(e){return!!e.installPrompt}function jn(e){return!ke(e)}function Rn(e){return new Promise(((t,n)=>{if(!He())return void n("Failed to detect the wallet provider selector.");function r(){window.removeEventListener(ve,o),window.removeEventListener(xe,i)}function o(e){t(e.detail),r()}function i(){n(),r()}window.addEventListener(ve,o),window.addEventListener(xe,i);const s=new CustomEvent(Ce,{detail:e});window.dispatchEvent(s)}))}function In(e){const t=new CustomEvent(Xe,{detail:e});window.dispatchEvent(t)}function Fn(){const e=new CustomEvent(qe);window.dispatchEvent(e)}function Mn(){const e=new CustomEvent(Pe);window.dispatchEvent(e)}export{zn as cleanup,Mn as close,Ee as elementId,ge as elementName,He as getWalletProviderSelectorElement,ke as hasInstallPrompt,jn as isInstalled,Nn as loadSelector,Rn as selectWalletProvider,Fn as walletClose,In as walletOpen};
//# sourceMappingURL=/sm/f9454df7654ed7e9846e11a497fb3e516fcce8f3707c316730d1cee7763ff01a.map