@openlv/modal 0.1.0 → 0.1.2
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/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2189 -1954
- package/dist/index.es.js.map +1 -1
- package/dist/ui/Button.d.ts +26 -26
- package/dist/ui/InfoTooltip.d.ts +8 -8
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";var pn=Object.defineProperty;var mn=(t,e,r)=>e in t?pn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var te=(t,e,r)=>mn(t,typeof e!="symbol"?e+"":e,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const bn=!1,wn=(t,e)=>t===e,ct=Symbol("solid-proxy"),Mr=typeof Proxy=="function",yn=Symbol("solid-track"),dt={equals:wn};let Rr=Fr;const Se=1,ut=2,Or={owned:null,cleanups:null,context:null,owner:null};var R=null;let St=null,xn=null,L=null,W=null,ge=null,bt=0;function at(t,e){const r=L,n=R,o=t.length===0,i=e===void 0?n:e,a=o?Or:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?t:()=>t(()=>Y(()=>Ge(a)));R=a,L=null;try{return Ze(s,!0)}finally{L=r,R=n}}function D(t,e){e=e?Object.assign({},dt,e):dt;const r={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},n=o=>(typeof o=="function"&&(o=o(r.value)),Vr(r,o));return[Dr.bind(r),n]}function z(t,e,r){const n=zt(t,e,!1,Se);Je(n)}function ie(t,e,r){Rr=Sn;const n=zt(t,e,!1,Se);n.user=!0,ge?ge.push(n):Je(n)}function T(t,e,r){r=r?Object.assign({},dt,r):dt;const n=zt(t,e,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Je(n),Dr.bind(n)}function Y(t){if(L===null)return t();const e=L;L=null;try{return t()}finally{L=e}}function Ft(t){ie(()=>Y(t))}function se(t){return R===null||(R.cleanups===null?R.cleanups=[t]:R.cleanups.push(t)),t}function Ir(t,e){const r=Symbol("context");return{id:r,Provider:$n(r),defaultValue:t}}function Lr(t){let e;return R&&R.context&&(e=R.context[t.id])!==void 0?e:t.defaultValue}function jr(t){const e=T(t),r=T(()=>Pt(e()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}function Dr(){if(this.sources&&this.state)if(this.state===Se)Je(this);else{const t=W;W=null,Ze(()=>ht(this),!1),W=t}if(L){const t=this.observers;if(!t||t[t.length-1]!==L){const e=t?t.length:0;L.sources?(L.sources.push(this),L.sourceSlots.push(e)):(L.sources=[this],L.sourceSlots=[e]),t?(t.push(L),this.observerSlots.push(L.sources.length-1)):(this.observers=[L],this.observerSlots=[L.sources.length-1])}}return this.value}function Vr(t,e,r){let n=t.value;return(!t.comparator||!t.comparator(n,e))&&(t.value=e,t.observers&&t.observers.length&&Ze(()=>{for(let o=0;o<t.observers.length;o+=1){const i=t.observers[o],a=St&&St.running;a&&St.disposed.has(i),(a?!i.tState:!i.state)&&(i.pure?W.push(i):ge.push(i),i.observers&&zr(i)),a||(i.state=Se)}if(W.length>1e6)throw W=[],new Error},!1)),e}function Je(t){if(!t.fn)return;Ge(t);const e=bt;kn(t,t.value,e)}function kn(t,e,r){let n;const o=R,i=L;L=R=t;try{n=t.fn(e)}catch(a){return t.pure&&(t.state=Se,t.owned&&t.owned.forEach(Ge),t.owned=null),t.updatedAt=r+1,Ur(a)}finally{L=i,R=o}(!t.updatedAt||t.updatedAt<=r)&&(t.updatedAt!=null&&"observers"in t?Vr(t,n):t.value=n,t.updatedAt=r)}function zt(t,e,r,n=Se,o){const i={fn:t,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:R,context:R?R.context:null,pure:r};return R===null||R!==Or&&(R.owned?R.owned.push(i):R.owned=[i]),i}function ft(t){if(t.state===0)return;if(t.state===ut)return ht(t);if(t.suspense&&Y(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<bt);)t.state&&e.push(t);for(let r=e.length-1;r>=0;r--)if(t=e[r],t.state===Se)Je(t);else if(t.state===ut){const n=W;W=null,Ze(()=>ht(t,e[0]),!1),W=n}}function Ze(t,e){if(W)return t();let r=!1;e||(W=[]),ge?r=!0:ge=[],bt++;try{const n=t();return Cn(r),n}catch(n){r||(ge=null),W=null,Ur(n)}}function Cn(t){if(W&&(Fr(W),W=null),t)return;const e=ge;ge=null,e.length&&Ze(()=>Rr(e),!1)}function Fr(t){for(let e=0;e<t.length;e++)ft(t[e])}function Sn(t){let e,r=0;for(e=0;e<t.length;e++){const n=t[e];n.user?t[r++]=n:ft(n)}for(e=0;e<r;e++)ft(t[e])}function ht(t,e){t.state=0;for(let r=0;r<t.sources.length;r+=1){const n=t.sources[r];if(n.sources){const o=n.state;o===Se?n!==e&&(!n.updatedAt||n.updatedAt<bt)&&ft(n):o===ut&&ht(n,e)}}}function zr(t){for(let e=0;e<t.observers.length;e+=1){const r=t.observers[e];r.state||(r.state=ut,r.pure?W.push(r):ge.push(r),r.observers&&zr(r))}}function Ge(t){let e;if(t.sources)for(;t.sources.length;){const r=t.sources.pop(),n=t.sourceSlots.pop(),o=r.observers;if(o&&o.length){const i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(t.tOwned){for(e=t.tOwned.length-1;e>=0;e--)Ge(t.tOwned[e]);delete t.tOwned}if(t.owned){for(e=t.owned.length-1;e>=0;e--)Ge(t.owned[e]);t.owned=null}if(t.cleanups){for(e=t.cleanups.length-1;e>=0;e--)t.cleanups[e]();t.cleanups=null}t.state=0}function An(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function Ur(t,e=R){throw An(t)}function Pt(t){if(typeof t=="function"&&!t.length)return Pt(t());if(Array.isArray(t)){const e=[];for(let r=0;r<t.length;r++){const n=Pt(t[r]);if(Array.isArray(n))if(n.length<32768)e.push.apply(e,n);else for(let o=0;o<n.length;o++)e.push(n[o]);else e.push(n)}return e}return t}function $n(t,e){return function(n){let o;return z(()=>o=Y(()=>(R.context={...R.context,[t]:n.value},jr(()=>n.children))),void 0),o}}const Tn=Symbol("fallback");function tr(t){for(let e=0;e<t.length;e++)t[e]()}function En(t,e,r={}){let n=[],o=[],i=[],a=0,s=e.length>1?[]:null;return se(()=>tr(i)),()=>{let l=t()||[],d=l.length,u,c;return l[yn],Y(()=>{let h,g,b,p,C,k,y,F,_;if(d===0)a!==0&&(tr(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[Tn],o[0]=at(pe=>(i[0]=pe,r.fallback())),a=1);else if(a===0){for(o=new Array(d),c=0;c<d;c++)n[c]=l[c],o[c]=at(f);a=d}else{for(b=new Array(d),p=new Array(d),s&&(C=new Array(d)),k=0,y=Math.min(a,d);k<y&&n[k]===l[k];k++);for(y=a-1,F=d-1;y>=k&&F>=k&&n[y]===l[F];y--,F--)b[F]=o[y],p[F]=i[y],s&&(C[F]=s[y]);for(h=new Map,g=new Array(F+1),c=F;c>=k;c--)_=l[c],u=h.get(_),g[c]=u===void 0?-1:u,h.set(_,c);for(u=k;u<=y;u++)_=n[u],c=h.get(_),c!==void 0&&c!==-1?(b[c]=o[u],p[c]=i[u],s&&(C[c]=s[u]),c=g[c],h.set(_,c)):i[u]();for(c=k;c<d;c++)c in b?(o[c]=b[c],i[c]=p[c],s&&(s[c]=C[c],s[c](c))):o[c]=at(f);o=o.slice(0,a=d),n=l.slice(0)}return o});function f(h){if(i[c]=h,s){const[g,b]=D(c);return s[c]=b,e(l[c],g)}return e(l[c])}}}function v(t,e){return Y(()=>t(e||{}))}function ot(){return!0}const Nt={get(t,e,r){return e===ct?r:t.get(e)},has(t,e){return e===ct?!0:t.has(e)},set:ot,deleteProperty:ot,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ot,deleteProperty:ot}},ownKeys(t){return t.keys()}};function At(t){return(t=typeof t=="function"?t():t)?t:{}}function _n(){for(let t=0,e=this.length;t<e;++t){const r=this[t]();if(r!==void 0)return r}}function X(...t){let e=!1;for(let a=0;a<t.length;a++){const s=t[a];e=e||!!s&&ct in s,t[a]=typeof s=="function"?(e=!0,T(s)):s}if(Mr&&e)return new Proxy({get(a){for(let s=t.length-1;s>=0;s--){const l=At(t[s])[a];if(l!==void 0)return l}},has(a){for(let s=t.length-1;s>=0;s--)if(a in At(t[s]))return!0;return!1},keys(){const a=[];for(let s=0;s<t.length;s++)a.push(...Object.keys(At(t[s])));return[...new Set(a)]}},Nt);const r={},n=Object.create(null);for(let a=t.length-1;a>=0;a--){const s=t[a];if(!s)continue;const l=Object.getOwnPropertyNames(s);for(let d=l.length-1;d>=0;d--){const u=l[d];if(u==="__proto__"||u==="constructor")continue;const c=Object.getOwnPropertyDescriptor(s,u);if(!n[u])n[u]=c.get?{enumerable:!0,configurable:!0,get:_n.bind(r[u]=[c.get.bind(s)])}:c.value!==void 0?c:void 0;else{const f=r[u];f&&(c.get?f.push(c.get.bind(s)):c.value!==void 0&&f.push(()=>c.value))}}}const o={},i=Object.keys(n);for(let a=i.length-1;a>=0;a--){const s=i[a],l=n[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function wt(t,...e){const r=e.length;if(Mr&&ct in t){const o=r>1?e.flat():e[0],i=e.map(a=>new Proxy({get(s){return a.includes(s)?t[s]:void 0},has(s){return a.includes(s)&&s in t},keys(){return a.filter(s=>s in t)}},Nt));return i.push(new Proxy({get(a){return o.includes(a)?void 0:t[a]},has(a){return o.includes(a)?!1:a in t},keys(){return Object.keys(t).filter(a=>!o.includes(a))}},Nt)),i}const n=[];for(let o=0;o<=r;o++)n[o]={};for(const o of Object.getOwnPropertyNames(t)){let i=r;for(let l=0;l<e.length;l++)if(e[l].includes(o)){i=l;break}const a=Object.getOwnPropertyDescriptor(t,o);!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable?n[i][o]=a.value:Object.defineProperty(n[i],o,a)}return n}const Wr=t=>`Stale read from <${t}>.`;function Ce(t){const e="fallback"in t&&{fallback:()=>t.fallback};return T(En(()=>t.each,t.children,e||void 0))}function ve(t){const e=t.keyed,r=T(()=>t.when,void 0,void 0),n=e?r:T(r,void 0,{equals:(o,i)=>!o==!i});return T(()=>{const o=n();if(o){const i=t.children;return typeof i=="function"&&i.length>0?Y(()=>i(e?o:()=>{if(!Y(n))throw Wr("Show");return r()})):i}return t.fallback},void 0,void 0)}function Gr(t){const e=jr(()=>t.children),r=T(()=>{const n=e(),o=Array.isArray(n)?n:[n];let i=()=>{};for(let a=0;a<o.length;a++){const s=a,l=o[a],d=i,u=T(()=>d()?void 0:l.when,void 0,void 0),c=l.keyed?u:T(u,void 0,{equals:(f,h)=>!f==!h});i=()=>d()||(c()?[s,u,l]:void 0)}return i});return T(()=>{const n=r()();if(!n)return t.fallback;const[o,i,a]=n,s=a.children;return typeof s=="function"&&s.length>0?Y(()=>s(a.keyed?i():()=>{if(Y(r)()?.[0]!==o)throw Wr("Match");return i()})):s},void 0,void 0)}function Ne(t){return t}const Pn=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Nn=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Pn]),Bn=new Set(["innerHTML","textContent","innerText","children"]),Mn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Rn=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function On(t,e){const r=Rn[t];return typeof r=="object"?r[e]?r.$:void 0:r}const In=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ln=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),jn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Me=t=>T(()=>t());function Dn(t,e,r){let n=r.length,o=e.length,i=n,a=0,s=0,l=e[o-1].nextSibling,d=null;for(;a<o||s<i;){if(e[a]===r[s]){a++,s++;continue}for(;e[o-1]===r[i-1];)o--,i--;if(o===a){const u=i<n?s?r[s-1].nextSibling:r[i-s]:l;for(;s<i;)t.insertBefore(r[s++],u)}else if(i===s)for(;a<o;)(!d||!d.has(e[a]))&&e[a].remove(),a++;else if(e[a]===r[i-1]&&r[s]===e[o-1]){const u=e[--o].nextSibling;t.insertBefore(r[s++],e[a++].nextSibling),t.insertBefore(r[--i],u),e[o]=r[i]}else{if(!d){d=new Map;let c=s;for(;c<i;)d.set(r[c],c++)}const u=d.get(e[a]);if(u!=null)if(s<u&&u<i){let c=a,f=1,h;for(;++c<o&&c<i&&!((h=d.get(e[c]))==null||h!==u+f);)f++;if(f>u-s){const g=e[a];for(;s<u;)t.insertBefore(r[s++],g)}else t.replaceChild(r[s++],e[a++])}else a++;else e[a++].remove()}}}const rr="_$DX_DELEGATE";function Vn(t,e,r,n={}){let o;return at(i=>{o=i,e===document?t():m(e,t(),e.firstChild?null:void 0,r)},n.owner),()=>{o(),e.textContent=""}}function x(t,e,r,n){let o;const i=()=>{const s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=t,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},a=e?()=>Y(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function Ae(t,e=window.document){const r=e[rr]||(e[rr]=new Set);for(let n=0,o=t.length;n<o;n++){const i=t[n];r.has(i)||(r.add(i),e.addEventListener(i,qn))}}function Z(t,e,r){r==null?t.removeAttribute(e):t.setAttribute(e,r)}function Fn(t,e,r,n){n==null?t.removeAttributeNS(e,r):t.setAttributeNS(e,r,n)}function zn(t,e,r){r?t.setAttribute(e,""):t.removeAttribute(e)}function ne(t,e){e==null?t.removeAttribute("class"):t.className=e}function yt(t,e,r,n){if(n)Array.isArray(r)?(t[`$$${e}`]=r[0],t[`$$${e}Data`]=r[1]):t[`$$${e}`]=r;else if(Array.isArray(r)){const o=r[0];t.addEventListener(e,r[0]=i=>o.call(t,r[1],i))}else t.addEventListener(e,r,typeof r!="function"&&r)}function Un(t,e,r={}){const n=Object.keys(e||{}),o=Object.keys(r);let i,a;for(i=0,a=o.length;i<a;i++){const s=o[i];!s||s==="undefined"||e[s]||(nr(t,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){const s=n[i],l=!!e[s];!s||s==="undefined"||r[s]===l||!l||(nr(t,s,!0),r[s]=l)}return r}function Bt(t,e,r){if(!e)return r?Z(t,"style"):e;const n=t.style;if(typeof e=="string")return n.cssText=e;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),e||(e={});let o,i;for(i in r)e[i]==null&&n.removeProperty(i),delete r[i];for(i in e)o=e[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function gt(t,e={},r,n){const o={};return n||z(()=>o.children=qe(t,e.children,o.children)),z(()=>typeof e.ref=="function"&&qr(e.ref,t)),z(()=>Wn(t,e,r,!0,o,!0)),o}function qr(t,e,r){return Y(()=>t(e,r))}function m(t,e,r,n){if(r!==void 0&&!n&&(n=[]),typeof e!="function")return qe(t,e,n,r);z(o=>qe(t,e(),o,r),n)}function Wn(t,e,r,n,o={},i=!1){e||(e={});for(const a in o)if(!(a in e)){if(a==="children")continue;o[a]=or(t,a,null,o[a],r,i,e)}for(const a in e){if(a==="children")continue;const s=e[a];o[a]=or(t,a,s,o[a],r,i,e)}}function Gn(t){return t.toLowerCase().replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function nr(t,e,r){const n=e.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)t.classList.toggle(n[o],r)}function or(t,e,r,n,o,i,a){let s,l,d,u,c;if(e==="style")return Bt(t,r,n);if(e==="classList")return Un(t,r,n);if(r===n)return n;if(e==="ref")i||r(t);else if(e.slice(0,3)==="on:"){const f=e.slice(3);n&&t.removeEventListener(f,n,typeof n!="function"&&n),r&&t.addEventListener(f,r,typeof r!="function"&&r)}else if(e.slice(0,10)==="oncapture:"){const f=e.slice(10);n&&t.removeEventListener(f,n,!0),r&&t.addEventListener(f,r,!0)}else if(e.slice(0,2)==="on"){const f=e.slice(2).toLowerCase(),h=In.has(f);if(!h&&n){const g=Array.isArray(n)?n[0]:n;t.removeEventListener(f,g)}(h||r)&&(yt(t,f,r,h),h&&Ae([f]))}else if(e.slice(0,5)==="attr:")Z(t,e.slice(5),r);else if(e.slice(0,5)==="bool:")zn(t,e.slice(5),r);else if((c=e.slice(0,5)==="prop:")||(d=Bn.has(e))||!o&&((u=On(e,t.tagName))||(l=Nn.has(e)))||(s=t.nodeName.includes("-")||"is"in a))c&&(e=e.slice(5),l=!0),e==="class"||e==="className"?ne(t,r):s&&!l&&!d?t[Gn(e)]=r:t[u||e]=r;else{const f=o&&e.indexOf(":")>-1&&jn[e.split(":")[0]];f?Fn(t,f,e,r):Z(t,Mn[e]||e,r)}return r}function qn(t){let e=t.target;const r=`$$${t.type}`,n=t.target,o=t.currentTarget,i=l=>Object.defineProperty(t,"target",{configurable:!0,value:l}),a=()=>{const l=e[r];if(l&&!e.disabled){const d=e[`${r}Data`];if(d!==void 0?l.call(e,d,t):l.call(e,t),t.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(t.target)&&i(e.host),!0},s=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return e||document}}),t.composedPath){const l=t.composedPath();i(l[0]);for(let d=0;d<l.length-2&&(e=l[d],!!a());d++){if(e._$host){e=e._$host,s();break}if(e.parentNode===o)break}}else s();i(n)}function qe(t,e,r,n,o){for(;typeof r=="function";)r=r();if(e===r)return r;const i=typeof e,a=n!==void 0;if(t=a&&r[0]&&r[0].parentNode||t,i==="string"||i==="number"){if(i==="number"&&(e=e.toString(),e===r))return r;if(a){let s=r[0];s&&s.nodeType===3?s.data!==e&&(s.data=e):s=document.createTextNode(e),r=Ie(t,r,n,s)}else r!==""&&typeof r=="string"?r=t.firstChild.data=e:r=t.textContent=e}else if(e==null||i==="boolean")r=Ie(t,r,n);else{if(i==="function")return z(()=>{let s=e();for(;typeof s=="function";)s=s();r=qe(t,s,r,n)}),()=>r;if(Array.isArray(e)){const s=[],l=r&&Array.isArray(r);if(Mt(s,e,r,o))return z(()=>r=qe(t,s,r,n,!0)),()=>r;if(s.length===0){if(r=Ie(t,r,n),a)return r}else l?r.length===0?ir(t,s,n):Dn(t,r,s):(r&&Ie(t),ir(t,s));r=s}else if(e.nodeType){if(Array.isArray(r)){if(a)return r=Ie(t,r,n,e);Ie(t,r,null,e)}else r==null||r===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);r=e}}return r}function Mt(t,e,r,n){let o=!1;for(let i=0,a=e.length;i<a;i++){let s=e[i],l=r&&r[t.length],d;if(!(s==null||s===!0||s===!1))if((d=typeof s)=="object"&&s.nodeType)t.push(s);else if(Array.isArray(s))o=Mt(t,s,l)||o;else if(d==="function")if(n){for(;typeof s=="function";)s=s();o=Mt(t,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else t.push(s),o=!0;else{const u=String(s);l&&l.nodeType===3&&l.data===u?t.push(l):t.push(document.createTextNode(u))}}return o}function ir(t,e,r=null){for(let n=0,o=e.length;n<o;n++)t.insertBefore(e[n],r)}function Ie(t,e,r,n){if(r===void 0)return t.textContent="";const o=n||document.createTextNode("");if(e.length){let i=!1;for(let a=e.length-1;a>=0;a--){const s=e[a];if(o!==s){const l=s.parentNode===t;!i&&!a?l?t.replaceChild(o,s):t.insertBefore(o,r):l&&s.remove()}else i=!0}}else t.insertBefore(o,r);return[o]}const Kn="http://www.w3.org/2000/svg";function Hn(t,e=!1,r=void 0){return e?document.createElementNS(Kn,t):document.createElement(t,{is:r})}function Xn(t,e){const r=T(t);return T(()=>{const n=r();switch(typeof n){case"function":return Y(()=>n(e));case"string":const o=Ln.has(n),i=Hn(n,o,Y(()=>e.is));return gt(i,e,o),i}})}function Qn(t){const[,e]=wt(t,["component"]);return Xn(()=>t.component,e)}const Jn=1,Zn=t=>{const e=new URLSearchParams;return e.set("h",t.h),e.set("k",t.k),t.p&&e.set("p",t.p),t.s&&e.set("s",t.s),`openlv://${t.sessionId}@${Jn}?${e.toString()}`};function Yn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $t={exports:{}},sr;function eo(){return sr||(sr=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,d,u){this.fn=l,this.context=d,this.once=u||!1}function i(l,d,u,c,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,c||l,f),g=r?r+d:d;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=h,l._eventsCount++),l}function a(l,d){--l._eventsCount===0?l._events=new n:delete l._events[d]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var d=[],u,c;if(this._eventsCount===0)return d;for(c in u=this._events)e.call(u,c)&&d.push(r?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},s.prototype.listeners=function(d){var u=r?r+d:d,c=this._events[u];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,h=c.length,g=new Array(h);f<h;f++)g[f]=c[f].fn;return g},s.prototype.listenerCount=function(d){var u=r?r+d:d,c=this._events[u];return c?c.fn?1:c.length:0},s.prototype.emit=function(d,u,c,f,h,g){var b=r?r+d:d;if(!this._events[b])return!1;var p=this._events[b],C=arguments.length,k,y;if(p.fn){switch(p.once&&this.removeListener(d,p.fn,void 0,!0),C){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,u),!0;case 3:return p.fn.call(p.context,u,c),!0;case 4:return p.fn.call(p.context,u,c,f),!0;case 5:return p.fn.call(p.context,u,c,f,h),!0;case 6:return p.fn.call(p.context,u,c,f,h,g),!0}for(y=1,k=new Array(C-1);y<C;y++)k[y-1]=arguments[y];p.fn.apply(p.context,k)}else{var F=p.length,_;for(y=0;y<F;y++)switch(p[y].once&&this.removeListener(d,p[y].fn,void 0,!0),C){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,u);break;case 3:p[y].fn.call(p[y].context,u,c);break;case 4:p[y].fn.call(p[y].context,u,c,f);break;default:if(!k)for(_=1,k=new Array(C-1);_<C;_++)k[_-1]=arguments[_];p[y].fn.apply(p[y].context,k)}}return!0},s.prototype.on=function(d,u,c){return i(this,d,u,c,!1)},s.prototype.once=function(d,u,c){return i(this,d,u,c,!0)},s.prototype.removeListener=function(d,u,c,f){var h=r?r+d:d;if(!this._events[h])return this;if(!u)return a(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!f||g.once)&&(!c||g.context===c)&&a(this,h);else{for(var b=0,p=[],C=g.length;b<C;b++)(g[b].fn!==u||f&&!g[b].once||c&&g[b].context!==c)&&p.push(g[b]);p.length?this._events[h]=p.length===1?p[0]:p:a(this,h)}return this},s.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&a(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s})($t)),$t.exports}eo();const H=Symbol.for("@ts-pattern/matcher"),Kr=Symbol.for("@ts-pattern/isVariadic"),vt="@ts-pattern/anonymous-select-key",Rt=t=>!!(t&&typeof t=="object"),lt=t=>t&&!!t[H],j=(t,e,r)=>{if(lt(t)){const n=t[H](),{matched:o,selections:i}=n.match(e);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(Rt(t)){if(!Rt(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let n=[],o=[],i=[];for(const a of t.keys()){const s=t[a];lt(s)&&s[Kr]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<n.length+o.length)return!1;const a=e.slice(0,n.length),s=o.length===0?[]:e.slice(-o.length),l=e.slice(n.length,o.length===0?1/0:-o.length);return n.every((d,u)=>j(d,a[u],r))&&o.every((d,u)=>j(d,s[u],r))&&(i.length===0||j(i[0],l,r))}return t.length===e.length&&t.every((a,s)=>j(a,e[s],r))}return Reflect.ownKeys(t).every(n=>{const o=t[n];return(n in e||lt(i=o)&&i[H]().matcherType==="optional")&&j(o,e[n],r);var i})}return Object.is(e,t)},K=t=>{var e,r,n;return Rt(t)?lt(t)?(e=(r=(n=t[H]()).getSelectionKeys)==null?void 0:r.call(n))!=null?e:[]:Array.isArray(t)?Ke(t,K):Ke(Object.values(t),K):[]},Ke=(t,e)=>t.reduce((r,n)=>r.concat(e(n)),[]);function to(...t){if(t.length===1){const[e]=t;return r=>j(e,r,()=>{})}if(t.length===2){const[e,r]=t;return j(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function V(t){return Object.assign(t,{optional:()=>Ut(t),and:e=>B(t,e),or:e=>Hr(t,e),select:e=>e===void 0?He(t):He(e,t)})}function Ot(t){return Object.assign((e=>Object.assign(e,{[Symbol.iterator](){let r=0;const n=[{value:Object.assign(e,{[Kr]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=n[r++])!=null?o:n.at(-1)}}}}))(t),{optional:()=>Ot(Ut(t)),select:e=>Ot(e===void 0?He(t):He(e,t))})}function Ut(t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return e===void 0?(K(t).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:j(t,e,n),selections:r}},getSelectionKeys:()=>K(t),matcherType:"optional"})})}const ro=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},no=(t,e)=>{for(const[r,n]of t.entries())if(!e(n,r))return!1;return!0},oo=(t,e)=>{const r=Reflect.ownKeys(t);for(const n of r)if(!e(n,t[n]))return!1;return!0};function B(...t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:t.every(o=>j(o,e,n)),selections:r}},getSelectionKeys:()=>Ke(t,K),matcherType:"and"})})}function Hr(...t){return V({[H]:()=>({match:e=>{let r={};const n=(o,i)=>{r[o]=i};return Ke(t,K).forEach(o=>n(o,void 0)),{matched:t.some(o=>j(o,e,n)),selections:r}},getSelectionKeys:()=>Ke(t,K),matcherType:"or"})})}function S(t){return{[H]:()=>({match:e=>({matched:!!t(e)})})}}function He(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return V({[H]:()=>({match:n=>{let o={[e??vt]:n};return{matched:r===void 0||j(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[e??vt].concat(r===void 0?[]:K(r))})})}function Xr(t){return!0}function de(t){return typeof t=="number"}function be(t){return typeof t=="string"}function we(t){return typeof t=="bigint"}const Qr=V(S(Xr)),io=V(S(Xr)),so=Qr,ye=t=>Object.assign(V(t),{startsWith:e=>{return ye(B(t,(r=e,S(n=>be(n)&&n.startsWith(r)))));var r},endsWith:e=>{return ye(B(t,(r=e,S(n=>be(n)&&n.endsWith(r)))));var r},minLength:e=>ye(B(t,(r=>S(n=>be(n)&&n.length>=r))(e))),length:e=>ye(B(t,(r=>S(n=>be(n)&&n.length===r))(e))),maxLength:e=>ye(B(t,(r=>S(n=>be(n)&&n.length<=r))(e))),includes:e=>{return ye(B(t,(r=e,S(n=>be(n)&&n.includes(r)))));var r},regex:e=>{return ye(B(t,(r=e,S(n=>be(n)&&!!n.match(r)))));var r}}),ar=ye(S(be)),ue=t=>Object.assign(V(t),{between:(e,r)=>ue(B(t,((n,o)=>S(i=>de(i)&&n<=i&&o>=i))(e,r))),lt:e=>ue(B(t,(r=>S(n=>de(n)&&n<r))(e))),gt:e=>ue(B(t,(r=>S(n=>de(n)&&n>r))(e))),lte:e=>ue(B(t,(r=>S(n=>de(n)&&n<=r))(e))),gte:e=>ue(B(t,(r=>S(n=>de(n)&&n>=r))(e))),int:()=>ue(B(t,S(e=>de(e)&&Number.isInteger(e)))),finite:()=>ue(B(t,S(e=>de(e)&&Number.isFinite(e)))),positive:()=>ue(B(t,S(e=>de(e)&&e>0))),negative:()=>ue(B(t,S(e=>de(e)&&e<0)))}),ao=ue(S(de)),xe=t=>Object.assign(V(t),{between:(e,r)=>xe(B(t,((n,o)=>S(i=>we(i)&&n<=i&&o>=i))(e,r))),lt:e=>xe(B(t,(r=>S(n=>we(n)&&n<r))(e))),gt:e=>xe(B(t,(r=>S(n=>we(n)&&n>r))(e))),lte:e=>xe(B(t,(r=>S(n=>we(n)&&n<=r))(e))),gte:e=>xe(B(t,(r=>S(n=>we(n)&&n>=r))(e))),positive:()=>xe(B(t,S(e=>we(e)&&e>0))),negative:()=>xe(B(t,S(e=>we(e)&&e<0)))}),lo=xe(S(we)),co=V(S(function(t){return typeof t=="boolean"})),uo=V(S(function(t){return typeof t=="symbol"})),fo=V(S(function(t){return t==null})),ho=V(S(function(t){return t!=null}));var go={__proto__:null,matcher:H,optional:Ut,array:function(...t){return Ot({[H]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let n={};if(e.length===0)return K(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:e.every(i=>j(r,i,o)),selections:n}},getSelectionKeys:()=>t.length===0?[]:K(t[0])})})},set:function(...t){return V({[H]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=t[0];return{matched:ro(e,i=>j(o,i,n)),selections:r}},getSelectionKeys:()=>t.length===0?[]:K(t[0])})})},map:function(...t){return V({[H]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var o;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=t[0])==null?void 0:o.toString()}`);const[i,a]=t;return{matched:no(e,(s,l)=>{const d=j(i,l,n),u=j(a,s,n);return d&&u}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...K(t[0]),...K(t[1])]})})},record:function(...t){return V({[H]:()=>({match:e=>{if(e===null||typeof e!="object"||Array.isArray(e))return{matched:!1};var r;if(t.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);let n={};const o=(s,l)=>{n[s]=(n[s]||[]).concat([l])},[i,a]=t.length===1?[ar,t[0]]:t;return{matched:oo(e,(s,l)=>{const d=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),u=d!==null&&j(i,d,o),c=j(i,s,o),f=j(a,l,o);return(c||u)&&f}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...K(t[0]),...K(t[1])]})})},intersection:B,union:Hr,not:function(t){return V({[H]:()=>({match:e=>({matched:!j(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:S,select:He,any:Qr,unknown:io,_:so,string:ar,number:ao,bigint:lo,boolean:co,symbol:uo,nullish:fo,nonNullable:ho,instanceOf:function(t){return V(S((function(e){return r=>r instanceof e})(t)))},shape:function(t){return V(S(to(t)))}};class vo extends Error{constructor(e){let r;try{r=JSON.stringify(e)}catch{r=e}super(`Pattern matching error: no pattern matches value ${r}`),this.input=void 0,this.input=e}}const It={matched:!1,value:void 0};function Be(t){return new pt(t,It)}class pt{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],n=[e[0]];let o;e.length===3&&typeof e[1]=="function"?o=e[1]:e.length>2&&n.push(...e.slice(1,e.length-1));let i=!1,a={};const s=(d,u)=>{i=!0,a[d]=u},l=!n.some(d=>j(d,this.input,s))||o&&!o(this.input)?It:{matched:!0,value:r(i?vt in a?a[vt]:a:this.input,this.input)};return new pt(this.input,l)}when(e,r){if(this.state.matched)return this;const n=!!e(this.input);return new pt(this.input,n?{matched:!0,value:r(this.input,this.input)}:It)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=po){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function po(t){throw new vo(t)}const it={CREATED:"created",SIGNALING:"signaling",READY:"ready",LINKING:"linking"},oe={STANDBY:"standby",CREATING:"creating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error"};var Tt={exports:{}};var lr;function mo(){return lr||(lr=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Tt)),Tt.exports}var bo=mo();const ke=Yn(bo),wo=async t=>{if(typeof t=="string"){if(t==="simple")return await Promise.resolve().then(()=>require("./simple-DDht1UVo.cjs")).then(e=>e.simpleTheme);if(t==="openlv")return await Promise.resolve().then(()=>require("./openlv-SMG3Trx9.cjs")).then(e=>e.openlvTheme);throw new Error(`Unknown theme: ${t}`)}return t},Lt=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Jr=(t,e=[],r={})=>{for(const[n,o]of Object.entries(t)){const i=[...e,n];Lt(o)?Jr(o,i,r):r[`--lv-${i.join("-")}`]=o}return r},yo=(t="auto",e="system")=>t==="light"||t==="dark"?t:e==="system"?globalThis.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,Zr=(t,e)=>{const r={...t};for(const n of Object.keys(e)){const o=t[n],i=e[n];r[n]=Lt(o)&&Lt(i)?Zr(o,i):i}return r},xo=async(t,e="system")=>{const r=await wo(t.theme),n=yo(t.mode,e),o=r[n];if(!o)return"";const i=r.common?Zr(r.common,o):o,a=Jr(i);return Object.entries(a).map(([s,l])=>`${s}: ${l};`).join(`
|
|
2
|
-
`)},cr=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-divide-x-reverse:0}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-x-0{inset-inline:0}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.bottom-0{bottom:0}.left-1\\/2{left:50%}.z-10{z-index:10}.z-10000{z-index:10000}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-18{height:calc(var(--spacing) * 18)}.h-38{height:calc(var(--spacing) * 38)}.h-\\[200px\\]{height:200px}.h-full{height:100%}.min-h-32{min-height:calc(var(--spacing) * 32)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[200px\\]{width:200px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-\\[bg-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out bg-in}.animate-\\[fade-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out fade-in}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.-space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -4) * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\\(--lv-control-button-secondary-border\\)>:not(:last-child)){border-color:var(--lv-control-button-secondary-border)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\(--lv-control-button-primary-border\\){border-color:var(--lv-control-button-primary-border)}.border-\\(--lv-control-button-secondary-border\\){border-color:var(--lv-control-button-secondary-border)}.border-\\(--lv-control-button-secondary-border\\,var\\(--lv-control-button-secondary-background\\)\\){border-color:var(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background))}.border-\\(--lv-control-input-border\\){border-color:var(--lv-control-input-border)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-t-transparent{border-top-color:#0000}.bg-\\(--lv-body-background\\){background-color:var(--lv-body-background)}.bg-\\(--lv-card-background\\){background-color:var(--lv-card-background)}.bg-\\(--lv-control-button-primary-background\\){background-color:var(--lv-control-button-primary-background)}.bg-\\(--lv-control-button-secondary-background\\){background-color:var(--lv-control-button-secondary-background)}.bg-\\(--lv-qr-background\\){background-color:var(--lv-qr-background)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\;charset\\=US-ASCII\\,\\%3Csvg\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%20width\\%3D\\%2214\\%22\\%20height\\%3D\\%2214\\%22\\%20viewBox\\%3D\\%220\\%200\\%2024\\%2024\\%22\\%20fill\\%3D\\%22none\\%22\\%20stroke\\%3D\\%22\\%23888\\%22\\%20stroke-width\\%3D\\%222\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M6\\%209l6\\%206\\%206-6\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E)}.bg-\\[length\\:14px\\]{background-size:14px}.bg-\\[right_8px_center\\]{background-position:right 8px center}.bg-no-repeat{background-repeat:no-repeat}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.ps-1{padding-inline-start:var(--spacing)}.pt-1{padding-top:var(--spacing)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-start{text-align:start}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\\(--lv-control-button-primary-color\\){color:var(--lv-control-button-primary-color)}.text-\\(--lv-control-button-secondary-color\\){color:var(--lv-control-button-secondary-color)}.text-\\(--lv-qr-color\\){color:var(--lv-qr-color)}.text-\\(--lv-text-muted\\){color:var(--lv-text-muted)}.text-\\(--lv-text-primary\\){color:var(--lv-text-primary)}.text-\\(--lv-text-secondary\\){color:var(--lv-text-secondary)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\\:rounded-t-sm:first-child{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.first\\:border-l-0:first-child{border-left-style:var(--tw-border-style);border-left-width:0}.first\\:pt-1\\.5:first-child{padding-top:calc(var(--spacing) * 1.5)}.first\\:pt-2:first-child{padding-top:calc(var(--spacing) * 2)}.last\\:rounded-b-sm:last-child{border-bottom-right-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.last\\:pb-2:last-child{padding-bottom:calc(var(--spacing) * 2)}@media(hover:hover){.hover\\:\\[background-color\\:var\\(--lv-control-button-tertiary-hoverBackground\\)\\]:hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-card-background\\):hover{background-color:var(--lv-card-background)}.hover\\:bg-\\(--lv-control-button-primary-background-hover\\):hover{background-color:var(--lv-control-button-primary-background-hover)}.hover\\:bg-\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\):hover{background-color:var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))}.hover\\:bg-\\(--lv-control-button-secondary-background\\):hover{background-color:var(--lv-control-button-secondary-background)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground,transparent)}}.focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\(--lv-control-button-primary-background\\):focus{--tw-ring-color:var(--lv-control-button-primary-background)}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:bg-\\(--lv-control-button-primary-activeBackground\\,var\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\)\\):active{background-color:var(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)))}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\):active{background-color:var(--lv-control-button-secondary-activeBackground)}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\,var\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\)\\):active{background-color:var(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)))}.active\\:bg-\\(--lv-control-button-tertiary-activeBackground\\,var\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\)\\):active{background-color:var(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent))}.disabled\\:bg-\\(--lv-control-button-primary-disabledBackground\\,var\\(--lv-control-button-primary-background\\)\\):disabled{background-color:var(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background))}.disabled\\:bg-\\(--lv-control-button-secondary-disabledBackground\\,var\\(--lv-control-button-secondary-background\\)\\):disabled{background-color:var(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background))}.disabled\\:text-\\(--lv-control-button-primary-disabledColor\\,var\\(--lv-control-button-primary-color\\)\\):disabled{color:var(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))}.disabled\\:text-\\(--lv-control-button-secondary-disabledColor\\,var\\(--lv-control-button-secondary-color\\)\\):disabled{color:var(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))}.disabled\\:text-\\(--lv-control-button-tertiary-disabledColor\\,var\\(--lv-text-muted\\)\\):disabled{color:var(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))}@media(min-width:48rem){.md\\:flex{display:flex}.md\\:w-3\\/5{width:60%}.md\\:items-center{align-items:center}:where(.md\\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.md\\:divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}}@media(min-width:64rem){.lg\\:p-4{padding:calc(var(--spacing) * 4)}}.ltr\\:right-5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--spacing) * 5)}.ltr\\:-ml-1:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--spacing) * -1)}.ltr\\:translate-x-full:where(:dir(ltr),[dir=ltr],[dir=ltr] *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.ltr\\:rounded-l-none:where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-top-left-radius:0;border-bottom-left-radius:0}.rtl\\:left-5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--spacing) * 5)}.rtl\\:-mr-1:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--spacing) * -1)}.rtl\\:-translate-x-full:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\\:rounded-r-none:where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-top-right-radius:0;border-bottom-right-radius:0}}:root,:host{--color-body-background:var(--lv-body-background);--radius-radius:var(--lv-border-radius);font-family:var(--lv-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")}.border{border-style:solid}@keyframes fade-in{0%{transform:translateY(-2px)scale(.95)}to{transform:translateY(0)scale(1)}}@keyframes bg-in{0%{opacity:0;-webkit-backdrop-filter:blur();backdrop-filter:blur()}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.modal-transition__container{display:grid;position:relative}.modal-transition__layer{will-change:transform,opacity;grid-area:1/1;width:100%}.modal-transition__layer--outgoing{z-index:1;animation:.15s ease-out forwards modal-transition-out;position:absolute}.modal-transition__layer--incoming{z-index:2;animation:.2s ease-out forwards modal-transition-in}[data-openlv-theme-mode=dark] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}@media(prefers-color-scheme:dark){[data-openlv-theme-mode=system] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}}@keyframes modal-transition-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes modal-transition-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}`,dr=async(t,e,r="system")=>{let n=t.querySelector("style[data-openlv-modal]");n||(n=document.createElement("style"),n.dataset.openlvModal="true",t.append(n));const o={...e,theme:e?.theme??"simple"};if(o){const i=await xo(o,r);n.textContent=`:root, :host {
|
|
1
|
+
"use strict";var Rr=Object.defineProperty;var Br=(e,t,n)=>t in e?Rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var X=(e,t,n)=>Br(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Or=!1,Ir=(e,t)=>e===t,nt=Symbol("solid-proxy"),Ln=typeof Proxy=="function",Lr=Symbol("solid-track"),rt={equals:Ir};let jn=Gn;const be=1,ot=2,Vn={owned:null,cleanups:null,context:null,owner:null};var T=null;let mt=null,jr=null,M=null,j=null,ce=null,dt=0;function et(e,t){const n=M,r=T,o=e.length===0,i=t===void 0?r:t,a=o?Vn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>K(()=>De(a)));T=a,M=null;try{return Ke(s,!0)}finally{M=n,T=r}}function B(e,t){t=t?Object.assign({},rt,t):rt;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Wn(n,o));return[Un.bind(n),r]}function I(e,t,n){const r=jt(e,t,!1,be);qe(r)}function Z(e,t,n){jn=Fr;const r=jt(e,t,!1,be);r.user=!0,ce?ce.push(r):qe(r)}function A(e,t,n){n=n?Object.assign({},rt,n):rt;const r=jt(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,qe(r),Un.bind(r)}function K(e){if(M===null)return e();const t=M;M=null;try{return e()}finally{M=t}}function Lt(e){Z(()=>K(e))}function Y(e){return T===null||(T.cleanups===null?T.cleanups=[e]:T.cleanups.push(e)),e}function Dn(e,t){const n=Symbol("context");return{id:n,Provider:Ur(n),defaultValue:e}}function Fn(e){let t;return T&&T.context&&(t=T.context[e.id])!==void 0?t:e.defaultValue}function zn(e){const t=A(e),n=A(()=>Ct(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}function Un(){if(this.sources&&this.state)if(this.state===be)qe(this);else{const e=j;j=null,Ke(()=>st(this),!1),j=e}if(M){const e=this.observers;if(!e||e[e.length-1]!==M){const t=e?e.length:0;M.sources?(M.sources.push(this),M.sourceSlots.push(t)):(M.sources=[this],M.sourceSlots=[t]),e?(e.push(M),this.observerSlots.push(M.sources.length-1)):(this.observers=[M],this.observerSlots=[M.sources.length-1])}}return this.value}function Wn(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ke(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],a=mt&&mt.running;a&&mt.disposed.has(i),(a?!i.tState:!i.state)&&(i.pure?j.push(i):ce.push(i),i.observers&&qn(i)),a||(i.state=be)}if(j.length>1e6)throw j=[],new Error},!1)),t}function qe(e){if(!e.fn)return;De(e);const t=dt;Vr(e,e.value,t)}function Vr(e,t,n){let r;const o=T,i=M;M=T=e;try{r=e.fn(t)}catch(a){return e.pure&&(e.state=be,e.owned&&e.owned.forEach(De),e.owned=null),e.updatedAt=n+1,Kn(a)}finally{M=i,T=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Wn(e,r):e.value=r,e.updatedAt=n)}function jt(e,t,n,r=be,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:T?T.context:null,pure:n};return T===null||T!==Vn&&(T.owned?T.owned.push(i):T.owned=[i]),i}function it(e){if(e.state===0)return;if(e.state===ot)return st(e);if(e.suspense&&K(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<dt);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===be)qe(e);else if(e.state===ot){const r=j;j=null,Ke(()=>st(e,t[0]),!1),j=r}}function Ke(e,t){if(j)return e();let n=!1;t||(j=[]),ce?n=!0:ce=[],dt++;try{const r=e();return Dr(n),r}catch(r){n||(ce=null),j=null,Kn(r)}}function Dr(e){if(j&&(Gn(j),j=null),e)return;const t=ce;ce=null,t.length&&Ke(()=>jn(t),!1)}function Gn(e){for(let t=0;t<e.length;t++)it(e[t])}function Fr(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:it(r)}for(t=0;t<n;t++)it(e[t])}function st(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===be?r!==t&&(!r.updatedAt||r.updatedAt<dt)&&it(r):o===ot&&st(r,t)}}}function qn(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=ot,n.pure?j.push(n):ce.push(n),n.observers&&qn(n))}}function De(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),a=n.observerSlots.pop();r<o.length&&(i.sourceSlots[a]=r,o[r]=i,n.observerSlots[r]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)De(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)De(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 zr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Kn(e,t=T){throw zr(e)}function Ct(e){if(typeof e=="function"&&!e.length)return Ct(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Ct(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Ur(e,t){return function(r){let o;return I(()=>o=K(()=>(T.context={...T.context,[e]:r.value},zn(()=>r.children))),void 0),o}}const Wr=Symbol("fallback");function rn(e){for(let t=0;t<e.length;t++)e[t]()}function Gr(e,t,n={}){let r=[],o=[],i=[],a=0,s=t.length>1?[]:null;return Y(()=>rn(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Lr],K(()=>{let h,g,b,p,C,k,w,P,N;if(c===0)a!==0&&(rn(i),i=[],r=[],o=[],a=0,s&&(s=[])),n.fallback&&(r=[Wr],o[0]=et(se=>(i[0]=se,n.fallback())),a=1);else if(a===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=et(f);a=c}else{for(b=new Array(c),p=new Array(c),s&&(C=new Array(c)),k=0,w=Math.min(a,c);k<w&&r[k]===l[k];k++);for(w=a-1,P=c-1;w>=k&&P>=k&&r[w]===l[P];w--,P--)b[P]=o[w],p[P]=i[w],s&&(C[P]=s[w]);for(h=new Map,g=new Array(P+1),d=P;d>=k;d--)N=l[d],u=h.get(N),g[d]=u===void 0?-1:u,h.set(N,d);for(u=k;u<=w;u++)N=r[u],d=h.get(N),d!==void 0&&d!==-1?(b[d]=o[u],p[d]=i[u],s&&(C[d]=s[u]),d=g[d],h.set(N,d)):i[u]();for(d=k;d<c;d++)d in b?(o[d]=b[d],i[d]=p[d],s&&(s[d]=C[d],s[d](d))):o[d]=et(f);o=o.slice(0,a=c),r=l.slice(0)}return o});function f(h){if(i[d]=h,s){const[g,b]=B(d);return s[d]=b,t(l[d],g)}return t(l[d])}}}function v(e,t){return K(()=>e(t||{}))}function Qe(){return!0}const St={get(e,t,n){return t===nt?n:e.get(t)},has(e,t){return t===nt?!0:e.has(t)},set:Qe,deleteProperty:Qe,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Qe,deleteProperty:Qe}},ownKeys(e){return e.keys()}};function bt(e){return(e=typeof e=="function"?e():e)?e:{}}function qr(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function z(...e){let t=!1;for(let a=0;a<e.length;a++){const s=e[a];t=t||!!s&&nt in s,e[a]=typeof s=="function"?(t=!0,A(s)):s}if(Ln&&t)return new Proxy({get(a){for(let s=e.length-1;s>=0;s--){const l=bt(e[s])[a];if(l!==void 0)return l}},has(a){for(let s=e.length-1;s>=0;s--)if(a in bt(e[s]))return!0;return!1},keys(){const a=[];for(let s=0;s<e.length;s++)a.push(...Object.keys(bt(e[s])));return[...new Set(a)]}},St);const n={},r=Object.create(null);for(let a=e.length-1;a>=0;a--){const s=e[a];if(!s)continue;const l=Object.getOwnPropertyNames(s);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(s,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:qr.bind(n[u]=[d.get.bind(s)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(s)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let a=i.length-1;a>=0;a--){const s=i[a],l=r[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function ut(e,...t){const n=t.length;if(Ln&&nt in e){const o=n>1?t.flat():t[0],i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},St));return i.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},St)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}const a=Object.getOwnPropertyDescriptor(e,o);!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable?r[i][o]=a.value:Object.defineProperty(r[i],o,a)}return r}const Hn=e=>`Stale read from <${e}>.`;function me(e){const t="fallback"in e&&{fallback:()=>e.fallback};return A(Gr(()=>e.each,e.children,t||void 0))}function de(e){const t=e.keyed,n=A(()=>e.when,void 0,void 0),r=t?n:A(n,void 0,{equals:(o,i)=>!o==!i});return A(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?K(()=>i(t?o:()=>{if(!K(r))throw Hn("Show");return n()})):i}return e.fallback},void 0,void 0)}function Xn(e){const t=zn(()=>e.children),n=A(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let a=0;a<o.length;a++){const s=a,l=o[a],c=i,u=A(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:A(u,void 0,{equals:(f,h)=>!f==!h});i=()=>c()||(d()?[s,u,l]:void 0)}return i});return A(()=>{const r=n()();if(!r)return e.fallback;const[o,i,a]=r,s=a.children;return typeof s=="function"&&s.length>0?K(()=>s(a.keyed?i():()=>{if(K(n)()?.[0]!==o)throw Hn("Match");return i()})):s},void 0,void 0)}function Se(e){return e}const Kr=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Hr=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Kr]),Xr=new Set(["innerHTML","textContent","innerText","children"]),Qr=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Jr=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Zr(e,t){const n=Jr[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Yr=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),eo=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),to={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},$e=e=>A(()=>e());function no(e,t,n){let r=n.length,o=t.length,i=r,a=0,s=0,l=t[o-1].nextSibling,c=null;for(;a<o||s<i;){if(t[a]===n[s]){a++,s++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===a){const u=i<r?s?n[s-1].nextSibling:n[i-s]:l;for(;s<i;)e.insertBefore(n[s++],u)}else if(i===s)for(;a<o;)(!c||!c.has(t[a]))&&t[a].remove(),a++;else if(t[a]===n[i-1]&&n[s]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[s++],t[a++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=s;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[a]);if(u!=null)if(s<u&&u<i){let d=a,f=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-s){const g=t[a];for(;s<u;)e.insertBefore(n[s++],g)}else e.replaceChild(n[s++],t[a++])}else a++;else t[a++].remove()}}}const on="_$DX_DELEGATE";function ro(e,t,n,r={}){let o;return et(i=>{o=i,t===document?e():m(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function x(e,t,n,r){let o;const i=()=>{const s=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=e,n?s.content.firstChild.firstChild:r?s.firstChild:s.content.firstChild},a=t?()=>K(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function ye(e,t=window.document){const n=t[on]||(t[on]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,co))}}function q(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function oo(e,t,n,r){r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function io(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}function Q(e,t){t==null?e.removeAttribute("class"):e.className=t}function ft(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 o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function so(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,a;for(i=0,a=o.length;i<a;i++){const s=o[i];!s||s==="undefined"||t[s]||(sn(e,s,!1),delete n[s])}for(i=0,a=r.length;i<a;i++){const s=r[i],l=!!t[s];!s||s==="undefined"||n[s]===l||!l||(sn(e,s,!0),n[s]=l)}return n}function At(e,t,n){if(!t)return n?q(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&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 at(e,t={},n,r){const o={};return r||I(()=>o.children=Fe(e,t.children,o.children)),I(()=>typeof t.ref=="function"&&Qn(t.ref,e)),I(()=>ao(e,t,n,!0,o,!0)),o}function Qn(e,t,n){return K(()=>e(t,n))}function m(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Fe(e,t,r,n);I(o=>Fe(e,t(),o,n),r)}function ao(e,t,n,r,o={},i=!1){t||(t={});for(const a in o)if(!(a in t)){if(a==="children")continue;o[a]=an(e,a,null,o[a],n,i,t)}for(const a in t){if(a==="children")continue;const s=t[a];o[a]=an(e,a,s,o[a],n,i,t)}}function lo(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function sn(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function an(e,t,n,r,o,i,a){let s,l,c,u,d;if(t==="style")return At(e,n,r);if(t==="classList")return so(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=Yr.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(ft(e,f,n,h),h&&ye([f]))}else if(t.slice(0,5)==="attr:")q(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")io(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Xr.has(t))||!o&&((u=Zr(t,e.tagName))||(l=Hr.has(t)))||(s=e.nodeName.includes("-")||"is"in a))d&&(t=t.slice(5),l=!0),t==="class"||t==="className"?Q(e,n):s&&!l&&!c?e[lo(t)]=n:e[u||t]=n;else{const f=o&&t.indexOf(":")>-1&&to[t.split(":")[0]];f?oo(e,f,t,n):q(e,Qr[t]||t,n)}return n}function co(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),a=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!a());c++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(r)}function Fe(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(a){let s=n[0];s&&s.nodeType===3?s.data!==t&&(s.data=t):s=document.createTextNode(t),n=_e(e,n,r,s)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=_e(e,n,r);else{if(i==="function")return I(()=>{let s=t();for(;typeof s=="function";)s=s();n=Fe(e,s,n,r)}),()=>n;if(Array.isArray(t)){const s=[],l=n&&Array.isArray(n);if($t(s,t,n,o))return I(()=>n=Fe(e,s,n,r,!0)),()=>n;if(s.length===0){if(n=_e(e,n,r),a)return n}else l?n.length===0?ln(e,s,r):no(e,n,s):(n&&_e(e),ln(e,s));n=s}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=_e(e,n,r,t);_e(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function $t(e,t,n,r){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],l=n&&n[e.length],c;if(!(s==null||s===!0||s===!1))if((c=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=$t(e,s,l)||o;else if(c==="function")if(r){for(;typeof s=="function";)s=s();o=$t(e,Array.isArray(s)?s:[s],Array.isArray(l)?l:[l])||o}else e.push(s),o=!0;else{const u=String(s);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function ln(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function _e(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(o!==s){const l=s.parentNode===e;!i&&!a?l?e.replaceChild(o,s):e.insertBefore(o,n):l&&s.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}const uo="http://www.w3.org/2000/svg";function fo(e,t=!1,n=void 0){return t?document.createElementNS(uo,e):document.createElement(e,{is:n})}function ho(e,t){const n=A(e);return A(()=>{const r=n();switch(typeof r){case"function":return K(()=>r(t));case"string":const o=eo.has(r),i=fo(r,o,K(()=>t.is));return at(i,t,o),i}})}function go(e){const[,t]=ut(e,["component"]);return ho(()=>e.component,t)}const vo=1,po=e=>{const t=new URLSearchParams;return t.set("h",e.h),t.set("k",e.k),e.p&&t.set("p",e.p),e.s&&t.set("s",e.s),`openlv://${e.sessionId}@${vo}?${t.toString()}`};function mo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yt={exports:{}},cn;function bo(){return cn||(cn=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new o(u,d||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=h,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,g=new Array(h);f<h;f++)g[f]=d[f].fn;return g},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,h,g){var b=n?n+c:c;if(!this._events[b])return!1;var p=this._events[b],C=arguments.length,k,w;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),C){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,u),!0;case 3:return p.fn.call(p.context,u,d),!0;case 4:return p.fn.call(p.context,u,d,f),!0;case 5:return p.fn.call(p.context,u,d,f,h),!0;case 6:return p.fn.call(p.context,u,d,f,h,g),!0}for(w=1,k=new Array(C-1);w<C;w++)k[w-1]=arguments[w];p.fn.apply(p.context,k)}else{var P=p.length,N;for(w=0;w<P;w++)switch(p[w].once&&this.removeListener(c,p[w].fn,void 0,!0),C){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,u);break;case 3:p[w].fn.call(p[w].context,u,d);break;case 4:p[w].fn.call(p[w].context,u,d,f);break;default:if(!k)for(N=1,k=new Array(C-1);N<C;N++)k[N-1]=arguments[N];p[w].fn.apply(p[w].context,k)}}return!0},s.prototype.on=function(c,u,d){return i(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return i(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var h=n?n+c:c;if(!this._events[h])return this;if(!u)return a(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!f||g.once)&&(!d||g.context===d)&&a(this,h);else{for(var b=0,p=[],C=g.length;b<C;b++)(g[b].fn!==u||f&&!g[b].once||d&&g[b].context!==d)&&p.push(g[b]);p.length?this._events[h]=p.length===1?p[0]:p:a(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(yt)),yt.exports}bo();const F=Symbol.for("@ts-pattern/matcher"),Jn=Symbol.for("@ts-pattern/isVariadic"),lt="@ts-pattern/anonymous-select-key",Et=e=>!!(e&&typeof e=="object"),tt=e=>e&&!!e[F],R=(e,t,n)=>{if(tt(e)){const r=e[F](),{matched:o,selections:i}=r.match(t);return o&&i&&Object.keys(i).forEach(a=>n(a,i[a])),o}if(Et(e)){if(!Et(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],o=[],i=[];for(const a of e.keys()){const s=e[a];tt(s)&&s[Jn]?i.push(s):i.length?o.push(s):r.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+o.length)return!1;const a=t.slice(0,r.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(r.length,o.length===0?1/0:-o.length);return r.every((c,u)=>R(c,a[u],n))&&o.every((c,u)=>R(c,s[u],n))&&(i.length===0||R(i[0],l,n))}return e.length===t.length&&e.every((a,s)=>R(a,t[s],n))}return Reflect.ownKeys(e).every(r=>{const o=e[r];return(r in t||tt(i=o)&&i[F]().matcherType==="optional")&&R(o,t[r],n);var i})}return Object.is(t,e)},D=e=>{var t,n,r;return Et(e)?tt(e)?(t=(n=(r=e[F]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?ze(e,D):ze(Object.values(e),D):[]},ze=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function yo(...e){if(e.length===1){const[t]=e;return n=>R(t,n,()=>{})}if(e.length===2){const[t,n]=e;return R(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function O(e){return Object.assign(e,{optional:()=>Vt(e),and:t=>E(e,t),or:t=>Zn(e,t),select:t=>t===void 0?Ue(e):Ue(t,e)})}function Tt(e){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[Jn]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var o;return(o=r[n++])!=null?o:r.at(-1)}}}}))(e),{optional:()=>Tt(Vt(e)),select:t=>Tt(t===void 0?Ue(e):Ue(t,e))})}function Vt(e){return O({[F]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return t===void 0?(D(e).forEach(o=>r(o,void 0)),{matched:!0,selections:n}):{matched:R(e,t,r),selections:n}},getSelectionKeys:()=>D(e),matcherType:"optional"})})}const wo=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},xo=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0},ko=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n)if(!t(r,e[r]))return!1;return!0};function E(...e){return O({[F]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return{matched:e.every(o=>R(o,t,r)),selections:n}},getSelectionKeys:()=>ze(e,D),matcherType:"and"})})}function Zn(...e){return O({[F]:()=>({match:t=>{let n={};const r=(o,i)=>{n[o]=i};return ze(e,D).forEach(o=>r(o,void 0)),{matched:e.some(o=>R(o,t,r)),selections:n}},getSelectionKeys:()=>ze(e,D),matcherType:"or"})})}function S(e){return{[F]:()=>({match:t=>({matched:!!e(t)})})}}function Ue(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return O({[F]:()=>({match:r=>{let o={[t??lt]:r};return{matched:n===void 0||R(n,r,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??lt].concat(n===void 0?[]:D(n))})})}function Yn(e){return!0}function re(e){return typeof e=="number"}function ue(e){return typeof e=="string"}function fe(e){return typeof e=="bigint"}const er=O(S(Yn)),Co=O(S(Yn)),So=er,he=e=>Object.assign(O(e),{startsWith:t=>{return he(E(e,(n=t,S(r=>ue(r)&&r.startsWith(n)))));var n},endsWith:t=>{return he(E(e,(n=t,S(r=>ue(r)&&r.endsWith(n)))));var n},minLength:t=>he(E(e,(n=>S(r=>ue(r)&&r.length>=n))(t))),length:t=>he(E(e,(n=>S(r=>ue(r)&&r.length===n))(t))),maxLength:t=>he(E(e,(n=>S(r=>ue(r)&&r.length<=n))(t))),includes:t=>{return he(E(e,(n=t,S(r=>ue(r)&&r.includes(n)))));var n},regex:t=>{return he(E(e,(n=t,S(r=>ue(r)&&!!r.match(n)))));var n}}),dn=he(S(ue)),oe=e=>Object.assign(O(e),{between:(t,n)=>oe(E(e,((r,o)=>S(i=>re(i)&&r<=i&&o>=i))(t,n))),lt:t=>oe(E(e,(n=>S(r=>re(r)&&r<n))(t))),gt:t=>oe(E(e,(n=>S(r=>re(r)&&r>n))(t))),lte:t=>oe(E(e,(n=>S(r=>re(r)&&r<=n))(t))),gte:t=>oe(E(e,(n=>S(r=>re(r)&&r>=n))(t))),int:()=>oe(E(e,S(t=>re(t)&&Number.isInteger(t)))),finite:()=>oe(E(e,S(t=>re(t)&&Number.isFinite(t)))),positive:()=>oe(E(e,S(t=>re(t)&&t>0))),negative:()=>oe(E(e,S(t=>re(t)&&t<0)))}),Ao=oe(S(re)),ge=e=>Object.assign(O(e),{between:(t,n)=>ge(E(e,((r,o)=>S(i=>fe(i)&&r<=i&&o>=i))(t,n))),lt:t=>ge(E(e,(n=>S(r=>fe(r)&&r<n))(t))),gt:t=>ge(E(e,(n=>S(r=>fe(r)&&r>n))(t))),lte:t=>ge(E(e,(n=>S(r=>fe(r)&&r<=n))(t))),gte:t=>ge(E(e,(n=>S(r=>fe(r)&&r>=n))(t))),positive:()=>ge(E(e,S(t=>fe(t)&&t>0))),negative:()=>ge(E(e,S(t=>fe(t)&&t<0)))}),$o=ge(S(fe)),Eo=O(S(function(e){return typeof e=="boolean"})),To=O(S(function(e){return typeof e=="symbol"})),_o=O(S(function(e){return e==null})),No=O(S(function(e){return e!=null}));var Mo={__proto__:null,matcher:F,optional:Vt,array:function(...e){return Tt({[F]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return D(n).forEach(i=>{r[i]=[]}),{matched:!0,selections:r};const o=(i,a)=>{r[i]=(r[i]||[]).concat([a])};return{matched:t.every(i=>R(n,i,o)),selections:r}},getSelectionKeys:()=>e.length===0?[]:D(e[0])})})},set:function(...e){return O({[F]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(i,a)=>{n[i]=(n[i]||[]).concat([a])},o=e[0];return{matched:wo(t,i=>R(o,i,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:D(e[0])})})},map:function(...e){return O({[F]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(s,l)=>{n[s]=(n[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:xo(t,(s,l)=>{const c=R(i,l,r),u=R(a,s,r);return c&&u}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...D(e[0]),...D(e[1])]})})},record:function(...e){return O({[F]:()=>({match:t=>{if(t===null||typeof t!="object"||Array.isArray(t))return{matched:!1};var n;if(e.length===0)throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${(n=e[0])==null?void 0:n.toString()}`);let r={};const o=(s,l)=>{r[s]=(r[s]||[]).concat([l])},[i,a]=e.length===1?[dn,e[0]]:e;return{matched:ko(t,(s,l)=>{const c=typeof s!="string"||Number.isNaN(Number(s))?null:Number(s),u=c!==null&&R(i,c,o),d=R(i,s,o),f=R(a,l,o);return(d||u)&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...D(e[0]),...D(e[1])]})})},intersection:E,union:Zn,not:function(e){return O({[F]:()=>({match:t=>({matched:!R(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:S,select:Ue,any:er,unknown:Co,_:So,string:dn,number:Ao,bigint:$o,boolean:Eo,symbol:To,nullish:_o,nonNullable:No,instanceOf:function(e){return O(S((function(t){return n=>n instanceof t})(e)))},shape:function(e){return O(S(yo(e)))}};class Po extends Error{constructor(t){let n;try{n=JSON.stringify(t)}catch{n=t}super(`Pattern matching error: no pattern matches value ${n}`),this.input=void 0,this.input=t}}const _t={matched:!1,value:void 0};function Ae(e){return new ct(e,_t)}class ct{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(c,u)=>{i=!0,a[c]=u},l=!r.some(c=>R(c,this.input,s))||o&&!o(this.input)?_t:{matched:!0,value:n(i?lt in a?a[lt]:a:this.input,this.input)};return new ct(this.input,l)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new ct(this.input,r?{matched:!0,value:n(this.input,this.input)}:_t)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(t=Ro){return this.state.matched?this.state.value:t(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}}function Ro(e){throw new Po(e)}const Je={CREATED:"created",SIGNALING:"signaling",READY:"ready",LINKING:"linking"},J={STANDBY:"standby",CREATING:"creating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error"};var wt={exports:{}};var un;function Bo(){return un||(un=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(wt)),wt.exports}var Oo=Bo();const pe=mo(Oo),Io=async e=>{if(typeof e=="string"){if(e==="simple")return await Promise.resolve().then(()=>require("./simple-DDht1UVo.cjs")).then(t=>t.simpleTheme);if(e==="openlv")return await Promise.resolve().then(()=>require("./openlv-SMG3Trx9.cjs")).then(t=>t.openlvTheme);throw new Error(`Unknown theme: ${e}`)}return e},Nt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),tr=(e,t=[],n={})=>{for(const[r,o]of Object.entries(e)){const i=[...t,r];Nt(o)?tr(o,i,n):n[`--lv-${i.join("-")}`]=o}return n},Lo=(e="auto",t="system")=>e==="light"||e==="dark"?e:t==="system"?globalThis.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,nr=(e,t)=>{const n={...e};for(const r of Object.keys(t)){const o=e[r],i=t[r];n[r]=Nt(o)&&Nt(i)?nr(o,i):i}return n},jo=async(e,t="system")=>{const n=await Io(e.theme),r=Lo(e.mode,t),o=n[r];if(!o)return"";const i=n.common?nr(n.common,o):o,a=tr(i);return Object.entries(a).map(([s,l])=>`${s}: ${l};`).join(`
|
|
2
|
+
`)},fn=`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-divide-x-reverse:0}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-x-0{inset-inline:0}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.bottom-0{bottom:0}.left-1\\/2{left:50%}.z-10{z-index:10}.z-10000{z-index:10000}.mx-auto{margin-inline:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-18{height:calc(var(--spacing) * 18)}.h-38{height:calc(var(--spacing) * 38)}.h-\\[200px\\]{height:200px}.h-full{height:100%}.min-h-32{min-height:calc(var(--spacing) * 32)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[200px\\]{width:200px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.animate-\\[bg-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out bg-in}.animate-\\[fade-in_0\\.15s_ease-in-out\\]{animation:.15s ease-in-out fade-in}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.-space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -4) * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\\(--lv-control-button-secondary-border\\)>:not(:last-child)){border-color:var(--lv-control-button-secondary-border)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\(--lv-control-button-primary-border\\){border-color:var(--lv-control-button-primary-border)}.border-\\(--lv-control-button-secondary-border\\){border-color:var(--lv-control-button-secondary-border)}.border-\\(--lv-control-button-secondary-border\\,var\\(--lv-control-button-secondary-background\\)\\){border-color:var(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background))}.border-\\(--lv-control-input-border\\){border-color:var(--lv-control-input-border)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-t-transparent{border-top-color:#0000}.bg-\\(--lv-body-background\\){background-color:var(--lv-body-background)}.bg-\\(--lv-card-background\\){background-color:var(--lv-card-background)}.bg-\\(--lv-control-button-primary-background\\){background-color:var(--lv-control-button-primary-background)}.bg-\\(--lv-control-button-secondary-background\\){background-color:var(--lv-control-button-secondary-background)}.bg-\\(--lv-qr-background\\){background-color:var(--lv-qr-background)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\;charset\\=US-ASCII\\,\\%3Csvg\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%20width\\%3D\\%2214\\%22\\%20height\\%3D\\%2214\\%22\\%20viewBox\\%3D\\%220\\%200\\%2024\\%2024\\%22\\%20fill\\%3D\\%22none\\%22\\%20stroke\\%3D\\%22\\%23888\\%22\\%20stroke-width\\%3D\\%222\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M6\\%209l6\\%206\\%206-6\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]{background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E)}.bg-\\[length\\:14px\\]{background-size:14px}.bg-\\[right_8px_center\\]{background-position:right 8px center}.bg-no-repeat{background-repeat:no-repeat}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.ps-1{padding-inline-start:var(--spacing)}.pt-1{padding-top:var(--spacing)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-start{text-align:start}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-\\(--lv-control-button-primary-color\\){color:var(--lv-control-button-primary-color)}.text-\\(--lv-control-button-secondary-color\\){color:var(--lv-control-button-secondary-color)}.text-\\(--lv-qr-color\\){color:var(--lv-qr-color)}.text-\\(--lv-text-muted\\){color:var(--lv-text-muted)}.text-\\(--lv-text-primary\\){color:var(--lv-text-primary)}.text-\\(--lv-text-secondary\\){color:var(--lv-text-secondary)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow,.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\\:rounded-t-sm:first-child{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.first\\:border-l-0:first-child{border-left-style:var(--tw-border-style);border-left-width:0}.first\\:pt-1\\.5:first-child{padding-top:calc(var(--spacing) * 1.5)}.first\\:pt-2:first-child{padding-top:calc(var(--spacing) * 2)}.last\\:rounded-b-sm:last-child{border-bottom-right-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.last\\:pb-2:last-child{padding-bottom:calc(var(--spacing) * 2)}@media(hover:hover){.hover\\:\\[background-color\\:var\\(--lv-control-button-tertiary-hoverBackground\\)\\]:hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-card-background\\):hover{background-color:var(--lv-card-background)}.hover\\:bg-\\(--lv-control-button-primary-background-hover\\):hover{background-color:var(--lv-control-button-primary-background-hover)}.hover\\:bg-\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\):hover{background-color:var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))}.hover\\:bg-\\(--lv-control-button-secondary-background\\):hover{background-color:var(--lv-control-button-secondary-background)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\):hover{background-color:var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground)}.hover\\:bg-\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\):hover{background-color:var(--lv-control-button-tertiary-hoverBackground,transparent)}}.focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\(--lv-control-button-primary-background\\):focus{--tw-ring-color:var(--lv-control-button-primary-background)}.focus\\:ring-blue-200:focus{--tw-ring-color:var(--color-blue-200)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:bg-\\(--lv-control-button-primary-activeBackground\\,var\\(--lv-control-button-primary-hoverBackground\\,var\\(--lv-control-button-primary-background\\)\\)\\):active{background-color:var(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)))}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\):active{background-color:var(--lv-control-button-secondary-activeBackground)}.active\\:bg-\\(--lv-control-button-secondary-activeBackground\\,var\\(--lv-control-button-secondary-hoverBackground\\,var\\(--lv-control-button-secondary-background\\)\\)\\):active{background-color:var(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)))}.active\\:bg-\\(--lv-control-button-tertiary-activeBackground\\,var\\(--lv-control-button-tertiary-hoverBackground\\,transparent\\)\\):active{background-color:var(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent))}.disabled\\:bg-\\(--lv-control-button-primary-disabledBackground\\,var\\(--lv-control-button-primary-background\\)\\):disabled{background-color:var(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background))}.disabled\\:bg-\\(--lv-control-button-secondary-disabledBackground\\,var\\(--lv-control-button-secondary-background\\)\\):disabled{background-color:var(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background))}.disabled\\:text-\\(--lv-control-button-primary-disabledColor\\,var\\(--lv-control-button-primary-color\\)\\):disabled{color:var(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))}.disabled\\:text-\\(--lv-control-button-secondary-disabledColor\\,var\\(--lv-control-button-secondary-color\\)\\):disabled{color:var(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))}.disabled\\:text-\\(--lv-control-button-tertiary-disabledColor\\,var\\(--lv-text-muted\\)\\):disabled{color:var(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))}@media(min-width:48rem){.md\\:flex{display:flex}.md\\:w-3\\/5{width:60%}.md\\:items-center{align-items:center}:where(.md\\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.md\\:divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}}@media(min-width:64rem){.lg\\:p-4{padding:calc(var(--spacing) * 4)}}.ltr\\:right-5:where(:dir(ltr),[dir=ltr],[dir=ltr] *){right:calc(var(--spacing) * 5)}.ltr\\:-ml-1:where(:dir(ltr),[dir=ltr],[dir=ltr] *){margin-left:calc(var(--spacing) * -1)}.ltr\\:translate-x-full:where(:dir(ltr),[dir=ltr],[dir=ltr] *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.ltr\\:rounded-l-none:where(:dir(ltr),[dir=ltr],[dir=ltr] *){border-top-left-radius:0;border-bottom-left-radius:0}.rtl\\:left-5:where(:dir(rtl),[dir=rtl],[dir=rtl] *){left:calc(var(--spacing) * 5)}.rtl\\:-mr-1:where(:dir(rtl),[dir=rtl],[dir=rtl] *){margin-right:calc(var(--spacing) * -1)}.rtl\\:-translate-x-full:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\\:rounded-r-none:where(:dir(rtl),[dir=rtl],[dir=rtl] *){border-top-right-radius:0;border-bottom-right-radius:0}}:root,:host{--color-body-background:var(--lv-body-background);--radius-radius:var(--lv-border-radius);font-family:var(--lv-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")}.border{border-style:solid}@keyframes fade-in{0%{transform:translateY(-2px)scale(.95)}to{transform:translateY(0)scale(1)}}@keyframes bg-in{0%{opacity:0;-webkit-backdrop-filter:blur();backdrop-filter:blur()}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.modal-transition__container{display:grid;position:relative}.modal-transition__layer{will-change:transform,opacity;grid-area:1/1;width:100%}.modal-transition__layer--outgoing{z-index:1;animation:.15s ease-out forwards modal-transition-out;position:absolute}.modal-transition__layer--incoming{z-index:2;animation:.2s ease-out forwards modal-transition-in}[data-openlv-theme-mode=dark] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}@media(prefers-color-scheme:dark){[data-openlv-theme-mode=system] img[data-openlv-brand-logo]{filter:invert()brightness(1.1)}}@keyframes modal-transition-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes modal-transition-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}`,hn=async(e,t,n="system")=>{let r=e.querySelector("style[data-openlv-modal]");r||(r=document.createElement("style"),r.dataset.openlvModal="true",e.append(r));const o={...t,theme:t?.theme??"simple"};if(o){const i=await jo(o,n);r.textContent=`:root, :host {
|
|
3
3
|
${i}
|
|
4
4
|
}
|
|
5
|
-
`+
|
|
6
|
-
Or copy the link and paste it into your wallet.`},
|
|
7
|
-
`);return p.length<=1?b:Me(()=>p.map((C,k)=>[C,Me(()=>Me(()=>k<p.length-1)()?Bo():null)]))},u=T(()=>Mo(n())),f={languageTag:n,setLanguageTag:h=>{o(h)},isLoadingLanguagePack:s,isRtl:u,t:d};return v(Yr.Provider,{value:f,get children(){return t.children}})},Q=()=>{const t=Lr(Yr);if(!t)throw new Error("TranslationProvider not found");return t},en=Ir(void 0),Lo=t=>{const{provider:e,theme:r}=t;return v(en.Provider,{value:{provider:e,themeConfig:r},get children(){return v(Io,{get children(){return v(fn,{get onClose(){return t.onClose}})}})}})},Re=()=>{const t=Lr(en);if(!t)throw new Error("Modal context not found");return t},Ye=()=>{const{provider:t}=Re(),e=T(()=>t.getSession(),void 0,{name:"session"}),[r,n]=D(e()?.getState());console.log("session status",r());const o=s=>{console.log("session state change",s),n(s)};Ft(()=>{e()?.emitter.on("state_change",o)}),se(()=>{e()?.emitter.off("state_change",o)});const i=T(()=>e()?.getHandshakeParameters());return{uri:T(()=>{const s=i();return s?Zn(s):void 0}),status:r}},jo=()=>{const{provider:t}=Re();return{start:()=>{const e=t.storage.getSettings(),r=e?.signaling?.p,n=r?e?.signaling?.s?.[r]:void 0;if(!r||!n)throw new Error("Invalid protocol or server");return t.createSession({p:r,s:n})}}};var Do=x('<div class="rounded-md bg-(--lv-control-button-secondary-background) p-2 text-(--lv-text-muted)"><div>Unknown state:</div><div>URI:</div><div>Session Status:');const jt=t=>{const{uri:e,status:r}=Ye();return console.error("Unknown state:",{state:t.state}),(()=>{var n=Do(),o=n.firstChild;o.firstChild;var i=o.nextSibling;i.firstChild;var a=i.nextSibling;return a.firstChild,m(o,()=>JSON.stringify(t.state),null),m(i,e,null),m(a,()=>JSON.stringify(r()),null),n})()};const ze={newline:10,reset:27};function Vo(t){if(!Number.isSafeInteger(t))throw new Error(`integer expected: ${t}`)}function Fo(t){if(!Number.isSafeInteger(t)||t<1||t>40)throw new Error(`Invalid version=${t}. Expected number [1..40]`)}function _e(t,e){return t.toString(2).padStart(e,"0")}function gr(t,e){const r=t%e;return r>=0?r:e+r}function fe(t,e){return new Array(t).fill(e)}function Et(t){return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}function vr(t){let e=0,r=0;for(const i of t)e=Math.max(e,i.length),r+=i.length;const n=new Uint8Array(r);let o=0;for(let i=0;i<e;i++)for(const a of t)i<a.length&&(n[o++]=a[i]);return n}function zo(){let t,e=1/0;return{add(r,n){r>=e||(t=n,e=r)},get:()=>t,score:()=>e}}function pr(t){return Object.freeze({has:e=>t.includes(e),decode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="string")throw new Error("alphabet.decode input should be array of strings");return e.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);const n=t.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${t}`);return n})},encode:e=>{if(!Array.isArray(e)||e.length&&typeof e[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return e.map(r=>{if(Vo(r),r<0||r>=t.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${t.length})`);return t[r]})}})}function mr(t){if(t.length!==32)throw new Error("expects 32 element matrix");const e=[1431655765,858993459,252645135,16711935,65535];for(let r=0;r<5;r++){const n=e[r]>>>0,o=1<<r,i=o<<1;for(let a=0;a<32;a+=i)for(let s=0;s<o;s++){const l=a+s,d=l+o,u=t[l]>>>0,c=t[d]>>>0,f=(u>>>o^c)&n;t[l]=(u^f<<o)>>>0,t[d]=(c^f)>>>0}}}const Ue=t=>1<<(t&31)>>>0,Pe=(t,e)=>e===0?0:e===32?4294967295:(1<<e)-1<<t>>>0;class q{constructor(e,r){te(this,"defined");te(this,"value");te(this,"tailMask");te(this,"words");te(this,"fullWords");te(this,"height");te(this,"width");const{height:n,width:o}=q.size(e);if(!Number.isSafeInteger(n)||n<=0)throw new Error(`Bitmap: invalid height=${n}, expected positive safe integer dimension`);if(!Number.isSafeInteger(o)||o<=0)throw new Error(`Bitmap: invalid width=${o}, expected positive safe integer dimension`);if(this.height=n,this.width=o,this.tailMask=Pe(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*n),this.defined=new Uint32Array(this.value.length),r){if(r.length!==n)throw new Error(`Bitmap: data height mismatch: exp=${n} got=${r.length}`);for(let i=0;i<n;i++){const a=r[i];if(!a||a.length!==o)throw new Error(`Bitmap: data width mismatch at y=${i}: exp=${o} got=${a?.length}`);for(let s=0;s<o;s++)this.set(s,i,a[s])}}}static size(e,r){if(typeof e=="number"&&(e={height:e,width:e}),!Number.isSafeInteger(e.height)&&e.height!==1/0)throw new Error(`Bitmap: invalid height=${e.height} (${typeof e.height})`);if(!Number.isSafeInteger(e.width)&&e.width!==1/0)throw new Error(`Bitmap: invalid width=${e.width} (${typeof e.width})`);return r!==void 0&&(e={width:Math.min(e.width,r.width),height:Math.min(e.height,r.height)}),e}static fromString(e){e=e.replace(/^\n+/g,"").replace(/\n+$/g,"");const r=e.split(String.fromCharCode(ze.newline)),n=r.length;let o;const i=[];for(const a of r){const s=a.split("").map(l=>{if(l==="X")return!0;if(l===" ")return!1;if(l!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${l}`)});if(o!==void 0&&s.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${s.length}`);o=s.length,i.push(s)}return o===void 0&&(o=0),new q({height:n,width:o},i)}point(e){return this.get(e.x,e.y)}isInside(e){return 0<=e.x&&e.x<this.width&&0<=e.y&&e.y<this.height}size(e){if(!e)return{height:this.height,width:this.width};const{x:r,y:n}=this.xy(e);return{height:this.height-n,width:this.width-r}}xy(e){if(typeof e=="number"&&(e={x:e,y:e}),!Number.isSafeInteger(e.x))throw new Error(`Bitmap: invalid x=${e.x}`);if(!Number.isSafeInteger(e.y))throw new Error(`Bitmap: invalid y=${e.y}`);return e.x=gr(e.x,this.width),e.y=gr(e.y,this.height),e}wordIndex(e,r){return r*this.words+(e>>>5)}bitIndex(e,r){return{word:this.wordIndex(e,r),bit:e&31}}isDefined(e,r){const n=this.wordIndex(e,r),o=Ue(e);return(this.defined[n]&o)!==0}get(e,r){const n=this.wordIndex(e,r),o=Ue(e);return(this.value[n]&o)!==0}maskWord(e,r,n){const{defined:o,value:i}=this;o[e]|=r,i[e]=i[e]&~r|-n&r}set(e,r,n){n!==void 0&&this.maskWord(this.wordIndex(e,r),Ue(e),n)}fillRectConst(e,r,n,o,i){if(n<=0||o<=0||i===void 0)return;const{value:a,defined:s,words:l}=this,d=e>>>5,u=e+n-1>>>5,c=e&31,f=e+n-1&31;for(let h=0;h<o;h++){const g=(r+h)*l;if(d===u){const b=Pe(c,f-c+1);this.maskWord(g+d,b,i);continue}this.maskWord(g+d,Pe(c,32-c),i);for(let b=d+1;b<u;b++)s[g+b]=4294967295,a[g+b]=i?4294967295:0;this.maskWord(g+u,Pe(0,f+1),i)}}rectWords(e,r,n,o,i){for(let a=0;a<o;a++){const s=r+a;for(let l=0;l<n;){const d=e+l,{bit:u,word:c}=this.bitIndex(d,s),f=Math.min(32-u,n-l);i(c,d,l,a,f),l+=f}}}rect(e,r,n){const{x:o,y:i}=this.xy(e),{height:a,width:s}=q.size(r,this.size({x:o,y:i}));if(typeof n!="function")return this.fillRectConst(o,i,s,a,n),this;const{defined:l,value:d}=this;return this.rectWords(o,i,s,a,(u,c,f,h,g)=>{let b=0,p=d[u];for(let C=0;C<g;C++){const k=Ue(c+C),y=n({x:f+C,y:h},(p&k)!==0);y!==void 0&&(b|=k,p=p&~k|-y&k)}l[u]|=b,d[u]=p}),this}rectRead(e,r,n){const{x:o,y:i}=this.xy(e),{height:a,width:s}=q.size(r,this.size({x:o,y:i})),{value:l}=this;return this.rectWords(o,i,s,a,(d,u,c,f,h)=>{const g=l[d];for(let b=0;b<h;b++){const p=Ue(u+b);n({x:c+b,y:f},(g&p)!==0)}}),this}hLine(e,r,n){return this.rect(e,{width:r,height:1},n)}vLine(e,r,n){return this.rect(e,{width:1,height:r},n)}border(e=2,r){if(!Number.isSafeInteger(e)||e<=0)throw new Error(`Bitmap.border: invalid size=${e}`);const n=this.height+2*e,o=this.width+2*e,i=new q({height:n,width:o});return i.rect(0,1/0,r),i.embed({x:e,y:e},this),i}embed(e,r){const{x:n,y:o}=this.xy(e),{height:i,width:a}=q.size(r.size(),this.size({x:n,y:o}));if(a<=0||i<=0)return this;const{value:s,defined:l}=this,{words:d,value:u}=r;for(let c=0;c<i;c++){const f=c*d;for(let h=0;h<a;){const g=n+h,{word:b,bit:p}=this.bitIndex(g,o+c),{word:C,bit:k}=r.bitIndex(h,c),y=Math.min(32-p,a-h),F=u[C],_=k&&C+1<f+d?u[C+1]:0,pe=k?(F>>>k|_<<32-k)>>>0:F,he=Pe(p,y),De=(pe&Pe(0,y))<<p>>>0;l[b]|=he,s[b]=s[b]&~he|De,h+=y}}return this}rectSlice(e,r=this.size()){const{x:n,y:o}=this.xy(e),{height:i,width:a}=q.size(r,this.size({x:n,y:o})),s=new q({height:i,width:a});return this.rectRead({x:n,y:o},{height:i,width:a},(l,d)=>{this.isDefined(n+l.x,o+l.y)&&s.set(l.x,l.y,d)}),s}transpose(){const{height:e,width:r,value:n,defined:o,words:i}=this,a=new q({height:r,width:e}),{words:s,value:l,defined:d,tailMask:u}=a,c=new Uint32Array(32),f=new Uint32Array(32);for(let h=0;h<e;h+=32)for(let g=0;g<i;g++){const b=Math.min(32,e-h);for(let p=0;p<b;p++){const C=this.wordIndex(32*g,h+p);c[p]=n[C],f[p]=o[C]}c.fill(0,b),f.fill(0,b),mr(c),mr(f);for(let p=0;p<32;p++){const C=g*32+p;if(C>=r)break;const k=a.wordIndex(h,C),y=h>>>5===s-1?u:4294967295;l[k]=c[p]&y,d[k]=f[p]&y}}return a}negate(){const e=this.defined.length;for(let r=0;r<e;r++)this.value[r]=~this.value[r],this.defined[r]=4294967295;return this}scale(e){if(!Number.isSafeInteger(e)||e>1024)throw new Error(`invalid scale factor: ${e}`);const{height:r,width:n}=this;return new q({height:e*r,width:e*n}).rect({x:0,y:0},1/0,({x:i,y:a})=>this.get(i/e|0,a/e|0))}clone(){const e=new q(this.size());return e.defined.set(this.defined),e.value.set(this.value),e}assertDrawn(){const{height:e,width:r,defined:n,tailMask:o,fullWords:i,words:a}=this;if(!(!e||!r))for(let s=0;s<e;s++){const l=s*a;for(let d=0;d<i;d++)if(n[l+d]!==4294967295)throw new Error("Invalid color type=undefined");if(a!==i&&(n[l+i]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(e,r,...n){if(!Number.isSafeInteger(r)||r<=0||r>=32)throw new Error("wrong patternLen");const o=(1<<r)-1,{height:i,width:a,value:s,words:l}=this;if(!Number.isSafeInteger(e)||e<0||e>=i)return 0;let d=0;const u=this.wordIndex(0,e);for(let c=0,f=0;c<l;c++){const h=s[u+c],g=c===l-1&&a&31||32;for(let b=0;b<g;b++)if(f=(f<<1|h>>>b&1)&o,!(c*32+b+1<r)){for(const p of n)if(f===p){d++;break}}}return d}getRuns(e,r){const{height:n,width:o,value:i,words:a}=this;if(o===0||!Number.isSafeInteger(e)||e<0||e>=n)return;let s=0,l;const d=this.wordIndex(0,e);for(let u=0;u<a;u++){const c=i[d+u],f=u===a-1&&o&31||32;for(let h=0;h<f;h++){const g=(c&1<<h)!==0;if(g===l){s++;continue}l!==void 0&&r(s,l),l=g,s=1}}l!==void 0&&r(s,l)}popcnt(){const{height:e,width:r,words:n,fullWords:o,tailMask:i}=this;if(!e||!r)return 0;let a=0;for(let s=0;s<e;s++){const l=s*n;for(let d=0;d<o;d++)a+=Et(this.value[l+d]);n!==o&&(a+=Et(this.value[l+o]&i))}return a}countBoxes2x2(e){const{height:r,width:n,words:o}=this;if(n<2||!Number.isSafeInteger(e)||e<0||e+1>=r)return 0;const i=this.wordIndex(0,e),a=this.wordIndex(0,e+1),l=(n&31)===0?2147483647:Pe(0,n-1&31);let d=0;for(let u=0;u<o;u++){const c=this.value[i+u],f=this.value[a+u],h=~(c^f)>>>0,g=u+1<o?this.value[i+u+1]>>>0:0,b=~(c^(c>>>1|(g&1)<<31)>>>0)>>>0,p=u+1<o?this.value[a+u+1]>>>0:0,C=~(f^(f>>>1|(p&1)<<31)>>>0)>>>0;let k=(h&b&C)>>>0;u===o-1&&(k&=l),d+=Et(k)}return d}toString(){const e=String.fromCharCode(ze.newline);let r="";for(let n=0;n<this.height;n++){let o="";for(let i=0;i<this.width;i++){const a=this.get(i,n);o+=this.isDefined(i,n)?a?"X":" ":"?"}r+=o+(n+1===this.height?"":e)}return r}toRaw(){const e=Array.from({length:this.height},()=>new Array(this.width));for(let r=0;r<this.height;r++){const n=e[r];for(let o=0;o<this.width;o++)n[o]=this.get(o,r)}return e}toASCII(){const{height:e,width:r}=this;let n="";for(let o=0;o<e;o+=2){for(let i=0;i<r;i++){const a=this.get(i,o),s=o+1>=e?!0:this.get(i,o+1);!a&&!s?n+="█":!a&&s?n+="▀":a&&!s?n+="▄":a&&s&&(n+=" ")}n+=String.fromCharCode(ze.newline)}return n}toTerm(){const e=String.fromCharCode(ze.reset),r=e+"[0m",n=e+"[1;47m "+r,o=e+"[40m "+r,i=String.fromCharCode(ze.newline);let a="";for(let s=0;s<this.height;s++){for(let l=0;l<this.width;l++){const d=this.get(l,s);a+=d?o:n}a+=i}return a}toSVG(e=!0){let r=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,n="",o;return this.rectRead(0,1/0,(i,a)=>{if(!a)return;const{x:s,y:l}=i;if(!e){r+=`<rect x="${s}" y="${l}" width="1" height="1" />`;return}let d=`M${s} ${l}`;if(o){const c=`m${s-o.x} ${l-o.y}`;c.length<=d.length&&(d=c)}const u=s<10?`H${s}`:"h-1";n+=`${d}h1v1${u}Z`,o=i}),e&&(r+=`<path d="${n}"/>`),r+="</svg>",r}toGIF(){const e=s=>[s&255,s>>>8&255],r=[...e(this.width),...e(this.height)],n=[];this.rectRead(0,1/0,(s,l)=>n.push(+(l===!0)));const o=126,i=[71,73,70,56,55,97,...r,246,0,0,255,255,255,...fe(381,0),44,0,0,0,0,...r,0,7],a=Math.floor(n.length/o);for(let s=0;s<a;s++)i.push(o+1,128,...n.slice(o*s,o*(s+1)).map(l=>+l));return i.push(n.length%o+1,128,...n.slice(a*o).map(s=>+s)),i.push(1,129,0,59),new Uint8Array(i)}toImage(e=!1){const{height:r,width:n}=this.size(),o=new Uint8Array(r*n*(e?3:4));let i=0;for(let a=0;a<r;a++)for(let s=0;s<n;s++){const l=this.get(s,a)?0:255;o[i++]=l,o[i++]=l,o[i++]=l,e||(o[i++]=255)}return{height:r,width:n,data:o}}}const br=Object.freeze(["low","medium","quartile","high"]),wr=Object.freeze(["numeric","alphanumeric","byte","kanji","eci"]),Uo=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],Wo={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},Go={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},U=Object.freeze({size:Object.freeze({encode:t=>21+4*(t-1),decode:t=>(t-17)/4}),sizeType:t=>Math.floor((t+7)/17),alignmentPatterns(t){if(t===1)return[];const e=6,r=U.size.encode(t)-e-1,n=r-e,o=Math.ceil(n/28);let i=Math.floor(n/o);i%2?i+=1:n%o*2>=o&&(i+=2);const a=[e];for(let s=1;s<o;s++)a.push(r-(o-s)*i);return a.push(r),a},ECCode:Object.freeze({low:1,medium:0,quartile:3,high:2}),formatMask:21522,formatBits(t,e){const r=U.ECCode[t]<<3|e;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>9)*1335;return(r<<10|n)^U.formatMask},versionBits(t){let e=t;for(let r=0;r<12;r++)e=e<<1^(e>>11)*7973;return t<<12|e},alphabet:Object.freeze({numeric:pr("0123456789"),alphanumerc:pr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")}),lengthBits(t,e){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[e][U.sizeType(t)]},modeBits:Object.freeze({numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"}),capacity(t,e){const r=Uo[t-1],n=Wo[e][t-1],o=Go[e][t-1],i=Math.floor(r/o)-n,a=o-r%o;return{words:n,numBlocks:o,shortBlocks:a,blockLen:i,capacity:(r-n*o)*8,total:(n+i)*o+o-a}}}),Gt=Object.freeze([(t,e)=>(t+e)%2==0,(t,e)=>e%2==0,(t,e)=>t%3==0,(t,e)=>(t+e)%3==0,(t,e)=>(Math.floor(e/2)+Math.floor(t/3))%2==0,(t,e)=>t*e%2+t*e%3==0,(t,e)=>(t*e%2+t*e%3)%2==0,(t,e)=>((t+e)%2+t*e%3)%2==0]),w={tables:(t=>{const e=fe(256,0),r=fe(256,0);for(let n=0,o=1;n<256;n++)e[n]=o,r[o]=n,o<<=1,o&256&&(o^=t);return{exp:e,log:r}})(285),exp:t=>w.tables.exp[t],log(t){if(t===0)throw new Error(`GF.log: invalid arg=${t}`);return w.tables.log[t]%255},mul(t,e){return t===0||e===0?0:w.tables.exp[(w.tables.log[t]+w.tables.log[e])%255]},add:(t,e)=>t^e,pow:(t,e)=>w.tables.exp[w.tables.log[t]*e%255],inv(t){if(t===0)throw new Error(`GF.inverse: invalid arg=${t}`);return w.tables.exp[255-w.tables.log[t]]},polynomial(t){if(t.length==0)throw new Error("GF.polymomial: invalid length");if(t[0]!==0)return t;let e=0;for(;e<t.length-1&&t[e]==0;e++);return t.slice(e)},monomial(t,e){if(t<0)throw new Error(`GF.monomial: invalid degree=${t}`);if(e==0)return[0];let r=fe(t+1,0);return r[0]=e,w.polynomial(r)},degree:t=>t.length-1,coefficient:(t,e)=>t[w.degree(t)-e],mulPoly(t,e){if(t[0]===0||e[0]===0)return[0];const r=fe(t.length+e.length-1,0);for(let n=0;n<t.length;n++)for(let o=0;o<e.length;o++)r[n+o]=w.add(r[n+o],w.mul(t[n],e[o]));return w.polynomial(r)},mulPolyScalar(t,e){if(e==0)return[0];if(e==1)return t;const r=fe(t.length,0);for(let n=0;n<t.length;n++)r[n]=w.mul(t[n],e);return w.polynomial(r)},mulPolyMonomial(t,e,r){if(e<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(r==0)return[0];const n=fe(t.length+e,0);for(let o=0;o<t.length;o++)n[o]=w.mul(t[o],r);return w.polynomial(n)},addPoly(t,e){if(t[0]===0)return e;if(e[0]===0)return t;let r=t,n=e;r.length>n.length&&([r,n]=[n,r]);let o=fe(n.length,0),i=n.length-r.length,a=n.slice(0,i);for(let s=0;s<a.length;s++)o[s]=a[s];for(let s=i;s<n.length;s++)o[s]=w.add(r[s-i],n[s]);return w.polynomial(o)},remainderPoly(t,e){const r=Array.from(t);for(let n=0;n<t.length-e.length+1;n++){const o=r[n];if(o!==0)for(let i=1;i<e.length;i++)e[i]!==0&&(r[n+i]=w.add(r[n+i],w.mul(e[i],o)))}return r.slice(t.length-e.length+1,r.length)},divisorPoly(t){let e=[1];for(let r=0;r<t;r++)e=w.mulPoly(e,[1,w.pow(2,r)]);return e},evalPoly(t,e){if(e==0)return w.coefficient(t,0);let r=t[0];for(let n=1;n<t.length;n++)r=w.add(w.mul(e,r),t[n]);return r},euclidian(t,e,r){w.degree(t)<w.degree(e)&&([t,e]=[e,t]);let n=t,o=e,i=[0],a=[1];for(;2*w.degree(o)>=r;){let d=n,u=i;if(n=o,i=a,n[0]===0)throw new Error("rLast[0] === 0");o=d;let c=[0];const f=w.inv(n[0]);for(;w.degree(o)>=w.degree(n)&&o[0]!==0;){const h=w.degree(o)-w.degree(n),g=w.mul(o[0],f);c=w.addPoly(c,w.monomial(h,g)),o=w.addPoly(o,w.mulPolyMonomial(n,h,g))}if(c=w.mulPoly(c,i),a=w.addPoly(c,u),w.degree(o)>=w.degree(n))throw new Error(`Division failed r: ${o}, rLast: ${n}`)}const s=w.coefficient(a,0);if(s==0)throw new Error("sigmaTilde(0) was zero");const l=w.inv(s);return[w.mulPolyScalar(a,l),w.mulPolyScalar(o,l)]}};function qo(t){return{encode(e){const r=w.divisorPoly(t),n=Array.from(e);return n.push(...r.slice(0,-1).fill(0)),Uint8Array.from(w.remainderPoly(n,r))},decode(e){const r=e.slice(),n=w.polynomial(Array.from(e));let o=fe(t,0),i=!1;for(let c=0;c<t;c++){const f=w.evalPoly(n,w.exp(c));o[o.length-1-c]=f,f!==0&&(i=!0)}if(!i)return r;o=w.polynomial(o);const a=w.monomial(t,1),[s,l]=w.euclidian(a,o,t),d=fe(w.degree(s),0);let u=0;for(let c=1;c<256&&u<d.length;c++)w.evalPoly(s,c)===0&&(d[u++]=w.inv(c));if(u!==d.length)throw new Error("RS.decode: invalid errors number");for(let c=0;c<d.length;c++){const f=r.length-1-w.log(d[c]);if(f<0)throw new Error("RS.decode: invalid error location");const h=w.inv(d[c]);let g=1;for(let b=0;b<d.length;b++)c!==b&&(g=w.mul(g,w.add(1,w.mul(d[b],h))));r[f]=w.add(r[f],w.mul(w.evalPoly(l,h),w.inv(g)))}return r}}}function Ko(t,e){const{words:r,shortBlocks:n,numBlocks:o,blockLen:i,total:a}=U.capacity(t,e),s=qo(r);return{encode(l){const d=[],u=[];for(let g=0;g<o;g++){const b=g<n,p=i+(b?0:1);d.push(l.subarray(0,p)),u.push(s.encode(l.subarray(0,p))),l=l.subarray(p)}const c=vr(d),f=vr(u),h=new Uint8Array(c.length+f.length);return h.set(c),h.set(f,c.length),h},decode(l){if(l.length!==a)throw new Error(`interleave.decode: len(data)=${l.length}, total=${a}`);const d=[];for(let f=0;f<o;f++){const h=f<n;d.push(new Uint8Array(r+i+(h?0:1)))}let u=0;for(let f=0;f<i;f++)for(let h=0;h<o;h++)d[h][f]=l[u++];for(let f=n;f<o;f++)d[f][i]=l[u++];for(let f=i;f<i+r;f++)for(let h=0;h<o;h++){const g=h<n;d[h][f+(g?0:1)]=l[u++]}const c=[];for(const f of d)c.push(...Array.from(s.decode(f)).slice(0,-r));return Uint8Array.from(c)}}}function Ho(t,e,r,n=!1){const o=U.size.encode(t);let i=new q(o+2);const a=new q(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);i=i.embed(0,a).embed({x:-a.width,y:0},a).embed({x:0,y:-a.height},a),i=i.rectSlice(1,o);const s=new q(1).rect(0,1,!0).border(1,!1).border(1,!0),l=U.alignmentPatterns(t);for(const d of l)for(const u of l)i.isDefined(u,d)||i.embed({x:u-2,y:d-2},s);i=i.hLine({x:0,y:6},1/0,({x:d})=>i.isDefined(d,6)?void 0:d%2==0).vLine({x:6,y:0},1/0,({y:d})=>i.isDefined(6,d)?void 0:d%2==0);{const d=U.formatBits(e,r),u=c=>!n&&(d>>c&1)==1;for(let c=0;c<6;c++)i.set(8,c,u(c));for(let c=6;c<8;c++)i.set(8,c+1,u(c));for(let c=8;c<15;c++)i.set(8,o-15+c,u(c));for(let c=0;c<8;c++)i.set(o-c-1,8,u(c));for(let c=8;c<9;c++)i.set(15-c-1+1,8,u(c));for(let c=9;c<15;c++)i.set(15-c-1,8,u(c));i.set(8,o-8,!n)}if(t>=7){const d=U.versionBits(t);for(let u=0;u<18;u+=1){const c=!n&&(d>>u&1)==1,f=Math.floor(u/3),h=u%3+o-8-3;i.set(h,f,c),i.set(f,h,c)}}return i}function Xo(t,e,r){const n=t,o=n.height,i=Gt[e];let a=-1,s=o-1;for(let l=o-1;l>0;l-=2){for(l==6&&(l=5);;s+=a){for(let d=0;d<2;d+=1){const u=l-d;n.isDefined(u,s)||r(u,s,i(u,s))}if(s+a<0||s+a>=o)break}a=-a}}function Qo(t){let e="numeric";for(let r of t)if(!U.alphabet.numeric.has(r)&&(e="alphanumeric",!U.alphabet.alphanumerc.has(r)))return"byte";return e}function Jo(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function yr(t,e,r,n,o=Jo){let i="",a=r.length;if(n==="numeric"){const f=U.alphabet.numeric.decode(r.split("")),h=f.length;for(let g=0;g<h-2;g+=3)i+=_e(f[g]*100+f[g+1]*10+f[g+2],10);h%3===1?i+=_e(f[h-1],4):h%3===2&&(i+=_e(f[h-2]*10+f[h-1],7))}else if(n==="alphanumeric"){const f=U.alphabet.alphanumerc.decode(r.split("")),h=f.length;for(let g=0;g<h-1;g+=2)i+=_e(f[g]*45+f[g+1],11);h%2==1&&(i+=_e(f[h-1],6))}else if(n==="byte"){const f=o(r);a=f.length,i=Array.from(f).map(h=>_e(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:s}=U.capacity(t,e),l=_e(a,U.lengthBits(t,n));let d=U.modeBits[n]+l+i;if(d.length>s)throw new Error("Capacity overflow");d+="0".repeat(Math.min(4,Math.max(0,s-d.length))),d.length%8&&(d+="0".repeat(8-d.length%8));const u="1110110000010001";for(let f=0;d.length!==s;f++)d+=u[f%u.length];const c=Uint8Array.from(d.match(/(.{8})/g).map(f=>+`0b${f}`));return Ko(t,e).encode(c)}function xr(t,e,r,n,o=!1){const i=Ho(t,e,n,o);let a=0;const s=8*r.length;if(Xo(i,n,(l,d,u)=>{let c=!1;a<s&&(c=(r[a>>>3]>>(7-a&7)&1)!==0,a++),i.set(l,d,c!==u)}),a!==s)throw new Error("QR: bytes left after draw");return i}const tn=t=>{const e=t.map(r=>r?"1":"0").join("");return{len:e.length,n:+`0b${e}`}},rn=[!0,!1,!0,!0,!0,!1,!0],nn=[!1,!1,!1,!1],st=tn([...rn,...nn]),kr=tn([...nn,...rn]);function Zo(t){const e=t,{width:r,height:n}=e,o=e.transpose();let i=0;for(let f=0;f<n;f++)e.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});for(let f=0;f<r;f++)o.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});let a=0;for(let f=0;f<n-1;f++)a+=3*e.countBoxes2x2(f);let s=0;for(let f=0;f<n;f++)s+=40*e.countPatternInRow(f,st.len,st.n,kr.n);for(let f=0;f<r;f++)s+=40*o.countPatternInRow(f,st.len,st.n,kr.n);const l=n*r,d=e.popcnt(),c=10*Math.ceil(Math.max(0,Math.abs(d*100-l*50)-l*5)/(l*5));return i+a+s+c}function Yo(t,e,r,n){if(n===void 0){const o=zo();for(let i=0;i<Gt.length;i++)o.add(Zo(xr(t,e,r,i,!0)),i);n=o.get()}if(n===void 0)throw new Error("Cannot find mask");return xr(t,e,r,n)}function ei(t){if(!br.includes(t))throw new Error(`Invalid error correction mode=${t}. Expected: ${br}`)}function ti(t){if(!wr.includes(t))throw new Error(`Encoding: invalid mode=${t}. Expected: ${wr}`);if(t==="kanji"||t==="eci")throw new Error(`Encoding: ${t} is not supported (yet?).`)}function ri(t){if(![0,1,2,3,4,5,6,7].includes(t)||!Gt[t])throw new Error(`Invalid mask=${t}. Expected number [0..7]`)}function ni(t,e="raw",r={}){const n=r,o=n.ecc!==void 0?n.ecc:"medium";ei(o);const i=n.encoding!==void 0?n.encoding:Qo(t);ti(i),n.mask!==void 0&&ri(n.mask);let a=n.version,s,l=new Error("Unknown error");if(a!==void 0)Fo(a),s=yr(a,o,t,i,n.textEncoder);else for(let c=1;c<=40;c++)try{s=yr(c,o,t,i,n.textEncoder),a=c;break}catch(f){l=f}if(!a||!s)throw l;let d=Yo(a,o,s,n.mask);d.assertDrawn();const u=n.border===void 0?2:n.border;if(!Number.isSafeInteger(u)||u<=0)throw new Error(`invalid border=${u}`);if(d=d.border(u,!1),n.scale!==void 0&&(d=d.scale(n.scale)),e==="raw")return d.toRaw();if(e==="ascii")return d.toASCII();if(e==="svg")return d.toSVG(n.optimize);if(e==="gif")return d.toGIF();if(e==="term")return d.toTerm();throw new Error(`Unknown output: ${e}`)}const on=async t=>{if(!t)return!1;try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch(e){console.error("Failed to copy to clipboard",e)}try{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-999999px",e.style.top="-999999px",document.body.append(e),e.focus(),e.select();const r=document.execCommand("copy");return e.remove(),r}catch{return!1}};var oi=x('<div class="flex flex-col items-center gap-4 px-2"><div class="w-full space-y-4 rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-card-background) p-4"><div class=w-full><button type=button class="w-full cursor-pointer rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-4 py-2 text-sm text-(--lv-text-primary) transition hover:bg-(--lv-control-button-secondary-hoverBackground) active:bg-(--lv-control-button-secondary-activeBackground)"></button></div></div><div class="w-full text-sm text-(--lv-text-secondary)"><span>'),ii=x('<div class="relative mx-auto flex w-fit items-center justify-center rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-qr-background) p-2"><button type=button class="h-[200px] w-[200px] cursor-pointer rounded bg-(--lv-qr-background) text-(--lv-qr-color)">');const si=t=>ni(t,"svg",{optimize:!0,encoding:"byte",border:2}),ai=()=>{const{t}=Q(),{uri:e}=Ye(),r=()=>{const n=e();n&&on(n)};return(()=>{var n=oi(),o=n.firstChild,i=o.firstChild,a=i.firstChild,s=o.nextSibling,l=s.firstChild;return m(o,v(ve,{get when(){return e()},children:d=>(()=>{var u=ii(),c=u.firstChild;return c.$$click=r,z(f=>{var h=String(t("handshake.clickToCopyUrl")),g=si(d());return h!==f.e&&Z(c,"title",f.e=h),g!==f.t&&(c.innerHTML=f.t=g),f},{e:void 0,t:void 0}),u})()}),i),a.$$click=r,m(a,()=>t("handshake.copyConnectionUrl")),m(l,()=>t("handshake.scanCodeInstruction")),n})()};Ae(["click"]);var li=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),Cr=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),ci=x("<div>");const Sr=()=>li(),di=()=>{const{status:t}=Ye(),{t:e}=Q();return(()=>{var r=ci();return m(r,v(Gr,{get children(){return[v(Ne,{get when(){return[it.CREATED,it.SIGNALING].includes(t()?.status??"")},get children(){var n=Cr(),o=n.firstChild,i=o.firstChild,a=i.nextSibling;return m(n,v(Sr,{}),o),m(i,()=>e("connectionFlow.connecting")),m(a,()=>e("connectionFlow.waitingForNetwork")),n}}),v(Ne,{get when(){return t()?.status===it.READY},get children(){return v(ai,{})}}),v(Ne,{get when(){return t()?.status===it.LINKING},get children(){var n=Cr(),o=n.firstChild,i=o.firstChild,a=i.nextSibling;return m(n,v(Sr,{}),o),m(i,()=>e("connectionFlow.establishingConnection")),m(a,()=>e("connectionFlow.mayTakeFewSeconds")),n}})]}})),r})()};var ui=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><div class="mb-4 text-4xl">⚠️</div><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="mb-2 text-(--lv-text-muted) text-sm"></p></div><div class="flex w-full flex-col gap-2"><button type=button class="w-full rounded-lg bg-(--lv-control-button-primary-background) px-4 py-2 font-semibold text-(--lv-control-button-primary-color, var(--lv-text-primary)) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)"></button><button type=button class="w-full rounded-lg bg-(--lv-control-button-secondary-background) px-4 py-2 font-semibold text-(--lv-text-primary) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)">');const fi=t=>{const{t:e}=Q(),{provider:r}=Re(),n=T(()=>r.getState().error??r.getState().session?.error),o=T(()=>/ice candidates/i.test(n()??"")),i=T(()=>o()?e("connectionFlow.errorNoIce"):n()??e("connectionFlow.errorGeneric")),a=()=>{r.closeSession()};return(()=>{var s=ui(),l=s.firstChild,d=l.firstChild,u=d.nextSibling,c=u.nextSibling,f=l.nextSibling,h=f.firstChild,g=h.nextSibling;return m(u,()=>e("connectionFlow.connectionFailed")),m(c,i),h.$$click=a,m(h,()=>e("connectionFlow.tryAgain")),yt(g,"click",t.onClose,!0),m(g,()=>e("common.close")),s})()};Ae(["click"]);var hi=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),Ar=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),gi=x("<div class=w-full style=view-transition-name:connection-flow>"),vi=x('<div class="mb-4 text-4xl">✅'),pi=x('<div class="mb-4 flex flex-col items-center gap-2"><span class="font-medium text-(--lv-text-primary) text-sm">'),mi=x("<div class=text-4xl>✅"),bi=x('<img alt class="h-12 w-12 rounded-xl">');const wi=()=>hi(),yi=t=>{const{t:e}=Q(),{provider:r}=Re(),[n,o]=D(r.getState().status),i=()=>r.getSession()?.getState().peerInfo,a=()=>{const s=i()?.icon;return s&&(s.startsWith("data:image/")||s.startsWith("https://"))?s:void 0};return Ft(()=>{r.on("status_change",o)}),se(()=>{r.off("status_change",o)}),(()=>{var s=gi();return m(s,v(Gr,{get fallback(){return v(jt,{get state(){return n()}})},get children(){return[v(Ne,{get when(){return n()===oe.CREATING},get children(){var l=Ar(),d=l.firstChild,u=d.firstChild,c=u.nextSibling;return m(l,v(wi,{}),d),m(u,()=>e("connectionFlow.preparingConnection")),m(c,()=>e("connectionFlow.generatingKeys")),l}}),v(Ne,{get when(){return n()===oe.CONNECTING},get children(){return v(di,{get onClose(){return t.onClose}})}}),v(Ne,{get when(){return n()===oe.CONNECTED},get children(){var l=Ar(),d=l.firstChild,u=d.firstChild,c=u.nextSibling;return m(d,v(ve,{get when(){return i()},get fallback(){return vi()},children:f=>(()=>{var h=pi(),g=h.firstChild;return m(h,v(ve,{get when(){return a()},get fallback(){return mi()},children:b=>(()=>{var p=bi();return z(()=>Z(p,"src",b())),p})()}),g),m(g,()=>f().name),h})()}),u),m(u,()=>e("connectionFlow.connectedSuccessfully")),m(c,()=>e("connectionFlow.walletConnectedReady")),l}}),v(Ne,{get when(){return n()===oe.ERROR},get children(){return v(fi,{get onClose(){return t.onClose}})}})]}})),s})()};var xi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Le=xi,ki=x("<svg>"),Ci=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},Si=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),Ai=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),$r=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$i=t=>{const e=Ai(t);return e.charAt(0).toUpperCase()+e.slice(1)},Ti=t=>{const[e,r]=wt(t,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var n=ki();return gt(n,X(Le,{get width(){return e.size??Le.width},get height(){return e.size??Le.height},get stroke(){return e.color??Le.stroke},get"stroke-width"(){return Me(()=>!!e.absoluteStrokeWidth)()?Number(e.strokeWidth??Le["stroke-width"])*24/Number(e.size):Number(e.strokeWidth??Le["stroke-width"])},get class(){return Si("lucide","lucide-icon",...e.name!=null?[`lucide-${$r($i(e.name))}`,`lucide-${$r(e.name)}`]:[],e.class!=null?e.class:"")},get"aria-hidden"(){return!e.children&&!Ci(r)?"true":void 0}},r),!0,!0),m(n,v(Ce,{get each(){return e.iconNode},children:([o,i])=>v(Qn,X({component:o},i))})),n})()},$e=Ti,Ei=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_i=t=>v($e,X(t,{iconNode:Ei,name:"chevron-left"})),Pi=_i,Ni=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bi=t=>v($e,X(t,{iconNode:Ni,name:"chevron-right"})),Mi=Bi,Ri=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Oi=t=>v($e,X(t,{iconNode:Ri,name:"circle-question-mark"})),sn=Oi,Ii=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Li=t=>v($e,X(t,{iconNode:Ii,name:"plus"})),ji=Li,Di=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Vi=t=>v($e,X(t,{iconNode:Di,name:"qr-code"})),Fi=Vi,zi=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ui=t=>v($e,X(t,{iconNode:zi,name:"settings"})),Wi=Ui,Gi=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qi=t=>v($e,X(t,{iconNode:Gi,name:"trash-2"})),Ki=qi,Hi=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xi=t=>v($e,X(t,{iconNode:Hi,name:"x"})),Qi=Xi,Ji=/\s+/g,Zi=t=>typeof t!="string"||!t?t:t.replace(Ji," ").trim(),mt=(...t)=>{const e=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let i=0,a=n.length;i<a;i++)r(n[i]);return}const o=typeof n;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&n!==n)return;e.push(String(n))}else if(o==="object"){const i=Object.keys(n);for(let a=0,s=i.length;a<s;a++){const l=i[a];n[l]&&e.push(l)}}};for(let n=0,o=t.length;n<o;n++){const i=t[n];i!=null&&r(i)}return e.length>0?Zi(e.join(" ")):void 0},Tr=t=>t===!1?"false":t===!0?"true":t===0?"0":t,re=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},Yi=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!n.includes(i)||t[i]!==e[i])return!1}return!0},es=(t,e)=>{for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r];r in t?t[r]=mt(t[r],n):t[r]=n}return t},an=(t,e)=>{for(let r=0;r<t.length;r++){const n=t[r];Array.isArray(n)?an(n,e):n&&e.push(n)}},ln=(...t)=>{const e=[];an(t,e);const r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r},Dt=(t,e)=>{const r={};for(const n in t){const o=t[n];if(n in e){const i=e[n];Array.isArray(o)||Array.isArray(i)?r[n]=ln(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?r[n]=Dt(o,i):r[n]=i+" "+o}else r[n]=o}for(const n in e)n in t||(r[n]=e[n]);return r},ts={twMerge:!0,twMergeConfig:{}};function rs(){let t=null,e={},r=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(n){t=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){t=null,e={},r=!1}}}var _t=rs(),ns=t=>{const e=(n,o)=>{const{extend:i=null,slots:a={},variants:s={},compoundVariants:l=[],compoundSlots:d=[],defaultVariants:u={}}=n,c={...ts,...o},f=i?.base?mt(i.base,n?.base):n?.base,h=i?.variants&&!re(i.variants)?Dt(s,i.variants):s,g=i?.defaultVariants&&!re(i.defaultVariants)?{...i.defaultVariants,...u}:u;!re(c.twMergeConfig)&&!Yi(c.twMergeConfig,_t.cachedTwMergeConfig)&&(_t.didTwMergeConfigChange=!0,_t.cachedTwMergeConfig=c.twMergeConfig);const b=re(i?.slots),p=re(a)?{}:{base:mt(n?.base,b&&i?.base),...a},C=b?p:es({...i?.slots},re(p)?{base:n?.base}:p),k=re(i?.compoundVariants)?l:ln(i?.compoundVariants,l),y=_=>{if(re(h)&&re(a)&&b)return t(f,_?.class,_?.className)(c);if(k&&!Array.isArray(k))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof k}`);if(d&&!Array.isArray(d))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof d}`);const pe=(A,$=h,E=null,M=null)=>{const P=$[A];if(!P||re(P))return null;const O=M?.[A]??_?.[A];if(O===null)return null;const J=Tr(O);if(typeof J=="object")return null;const ce=g?.[A],G=J??Tr(ce);return P[G||"false"]},he=()=>{if(!h)return null;const A=Object.keys(h),$=[];for(let E=0;E<A.length;E++){const M=pe(A[E],h);M&&$.push(M)}return $},De=(A,$)=>{if(!h||typeof h!="object")return null;const E=[];for(const M in h){const P=pe(M,h,A,$),O=A==="base"&&typeof P=="string"?P:P&&P[A];O&&E.push(O)}return E},tt={};for(const A in _){const $=_[A];$!==void 0&&(tt[A]=$)}const Ve=(A,$)=>{const E=typeof _?.[A]=="object"?{[A]:_[A]?.initial}:{};return{...g,...tt,...E,...$}},rt=(A=[],$)=>{const E=[],M=A.length;for(let P=0;P<M;P++){const{class:O,className:J,...ce}=A[P];let G=!0;const ae=Ve(null,$);for(const me in ce){const le=ce[me],Oe=ae[me];if(Array.isArray(le)){if(!le.includes(Oe)){G=!1;break}}else{if((le==null||le===!1)&&(Oe==null||Oe===!1))continue;if(Oe!==le){G=!1;break}}}G&&(O&&E.push(O),J&&E.push(J))}return E},nt=A=>{const $=rt(k,A);if(!Array.isArray($))return $;const E={},M=t;for(let P=0;P<$.length;P++){const O=$[P];if(typeof O=="string")E.base=M(E.base,O)(c);else if(typeof O=="object")for(const J in O)E[J]=M(E[J],O[J])(c)}return E},Te=A=>{if(d.length<1)return null;const $={},E=Ve(null,A);for(let M=0;M<d.length;M++){const{slots:P=[],class:O,className:J,...ce}=d[M];if(!re(ce)){let G=!0;for(const ae in ce){const me=E[ae],le=ce[ae];if(me===void 0||(Array.isArray(le)?!le.includes(me):le!==me)){G=!1;break}}if(!G)continue}for(let G=0;G<P.length;G++){const ae=P[G];$[ae]||($[ae]=[]),$[ae].push([O,J])}}return $};if(!re(a)||!b){const A={};if(typeof C=="object"&&!re(C)){const $=t;for(const E in C)A[E]=M=>{const P=nt(M),O=Te(M);return $(C[E],De(E,M),P?P[E]:void 0,O?O[E]:void 0,M?.class,M?.className)(c)}}return A}return t(f,he(),rt(k),_?.class,_?.className)(c)},F=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return y.variantKeys=F(),y.extend=i,y.base=f,y.slots=C,y.variants=h,y.defaultVariants=g,y.compoundSlots=d,y.compoundVariants=k,y};return{tv:e,createTV:n=>(o,i)=>e(o,i?Dt(n,i):n)}},os=(...t)=>e=>mt(t)||void 0,{tv:kt}=ns(os),is=x("<a>"),ss=x("<button type=button>");const Er=kt({base:"flex items-center justify-center rounded-lg transition-all duration-100 cursor-pointer active:scale-95",variants:{$variant:{primary:"font-semibold text-sm bg-(--lv-control-button-primary-background) text-(--lv-control-button-primary-color) border-(--lv-control-button-primary-border) hover:bg-(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)) active:bg-(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))) disabled:bg-(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background)) disabled:text-(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))",secondary:"border bg-(--lv-control-button-secondary-background) text-(--lv-control-button-secondary-color) border-(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background)) hover:bg-(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)) active:bg-(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))) disabled:bg-(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background)) disabled:text-(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))",tertiary:"bg-transparent text-(--lv-text-muted) hover:bg-(--lv-control-button-tertiary-hoverBackground,transparent) active:bg-(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent)) disabled:text-(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))"},$size:{sm:"h-6",md:"h-8",lg:"h-11"},$aspect:{square:"aspect-square",auto:""}},defaultVariants:{$size:"md",$variant:"primary",$aspect:"auto"}}),je=t=>{const[e,r]=wt(t,["children","class","$variant","$size","$aspect","href","onClick"]);return e.href?(()=>{var n=is();return gt(n,X({get href(){return e.href},get onClick(){return e.onClick},get class(){return ke(Er({$variant:e.$variant,$size:e.$size,$aspect:e.$aspect}),e.class)}},r),!1,!0),m(n,()=>e.children),n})():(()=>{var n=ss();return gt(n,X({get onClick(){return e.onClick},get class(){return ke(Er({$variant:e.$variant,$size:e.$size,$aspect:e.$aspect}),e.class)}},r),!1,!0),m(n,()=>e.children),n})()};var as=x('<div class="flex h-full w-full justify-between"><div class="grow py-1 ps-1"><div class="h-full rounded-sm border border-gray-300 bg-gray-400"></div></div><div class="flex h-full w-3 flex-col items-center justify-center gap-0.5 pr-0.5">'),ls=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-500">'),cs=x('<div class="flex h-full w-full flex-col justify-between"><div class="grow px-1 pt-1"><div class="h-full rounded-sm border border-gray-200 bg-gray-300"></div></div><div class="flex h-3 w-full items-center justify-center gap-0.5 pb-0.5">'),ds=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-400">'),us=x('<div class="-space-x-4 flex items-end"><div class="h-38 w-48 overflow-hidden rounded-lg bg-gray-300"></div><div class="h-18 w-12 overflow-hidden rounded-lg bg-gray-200">');const cn=t=>t?1:3,fs=t=>(()=>{var e=as(),r=e.firstChild,n=r.nextSibling;return m(n,v(Ce,{get each(){return Array.from({length:cn(t.isApple)})},children:()=>ls()})),e})(),hs=t=>(()=>{var e=cs(),r=e.firstChild,n=r.nextSibling;return m(n,v(Ce,{get each(){return Array.from({length:cn(t.isApple)})},children:()=>ds()})),e})(),gs=()=>(()=>{var e=us(),r=e.firstChild,n=r.nextSibling;return m(r,v(fs,{isApple:!0})),m(n,v(hs,{isApple:!0})),e})();var vs=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><p class="text-sm text-(--lv-text-secondary)"></p></div><div class="flex items-center">');const ps=t=>{const{t:e}=Q(),{start:r}=jo();return(()=>{var n=vs(),o=n.firstChild,i=o.firstChild,a=o.nextSibling;return m(n,v(gs,{}),o),m(i,()=>e("disconnected.prompt")),m(a,v(je,{type:"button",onClick:r,class:"z-10 px-6 py-3",$variant:"primary",$size:"lg",get children(){return e("disconnected.generateQr")}}),null),m(a,v(je,{type:"button",get"aria-label"(){return String(e("disconnected.connectionSettings"))},"aria-pressed":!1,get onClick(){return t.onSettings},class:"px-3 ltr:-ml-1 ltr:rounded-l-none rtl:-mr-1 rtl:rounded-r-none",$aspect:"square",$size:"lg",$variant:"secondary",get children(){return v(Wi,{class:"h-5 w-5 text-(--lv-text-muted)"})}}),null),n})()};var ms=x('<div class="flex flex-col space-y-2 px-4 text-start"><div class="min-h-32 w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class="flex justify-center items-center grow"></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class>');const bs=()=>{const{t}=Q();return(()=>{var e=ms(),r=e.firstChild,n=r.firstChild,o=n.nextSibling,i=r.nextSibling,a=i.firstChild,s=i.nextSibling,l=s.firstChild;return m(n,()=>t("info.scanQrCode")),m(o,v(Fi,{class:"w-10 h-10"})),m(a,()=>t("info.approveOnDevice")),m(l,()=>t("info.youreConnected")),e})()},Vt=(t,{duration:e=200}={})=>{const r=typeof t=="function"?t:()=>t,n=r(),[o,i]=D(n),[a,s]=D(void 0);let l,d=n;return ie(()=>{const u=r();Object.is(u,d)||(l&&globalThis.clearTimeout(l),s(()=>d),i(()=>u),d=u,l=globalThis.setTimeout(()=>{s(()=>{}),l=void 0},e),se(()=>{l&&globalThis.clearTimeout(l)}))}),{current:o,previous:a,isTransitioning:()=>a()!==void 0}},et=()=>{const{provider:t}=Re(),[e,r]=D(t.storage.getSettings()),n=u=>{r(u),t.storage.setSettings(u)};return{settings:e,setSettings:n,setLanguage:u=>{n({...e(),language:u})},setThemeMode:u=>{n({...e(),theme:u})},setSignalingProtocol:u=>{n({...e(),signaling:{p:u,s:e()?.signaling?.s??{}}})},setSignalingOptions:u=>{const c=e()?.signaling?.p;if(!c)return;const f=e()?.signaling?.s??{};n({...e(),signaling:{p:c,s:{...f,[c]:u.url}}})},setRetainSessionHistory:u=>{n({...e(),retainHistory:u})},setAutoReconnect:u=>{n({...e(),autoReconnect:u})}}},dn=()=>{const{settings:t}=et(),e=T(()=>t().theme),r=T(()=>"light");return{theme:e,mode:r}},un="data:image/webp;base64,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";var ws=x('<div class="group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-(--lv-control-button-secondary-background)"><div class="pointer-events-none whitespace-nowrap rounded-md text-xs opacity-0 group-hover:opacity-100"></div><div>');const ys=()=>{const{t}=Q(),{status:e}=Ye(),r=T(()=>{const n=e()?.status,o=e()?.signaling?.state;return Be({sessionState:n,signalState:o}).with({sessionState:"connected"},()=>({icon:"✅",text:t("status.connectedSuccessfully")})).with({sessionState:"signaling",signalState:"standby"},()=>({icon:"🫥",text:t("status.connecting")})).with({sessionState:"signaling",signalState:"connecting"},()=>({icon:"↗️",text:t("status.connecting")})).with({sessionState:"signaling",signalState:"ready"},()=>({icon:"👋",text:t("status.ready")})).with({sessionState:"signaling",signalState:"handshake"},()=>({icon:"🤝",text:t("status.handshakeClosed")})).with({sessionState:"signaling",signalState:"handshake-partial"},()=>({icon:"🤝",text:t("status.handshakePartial")})).with({sessionState:"signaling",signalState:"encrypted"},()=>({icon:"🔒",text:t("status.encrypted")})).with({sessionState:"signaling",signalState:"error"},()=>({icon:"❌",text:t("status.signalError")})).otherwise(()=>{})});return v(ve,{get when(){return r()},children:n=>(()=>{var o=ws(),i=o.firstChild,a=i.nextSibling;return m(i,()=>n().text),m(a,()=>n().icon),o})()})};var xs=x('<div class="h-11 w-full">'),ks=x('<div class="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 px-3 py-2 text-(--lv-text-muted)"><a href=https://github.com/v3xlabs/open-lavatory target=_blank rel=noreferrer class="flex items-center gap-2 p-1 font-semibold text-sm text-(--lv-text-muted)"><img alt="Open Lavatory Logo"width=20 height=20 class=rounded data-openlv-brand-logo><span>openlv</span></a><div class="text-sm text-(--lv-text-muted)">');const Cs=()=>[xs(),(()=>{var t=ks(),e=t.firstChild,r=e.firstChild,n=e.nextSibling;return Z(r,"src",un),m(n,v(ys,{})),t})()];var Ss=x('<div class="flex items-center justify-between px-2 py-2"><h2 class="flex items-center justify-center gap-2 font-semibold text-(--lv-text-primary) text-lg">');const As=t=>{const{t:e}=Q();return(()=>{var r=Ss(),n=r.firstChild;return m(r,(()=>{var o=Me(()=>!!t.onBack);return()=>o()?v(je,{get onClick(){return t.onBack},get"aria-label"(){return String(t.view==="settings"?e("modal.backToQr"):e("modal.closeModal"))},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(Pi,{class:"h-6 w-6 text-(--lv-text-muted) rtl:rotate-180"})}}):v(je,{type:"button",onClick:()=>t.setView("info"),$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(sn,{class:"h-5 w-5"})}})})(),n),m(n,()=>t.title),m(r,v(je,{type:"button",get"aria-label"(){return String(e("common.close"))},"aria-pressed":!1,get onClick(){return t.onClose},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(Qi,{class:"h-6 w-6 text-(--lv-text-muted)"})}}),null),r})()},$s=(t,{transitionDuration:e=200}={})=>{const[r,n]=D([t]),[o,i]=D(0),a=T(()=>r()[o()]??t),{current:s,previous:l,isTransitioning:d}=Vt(a,{duration:e});return{screen:s,previousScreen:l,isTransitioning:d,navigate:f=>{const h=o(),g=r(),b=g[h];if(Object.is(b,f))return;const p=g.slice(0,h+1);p.push(f),n(p),i(p.length-1)},goBack:()=>{i(f=>Math.max(0,f-1))},isAtRoot:()=>o()===0}};var Ts=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),Es=x("<div><div>");const _s=t=>(()=>{var e=Es(),r=e.firstChild;return m(e,v(ve,{get when(){return t.previous!==void 0},get children(){var n=Ts();return m(n,()=>t.render(t.previous)),n}}),r),m(r,()=>t.render(t.current)),z(n=>{var o=ke("modal-transition__container",t.class),i=ke("modal-transition__layer",t.isTransitioning&&"modal-transition__layer--incoming");return o!==n.e&&ne(e,n.e=o),i!==n.t&&ne(r,n.t=i),n},{e:void 0,t:void 0}),e})();var Ps=x('<div><div class="flex items-end justify-between py-1 pl-2"><div class="font-medium text-(--lv-text-primary) text-sm"></div><div></div></div><div class="flex flex-col gap-1 rounded-md bg-(--lv-card-background)">');const Xe=t=>(()=>{var e=Ps(),r=e.firstChild,n=r.firstChild,o=n.nextSibling,i=r.nextSibling;return m(n,()=>t.title),m(o,()=>t.right),m(i,()=>t.children),e})();var Ns=x('<div class="flex items-baseline justify-between gap-2 px-2 py-1 first:pt-2 last:pb-2"><div class="text-sm text-(--lv-text-secondary) text-start"></div><div>');const Qe=t=>(()=>{var e=Ns(),r=e.firstChild,n=r.nextSibling;return m(r,()=>t.label),m(n,()=>t.children),e})();var Bs=x("<select>"),Ms=x("<div>"),Rs=x("<button type=button>"),Os=x("<option>");const Is=kt({slots:{root:"flex overflow-hidden rounded-md border border-(--lv-control-button-secondary-border)",box:"px-4 py-2 font-semibold text-xs transition border-l first:border-l-0 border-(--lv-control-button-secondary-border)"},variants:{active:{on:{box:"bg-(--lv-control-button-secondary-background) text-(--lv-text-primary)"},off:{box:"bg-transparent text-(--lv-text-secondary) cursor-pointer"}}},defaultVariants:{active:"off"}}),Ls=kt({base:"w-full rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-3 py-2 font-semibold text-xs text-(--lv-text-primary) cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--lv-control-button-primary-background) appearance-none bg-[url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')] bg-[length:14px] bg-[right_8px_center] bg-no-repeat pr-8"}),Ct=t=>{const e=Ls(),{root:r,box:n}=Is({});return v(ve,{get when(){return t.options.length>(t.dropdownThreshold??3)},get fallback(){return(()=>{var o=Ms();return m(o,v(Ce,{get each(){return t.options},children:([i,a])=>(()=>{var s=Rs();return s.$$click=()=>t.onChange(i),m(s,a),z(l=>{var d=i===t.value,u=n({active:i===t.value?"on":"off"});return d!==l.e&&Z(s,"aria-pressed",l.e=d),u!==l.t&&ne(s,l.t=u),l},{e:void 0,t:void 0}),s})()})),z(()=>ne(o,r())),o})()},get children(){var o=Bs();return o.addEventListener("change",i=>t.onChange(i.currentTarget.value)),ne(o,e),m(o,v(Ce,{get each(){return t.options},children:([i,a])=>(()=>{var s=Os();return s.value=i,m(s,a),s})()})),z(()=>o.value=t.value),o}})};Ae(["click"]);const js=()=>{const{t}=Q(),e=dn(),r=()=>e.mode()==="auto",n=()=>e.mode()==="auto"?"system":e.mode(),o=i=>{};return v(ve,{get when(){return r()},get children(){return v(Qe,{get label(){return t("settings.theme.mode")},get children(){return v(Ct,{get options(){return[["light",t("settings.theme.light")],["dark",t("settings.theme.dark")],["system",t("settings.theme.system")]]},get value(){return n()},onChange:i=>o()})}})}})},Ds=()=>{const{t,languageTag:e,setLanguageTag:r}=Q(),{settings:n,setLanguage:o}=et(),i=T(()=>[...Wt].sort((s,l)=>{const d=ur(s.tag);return ur(l.tag)-d})),a=s=>{const l=s;r(l),o(l)};return v(Xe,{get title(){return t("settings.appearance")},get children(){return[v(Qe,{get label(){return t("settings.language")},get children(){return v(Ct,{get options(){return i().map(s=>[s.tag,s.nativeName])},get value(){return n()?.language||e()},onChange:a})}}),v(js,{})]}})};var Vs=x("<div><div></div><div>"),Fs=x("<div>Text");const zs=kt({slots:{root:"group relative",box:"cursor-pointer rounded-md transition-colors flex items-center justify-center hover:[background-color:var(--lv-control-button-tertiary-hoverBackground)] text-(--lv-text-muted)",popover:"-translate-x-1/2 absolute top-full left-1/2 z-10 hidden rounded-md shadow-sm group-hover:block border border-(--lv-control-button-secondary-border) bg-(--lv-body-background) px-2 py-1.5 text-(--lv-text-primary) text-sm",icon:""},variants:{size:{sm:{box:"h-5 w-5 p-1",icon:"h-3 w-3"},md:{box:"h-6 w-6 p-1",icon:"h-4 w-4"},lg:{box:"h-8 w-8 p-1.5",icon:"h-4 w-4"}},variant:{icon:"",text:""}},defaultVariants:{size:"lg"}}),_r=t=>{const e=X({variant:"icon",size:"lg"},t),{root:r,box:n,popover:o,icon:i}=zs({size:e.size,variant:e.variant});return(()=>{var a=Vs(),s=a.firstChild,l=s.nextSibling;return m(s,()=>Be(e.variant).with("icon",()=>v(sn,{get class(){return i()}})).with("text",()=>Fs()).exhaustive()),m(l,()=>e.children),z(d=>{var u=r(),c=n(),f=o();return u!==d.e&&ne(a,d.e=u),c!==d.t&&ne(s,d.t=c),f!==d.a&&ne(l,d.a=f),d},{e:void 0,t:void 0,a:void 0}),a})()};var Us=x('<span class="text-sm text-(--lv-text-muted)">'),Ws=x('<button type=button class="flex w-full cursor-pointer items-center justify-between gap-2 first:rounded-t-sm last:rounded-b-sm px-2 py-1 first:pt-1.5 last:pb-2 hover:bg-(--lv-control-button-tertiary-hoverBackground)"><div class="text-sm text-(--lv-text-secondary) flex items-center gap-1"></div><div class="flex items-center gap-1">');const Pr=t=>(()=>{var e=Ws(),r=e.firstChild,n=r.nextSibling;return yt(e,"click",t.onClick,!0),m(r,()=>t.label),m(n,v(ve,{get when(){return t.value},get children(){var o=Us();return m(o,()=>t.value),o}}),null),m(n,v(Mi,{class:"h-4 w-4 text-(--lv-text-muted) rtl:rotate-180"}),null),e})();Ae(["click"]);const Gs=t=>{const{t:e}=Q();return v(Ct,{get options(){return[["true",String(e("common.yes"))],["false",String(e("common.no"))]]},get value(){return t.value?"true":"false"},onChange:r=>t.onChange(r==="true")})},qs=t=>{const{t:e}=Q(),{settings:r,setRetainSessionHistory:n,setAutoReconnect:o}=et();return v(Xe,{get title(){return e("settings.connectionPreferences.title")},get children(){return[v(Pr,{get label(){return[Me(()=>e("settings.signaling.title")),v(_r,{variant:"icon",get children(){return e("settings.signaling.description")}})]},onClick:()=>t.onNavigate("signaling"),get value(){return r()?.signaling?.p}}),v(Pr,{get label(){return[Me(()=>e("settings.transport.title")),v(_r,{variant:"icon",get children(){return e("settings.transport.description")}})]},onClick:()=>t.onNavigate("transport"),value:"WebRTC"}),v(Ce,{get each(){return[[e("settings.connectionPreferences.retainSessionHistory"),r()?.retainHistory??!1,n],[e("settings.connectionPreferences.autoReconnect"),r()?.autoReconnect??!1,o]]},children:([i,a,s])=>v(Qe,{label:i,get children(){return v(Gs,{label:i,value:a,onChange:s})}})})]}})};var Ks=x('<input class="h-9 w-full rounded-lg border bg-white px-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 text-(--lv-text-primary) bg-(--lv-body-background) border-(--lv-control-input-border)">');const We=t=>{const e=X({readOnly:!0},t),[r]=wt(e,["id","value","placeholder","ariaLabel","readOnly","onChange"]);return(()=>{var n=Ks();return n.$$input=o=>{r.onChange?.(o.currentTarget.value)},z(o=>{var i=r.id,a=r.placeholder,s=r.ariaLabel,l=r.readOnly;return i!==o.e&&Z(n,"id",o.e=i),a!==o.t&&Z(n,"placeholder",o.t=a),s!==o.a&&Z(n,"aria-label",o.a=s),l!==o.o&&(n.readOnly=o.o=l),o},{e:void 0,t:void 0,a:void 0,o:void 0}),z(()=>n.value=r.value),n})()};Ae(["input"]);var Hs=x('<div><div class="p-2 text-sm text-(--lv-text-secondary) text-start">');const Xs=["mqtt","ntfy","gun"],Qs=()=>{const{t}=Q(),{settings:e,setSignalingProtocol:r,setSignalingOptions:n}=et(),o=T(()=>e()?.signaling?.p),i=T(()=>{const a=o();return a?e()?.signaling?.s?.[a]??"":""});return(()=>{var a=Hs(),s=a.firstChild;return m(a,v(Xe,{get title(){return t("settings.signaling.title")},get children(){return[v(Qe,{get label(){return t("common.protocol")},get children(){return v(Ct,{get options(){return Xs.map(l=>[l.toLowerCase(),l.toUpperCase()])},get value(){return o()??""},onChange:l=>r(l)})}}),v(Qe,{get label(){return t("settings.signaling.server")},get children(){return v(We,{id:"server",get value(){return i()},onChange:l=>n({url:l}),get placeholder(){return String(t("settings.signaling.serverUrl"))},get ariaLabel(){return String(t("settings.signaling.serverUrl"))},readOnly:!1})}})]}}),s),m(s,()=>t("settings.signaling.description")),a})()};var Js=x('<div class="flex items-center gap-2"><div class=flex-1>'),Zs=x('<button type=button class="flex w-full cursor-pointer items-center justify-center gap-1 rounded-md border border-dashed border-(--lv-control-input-border) py-2 text-sm text-(--lv-text-muted) hover:bg-(--lv-card-background)">'),Ys=x('<div class="flex flex-col gap-2 p-2">'),ea=x('<div class="flex flex-col gap-3 p-2">'),ta=x('<div class="p-2 text-sm text-(--lv-text-secondary) text-start">'),ra=x('<div class="flex flex-col gap-2 rounded-md border border-(--lv-control-input-border) p-2"><div class="grid grid-cols-2 gap-2">');const Nr=t=>(()=>{var e=Js(),r=e.firstChild;return m(r,()=>t.children),m(e,v(je,{get onClick(){return t.onRemove},$variant:"tertiary",$aspect:"square",$size:"sm",get children(){return v(Ki,{class:"h-4 w-4 text-(--lv-text-muted)"})}}),null),e})(),Br=t=>(()=>{var e=Zs();return yt(e,"click",t.onClick,!0),m(e,v(ji,{class:"h-4 w-4"}),null),m(e,()=>t.label,null),e})(),na=()=>{const{t}=Q();et();const[e,r]=D([]),[n,o]=D([]),i=()=>{o([...n(),""])},a=c=>{o(n().filter((f,h)=>h!==c))},s=(c,f)=>{o(n().map((h,g)=>g===c?f:h))},l=()=>{r([...e(),{urls:""}])},d=c=>{r(e().filter((f,h)=>h!==c))},u=(c,f,h)=>{r(e().map((g,b)=>b===c?{...g,[f]:h}:g))};return[v(Xe,{get title(){return t("settings.transport.iceServers.stun")},get children(){var c=Ys();return m(c,v(Ce,{get each(){return n()},children:(f,h)=>v(Nr,{onRemove:()=>a(h()),get children(){return v(We,{value:f,onChange:g=>s(h(),g),placeholder:"stun:stun.l.google.com:19302",readOnly:!1})}})}),null),m(c,v(Br,{get label(){return t("settings.transport.iceServers.addStun")},onClick:i}),null),c}}),v(Xe,{get title(){return t("settings.transport.iceServers.turn")},get children(){var c=ea();return m(c,v(Ce,{get each(){return e()},children:(f,h)=>(()=>{var g=ra(),b=g.firstChild;return m(g,v(Nr,{onRemove:()=>d(h()),get children(){return v(We,{get value(){return f.urls},onChange:p=>u(h(),"urls",p),placeholder:"turn:relay.example.com:443",readOnly:!1})}}),b),m(b,v(We,{get value(){return f.username??""},onChange:p=>u(h(),"username",p),placeholder:"Username",readOnly:!1}),null),m(b,v(We,{get value(){return f.credential??""},onChange:p=>u(h(),"credential",p),placeholder:"Password",readOnly:!1}),null),g})()}),null),m(c,v(Br,{get label(){return t("settings.transport.iceServers.addTurn")},onClick:l}),null),c}}),(()=>{var c=ta();return m(c,()=>t("settings.transport.description")),c})()]};Ae(["click"]);var oa=x('<div class="px-4 pb-2">');const ia=t=>{switch(t){case"main":return"settings.title";case"signaling":return"settings.signaling.title";case"transport":return"settings.transport.title"}},sa=t=>{const{screen:e,previousScreen:r,isTransitioning:n,navigate:o,goBack:i,isAtRoot:a}=$s("main"),s={goBack:i,get isAtRoot(){return a()}};ie(()=>{t.navigationRef&&(t.navigationRef.current=s)}),ie(()=>{t.onTitleChange?.(ia(e()))});const l=d=>{switch(d){case"main":return[v(qs,{onNavigate:o}),v(Ds,{})];case"signaling":return v(Qs,{});case"transport":return v(na,{})}};return(()=>{var d=oa();return m(d,v(_s,{get current(){return e()},get previous(){return r()},get isTransitioning(){return n()},render:l})),d})()};var aa=x("<div class=modal-transition__container><div>"),la=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),ca=x('<div class="fixed inset-0 z-10000 flex animate-[bg-in_0.15s_ease-in-out] items-end justify-center md:items-center lg:p-4"role=presentation data-openlv-modal-root><div role=dialog aria-modal=true><div><div class=modal-transition__container><div><div class="flex flex-col text-center"></div></div></div></div><div>');const da=()=>{const[t,e]=D("start"),[r,n]=D(!1);return ie(()=>{if(!r())return;const o=globalThis.setTimeout(()=>n(!1),2e3);se(()=>globalThis.clearTimeout(o))}),{view:t,setView:e,copied:r,setCopied:n}},ua=t=>{ie(()=>{const e=r=>{r.key==="Escape"&&t()};document.addEventListener("keydown",e),se(()=>document.removeEventListener("keydown",e))})},fa=()=>{const[t,e]=D(),[r,n]=D(0),o=(a,s=!1)=>{const l=a||t();if(!l||!l.getBoundingClientRect)return;const d=s?l.scrollHeight:l.getBoundingClientRect().height;d>0&&n(u=>typeof u=="number"&&Math.abs(u-d)<.5?u:d)};ie(()=>{const a=t();if(!a||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{o()});s.observe(a),se(()=>s.disconnect())});const i=()=>o();return ie(()=>{globalThis.window!==void 0&&(window.addEventListener("resize",i),se(()=>window.removeEventListener("resize",i)))}),{setContentRef:e,contentNode:t,height:r,measureHeight:o}},fn=t=>{const{view:e,setView:r,copied:n,setCopied:o}=da(),{uri:i,status:a}=Ye(),{provider:s}=Re(),{setContentRef:l,contentNode:d,height:u,measureHeight:c}=fa(),{current:f,previous:h,isTransitioning:g}=Vt(e),{current:b,previous:p,isTransitioning:C}=Vt(a),k=()=>r("settings"),{t:y,isRtl:F,languageTag:_}=Q(),pe=dn(),he={current:null},[De,tt]=D("settings.title"),Ve=T(()=>Be(e()).with("start",()=>y("start.title")).with("settings",()=>y(De())).with("info",()=>y("info.title")).exhaustive());ua(t.onClose),ie(()=>{a()?.status===oe.CONNECTED&&t.onClose()});const rt=async()=>{const N=i();N&&await on(N)&&o(!0)};let nt=!0,Te,A,$;const[E,M]=D(!1);ie(()=>{b(),f(),d()&&(nt?(Te&&globalThis.clearTimeout(Te),Te=globalThis.setTimeout(()=>{d()&&(c(void 0,!0),nt=!1)},0)):c(),se(()=>{Te&&globalThis.clearTimeout(Te)}))}),ie(()=>{const N=u();A!==void 0&&N!==A&&N>0&&A>0&&Math.abs(N-A)>.5&&(M(!0),$&&globalThis.clearTimeout($),$=globalThis.setTimeout(()=>{M(!1),$=void 0},200)),A=N,se(()=>{$&&globalThis.clearTimeout($)})});const[P,O]=D(s.getState().status);Ft(()=>{s.on("status_change",O)}),se(()=>{s.off("status_change",O)});const J=T(()=>!(e()==="start"&&P()===oe.STANDBY)),ce=()=>{Be({view:e(),status:P()}).with({view:"start",status:oe.STANDBY},()=>{}).with({view:"start"},()=>{s.closeSession()}).with({view:"settings"},()=>{he.current&&!he.current.isAtRoot?he.current.goBack():r("start")}).with({view:"info"},()=>{r("start")}).otherwise(()=>{s.closeSession(),t.onClose()})},G=N=>Be(N).with("start",()=>v(ps,{onSettings:k})).with("settings",()=>v(sa,{onTitleChange:tt,navigationRef:he})).with("info",()=>v(bs,{})).otherwise(()=>v(jt,{state:N})),ae=()=>(()=>{var N=aa(),ee=N.firstChild;return m(N,v(ve,{get when(){return h()},children:Ee=>(()=>{var Fe=la();return m(Fe,()=>G(Ee())),Fe})()}),ee),m(ee,()=>G(f())),z(()=>ne(ee,ke("modal-transition__layer",g()&&"modal-transition__layer--incoming"))),N})(),me=N=>Be(N).with(oe.STANDBY,()=>ae()).with(go.union(oe.CREATING,oe.CONNECTING,oe.CONNECTED,oe.ERROR),()=>v(yi,{get onClose(){return t.onClose},onCopy:rt})).otherwise(ee=>v(jt,{state:ee||"unknown status"})),le={background:"var(--lv-overlay-background, rgba(0,0,0,0.3))","backdrop-filter":"var(--lv-overlay-backdrop-filter, blur(4px))"},Oe={background:"var(--lv-body-background)",color:"var(--lv-body-color, var(--lv-text-primary))","border-radius":"var(--lv-border-radius, 16px)","box-shadow":"var(--lv-modal-shadow, 0px 12px 32px rgba(0,0,0,0.25))"};return(()=>{var N=ca(),ee=N.firstChild,Ee=ee.firstChild,Fe=Ee.firstChild,qt=Fe.firstChild,gn=qt.firstChild,Kt=Ee.nextSibling;return N.$$mouseup=I=>{I.target===I.currentTarget&&t.onClose()},Bt(N,le),ee.$$click=I=>I.stopPropagation(),qr(l,Ee),m(Ee,v(As,{get title(){return String(Ve())},get view(){return e()},get onClose(){return t.onClose},get onBack(){return J()?ce:void 0},setView:r}),Fe),m(gn,()=>me(P())),m(Ee,v(Cs,{}),null),m(Kt,()=>y("modal.urlCopied")),z(I=>{var Ht=pe.mode(),Xt=_(),Qt=F()?"rtl":"ltr",Jt=ke("relative w-full max-w-[400px] animate-[fade-in_0.15s_ease-in-out] transition-[height] duration-200 ease-out",E()||p()?"overflow-hidden":void 0),Zt=String(Ve()),vn={...typeof u()=="number"&&u()>0?{height:`${u()}px`}:{},...Oe},Yt=ke("modal-transition__layer",C()&&"modal-transition__layer--incoming"),er=ke("absolute top-5 rounded-lg bg-blue-500 px-4 py-3 font-medium text-sm text-white transition-all ltr:right-5 rtl:left-5",n()?"translate-x-0 opacity-100":"opacity-0 ltr:translate-x-full rtl:-translate-x-full");return Ht!==I.e&&Z(N,"data-openlv-theme-mode",I.e=Ht),Xt!==I.t&&Z(N,"lang",I.t=Xt),Qt!==I.a&&Z(N,"dir",I.a=Qt),Jt!==I.o&&ne(ee,I.o=Jt),Zt!==I.i&&Z(ee,"aria-label",I.i=Zt),I.n=Bt(ee,vn,I.n),Yt!==I.s&&ne(qt,I.s=Yt),er!==I.h&&ne(Kt,I.h=er),I},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),N})()};Ae(["mouseup","click"]);const ha=(...t)=>console.log("%c[modal]%c","color: yellow; font-weight: bold","color: inherit; font-weight: normal",...t),hn=(t="openlv-modal")=>{if(globalThis.window===void 0)return t;const e=globalThis.customElements;return e?(e.get(t)||e.define(t,xt),t):(console.warn("OpenLV modal: custom elements are not supported in this environment."),t)},ga=t=>{const e=document.querySelector("openlv-modal");if(e&&e.remove(),!e){hn();const r=new xt({onClose(){ha("modal closed"),r.remove(),t.onClose?.()},provider:t.provider,theme:t.theme});document.body.append(r)}};exports.ModalRoot=fn;exports.OPENLV_ICON_128=un;exports.OpenLVModalElement=xt;exports.default=xt;exports.registerOpenLVModal=hn;exports.triggerOpenModal=ga;
|
|
5
|
+
`+fn}else r.textContent=fn};class ht extends HTMLElement{constructor(n){super();X(this,"shadow");X(this,"renderRequested",!1);X(this,"parameters");X(this,"themeCleanup");X(this,"disposeRender");this.parameters=n,this.shadow=this.attachShadow({mode:"open"});const r=n.provider.storage.getSettings()?.theme??"system";hn(this.shadow,n.theme,r)}connectedCallback(){this.requestRender(),this.themeCleanup?.(),this.setupThemeListener()}disconnectedCallback(){this.disposeRender?.(),this.disposeRender=void 0,this.themeCleanup?.()}setupThemeListener(){const n=()=>{const o=this.parameters.provider.storage.getSettings()?.theme??"system";hn(this.shadow,this.parameters.theme,o)};this.parameters.provider.storage.emitter.on("settings_change",n);const r=globalThis.matchMedia("(prefers-color-scheme: dark)");r.addEventListener("change",n),this.themeCleanup=()=>{this.parameters.provider.storage.emitter.off("settings_change",n),r.removeEventListener("change",n)}}showModal(){this.style.display="block"}hideModal(){this.style.display="none"}requestRender(){this.renderRequested||(this.renderRequested=!0,queueMicrotask(()=>{this.renderRequested=!1,this.performRender()}))}performRender(){this.disposeRender?.(),this.disposeRender=ro(()=>{const n=this;return v(ei,z(()=>n.parameters))},this.shadow)}}const Vo={close:"Close",yes:"Yes",no:"No",protocol:"Protocol"},Do={connectedSuccessfully:"Connected Successfully!",connecting:"Connecting",ready:"Ready",handshakeClosed:"Handshake Closed",handshakePartial:"Handshake Partial",encrypted:"Encrypted",signalError:"Signal Error",disconnected:"Disconnected"},Fo={title:"Settings",language:"Language",connection:{title:"Connection",description:"Configure how you connect to your wallet."},theme:{title:"Appearance",mode:"Theme",light:"Light",dark:"Dark",system:"System"},connectionPreferences:{title:"Connection preferences",retainSessionHistory:"Retain session history",autoReconnect:"Auto reconnect"},signaling:{title:"Signaling",description:"Signaling is the handshake protocol used to establish a connection.",server:"Server",serverUrl:"Server URL"},transport:{title:"Transport",description:"This is how the connection is maintained.",webrtc:"WebRTC",iceServers:{title:"ICE Servers",stun:"STUN Servers",turn:"TURN Servers",addStun:"Add STUN Server",addTurn:"Add TURN Server",username:"Username",credential:"Password"}},appearance:"Appearance"},zo={title:"Connect Wallet"},Uo={title:"What is openlv?",scanQrCode:"Scan QR Code",approveOnDevice:"Approve on device",youreConnected:"You're connected!"},Wo={prompt:"Click the button below to start a connection",generateQr:"Generate QR",connectionSettings:"Connection settings"},Go={preparingConnection:"Preparing connection",generatingKeys:"Generating keys...",connecting:"Connecting",waitingForNetwork:"Waiting for network connection...",establishingConnection:"Establishing connection...",mayTakeFewSeconds:"This may take a few seconds...",connectedSuccessfully:"Connected Successfully!",walletConnectedReady:"Your wallet is now connected and ready to use.",disconnected:"Disconnected",connectionClosed:"The connection has been closed."},qo={clickToCopyUrl:"Click to copy connection URL",copyConnectionUrl:"Copy Connection URL",scanCodeInstruction:`Scan the code above using your mobile wallet.
|
|
6
|
+
Or copy the link and paste it into your wallet.`},Ko={urlCopied:"Connection URL copied to clipboard!",backToQr:"Back to QR",closeModal:"Close modal"},Ho={common:Vo,status:Do,settings:Fo,start:zo,info:Uo,disconnected:Wo,connectionFlow:Go,handshake:qo,modal:Ko};var Xo=x("<br>");const Dt=[{tag:"en",name:"English",nativeName:"English"},{tag:"nl",name:"Dutch",nativeName:"Nederlands"},{tag:"es",name:"Spanish",nativeName:"Español"},{tag:"sv",name:"Swedish",nativeName:"Svenska"},{tag:"zh-cn",name:"Chinese (Simplified)",nativeName:"简体中文"},{tag:"fr",name:"French",nativeName:"Français"},{tag:"ar",name:"Arabic",nativeName:"العربية",rtl:!0},{tag:"he",name:"Hebrew",nativeName:"עברית",rtl:!0},{tag:"fa",name:"Persian",nativeName:"فارسی",rtl:!0}],Qo=e=>Dt.find(n=>n.tag===e)?.rtl??!1;new Set(Dt.map(e=>e.tag));const gn=e=>{if(typeof navigator>"u")return 0;const t=navigator.languages||[navigator.language];for(let n=0;n<t.length;n++){const r=t[n].toLowerCase();if(r===e)return t.length-n+1;if(r.startsWith(`${e}-`)||e.startsWith(`${r}-`))return t.length-n;const[o]=r.split("-");if(o===e||e.startsWith(`${o}-`))return t.length-n-.5}return 0},vn=(e,t)=>{if(!e)return;const n=t.split(".").filter(Boolean);if(n.length===0)return;let r=e;for(const o of n){if(typeof r!="object"||r===null)return;r=r[o]}return r},pn=(e,t)=>t?e.replaceAll(/\{(\w+)\}/g,(n,r)=>{const o=t[r];return o===void 0?n:String(o)}):e,Jo=e=>{const t=vn(e.primary,e.key);if(typeof t=="string")return pn(t,e.params);const n=vn(e.fallback,e.key);return typeof n=="string"?pn(n,e.params):e.key},rr=Dn(void 0),Zo=async e=>Ae(e).with("en",()=>Promise.resolve(void 0)).with("nl",async()=>Promise.resolve().then(()=>require("./nl-bCeoO8RU.cjs")).then(t=>t.default)).with("es",async()=>Promise.resolve().then(()=>require("./es-B9xaw9fo.cjs")).then(t=>t.default)).with("sv",async()=>Promise.resolve().then(()=>require("./sv-BHh_RkLw.cjs")).then(t=>t.default)).with("fr",async()=>Promise.resolve().then(()=>require("./fr-D54ESMxz.cjs")).then(t=>t.default)).with("zh-cn",async()=>Promise.resolve().then(()=>require("./zh-cn-Bqo3eRaE.cjs")).then(t=>t.default)).with("ar",async()=>Promise.resolve().then(()=>require("./ar-xpXGBcxc.cjs")).then(t=>t.default)).with("he",async()=>Promise.resolve().then(()=>require("./he-BWZyf3Uy.cjs")).then(t=>t.default)).with("fa",async()=>Promise.resolve().then(()=>require("./fa-DCpZYzOX.cjs")).then(t=>t.default)).exhaustive(),Yo=e=>{const{provider:t}=Te(),n=t.storage.getSettings().language,[r,o]=B(n??"en"),[i,a]=B(void 0),[s,l]=B(!1);Z(()=>{let h=!1;(async()=>{l(!0);try{const b=await Zo(r());if(h)return;a(b)}finally{h||l(!1)}})(),Y(()=>{h=!0})});const c=(h,g)=>{const b=Jo({primary:i(),fallback:Ho,key:h,params:g}),p=b.split(`
|
|
7
|
+
`);return p.length<=1?b:$e(()=>p.map((C,k)=>[C,$e(()=>$e(()=>k<p.length-1)()?Xo():null)]))},u=A(()=>Qo(r())),f={languageTag:r,setLanguageTag:h=>{o(h)},isLoadingLanguagePack:s,isRtl:u,t:c};return v(rr.Provider,{value:f,get children(){return e.children}})},U=()=>{const e=Fn(rr);if(!e)throw new Error("TranslationProvider not found");return e},or=Dn(void 0),ei=e=>{const{provider:t,theme:n}=e;return v(or.Provider,{value:{provider:t,themeConfig:n},get children(){return v(Yo,{get children(){return v(kr,{get onClose(){return e.onClose}})}})}})},Te=()=>{const e=Fn(or);if(!e)throw new Error("Modal context not found");return e},He=()=>{const{provider:e}=Te(),t=A(()=>e.getSession(),void 0,{name:"session"}),[n,r]=B(t()?.getState());console.log("session status",n());const o=s=>{console.log("session state change",s),r(s)};Lt(()=>{t()?.emitter.on("state_change",o)}),Y(()=>{t()?.emitter.off("state_change",o)});const i=A(()=>t()?.getHandshakeParameters());return{uri:A(()=>{const s=i();return s?po(s):void 0}),status:n}},ti=()=>{const{provider:e}=Te();return{start:()=>{const t=e.storage.getSettings(),n=t?.signaling?.p,r=n?t?.signaling?.s?.[n]:void 0;if(!n||!r)throw new Error("Invalid protocol or server");return e.createSession({p:n,s:r})}}};var ni=x('<div class="rounded-md bg-(--lv-control-button-secondary-background) p-2 text-(--lv-text-muted)"><div>Unknown state:</div><div>URI:</div><div>Session Status:');const Mt=e=>{const{uri:t,status:n}=He();return console.error("Unknown state:",{state:e.state}),(()=>{var r=ni(),o=r.firstChild;o.firstChild;var i=o.nextSibling;i.firstChild;var a=i.nextSibling;return a.firstChild,m(o,()=>JSON.stringify(e.state),null),m(i,t,null),m(a,()=>JSON.stringify(n()),null),r})()};const Ie={newline:10,reset:27};function ri(e){if(!Number.isSafeInteger(e))throw new Error(`integer expected: ${e}`)}function oi(e){if(!Number.isSafeInteger(e)||e<1||e>40)throw new Error(`Invalid version=${e}. Expected number [1..40]`)}function ke(e,t){return e.toString(2).padStart(t,"0")}function mn(e,t){const n=e%t;return n>=0?n:t+n}function ie(e,t){return new Array(e).fill(t)}function xt(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}function bn(e){let t=0,n=0;for(const i of e)t=Math.max(t,i.length),n+=i.length;const r=new Uint8Array(n);let o=0;for(let i=0;i<t;i++)for(const a of e)i<a.length&&(r[o++]=a[i]);return r}function ii(){let e,t=1/0;return{add(n,r){n>=t||(e=r,t=n)},get:()=>e,score:()=>t}}function yn(e){return Object.freeze({has:t=>e.includes(t),decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})},encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(ri(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})}})}function wn(e){if(e.length!==32)throw new Error("expects 32 element matrix");const t=[1431655765,858993459,252645135,16711935,65535];for(let n=0;n<5;n++){const r=t[n]>>>0,o=1<<n,i=o<<1;for(let a=0;a<32;a+=i)for(let s=0;s<o;s++){const l=a+s,c=l+o,u=e[l]>>>0,d=e[c]>>>0,f=(u>>>o^d)&r;e[l]=(u^f<<o)>>>0,e[c]=(d^f)>>>0}}}const Le=e=>1<<(e&31)>>>0,Ce=(e,t)=>t===0?0:t===32?4294967295:(1<<t)-1<<e>>>0;class V{constructor(t,n){X(this,"defined");X(this,"value");X(this,"tailMask");X(this,"words");X(this,"fullWords");X(this,"height");X(this,"width");const{height:r,width:o}=V.size(t);if(!Number.isSafeInteger(r)||r<=0)throw new Error(`Bitmap: invalid height=${r}, expected positive safe integer dimension`);if(!Number.isSafeInteger(o)||o<=0)throw new Error(`Bitmap: invalid width=${o}, expected positive safe integer dimension`);if(this.height=r,this.width=o,this.tailMask=Ce(0,o&31||32),this.words=Math.ceil(o/32)|0,this.fullWords=Math.floor(o/32)|0,this.value=new Uint32Array(this.words*r),this.defined=new Uint32Array(this.value.length),n){if(n.length!==r)throw new Error(`Bitmap: data height mismatch: exp=${r} got=${n.length}`);for(let i=0;i<r;i++){const a=n[i];if(!a||a.length!==o)throw new Error(`Bitmap: data width mismatch at y=${i}: exp=${o} got=${a?.length}`);for(let s=0;s<o;s++)this.set(s,i,a[s])}}}static size(t,n){if(typeof t=="number"&&(t={height:t,width:t}),!Number.isSafeInteger(t.height)&&t.height!==1/0)throw new Error(`Bitmap: invalid height=${t.height} (${typeof t.height})`);if(!Number.isSafeInteger(t.width)&&t.width!==1/0)throw new Error(`Bitmap: invalid width=${t.width} (${typeof t.width})`);return n!==void 0&&(t={width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)}),t}static fromString(t){t=t.replace(/^\n+/g,"").replace(/\n+$/g,"");const n=t.split(String.fromCharCode(Ie.newline)),r=n.length;let o;const i=[];for(const a of n){const s=a.split("").map(l=>{if(l==="X")return!0;if(l===" ")return!1;if(l!=="?")throw new Error(`Bitmap.fromString: unknown symbol=${l}`)});if(o!==void 0&&s.length!==o)throw new Error(`Bitmap.fromString different row sizes: width=${o} cur=${s.length}`);o=s.length,i.push(s)}return o===void 0&&(o=0),new V({height:r,width:o},i)}point(t){return this.get(t.x,t.y)}isInside(t){return 0<=t.x&&t.x<this.width&&0<=t.y&&t.y<this.height}size(t){if(!t)return{height:this.height,width:this.width};const{x:n,y:r}=this.xy(t);return{height:this.height-r,width:this.width-n}}xy(t){if(typeof t=="number"&&(t={x:t,y:t}),!Number.isSafeInteger(t.x))throw new Error(`Bitmap: invalid x=${t.x}`);if(!Number.isSafeInteger(t.y))throw new Error(`Bitmap: invalid y=${t.y}`);return t.x=mn(t.x,this.width),t.y=mn(t.y,this.height),t}wordIndex(t,n){return n*this.words+(t>>>5)}bitIndex(t,n){return{word:this.wordIndex(t,n),bit:t&31}}isDefined(t,n){const r=this.wordIndex(t,n),o=Le(t);return(this.defined[r]&o)!==0}get(t,n){const r=this.wordIndex(t,n),o=Le(t);return(this.value[r]&o)!==0}maskWord(t,n,r){const{defined:o,value:i}=this;o[t]|=n,i[t]=i[t]&~n|-r&n}set(t,n,r){r!==void 0&&this.maskWord(this.wordIndex(t,n),Le(t),r)}fillRectConst(t,n,r,o,i){if(r<=0||o<=0||i===void 0)return;const{value:a,defined:s,words:l}=this,c=t>>>5,u=t+r-1>>>5,d=t&31,f=t+r-1&31;for(let h=0;h<o;h++){const g=(n+h)*l;if(c===u){const b=Ce(d,f-d+1);this.maskWord(g+c,b,i);continue}this.maskWord(g+c,Ce(d,32-d),i);for(let b=c+1;b<u;b++)s[g+b]=4294967295,a[g+b]=i?4294967295:0;this.maskWord(g+u,Ce(0,f+1),i)}}rectWords(t,n,r,o,i){for(let a=0;a<o;a++){const s=n+a;for(let l=0;l<r;){const c=t+l,{bit:u,word:d}=this.bitIndex(c,s),f=Math.min(32-u,r-l);i(d,c,l,a,f),l+=f}}}rect(t,n,r){const{x:o,y:i}=this.xy(t),{height:a,width:s}=V.size(n,this.size({x:o,y:i}));if(typeof r!="function")return this.fillRectConst(o,i,s,a,r),this;const{defined:l,value:c}=this;return this.rectWords(o,i,s,a,(u,d,f,h,g)=>{let b=0,p=c[u];for(let C=0;C<g;C++){const k=Le(d+C),w=r({x:f+C,y:h},(p&k)!==0);w!==void 0&&(b|=k,p=p&~k|-w&k)}l[u]|=b,c[u]=p}),this}rectRead(t,n,r){const{x:o,y:i}=this.xy(t),{height:a,width:s}=V.size(n,this.size({x:o,y:i})),{value:l}=this;return this.rectWords(o,i,s,a,(c,u,d,f,h)=>{const g=l[c];for(let b=0;b<h;b++){const p=Le(u+b);r({x:d+b,y:f},(g&p)!==0)}}),this}hLine(t,n,r){return this.rect(t,{width:n,height:1},r)}vLine(t,n,r){return this.rect(t,{width:1,height:n},r)}border(t=2,n){if(!Number.isSafeInteger(t)||t<=0)throw new Error(`Bitmap.border: invalid size=${t}`);const r=this.height+2*t,o=this.width+2*t,i=new V({height:r,width:o});return i.rect(0,1/0,n),i.embed({x:t,y:t},this),i}embed(t,n){const{x:r,y:o}=this.xy(t),{height:i,width:a}=V.size(n.size(),this.size({x:r,y:o}));if(a<=0||i<=0)return this;const{value:s,defined:l}=this,{words:c,value:u}=n;for(let d=0;d<i;d++){const f=d*c;for(let h=0;h<a;){const g=r+h,{word:b,bit:p}=this.bitIndex(g,o+d),{word:C,bit:k}=n.bitIndex(h,d),w=Math.min(32-p,a-h),P=u[C],N=k&&C+1<f+c?u[C+1]:0,se=k?(P>>>k|N<<32-k)>>>0:P,W=Ce(p,w),Re=(se&Ce(0,w))<<p>>>0;l[b]|=W,s[b]=s[b]&~W|Re,h+=w}}return this}rectSlice(t,n=this.size()){const{x:r,y:o}=this.xy(t),{height:i,width:a}=V.size(n,this.size({x:r,y:o})),s=new V({height:i,width:a});return this.rectRead({x:r,y:o},{height:i,width:a},(l,c)=>{this.isDefined(r+l.x,o+l.y)&&s.set(l.x,l.y,c)}),s}transpose(){const{height:t,width:n,value:r,defined:o,words:i}=this,a=new V({height:n,width:t}),{words:s,value:l,defined:c,tailMask:u}=a,d=new Uint32Array(32),f=new Uint32Array(32);for(let h=0;h<t;h+=32)for(let g=0;g<i;g++){const b=Math.min(32,t-h);for(let p=0;p<b;p++){const C=this.wordIndex(32*g,h+p);d[p]=r[C],f[p]=o[C]}d.fill(0,b),f.fill(0,b),wn(d),wn(f);for(let p=0;p<32;p++){const C=g*32+p;if(C>=n)break;const k=a.wordIndex(h,C),w=h>>>5===s-1?u:4294967295;l[k]=d[p]&w,c[k]=f[p]&w}}return a}negate(){const t=this.defined.length;for(let n=0;n<t;n++)this.value[n]=~this.value[n],this.defined[n]=4294967295;return this}scale(t){if(!Number.isSafeInteger(t)||t>1024)throw new Error(`invalid scale factor: ${t}`);const{height:n,width:r}=this;return new V({height:t*n,width:t*r}).rect({x:0,y:0},1/0,({x:i,y:a})=>this.get(i/t|0,a/t|0))}clone(){const t=new V(this.size());return t.defined.set(this.defined),t.value.set(this.value),t}assertDrawn(){const{height:t,width:n,defined:r,tailMask:o,fullWords:i,words:a}=this;if(!(!t||!n))for(let s=0;s<t;s++){const l=s*a;for(let c=0;c<i;c++)if(r[l+c]!==4294967295)throw new Error("Invalid color type=undefined");if(a!==i&&(r[l+i]&o)!==o)throw new Error("Invalid color type=undefined")}}countPatternInRow(t,n,...r){if(!Number.isSafeInteger(n)||n<=0||n>=32)throw new Error("wrong patternLen");const o=(1<<n)-1,{height:i,width:a,value:s,words:l}=this;if(!Number.isSafeInteger(t)||t<0||t>=i)return 0;let c=0;const u=this.wordIndex(0,t);for(let d=0,f=0;d<l;d++){const h=s[u+d],g=d===l-1&&a&31||32;for(let b=0;b<g;b++)if(f=(f<<1|h>>>b&1)&o,!(d*32+b+1<n)){for(const p of r)if(f===p){c++;break}}}return c}getRuns(t,n){const{height:r,width:o,value:i,words:a}=this;if(o===0||!Number.isSafeInteger(t)||t<0||t>=r)return;let s=0,l;const c=this.wordIndex(0,t);for(let u=0;u<a;u++){const d=i[c+u],f=u===a-1&&o&31||32;for(let h=0;h<f;h++){const g=(d&1<<h)!==0;if(g===l){s++;continue}l!==void 0&&n(s,l),l=g,s=1}}l!==void 0&&n(s,l)}popcnt(){const{height:t,width:n,words:r,fullWords:o,tailMask:i}=this;if(!t||!n)return 0;let a=0;for(let s=0;s<t;s++){const l=s*r;for(let c=0;c<o;c++)a+=xt(this.value[l+c]);r!==o&&(a+=xt(this.value[l+o]&i))}return a}countBoxes2x2(t){const{height:n,width:r,words:o}=this;if(r<2||!Number.isSafeInteger(t)||t<0||t+1>=n)return 0;const i=this.wordIndex(0,t),a=this.wordIndex(0,t+1),l=(r&31)===0?2147483647:Ce(0,r-1&31);let c=0;for(let u=0;u<o;u++){const d=this.value[i+u],f=this.value[a+u],h=~(d^f)>>>0,g=u+1<o?this.value[i+u+1]>>>0:0,b=~(d^(d>>>1|(g&1)<<31)>>>0)>>>0,p=u+1<o?this.value[a+u+1]>>>0:0,C=~(f^(f>>>1|(p&1)<<31)>>>0)>>>0;let k=(h&b&C)>>>0;u===o-1&&(k&=l),c+=xt(k)}return c}toString(){const t=String.fromCharCode(Ie.newline);let n="";for(let r=0;r<this.height;r++){let o="";for(let i=0;i<this.width;i++){const a=this.get(i,r);o+=this.isDefined(i,r)?a?"X":" ":"?"}n+=o+(r+1===this.height?"":t)}return n}toRaw(){const t=Array.from({length:this.height},()=>new Array(this.width));for(let n=0;n<this.height;n++){const r=t[n];for(let o=0;o<this.width;o++)r[o]=this.get(o,n)}return t}toASCII(){const{height:t,width:n}=this;let r="";for(let o=0;o<t;o+=2){for(let i=0;i<n;i++){const a=this.get(i,o),s=o+1>=t?!0:this.get(i,o+1);!a&&!s?r+="█":!a&&s?r+="▀":a&&!s?r+="▄":a&&s&&(r+=" ")}r+=String.fromCharCode(Ie.newline)}return r}toTerm(){const t=String.fromCharCode(Ie.reset),n=t+"[0m",r=t+"[1;47m "+n,o=t+"[40m "+n,i=String.fromCharCode(Ie.newline);let a="";for(let s=0;s<this.height;s++){for(let l=0;l<this.width;l++){const c=this.get(l,s);a+=c?o:r}a+=i}return a}toSVG(t=!0){let n=`<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`,r="",o;return this.rectRead(0,1/0,(i,a)=>{if(!a)return;const{x:s,y:l}=i;if(!t){n+=`<rect x="${s}" y="${l}" width="1" height="1" />`;return}let c=`M${s} ${l}`;if(o){const d=`m${s-o.x} ${l-o.y}`;d.length<=c.length&&(c=d)}const u=s<10?`H${s}`:"h-1";r+=`${c}h1v1${u}Z`,o=i}),t&&(n+=`<path d="${r}"/>`),n+="</svg>",n}toGIF(){const t=s=>[s&255,s>>>8&255],n=[...t(this.width),...t(this.height)],r=[];this.rectRead(0,1/0,(s,l)=>r.push(+(l===!0)));const o=126,i=[71,73,70,56,55,97,...n,246,0,0,255,255,255,...ie(381,0),44,0,0,0,0,...n,0,7],a=Math.floor(r.length/o);for(let s=0;s<a;s++)i.push(o+1,128,...r.slice(o*s,o*(s+1)).map(l=>+l));return i.push(r.length%o+1,128,...r.slice(a*o).map(s=>+s)),i.push(1,129,0,59),new Uint8Array(i)}toImage(t=!1){const{height:n,width:r}=this.size(),o=new Uint8Array(n*r*(t?3:4));let i=0;for(let a=0;a<n;a++)for(let s=0;s<r;s++){const l=this.get(s,a)?0:255;o[i++]=l,o[i++]=l,o[i++]=l,t||(o[i++]=255)}return{height:n,width:r,data:o}}}const xn=Object.freeze(["low","medium","quartile","high"]),kn=Object.freeze(["numeric","alphanumeric","byte","kanji","eci"]),si=[26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],ai={low:[7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],medium:[10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],quartile:[13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],high:[17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},li={low:[1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],medium:[1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],quartile:[1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],high:[1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},L=Object.freeze({size:Object.freeze({encode:e=>21+4*(e-1),decode:e=>(e-17)/4}),sizeType:e=>Math.floor((e+7)/17),alignmentPatterns(e){if(e===1)return[];const t=6,n=L.size.encode(e)-t-1,r=n-t,o=Math.ceil(r/28);let i=Math.floor(r/o);i%2?i+=1:r%o*2>=o&&(i+=2);const a=[t];for(let s=1;s<o;s++)a.push(n-(o-s)*i);return a.push(n),a},ECCode:Object.freeze({low:1,medium:0,quartile:3,high:2}),formatMask:21522,formatBits(e,t){const n=L.ECCode[e]<<3|t;let r=n;for(let o=0;o<10;o++)r=r<<1^(r>>9)*1335;return(n<<10|r)^L.formatMask},versionBits(e){let t=e;for(let n=0;n<12;n++)t=t<<1^(t>>11)*7973;return e<<12|t},alphabet:Object.freeze({numeric:yn("0123456789"),alphanumerc:yn("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:")}),lengthBits(e,t){return{numeric:[10,12,14],alphanumeric:[9,11,13],byte:[8,16,16],kanji:[8,10,12],eci:[0,0,0]}[t][L.sizeType(e)]},modeBits:Object.freeze({numeric:"0001",alphanumeric:"0010",byte:"0100",kanji:"1000",eci:"0111"}),capacity(e,t){const n=si[e-1],r=ai[t][e-1],o=li[t][e-1],i=Math.floor(n/o)-r,a=o-n%o;return{words:r,numBlocks:o,shortBlocks:a,blockLen:i,capacity:(n-r*o)*8,total:(r+i)*o+o-a}}}),Ft=Object.freeze([(e,t)=>(e+t)%2==0,(e,t)=>t%2==0,(e,t)=>e%3==0,(e,t)=>(e+t)%3==0,(e,t)=>(Math.floor(t/2)+Math.floor(e/3))%2==0,(e,t)=>e*t%2+e*t%3==0,(e,t)=>(e*t%2+e*t%3)%2==0,(e,t)=>((e+t)%2+e*t%3)%2==0]),y={tables:(e=>{const t=ie(256,0),n=ie(256,0);for(let r=0,o=1;r<256;r++)t[r]=o,n[o]=r,o<<=1,o&256&&(o^=e);return{exp:t,log:n}})(285),exp:e=>y.tables.exp[e],log(e){if(e===0)throw new Error(`GF.log: invalid arg=${e}`);return y.tables.log[e]%255},mul(e,t){return e===0||t===0?0:y.tables.exp[(y.tables.log[e]+y.tables.log[t])%255]},add:(e,t)=>e^t,pow:(e,t)=>y.tables.exp[y.tables.log[e]*t%255],inv(e){if(e===0)throw new Error(`GF.inverse: invalid arg=${e}`);return y.tables.exp[255-y.tables.log[e]]},polynomial(e){if(e.length==0)throw new Error("GF.polymomial: invalid length");if(e[0]!==0)return e;let t=0;for(;t<e.length-1&&e[t]==0;t++);return e.slice(t)},monomial(e,t){if(e<0)throw new Error(`GF.monomial: invalid degree=${e}`);if(t==0)return[0];let n=ie(e+1,0);return n[0]=t,y.polynomial(n)},degree:e=>e.length-1,coefficient:(e,t)=>e[y.degree(e)-t],mulPoly(e,t){if(e[0]===0||t[0]===0)return[0];const n=ie(e.length+t.length-1,0);for(let r=0;r<e.length;r++)for(let o=0;o<t.length;o++)n[r+o]=y.add(n[r+o],y.mul(e[r],t[o]));return y.polynomial(n)},mulPolyScalar(e,t){if(t==0)return[0];if(t==1)return e;const n=ie(e.length,0);for(let r=0;r<e.length;r++)n[r]=y.mul(e[r],t);return y.polynomial(n)},mulPolyMonomial(e,t,n){if(t<0)throw new Error("GF.mulPolyMonomial: invalid degree");if(n==0)return[0];const r=ie(e.length+t,0);for(let o=0;o<e.length;o++)r[o]=y.mul(e[o],n);return y.polynomial(r)},addPoly(e,t){if(e[0]===0)return t;if(t[0]===0)return e;let n=e,r=t;n.length>r.length&&([n,r]=[r,n]);let o=ie(r.length,0),i=r.length-n.length,a=r.slice(0,i);for(let s=0;s<a.length;s++)o[s]=a[s];for(let s=i;s<r.length;s++)o[s]=y.add(n[s-i],r[s]);return y.polynomial(o)},remainderPoly(e,t){const n=Array.from(e);for(let r=0;r<e.length-t.length+1;r++){const o=n[r];if(o!==0)for(let i=1;i<t.length;i++)t[i]!==0&&(n[r+i]=y.add(n[r+i],y.mul(t[i],o)))}return n.slice(e.length-t.length+1,n.length)},divisorPoly(e){let t=[1];for(let n=0;n<e;n++)t=y.mulPoly(t,[1,y.pow(2,n)]);return t},evalPoly(e,t){if(t==0)return y.coefficient(e,0);let n=e[0];for(let r=1;r<e.length;r++)n=y.add(y.mul(t,n),e[r]);return n},euclidian(e,t,n){y.degree(e)<y.degree(t)&&([e,t]=[t,e]);let r=e,o=t,i=[0],a=[1];for(;2*y.degree(o)>=n;){let c=r,u=i;if(r=o,i=a,r[0]===0)throw new Error("rLast[0] === 0");o=c;let d=[0];const f=y.inv(r[0]);for(;y.degree(o)>=y.degree(r)&&o[0]!==0;){const h=y.degree(o)-y.degree(r),g=y.mul(o[0],f);d=y.addPoly(d,y.monomial(h,g)),o=y.addPoly(o,y.mulPolyMonomial(r,h,g))}if(d=y.mulPoly(d,i),a=y.addPoly(d,u),y.degree(o)>=y.degree(r))throw new Error(`Division failed r: ${o}, rLast: ${r}`)}const s=y.coefficient(a,0);if(s==0)throw new Error("sigmaTilde(0) was zero");const l=y.inv(s);return[y.mulPolyScalar(a,l),y.mulPolyScalar(o,l)]}};function ci(e){return{encode(t){const n=y.divisorPoly(e),r=Array.from(t);return r.push(...n.slice(0,-1).fill(0)),Uint8Array.from(y.remainderPoly(r,n))},decode(t){const n=t.slice(),r=y.polynomial(Array.from(t));let o=ie(e,0),i=!1;for(let d=0;d<e;d++){const f=y.evalPoly(r,y.exp(d));o[o.length-1-d]=f,f!==0&&(i=!0)}if(!i)return n;o=y.polynomial(o);const a=y.monomial(e,1),[s,l]=y.euclidian(a,o,e),c=ie(y.degree(s),0);let u=0;for(let d=1;d<256&&u<c.length;d++)y.evalPoly(s,d)===0&&(c[u++]=y.inv(d));if(u!==c.length)throw new Error("RS.decode: invalid errors number");for(let d=0;d<c.length;d++){const f=n.length-1-y.log(c[d]);if(f<0)throw new Error("RS.decode: invalid error location");const h=y.inv(c[d]);let g=1;for(let b=0;b<c.length;b++)d!==b&&(g=y.mul(g,y.add(1,y.mul(c[b],h))));n[f]=y.add(n[f],y.mul(y.evalPoly(l,h),y.inv(g)))}return n}}}function di(e,t){const{words:n,shortBlocks:r,numBlocks:o,blockLen:i,total:a}=L.capacity(e,t),s=ci(n);return{encode(l){const c=[],u=[];for(let g=0;g<o;g++){const b=g<r,p=i+(b?0:1);c.push(l.subarray(0,p)),u.push(s.encode(l.subarray(0,p))),l=l.subarray(p)}const d=bn(c),f=bn(u),h=new Uint8Array(d.length+f.length);return h.set(d),h.set(f,d.length),h},decode(l){if(l.length!==a)throw new Error(`interleave.decode: len(data)=${l.length}, total=${a}`);const c=[];for(let f=0;f<o;f++){const h=f<r;c.push(new Uint8Array(n+i+(h?0:1)))}let u=0;for(let f=0;f<i;f++)for(let h=0;h<o;h++)c[h][f]=l[u++];for(let f=r;f<o;f++)c[f][i]=l[u++];for(let f=i;f<i+n;f++)for(let h=0;h<o;h++){const g=h<r;c[h][f+(g?0:1)]=l[u++]}const d=[];for(const f of c)d.push(...Array.from(s.decode(f)).slice(0,-n));return Uint8Array.from(d)}}}function ui(e,t,n,r=!1){const o=L.size.encode(e);let i=new V(o+2);const a=new V(3).rect(0,3,!0).border(1,!1).border(1,!0).border(1,!1);i=i.embed(0,a).embed({x:-a.width,y:0},a).embed({x:0,y:-a.height},a),i=i.rectSlice(1,o);const s=new V(1).rect(0,1,!0).border(1,!1).border(1,!0),l=L.alignmentPatterns(e);for(const c of l)for(const u of l)i.isDefined(u,c)||i.embed({x:u-2,y:c-2},s);i=i.hLine({x:0,y:6},1/0,({x:c})=>i.isDefined(c,6)?void 0:c%2==0).vLine({x:6,y:0},1/0,({y:c})=>i.isDefined(6,c)?void 0:c%2==0);{const c=L.formatBits(t,n),u=d=>!r&&(c>>d&1)==1;for(let d=0;d<6;d++)i.set(8,d,u(d));for(let d=6;d<8;d++)i.set(8,d+1,u(d));for(let d=8;d<15;d++)i.set(8,o-15+d,u(d));for(let d=0;d<8;d++)i.set(o-d-1,8,u(d));for(let d=8;d<9;d++)i.set(15-d-1+1,8,u(d));for(let d=9;d<15;d++)i.set(15-d-1,8,u(d));i.set(8,o-8,!r)}if(e>=7){const c=L.versionBits(e);for(let u=0;u<18;u+=1){const d=!r&&(c>>u&1)==1,f=Math.floor(u/3),h=u%3+o-8-3;i.set(h,f,d),i.set(f,h,d)}}return i}function fi(e,t,n){const r=e,o=r.height,i=Ft[t];let a=-1,s=o-1;for(let l=o-1;l>0;l-=2){for(l==6&&(l=5);;s+=a){for(let c=0;c<2;c+=1){const u=l-c;r.isDefined(u,s)||n(u,s,i(u,s))}if(s+a<0||s+a>=o)break}a=-a}}function hi(e){let t="numeric";for(let n of e)if(!L.alphabet.numeric.has(n)&&(t="alphanumeric",!L.alphabet.alphanumerc.has(n)))return"byte";return t}function gi(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Cn(e,t,n,r,o=gi){let i="",a=n.length;if(r==="numeric"){const f=L.alphabet.numeric.decode(n.split("")),h=f.length;for(let g=0;g<h-2;g+=3)i+=ke(f[g]*100+f[g+1]*10+f[g+2],10);h%3===1?i+=ke(f[h-1],4):h%3===2&&(i+=ke(f[h-2]*10+f[h-1],7))}else if(r==="alphanumeric"){const f=L.alphabet.alphanumerc.decode(n.split("")),h=f.length;for(let g=0;g<h-1;g+=2)i+=ke(f[g]*45+f[g+1],11);h%2==1&&(i+=ke(f[h-1],6))}else if(r==="byte"){const f=o(n);a=f.length,i=Array.from(f).map(h=>ke(h,8)).join("")}else throw new Error("encode: unsupported type");const{capacity:s}=L.capacity(e,t),l=ke(a,L.lengthBits(e,r));let c=L.modeBits[r]+l+i;if(c.length>s)throw new Error("Capacity overflow");c+="0".repeat(Math.min(4,Math.max(0,s-c.length))),c.length%8&&(c+="0".repeat(8-c.length%8));const u="1110110000010001";for(let f=0;c.length!==s;f++)c+=u[f%u.length];const d=Uint8Array.from(c.match(/(.{8})/g).map(f=>+`0b${f}`));return di(e,t).encode(d)}function Sn(e,t,n,r,o=!1){const i=ui(e,t,r,o);let a=0;const s=8*n.length;if(fi(i,r,(l,c,u)=>{let d=!1;a<s&&(d=(n[a>>>3]>>(7-a&7)&1)!==0,a++),i.set(l,c,d!==u)}),a!==s)throw new Error("QR: bytes left after draw");return i}const ir=e=>{const t=e.map(n=>n?"1":"0").join("");return{len:t.length,n:+`0b${t}`}},sr=[!0,!1,!0,!0,!0,!1,!0],ar=[!1,!1,!1,!1],Ze=ir([...sr,...ar]),An=ir([...ar,...sr]);function vi(e){const t=e,{width:n,height:r}=t,o=t.transpose();let i=0;for(let f=0;f<r;f++)t.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});for(let f=0;f<n;f++)o.getRuns(f,h=>{h>=5&&(i+=3+(h-5))});let a=0;for(let f=0;f<r-1;f++)a+=3*t.countBoxes2x2(f);let s=0;for(let f=0;f<r;f++)s+=40*t.countPatternInRow(f,Ze.len,Ze.n,An.n);for(let f=0;f<n;f++)s+=40*o.countPatternInRow(f,Ze.len,Ze.n,An.n);const l=r*n,c=t.popcnt(),d=10*Math.ceil(Math.max(0,Math.abs(c*100-l*50)-l*5)/(l*5));return i+a+s+d}function pi(e,t,n,r){if(r===void 0){const o=ii();for(let i=0;i<Ft.length;i++)o.add(vi(Sn(e,t,n,i,!0)),i);r=o.get()}if(r===void 0)throw new Error("Cannot find mask");return Sn(e,t,n,r)}function mi(e){if(!xn.includes(e))throw new Error(`Invalid error correction mode=${e}. Expected: ${xn}`)}function bi(e){if(!kn.includes(e))throw new Error(`Encoding: invalid mode=${e}. Expected: ${kn}`);if(e==="kanji"||e==="eci")throw new Error(`Encoding: ${e} is not supported (yet?).`)}function yi(e){if(![0,1,2,3,4,5,6,7].includes(e)||!Ft[e])throw new Error(`Invalid mask=${e}. Expected number [0..7]`)}function wi(e,t="raw",n={}){const r=n,o=r.ecc!==void 0?r.ecc:"medium";mi(o);const i=r.encoding!==void 0?r.encoding:hi(e);bi(i),r.mask!==void 0&&yi(r.mask);let a=r.version,s,l=new Error("Unknown error");if(a!==void 0)oi(a),s=Cn(a,o,e,i,r.textEncoder);else for(let d=1;d<=40;d++)try{s=Cn(d,o,e,i,r.textEncoder),a=d;break}catch(f){l=f}if(!a||!s)throw l;let c=pi(a,o,s,r.mask);c.assertDrawn();const u=r.border===void 0?2:r.border;if(!Number.isSafeInteger(u)||u<=0)throw new Error(`invalid border=${u}`);if(c=c.border(u,!1),r.scale!==void 0&&(c=c.scale(r.scale)),t==="raw")return c.toRaw();if(t==="ascii")return c.toASCII();if(t==="svg")return c.toSVG(r.optimize);if(t==="gif")return c.toGIF();if(t==="term")return c.toTerm();throw new Error(`Unknown output: ${t}`)}const lr=async e=>{if(!e)return!1;try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(t){console.error("Failed to copy to clipboard",t)}try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.append(t),t.focus(),t.select();const n=document.execCommand("copy");return t.remove(),n}catch{return!1}};var xi=x('<div class="flex flex-col items-center gap-4 px-2"><div class="w-full space-y-4 rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-card-background) p-4"><div class=w-full><button type=button class="w-full cursor-pointer rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-4 py-2 text-sm text-(--lv-text-primary) transition hover:bg-(--lv-control-button-secondary-hoverBackground) active:bg-(--lv-control-button-secondary-activeBackground)"></button></div></div><div class="w-full text-sm text-(--lv-text-secondary)"><span>'),ki=x('<div class="relative mx-auto flex w-fit items-center justify-center rounded-lg border border-(--lv-control-button-secondary-border) bg-(--lv-qr-background) p-2"><button type=button class="h-[200px] w-[200px] cursor-pointer rounded bg-(--lv-qr-background) text-(--lv-qr-color)">');const Ci=e=>wi(e,"svg",{optimize:!0,encoding:"byte",border:2}),Si=()=>{const{t:e}=U(),{uri:t}=He(),n=()=>{const r=t();r&&lr(r)};return(()=>{var r=xi(),o=r.firstChild,i=o.firstChild,a=i.firstChild,s=o.nextSibling,l=s.firstChild;return m(o,v(de,{get when(){return t()},children:c=>(()=>{var u=ki(),d=u.firstChild;return d.$$click=n,I(f=>{var h=String(e("handshake.clickToCopyUrl")),g=Ci(c());return h!==f.e&&q(d,"title",f.e=h),g!==f.t&&(d.innerHTML=f.t=g),f},{e:void 0,t:void 0}),u})()}),i),a.$$click=n,m(a,()=>e("handshake.copyConnectionUrl")),m(l,()=>e("handshake.scanCodeInstruction")),r})()};ye(["click"]);var Ai=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),$n=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),$i=x("<div>");const En=()=>Ai(),Ei=()=>{const{status:e}=He(),{t}=U();return(()=>{var n=$i();return m(n,v(Xn,{get children(){return[v(Se,{get when(){return[Je.CREATED,Je.SIGNALING].includes(e()?.status??"")},get children(){var r=$n(),o=r.firstChild,i=o.firstChild,a=i.nextSibling;return m(r,v(En,{}),o),m(i,()=>t("connectionFlow.connecting")),m(a,()=>t("connectionFlow.waitingForNetwork")),r}}),v(Se,{get when(){return e()?.status===Je.READY},get children(){return v(Si,{})}}),v(Se,{get when(){return e()?.status===Je.LINKING},get children(){var r=$n(),o=r.firstChild,i=o.firstChild,a=i.nextSibling;return m(r,v(En,{}),o),m(i,()=>t("connectionFlow.establishingConnection")),m(a,()=>t("connectionFlow.mayTakeFewSeconds")),r}})]}})),n})()};var Ti=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><div class="mb-4 text-4xl">⚠️</div><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="mb-2 text-(--lv-text-muted) text-sm"></p></div><div class="flex w-full flex-col gap-2"><button type=button class="w-full rounded-lg bg-(--lv-control-button-primary-background) px-4 py-2 font-semibold text-(--lv-control-button-primary-color, var(--lv-text-primary)) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)"></button><button type=button class="w-full rounded-lg bg-(--lv-control-button-secondary-background) px-4 py-2 font-semibold text-(--lv-text-primary) text-sm transition hover:bg-(--lv-control-button-primary-background-hover)">');const _i=e=>{const{t}=U(),{provider:n}=Te(),r=A(()=>n.getState().error??n.getState().session?.error),o=A(()=>/ice candidates/i.test(r()??"")),i=A(()=>o()?t("connectionFlow.errorNoIce"):r()??t("connectionFlow.errorGeneric")),a=()=>{n.closeSession()};return(()=>{var s=Ti(),l=s.firstChild,c=l.firstChild,u=c.nextSibling,d=u.nextSibling,f=l.nextSibling,h=f.firstChild,g=h.nextSibling;return m(u,()=>t("connectionFlow.connectionFailed")),m(d,i),h.$$click=a,m(h,()=>t("connectionFlow.tryAgain")),ft(g,"click",e.onClose,!0),m(g,()=>t("common.close")),s})()};ye(["click"]);var Ni=x('<div class="flex items-center justify-center"><div class="h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent">'),Tn=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><h3 class="mb-2 font-semibold text-(--lv-text-primary) text-lg"></h3><p class="text-(--lv-text-muted) text-sm">'),Mi=x("<div class=w-full style=view-transition-name:connection-flow>"),Pi=x('<div class="mb-4 text-4xl">✅'),Ri=x('<div class="mb-4 flex flex-col items-center gap-2"><span class="font-medium text-(--lv-text-primary) text-sm">'),Bi=x("<div class=text-4xl>✅"),Oi=x('<img alt class="h-12 w-12 rounded-xl">');const Ii=()=>Ni(),Li=e=>{const{t}=U(),{provider:n}=Te(),[r,o]=B(n.getState().status),i=()=>n.getSession()?.getState().peerInfo,a=()=>{const s=i()?.icon;return s&&(s.startsWith("data:image/")||s.startsWith("https://"))?s:void 0};return Lt(()=>{n.on("status_change",o)}),Y(()=>{n.off("status_change",o)}),(()=>{var s=Mi();return m(s,v(Xn,{get fallback(){return v(Mt,{get state(){return r()}})},get children(){return[v(Se,{get when(){return r()===J.CREATING},get children(){var l=Tn(),c=l.firstChild,u=c.firstChild,d=u.nextSibling;return m(l,v(Ii,{}),c),m(u,()=>t("connectionFlow.preparingConnection")),m(d,()=>t("connectionFlow.generatingKeys")),l}}),v(Se,{get when(){return r()===J.CONNECTING},get children(){return v(Ei,{get onClose(){return e.onClose}})}}),v(Se,{get when(){return r()===J.CONNECTED},get children(){var l=Tn(),c=l.firstChild,u=c.firstChild,d=u.nextSibling;return m(c,v(de,{get when(){return i()},get fallback(){return Pi()},children:f=>(()=>{var h=Ri(),g=h.firstChild;return m(h,v(de,{get when(){return a()},get fallback(){return Bi()},children:b=>(()=>{var p=Oi();return I(()=>q(p,"src",b())),p})()}),g),m(g,()=>f().name),h})()}),u),m(u,()=>t("connectionFlow.connectedSuccessfully")),m(d,()=>t("connectionFlow.walletConnectedReady")),l}}),v(Se,{get when(){return r()===J.ERROR},get children(){return v(_i,{get onClose(){return e.onClose}})}})]}})),s})()};var ji={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Ne=ji,Vi=x("<svg>"),Di=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Fi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),zi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),_n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ui=e=>{const t=zi(e);return t.charAt(0).toUpperCase()+t.slice(1)},Wi=e=>{const[t,n]=ut(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var r=Vi();return at(r,z(Ne,{get width(){return t.size??Ne.width},get height(){return t.size??Ne.height},get stroke(){return t.color??Ne.stroke},get"stroke-width"(){return $e(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Ne["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??Ne["stroke-width"])},get class(){return Fi("lucide","lucide-icon",...t.name!=null?[`lucide-${_n(Ui(t.name))}`,`lucide-${_n(t.name)}`]:[],t.class!=null?t.class:"")},get"aria-hidden"(){return!t.children&&!Di(n)?"true":void 0}},n),!0,!0),m(r,v(me,{get each(){return t.iconNode},children:([o,i])=>v(go,z({component:o},i))})),r})()},we=Wi,Gi=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qi=e=>v(we,z(e,{iconNode:Gi,name:"chevron-left"})),Ki=qi,Hi=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xi=e=>v(we,z(e,{iconNode:Hi,name:"chevron-right"})),Qi=Xi,Ji=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Zi=e=>v(we,z(e,{iconNode:Ji,name:"circle-question-mark"})),cr=Zi,Yi=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],es=e=>v(we,z(e,{iconNode:Yi,name:"plus"})),ts=es,ns=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],rs=e=>v(we,z(e,{iconNode:ns,name:"qr-code"})),os=rs,is=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ss=e=>v(we,z(e,{iconNode:is,name:"settings"})),as=ss,ls=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cs=e=>v(we,z(e,{iconNode:ls,name:"trash-2"})),ds=cs,us=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fs=e=>v(we,z(e,{iconNode:us,name:"x"})),hs=fs,gs=Array.isArray,dr=e=>{if(!e&&e!==0&&e!==0n)return"";if(typeof e=="string")return e;if(typeof e=="number")return e!==e?"":""+e;if(typeof e=="bigint")return""+e;let t="";if(gs(e)){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(!o&&o!==0&&o!==0n)continue;const i=typeof o=="string"?o:dr(o);i&&(t&&(t+=" "),t+=i)}return t}if(typeof e=="object")for(const n in e)e[n]&&(t&&(t+=" "),t+=n);return t},vs=/\s+/g,Pt=Array.isArray,ps=e=>typeof e!="string"||!e?e:e.replace(vs," ").trim(),ms=e=>{const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0),r=e.charCodeAt(t-1);if(n===32||r===32||n>=9&&n<=13||n===160||r>=9&&r<=13||r===160)return!0;for(let o=0;o<t;o++){const i=e.charCodeAt(o);if(i>=9&&i<=13||i===160||i===32&&o+1<t&&e.charCodeAt(o+1)===32)return!0}return!1},Ve=(...e)=>{const t=dr(e);if(t)return ms(t)?ps(t):t},Rt=e=>e===!1?"false":e===!0?"true":e===0?"0":e,ve=e=>{if(!e||typeof e!="object")return!0;for(const t in e)return!1;return!0},bs=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;const n=e,r=t,o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;for(let a=0;a<o.length;a++){const s=o[a];if(!i.includes(s)||n[s]!==r[s])return!1}return!0},ys=(e,t)=>{const n=e;for(const r in t)if(Object.hasOwn(t,r)){const o=t[r];r in n?n[r]=Ve(n[r],o):n[r]=o}return e},ur=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];Pt(r)?ur(r,t):r&&t.push(r)}},Bt=(...e)=>{const t=[];ur(e,t);const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},zt=(e,t)=>{const n=e,r=t,o={};for(const i in n){const a=n[i];if(i in r){const s=r[i];Pt(a)||Pt(s)?o[i]=Bt(s,a):typeof a=="object"&&typeof s=="object"&&a&&s?o[i]=zt(a,s):o[i]=s+" "+a}else o[i]=a}for(const i in r)i in n||(o[i]=r[i]);return o},ws={twMerge:!0,twMergeConfig:{}},xs=256,ks=128,Ee=Symbol("tv-cache-miss"),Cs=e=>e?.class!=null&&e.class!==""||e?.className!=null&&e.className!=="",Nn=e=>{if(e===void 0)return"";if(e===null)return"null";if(typeof e=="string")return e;if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number")return e===0?"0":String(e);if(typeof e=="bigint")return String(e);const t=Rt(e),n=typeof t;if(n==="string"||n==="number"||n==="boolean"||n==="bigint")return String(t);if(n==="object")try{return JSON.stringify(t)}catch{return null}return null},Me=(e,t)=>{if(t===void 0)return e;if(t===null)return e+"null";const n=typeof t;if(n==="string"||n==="number"||n==="boolean"||n==="bigint")return e+String(t);if(Array.isArray(t))return e+t.join("\0");try{return e+JSON.stringify(t)}catch{return e+"?"}},fr=(e,t,n,r)=>{let o="";const i=Object.create(null);for(let s=0;s<e.length;s++){const l=e[s];i[l]=1;let c=t[l];n&&n[l]!==void 0&&(c=n[l]),r&&r[l]!==void 0&&(c=r[l]);const u=Nn(c);if(u===null)return null;o+=l+":"+u+";"}const a=[];for(const s in t)s==="class"||s==="className"||i[s]||(i[s]=1,a.push(s));if(n)for(const s in n)s==="class"||s==="className"||i[s]||n[s]===void 0||(i[s]=1,a.push(s));if(r)for(const s in r)s==="class"||s==="className"||i[s]||r[s]===void 0||(i[s]=1,a.push(s));a.length>1&&a.sort();for(let s=0;s<a.length;s++){const l=a[s];let c=t[l];n&&n[l]!==void 0&&(c=n[l]),r&&r[l]!==void 0&&(c=r[l]);const u=Nn(c);if(u===null)return null;o+=l+":"+u+";"}return o},hr=(e,t)=>{let n="";for(let r=0;r<e.length;r++){const{conditionKeys:o,source:i}=e[r];for(let a=0;a<o.length;a++){const s=o[a];n+=s+"=",n=Me(n,i[s]),n+=","}n+="c=",n=Me(n,i.class),n+="|cn=",n=Me(n,i.className),n+=";"}for(let r=0;r<t.length;r++){const{conditionKeys:o,source:i}=t[r];for(let a=0;a<o.length;a++){const s=o[a];n+=s+"=",n=Me(n,i[s]),n+=","}Array.isArray(i.slots)&&(n+="slots="+i.slots.join(",")+","),n+="c=",n=Me(n,i.class),n+="|cn=",n=Me(n,i.className),n+=";"}return n},gr=(e=xs)=>{let t=new Map,n=null;return{get(r){let o=t.get(r);return o!==void 0||t.has(r)?o:n&&(o=n.get(r),o!==void 0||n.has(r))?(t.set(r,o),o):Ee},set(r,o){t.size>=e&&(n=t,t=new Map),t.set(r,o)}}},Ss=(e=ks)=>{let t=new Map,n=null,r=0;return{get(o,i){const a=t.get(o);if(a){const s=a.get(i);if(s!==void 0||a.has(i))return s}if(n){const s=n.get(o);if(s){const l=s.get(i);if(l!==void 0||s.has(i)){let c=t.get(o);return c||(c=new Map,t.set(o,c)),c.has(i)||r++,c.set(i,l),l}}}return Ee},set(o,i,a){r>=e&&(n=t,t=new Map,r=0);let s=t.get(o);s||(s=new Map,t.set(o,s)),s.has(i)||r++,s.set(i,a)}}},Ut=(e,t)=>{let n=null;return(r,o)=>{if(!Cs(o))return r;const i=o.class,a=o.className;if(i!=null&&i!==""&&typeof i!="string"||a!=null&&a!==""&&typeof a!="string")return e(t,r,i,a);n??(n=Ss());const s=r??"",l=(typeof i=="string"?i:"")+"\0"+(typeof a=="string"?a:""),c=n.get(s,l);if(c!==Ee)return c;const u=e(t,r,i,a);return n.set(s,l,u),u}};function As(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(r){e=r},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(r){t=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){e=null,t={},n=!1}}}var kt=As(),$s=e=>{!ve(e.twMergeConfig)&&!bs(e.twMergeConfig,kt.cachedTwMergeConfig)&&(kt.didTwMergeConfigChange=!0,kt.cachedTwMergeConfig=e.twMergeConfig)},Es=(e,t)=>{const n=[];for(let r=0;r<t.length;r++){const o=t[r],i=e[o];n.push({key:o,values:i,isEmpty:ve(i)})}return n},Ts=e=>{if(!Array.isArray(e)||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=[];for(const i in r)i!=="class"&&i!=="className"&&o.push(i);t.push({conditionKeys:o,source:r})}return t},_s=e=>{if(!Array.isArray(e)||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=[];for(const i in r)i!=="slots"&&i!=="class"&&i!=="className"&&o.push(i);t.push({conditionKeys:o,source:r})}return t},Ns=e=>{const t={};for(let n=0;n<e.length;n++){const r=e[n],o=r.source.slots;if(Array.isArray(o))for(let i=0;i<o.length;i++){const a=o[i];t[a]||(t[a]=[]),t[a].push(r)}}return t},Ms=(e,t)=>{const{extend:n=null,slots:r={},variants:o={},compoundVariants:i=[],compoundSlots:a=[],defaultVariants:s={}}=e,l={...ws,...t},c=e.slots!==void 0,u=n?.base?Ve(n.base,e?.base):e?.base,d=n?.variants&&!ve(n.variants)?zt(o,n.variants):o,f=n?.defaultVariants&&!ve(n.defaultVariants)?{...n.defaultVariants,...s}:s;$s(l);const h=!n?.slots||ve(n.slots),g=c?h&&n?.base?Ve(e?.base,n.base):typeof e?.base=="string"||e?.base==null?e.base:Ve(e.base):void 0,b=c?{base:g,...r}:{},p=h?b:ys({...n?.slots},ve(b)?{base:e?.base}:b),C=!n?.compoundVariants||ve(n.compoundVariants)?i:Bt(n?.compoundVariants,i),k=!n?.compoundSlots||ve(n.compoundSlots)?a:Bt(n?.compoundSlots,a),w=Object.keys(d),P=C&&!Array.isArray(C)?new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof C}`):k&&!Array.isArray(k)?new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof k}`):null,N=c||!h?"slots":w.length===0?"plain":"variants";return{config:l,extend:n,base:u,variants:d,defaultVariants:f,slots:p,compoundVariants:C,compoundSlots:k,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:P,mode:N,slotKeys:null,variantKeys:w}},vr=e=>(e.compiledVariants!==null||(e.compiledVariants=Es(e.variants,e.variantKeys),e.compiledCompoundVariants=Ts(e.compoundVariants),e.compiledCompoundSlots=_s(e.compoundSlots),e.compiledCompoundSlotsBySlot=Ns(e.compiledCompoundSlots),e.slotKeys=e.slots&&typeof e.slots=="object"?Object.keys(e.slots):[]),e),Ot=[],pr=[],Ps=[],Rs=[],Bs=[],mr=(e,t,n)=>{const r={};for(const o in e)r[o]=e[o];if(t)for(const o in t)t[o]!==void 0&&(r[o]=t[o]);if(n)for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r},Ye=e=>e==null||e===!1,Os=(e,t)=>{if(!Array.isArray(e))return e===t||Ye(e)&&Ye(t);for(let n=0;n<e.length;n++){const r=e[n];if(r===t||Ye(r)&&Ye(t))return!0}return!1},br=(e,t,n,r)=>{if(e.isEmpty)return null;const o=r?.[e.key]??n?.[e.key];if(o===null)return null;const i=Rt(o);if(typeof i=="object")return null;const a=t?.[e.key],s=i??Rt(a);return e.values[s||"false"]},Wt=(e,t)=>{const{conditionKeys:n,source:r}=e;for(let o=0;o<n.length;o++){const i=n[o];if(!Os(r[i],t[i]))return!1}return!0},Mn=(e,t,n)=>{typeof n=="string"?t==="base"&&e.push(n):n&&typeof n=="object"&&n[t]&&e.push(n[t])},Is=(e,t,n)=>{const r=pr;r.length=0;for(let o=0;o<e.length;o++){const i=br(e[o],t,n);i&&r.push(i)}return r},Ls=(e,t,n,r,o)=>{const i=pr;i.length=0;for(let a=0;a<t.length;a++){const s=br(t[a],n,r,o),l=e==="base"&&typeof s=="string"?s:s&&s[e];l&&i.push(l)}return i},js=(e,t)=>{const n=Ps;n.length=0;for(let r=0;r<e.length;r++){const o=e[r];Wt(o,t)&&(o.source.class&&n.push(o.source.class),o.source.className&&n.push(o.source.className))}return n},Vs=(e,t,n)=>{const r=Rs;r.length=0;for(let o=0;o<t.length;o++){const i=t[o];Wt(i,n)&&(Mn(r,e,i.source.class),Mn(r,e,i.source.className))}return r},Ds=(e,t)=>{const n=Bs;n.length=0;for(let r=0;r<e.length;r++){const o=e[r];Wt(o,t)&&(o.source.class&&n.push(o.source.class),o.source.className&&n.push(o.source.className))}return n},Fs=(e,t)=>{const{base:n,config:r}=e;let o=Ee;const i=Ut(t,r);return(a=>(o===Ee&&(o=t(r,n)),i(o,a)))},zs=(e,t)=>{const{base:n,config:r,defaultVariants:o,deferredError:i,variantKeys:a}=e;let s=e.compiledCompoundVariants,l=e.compiledVariants,c=Ot,u=null;const d=Ut(t,r);let f=1;const h=g=>{const b=s.length>0?js(s,mr(o,g)):void 0;return t(r,n,Is(l,o,g),b)};return(g=>{if(i)throw i;(l===null||s===null)&&(vr(e),l=e.compiledVariants,s=e.compiledCompoundVariants,c=e.compiledCompoundSlots??Ot);let b;if(f>0)f--,b=h(g);else{u??(u=gr());const p=fr(a,o,g);if(p!==null){const C=s.length>0||c.length>0?hr(s,c):"",k=p+"#"+C,w=u.get(k);w!==Ee?b=w:(b=h(g),u.set(k,b))}else b=h(g)}return d(b,g)})},Us=(e,t)=>{const{config:n,defaultVariants:r,deferredError:o,slots:i,variantKeys:a}=e;let s,l="",c=!1,u=1,d=null;return(f=>{if(o)throw o;if(d===null){(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&vr(e);const h=e.compiledVariants,g=e.compiledCompoundVariants,b=e.compiledCompoundSlots,p=e.compiledCompoundSlotsBySlot,C=e.slotKeys,k=g.length>0||b.length>0;let w=null;const P=Ut(t,n),N={};for(let se=0;se<C.length;se++){const W=C[se],Re=p[W]??Ot,Be=(ee,ae)=>{const G=k?mr(r,ee,ae):void 0,te=G?Vs(W,g,G):void 0,ne=G?Ds(Re,G):void 0;return t(n,i[W],Ls(W,h,r,ee,ae),te,ne)};N[W]=ee=>{const ae=s;let G;if(!c)G=Be(ae,ee);else{w??(w=gr());const te=fr(a,r,ae,ee);if(te!==null){const ne=W+"|"+te+"#"+l,le=w.get(ne);le!==Ee?G=le:(G=Be(ae,ee),w.set(ne,G))}else G=Be(ae,ee)}return P(G,ee)}}d=N}if(s=f,u>0)u--,c=!1,l="";else{c=!0;const h=e.compiledCompoundVariants,g=e.compiledCompoundSlots;l=h&&g&&(h.length>0||g.length>0)?hr(h,g):""}return d})},Ws=(e,t)=>{if(e.mode==="plain")return Fs(e,t);let n;return(r=>(n??(n=e.mode==="slots"?Us(e,t):zs(e,t)),n(r)))},Gs=(e,t)=>{e.variantKeys=t.variantKeys,e.extend=t.extend,e.base=t.base,e.slots=t.slots,e.variants=t.variants,e.defaultVariants=t.defaultVariants,e.compoundSlots=t.compoundSlots,e.compoundVariants=t.compoundVariants},qs=e=>{const t=(r,o)=>{const i=Ms(r,o),a=Ws(i,e);return Gs(a,i),a};return{tv:t,createTV:r=>(o,i)=>t(o,i?zt(r,i):r)}},Ks=(e,...t)=>Ve(t)||void 0,Hs=qs(Ks),gt=Hs.tv,Xs=x("<a>"),Qs=x("<button type=button>");const Pn=gt({base:"flex items-center justify-center rounded-lg transition-all duration-100 cursor-pointer active:scale-95",variants:{$variant:{primary:"font-semibold text-sm bg-(--lv-control-button-primary-background) text-(--lv-control-button-primary-color) border-(--lv-control-button-primary-border) hover:bg-(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background)) active:bg-(--lv-control-button-primary-activeBackground,var(--lv-control-button-primary-hoverBackground,var(--lv-control-button-primary-background))) disabled:bg-(--lv-control-button-primary-disabledBackground,var(--lv-control-button-primary-background)) disabled:text-(--lv-control-button-primary-disabledColor,var(--lv-control-button-primary-color))",secondary:"border bg-(--lv-control-button-secondary-background) text-(--lv-control-button-secondary-color) border-(--lv-control-button-secondary-border,var(--lv-control-button-secondary-background)) hover:bg-(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background)) active:bg-(--lv-control-button-secondary-activeBackground,var(--lv-control-button-secondary-hoverBackground,var(--lv-control-button-secondary-background))) disabled:bg-(--lv-control-button-secondary-disabledBackground,var(--lv-control-button-secondary-background)) disabled:text-(--lv-control-button-secondary-disabledColor,var(--lv-control-button-secondary-color))",tertiary:"bg-transparent text-(--lv-text-muted) hover:bg-(--lv-control-button-tertiary-hoverBackground,transparent) active:bg-(--lv-control-button-tertiary-activeBackground,var(--lv-control-button-tertiary-hoverBackground,transparent)) disabled:text-(--lv-control-button-tertiary-disabledColor,var(--lv-text-muted))"},$size:{sm:"h-6",md:"h-8",lg:"h-11"},$aspect:{square:"aspect-square",auto:""}},defaultVariants:{$size:"md",$variant:"primary",$aspect:"auto"}}),Pe=e=>{const[t,n]=ut(e,["children","class","$variant","$size","$aspect","href","onClick"]);return t.href?(()=>{var r=Xs();return at(r,z({get href(){return t.href},get onClick(){return t.onClick},get class(){return pe(Pn({$variant:t.$variant,$size:t.$size,$aspect:t.$aspect}),t.class)}},n),!1,!0),m(r,()=>t.children),r})():(()=>{var r=Qs();return at(r,z({get onClick(){return t.onClick},get class(){return pe(Pn({$variant:t.$variant,$size:t.$size,$aspect:t.$aspect}),t.class)}},n),!1,!0),m(r,()=>t.children),r})()};var Js=x('<div class="flex h-full w-full justify-between"><div class="grow py-1 ps-1"><div class="h-full rounded-sm border border-gray-300 bg-gray-400"></div></div><div class="flex h-full w-3 flex-col items-center justify-center gap-0.5 pr-0.5">'),Zs=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-500">'),Ys=x('<div class="flex h-full w-full flex-col justify-between"><div class="grow px-1 pt-1"><div class="h-full rounded-sm border border-gray-200 bg-gray-300"></div></div><div class="flex h-3 w-full items-center justify-center gap-0.5 pb-0.5">'),ea=x('<div class="h-1.5 w-1.5 rounded-full border border-gray-400">'),ta=x('<div class="-space-x-4 flex items-end"><div class="h-38 w-48 overflow-hidden rounded-lg bg-gray-300"></div><div class="h-18 w-12 overflow-hidden rounded-lg bg-gray-200">');const yr=e=>e?1:3,na=e=>(()=>{var t=Js(),n=t.firstChild,r=n.nextSibling;return m(r,v(me,{get each(){return Array.from({length:yr(e.isApple)})},children:()=>Zs()})),t})(),ra=e=>(()=>{var t=Ys(),n=t.firstChild,r=n.nextSibling;return m(r,v(me,{get each(){return Array.from({length:yr(e.isApple)})},children:()=>ea()})),t})(),oa=()=>(()=>{var t=ta(),n=t.firstChild,r=n.nextSibling;return m(n,v(na,{isApple:!0})),m(r,v(ra,{isApple:!0})),t})();var ia=x('<div class="flex flex-col items-center gap-4 p-6"><div class=text-center><p class="text-sm text-(--lv-text-secondary)"></p></div><div class="flex items-center">');const sa=e=>{const{t}=U(),{start:n}=ti();return(()=>{var r=ia(),o=r.firstChild,i=o.firstChild,a=o.nextSibling;return m(r,v(oa,{}),o),m(i,()=>t("disconnected.prompt")),m(a,v(Pe,{type:"button",onClick:n,class:"z-10 px-6 py-3",$variant:"primary",$size:"lg",get children(){return t("disconnected.generateQr")}}),null),m(a,v(Pe,{type:"button",get"aria-label"(){return String(t("disconnected.connectionSettings"))},"aria-pressed":!1,get onClick(){return e.onSettings},class:"px-3 ltr:-ml-1 ltr:rounded-l-none rtl:-mr-1 rtl:rounded-r-none",$aspect:"square",$size:"lg",$variant:"secondary",get children(){return v(as,{class:"h-5 w-5 text-(--lv-text-muted)"})}}),null),r})()};var aa=x('<div class="flex flex-col space-y-2 px-4 text-start"><div class="min-h-32 w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class="flex justify-center items-center grow"></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class></div></div><div class="w-full rounded-md border border-(--lv-control-button-secondary-border) md:flex justify-start divide-y md:divide-y-0 md:divide-x divide-(--lv-control-button-secondary-border)"><div class="p-2 w-full md:w-3/5"></div><div class>');const la=()=>{const{t:e}=U();return(()=>{var t=aa(),n=t.firstChild,r=n.firstChild,o=r.nextSibling,i=n.nextSibling,a=i.firstChild,s=i.nextSibling,l=s.firstChild;return m(r,()=>e("info.scanQrCode")),m(o,v(os,{class:"w-10 h-10"})),m(a,()=>e("info.approveOnDevice")),m(l,()=>e("info.youreConnected")),t})()},It=(e,{duration:t=200}={})=>{const n=typeof e=="function"?e:()=>e,r=n(),[o,i]=B(r),[a,s]=B(void 0);let l,c=r;return Z(()=>{const u=n();Object.is(u,c)||(l&&globalThis.clearTimeout(l),s(()=>c),i(()=>u),c=u,l=globalThis.setTimeout(()=>{s(()=>{}),l=void 0},t),Y(()=>{l&&globalThis.clearTimeout(l)}))}),{current:o,previous:a,isTransitioning:()=>a()!==void 0}},Xe=()=>{const{provider:e}=Te(),[t,n]=B(e.storage.getSettings()),r=u=>{n(u),e.storage.setSettings(u)};return{settings:t,setSettings:r,setLanguage:u=>{r({...t(),language:u})},setThemeMode:u=>{r({...t(),theme:u})},setSignalingProtocol:u=>{r({...t(),signaling:{p:u,s:t()?.signaling?.s??{}}})},setSignalingOptions:u=>{const d=t()?.signaling?.p;if(!d)return;const f=t()?.signaling?.s??{};r({...t(),signaling:{p:d,s:{...f,[d]:u.url}}})},setRetainSessionHistory:u=>{r({...t(),retainHistory:u})},setAutoReconnect:u=>{r({...t(),autoReconnect:u})}}},wr=()=>{const{settings:e}=Xe(),t=A(()=>e().theme),n=A(()=>"light");return{theme:t,mode:n}},xr="data:image/webp;base64,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";var ca=x('<div class="group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-(--lv-control-button-secondary-background)"><div class="pointer-events-none whitespace-nowrap rounded-md text-xs opacity-0 group-hover:opacity-100"></div><div>');const da=()=>{const{t:e}=U(),{status:t}=He(),n=A(()=>{const r=t()?.status,o=t()?.signaling?.state;return Ae({sessionState:r,signalState:o}).with({sessionState:"connected"},()=>({icon:"✅",text:e("status.connectedSuccessfully")})).with({sessionState:"signaling",signalState:"standby"},()=>({icon:"🫥",text:e("status.connecting")})).with({sessionState:"signaling",signalState:"connecting"},()=>({icon:"↗️",text:e("status.connecting")})).with({sessionState:"signaling",signalState:"ready"},()=>({icon:"👋",text:e("status.ready")})).with({sessionState:"signaling",signalState:"handshake"},()=>({icon:"🤝",text:e("status.handshakeClosed")})).with({sessionState:"signaling",signalState:"handshake-partial"},()=>({icon:"🤝",text:e("status.handshakePartial")})).with({sessionState:"signaling",signalState:"encrypted"},()=>({icon:"🔒",text:e("status.encrypted")})).with({sessionState:"signaling",signalState:"error"},()=>({icon:"❌",text:e("status.signalError")})).otherwise(()=>{})});return v(de,{get when(){return n()},children:r=>(()=>{var o=ca(),i=o.firstChild,a=i.nextSibling;return m(i,()=>r().text),m(a,()=>r().icon),o})()})};var ua=x('<div class="h-11 w-full">'),fa=x('<div class="absolute inset-x-0 bottom-0 flex items-end justify-between gap-2 px-3 py-2 text-(--lv-text-muted)"><a href=https://github.com/open-lavatory/open-lavatory target=_blank rel=noreferrer class="flex items-center gap-2 p-1 font-semibold text-sm text-(--lv-text-muted)"><img alt="Open Lavatory Logo"width=20 height=20 class=rounded data-openlv-brand-logo><span>openlv</span></a><div class="text-sm text-(--lv-text-muted)">');const ha=()=>[ua(),(()=>{var e=fa(),t=e.firstChild,n=t.firstChild,r=t.nextSibling;return q(n,"src",xr),m(r,v(da,{})),e})()];var ga=x('<div class="flex items-center justify-between px-2 py-2"><h2 class="flex items-center justify-center gap-2 font-semibold text-(--lv-text-primary) text-lg">');const va=e=>{const{t}=U();return(()=>{var n=ga(),r=n.firstChild;return m(n,(()=>{var o=$e(()=>!!e.onBack);return()=>o()?v(Pe,{get onClick(){return e.onBack},get"aria-label"(){return String(e.view==="settings"?t("modal.backToQr"):t("modal.closeModal"))},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(Ki,{class:"h-6 w-6 text-(--lv-text-muted) rtl:rotate-180"})}}):v(Pe,{type:"button",onClick:()=>e.setView("info"),$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(cr,{class:"h-5 w-5"})}})})(),r),m(r,()=>e.title),m(n,v(Pe,{type:"button",get"aria-label"(){return String(t("common.close"))},"aria-pressed":!1,get onClick(){return e.onClose},$variant:"tertiary",$aspect:"square",$size:"md",get children(){return v(hs,{class:"h-6 w-6 text-(--lv-text-muted)"})}}),null),n})()},pa=(e,{transitionDuration:t=200}={})=>{const[n,r]=B([e]),[o,i]=B(0),a=A(()=>n()[o()]??e),{current:s,previous:l,isTransitioning:c}=It(a,{duration:t});return{screen:s,previousScreen:l,isTransitioning:c,navigate:f=>{const h=o(),g=n(),b=g[h];if(Object.is(b,f))return;const p=g.slice(0,h+1);p.push(f),r(p),i(p.length-1)},goBack:()=>{i(f=>Math.max(0,f-1))},isAtRoot:()=>o()===0}};var ma=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),ba=x("<div><div>");const ya=e=>(()=>{var t=ba(),n=t.firstChild;return m(t,v(de,{get when(){return e.previous!==void 0},get children(){var r=ma();return m(r,()=>e.render(e.previous)),r}}),n),m(n,()=>e.render(e.current)),I(r=>{var o=pe("modal-transition__container",e.class),i=pe("modal-transition__layer",e.isTransitioning&&"modal-transition__layer--incoming");return o!==r.e&&Q(t,r.e=o),i!==r.t&&Q(n,r.t=i),r},{e:void 0,t:void 0}),t})();var wa=x('<div><div class="flex items-end justify-between py-1 pl-2"><div class="font-medium text-(--lv-text-primary) text-sm"></div><div></div></div><div class="flex flex-col gap-1 rounded-md bg-(--lv-card-background)">');const We=e=>(()=>{var t=wa(),n=t.firstChild,r=n.firstChild,o=r.nextSibling,i=n.nextSibling;return m(r,()=>e.title),m(o,()=>e.right),m(i,()=>e.children),t})();var xa=x('<div class="flex items-baseline justify-between gap-2 px-2 py-1 first:pt-2 last:pb-2"><div class="text-sm text-(--lv-text-secondary) text-start"></div><div>');const Ge=e=>(()=>{var t=xa(),n=t.firstChild,r=n.nextSibling;return m(n,()=>e.label),m(r,()=>e.children),t})();var ka=x("<select>"),Ca=x("<div>"),Sa=x("<button type=button>"),Aa=x("<option>");const $a=gt({slots:{root:"flex overflow-hidden rounded-md border border-(--lv-control-button-secondary-border)",box:"px-4 py-2 font-semibold text-xs transition border-l first:border-l-0 border-(--lv-control-button-secondary-border)"},variants:{active:{on:{box:"bg-(--lv-control-button-secondary-background) text-(--lv-text-primary)"},off:{box:"bg-transparent text-(--lv-text-secondary) cursor-pointer"}}},defaultVariants:{active:"off"}}),Ea=gt({base:"w-full rounded-md border border-(--lv-control-button-secondary-border) bg-(--lv-control-button-secondary-background) px-3 py-2 font-semibold text-xs text-(--lv-text-primary) cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--lv-control-button-primary-background) appearance-none bg-[url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23888%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E')] bg-[length:14px] bg-[right_8px_center] bg-no-repeat pr-8"}),vt=e=>{const t=Ea(),{root:n,box:r}=$a({});return v(de,{get when(){return e.options.length>(e.dropdownThreshold??3)},get fallback(){return(()=>{var o=Ca();return m(o,v(me,{get each(){return e.options},children:([i,a])=>(()=>{var s=Sa();return s.$$click=()=>e.onChange(i),m(s,a),I(l=>{var c=i===e.value,u=r({active:i===e.value?"on":"off"});return c!==l.e&&q(s,"aria-pressed",l.e=c),u!==l.t&&Q(s,l.t=u),l},{e:void 0,t:void 0}),s})()})),I(()=>Q(o,n())),o})()},get children(){var o=ka();return o.addEventListener("change",i=>e.onChange(i.currentTarget.value)),Q(o,t),m(o,v(me,{get each(){return e.options},children:([i,a])=>(()=>{var s=Aa();return s.value=i,m(s,a),s})()})),I(()=>o.value=e.value),o}})};ye(["click"]);const Ta=()=>{const{t:e}=U(),t=wr(),n=()=>t.mode()==="auto",r=()=>t.mode()==="auto"?"system":t.mode(),o=i=>{};return v(de,{get when(){return n()},get children(){return v(Ge,{get label(){return e("settings.theme.mode")},get children(){return v(vt,{get options(){return[["light",e("settings.theme.light")],["dark",e("settings.theme.dark")],["system",e("settings.theme.system")]]},get value(){return r()},onChange:i=>o()})}})}})},_a=()=>{const{t:e,languageTag:t,setLanguageTag:n}=U(),{settings:r,setLanguage:o}=Xe(),i=A(()=>[...Dt].sort((s,l)=>{const c=gn(s.tag);return gn(l.tag)-c})),a=s=>{const l=s;n(l),o(l)};return v(We,{get title(){return e("settings.appearance")},get children(){return[v(Ge,{get label(){return e("settings.language")},get children(){return v(vt,{get options(){return i().map(s=>[s.tag,s.nativeName])},get value(){return r()?.language||t()},onChange:a})}}),v(Ta,{})]}})};var Na=x("<div><div></div><div>"),Ma=x("<div>Text");const Pa=gt({slots:{root:"group relative",box:"cursor-pointer rounded-md transition-colors flex items-center justify-center hover:[background-color:var(--lv-control-button-tertiary-hoverBackground)] text-(--lv-text-muted)",popover:"-translate-x-1/2 absolute top-full left-1/2 z-10 hidden rounded-md shadow-sm group-hover:block border border-(--lv-control-button-secondary-border) bg-(--lv-body-background) px-2 py-1.5 text-(--lv-text-primary) text-sm",icon:""},variants:{size:{sm:{box:"h-5 w-5 p-1",icon:"h-3 w-3"},md:{box:"h-6 w-6 p-1",icon:"h-4 w-4"},lg:{box:"h-8 w-8 p-1.5",icon:"h-4 w-4"}},variant:{icon:"",text:""}},defaultVariants:{size:"lg"}}),Rn=e=>{const t=z({variant:"icon",size:"lg"},e),{root:n,box:r,popover:o,icon:i}=Pa({size:t.size,variant:t.variant});return(()=>{var a=Na(),s=a.firstChild,l=s.nextSibling;return m(s,()=>Ae(t.variant).with("icon",()=>v(cr,{get class(){return i()}})).with("text",()=>Ma()).exhaustive()),m(l,()=>t.children),I(c=>{var u=n(),d=r(),f=o();return u!==c.e&&Q(a,c.e=u),d!==c.t&&Q(s,c.t=d),f!==c.a&&Q(l,c.a=f),c},{e:void 0,t:void 0,a:void 0}),a})()};var Ra=x('<span class="text-sm text-(--lv-text-muted)">'),Ba=x('<button type=button class="flex w-full cursor-pointer items-center justify-between gap-2 first:rounded-t-sm last:rounded-b-sm px-2 py-1 first:pt-1.5 last:pb-2 hover:bg-(--lv-control-button-tertiary-hoverBackground)"><div class="text-sm text-(--lv-text-secondary) flex items-center gap-1"></div><div class="flex items-center gap-1">');const Bn=e=>(()=>{var t=Ba(),n=t.firstChild,r=n.nextSibling;return ft(t,"click",e.onClick,!0),m(n,()=>e.label),m(r,v(de,{get when(){return e.value},get children(){var o=Ra();return m(o,()=>e.value),o}}),null),m(r,v(Qi,{class:"h-4 w-4 text-(--lv-text-muted) rtl:rotate-180"}),null),t})();ye(["click"]);const Oa=e=>{const{t}=U();return v(vt,{get options(){return[["true",String(t("common.yes"))],["false",String(t("common.no"))]]},get value(){return e.value?"true":"false"},onChange:n=>e.onChange(n==="true")})},Ia=e=>{const{t}=U(),{settings:n,setRetainSessionHistory:r,setAutoReconnect:o}=Xe();return v(We,{get title(){return t("settings.connectionPreferences.title")},get children(){return[v(Bn,{get label(){return[$e(()=>t("settings.signaling.title")),v(Rn,{variant:"icon",get children(){return t("settings.signaling.description")}})]},onClick:()=>e.onNavigate("signaling"),get value(){return n()?.signaling?.p}}),v(Bn,{get label(){return[$e(()=>t("settings.transport.title")),v(Rn,{variant:"icon",get children(){return t("settings.transport.description")}})]},onClick:()=>e.onNavigate("transport"),value:"WebRTC"}),v(me,{get each(){return[[t("settings.connectionPreferences.retainSessionHistory"),n()?.retainHistory??!1,r],[t("settings.connectionPreferences.autoReconnect"),n()?.autoReconnect??!1,o]]},children:([i,a,s])=>v(Ge,{label:i,get children(){return v(Oa,{label:i,value:a,onChange:s})}})})]}})};var La=x('<input class="h-9 w-full rounded-lg border bg-white px-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 text-(--lv-text-primary) bg-(--lv-body-background) border-(--lv-control-input-border)">');const je=e=>{const t=z({readOnly:!0},e),[n]=ut(t,["id","value","placeholder","ariaLabel","readOnly","onChange"]);return(()=>{var r=La();return r.$$input=o=>{n.onChange?.(o.currentTarget.value)},I(o=>{var i=n.id,a=n.placeholder,s=n.ariaLabel,l=n.readOnly;return i!==o.e&&q(r,"id",o.e=i),a!==o.t&&q(r,"placeholder",o.t=a),s!==o.a&&q(r,"aria-label",o.a=s),l!==o.o&&(r.readOnly=o.o=l),o},{e:void 0,t:void 0,a:void 0,o:void 0}),I(()=>r.value=n.value),r})()};ye(["input"]);var ja=x('<div><div class="p-2 text-sm text-(--lv-text-secondary) text-start">');const Va=["mqtt","ntfy","gun"],Da=()=>{const{t:e}=U(),{settings:t,setSignalingProtocol:n,setSignalingOptions:r}=Xe(),o=A(()=>t()?.signaling?.p),i=A(()=>{const a=o();return a?t()?.signaling?.s?.[a]??"":""});return(()=>{var a=ja(),s=a.firstChild;return m(a,v(We,{get title(){return e("settings.signaling.title")},get children(){return[v(Ge,{get label(){return e("common.protocol")},get children(){return v(vt,{get options(){return Va.map(l=>[l.toLowerCase(),l.toUpperCase()])},get value(){return o()??""},onChange:l=>n(l)})}}),v(Ge,{get label(){return e("settings.signaling.server")},get children(){return v(je,{id:"server",get value(){return i()},onChange:l=>r({url:l}),get placeholder(){return String(e("settings.signaling.serverUrl"))},get ariaLabel(){return String(e("settings.signaling.serverUrl"))},readOnly:!1})}})]}}),s),m(s,()=>e("settings.signaling.description")),a})()};var Fa=x('<div class="flex items-center gap-2"><div class=flex-1>'),za=x('<button type=button class="flex w-full cursor-pointer items-center justify-center gap-1 rounded-md border border-dashed border-(--lv-control-input-border) py-2 text-sm text-(--lv-text-muted) hover:bg-(--lv-card-background)">'),Ua=x('<div class="flex flex-col gap-2 p-2">'),Wa=x('<div class="flex flex-col gap-3 p-2">'),Ga=x('<div class="p-2 text-sm text-(--lv-text-secondary) text-start">'),qa=x('<div class="flex flex-col gap-2 rounded-md border border-(--lv-control-input-border) p-2"><div class="grid grid-cols-2 gap-2">');const On=e=>(()=>{var t=Fa(),n=t.firstChild;return m(n,()=>e.children),m(t,v(Pe,{get onClick(){return e.onRemove},$variant:"tertiary",$aspect:"square",$size:"sm",get children(){return v(ds,{class:"h-4 w-4 text-(--lv-text-muted)"})}}),null),t})(),In=e=>(()=>{var t=za();return ft(t,"click",e.onClick,!0),m(t,v(ts,{class:"h-4 w-4"}),null),m(t,()=>e.label,null),t})(),Ka=()=>{const{t:e}=U();Xe();const[t,n]=B([]),[r,o]=B([]),i=()=>{o([...r(),""])},a=d=>{o(r().filter((f,h)=>h!==d))},s=(d,f)=>{o(r().map((h,g)=>g===d?f:h))},l=()=>{n([...t(),{urls:""}])},c=d=>{n(t().filter((f,h)=>h!==d))},u=(d,f,h)=>{n(t().map((g,b)=>b===d?{...g,[f]:h}:g))};return[v(We,{get title(){return e("settings.transport.iceServers.stun")},get children(){var d=Ua();return m(d,v(me,{get each(){return r()},children:(f,h)=>v(On,{onRemove:()=>a(h()),get children(){return v(je,{value:f,onChange:g=>s(h(),g),placeholder:"stun:stun.l.google.com:19302",readOnly:!1})}})}),null),m(d,v(In,{get label(){return e("settings.transport.iceServers.addStun")},onClick:i}),null),d}}),v(We,{get title(){return e("settings.transport.iceServers.turn")},get children(){var d=Wa();return m(d,v(me,{get each(){return t()},children:(f,h)=>(()=>{var g=qa(),b=g.firstChild;return m(g,v(On,{onRemove:()=>c(h()),get children(){return v(je,{get value(){return f.urls},onChange:p=>u(h(),"urls",p),placeholder:"turn:relay.example.com:443",readOnly:!1})}}),b),m(b,v(je,{get value(){return f.username??""},onChange:p=>u(h(),"username",p),placeholder:"Username",readOnly:!1}),null),m(b,v(je,{get value(){return f.credential??""},onChange:p=>u(h(),"credential",p),placeholder:"Password",readOnly:!1}),null),g})()}),null),m(d,v(In,{get label(){return e("settings.transport.iceServers.addTurn")},onClick:l}),null),d}}),(()=>{var d=Ga();return m(d,()=>e("settings.transport.description")),d})()]};ye(["click"]);var Ha=x('<div class="px-4 pb-2">');const Xa=e=>{switch(e){case"main":return"settings.title";case"signaling":return"settings.signaling.title";case"transport":return"settings.transport.title"}},Qa=e=>{const{screen:t,previousScreen:n,isTransitioning:r,navigate:o,goBack:i,isAtRoot:a}=pa("main"),s={goBack:i,get isAtRoot(){return a()}};Z(()=>{e.navigationRef&&(e.navigationRef.current=s)}),Z(()=>{e.onTitleChange?.(Xa(t()))});const l=c=>{switch(c){case"main":return[v(Ia,{onNavigate:o}),v(_a,{})];case"signaling":return v(Da,{});case"transport":return v(Ka,{})}};return(()=>{var c=Ha();return m(c,v(ya,{get current(){return t()},get previous(){return n()},get isTransitioning(){return r()},render:l})),c})()};var Ja=x("<div class=modal-transition__container><div>"),Za=x('<div class="modal-transition__layer modal-transition__layer--outgoing">'),Ya=x('<div class="fixed inset-0 z-10000 flex animate-[bg-in_0.15s_ease-in-out] items-end justify-center md:items-center lg:p-4"role=presentation data-openlv-modal-root><div role=dialog aria-modal=true><div><div class=modal-transition__container><div><div class="flex flex-col text-center"></div></div></div></div><div>');const el=()=>{const[e,t]=B("start"),[n,r]=B(!1);return Z(()=>{if(!n())return;const o=globalThis.setTimeout(()=>r(!1),2e3);Y(()=>globalThis.clearTimeout(o))}),{view:e,setView:t,copied:n,setCopied:r}},tl=e=>{Z(()=>{const t=n=>{n.key==="Escape"&&e()};document.addEventListener("keydown",t),Y(()=>document.removeEventListener("keydown",t))})},nl=()=>{const[e,t]=B(),[n,r]=B(0),o=(a,s=!1)=>{const l=a||e();if(!l||!l.getBoundingClientRect)return;const c=s?l.scrollHeight:l.getBoundingClientRect().height;c>0&&r(u=>typeof u=="number"&&Math.abs(u-c)<.5?u:c)};Z(()=>{const a=e();if(!a||typeof ResizeObserver>"u")return;const s=new ResizeObserver(()=>{o()});s.observe(a),Y(()=>s.disconnect())});const i=()=>o();return Z(()=>{globalThis.window!==void 0&&(window.addEventListener("resize",i),Y(()=>window.removeEventListener("resize",i)))}),{setContentRef:t,contentNode:e,height:n,measureHeight:o}},kr=e=>{const{view:t,setView:n,copied:r,setCopied:o}=el(),{uri:i,status:a}=He(),{provider:s}=Te(),{setContentRef:l,contentNode:c,height:u,measureHeight:d}=nl(),{current:f,previous:h,isTransitioning:g}=It(t),{current:b,previous:p,isTransitioning:C}=It(a),k=()=>n("settings"),{t:w,isRtl:P,languageTag:N}=U(),se=wr(),W={current:null},[Re,Be]=B("settings.title"),ee=A(()=>Ae(t()).with("start",()=>w("start.title")).with("settings",()=>w(Re())).with("info",()=>w("info.title")).exhaustive());tl(e.onClose),Z(()=>{a()?.status===J.CONNECTED&&e.onClose()});const ae=async()=>{const $=i();$&&await lr($)&&o(!0)};let G=!0,te,ne,le;const[Sr,Gt]=B(!1);Z(()=>{b(),f(),c()&&(G?(te&&globalThis.clearTimeout(te),te=globalThis.setTimeout(()=>{c()&&(d(void 0,!0),G=!1)},0)):d(),Y(()=>{te&&globalThis.clearTimeout(te)}))}),Z(()=>{const $=u();ne!==void 0&&$!==ne&&$>0&&ne>0&&Math.abs($-ne)>.5&&(Gt(!0),le&&globalThis.clearTimeout(le),le=globalThis.setTimeout(()=>{Gt(!1),le=void 0},200)),ne=$,Y(()=>{le&&globalThis.clearTimeout(le)})});const[pt,qt]=B(s.getState().status);Lt(()=>{s.on("status_change",qt)}),Y(()=>{s.off("status_change",qt)});const Ar=A(()=>!(t()==="start"&&pt()===J.STANDBY)),$r=()=>{Ae({view:t(),status:pt()}).with({view:"start",status:J.STANDBY},()=>{}).with({view:"start"},()=>{s.closeSession()}).with({view:"settings"},()=>{W.current&&!W.current.isAtRoot?W.current.goBack():n("start")}).with({view:"info"},()=>{n("start")}).otherwise(()=>{s.closeSession(),e.onClose()})},Kt=$=>Ae($).with("start",()=>v(sa,{onSettings:k})).with("settings",()=>v(Qa,{onTitleChange:Be,navigationRef:W})).with("info",()=>v(la,{})).otherwise(()=>v(Mt,{state:$})),Er=()=>(()=>{var $=Ja(),H=$.firstChild;return m($,v(de,{get when(){return h()},children:xe=>(()=>{var Oe=Za();return m(Oe,()=>Kt(xe())),Oe})()}),H),m(H,()=>Kt(f())),I(()=>Q(H,pe("modal-transition__layer",g()&&"modal-transition__layer--incoming"))),$})(),Tr=$=>Ae($).with(J.STANDBY,()=>Er()).with(Mo.union(J.CREATING,J.CONNECTING,J.CONNECTED,J.ERROR),()=>v(Li,{get onClose(){return e.onClose},onCopy:ae})).otherwise(H=>v(Mt,{state:H||"unknown status"})),_r={background:"var(--lv-overlay-background, rgba(0,0,0,0.3))","backdrop-filter":"var(--lv-overlay-backdrop-filter, blur(4px))"},Nr={background:"var(--lv-body-background)",color:"var(--lv-body-color, var(--lv-text-primary))","border-radius":"var(--lv-border-radius, 16px)","box-shadow":"var(--lv-modal-shadow, 0px 12px 32px rgba(0,0,0,0.25))"};return(()=>{var $=Ya(),H=$.firstChild,xe=H.firstChild,Oe=xe.firstChild,Ht=Oe.firstChild,Mr=Ht.firstChild,Xt=xe.nextSibling;return $.$$mouseup=_=>{_.target===_.currentTarget&&e.onClose()},At($,_r),H.$$click=_=>_.stopPropagation(),Qn(l,xe),m(xe,v(va,{get title(){return String(ee())},get view(){return t()},get onClose(){return e.onClose},get onBack(){return Ar()?$r:void 0},setView:n}),Oe),m(Mr,()=>Tr(pt())),m(xe,v(ha,{}),null),m(Xt,()=>w("modal.urlCopied")),I(_=>{var Qt=se.mode(),Jt=N(),Zt=P()?"rtl":"ltr",Yt=pe("relative w-full max-w-[400px] animate-[fade-in_0.15s_ease-in-out] transition-[height] duration-200 ease-out",Sr()||p()?"overflow-hidden":void 0),en=String(ee()),Pr={...typeof u()=="number"&&u()>0?{height:`${u()}px`}:{},...Nr},tn=pe("modal-transition__layer",C()&&"modal-transition__layer--incoming"),nn=pe("absolute top-5 rounded-lg bg-blue-500 px-4 py-3 font-medium text-sm text-white transition-all ltr:right-5 rtl:left-5",r()?"translate-x-0 opacity-100":"opacity-0 ltr:translate-x-full rtl:-translate-x-full");return Qt!==_.e&&q($,"data-openlv-theme-mode",_.e=Qt),Jt!==_.t&&q($,"lang",_.t=Jt),Zt!==_.a&&q($,"dir",_.a=Zt),Yt!==_.o&&Q(H,_.o=Yt),en!==_.i&&q(H,"aria-label",_.i=en),_.n=At(H,Pr,_.n),tn!==_.s&&Q(Ht,_.s=tn),nn!==_.h&&Q(Xt,_.h=nn),_},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),$})()};ye(["mouseup","click"]);const rl=(...e)=>console.log("%c[modal]%c","color: yellow; font-weight: bold","color: inherit; font-weight: normal",...e),Cr=(e="openlv-modal")=>{if(globalThis.window===void 0)return e;const t=globalThis.customElements;return t?(t.get(e)||t.define(e,ht),e):(console.warn("OpenLV modal: custom elements are not supported in this environment."),e)},ol=e=>{const t=document.querySelector("openlv-modal");if(t&&t.remove(),!t){Cr();const n=new ht({onClose(){rl("modal closed"),n.remove(),e.onClose?.()},provider:e.provider,theme:e.theme});document.body.append(n)}};exports.ModalRoot=kr;exports.OPENLV_ICON_128=xr;exports.OpenLVModalElement=ht;exports.default=ht;exports.registerOpenLVModal=Cr;exports.triggerOpenModal=ol;
|
|
8
8
|
//# sourceMappingURL=index.cjs.js.map
|