@sockethub/examples 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +165 -0
- package/README.md +174 -0
- package/build/_app/env.js +1 -0
- package/build/_app/immutable/assets/0.JUA-HkH6.css +1 -0
- package/build/_app/immutable/assets/sockethub.Bpv0Wt6b.css +1 -0
- package/build/_app/immutable/chunks/B-2myMF5.js +1 -0
- package/build/_app/immutable/chunks/BBdxXcNs.js +23 -0
- package/build/_app/immutable/chunks/BhL0iima.js +4 -0
- package/build/_app/immutable/chunks/BnKTx64M.js +1 -0
- package/build/_app/immutable/chunks/BqKPKu0n.js +1 -0
- package/build/_app/immutable/chunks/Br1aAxXP.js +1 -0
- package/build/_app/immutable/chunks/C1LF9VyP.js +1 -0
- package/build/_app/immutable/chunks/CARmnL8B.js +1 -0
- package/build/_app/immutable/chunks/CC-fhLYv.js +1 -0
- package/build/_app/immutable/chunks/CFHe0i8O.js +1 -0
- package/build/_app/immutable/chunks/Cf7Xaqef.js +1 -0
- package/build/_app/immutable/chunks/Ciq9INsC.js +1 -0
- package/build/_app/immutable/chunks/CoHdmBcD.js +1 -0
- package/build/_app/immutable/chunks/D_xw8KSE.js +1 -0
- package/build/_app/immutable/chunks/DqdrLdzV.js +2 -0
- package/build/_app/immutable/chunks/P3PHXZz3.js +2 -0
- package/build/_app/immutable/entry/app.DgSDqHHR.js +2 -0
- package/build/_app/immutable/entry/start.CTdg5BqQ.js +1 -0
- package/build/_app/immutable/nodes/0.i_jJRDZB.js +39 -0
- package/build/_app/immutable/nodes/1.BlhUuP-P.js +1 -0
- package/build/_app/immutable/nodes/2.CggxtO4e.js +5 -0
- package/build/_app/immutable/nodes/3.1s4AoiT3.js +1 -0
- package/build/_app/immutable/nodes/4.Ck-0hor4.js +1 -0
- package/build/_app/immutable/nodes/5.BV2I1j0o.js +1 -0
- package/build/_app/immutable/nodes/6.PZ-pmrq7.js +1 -0
- package/build/_app/immutable/nodes/7.C7IiHO6h.js +1 -0
- package/build/_app/version.json +1 -0
- package/build/config.json +9 -0
- package/build/dummy.html +38 -0
- package/build/favicon.ico +0 -0
- package/build/feed.xml +29 -0
- package/build/feeds.html +38 -0
- package/build/index.html +38 -0
- package/build/irc.html +38 -0
- package/build/metadata.html +38 -0
- package/build/sockethub-logo.svg +147 -0
- package/build/xmpp.html +38 -0
- package/package.json +63 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var vr=Object.defineProperty;var _r=(n,e,t)=>e in n?vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Je=(n,e,t)=>_r(n,typeof e!="symbol"?e+"":e,t);import{j as Wn,k as br,f as ie,a as F,s as fe,c as Te,t as fs,d as hs}from"./DqdrLdzV.js";import"./BnKTx64M.js";import{y as xt,L as ds,R as et,A as be,aQ as $e,M as Tt,g as K,a1 as mr,O as wr,P as Er,Q as Yn,S as ft,B as ze,ay as mn,b2 as xr,aJ as Xn,q as kr,b4 as Ne,z as rn,D as Or,X as Gn,V as ps,b0 as wn,ae as Sr,b5 as Ar,b6 as Rr,b7 as Tr,v as gs,x as ys,b8 as Gt,aY as Nt,a$ as Nr,w as Cr,b9 as vs,ai as Mr,ba as Br,t as de,W as Lr,bb as Ir,b3 as Pr,aZ as Dr,bc as jr,p as Pe,s as W,c as B,r as R,n as _s,a as De,f as pe,bd as Ur,be as Hr,b as Ke,m as Jt,e as qr,d as bt,u as Ve,ag as Jn}from"./Ciq9INsC.js";import{w as En,g as Fr,c as Vr,a as Kr}from"./CARmnL8B.js";import{i as bs}from"./B-2myMF5.js";import{b as zr,s as Wr,i as ge,l as Ct,p as We,d as Yr}from"./Cf7Xaqef.js";import{s as Xr,a as xn,d as Gr,C as Jr}from"./P3PHXZz3.js";function on(n,e){return e}function Qr(n,e,t){for(var s=[],r=e.length,o,a=e.length,f=0;f<r;f++){let d=e[f];ys(d,()=>{if(o){if(o.pending.delete(d),o.done.add(d),o.pending.size===0){var b=n.outrogroups;an(wn(o.done)),b.delete(o),b.size===0&&(n.outrogroups=null)}}else a-=1},!1)}if(a===0){var c=s.length===0&&t!==null;if(c){var p=t,u=p.parentNode;Nr(u),u.append(p),n.items.clear()}an(e,!c)}else o={pending:new Set(e),done:new Set},(n.outrogroups??(n.outrogroups=new Set)).add(o)}function an(n,e=!0){for(var t=0;t<n.length;t++)Cr(n[t],e)}var Qn;function cn(n,e,t,s,r,o=null){var a=n,f=new Map,c=(e&vs)!==0;if(c){var p=n;a=be?et($e(p)):p.appendChild(xt())}be&&Tt();var u=null,d=mr(()=>{var g=t();return Sr(g)?g:g==null?[]:wn(g)}),b,k=!0;function T(){_.fallback=u,$r(_,b,a,e,s),u!==null&&(b.length===0?(u.f&Ne)===0?gs(u):(u.f^=Ne,lt(u,null,a)):ys(u,()=>{u=null}))}var O=ds(()=>{b=K(d);var g=b.length;let z=!1;if(be){var Y=wr(a)===Er;Y!==(g===0)&&(a=Yn(),et(a),ft(!1),z=!0)}for(var N=new Set,Z=kr,ee=Or(),J=0;J<g;J+=1){be&&ze.nodeType===mn&&ze.data===xr&&(a=ze,z=!0,ft(!1));var I=b[J],q=s(I,J),A=k?null:f.get(q);A?(A.v&&Xn(A.v,I),A.i&&Xn(A.i,J),ee&&Z.skipped_effects.delete(A.e)):(A=Zr(f,k?a:Qn??(Qn=xt()),I,q,J,r,e,t),k||(A.e.f|=Ne),f.set(q,A)),N.add(q)}if(g===0&&o&&!u&&(k?u=rn(()=>o(a)):(u=rn(()=>o(Qn??(Qn=xt()))),u.f|=Ne)),be&&g>0&&et(Yn()),!k)if(ee){for(const[P,D]of f)N.has(P)||Z.skipped_effects.add(D.e);Z.oncommit(T),Z.ondiscard(()=>{})}else T();z&&ft(!0),K(d)}),_={effect:O,items:f,outrogroups:null,fallback:u};k=!1,be&&(a=ze)}function $r(n,e,t,s,r){var A,P,D,j,se,_e,ye,oe,ae;var o=(s&Br)!==0,a=e.length,f=n.items,c=n.effect.first,p,u=null,d,b=[],k=[],T,O,_,g;if(o)for(g=0;g<a;g+=1)T=e[g],O=r(T,g),_=f.get(O).e,(_.f&Ne)===0&&((P=(A=_.nodes)==null?void 0:A.a)==null||P.measure(),(d??(d=new Set)).add(_));for(g=0;g<a;g+=1){if(T=e[g],O=r(T,g),_=f.get(O).e,n.outrogroups!==null)for(const ce of n.outrogroups)ce.pending.delete(_),ce.done.delete(_);if((_.f&Ne)!==0)if(_.f^=Ne,_===c)lt(_,null,t);else{var z=u?u.next:c;_===n.effect.last&&(n.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Le(n,u,_),Le(n,_,z),lt(_,z,t),u=_,b=[],k=[],c=u.next;continue}if((_.f&Gt)!==0&&(gs(_),o&&((j=(D=_.nodes)==null?void 0:D.a)==null||j.unfix(),(d??(d=new Set)).delete(_))),_!==c){if(p!==void 0&&p.has(_)){if(b.length<k.length){var Y=k[0],N;u=Y.prev;var Z=b[0],ee=b[b.length-1];for(N=0;N<b.length;N+=1)lt(b[N],Y,t);for(N=0;N<k.length;N+=1)p.delete(k[N]);Le(n,Z.prev,ee.next),Le(n,u,Z),Le(n,ee,Y),c=Y,u=ee,g-=1,b=[],k=[]}else p.delete(_),lt(_,c,t),Le(n,_.prev,_.next),Le(n,_,u===null?n.effect.first:u.next),Le(n,u,_),u=_;continue}for(b=[],k=[];c!==null&&c!==_;)(p??(p=new Set)).add(c),k.push(c),c=c.next;if(c===null)continue}(_.f&Ne)===0&&b.push(_),u=_,c=_.next}if(n.outrogroups!==null){for(const ce of n.outrogroups)ce.pending.size===0&&(an(wn(ce.done)),(se=n.outrogroups)==null||se.delete(ce));n.outrogroups.size===0&&(n.outrogroups=null)}if(c!==null||p!==void 0){var J=[];if(p!==void 0)for(_ of p)(_.f&Gt)===0&&J.push(_);for(;c!==null;)(c.f&Gt)===0&&c!==n.fallback&&J.push(c),c=c.next;var I=J.length;if(I>0){var q=(s&vs)!==0&&a===0?t:null;if(o){for(g=0;g<I;g+=1)(ye=(_e=J[g].nodes)==null?void 0:_e.a)==null||ye.measure();for(g=0;g<I;g+=1)(ae=(oe=J[g].nodes)==null?void 0:oe.a)==null||ae.fix()}Qr(n,J,q)}}o&&Mr(()=>{var ce,Ye;if(d!==void 0)for(_ of d)(Ye=(ce=_.nodes)==null?void 0:ce.a)==null||Ye.apply()})}function Zr(n,e,t,s,r,o,a,f){var c=(a&Ar)!==0?(a&Rr)===0?ps(t,!1,!1):Gn(t):null,p=(a&Tr)!==0?Gn(r):null;return{v:c,i:p,e:rn(()=>(o(e,c??t,p??r,f),()=>{n.delete(s)}))}}function lt(n,e,t){if(n.nodes)for(var s=n.nodes.start,r=n.nodes.end,o=e&&(e.f&Ne)===0?e.nodes.start:t;s!==null;){var a=Nt(s);if(o.before(s),s===r)return;s=a}}function Le(n,e,t){e===null?n.effect.first=t:e.next=t,t===null?n.effect.last=e:t.prev=e}function ms(n,e,t=!1,s=!1,r=!1){var o=n,a="";de(()=>{var f=Lr;if(a===(a=e()??"")){be&&Tt();return}if(f.nodes!==null&&(Ir(f.nodes.start,f.nodes.end),f.nodes=null),a!==""){if(be){ze.data;for(var c=Tt(),p=c;c!==null&&(c.nodeType!==mn||c.data!=="");)p=c,c=Nt(c);if(c===null)throw Pr(),Dr;Wn(ze,p),o=et(c);return}var u=a+"";t?u=`<svg>${u}</svg>`:s&&(u=`<math>${u}</math>`);var d=br(u);if((t||s)&&(d=$e(d)),Wn($e(d),d.lastChild),t||s)for(;$e(d);)o.before($e(d));else o.before(d)}})}function ei(n,e,t,s,r){var f;be&&Tt();var o=(f=e.$$slots)==null?void 0:f[t],a=!1;o===!0&&(o=e.children,a=!0),o===void 0?r!==null&&r(n):o(n,a?()=>s:s)}function ti(n,e){let t=null,s=be;var r;if(be){t=ze;for(var o=$e(document.head);o!==null&&(o.nodeType!==mn||o.data!==n);)o=Nt(o);if(o===null)ft(!1);else{var a=Nt(o);o.remove(),et(a)}}be||(r=document.head.appendChild(xt()));try{ds(()=>e(r),jr)}finally{s&&(ft(!0),et(t))}}const ln=En([]),mt=new Map;function ws(n,e=!1){var t,s,r;if(console.log("displayMessage called:",{type:n.type,context:n.context,isResponse:e,actor:n.actor,content:(t=n.object)==null?void 0:t.content}),n.type==="send"&&((s=n.object)==null?void 0:s.type)==="message"){const o=typeof n.actor=="string"?n.actor:((r=n.actor)==null?void 0:r.name)||"",a=n.object.content||"",f=`${o}:${a}`,c=Date.now(),p=mt.get(f);if(p&&c-p<2e3){console.log("Skipping duplicate message:",f);return}mt.set(f,c);for(const[u,d]of mt)c-d>5e3&&mt.delete(u);ln.set([...Fr(ln),[o,a]]),console.log("Message displayed:",{actorName:o,content:a,isResponse:e,context:n.context})}}var ni=ie("<li> </li>"),si=ie('<div><label for="incomingMessagesContainer" class="text-gray-900 font-bold">Incoming Messages</label> <div id="incomingMessagesContainer" class="incoming-messages-container w-full"><ui class="incoming-messages"></ui> <div class="incoming-messages-anchor"></div></div></div>');function Yo(n,e){Pe(e,!1);const t=()=>zr(ln,"$messages",s),[s,r]=Wr();bs();var o=si(),a=W(B(o),2),f=B(a);cn(f,5,t,on,(c,p)=>{var u=ni(),d=B(u);R(u),de(()=>fe(d,`${K(p)[0]??""}: ${K(p)[1]??""}`)),F(c,u)}),R(f),_s(2),R(a),R(o),F(n,o),De(),r()}var ri=ie("<span> </span>");function kn(n,e){Pe(e,!0);var t=ri(),s=B(t);R(t),de(()=>fe(s,`[${e.entry.context??""}:${e.entry.type??""}]`)),F(n,t),De()}var ii=ie("<!> <span> </span> <span> </span>",1);function oi(n,e){Pe(e,!0);var t=ii(),s=pe(t);kn(s,{get entry(){return e.entry}});var r=W(s,2),o=B(r);R(r);var a=W(r,2),f=B(a,!0);R(a),de(()=>{var c,p,u;fe(o,`#${e.id??""}
|
|
2
|
+
${(typeof e.entry.actor=="string"?e.entry.actor:((c=e.entry.actor)==null?void 0:c.name)||((p=e.entry.actor)==null?void 0:p.id))??""}:`),fe(f,((u=e.entry.object)==null?void 0:u.content)||"")}),F(n,t),De()}var ai=ie('<span class="font-medium">đ° Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),ci=ie("<span> </span>"),li=ie('<span class="text-gray-500 text-xs italic"> </span>'),ui=ie('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"><!></a></span> <!>',1),fi=ie("<!> <!>",1);function hi(n,e){var u,d,b;Pe(e,!0);const t=e.entry.totalItems!==void 0,s=t?e.entry.summary:(u=e.entry.object)==null?void 0:u.url,r=typeof e.entry.actor=="string"?e.entry.actor:((d=e.entry.actor)==null?void 0:d.name)||((b=e.entry.actor)==null?void 0:b.id);var o=fi(),a=pe(o);kn(a,{get entry(){return e.entry}});var f=W(a,2);{var c=k=>{var T=ai(),O=W(pe(T),2),_=B(O,!0);R(O);var g=W(O,2),z=B(g);R(g),de(()=>{fe(_,s),fe(z,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),F(k,T)},p=k=>{var T=ui(),O=pe(T),_=B(O);R(O);var g=W(O,2);{var z=A=>{var P=ci(),D=B(P);R(P),de(()=>fe(D,`${r??""}:`)),F(A,P)};ge(g,A=>{r&&A(z)})}var Y=W(g,2),N=B(Y),Z=B(N);{var ee=A=>{var P=Te(),D=pe(P);ms(D,()=>{var j;return(j=e.entry.object)==null?void 0:j.title}),F(A,P)},J=A=>{var P=fs();de(()=>{var D,j;return fe(P,(D=e.entry.object)!=null&&D.title||typeof e.entry.target=="string"?e.entry.target:(j=e.entry.target)==null?void 0:j.id)}),F(A,P)};ge(Z,A=>{var P;((P=e.entry.object)==null?void 0:P.contentType)==="html"?A(ee):A(J,!1)})}R(N),R(Y);var I=W(Y,2);{var q=A=>{var P=li(),D=B(P,!0);R(P),de(j=>fe(D,j),[()=>{var j;return(j=e.entry.object)==null?void 0:j.published.split("T")[0]}]),F(A,P)};ge(I,A=>{var P;(P=e.entry.object)!=null&&P.published&&A(q)})}de(()=>{var A;fe(_,`#${e.id??""}`),Xr(N,"href",(A=e.entry.object)==null?void 0:A.url)}),F(k,T)};ge(f,k=>{t?k(c):k(p,!1)})}F(n,o),De()}var di=ie("<!> <span> </span>",1);function pi(n,e){Pe(e,!0);var t=di(),s=pe(t);kn(s,{get entry(){return e.entry}});var r=W(s,2),o=B(r);R(r),de(()=>{var a,f;return fe(o,`#${e.id??""}
|
|
3
|
+
${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((f=e.entry.actor)==null?void 0:f.id))??""}`)}),F(n,t),De()}var gi=ie('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),yi=ie('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),vi=ie('<div class="mt-2 p-3 bg-red-50 border border-red-200 rounded-lg"><div class="flex items-center space-x-2"><svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-red-800 font-medium text-sm">Error:</span> <span class="text-red-700 text-sm"> </span></div></div>'),_i=ie('<li class="p-4 hover:bg-gray-50 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-2"><div class="flex items-center space-x-2"><span class="text-sm font-semibold text-gray-700"> </span> <!> <!></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <div class="text-sm text-gray-600"><!></div> <!></div></div></li>');function Qt(n,e){Pe(e,!0);var t=_i(),s=B(t),r=B(s),o=B(r),a=W(o,2),f=B(a);R(a),R(r);var c=W(r,2),p=B(c),u=B(p),d=B(u),b=B(d,!0);R(d);var k=W(d,2);{var T=I=>{var q=gi(),A=B(q,!0);R(q),de(P=>fe(A,P),[()=>e.entry.context.toUpperCase()]),F(I,q)};ge(k,I=>{e.entry.context&&I(T)})}var O=W(k,2);{var _=I=>{var q=yi(),A=B(q,!0);R(q),de(()=>fe(A,e.entry.type)),F(I,q)};ge(O,I=>{e.entry.type&&I(_)})}R(u);var g=W(u,2);g.__click=function(...I){var q;(q=e.buttonAction)==null||q.apply(this,I)},R(p);var z=W(p,2),Y=B(z);{var N=I=>{oi(I,{get id(){return e.id},get entry(){return e.entry}})},Z=I=>{var q=Te(),A=pe(q);{var P=j=>{hi(j,{get id(){return e.id},get entry(){return e.entry}})},D=j=>{pi(j,{get id(){return e.id},get entry(){return e.entry}})};ge(A,j=>{e.entry.context==="feeds"?j(P):j(D,!1)},!0)}F(I,q)};ge(Y,I=>{e.entry.context==="dummy"?I(N):I(Z,!1)})}R(z);var ee=W(z,2);{var J=I=>{var q=vi(),A=B(q),P=W(B(A),4),D=B(P,!0);R(P),R(A),R(q),de(()=>fe(D,e.entry.error)),F(I,q)};ge(ee,I=>{e.entry.error&&I(J)})}R(c),R(s),R(t),de(()=>{xn(o,1,`w-3 h-3 ${e.response?"bg-green-500":"bg-orange-400"} rounded-full`),fe(f,`#${e.id??""}`),fe(b,e.response?"đ„ Response":"đ€ Sent")}),F(n,t),De()}hs(["click"]);function bi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var $t,$n;function mi(){if($n)return $t;$n=1;function n(i){return i instanceof Map?i.clear=i.delete=i.set=function(){throw new Error("map is read-only")}:i instanceof Set&&(i.add=i.clear=i.delete=function(){throw new Error("set is read-only")}),Object.freeze(i),Object.getOwnPropertyNames(i).forEach(l=>{const y=i[l],C=typeof y;(C==="object"||C==="function")&&!Object.isFrozen(y)&&n(y)}),i}class e{constructor(l){l.data===void 0&&(l.data={}),this.data=l.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function t(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(i,...l){const y=Object.create(null);for(const C in i)y[C]=i[C];return l.forEach(function(C){for(const Q in C)y[Q]=C[Q]}),y}const r="</span>",o=i=>!!i.scope,a=(i,{prefix:l})=>{if(i.startsWith("language:"))return i.replace("language:","language-");if(i.includes(".")){const y=i.split(".");return[`${l}${y.shift()}`,...y.map((C,Q)=>`${C}${"_".repeat(Q+1)}`)].join(" ")}return`${l}${i}`};class f{constructor(l,y){this.buffer="",this.classPrefix=y.classPrefix,l.walk(this)}addText(l){this.buffer+=t(l)}openNode(l){if(!o(l))return;const y=a(l.scope,{prefix:this.classPrefix});this.span(y)}closeNode(l){o(l)&&(this.buffer+=r)}value(){return this.buffer}span(l){this.buffer+=`<span class="${l}">`}}const c=(i={})=>{const l={children:[]};return Object.assign(l,i),l};class p{constructor(){this.rootNode=c(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(l){this.top.children.push(l)}openNode(l){const y=c({scope:l});this.add(y),this.stack.push(y)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(l){return this.constructor._walk(l,this.rootNode)}static _walk(l,y){return typeof y=="string"?l.addText(y):y.children&&(l.openNode(y),y.children.forEach(C=>this._walk(l,C)),l.closeNode(y)),l}static _collapse(l){typeof l!="string"&&l.children&&(l.children.every(y=>typeof y=="string")?l.children=[l.children.join("")]:l.children.forEach(y=>{p._collapse(y)}))}}class u extends p{constructor(l){super(),this.options=l}addText(l){l!==""&&this.add(l)}startScope(l){this.openNode(l)}endScope(){this.closeNode()}__addSublanguage(l,y){const C=l.root;y&&(C.scope=`language:${y}`),this.add(C)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(i){return i?typeof i=="string"?i:i.source:null}function b(i){return O("(?=",i,")")}function k(i){return O("(?:",i,")*")}function T(i){return O("(?:",i,")?")}function O(...i){return i.map(y=>d(y)).join("")}function _(i){const l=i[i.length-1];return typeof l=="object"&&l.constructor===Object?(i.splice(i.length-1,1),l):{}}function g(...i){return"("+(_(i).capture?"":"?:")+i.map(C=>d(C)).join("|")+")"}function z(i){return new RegExp(i.toString()+"|").exec("").length-1}function Y(i,l){const y=i&&i.exec(l);return y&&y.index===0}const N=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Z(i,{joinWith:l}){let y=0;return i.map(C=>{y+=1;const Q=y;let $=d(C),w="";for(;$.length>0;){const m=N.exec($);if(!m){w+=$;break}w+=$.substring(0,m.index),$=$.substring(m.index+m[0].length),m[0][0]==="\\"&&m[1]?w+="\\"+String(Number(m[1])+Q):(w+=m[0],m[0]==="("&&y++)}return w}).map(C=>`(${C})`).join(l)}const ee=/\b\B/,J="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",q="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",D="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",j=(i={})=>{const l=/^#![ ]*\//;return i.binary&&(i.begin=O(l,/.*\b/,i.binary,/\b.*/)),s({scope:"meta",begin:l,end:/$/,relevance:0,"on:begin":(y,C)=>{y.index!==0&&C.ignoreMatch()}},i)},se={begin:"\\\\[\\s\\S]",relevance:0},_e={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[se]},ye={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[se]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ae=function(i,l,y={}){const C=s({scope:"comment",begin:i,end:l,contains:[]},y);C.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Q=g("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return C.contains.push({begin:O(/[ ]+/,"(",Q,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),C},ce=ae("//","$"),Ye=ae("/\\*","\\*/"),It=ae("#","$"),Pt={scope:"number",begin:q,relevance:0},Ce={scope:"number",begin:A,relevance:0},je={scope:"number",begin:P,relevance:0},st={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[se,{begin:/\[/,end:/\]/,relevance:0,contains:[se]}]},rt={scope:"title",begin:J,relevance:0},it={scope:"title",begin:I,relevance:0},we={begin:"\\.\\s*"+I,relevance:0};var He=Object.freeze({__proto__:null,APOS_STRING_MODE:_e,BACKSLASH_ESCAPE:se,BINARY_NUMBER_MODE:je,BINARY_NUMBER_RE:P,COMMENT:ae,C_BLOCK_COMMENT_MODE:Ye,C_LINE_COMMENT_MODE:ce,C_NUMBER_MODE:Ce,C_NUMBER_RE:A,END_SAME_AS_BEGIN:function(i){return Object.assign(i,{"on:begin":(l,y)=>{y.data._beginMatch=l[1]},"on:end":(l,y)=>{y.data._beginMatch!==l[1]&&y.ignoreMatch()}})},HASH_COMMENT_MODE:It,IDENT_RE:J,MATCH_NOTHING_RE:ee,METHOD_GUARD:we,NUMBER_MODE:Pt,NUMBER_RE:q,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:ye,REGEXP_MODE:st,RE_STARTERS_RE:D,SHEBANG:j,TITLE_MODE:rt,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:it});function ht(i,l){i.input[i.index-1]==="."&&l.ignoreMatch()}function Dt(i,l){i.className!==void 0&&(i.scope=i.className,delete i.className)}function jt(i,l){l&&i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",i.__beforeBegin=ht,i.keywords=i.keywords||i.beginKeywords,delete i.beginKeywords,i.relevance===void 0&&(i.relevance=0))}function ot(i,l){Array.isArray(i.illegal)&&(i.illegal=g(...i.illegal))}function Ut(i,l){if(i.match){if(i.begin||i.end)throw new Error("begin & end are not supported with match");i.begin=i.match,delete i.match}}function Ht(i,l){i.relevance===void 0&&(i.relevance=1)}const qt=(i,l)=>{if(!i.beforeMatch)return;if(i.starts)throw new Error("beforeMatch cannot be used with starts");const y=Object.assign({},i);Object.keys(i).forEach(C=>{delete i[C]}),i.keywords=y.keywords,i.begin=O(y.beforeMatch,b(y.begin)),i.starts={relevance:0,contains:[Object.assign(y,{endsParent:!0})]},i.relevance=0,delete y.beforeMatch},Hs=["of","and","for","in","not","or","if","then","parent","list","value"],qs="keyword";function Nn(i,l,y=qs){const C=Object.create(null);return typeof i=="string"?Q(y,i.split(" ")):Array.isArray(i)?Q(y,i):Object.keys(i).forEach(function($){Object.assign(C,Nn(i[$],l,$))}),C;function Q($,w){l&&(w=w.map(m=>m.toLowerCase())),w.forEach(function(m){const S=m.split("|");C[S[0]]=[$,Fs(S[0],S[1])]})}}function Fs(i,l){return l?Number(l):Vs(i)?0:1}function Vs(i){return Hs.includes(i.toLowerCase())}const Cn={},qe=i=>{console.error(i)},Mn=(i,...l)=>{console.log(`WARN: ${i}`,...l)},Xe=(i,l)=>{Cn[`${i}/${l}`]||(console.log(`Deprecated as of ${i}. ${l}`),Cn[`${i}/${l}`]=!0)},dt=new Error;function Bn(i,l,{key:y}){let C=0;const Q=i[y],$={},w={};for(let m=1;m<=l.length;m++)w[m+C]=Q[m],$[m+C]=!0,C+=z(l[m-1]);i[y]=w,i[y]._emit=$,i[y]._multi=!0}function Ks(i){if(Array.isArray(i.begin)){if(i.skip||i.excludeBegin||i.returnBegin)throw qe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if(typeof i.beginScope!="object"||i.beginScope===null)throw qe("beginScope must be object"),dt;Bn(i,i.begin,{key:"beginScope"}),i.begin=Z(i.begin,{joinWith:""})}}function zs(i){if(Array.isArray(i.end)){if(i.skip||i.excludeEnd||i.returnEnd)throw qe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if(typeof i.endScope!="object"||i.endScope===null)throw qe("endScope must be object"),dt;Bn(i,i.end,{key:"endScope"}),i.end=Z(i.end,{joinWith:""})}}function Ws(i){i.scope&&typeof i.scope=="object"&&i.scope!==null&&(i.beginScope=i.scope,delete i.scope)}function Ys(i){Ws(i),typeof i.beginScope=="string"&&(i.beginScope={_wrap:i.beginScope}),typeof i.endScope=="string"&&(i.endScope={_wrap:i.endScope}),Ks(i),zs(i)}function Xs(i){function l(w,m){return new RegExp(d(w),"m"+(i.case_insensitive?"i":"")+(i.unicodeRegex?"u":"")+(m?"g":""))}class y{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(m,S){S.position=this.position++,this.matchIndexes[this.matchAt]=S,this.regexes.push([S,m]),this.matchAt+=z(m)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const m=this.regexes.map(S=>S[1]);this.matcherRe=l(Z(m,{joinWith:"|"}),!0),this.lastIndex=0}exec(m){this.matcherRe.lastIndex=this.lastIndex;const S=this.matcherRe.exec(m);if(!S)return null;const le=S.findIndex((at,Vt)=>Vt>0&&at!==void 0),te=this.matchIndexes[le];return S.splice(0,le),Object.assign(S,te)}}class C{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(m){if(this.multiRegexes[m])return this.multiRegexes[m];const S=new y;return this.rules.slice(m).forEach(([le,te])=>S.addRule(le,te)),S.compile(),this.multiRegexes[m]=S,S}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(m,S){this.rules.push([m,S]),S.type==="begin"&&this.count++}exec(m){const S=this.getMatcher(this.regexIndex);S.lastIndex=this.lastIndex;let le=S.exec(m);if(this.resumingScanAtSamePosition()&&!(le&&le.index===this.lastIndex)){const te=this.getMatcher(0);te.lastIndex=this.lastIndex+1,le=te.exec(m)}return le&&(this.regexIndex+=le.position+1,this.regexIndex===this.count&&this.considerAll()),le}}function Q(w){const m=new C;return w.contains.forEach(S=>m.addRule(S.begin,{rule:S,type:"begin"})),w.terminatorEnd&&m.addRule(w.terminatorEnd,{type:"end"}),w.illegal&&m.addRule(w.illegal,{type:"illegal"}),m}function $(w,m){const S=w;if(w.isCompiled)return S;[Dt,Ut,Ys,qt].forEach(te=>te(w,m)),i.compilerExtensions.forEach(te=>te(w,m)),w.__beforeBegin=null,[jt,ot,Ht].forEach(te=>te(w,m)),w.isCompiled=!0;let le=null;return typeof w.keywords=="object"&&w.keywords.$pattern&&(w.keywords=Object.assign({},w.keywords),le=w.keywords.$pattern,delete w.keywords.$pattern),le=le||/\w+/,w.keywords&&(w.keywords=Nn(w.keywords,i.case_insensitive)),S.keywordPatternRe=l(le,!0),m&&(w.begin||(w.begin=/\B|\b/),S.beginRe=l(S.begin),!w.end&&!w.endsWithParent&&(w.end=/\B|\b/),w.end&&(S.endRe=l(S.end)),S.terminatorEnd=d(S.end)||"",w.endsWithParent&&m.terminatorEnd&&(S.terminatorEnd+=(w.end?"|":"")+m.terminatorEnd)),w.illegal&&(S.illegalRe=l(w.illegal)),w.contains||(w.contains=[]),w.contains=[].concat(...w.contains.map(function(te){return Gs(te==="self"?w:te)})),w.contains.forEach(function(te){$(te,S)}),w.starts&&$(w.starts,m),S.matcher=Q(S),S}if(i.compilerExtensions||(i.compilerExtensions=[]),i.contains&&i.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return i.classNameAliases=s(i.classNameAliases||{}),$(i)}function Ln(i){return i?i.endsWithParent||Ln(i.starts):!1}function Gs(i){return i.variants&&!i.cachedVariants&&(i.cachedVariants=i.variants.map(function(l){return s(i,{variants:null},l)})),i.cachedVariants?i.cachedVariants:Ln(i)?s(i,{starts:i.starts?s(i.starts):null}):Object.isFrozen(i)?s(i):i}var Js="11.11.1";class Qs extends Error{constructor(l,y){super(l),this.name="HTMLInjectionError",this.html=y}}const Ft=t,In=s,Pn=Symbol("nomatch"),$s=7,Dn=function(i){const l=Object.create(null),y=Object.create(null),C=[];let Q=!0;const $="Could not find the language '{}', did you forget to load/include a language module?",w={disableAutodetect:!0,name:"Plain text",contains:[]};let m={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function S(h){return m.noHighlightRe.test(h)}function le(h){let x=h.className+" ";x+=h.parentNode?h.parentNode.className:"";const U=m.languageDetectRe.exec(x);if(U){const X=Me(U[1]);return X||(Mn($.replace("{}",U[1])),Mn("Falling back to no-highlight mode for this block.",h)),X?U[1]:"no-highlight"}return x.split(/\s+/).find(X=>S(X)||Me(X))}function te(h,x,U){let X="",re="";typeof x=="object"?(X=h,U=x.ignoreIllegals,re=x.language):(Xe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Xe("10.7.0",`Please use highlight(code, options) instead.
|
|
4
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),re=h,X=x),U===void 0&&(U=!0);const Ee={code:X,language:re};gt("before:highlight",Ee);const Be=Ee.result?Ee.result:at(Ee.language,Ee.code,U);return Be.code=Ee.code,gt("after:highlight",Be),Be}function at(h,x,U,X){const re=Object.create(null);function Ee(v,E){return v.keywords[E]}function Be(){if(!M.keywords){ue.addText(G);return}let v=0;M.keywordPatternRe.lastIndex=0;let E=M.keywordPatternRe.exec(G),L="";for(;E;){L+=G.substring(v,E.index);const V=Oe.case_insensitive?E[0].toLowerCase():E[0],he=Ee(M,V);if(he){const[Re,gr]=he;if(ue.addText(L),L="",re[V]=(re[V]||0)+1,re[V]<=$s&&(_t+=gr),Re.startsWith("_"))L+=E[0];else{const yr=Oe.classNameAliases[Re]||Re;ke(E[0],yr)}}else L+=E[0];v=M.keywordPatternRe.lastIndex,E=M.keywordPatternRe.exec(G)}L+=G.substring(v),ue.addText(L)}function yt(){if(G==="")return;let v=null;if(typeof M.subLanguage=="string"){if(!l[M.subLanguage]){ue.addText(G);return}v=at(M.subLanguage,G,!0,zn[M.subLanguage]),zn[M.subLanguage]=v._top}else v=Kt(G,M.subLanguage.length?M.subLanguage:null);M.relevance>0&&(_t+=v.relevance),ue.__addSublanguage(v._emitter,v.language)}function ve(){M.subLanguage!=null?yt():Be(),G=""}function ke(v,E){v!==""&&(ue.startScope(E),ue.addText(v),ue.endScope())}function qn(v,E){let L=1;const V=E.length-1;for(;L<=V;){if(!v._emit[L]){L++;continue}const he=Oe.classNameAliases[v[L]]||v[L],Re=E[L];he?ke(Re,he):(G=Re,Be(),G=""),L++}}function Fn(v,E){return v.scope&&typeof v.scope=="string"&&ue.openNode(Oe.classNameAliases[v.scope]||v.scope),v.beginScope&&(v.beginScope._wrap?(ke(G,Oe.classNameAliases[v.beginScope._wrap]||v.beginScope._wrap),G=""):v.beginScope._multi&&(qn(v.beginScope,E),G="")),M=Object.create(v,{parent:{value:M}}),M}function Vn(v,E,L){let V=Y(v.endRe,L);if(V){if(v["on:end"]){const he=new e(v);v["on:end"](E,he),he.isMatchIgnored&&(V=!1)}if(V){for(;v.endsParent&&v.parent;)v=v.parent;return v}}if(v.endsWithParent)return Vn(v.parent,E,L)}function ur(v){return M.matcher.regexIndex===0?(G+=v[0],1):(Xt=!0,0)}function fr(v){const E=v[0],L=v.rule,V=new e(L),he=[L.__beforeBegin,L["on:begin"]];for(const Re of he)if(Re&&(Re(v,V),V.isMatchIgnored))return ur(E);return L.skip?G+=E:(L.excludeBegin&&(G+=E),ve(),!L.returnBegin&&!L.excludeBegin&&(G=E)),Fn(L,v),L.returnBegin?0:E.length}function hr(v){const E=v[0],L=x.substring(v.index),V=Vn(M,v,L);if(!V)return Pn;const he=M;M.endScope&&M.endScope._wrap?(ve(),ke(E,M.endScope._wrap)):M.endScope&&M.endScope._multi?(ve(),qn(M.endScope,v)):he.skip?G+=E:(he.returnEnd||he.excludeEnd||(G+=E),ve(),he.excludeEnd&&(G=E));do M.scope&&ue.closeNode(),!M.skip&&!M.subLanguage&&(_t+=M.relevance),M=M.parent;while(M!==V.parent);return V.starts&&Fn(V.starts,v),he.returnEnd?0:E.length}function dr(){const v=[];for(let E=M;E!==Oe;E=E.parent)E.scope&&v.unshift(E.scope);v.forEach(E=>ue.openNode(E))}let vt={};function Kn(v,E){const L=E&&E[0];if(G+=v,L==null)return ve(),0;if(vt.type==="begin"&&E.type==="end"&&vt.index===E.index&&L===""){if(G+=x.slice(E.index,E.index+1),!Q){const V=new Error(`0 width match regex (${h})`);throw V.languageName=h,V.badRule=vt.rule,V}return 1}if(vt=E,E.type==="begin")return fr(E);if(E.type==="illegal"&&!U){const V=new Error('Illegal lexeme "'+L+'" for mode "'+(M.scope||"<unnamed>")+'"');throw V.mode=M,V}else if(E.type==="end"){const V=hr(E);if(V!==Pn)return V}if(E.type==="illegal"&&L==="")return G+=`
|
|
5
|
+
`,1;if(Yt>1e5&&Yt>E.index*3)throw new Error("potential infinite loop, way more iterations than matches");return G+=L,L.length}const Oe=Me(h);if(!Oe)throw qe($.replace("{}",h)),new Error('Unknown language: "'+h+'"');const pr=Xs(Oe);let Wt="",M=X||pr;const zn={},ue=new m.__emitter(m);dr();let G="",_t=0,Fe=0,Yt=0,Xt=!1;try{if(Oe.__emitTokens)Oe.__emitTokens(x,ue);else{for(M.matcher.considerAll();;){Yt++,Xt?Xt=!1:M.matcher.considerAll(),M.matcher.lastIndex=Fe;const v=M.matcher.exec(x);if(!v)break;const E=x.substring(Fe,v.index),L=Kn(E,v);Fe=v.index+L}Kn(x.substring(Fe))}return ue.finalize(),Wt=ue.toHTML(),{language:h,value:Wt,relevance:_t,illegal:!1,_emitter:ue,_top:M}}catch(v){if(v.message&&v.message.includes("Illegal"))return{language:h,value:Ft(x),illegal:!0,relevance:0,_illegalBy:{message:v.message,index:Fe,context:x.slice(Fe-100,Fe+100),mode:v.mode,resultSoFar:Wt},_emitter:ue};if(Q)return{language:h,value:Ft(x),illegal:!1,relevance:0,errorRaised:v,_emitter:ue,_top:M};throw v}}function Vt(h){const x={value:Ft(h),illegal:!1,relevance:0,_top:w,_emitter:new m.__emitter(m)};return x._emitter.addText(h),x}function Kt(h,x){x=x||m.languages||Object.keys(l);const U=Vt(h),X=x.filter(Me).filter(Hn).map(ve=>at(ve,h,!1));X.unshift(U);const re=X.sort((ve,ke)=>{if(ve.relevance!==ke.relevance)return ke.relevance-ve.relevance;if(ve.language&&ke.language){if(Me(ve.language).supersetOf===ke.language)return 1;if(Me(ke.language).supersetOf===ve.language)return-1}return 0}),[Ee,Be]=re,yt=Ee;return yt.secondBest=Be,yt}function Zs(h,x,U){const X=x&&y[x]||U;h.classList.add("hljs"),h.classList.add(`language-${X}`)}function zt(h){let x=null;const U=le(h);if(S(U))return;if(gt("before:highlightElement",{el:h,language:U}),h.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",h);return}if(h.children.length>0&&(m.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(h)),m.throwUnescapedHTML))throw new Qs("One of your code blocks includes unescaped HTML.",h.innerHTML);x=h;const X=x.textContent,re=U?te(X,{language:U,ignoreIllegals:!0}):Kt(X);h.innerHTML=re.value,h.dataset.highlighted="yes",Zs(h,U,re.language),h.result={language:re.language,re:re.relevance,relevance:re.relevance},re.secondBest&&(h.secondBest={language:re.secondBest.language,relevance:re.secondBest.relevance}),gt("after:highlightElement",{el:h,result:re,text:X})}function er(h){m=In(m,h)}const tr=()=>{pt(),Xe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function nr(){pt(),Xe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let jn=!1;function pt(){function h(){pt()}if(document.readyState==="loading"){jn||window.addEventListener("DOMContentLoaded",h,!1),jn=!0;return}document.querySelectorAll(m.cssSelector).forEach(zt)}function sr(h,x){let U=null;try{U=x(i)}catch(X){if(qe("Language definition for '{}' could not be registered.".replace("{}",h)),Q)qe(X);else throw X;U=w}U.name||(U.name=h),l[h]=U,U.rawDefinition=x.bind(null,i),U.aliases&&Un(U.aliases,{languageName:h})}function rr(h){delete l[h];for(const x of Object.keys(y))y[x]===h&&delete y[x]}function ir(){return Object.keys(l)}function Me(h){return h=(h||"").toLowerCase(),l[h]||l[y[h]]}function Un(h,{languageName:x}){typeof h=="string"&&(h=[h]),h.forEach(U=>{y[U.toLowerCase()]=x})}function Hn(h){const x=Me(h);return x&&!x.disableAutodetect}function or(h){h["before:highlightBlock"]&&!h["before:highlightElement"]&&(h["before:highlightElement"]=x=>{h["before:highlightBlock"](Object.assign({block:x.el},x))}),h["after:highlightBlock"]&&!h["after:highlightElement"]&&(h["after:highlightElement"]=x=>{h["after:highlightBlock"](Object.assign({block:x.el},x))})}function ar(h){or(h),C.push(h)}function cr(h){const x=C.indexOf(h);x!==-1&&C.splice(x,1)}function gt(h,x){const U=h;C.forEach(function(X){X[U]&&X[U](x)})}function lr(h){return Xe("10.7.0","highlightBlock will be removed entirely in v12.0"),Xe("10.7.0","Please use highlightElement now."),zt(h)}Object.assign(i,{highlight:te,highlightAuto:Kt,highlightAll:pt,highlightElement:zt,highlightBlock:lr,configure:er,initHighlighting:tr,initHighlightingOnLoad:nr,registerLanguage:sr,unregisterLanguage:rr,listLanguages:ir,getLanguage:Me,registerAliases:Un,autoDetection:Hn,inherit:In,addPlugin:ar,removePlugin:cr}),i.debugMode=function(){Q=!1},i.safeMode=function(){Q=!0},i.versionString=Js,i.regex={concat:O,lookahead:b,either:g,optional:T,anyNumberOfTimes:k};for(const h in He)typeof He[h]=="object"&&n(He[h]);return Object.assign(i,He),i},Ge=Dn({});return Ge.newInstance=()=>Dn({}),$t=Ge,Ge.HighlightJS=Ge,Ge.default=Ge,$t}var wi=mi();const Zn=bi(wi);var Ei=ie("<pre><code><!></code></pre>");function xi(n,e){const t=Ct(e,["children","$$slots","$$events","$$legacy"]),s=Ct(t,["code","highlighted","languageName","langtag"]);let r=We(e,"code",8),o=We(e,"highlighted",8),a=We(e,"languageName",8,"plaintext"),f=We(e,"langtag",8,!1);var c=Ei();Gr(c,()=>({"data-language":a(),...s,[Jr]:{langtag:f()}}),void 0,void 0,void 0,"svelte-4jgeki");var p=B(c);xn(p,1,"",null,{},{hljs:!0});var u=B(p);{var d=k=>{var T=Te(),O=pe(T);ms(O,o),F(k,T)},b=k=>{var T=fs();de(()=>fe(T,r())),F(k,T)};ge(u,k=>{o()?k(d):k(b,!1)})}R(p),R(c),F(n,c)}function es(n,e){const t=Ct(e,["children","$$slots","$$events","$$legacy"]),s=Ct(t,["language","code","langtag"]);Pe(e,!1);let r=We(e,"language",8),o=We(e,"code",8),a=We(e,"langtag",8,!1);const f=Vr();let c=ps("");Kr(()=>{K(c)&&f("highlight",{highlighted:K(c)})}),Ur(()=>(Jt(r()),Jt(o())),()=>{Zn.registerLanguage(r().name,r().register),Ke(c,Zn.highlight(o(),{language:r().name}).value)}),Hr(),bs();var p=Te(),u=pe(p);ei(u,e,"default",{get highlighted(){return K(c)}},d=>{xi(d,Yr(()=>s,{get languageName(){return Jt(r()),qr(()=>r().name)},get langtag(){return a()},get highlighted(){return K(c)},get code(){return o()}}))}),F(n,p),De()}function ki(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],r={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[e,t,n.QUOTE_STRING_MODE,r,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const ts={name:"json",register:ki},Es=En({});let ns=0;function Zt(n,e,t=!1){let s;return e.id?s=e.id:s=`${++ns}`,e.id=s,t&&(s=`${s}-${++ns}`),Es.update(r=>{if(!r[s])n==="SEND"?r[s]=[e,{}]:r[s]=[{},e];else{const o=n==="SEND"?0:1;r[s][o]=e}return r}),e}var Oi=ie(`<style>body {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}</style>`),Si=ie('<div class="p-8 text-center text-gray-500"><div class="text-4xl mb-2">đ</div> <p class="font-medium">No activity yet</p> <p class="text-sm">Activity will appear here when you interact with Sockethub</p></div>'),Ai=ie('<ul class="divide-y divide-gray-100"></ul>'),Ri=ie(`<div class="bg-gradient-to-r from-slate-50 to-gray-50 border border-gray-200 rounded-xl p-6 shadow-sm"><div class="flex items-center justify-between mb-4"><div><h3 class="text-xl font-bold text-gray-900 flex items-center"><span class="mr-2">đĄ</span> Sockethub Activity Log</h3> <p class="text-gray-600 text-sm mt-1">Real-time communication between your browser and Sockethub server</p></div> <div class="flex items-center space-x-4 text-xs"><div class="flex items-center space-x-1"><div class="w-3 h-3 bg-orange-400 rounded-full"></div> <span class="text-gray-600">Outgoing</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-green-500 rounded-full"></div> <span class="text-gray-600">Response</span></div></div></div> <div class="bg-white rounded-lg border border-gray-200 shadow-sm"><div class="p-4 border-b border-gray-200 bg-gray-50 rounded-t-lg"><p class="text-sm text-gray-700">đĄ <strong>How to read this log:</strong> Each entry shows messages sent to and received from Sockethub.
|
|
8
|
+
Click "View Details" to see the full JSON data being exchanged.</p></div> <div id="messages" class="max-h-96 overflow-y-auto"><!></div></div></div> <div><div class="bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"><div class="bg-gradient-to-r from-indigo-50 to-purple-50 px-6 py-4 border-b border-gray-200"><div class="flex items-center justify-between"><h3 class="text-lg font-bold text-gray-900 flex items-center"><span class="mr-2">đ</span> ActivityStreams Data Exchange</h3> <button class="text-gray-400 hover:text-gray-600 transition-colors"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <p class="text-gray-600 text-sm mt-1">Raw JSON data showing the ActivityStreams message exchange with Sockethub</p></div> <div class="flex-1 overflow-auto p-6 space-y-6"><div class="bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4"><h4 class="font-semibold text-blue-900 mb-3 flex items-center"><span class="mr-2">đ€</span> Sent to Sockethub</h4> <div class="bg-white rounded border border-blue-200 overflow-hidden"><!></div></div> <div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4"><h4 class="font-semibold text-green-900 mb-3 flex items-center"><span class="mr-2">đ„</span> Response from Sockethub</h4> <div class="bg-white rounded border border-green-200 overflow-hidden"><!></div></div></div> <div class="bg-gray-50 px-6 py-4 border-t border-gray-200 flex justify-end"><button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-medium">Close</button></div></div></div>`,1);function Xo(n,e){Pe(e,!0);let t=bt(void 0),s=bt(!1),r=bt(""),o=bt("");Es.subscribe(D=>{Ke(t,D,!0)});function a(D){return()=>{let j=D,se=D;D.includes("-")&&(j=D.split("-")[0]),console.log(`indexSend:${j} indexResp:${se}`),console.log("logs: ",K(t)),Ke(s,!0),Ke(r,JSON.stringify(K(t)[j][0],null,2),!0),Ke(o,JSON.stringify(K(t)[se][1]||{},null,2),!0)}}var f=Ri();ti("asm1x0",D=>{var j=Te(),se=pe(j);{var _e=ye=>{var oe=Oi();F(ye,oe)};ge(se,ye=>{K(s)&&ye(_e)})}F(D,j)});var c=pe(f),p=W(B(c),2),u=W(B(p),2),d=B(u);{var b=D=>{var j=Si();F(D,j)},k=D=>{var j=Ai();cn(j,21,()=>Object.entries(K(t)).sort((se,_e)=>{let ye=se[0],oe,ae=_e[0],ce;return se[0].includes("-")&&([ye,oe]=se[0].split("-")),_e[0].includes("-")&&([ae,ce]=_e[0].split("-")),oe&&ce?parseInt(oe)>=parseInt(ce)?-1:1:parseInt(ye)>=parseInt(ae)?-1:1}),on,(se,_e)=>{var ye=Ve(()=>Jn(K(_e),2));let oe=()=>K(ye)[0],ae=()=>K(ye)[1];var ce=Te(),Ye=pe(ce);{var It=Ce=>{var je=Te(),st=pe(je);cn(st,17,()=>Object.entries(ae()[ae().length-1]),on,(rt,it)=>{var we=Ve(()=>Jn(K(it),2));let Ue=()=>K(we)[0],He=()=>K(we)[1];var ht=Te(),Dt=pe(ht);{var jt=ot=>{{let Ut=Ve(()=>a(`${oe()}-${Ue()}`)),Ht=Ve(()=>typeof K(t)[oe()][1]<"u"),qt=Ve(()=>`${oe()}-${Ue()}`);Qt(ot,{get buttonAction(){return K(Ut)},get response(){return K(Ht)},get id(){return K(qt)},get entry(){return He()}})}};ge(Dt,ot=>{He()&&ot(jt)})}F(rt,ht)}),F(Ce,je)},Pt=Ce=>{var je=Te(),st=pe(je);{var rt=we=>{{let Ue=Ve(()=>a(oe()));Qt(we,{get buttonAction(){return K(Ue)},get id(){return oe()},response:!0,get entry(){return ae()[1]}})}},it=we=>{{let Ue=Ve(()=>a(oe()));Qt(we,{get buttonAction(){return K(Ue)},get id(){return oe()},response:!1,get entry(){return ae()[0]}})}};ge(st,we=>{Object.prototype.hasOwnProperty.call(ae()[1],"context")?we(rt):we(it,!1)},!0)}F(Ce,je)};ge(Ye,Ce=>{Array.isArray(ae()[ae().length-1])?Ce(It):Ce(Pt,!1)})}F(se,ce)}),R(j),F(D,j)};ge(d,D=>{Object.keys(K(t)).length===0?D(b):D(k,!1)})}R(u),R(p),R(c);var T=W(c,2),O=B(T),_=B(O),g=B(_),z=W(B(g),2);z.__click=()=>Ke(s,!1),R(g),_s(2),R(_);var Y=W(_,2),N=B(Y),Z=W(B(N),2),ee=B(Z);es(ee,{get language(){return ts},get code(){return K(r)}}),R(Z),R(N);var J=W(N,2),I=W(B(J),2),q=B(I);es(q,{get language(){return ts},get code(){return K(o)}}),R(I),R(J),R(Y);var A=W(Y,2),P=B(A);P.__click=()=>Ke(s,!1),R(A),R(O),R(T),de(()=>xn(T,1,`${K(s)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`)),F(n,f),De()}hs(["click"]);var Ti=Object.create,Ni=Object.getPrototypeOf,ss=Object.defineProperty,Ci=Object.getOwnPropertyNames,Mi=Object.prototype.hasOwnProperty,Bi=(n,e,t)=>{t=n!=null?Ti(Ni(n)):{};const s=ss(t,"default",{value:n,enumerable:!0});for(let r of Ci(n))Mi.call(s,r)||ss(s,r,{get:()=>n[r],enumerable:!0});return s},Li=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ii=Li((n,e)=>{var t=Object.prototype.hasOwnProperty,s="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(s=!1));function o(p,u,d){this.fn=p,this.context=u,this.once=d||!1}function a(p,u,d,b,k){if(typeof d!="function")throw new TypeError("The listener must be a function");var T=new o(d,b||p,k),O=s?s+u:u;return p._events[O]?p._events[O].fn?p._events[O]=[p._events[O],T]:p._events[O].push(T):(p._events[O]=T,p._eventsCount++),p}function f(p,u){--p._eventsCount===0?p._events=new r:delete p._events[u]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],d,b;if(this._eventsCount===0)return u;for(b in d=this._events)t.call(d,b)&&u.push(s?b.slice(1):b);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},c.prototype.listeners=function(u){var d=s?s+u:u,b=this._events[d];if(!b)return[];if(b.fn)return[b.fn];for(var k=0,T=b.length,O=new Array(T);k<T;k++)O[k]=b[k].fn;return O},c.prototype.listenerCount=function(u){var d=s?s+u:u,b=this._events[d];return b?b.fn?1:b.length:0},c.prototype.emit=function(u,d,b,k,T,O){var _=s?s+u:u;if(!this._events[_])return!1;var g=this._events[_],z=arguments.length,Y,N;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),z){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,d),!0;case 3:return g.fn.call(g.context,d,b),!0;case 4:return g.fn.call(g.context,d,b,k),!0;case 5:return g.fn.call(g.context,d,b,k,T),!0;case 6:return g.fn.call(g.context,d,b,k,T,O),!0}for(N=1,Y=new Array(z-1);N<z;N++)Y[N-1]=arguments[N];g.fn.apply(g.context,Y)}else{var Z=g.length,ee;for(N=0;N<Z;N++)switch(g[N].once&&this.removeListener(u,g[N].fn,void 0,!0),z){case 1:g[N].fn.call(g[N].context);break;case 2:g[N].fn.call(g[N].context,d);break;case 3:g[N].fn.call(g[N].context,d,b);break;case 4:g[N].fn.call(g[N].context,d,b,k);break;default:if(!Y)for(ee=1,Y=new Array(z-1);ee<z;ee++)Y[ee-1]=arguments[ee];g[N].fn.apply(g[N].context,Y)}}return!0},c.prototype.on=function(u,d,b){return a(this,u,d,b,!1)},c.prototype.once=function(u,d,b){return a(this,u,d,b,!0)},c.prototype.removeListener=function(u,d,b,k){var T=s?s+u:u;if(!this._events[T])return this;if(!d)return f(this,T),this;var O=this._events[T];if(O.fn)O.fn===d&&(!k||O.once)&&(!b||O.context===b)&&f(this,T);else{for(var _=0,g=[],z=O.length;_<z;_++)(O[_].fn!==d||k&&!O[_].once||b&&O[_].context!==b)&&g.push(O[_]);g.length?this._events[T]=g.length===1?g[0]:g:f(this,T)}return this},c.prototype.removeAllListeners=function(u){var d;return u?(d=s?s+u:u,this._events[d]&&f(this,d)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=s,c.EventEmitter=c,typeof e<"u"&&(e.exports=c)}),Pi=Bi(Ii()),xs=Pi.default;/*!
|
|
9
|
+
* activity-streams
|
|
10
|
+
* https://github.com/silverbucket/activity-streams
|
|
11
|
+
*
|
|
12
|
+
* Developed and Maintained by:
|
|
13
|
+
* Nick Jennings <nick@silverbucket.net>
|
|
14
|
+
*
|
|
15
|
+
* activity-streams is released under the MIT (see LICENSE).
|
|
16
|
+
*
|
|
17
|
+
* You don't have to do anything special to choose one license or the other
|
|
18
|
+
* and you don't have to notify anyone which license you are using.
|
|
19
|
+
* Please see the corresponding license file for details of these licenses.
|
|
20
|
+
* You are free to use, modify and distribute this software, but all copyright
|
|
21
|
+
* information must remain.
|
|
22
|
+
*
|
|
23
|
+
*/var tt=new xs,kt={stream:["id","type","actor","target","object","context","context","published","error"],object:["id","type","context","alias","attachedTo","attachment","attributedTo","attributedWith","condition","content","contentMap","context","contextOf","name","endTime","generator","generatorOf","group","icon","image","inReplyTo","members","memberOf","message","location","locationOf","objectOf","originOf","presence","preview","previewOf","provider","providerOf","published","rating","relationship","resultOf","replies","role","scope","scopeOf","startTime","status","summary","topic","tag","tagOf","targetOf","title","titleMap","updated","url","xmpp:stanza-id"]},ks={"@id":"id","@type":"type",verb:"type",displayName:"name",objectType:"type",platform:"context"},rs={actor:{primary:"id",props:kt},target:{primary:"id",props:kt},object:{primary:"content",props:kt}},Ze=new Map,un={},fn=!1,hn=!0,Os=[];function Di(n,e){return!!(un[n]instanceof Object&&un[n].includes(e))}function ji(n,e){return n[ks[e]]=n[e],delete n[e],n}function dn(n,e,t=!1){if(e===null)throw new Error(`ActivityStreams validation failed: the "${n}" property is null. Example: { id: "user@example.com", type: "person" }`);if(e===void 0)throw new Error(`ActivityStreams validation failed: the "${n}" property is undefined. Example: { id: "user@example.com", type: "person" }`);if(typeof e=="string")throw new Error(`ActivityStreams validation failed: the "${n}" property received string "${e}" but expected an object. Use: { id: "${e}", type: "person" }`);if(typeof e!="object"||Array.isArray(e)){const o=Array.isArray(e)?"array":typeof e,a=String(e);throw new Error(`ActivityStreams validation failed: the "${n}" property must be an object, received ${o} (${a}). Example: { id: "user@example.com", type: "person" }`)}if(t&&!e.id)throw new Error(`ActivityStreams validation failed: the "${n}" property requires an 'id' property. Example: { id: "user@example.com", type: "person" }`);const r=Object.keys(e).filter(o=>!kt[n].includes(o));for(const o of r){let a=e;if(ks[o]){a=ji(a,o);continue}if(!Di(a.type,o)&&!Os.includes(a.type)){console.log(a);const f=typeof a[o]=="string"?`"${a[o]}"`:String(a[o]),c=`ActivityStreams validation failed: property "${o}" with value ${f} is not allowed on the "${n}" object of type "${a.type}".`;if(fn)throw new Error(c);hn&&console.warn(c)}}}function Ui(n){const e={};for(const t of Object.keys(n))if(typeof n[t]=="string")e[t]=Ze.get(n[t])||n[t];else if(Array.isArray(n[t])){e[t]=[];for(const s of n[t])typeof s=="string"&&e[t].push(Ze.get(s)||s)}else e[t]=n[t];for(const t of Object.keys(rs))if(typeof e[t]=="string"){const s=rs[t].primary,r={};r[s]=e[t],e[t]=r}return e}function Hi(n){dn("stream",n),typeof n.object=="object"&&dn("object",n.object);const e=Ui(n);return tt.emit("activity-stream",e),e}var qi={create:n=>{dn("object",n,!0);const e=n;return Ze.set(e.id,e),tt.emit("activity-object-create",e),e},delete:n=>{const e=Ze.delete(n);return e&&tt.emit("activity-object-delete",n),e},get:(n,e)=>{let t=Ze.get(n);if(!t){if(!e)return n;t={id:n}}return t},list:()=>Ze.keys()};function Ss(n={}){Os=(n==null?void 0:n.specialObjs)||[],fn=typeof n.failOnUnknownObjectProperties=="boolean"?n.failOnUnknownObjectProperties:fn,hn=typeof n.warnOnUnknownObjectProperties=="boolean"?n.warnOnUnknownObjectProperties:hn;for(const e of Object.keys(n.customProps||{}))typeof n.customProps[e]=="object"&&(un[e]=n.customProps[e]);return{Stream:Hi,Object:qi,on:(e,t)=>tt.on(e,t),once:(e,t)=>tt.once(e,t),off:(e,t)=>tt.off(e,t)}}(n=>{n.ASFactor=Ss})(typeof window=="object"?window:{});class Mt{constructor(e){Je(this,"events",{credentials:new Map,"activity-object":new Map,connect:new Map,join:new Map});Je(this,"_socket");Je(this,"ActivityStreams");Je(this,"socket");Je(this,"debug",!0);if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this.initActivityStreams(),this.ActivityStreams.on("activity-object-create",t=>{e.emit("activity-object",t,s=>{s?console.error("failed to create activity-object ",s):this.eventActivityObject(t)})}),e.on("activity-object",t=>{this.ActivityStreams.Object.create(t)})}initActivityStreams(){this.ActivityStreams=Ss({specialObjs:["credentials"]})}clearCredentials(){this.events.credentials.clear()}createPublicEmitter(){const e=new xs;return e._emit=e.emit,e.emit=(t,s,r)=>{t==="credentials"?this.eventCredentials(s):t==="activity-object"?this.eventActivityObject(s):t==="message"&&this.eventMessage(s),this._socket.emit(t,s,r)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}eventActivityObject(e){e.id&&this.events["activity-object"].set(e.id,e)}eventCredentials(e){if(e.object&&e.object.type==="credentials"){const t=e.actor.id||e.actor;this.events.credentials.set(t,e)}}eventMessage(e){if(!this._socket.connected)return;const t=Mt.getKey(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(t,e):e.type==="leave"?this.events.join.delete(t):e.type==="disconnect"&&this.events.connect.delete(t)}static getKey(e){var r;const t=((r=e.actor)==null?void 0:r.id)||e.actor;if(!t)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const s=e.target?e.target.id||e.target:"";return`${t}-${s}`}log(e,t){this.debug&&console.log(e,t)}registerSocketIOHandlers(){const e=t=>async s=>{t==="connect"?(this.socket.id=this._socket.id,this.socket.connected=!0,this.replay("activity-object",this.events["activity-object"]),this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)):t==="disconnect"&&(this.socket.connected=!1),this.socket._emit(t,s)};this._socket.on("connect",e("connect")),this._socket.on("connect_error",e("connect_error")),this._socket.on("disconnect",e("disconnect")),this._socket.on("message",t=>{this.socket._emit("message",this.ActivityStreams.Stream(t))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,t){for(const s of t.values()){const r=this.ActivityStreams.Stream(s);let o=r==null?void 0:r.id;this.hasActorId(r)&&(o=r.actor.id),this.log(`replaying ${e} for ${o}`),this._socket.emit(e,r)}}}(n=>{n.SockethubClient=Mt})(typeof window=="object"?window:{});const Ae=Object.create(null);Ae.open="0";Ae.close="1";Ae.ping="2";Ae.pong="3";Ae.message="4";Ae.upgrade="5";Ae.noop="6";const Ot=Object.create(null);Object.keys(Ae).forEach(n=>{Ot[Ae[n]]=n});const pn={type:"error",data:"parser error"},As=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Rs=typeof ArrayBuffer=="function",Ts=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,On=({type:n,data:e},t,s)=>As&&e instanceof Blob?t?s(e):is(e,s):Rs&&(e instanceof ArrayBuffer||Ts(e))?t?s(e):is(new Blob([e]),s):s(Ae[n]+(e||"")),is=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function os(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let en;function Fi(n,e){if(As&&n.data instanceof Blob)return n.data.arrayBuffer().then(os).then(e);if(Rs&&(n.data instanceof ArrayBuffer||Ts(n.data)))return e(os(n.data));On(n,!1,t=>{en||(en=new TextEncoder),e(en.encode(t))})}const as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ut=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<as.length;n++)ut[as.charCodeAt(n)]=n;const Vi=n=>{let e=n.length*.75,t=n.length,s,r=0,o,a,f,c;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const p=new ArrayBuffer(e),u=new Uint8Array(p);for(s=0;s<t;s+=4)o=ut[n.charCodeAt(s)],a=ut[n.charCodeAt(s+1)],f=ut[n.charCodeAt(s+2)],c=ut[n.charCodeAt(s+3)],u[r++]=o<<2|a>>4,u[r++]=(a&15)<<4|f>>2,u[r++]=(f&3)<<6|c&63;return p},Ki=typeof ArrayBuffer=="function",Sn=(n,e)=>{if(typeof n!="string")return{type:"message",data:Ns(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:zi(n.substring(1),e)}:Ot[t]?n.length>1?{type:Ot[t],data:n.substring(1)}:{type:Ot[t]}:pn},zi=(n,e)=>{if(Ki){const t=Vi(n);return Ns(t,e)}else return{base64:!0,data:n}},Ns=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Cs="",Wi=(n,e)=>{const t=n.length,s=new Array(t);let r=0;n.forEach((o,a)=>{On(o,!1,f=>{s[a]=f,++r===t&&e(s.join(Cs))})})},Yi=(n,e)=>{const t=n.split(Cs),s=[];for(let r=0;r<t.length;r++){const o=Sn(t[r],e);if(s.push(o),o.type==="error")break}return s};function Xi(){return new TransformStream({transform(n,e){Fi(n,t=>{const s=t.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,s)}else{r=new Uint8Array(9);const o=new DataView(r.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(t)})}})}let tn;function wt(n){return n.reduce((e,t)=>e+t.length,0)}function Et(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let r=0;r<e;r++)t[r]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function Gi(n,e){tn||(tn=new TextDecoder);const t=[];let s=0,r=-1,o=!1;return new TransformStream({transform(a,f){for(t.push(a);;){if(s===0){if(wt(t)<1)break;const c=Et(t,1);o=(c[0]&128)===128,r=c[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(wt(t)<2)break;const c=Et(t,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),s=3}else if(s===2){if(wt(t)<8)break;const c=Et(t,8),p=new DataView(c.buffer,c.byteOffset,c.length),u=p.getUint32(0);if(u>Math.pow(2,21)-1){f.enqueue(pn);break}r=u*Math.pow(2,32)+p.getUint32(4),s=3}else{if(wt(t)<r)break;const c=Et(t,r);f.enqueue(Sn(o?c:tn.decode(c),e)),s=0}if(r===0||r>n){f.enqueue(pn);break}}}})}const Ms=4;function ne(n){if(n)return Ji(n)}function Ji(n){for(var e in ne.prototype)n[e]=ne.prototype[e];return n}ne.prototype.on=ne.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};ne.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};ne.prototype.off=ne.prototype.removeListener=ne.prototype.removeAllListeners=ne.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,r=0;r<t.length;r++)if(s=t[r],s===e||s.fn===e){t.splice(r,1);break}return t.length===0&&delete this._callbacks["$"+n],this};ne.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,r=t.length;s<r;++s)t[s].apply(this,e)}return this};ne.prototype.emitReserved=ne.prototype.emit;ne.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};ne.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Bt=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),me=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Qi="arraybuffer";function Bs(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const $i=me.setTimeout,Zi=me.clearTimeout;function Lt(n,e){e.useNativeTimers?(n.setTimeoutFn=$i.bind(me),n.clearTimeoutFn=Zi.bind(me)):(n.setTimeoutFn=me.setTimeout.bind(me),n.clearTimeoutFn=me.clearTimeout.bind(me))}const eo=1.33;function to(n){return typeof n=="string"?no(n):Math.ceil((n.byteLength||n.size)*eo)}function no(n){let e=0,t=0;for(let s=0,r=n.length;s<r;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function Ls(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function so(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function ro(n){let e={},t=n.split("&");for(let s=0,r=t.length;s<r;s++){let o=t[s].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class io extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class An extends ne{constructor(e){super(),this.writable=!1,Lt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new io(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Sn(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=so(e);return t.length?"?"+t:""}}class oo extends An{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Yi(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Wi(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Ls()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let Is=!1;try{Is=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ao=Is;function co(){}class lo extends oo{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(r,o)=>{this.onError("xhr post error",r,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class Se extends ne{constructor(e,t,s){super(),this.createRequest=e,Lt(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=Bs(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=Se.requestsCount++,Se.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=co,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Se.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Se.requestsCount=0;Se.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cs);else if(typeof addEventListener=="function"){const n="onpagehide"in me?"pagehide":"unload";addEventListener(n,cs,!1)}}function cs(){for(let n in Se.requests)Se.requests.hasOwnProperty(n)&&Se.requests[n].abort()}const uo=function(){const n=Ps({xdomain:!1});return n&&n.responseType!==null}();class fo extends lo{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=uo&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Se(Ps,this.uri(),e)}}function Ps(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||ao))return new XMLHttpRequest}catch{}if(!e)try{return new me[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ds=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ho extends An{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=Ds?{}:Bs(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;On(s,this.supportsBinary,o=>{try{this.doWrite(s,o)}catch{}r&&Bt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Ls()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const nn=me.WebSocket||me.MozWebSocket;class po extends ho{createSocket(e,t,s){return Ds?new nn(e,t,s):t?new nn(e,t):new nn(e)}doWrite(e,t){this.ws.send(t)}}class go extends An{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=Gi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),r=Xi();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{s.read().then(({done:f,value:c})=>{f||(this.onPacket(c),o())}).catch(f=>{})};o();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&Bt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const yo={websocket:po,webtransport:go,polling:fo},vo=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gn(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let r=vo.exec(n||""),o={},a=14;for(;a--;)o[_o[a]]=r[a]||"";return t!=-1&&s!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=bo(o,o.path),o.queryKey=mo(o,o.query),o}function bo(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function mo(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,o){r&&(t[r]=o)}),t}const yn=typeof addEventListener=="function"&&typeof removeEventListener=="function",St=[];yn&&addEventListener("offline",()=>{St.forEach(n=>n())},!1);class Ie extends ne{constructor(e,t){if(super(),this.binaryType=Qi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=gn(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=gn(t.host).host);Lt(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const r=s.prototype.name;this.transports.push(r),this._transportsByName[r]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ro(this.opts.query)),yn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},St.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ms,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ie.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Ie.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(t+=to(r)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Bt(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if(typeof t=="function"&&(r=t,t=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const o={type:e,data:t,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Ie.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=St.indexOf(this._offlineEventListener);s!==-1&&St.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Ie.protocol=Ms;class wo extends Ie{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;Ie.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",d=>{if(!s)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Ie.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=t.name,this.emitReserved("upgradeError",b)}}))};function o(){s||(s=!0,u(),t.close(),t=null)}const a=d=>{const b=new Error("probe error: "+d);b.transport=t.name,o(),this.emitReserved("upgradeError",b)};function f(){a("transport closed")}function c(){a("socket closed")}function p(d){t&&d.name!==t.name&&o()}const u=()=>{t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",f),this.off("close",c),this.off("upgrading",p)};t.once("open",r),t.once("error",a),t.once("close",f),this.once("close",c),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let Eo=class extends wo{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(r=>yo[r]).filter(r=>!!r)),super(e,s)}};function xo(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=gn(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const o=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+o+":"+s.port+e,s.href=s.protocol+"://"+o+(t&&t.port===s.port?"":":"+s.port),s}const ko=typeof ArrayBuffer=="function",Oo=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,js=Object.prototype.toString,So=typeof Blob=="function"||typeof Blob<"u"&&js.call(Blob)==="[object BlobConstructor]",Ao=typeof File=="function"||typeof File<"u"&&js.call(File)==="[object FileConstructor]";function Rn(n){return ko&&(n instanceof ArrayBuffer||Oo(n))||So&&n instanceof Blob||Ao&&n instanceof File}function At(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(At(n[t]))return!0;return!1}if(Rn(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return At(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&At(n[t]))return!0;return!1}function Ro(n){const e=[],t=n.data,s=n;return s.data=vn(t,e),s.attachments=e.length,{packet:s,buffers:e}}function vn(n,e){if(!n)return n;if(Rn(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=vn(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=vn(n[s],e));return t}return n}function To(n,e){return n.data=_n(n.data,e),delete n.attachments,n}function _n(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=_n(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=_n(n[t],e));return n}const No=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Co=5;var H;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(H||(H={}));class Mo{constructor(e){this.replacer=e}encode(e){return(e.type===H.EVENT||e.type===H.ACK)&&At(e)?this.encodeAsBinary({type:e.type===H.EVENT?H.BINARY_EVENT:H.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===H.BINARY_EVENT||e.type===H.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Ro(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}}function ls(n){return Object.prototype.toString.call(n)==="[object Object]"}class Tn extends ne{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===H.BINARY_EVENT;s||t.type===H.BINARY_ACK?(t.type=s?H.EVENT:H.ACK,this.reconstructor=new Bo(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Rn(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(H[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===H.BINARY_EVENT||s.type===H.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const a=e.substring(o,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(a)}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(o,t)}else s.nsp="/";const r=e.charAt(t+1);if(r!==""&&Number(r)==r){const o=t+1;for(;++t;){const a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}s.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(Tn.isPayloadValid(s.type,o))s.data=o;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case H.CONNECT:return ls(t);case H.DISCONNECT:return t===void 0;case H.CONNECT_ERROR:return typeof t=="string"||ls(t);case H.EVENT:case H.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&No.indexOf(t[0])===-1);case H.ACK:case H.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bo{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=To(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Lo=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Tn,Encoder:Mo,get PacketType(){return H},protocol:Co},Symbol.toStringTag,{value:"Module"}));function xe(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const Io=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Us extends ne{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[xe(e,"open",this.onopen.bind(this)),xe(e,"packet",this.onpacket.bind(this)),xe(e,"error",this.onerror.bind(this)),xe(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,o;if(Io.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:H.EVENT,data:t};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const u=this.ids++,d=t.pop();this._registerAckCallback(u,d),a.id=u}const f=(r=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||r===void 0?void 0:r.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!f||(c?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===e&&this.sendBuffer.splice(f,1);t.call(this,new Error("operation has timed out"))},r),a=(...f)=>{this.io.clearTimeoutFn(o),t.apply(this,f)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((s,r)=>{const o=(a,f)=>a?r(a):s(f);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...o)=>(this._queue[0],r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(r)):(this._queue.shift(),t&&t(null,...o)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:H.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case H.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case H.EVENT:case H.BINARY_EVENT:this.onevent(e);break;case H.ACK:case H.BINARY_ACK:this.onack(e);break;case H.DISCONNECT:this.ondisconnect();break;case H.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:H.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:H.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function nt(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}nt.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-t:n+t}return Math.min(n,this.max)|0};nt.prototype.reset=function(){this.attempts=0};nt.prototype.setMin=function(n){this.ms=n};nt.prototype.setMax=function(n){this.max=n};nt.prototype.setJitter=function(n){this.jitter=n};class bn extends ne{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Lt(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new nt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||Lo;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Eo(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=xe(t,"open",function(){s.onopen(),e&&e()}),o=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),e?e(f):this.maybeReconnectOnOpen()},a=xe(t,"error",o);if(this._timeout!==!1){const f=this._timeout,c=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},f);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(xe(e,"ping",this.onping.bind(this)),xe(e,"data",this.ondata.bind(this)),xe(e,"error",this.onerror.bind(this)),xe(e,"close",this.onclose.bind(this)),xe(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Bt(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Us(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ct={};function Rt(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=xo(n,e.path||"/socket.io"),s=t.source,r=t.id,o=t.path,a=ct[r]&&o in ct[r].nsps,f=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let c;return f?c=new bn(s,e):(ct[r]||(ct[r]=new bn(s,e)),c=ct[r]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(Rt,{Manager:bn,Socket:Us,io:Rt,connect:Rt});let Qe;const Po=En(!1),Do={sockethub:{port:10550,host:"localhost",path:"/sockethub"},public:{protocol:"http",host:"localhost",port:10550,path:"/"}};async function Jo(n){return console.log("sending ->",n),new Promise((e,t)=>{Qe.socket.emit("message",Zt("SEND",n),s=>{if(console.log("received <-",s),Zt("RESP",s),s.totalItems&&s.items)for(const r of s.items.reverse())Zt("RESP",r,!0);ws(s,!0),s.error?t(s.error):e(s)})})}function sn(n){return e=>{const t=n==="connect";Po.update(()=>t),console.log(`sockethub ${n} [connected: ${t}]`,e||"")}}function jo(n){console.log("handle incoming: ",n),ws(n,!1)}function us(n=Do){Qe=new Mt(Rt(`${n.public.protocol}://${n.public.host}:${n.public.port}`,{path:n.sockethub.path})),Qe.socket.on("connect",sn("connect")),Qe.socket.on("error",sn("error")),Qe.socket.on("disconnect",sn("disconnect")),Qe.socket.on("message",jo)}typeof window=="object"&&(console.log("connecting to sockethub"),fetch("/config.json").then(async n=>{const e=await n.json();us(e)}).catch(()=>{us()}));export{Yo as I,Xo as L,Qe as a,ms as b,Po as c,cn as e,ti as h,on as i,Jo as s};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{f as y,a as v,s as A,t as C}from"./DqdrLdzV.js";import{p as h,G,t as S,a as w,b as k,d as R,f as W,c as u,r as b,s as f,g as r,u as q,n as z}from"./Ciq9INsC.js";import{p as _,i as E,b as F,s as H}from"./Cf7Xaqef.js";import{s as O,r as I}from"./P3PHXZz3.js";import{b as T,S as K}from"./CFHe0i8O.js";import{a as L}from"./BBdxXcNs.js";var M=y(`<textarea class="form-control block w-full px-3 py-1.5 text-base font-normal
|
|
2
|
+
text-gray-700 bg-white bg-clip-padding border border-solid
|
|
3
|
+
border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700
|
|
4
|
+
focus:bg-white focus:border-blue-600 focus:outline-none" rows="5"></textarea>`);function Q(s,t){h(t,!0);let o=_(t,"data",15);var e=M();G(e),S(()=>O(e,"id",`json-object-${t.title??""}`)),T(e,o),v(s,e),w()}var U=y('<div class="w-full p-2"><label for="server" class="inline-block text-gray-900 font-bold w-32">Password</label> <input id="server" type="password" class="border-4"/></div>'),V=y('<div class="w-full"><label class="form-label inline-block text-gray-900 font-bold mb-2"> </label> <!></div> <!> <div class="w-full text-right"><!></div>',1);function X(s,t){h(t,!0);let o=_(t,"buttonText",3,"Send"),e=_(t,"obj",15),a=R("unset");e().password&&(k(a,e().password,!0),e(e().password=void 0,!0));const m=q(()=>JSON.stringify(e(),null,3));async function g(){console.log("PASSWORD: ",r(a)),r(a)!=="unset"&&e(e().password=r(a),!0),t.submitData(JSON.stringify(e()))}var i=V(),x=W(i),c=u(x),D=u(c,!0);b(c);var J=f(c,2);Q(J,{get title(){return t.title},get data(){return r(m)}}),b(x);var j=f(x,2);{var N=n=>{var d=U(),l=f(u(d),2);I(l),b(d),T(l,()=>r(a),B=>k(a,B)),v(n,d)};E(j,n=>{r(a)!=="unset"&&n(N)})}var p=f(j,2),P=u(p);K(P,{get disabled(){return t.disabled},buttonAction:g,children:(n,d)=>{z();var l=C();S(()=>A(l,o())),v(n,l)}}),b(p),S(()=>{O(c,"for",`json-object-${t.title??""}`),A(D,t.title)}),v(s,i),w()}function rt(s,t){h(t,!0);const o=()=>F(t.sockethubState,"$sockethubState",e),[e,a]=H();function m(g){const i=JSON.parse(g);console.log("creating activity object: ",i),L.ActivityStreams.Object.create(i),t.sockethubState.set({actorSet:!0,credentialsSet:!1,connected:!1,joined:!1})}X(s,{title:"Activity Stream Actor",get obj(){return t.actor},buttonText:"Activity Object Create",submitData:m,get disabled(){return o().actorSet}}),w(),a()}export{rt as A,X as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as a}from"./Ciq9INsC.js";a();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Jt=t=>{throw TypeError(t)};var Ue=(t,e,n)=>e.has(t)||Jt("Cannot "+n);var w=(t,e,n)=>(Ue(t,e,"read from private field"),n?n.call(t):e.get(t)),L=(t,e,n)=>e.has(t)?Jt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{d as T,g as I,b as O,I as ht,bf as Te}from"./Ciq9INsC.js";import{w as $t,o as Xt}from"./CARmnL8B.js";import{a as Ie,b as U}from"./Br1aAxXP.js";class jt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Nt{constructor(e,n){this.status=e,this.location=n}}class Dt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}new URL("sveltekit-internal://");function Oe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Pe(t){return t.split("%25").map(decodeURI).join("%25")}function Ce(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function xt({href:t}){return t.split("#")[0]}function $e(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function je(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}const Ne=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(qt(t)),Ne(t,e));const Y=new Map;function De(t,e){const n=qt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&Y.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=je(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function qe(t,e,n){if(Y.size>0){const r=qt(t,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(e,n)}function qt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${$e(...a)}"]`}return r}const Ve=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Be(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Me(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return At(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return At(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=Ve.exec(c),[,u,y,f,h]=d;return e.push({name:f,matcher:h,optional:!!u,rest:!!y,chained:y?l===1&&o[0]==="":!1}),y?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return At(c)}).join("")}).join("")}/?$`),params:e}}function Ke(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Me(t){return t.slice(1).split("/").filter(Ke)}function Fe(t,e,n){const r={},a=t.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<e.length;i+=1){const c=e[i];let l=a[i-o];if(c.chained&&c.rest&&o&&(l=a.slice(i-o,i+1).filter(d=>d).join("/"),o=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&c.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return r}function At(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ge({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[c,l,d]])=>{const{pattern:u,params:y}=Be(i),f={id:i,exec:h=>{const _=u.exec(h);if(_)return Fe(_,y,r)},errors:[1,...d||[]].map(h=>t[h]),layouts:[0,...l||[]].map(o),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function o(i){return i===void 0?i:[a.has(i),t[i]]}}function ce(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const We="1769133023570",le="sveltekit:snapshot",fe="sveltekit:scroll",ue="sveltekit:states",Ye="sveltekit:pageurl",F="sveltekit:history",H="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Vt=location.origin;function de(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function kt(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Zt={...D,"":D.hover};function he(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function pe(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=he(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||St(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===Vt&&t.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function pt(t){let e=null,n=null,r=null,a=null,s=null,o=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=M(i,"preload-code")),a===null&&(a=M(i,"preload-data")),e===null&&(e=M(i,"keepfocus")),n===null&&(n=M(i,"noscroll")),s===null&&(s=M(i,"reload")),o===null&&(o=M(i,"replacestate")),i=he(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Zt[r??"off"],preload_data:Zt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(o)}}function te(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(o=>o)}function a(o){n=!1,e.set(o)}function s(o){let i;return e.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:r,set:a,subscribe:s}}const ge={v:()=>{}};function ze(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==We;return o&&(t(!0),ge.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function St(t,e,n){return t.origin!==Vt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Rn(t){}const me=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...me];const He=new Set([...me]);[...He];function Je(t){return t.filter(e=>e!=null)}function Bt(t){return t instanceof jt||t instanceof Dt?t.status:500}function Xe(t){return t instanceof Dt?t.text:"Internal Error"}let R,J,Lt;const Qe=Xt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Xt.toString());var et,nt,at,rt,ot,st,it,ct,oe,lt,se,ft,ie;Qe?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},Lt={current:!1}):(R=new(oe=class{constructor(){L(this,et,T({}));L(this,nt,T(null));L(this,at,T(null));L(this,rt,T({}));L(this,ot,T({id:null}));L(this,st,T({}));L(this,it,T(-1));L(this,ct,T(new URL("https://example.com")))}get data(){return I(w(this,et))}set data(e){O(w(this,et),e)}get form(){return I(w(this,nt))}set form(e){O(w(this,nt),e)}get error(){return I(w(this,at))}set error(e){O(w(this,at),e)}get params(){return I(w(this,rt))}set params(e){O(w(this,rt),e)}get route(){return I(w(this,ot))}set route(e){O(w(this,ot),e)}get state(){return I(w(this,st))}set state(e){O(w(this,st),e)}get status(){return I(w(this,it))}set status(e){O(w(this,it),e)}get url(){return I(w(this,ct))}set url(e){O(w(this,ct),e)}},et=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,oe),J=new(se=class{constructor(){L(this,lt,T(null))}get current(){return I(w(this,lt))}set current(e){O(w(this,lt),e)}},lt=new WeakMap,se),Lt=new(ie=class{constructor(){L(this,ft,T(!1))}get current(){return I(w(this,ft))}set current(e){O(w(this,ft),e)}},ft=new WeakMap,ie),ge.v=()=>Lt.current=!0);function Ze(t){Object.assign(R,t)}const tn=new Set(["icon","shortcut icon","apple-touch-icon"]),V=ce(fe)??{},X=ce(le)??{},N={url:te({}),page:te({}),navigating:$t(null),updated:ze()};function Kt(t){V[t]=kt()}function en(t,e){let n=t+1;for(;V[n];)delete V[n],n+=1;for(n=e+1;X[n];)delete X[n],n+=1}function Q(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ee(){}let Mt,It,gt,C,Ot,b;const mt=[],_t=[];let v=null;function Pt(){var t;(t=v==null?void 0:v.fork)==null||t.then(e=>e==null?void 0:e.discard()),v=null}const dt=new Map,we=new Set,nn=new Set,z=new Set;let m={branch:[],error:null,url:null},ve=!1,wt=!1,ne=!0,Z=!1,W=!1,ye=!1,Ft=!1,be,S,A,q;const vt=new Set,ae=new Map;async function Un(t,e,n){var s,o,i,c,l;(s=globalThis.__sveltekit_s9fgxq)!=null&&s.data&&globalThis.__sveltekit_s9fgxq.data,document.URL!==location.href&&(location.href=location.href),b=t,await((i=(o=t.hooks).init)==null?void 0:i.call(o)),Mt=Ge(t),C=document.documentElement,Ot=e,It=t.nodes[0],gt=t.nodes[1],It(),gt(),S=(c=history.state)==null?void 0:c[F],A=(l=history.state)==null?void 0:l[H],S||(S=A=Date.now(),history.replaceState({...history.state,[F]:S,[H]:A},""));const r=V[S];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await _n(Ot,n)):(await G({type:"enter",url:de(b.hash?yn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function an(){mt.length=0,Ft=!1}function ke(t){_t.some(e=>e==null?void 0:e.snapshot)&&(X[t]=_t.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=X[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=_t[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function re(){Kt(S),Qt(fe,V),ke(A),Qt(le,X)}async function rn(t,e,n,r){let a;e.invalidateAll&&Pt(),await G({type:"goto",url:de(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Ft=!0,a=[...ae.keys()]),e.invalidate&&e.invalidate.forEach(gn)}}),e.invalidateAll&&ht().then(ht).then(()=>{ae.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function on(t){if(t.id!==(v==null?void 0:v.id)){Pt();const e={};vt.add(e),v={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(vt.delete(e),n.type==="loaded"&&n.state.error&&Pt(),n)),fork:null}}return v.promise}async function Ut(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}async function Ee(t,e,n){var a;m=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),be=new b.root({target:e,props:{...t.props,stores:N,components:_t},hydrate:n,sync:!1}),await Promise.resolve(),Se(A),n){const s={from:null,to:{params:m.params,route:{id:((a=m.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(o=>o(s))}wt=!0}function yt({url:t,params:e,branch:n,status:r,error:a,route:s,form:o}){let i="never";if(U&&(t.pathname===U||t.pathname===U+"/"))i="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=Oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:Je(n).map(f=>f.node.component),page:Ht(R)}};o!==void 0&&(c.props.form=o);let l={},d=!R,u=0;for(let f=0;f<Math.max(n.length,m.branch.length);f+=1){const h=n[f],_=m.branch[f];(h==null?void 0:h.data)!==(_==null?void 0:_.data)&&(d=!0),h&&(l={...l,...h.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!m.url||t.href!==m.url.href||m.error!==a||o!==void 0&&o!==R.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:d?l:R.data}),c}async function Gt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var l,d;let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:s,universal:(l=c.universal)!=null&&l.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((d=c.universal)==null?void 0:d.trailingSlash)??(s==null?void 0:s.slash)}}function sn(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=wt?qe(r,a.href,e):De(r,e);return{resolved:a,promise:s}}function cn(t,e,n,r,a,s){if(Ft)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==m.params[o])return!0;for(const o of a.dependencies)if(mt.some(i=>i(new URL(o))))return!0;return!1}function Wt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function ln(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function fn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Ht(R),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((v==null?void 0:v.id)===t)return vt.delete(v.token),v.promise;const{errors:o,layouts:i,leaf:c}=a,l=[...i,c];o.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));const d=m.url?t!==bt(m.url):!1,u=m.route?a.id!==m.route.id:!1,y=ln(m.url,n);let f=!1;const h=l.map(async(g,p)=>{var $;if(!g)return;const k=m.branch[p];return g[1]===(k==null?void 0:k.loader)&&!cn(f,u,d,y,($=k.universal)==null?void 0:$.uses,r)?k:(f=!0,Gt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var ut;const P={};for(let B=0;B<p;B+=1)Object.assign(P,(ut=await h[B])==null?void 0:ut.data);return P},server_data_node:Wt(g[0]?{type:"skip"}:null,g[0]?k==null?void 0:k.server:void 0)}))});for(const g of h)g.catch(()=>{});const _=[];for(let g=0;g<l.length;g+=1)if(l[g])try{_.push(await h[g])}catch(p){if(p instanceof Nt)return{type:"redirect",location:p.location};if(vt.has(s))return fn({error:await tt(p,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Bt(p),x;if(p instanceof jt)x=p.body;else{if(await N.updated.check())return await _e(),await Q(n);x=await tt(p,{params:r,url:n,route:{id:a.id}})}const $=await un(g,_,o);return $?yt({url:n,params:r,branch:_.slice(0,$.idx).concat($.node),status:k,error:x,route:a}):await Ae(n,{id:a.id},x,k)}else _.push(void 0);return yt({url:n,params:r,branch:_,status:200,error:null,route:a,form:e?void 0:null})}async function un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Yt({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const o=await Gt({loader:It,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Wt(s)}),i={node:await gt(),loader:gt,universal:null,server:null,data:null};return yt({url:n,params:a,branch:[o,i],status:t,error:e,route:null})}catch(o){if(o instanceof Nt)return rn(new URL(o.location,location.href),{},0);throw o}}async function dn(t){const e=t.href;if(dt.has(e))return dt.get(e);let n;try{const r=(async()=>{let a=await b.hooks.reroute({url:new URL(t),fetch:async(s,o)=>sn(s,o,t).promise})??t;if(typeof a=="string"){const s=new URL(t);b.hash?s.hash=a:s.pathname=a,a=s}return a})();dt.set(e,r),n=await r}catch{dt.delete(e);return}return n}async function Et(t,e){if(t&&!St(t,U,b.hash)){const n=await dn(t);if(!n)return;const r=hn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ce(s),url:t}}}}function hn(t){return Pe(b.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function bt(t){return(b.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function xe({url:t,type:e,intent:n,delta:r,event:a}){let s=!1;const o=zt(m,n,t,e);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Z||we.forEach(c=>c(i)),s?null:o}async function G({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=ee,block:d=ee,event:u}){var B;const y=q;q=c;const f=await Et(e,!1),h=t==="enter"?zt(m,f,e,t):xe({url:e,type:t,delta:n==null?void 0:n.delta,intent:f,event:u});if(!h){d(),q===c&&(q=y);return}const _=S,g=A;l(),Z=!0,wt&&h.navigation.type!=="enter"&&N.navigating.set(J.current=h.navigation);let p=f&&await Re(f);if(!p){if(St(e,U,b.hash))return await Q(e,s);p=await Ae(e,{id:null},await tt(new Dt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(f==null?void 0:f.url)||e,q!==c)return h.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await G({type:t,url:new URL(p.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),h.fulfil(void 0);return}p=await Yt({status:500,error:await tt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else p.props.page.status>=400&&await N.updated.check()&&(await _e(),await Q(e,s));if(an(),Kt(_),ke(g),p.props.page.url.pathname!==e.pathname&&(e.pathname=p.props.page.url.pathname),o=n?n.state:o,!n){const E=s?0:1,K={[F]:S+=E,[H]:A+=E,[ue]:o};(s?history.replaceState:history.pushState).call(history,K,"",e),s||en(S,A)}const k=f&&(v==null?void 0:v.id)===f.id?v.fork:null;v=null,p.props.page.state=o;let x;if(wt){const E=(await Promise.all(Array.from(nn,j=>j(h.navigation)))).filter(j=>typeof j=="function");if(E.length>0){let j=function(){E.forEach(Rt=>{z.delete(Rt)})};E.push(j),E.forEach(Rt=>{z.add(Rt)})}m=p.state,p.props.page&&(p.props.page.url=e);const K=k&&await k;K?x=K.commit():(be.$set(p.props),Ze(p.props.page),x=(B=Te)==null?void 0:B()),ye=!0}else await Ee(p,Ot,!1);const{activeElement:$}=document;await x,await ht(),await ht();let P=n?n.scroll:a?kt():null;if(ne){const E=e.hash&&document.getElementById(Le(e));if(P)scrollTo(P.x,P.y);else if(E){E.scrollIntoView();const{top:K,left:j}=E.getBoundingClientRect();P={x:pageXOffset+j,y:pageYOffset+K}}else scrollTo(0,0)}const ut=document.activeElement!==$&&document.activeElement!==document.body;!r&&!ut&&vn(e,P),ne=!0,p.props.page&&Object.assign(R,p.props.page),Z=!1,t==="popstate"&&Se(A),h.fulfil(void 0),z.forEach(E=>E(h.navigation)),N.navigating.set(J.current=null)}async function Ae(t,e,n,r,a){return t.origin===Vt&&t.pathname===location.pathname&&!ve?await Yt({status:r,error:n,url:t,route:e}):await Q(t,a)}function pn(){let t,e,n;C.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{s(c,D.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],D.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(Ut(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(i,c){const l=pe(i,C),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:y,download:f}=Tt(l,U,b.hash);if(y||f)return;const h=pt(l),_=u&&bt(m.url)===bt(u);if(!(h.reload||_))if(c<=h.preload_data){e=l,n=D.tap;const g=await Et(u,!1);if(!g)return;on(g)}else c<=h.preload_code&&(e=l,n=c,Ut(u))}function o(){a.disconnect();for(const i of C.querySelectorAll("a")){const{url:c,external:l,download:d}=Tt(i,U,b.hash);if(l||d)continue;const u=pt(i);u.reload||(u.preload_code===D.viewport&&a.observe(i),u.preload_code===D.eager&&Ut(c))}}z.add(o),o()}function tt(t,e){if(t instanceof jt)return t.body;const n=Bt(t),r=Xe(t);return b.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function gn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function mn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(re(),!Z){const a=zt(m,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};we.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&re()}),(e=navigator.connection)!=null&&e.saveData||pn(),C.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pe(n.composedPath()[0],C);if(!r)return;const{url:a,external:s,target:o,download:i}=Tt(r,U,b.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(b.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===xt(location);if(s||c.reload&&(!y||!u)){xe({url:a,type:"link",event:n})?Z=!0:n.preventDefault();return}if(u!==void 0&&y){const[,f]=m.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=r.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(W=!0,Kt(S),t(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await G({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),C.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(St(i,U,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);i.search=new URLSearchParams(d).toString(),G({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ct){if((r=n.state)!=null&&r[F]){const a=n.state[F];if(q={},a===S)return;const s=V[a],o=n.state[ue]??{},i=new URL(n.state[Ye]??location.href),c=n.state[H],l=m.url?xt(location)===xt(m.url):!1;if(c===A&&(ye||l)){o!==R.state&&(R.state=o),t(i),V[S]=kt(),s&&scrollTo(s.x,s.y),S=a;return}const u=a-S;await G({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{S=a,A=c},block:()=>{history.go(-u)},nav_token:q,event:n})}else if(!W){const a=new URL(location.href);t(a),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[F]:++S,[H]:A},"",location.href))});for(const n of document.querySelectorAll("link"))tn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&N.navigating.set(J.current=null)});function t(n){m.url=R.url=n,N.page.set(Ht(R)),N.page.notify()}}async function _n(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:c}){ve=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,y=!0;try{const f=r.map(async(_,g)=>{const p=i[g];return p!=null&&p.uses&&(p.uses=wn(p.uses)),Gt({loader:b.nodes[_],url:l,params:a,route:s,parent:async()=>{const k={};for(let x=0;x<g;x+=1)Object.assign(k,(await f[x]).data);return k},server_data_node:Wt(p)})}),h=await Promise.all(f);if(d){const _=d.layouts;for(let g=0;g<_.length;g++)_[g]||h.splice(g,0,void 0)}u=yt({url:l,params:a,branch:h,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Nt){await Q(new URL(f.location,location.href));return}u=await Yt({status:Bt(f),error:await tt(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",y=!1}u.props.page&&(u.props.page.state={}),await Ee(u,t,y)}function wn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Ct=!1;function vn(t,e=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Le(t);if(r&&document.getElementById(r)){const{x:s,y:o}=e??kt();setTimeout(()=>{const i=history.state;Ct=!0,location.replace(`#${r}`),b.hash&&location.replace(t.hash),history.replaceState(i,"",t.hash),scrollTo(s,o),Ct=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],c=a.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function zt(t,e,n,r){var c,l;let a,s;const o=new Promise((d,u)=>{a=d,s=u});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:o},fulfil:a,reject:s}}function Ht(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function yn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Le(t){let e;if(b.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Un as a,Rn as l,R as p,N as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s;const e=((s=globalThis.__sveltekit_s9fgxq)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_s9fgxq)==null?void 0:a.assets)??e??"";export{t as a,e as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as v,f as _,s as y,a as g}from"./DqdrLdzV.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./Ciq9INsC.js";import{r as I,s as l,a as k}from"./P3PHXZz3.js";import{b as C}from"./CFHe0i8O.js";import{p as r}from"./Cf7Xaqef.js";var j=_('<div class="w-full space-y-2"><label class="block text-sm font-semibold text-gray-700"> </label> <input/></div>');function E(n,e){h(e,!0);let c=r(e,"type",3,"text"),f=r(e,"placeholder",3,""),o=r(e,"value",15),m=r(e,"class",3,"");var s=j(),t=u(s),p=u(t,!0);d(t);var a=x(t,2);I(a),a.__input=function(...b){var i;(i=e.onInput?()=>e.onInput(o()):void 0)==null||i.apply(this,b)},d(s),w(()=>{l(t,"for",e.id),y(p,e.label),l(a,"id",e.id),l(a,"type",c()),l(a,"placeholder",f()),k(a,1,`w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 text-gray-900 placeholder-gray-500 ${m()??""}`)}),C(a,o),g(n,s),F()}v(["input"]);export{E as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as l,e as p,ad as m,j as h,h as r,ae as g,af as v,a4 as y}from"./Ciq9INsC.js";function _(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function w(e,n,t){if(e==null)return n(void 0),l;const s=p(()=>e.subscribe(n,t));return s.unsubscribe?()=>s.unsubscribe():s}const i=[];function q(e,n=l){let t=null;const s=new Set;function o(c){if(m(e,c)&&(e=c,t)){const f=!i.length;for(const u of s)u[1](),i.push(u,e);if(f){for(let u=0;u<i.length;u+=2)i[u][0](i[u+1]);i.length=0}}}function a(c){o(c(e))}function b(c,f=l){const u=[c,f];return s.add(u),s.size===1&&(t=n(o,a)||l),c(e),()=>{s.delete(u),s.size===0&&t&&(t(),t=null)}}return{set:o,update:a,subscribe:b}}function E(e){let n;return w(e,t=>n=t)(),n}function z(e){r===null&&_(),y&&r.l!==null?d(r).m.push(e):h(()=>{const n=p(e);if(typeof n=="function")return n})}function x(e,n,{bubbles:t=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:n,bubbles:t,cancelable:s})}function $(){const e=r;return e===null&&_(),(n,t,s)=>{var a;const o=(a=e.s.$$events)==null?void 0:a[n];if(o){const b=g(o)?o.slice():[o],c=x(n,t,s);for(const f of b)f.call(e.x,c);return!c.defaultPrevented}return!0}}function j(e){r===null&&_(),r.l===null&&v(),d(r).a.push(e)}function d(e){var n=e.l;return n.u??(n.u={a:[],b:[],m:[]})}export{j as a,$ as c,E as g,z as o,w as s,q as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var D=Object.defineProperty;var g=i=>{throw TypeError(i)};var C=(i,e,s)=>e in i?D(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s;var w=(i,e,s)=>C(i,typeof e!="symbol"?e+"":e,s),y=(i,e,s)=>e.has(i)||g("Cannot "+s);var t=(i,e,s)=>(y(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(i,e,s)=>e.has(i)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),M=(i,e,s,a)=>(y(i,e,"write to private field"),a?a.call(i,s):e.set(i,s),s);import{q as x,v as F,w as k,x as q,y as A,z as B,A as z,B as S,C as j,D as E}from"./Ciq9INsC.js";var r,n,h,p,m,v,_;class I{constructor(e,s=!0){w(this,"anchor");l(this,r,new Map);l(this,n,new Map);l(this,h,new Map);l(this,p,new Set);l(this,m,!0);l(this,v,()=>{var e=x;if(t(this,r).has(e)){var s=t(this,r).get(e),a=t(this,n).get(s);if(a)F(a),t(this,p).delete(s);else{var c=t(this,h).get(s);c&&(t(this,n).set(s,c.effect),t(this,h).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),a=c.effect)}for(const[f,o]of t(this,r)){if(t(this,r).delete(f),f===e)break;const d=t(this,h).get(o);d&&(k(d.effect),t(this,h).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,p).has(f))continue;const d=()=>{if(Array.from(t(this,r).values()).includes(f)){var b=document.createDocumentFragment();j(o,b),b.append(A()),t(this,h).set(f,{effect:o,fragment:b})}else k(o);t(this,p).delete(f),t(this,n).delete(f)};t(this,m)||!a?(t(this,p).add(f),q(o,d,!1)):d()}}});l(this,_,e=>{t(this,r).delete(e);const s=Array.from(t(this,r).values());for(const[a,c]of t(this,h))s.includes(a)||(k(c.effect),t(this,h).delete(a))});this.anchor=e,M(this,m,s)}ensure(e,s){var a=x,c=E();if(s&&!t(this,n).has(e)&&!t(this,h).has(e))if(c){var f=document.createDocumentFragment(),o=A();f.append(o),t(this,h).set(e,{effect:B(()=>s(o)),fragment:f})}else t(this,n).set(e,B(()=>s(this.anchor)));if(t(this,r).set(a,e),c){for(const[d,u]of t(this,n))d===e?a.skipped_effects.delete(u):a.skipped_effects.add(u);for(const[d,u]of t(this,h))d===e?a.skipped_effects.delete(u.effect):a.skipped_effects.add(u.effect);a.oncommit(t(this,v)),a.ondiscard(t(this,_))}else z&&(this.anchor=S),t(this,v).call(this)}}r=new WeakMap,n=new WeakMap,h=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,_=new WeakMap;export{I as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as P,q as b,I as V,A as q,e as D,J as F,K as J,c as u,g as x,u as K,r as f,t as E,f as A,F as j,s as p}from"./Ciq9INsC.js";import{d as N,f as _,a as m,c as W,s as B}from"./DqdrLdzV.js";import{a as G,s as O,b as I}from"./P3PHXZz3.js";import{i as M,b as Q,s as R}from"./Cf7Xaqef.js";import{c as T,L as U}from"./BBdxXcNs.js";import{I as X}from"./D_xw8KSE.js";function ie(e,a,o=a){var n=new WeakSet;P(e,"input",async s=>{var t=s?e.defaultValue:e.value;if(t=w(e)?S(t):t,o(t),b!==null&&n.add(b),await V(),t!==(t=a())){var r=e.selectionStart,i=e.selectionEnd,c=e.value.length;if(e.value=t??"",i!==null){var d=e.value.length;r===i&&i===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=r,e.selectionEnd=Math.min(i,d))}}}),(q&&e.defaultValue!==e.value||D(a)==null&&e.value)&&(o(w(e)?S(e.value):e.value),b!==null&&n.add(b)),F(()=>{var s=a();if(e===document.activeElement){var t=J??b;if(n.has(t))return}w(e)&&s===S(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function w(e){var a=e.type;return a==="number"||a==="range"}function S(e){return e===""?null:+e}var Y=_('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75A11.959 11.959 0 0112 2.704z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 15.75h.007v.008H12v-.008z"></path></svg> <span class="text-xs">Not Connected</span></div>'),Z=_("<button><!></button>");function de(e,a){const o=()=>Q(T,"$connected",n),[n,s]=R(),t=K(()=>o()?!!a.disabled:!0);var r=Z();r.__click=function(...l){var v;(v=a.buttonAction)==null||v.apply(this,l)};var i=u(r);{var c=l=>{var v=Y();m(l,v)},d=l=>{var v=W(),g=A(v);I(g,()=>a.children??j),m(l,v)};M(i,l=>{!o()&&x(t)?l(c):l(d,!1)})}f(r),E(()=>{G(r,1,`inline-flex items-center justify-center px-6 py-3 text-sm font-semibold border border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed transition-all duration-200 ${x(t)&&!o()?"bg-red-100 text-red-700 border-red-200 hover:bg-red-100":x(t)?"bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100":"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}`),r.disabled=x(t),O(r,"title",o()?"":"Please connect to Sockethub first")}),m(e,r),s()}N(["click"]);var $=_('<p class="text-lg text-gray-600 leading-relaxed"> </p>'),ee=_("<title> </title> <!>",1),ae=_('<!> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8"><div class="bg-white shadow-sm border border-gray-200 rounded-xl p-8"><div class="space-y-8"><!></div></div></div> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 mt-8"><!></div>',1);function ve(e,a){var o=ae(),n=A(o);X(n,{get title(){return a.title},children:(l,v)=>{var g=ee(),h=A(g),z=u(h,!0);f(h);var C=p(h,2);{var H=y=>{var k=$(),L=u(k,!0);f(k),E(()=>B(L,a.description)),m(y,k)};M(C,y=>{a.description&&y(H)})}E(()=>B(z,a.title)),m(l,g)}});var s=p(n,2),t=u(s),r=u(t),i=u(r);I(i,()=>a.children??j),f(r),f(t),f(s);var c=p(s,2),d=u(c);U(d,{}),f(c),m(e,o)}export{ve as B,de as S,ie as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as $,A as m,M as j,N as F,O as K,P as C,Q as Z,R as q,S as y,T as z,U as G,F as A,V as H,b as D,g as b,W as w,X as Q,Y as g,Z as V,_ as N,$ as W,a0 as X,a1 as J,a2 as I,a3 as x,o as k,e as ee,a4 as re,a5 as ne,a6 as se,a7 as ie,a8 as ue,a9 as te,aa as L,ab as B,ac as p}from"./Ciq9INsC.js";import{B as ae}from"./CC-fhLYv.js";import{s as fe,g as le}from"./CARmnL8B.js";function he(e,r,s=!1){m&&j();var n=new ae(e),i=s?F:0;function t(f,a){if(m){const h=K(e)===C;if(f===h){var l=Z();q(l),n.anchor=l,y(!1),n.ensure(f,a),y(!0);return}}n.ensure(f,a)}$(()=>{var f=!1;r((a,l=!0)=>{f=!0,t(l,a)}),f||t(!1,null)},i)}let v=!1,O=Symbol();function Se(e,r,s){const n=s[r]??(s[r]={store:null,source:H(void 0),unsubscribe:A});if(n.store!==e&&!(O in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=A;else{var i=!0;n.unsubscribe=fe(e,t=>{i?n.source.v=t:D(n.source,t)}),i=!1}return e&&O in s?le(e):b(n.source)}function Pe(e,r){return e.set(r),r}function ge(){const e={};function r(){z(()=>{for(var s in e)e[s].unsubscribe();G(e,O,{enumerable:!1,value:!0})})}return[e,r]}function Oe(e,r,s){return e.set(s),r}function we(){v=!0}function oe(e){var r=v;try{return v=!1,[e(),v]}finally{v=r}}const ce={get(e,r){if(!e.exclude.includes(r))return b(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=w;try{x(e.parent_effect),e.special[r]=de({get[r](){return e.props[r]}},r,N)}finally{x(n)}}return e.special[r](s),I(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),I(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Ee(e,r){return new Proxy({props:e,exclude:r,special:{},version:Q(0),parent_effect:w},ce)}const _e={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let i=e.props[n];p(i)&&(i=i());const t=g(i,r);if(t&&t.set)return t.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=g(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===L||r===B)return!1;for(let s of e.props)if(p(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(p(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Re(...e){return new Proxy({props:e},_e)}function de(e,r,s,n){var R;var i=!re||(s&ne)!==0,t=(s&se)!==0,f=(s&ue)!==0,a=n,l=!0,h=()=>(l&&(l=!1,a=f?ee(n):n),a),c;if(t){var M=L in e||B in e;c=((R=g(e,r))==null?void 0:R.set)??(M&&r in e?u=>e[r]=u:void 0)}var _,E=!1;t?[_,E]=oe(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=h(),c&&(i&&V(),c(_)));var o;if(i?o=()=>{var u=e[r];return u===void 0?h():(l=!0,u)}:o=()=>{var u=e[r];return u!==void 0&&(a=void 0),u===void 0?a:u},i&&(s&N)===0)return o;if(c){var U=e.$$legacy;return function(u,S){return arguments.length>0?((!i||!S||U||E)&&c(S?o():u),u):o()}}var P=!1,d=((s&ie)!==0?k:J)(()=>(P=!1,o()));t&&b(d);var Y=w;return function(u,S){if(arguments.length>0){const T=S?b(d):i&&t?W(u):u;return D(d,T),P=!0,a!==void 0&&(a=T),u}return te&&P||(Y.f&X)!==0?d.v:b(d)}}export{Pe as a,Se as b,Oe as c,Re as d,he as i,Ee as l,we as m,de as p,ge as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ln=Object.defineProperty;var dt=e=>{throw TypeError(e)};var un=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>un(e,typeof t!="symbol"?t+"":t,n),Ke=(e,t,n)=>t.has(e)||dt("Cannot "+n);var y=(e,t,n)=>(Ke(e,t,"read from private field"),n?n.call(e):t.get(e)),Y=(e,t,n)=>t.has(e)?dt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),oe=(e,t,n,r)=>(Ke(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Ke(e,t,"access private method"),n);var on=Array.isArray,cn=Array.prototype.indexOf,Qn=Array.from,er=Object.defineProperty,be=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyDescriptors,vn=Object.prototype,dn=Array.prototype,bt=Object.getPrototypeOf,pt=Object.isExtensible;function tr(e){return typeof e=="function"}const nr=()=>{};function rr(e){return e()}function pn(e){for(var t=0;t<e.length;t++)e[t]()}function At(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function sr(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const A=2,Ie=4,Oe=8,nt=1<<24,q=16,H=32,ue=64,St=128,C=512,T=1024,D=2048,U=4096,j=8192,K=16384,rt=32768,ke=65536,ht=1<<17,Rt=1<<18,De=1<<19,xt=1<<20,fr=1<<25,Se=32768,Xe=1<<21,st=1<<22,$=1<<23,re=Symbol("$state"),ar=Symbol("legacy props"),ir=Symbol(""),ce=new class extends Error{constructor(){super(...arguments);B(this,"name","StaleReactionError");B(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ft=3,Ot=8;function hn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function yn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function wn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function En(e){throw new Error("https://svelte.dev/e/effect_orphan")}function gn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ur(){throw new Error("https://svelte.dev/e/hydration_failed")}function or(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function cr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Tn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function _r(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vr=1,dr=2,pr=4,hr=8,yr=16,wr=1,Er=2,gr=4,mr=8,Tr=16,br=1,Ar=2,An="[",Sn="[!",Rn="]",at={},E=Symbol(),Sr="http://www.w3.org/1999/xhtml",Rr="@attach";function it(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function xr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let X=!1;function Dr(e){X=e}let g;function ye(e){if(e===null)throw it(),at;return g=e}function Nr(){return ye(W(g))}function Pr(e){if(X){if(W(g)!==null)throw it(),at;g=e}}function Cr(e=1){if(X){for(var t=e,n=g;t--;)n=W(n);g=n}}function Ir(e=!0){for(var t=0,n=g;;){if(n.nodeType===Ot){var r=n.data;if(r===Rn){if(t===0)return n;t-=1}else(r===An||r===Sn)&&(t+=1)}var s=W(n);e&&n.remove(),n=s}}function kr(e){if(!e||e.nodeType!==Ot)throw it(),at;return e.data}function Dt(e){return e===this.v}function xn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Nt(e){return!xn(e,this.v)}let Be=!1;function Fr(){Be=!0}let b=null;function Fe(e){b=e}function Mr(e,t=!1,n){b={p:b,i:!1,c:null,e:null,s:e,x:null,l:Be&&!t?{s:null,u:null,$:[]}:null}}function jr(e){var t=b,n=t.e;if(n!==null){t.e=null;for(var r of n)$t(r)}return t.i=!0,b=t.p,{}}function Ne(){return!Be||b!==null&&b.l===null}let ee=[];function Pt(){var e=ee;ee=[],pn(e)}function Ct(e){if(ee.length===0&&!Ae){var t=ee;queueMicrotask(()=>{t===ee&&Pt()})}ee.push(e)}function On(){for(;ee.length>0;)Pt()}function Dn(e){var t=h;if(t===null)return _.f|=$,e;if((t.f&rt)===0){if((t.f&St)===0)throw e;t.b.error(e)}else Me(e,t)}function Me(e,t){for(;t!==null;){if((t.f&St)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Nn=-7169;function S(e,t){e.f=e.f&Nn|t}function lt(e){(e.f&C)!==0||e.deps===null?S(e,T):S(e,U)}function It(e){if(e!==null)for(const t of e)(t.f&A)===0||(t.f&Se)===0||(t.f^=Se,It(t.deps))}function Pn(e,t,n){(e.f&D)!==0?t.add(e):(e.f&U)!==0&&n.add(e),It(e.deps),S(e,T)}const Ce=new Set;let p=null,$e=null,m=null,P=[],Ve=null,Ze=!1,Ae=!1;var ve,de,te,ne,xe,pe,he,I,We,Je,kt,Ft;const Ue=class Ue{constructor(){Y(this,I);B(this,"committed",!1);B(this,"current",new Map);B(this,"previous",new Map);Y(this,ve,new Set);Y(this,de,new Set);Y(this,te,0);Y(this,ne,0);Y(this,xe,null);Y(this,pe,new Set);Y(this,he,new Set);B(this,"skipped_effects",new Set);B(this,"is_fork",!1)}is_deferred(){return this.is_fork||y(this,ne)>0}process(t){var s;P=[],$e=null,this.apply();var n=[],r=[];for(const f of t)Q(this,I,We).call(this,f,n,r);this.is_fork||Q(this,I,kt).call(this),this.is_deferred()?(Q(this,I,Je).call(this,r),Q(this,I,Je).call(this,n)):($e=this,p=null,yt(r),yt(n),$e=null,(s=y(this,xe))==null||s.resolve()),m=null}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&$)===0&&(this.current.set(t,t.v),m==null||m.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,m=null)}flush(){if(this.activate(),P.length>0){if(Mt(),p!==null&&p!==this)return}else y(this,te)===0&&this.process([]);this.deactivate()}discard(){for(const t of y(this,de))t(this);y(this,de).clear()}increment(t){oe(this,te,y(this,te)+1),t&&oe(this,ne,y(this,ne)+1)}decrement(t){oe(this,te,y(this,te)-1),t&&oe(this,ne,y(this,ne)-1),this.revive()}revive(){for(const t of y(this,pe))y(this,he).delete(t),S(t,D),ae(t);for(const t of y(this,he))S(t,U),ae(t);this.flush()}oncommit(t){y(this,ve).add(t)}ondiscard(t){y(this,de).add(t)}settled(){return(y(this,xe)??oe(this,xe,At())).promise}static ensure(){if(p===null){const t=p=new Ue;Ce.add(p),Ae||Ue.enqueue(()=>{p===t&&t.flush()})}return p}static enqueue(t){Ct(t)}apply(){}};ve=new WeakMap,de=new WeakMap,te=new WeakMap,ne=new WeakMap,xe=new WeakMap,pe=new WeakMap,he=new WeakMap,I=new WeakSet,We=function(t,n,r){t.f^=T;for(var s=t.first,f=null;s!==null;){var a=s.f,u=(a&(H|ue))!==0,i=u&&(a&T)!==0,l=i||(a&j)!==0||this.skipped_effects.has(s);if(!l&&s.fn!==null){u?s.f^=T:f!==null&&(a&(Ie|Oe|nt))!==0?f.b.defer_effect(s):(a&Ie)!==0?n.push(s):me(s)&&((a&q)!==0&&y(this,pe).add(s),ge(s));var o=s.first;if(o!==null){s=o;continue}}var c=s.parent;for(s=s.next;s===null&&c!==null;)c===f&&(f=null),s=c.next,c=c.parent}},Je=function(t){for(var n=0;n<t.length;n+=1)Pn(t[n],y(this,pe),y(this,he))},kt=function(){if(y(this,ne)===0){for(const t of y(this,ve))t();y(this,ve).clear()}y(this,te)===0&&Q(this,I,Ft).call(this)},Ft=function(){var s;if(Ce.size>1){this.previous.clear();var t=m,n=!0;for(const f of Ce){if(f===this){n=!1;continue}const a=[];for(const[i,l]of this.current){if(f.current.has(i))if(n&&l!==f.current.get(i))f.current.set(i,l);else continue;a.push(i)}if(a.length===0)continue;const u=[...f.current.keys()].filter(i=>!this.current.has(i));if(u.length>0){var r=P;P=[];const i=new Set,l=new Map;for(const o of a)jt(o,u,i,l);if(P.length>0){p=f,f.apply();for(const o of P)Q(s=f,I,We).call(s,o,[],[]);f.deactivate()}P=r}}p=null,m=t}this.committed=!0,Ce.delete(this)};let we=Ue;function Cn(e){var t=Ae;Ae=!0;try{for(var n;;){if(On(),P.length===0&&(p==null||p.flush(),P.length===0))return Ve=null,n;Mt()}}finally{Ae=t}}function Mt(){var e=se;Ze=!0;var t=null;try{var n=0;for(qe(!0);P.length>0;){var r=we.ensure();if(n++>1e3){var s,f;In()}r.process(P),z.clear()}}finally{Ze=!1,qe(e),Ve=null}}function In(){try{gn()}catch(e){Me(e,Ve)}}let k=null;function yt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(K|j))===0&&me(r)&&(k=new Set,ge(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Wt(r):r.fn=null),(k==null?void 0:k.size)>0)){z.clear();for(const s of k){if((s.f&(K|j))!==0)continue;const f=[s];let a=s.parent;for(;a!==null;)k.has(a)&&(k.delete(a),f.push(a)),a=a.parent;for(let u=f.length-1;u>=0;u--){const i=f[u];(i.f&(K|j))===0&&ge(i)}}k.clear()}}k=null}}function jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&A)!==0?jt(s,t,n,r):(f&(st|q))!==0&&(f&D)===0&&Lt(s,t,r)&&(S(s,D),ae(s))}}function Lt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&A)!==0&&Lt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ae(e){for(var t=Ve=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===h&&(n&q)!==0&&(n&Rt)===0)return;if((n&(ue|H))!==0){if((n&T)===0)return;t.f^=T}}P.push(t)}function kn(e,t,n,r){const s=Ne()?ut:jn;if(n.length===0&&e.length===0){r(t.map(s));return}var f=p,a=h,u=Fn();function i(){Promise.all(n.map(l=>Mn(l))).then(l=>{u();try{r([...t.map(s),...l])}catch(o){(a.f&K)===0&&Me(o,a)}f==null||f.deactivate(),je()}).catch(l=>{Me(l,a)})}e.length>0?Promise.all(e).then(()=>{u();try{return i()}finally{f==null||f.deactivate(),je()}}):i()}function Fn(){var e=h,t=_,n=b,r=p;return function(f=!0){Ee(e),Z(t),Fe(n),f&&(r==null||r.activate())}}function je(){Ee(null),Z(null),Fe(null)}function ut(e){var t=A|D,n=_!==null&&(_.f&A)!==0?_:null;return h!==null&&(h.f|=De),{ctx:b,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??h,ac:null}}function Mn(e,t,n){let r=h;r===null&&hn();var s=r.b,f=void 0,a=ct(E),u=!_,i=new Map;return Gn(()=>{var d;var l=At();f=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{o===p&&o.committed&&o.deactivate(),je()})}catch(w){l.reject(w),je()}var o=p;if(u){var c=s.is_rendered();s.update_pending_count(1),o.increment(c),(d=i.get(o))==null||d.reject(ce),i.delete(o),i.set(o,l)}const v=(w,L=void 0)=>{if(o.activate(),L)L!==ce&&(a.f|=$,et(a,L));else{(a.f&$)!==0&&(a.f^=$),et(a,w);for(const[J,Pe]of i){if(i.delete(J),J===o)break;Pe.reject(ce)}}u&&(s.update_pending_count(-1),o.decrement(c))};l.promise.then(v,w=>v(null,w||"unknown"))}),Vn(()=>{for(const l of i.values())l.reject(ce)}),new Promise(l=>{function o(c){function v(){c===f?l(a):o(f)}c.then(v,v)}o(f)})}function Lr(e){const t=ut(e);return en(t),t}function jn(e){const t=ut(e);return t.equals=Nt,t}function Yt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ie(t[n])}}function Ln(e){for(var t=e.parent;t!==null;){if((t.f&A)===0)return(t.f&K)===0?t:null;t=t.parent}return null}function ot(e){var t,n=h;Ee(Ln(e));try{e.f&=~Se,Yt(e),t=sn(e)}finally{Ee(n)}return t}function qt(e){var t=ot(e);if(!e.equals(t)&&(e.wv=nn(),(!(p!=null&&p.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){S(e,T);return}le||(m!==null?(Kt()||p!=null&&p.is_fork)&&m.set(e,t):lt(e))}let Qe=new Set;const z=new Map;let Ht=!1;function ct(e,t){var n={f:0,v:e,reactions:null,equals:Dt,rv:0,wv:0};return n}function V(e,t){const n=ct(e);return en(n),n}function Yr(e,t=!1,n=!0){var s;const r=ct(e);return t||(r.equals=Nt),Be&&n&&b!==null&&b.l!==null&&((s=b.l).s??(s.s=[])).push(r),r}function G(e,t,n=!1){_!==null&&(!F||(_.f&ht)!==0)&&Ne()&&(_.f&(A|q|st|ht))!==0&&!(x!=null&&x.includes(e))&&bn();let r=n?Te(t):t;return et(e,r)}function et(e,t){if(!e.equals(t)){var n=e.v;le?z.set(e,t):z.set(e,n),e.v=t;var r=we.ensure();if(r.capture(e,n),(e.f&A)!==0){const s=e;(e.f&D)!==0&&ot(s),lt(s)}e.wv=nn(),Ut(e,D),Ne()&&h!==null&&(h.f&T)!==0&&(h.f&(H|ue))===0&&(N===null?Xn([e]):N.push(e)),!r.is_fork&&Qe.size>0&&!Ht&&Yn()}return t}function Yn(){Ht=!1;var e=se;qe(!0);const t=Array.from(Qe);try{for(const n of t)(n.f&T)!==0&&S(n,U),me(n)&&ge(n)}finally{qe(e)}Qe.clear()}function qr(e,t=1){var n=_e(e),r=t===1?n++:n--;return G(e,n),r}function ze(e){G(e,e.v+1)}function Ut(e,t){var n=e.reactions;if(n!==null)for(var r=Ne(),s=n.length,f=0;f<s;f++){var a=n[f],u=a.f;if(!(!r&&a===h)){var i=(u&D)===0;if(i&&S(a,t),(u&A)!==0){var l=a;m==null||m.delete(l),(u&Se)===0&&(u&C&&(a.f|=Se),Ut(l,U))}else i&&((u&q)!==0&&k!==null&&k.add(a),ae(a))}}}function Te(e){if(typeof e!="object"||e===null||re in e)return e;const t=bt(e);if(t!==vn&&t!==dn)return e;var n=new Map,r=on(e),s=V(0),f=fe,a=u=>{if(fe===f)return u();var i=_,l=fe;Z(null),Tt(f);var o=u();return Z(i),Tt(l),o};return r&&n.set("length",V(e.length)),new Proxy(e,{defineProperty(u,i,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&mn();var o=n.get(i);return o===void 0?o=a(()=>{var c=V(l.value);return n.set(i,c),c}):G(o,l.value,!0),!0},deleteProperty(u,i){var l=n.get(i);if(l===void 0){if(i in u){const o=a(()=>V(E));n.set(i,o),ze(s)}}else G(l,E),ze(s);return!0},get(u,i,l){var d;if(i===re)return e;var o=n.get(i),c=i in u;if(o===void 0&&(!c||(d=be(u,i))!=null&&d.writable)&&(o=a(()=>{var w=Te(c?u[i]:E),L=V(w);return L}),n.set(i,o)),o!==void 0){var v=_e(o);return v===E?void 0:v}return Reflect.get(u,i,l)},getOwnPropertyDescriptor(u,i){var l=Reflect.getOwnPropertyDescriptor(u,i);if(l&&"value"in l){var o=n.get(i);o&&(l.value=_e(o))}else if(l===void 0){var c=n.get(i),v=c==null?void 0:c.v;if(c!==void 0&&v!==E)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return l},has(u,i){var v;if(i===re)return!0;var l=n.get(i),o=l!==void 0&&l.v!==E||Reflect.has(u,i);if(l!==void 0||h!==null&&(!o||(v=be(u,i))!=null&&v.writable)){l===void 0&&(l=a(()=>{var d=o?Te(u[i]):E,w=V(d);return w}),n.set(i,l));var c=_e(l);if(c===E)return!1}return o},set(u,i,l,o){var vt;var c=n.get(i),v=i in u;if(r&&i==="length")for(var d=l;d<c.v;d+=1){var w=n.get(d+"");w!==void 0?G(w,E):d in u&&(w=a(()=>V(E)),n.set(d+"",w))}if(c===void 0)(!v||(vt=be(u,i))!=null&&vt.writable)&&(c=a(()=>V(void 0)),G(c,Te(l)),n.set(i,c));else{v=c.v!==E;var L=a(()=>Te(l));G(c,L)}var J=Reflect.getOwnPropertyDescriptor(u,i);if(J!=null&&J.set&&J.set.call(o,l),!v){if(r&&typeof i=="string"){var Pe=n.get("length"),Ge=Number(i);Number.isInteger(Ge)&&Ge>=Pe.v&&G(Pe,Ge+1)}ze(s)}return!0},ownKeys(u){_e(s);var i=Reflect.ownKeys(u).filter(c=>{var v=n.get(c);return v===void 0||v.v!==E});for(var[l,o]of n)o.v!==E&&!(l in u)&&i.push(l);return i},setPrototypeOf(){Tn()}})}function wt(e){try{if(e!==null&&typeof e=="object"&&re in e)return e[re]}catch{}return e}function Hr(e,t){return Object.is(wt(e),wt(t))}var Et,qn,Bt,Vt;function Ur(){if(Et===void 0){Et=window,qn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Bt=be(t,"firstChild").get,Vt=be(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Le(e=""){return document.createTextNode(e)}function Ye(e){return Bt.call(e)}function W(e){return Vt.call(e)}function Br(e,t){if(!X)return Ye(e);var n=Ye(g);if(n===null)n=g.appendChild(Le());else if(t&&n.nodeType!==ft){var r=Le();return n==null||n.before(r),ye(r),r}return ye(n),n}function Vr(e,t=!1){if(!X){var n=Ye(e);return n instanceof Comment&&n.data===""?W(n):n}if(t&&(g==null?void 0:g.nodeType)!==ft){var r=Le();return g==null||g.before(r),ye(r),r}return g}function Gr(e,t=1,n=!1){let r=X?g:e;for(var s;t--;)s=r,r=W(r);if(!X)return r;if(n&&(r==null?void 0:r.nodeType)!==ft){var f=Le();return r===null?s==null||s.after(f):r.before(f),ye(f),f}return ye(r),r}function Hn(e){e.textContent=""}function Kr(){return!1}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,Ct(()=>{document.activeElement===n&&e.focus()})}}function zr(e){X&&Ye(e)!==null&&Hn(e)}let gt=!1;function Un(){gt||(gt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function _t(e){var t=_,n=h;Z(null),Ee(null);try{return e()}finally{Z(t),Ee(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>_t(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Un()}function Gt(e){h===null&&(_===null&&En(),wn()),le&&yn()}function Bn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function M(e,t,n){var r=h;r!==null&&(r.f&j)!==0&&(e|=j);var s={ctx:b,deps:null,nodes:null,f:e|D|C,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ge(s),s.f|=rt}catch(u){throw ie(s),u}else t!==null&&ae(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&De)===0&&(f=f.first,(e&q)!==0&&(e&ke)!==0&&f!==null&&(f.f|=ke)),f!==null&&(f.parent=r,r!==null&&Bn(f,r),_!==null&&(_.f&A)!==0&&(e&ue)===0)){var a=_;(a.effects??(a.effects=[])).push(f)}return s}function Kt(){return _!==null&&!F}function Vn(e){const t=M(Oe,null,!1);return S(t,T),t.teardown=e,t}function Zr(e){Gt();var t=h.f,n=!_&&(t&H)!==0&&(t&rt)===0;if(n){var r=b;(r.e??(r.e=[])).push(e)}else return $t(e)}function $t(e){return M(Ie|xt,e,!1)}function Wr(e){return Gt(),M(Oe|xt,e,!0)}function Jr(e){we.ensure();const t=M(ue|De,e,!0);return(n={})=>new Promise(r=>{n.outro?zn(t,()=>{ie(t),r(void 0)}):(ie(t),r(void 0))})}function Qr(e){return M(Ie,e,!1)}function es(e,t){var n=b,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=zt(()=>{e(),!r.ran&&(r.ran=!0,Wn(t))})}function ts(){var e=b;zt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&T)!==0&&n.deps!==null&&S(n,U),me(n)&&ge(n),t.ran=!1}})}function Gn(e){return M(st|De,e,!0)}function zt(e,t=0){return M(Oe|t,e,!0)}function ns(e,t=[],n=[],r=[]){kn(r,t,n,s=>{M(Oe,()=>e(...s.map(_e)),!0)})}function rs(e,t=0){var n=M(q|t,e,!0);return n}function ss(e,t=0){var n=M(nt|t,e,!0);return n}function fs(e){return M(H|De,e,!0)}function Xt(e){var t=e.teardown;if(t!==null){const n=le,r=_;mt(!0),Z(null);try{t.call(null)}finally{mt(n),Z(r)}}}function Zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&_t(()=>{s.abort(ce)});var r=n.next;(n.f&ue)!==0?n.parent=null:ie(n,t),n=r}}function Kn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&H)===0&&ie(t),t=n}}function ie(e,t=!0){var n=!1;(t||(e.f&Rt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&($n(e.nodes.start,e.nodes.end),n=!0),Zt(e,t&&!n),He(e,0),S(e,K);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Xt(e);var s=e.parent;s!==null&&s.first!==null&&Wt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function $n(e,t){for(;e!==null;){var n=e===t?null:W(e);e.remove(),e=n}}function Wt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function zn(e,t,n=!0){var r=[];Jt(e,r,!0);var s=()=>{n&&ie(e),t&&t()},f=r.length;if(f>0){var a=()=>--f||s();for(var u of r)u.out(a)}else s()}function Jt(e,t,n){if((e.f&j)===0){e.f^=j;var r=e.nodes&&e.nodes.t;if(r!==null)for(const u of r)(u.is_global||n)&&t.push(u);for(var s=e.first;s!==null;){var f=s.next,a=(s.f&ke)!==0||(s.f&H)!==0&&(e.f&q)!==0;Jt(s,t,a?n:!1),s=f}}}function as(e){Qt(e,!0)}function Qt(e,t){if((e.f&j)!==0){e.f^=j,(e.f&T)===0&&(S(e,D),ae(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&ke)!==0||(n.f&H)!==0;Qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const a of f)(a.is_global||t)&&a.in()}}function is(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:W(n);t.append(n),n=s}}let se=!1;function qe(e){se=e}let le=!1;function mt(e){le=e}let _=null,F=!1;function Z(e){_=e}let h=null;function Ee(e){h=e}let x=null;function en(e){_!==null&&(x===null?x=[e]:x.push(e))}let R=null,O=0,N=null;function Xn(e){N=e}let tn=1,Re=0,fe=Re;function Tt(e){fe=e}function nn(){return++tn}function me(e){var t=e.f;if((t&D)!==0)return!0;if(t&A&&(e.f&=-32769),(t&U)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(me(f)&&qt(f),f.wv>e.wv)return!0}(t&C)!==0&&m===null&&S(e,T)}return!1}function rn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(x!=null&&x.includes(e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&A)!==0?rn(f,t,!1):t===f&&(n?S(f,D):(f.f&T)!==0&&S(f,U),ae(f))}}function sn(e){var w;var t=R,n=O,r=N,s=_,f=x,a=b,u=F,i=fe,l=e.f;R=null,O=0,N=null,_=(l&(H|ue))===0?e:null,x=null,Fe(e.ctx),F=!1,fe=++Re,e.ac!==null&&(_t(()=>{e.ac.abort(ce)}),e.ac=null);try{e.f|=Xe;var o=e.fn,c=o(),v=e.deps;if(R!==null){var d;if(He(e,O),v!==null&&O>0)for(v.length=O+R.length,d=0;d<R.length;d++)v[O+d]=R[d];else e.deps=v=R;if(Kt()&&(e.f&C)!==0)for(d=O;d<v.length;d++)((w=v[d]).reactions??(w.reactions=[])).push(e)}else v!==null&&O<v.length&&(He(e,O),v.length=O);if(Ne()&&N!==null&&!F&&v!==null&&(e.f&(A|U|D))===0)for(d=0;d<N.length;d++)rn(N[d],e);return s!==null&&s!==e&&(Re++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&$)!==0&&(e.f^=$),c}catch(L){return Dn(L)}finally{e.f^=Xe,R=t,O=n,N=r,_=s,x=f,Fe(a),F=u,fe=i}}function Zn(e,t){let n=t.reactions;if(n!==null){var r=cn.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&A)!==0&&(R===null||!R.includes(t))){var f=t;(f.f&C)!==0&&(f.f^=C,f.f&=-32769),lt(f),Yt(f),He(f,0)}}function He(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Zn(e,n[r])}function ge(e){var t=e.f;if((t&K)===0){S(e,T);var n=h,r=se;h=e,se=!0;try{(t&(q|nt))!==0?Kn(e):Zt(e),Xt(e);var s=sn(e);e.teardown=typeof s=="function"?s:null,e.wv=tn;var f}finally{se=r,h=n}}}async function ls(){await Promise.resolve(),Cn()}function us(){return we.ensure().settled()}function _e(e){var t=e.f,n=(t&A)!==0;if(_!==null&&!F){var r=h!==null&&(h.f&K)!==0;if(!r&&!(x!=null&&x.includes(e))){var s=_.deps;if((_.f&Xe)!==0)e.rv<Re&&(e.rv=Re,R===null&&s!==null&&s[O]===e?O++:R===null?R=[e]:R.includes(e)||R.push(e));else{(_.deps??(_.deps=[])).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(le&&z.has(e))return z.get(e);if(n){var a=e;if(le){var u=a.v;return((a.f&T)===0&&a.reactions!==null||an(a))&&(u=ot(a)),z.set(a,u),u}var i=(a.f&C)===0&&!F&&_!==null&&(se||(_.f&C)!==0),l=a.deps===null;me(a)&&(i&&(a.f|=C),qt(a)),i&&!l&&fn(a)}if(m!=null&&m.has(e))return m.get(e);if((e.f&$)!==0)throw e.v;return e.v}function fn(e){if(e.deps!==null){e.f|=C;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&A)!==0&&(t.f&C)===0&&fn(t)}}function an(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(z.has(t)||(t.f&A)!==0&&an(t))return!0;return!1}function Wn(e){var t=F;try{return F=!0,e()}finally{F=t}}function os(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(re in e)tt(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&re in n&&tt(n)}}}function tt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{tt(e[r],t)}catch{}const n=bt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=_n(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}export{Te as $,X as A,g as B,is as C,Kr as D,Fr as E,nr as F,zr as G,Xr as H,ls as I,zt as J,$e as K,rs as L,Nr as M,ke as N,kr as O,Sn as P,Ir as Q,ye as R,Dr as S,Vn as T,er as U,Yr as V,h as W,ct as X,be as Y,cr as Z,gr as _,jr as a,Hn as a$,K as a0,jn as a1,qr as a2,Ee as a3,Be as a4,Er as a5,mr as a6,wr as a7,Tr as a8,le as a9,Pn as aA,Z as aB,Fe as aC,Dn as aD,_ as aE,S as aF,D as aG,ae as aH,U as aI,et as aJ,Me as aK,_r as aL,De as aM,St as aN,Or as aO,_t as aP,Ye as aQ,qn as aR,br as aS,Ar as aT,rt as aU,ft as aV,Ur as aW,An as aX,W as aY,at as aZ,ur as a_,re as aa,ar as ab,tr as ac,xn as ad,on as ae,or as af,sr as ag,Qr as ah,Ct as ai,Cn as aj,ss as ak,xr as al,Hr as am,kn as an,Rr as ao,$r as ap,E as aq,Un as ar,Sr as as,bt as at,ir as au,_n as av,Kt as aw,ze as ax,Ot as ay,we as az,G as b,Qn as b0,Jr as b1,Rn as b2,it as b3,fr as b4,vr as b5,yr as b6,dr as b7,j as b8,pr as b9,hr as ba,$n as bb,Rt as bc,es as bd,ts as be,us as bf,Br as c,V as d,Wn as e,Vr as f,_e as g,b as h,Wr as i,Zr as j,rr as k,pn as l,os as m,Cr as n,ut as o,Mr as p,p as q,Pr as r,Gr as s,ns as t,Lr as u,as as v,ie as w,zn as x,Le as y,fs as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as d,a as r,c as R,e as Z}from"./DqdrLdzV.js";import{p as L,s as C,c as g,r as f,t as $,a as D,g as i,u as H,e as A,f as J,n as Y,b as S,d as U}from"./Ciq9INsC.js";import{r as N,a as ee,c as te}from"./P3PHXZz3.js";import{b as O,S as X}from"./CFHe0i8O.js";import{p as E,s as I,c as q,b as V,i as T}from"./Cf7Xaqef.js";import{T as se}from"./BhL0iima.js";import{a as ae,s as G}from"./BBdxXcNs.js";var oe=d('<div class="pb-4"><label for="actor-id-input" class="pr-3">Actor ID</label> <input id="actor-id-input" type="text"/></div>');function _e(h,e){L(e,!0);let t=E(e,"value",15),p=E(e,"class",3,"bg-white border border-solid border-gray-300 rounded");var v=oe(),s=C(g(v),2);N(s),f(v),$(()=>ee(s,1,te(p()))),O(s,t),r(h,v),D()}function Se(h,e){L(e,!0);const t=()=>V(e.sockethubState,"$sockethubState",p),[p,v]=I();function s(a){const u={context:e.context,type:"credentials",actor:e.actor.id,object:JSON.parse(a)};console.log("sending credentials: ",u),ae.socket.emit("credentials",u,n=>{if(n!=null&&n.error)throw new Error(n.error);q(e.sockethubState,A(t).credentialsSet=!0,A(t))})}{let a=H(()=>!t().actorSet||t().credentialsSet||!1);se(h,{title:"Credentials",get obj(){return e.credentials},buttonText:"Set Credentials",submitData:s,get disabled(){return i(a)}})}D(),v()}var re=d('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Connecting...</span></div>'),ne=d('<div class="flex items-center space-x-2"><svg class="h-4 w-4 text-green-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Connected</span></div>'),ie=d('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"></path></svg> <span>Connect</span></div>'),le=d('<div class="w-full flex justify-end"><!></div>');function Ce(h,e){L(e,!0);const t=()=>V(e.sockethubState,"$sockethubState",p),[p,v]=I();let s=E(e,"disabled",3,!1),a=H(()=>s()||!t().credentialsSet||t().connected||e.connecting);var u=le(),n=g(u);X(n,{get disabled(){return i(a)},get buttonAction(){return e.onConnect},children:(k,y)=>{var w=R(),x=J(w);{var z=c=>{var j=re();r(c,j)},l=c=>{var j=R(),_=J(j);{var B=m=>{var o=ne();r(m,o)},P=m=>{var o=ie();r(m,o)};T(_,m=>{t().connected?m(B):m(P,!1)},!0)}r(c,j)};T(x,c=>{e.connecting?c(z):c(l,!1)})}r(k,w)}}),f(u),r(h,u),D(),v()}var ce=d('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Joining...</span></div>'),de=d('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Joined</span></div>'),ve=d('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg> <span>Join Room</span></div>'),ue=d('<div class="bg-gradient-to-r from-indigo-50 to-purple-50 border border-indigo-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-indigo-900 mb-4 flex items-center"><span class="mr-2">đ </span> Join Chat Room</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="room" class="block text-sm font-semibold text-gray-700">Room/Channel</label> <input id="room" class="w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="#general, kosmos-random@kosmos.chat"/> <p class="text-gray-500 text-xs">đĄ IRC: Use #channel-name | XMPP: Use room@server.com</p></div> <div class="flex justify-end"><!></div></div></div>');function je(h,e){L(e,!0);const t=()=>V(e.sockethubState,"$sockethubState",p),[p,v]=I();let s=E(e,"room",15),a=U(!1);async function u(){return S(a,!0),await G({context:e.context,type:"join",actor:e.actor.id,target:{id:s(),name:s(),type:"room"}}).catch(()=>{q(e.sockethubState,A(t).joined=!1,A(t)),S(a,!1)}).then(()=>{q(e.sockethubState,A(t).joined=!0,A(t)),S(a,!1)})}var n=ue(),k=C(g(n),2),y=g(k),w=C(g(y),2);N(w),Y(2),f(y);var x=C(y,2),z=g(x);{let l=H(()=>!t().connected||t().joined||i(a));X(z,{get disabled(){return i(l)},buttonAction:u,children:(c,j)=>{var _=R(),B=J(_);{var P=o=>{var b=ce();r(o,b)},m=o=>{var b=R(),K=J(b);{var Q=M=>{var F=de();r(M,F)},W=M=>{var F=ve();r(M,F)};T(K,M=>{t().joined?M(Q):M(W,!1)},!0)}r(o,b)};T(B,o=>{i(a)?o(P):o(m,!1)})}r(c,_)}})}f(x),f(k),f(n),O(w,s),r(h,n),D(),v()}var me=d('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span class="hidden sm:inline">Sending...</span></div>'),ge=d('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"></path></svg> <span class="hidden sm:inline">Send</span></div>'),fe=d('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-green-900 mb-4 flex items-center"><span class="mr-2">đŹ</span> Send Message</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="sendMessage" class="block text-sm font-semibold text-gray-700">Your Message</label> <div class="flex space-x-3"><input id="sendMessage" class="flex-1 px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="Type your message here..."/> <!></div> <p class="text-gray-500 text-xs">đĄ Press Enter to send quickly</p></div></div></div>');function Me(h,e){L(e,!0);const t=()=>V(e.sockethubState,"$sockethubState",p),[p,v]=I();let s=U(""),a=U(!1);async function u(){if(!i(s).trim())return;S(a,!0);const l=i(s).trim();console.log("send message: ",l);try{await G({context:e.context,type:"send",actor:e.actor.id,object:{type:"message",content:l},target:{id:e.room,name:e.room,type:"room"}}),S(s,"")}catch(c){console.error("Failed to send message:",c)}finally{S(a,!1)}}var n=fe(),k=C(g(n),2),y=g(k),w=C(g(y),2),x=g(w);N(x);var z=C(x,2);{let l=H(()=>!t().connected||i(a)||!i(s).trim());X(z,{get disabled(){return i(l)},buttonAction:u,children:(c,j)=>{var _=R(),B=J(_);{var P=o=>{var b=me();r(o,b)},m=o=>{var b=ge();r(o,b)};T(B,o=>{i(a)?o(P):o(m,!1)})}r(c,_)}})}f(w),Y(2),f(y),f(k),f(n),O(x,()=>i(s),l=>S(s,l)),Z("keydown",x,l=>{l.key==="Enter"&&!i(a)&&t().connected&&u()}),r(h,n),D(),v()}export{_e as A,Se as C,Ce as P,je as R,Me as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l,a as p,s as h}from"./DqdrLdzV.js";import{c as t,F as x,r as a,s as b,t as g}from"./Ciq9INsC.js";import{b as c}from"./P3PHXZz3.js";var u=l('<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8"><!></div>');function y(e,o){var r=u(),s=t(r);c(s,()=>o.children??x),a(r),p(e,r)}var _=l('<div class="bg-white shadow-sm border border-gray-200 rounded-xl overflow-hidden"><div class="bg-gradient-to-r from-blue-50 to-indigo-50 px-8 py-6 border-b border-gray-200"><h1 class="text-3xl font-bold text-gray-900 tracking-tight"> </h1></div> <div class="px-8 py-6"><!></div></div>');function A(e,o){y(e,{children:(r,s)=>{var i=_(),d=t(i),v=t(d),m=t(v,!0);a(v),a(d);var n=b(d,2),f=t(n);c(f,()=>o.children??x),a(n),a(i),g(()=>h(m,o.title)),p(r,i)}})}export{A as I};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Me=Object.defineProperty;var pe=t=>{throw TypeError(t)};var Oe=(t,e,r)=>e in t?Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ee=(t,e,r)=>Oe(t,typeof e!="symbol"?e+"":e,r),te=(t,e,r)=>e.has(t)||pe("Cannot "+r);var n=(t,e,r)=>(te(t,e,"read from private field"),r?r.call(t):e.get(t)),f=(t,e,r)=>e.has(t)?pe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),a=(t,e,r,i)=>(te(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),p=(t,e,r)=>(te(t,e,"access private method"),r);import{aw as Ie,g as we,X as Ne,J as Ce,e as Fe,ax as ge,ai as de,B as v,A as E,W as F,L as Pe,M as Re,ay as he,P as Ve,z as M,az as G,x as re,y as U,aA as Be,a3 as Q,aB as B,aC as ve,aD as Ye,aE as se,h as Se,C as xe,aF as ye,aG as We,aH as me,aI as He,aJ as Ue,w as ne,R as j,n as je,Q as qe,aK as Ee,aL as ze,N as Ge,aM as Xe,aN as $e,aO as Je,U as Qe,aP as Ke,T as Ze,aQ as ie,aR as et,aS as tt,aT as rt,aU as nt,aV as st,aW as ae,aX as it,aY as at,aZ as oe,S as X,a_ as ot,a$ as ut,b0 as lt,b1 as ft,p as ct,b2 as dt,b3 as ht,a as _t}from"./Ciq9INsC.js";function pt(t){let e=0,r=Ne(0),i;return()=>{Ie()&&(we(r),Ce(()=>(e===0&&(i=Fe(()=>t(()=>ge(r)))),e+=1,()=>{de(()=>{e-=1,e===0&&(i==null||i(),i=void 0,ge(r))})})))}}var gt=Ge|Xe|$e;function vt(t,e,r){new yt(t,e,r)}var g,q,b,O,T,m,h,w,S,k,I,A,C,Y,x,D,K,l,Ae,ke,ue,$,J,le;class yt{constructor(e,r,i){f(this,l);ee(this,"parent");ee(this,"is_pending",!1);f(this,g);f(this,q,E?v:null);f(this,b);f(this,O);f(this,T);f(this,m,null);f(this,h,null);f(this,w,null);f(this,S,null);f(this,k,null);f(this,I,0);f(this,A,0);f(this,C,!1);f(this,Y,new Set);f(this,x,new Set);f(this,D,null);f(this,K,pt(()=>(a(this,D,Ne(n(this,I))),()=>{a(this,D,null)})));a(this,g,e),a(this,b,r),a(this,O,i),this.parent=F.b,this.is_pending=!!n(this,b).pending,a(this,T,Pe(()=>{if(F.b=this,E){const s=n(this,q);Re(),s.nodeType===he&&s.data===Ve?p(this,l,ke).call(this):(p(this,l,Ae).call(this),n(this,A)===0&&(this.is_pending=!1))}else{var o=p(this,l,ue).call(this);try{a(this,m,M(()=>i(o)))}catch(s){this.error(s)}n(this,A)>0?p(this,l,J).call(this):this.is_pending=!1}return()=>{var s;(s=n(this,k))==null||s.remove()}},gt)),E&&a(this,g,v)}defer_effect(e){Be(e,n(this,Y),n(this,x))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!n(this,b).pending}update_pending_count(e){p(this,l,le).call(this,e),a(this,I,n(this,I)+e),n(this,D)&&Ue(n(this,D),n(this,I))}get_effect_pending(){return n(this,K).call(this),we(n(this,D))}error(e){var r=n(this,b).onerror;let i=n(this,b).failed;if(n(this,C)||!r&&!i)throw e;n(this,m)&&(ne(n(this,m)),a(this,m,null)),n(this,h)&&(ne(n(this,h)),a(this,h,null)),n(this,w)&&(ne(n(this,w)),a(this,w,null)),E&&(j(n(this,q)),je(),j(qe()));var o=!1,s=!1;const u=()=>{if(o){Je();return}o=!0,s&&ze(),G.ensure(),a(this,I,0),n(this,w)!==null&&re(n(this,w),()=>{a(this,w,null)}),this.is_pending=this.has_pending_snippet(),a(this,m,p(this,l,$).call(this,()=>(a(this,C,!1),M(()=>n(this,O).call(this,n(this,g)))))),n(this,A)>0?p(this,l,J).call(this):this.is_pending=!1};var y=se;try{B(null),s=!0,r==null||r(e,u),s=!1}catch(_){Ee(_,n(this,T)&&n(this,T).parent)}finally{B(y)}i&&de(()=>{a(this,w,p(this,l,$).call(this,()=>{G.ensure(),a(this,C,!0);try{return M(()=>{i(n(this,g),()=>e,()=>u)})}catch(_){return Ee(_,n(this,T).parent),null}finally{a(this,C,!1)}}))})}}g=new WeakMap,q=new WeakMap,b=new WeakMap,O=new WeakMap,T=new WeakMap,m=new WeakMap,h=new WeakMap,w=new WeakMap,S=new WeakMap,k=new WeakMap,I=new WeakMap,A=new WeakMap,C=new WeakMap,Y=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakMap,l=new WeakSet,Ae=function(){try{a(this,m,M(()=>n(this,O).call(this,n(this,g))))}catch(e){this.error(e)}},ke=function(){const e=n(this,b).pending;e&&(a(this,h,M(()=>e(n(this,g)))),G.enqueue(()=>{var r=p(this,l,ue).call(this);a(this,m,p(this,l,$).call(this,()=>(G.ensure(),M(()=>n(this,O).call(this,r))))),n(this,A)>0?p(this,l,J).call(this):(re(n(this,h),()=>{a(this,h,null)}),this.is_pending=!1)}))},ue=function(){var e=n(this,g);return this.is_pending&&(a(this,k,U()),n(this,g).before(n(this,k)),e=n(this,k)),e},$=function(e){var r=F,i=se,o=Se;Q(n(this,T)),B(n(this,T)),ve(n(this,T).ctx);try{return e()}catch(s){return Ye(s),null}finally{Q(r),B(i),ve(o)}},J=function(){const e=n(this,b).pending;n(this,m)!==null&&(a(this,S,document.createDocumentFragment()),n(this,S).append(n(this,k)),xe(n(this,m),n(this,S))),n(this,h)===null&&a(this,h,M(()=>e(n(this,g))))},le=function(e){var r;if(!this.has_pending_snippet()){this.parent&&p(r=this.parent,l,le).call(r,e);return}if(a(this,A,n(this,A)+e),n(this,A)===0){this.is_pending=!1;for(const i of n(this,Y))ye(i,We),me(i);for(const i of n(this,x))ye(i,He),me(i);n(this,Y).clear(),n(this,x).clear(),n(this,h)&&re(n(this,h),()=>{a(this,h,null)}),n(this,S)&&(n(this,g).before(n(this,S)),a(this,S,null))}};function Dt(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const mt=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Lt(t){return mt.includes(t)}const Et={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Mt(t){return t=t.toLowerCase(),Et[t]??t}const bt=["touchstart","touchmove"];function Tt(t){return bt.includes(t)}const De=new Set,fe=new Set;function wt(t,e,r,i={}){function o(s){if(i.capture||H.call(e,s),!s.cancelBubble)return Ke(()=>r==null?void 0:r.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?de(()=>{e.addEventListener(t,o,i)}):e.addEventListener(t,o,i),o}function Ot(t,e,r,i,o){var s={capture:i,passive:o},u=wt(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ze(()=>{e.removeEventListener(t,u,s)})}function It(t){for(var e=0;e<t.length;e++)De.add(t[e]);for(var r of fe)r(t)}let be=null;function H(t){var _e;var e=this,r=e.ownerDocument,i=t.type,o=((_e=t.composedPath)==null?void 0:_e.call(t))||[],s=o[0]||t.target;be=t;var u=0,y=be===t&&t.__root;if(y){var _=o.indexOf(y);if(_!==-1&&(e===document||e===window)){t.__root=e;return}var P=o.indexOf(e);if(P===-1)return;_<=P&&(u=_)}if(s=o[u]||t.target,s!==e){Qe(t,"currentTarget",{configurable:!0,get(){return s||r}});var Z=se,N=F;B(null),Q(null);try{for(var c,d=[];s!==null;){var R=s.assignedSlot||s.parentNode||s.host||null;try{var W=s["__"+i];W!=null&&(!s.disabled||t.target===s)&&W.call(s,t)}catch(z){c?d.push(z):c=z}if(t.cancelBubble||R===e||R===null)break;s=R}if(c){for(let z of d)queueMicrotask(()=>{throw z});throw c}}finally{t.__root=e,delete t.currentTarget,B(Z),Q(N)}}}function Nt(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function L(t,e){var r=F;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function Ct(t,e){var r=(e&tt)!==0,i=(e&rt)!==0,o,s=!t.startsWith("<!>");return()=>{if(E)return L(v,null),v;o===void 0&&(o=Nt(s?t:"<!>"+t),r||(o=ie(o)));var u=i||et?document.importNode(o,!0):o.cloneNode(!0);if(r){var y=ie(u),_=u.lastChild;L(y,_)}else L(u,u);return u}}function Ft(t=""){if(!E){var e=U(t+"");return L(e,e),e}var r=v;return r.nodeType!==st&&(r.before(r=U()),j(r)),L(r,r),r}function Pt(){if(E)return L(v,null),v;var t=document.createDocumentFragment(),e=document.createComment(""),r=U();return t.append(e,r),L(e,r),t}function Vt(t,e){if(E){var r=F;((r.f&nt)===0||r.nodes.end===null)&&(r.nodes.end=v),Re();return}t!==null&&t.before(e)}function Bt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function Rt(t,e){return Le(t,e)}function Yt(t,e){ae(),e.intro=e.intro??!1;const r=e.target,i=E,o=v;try{for(var s=ie(r);s&&(s.nodeType!==he||s.data!==it);)s=at(s);if(!s)throw oe;X(!0),j(s);const u=Le(t,{...e,anchor:s});return X(!1),u}catch(u){if(u instanceof Error&&u.message.split(`
|
|
2
|
+
`).some(y=>y.startsWith("https://svelte.dev/e/")))throw u;return u!==oe&&console.warn("Failed to hydrate: ",u),e.recover===!1&&ot(),ae(),ut(r),X(!1),Rt(t,e)}finally{X(i),j(o)}}const V=new Map;function Le(t,{target:e,anchor:r,props:i={},events:o,context:s,intro:u=!0}){ae();var y=new Set,_=N=>{for(var c=0;c<N.length;c++){var d=N[c];if(!y.has(d)){y.add(d);var R=Tt(d);e.addEventListener(d,H,{passive:R});var W=V.get(d);W===void 0?(document.addEventListener(d,H,{passive:R}),V.set(d,1)):V.set(d,W+1)}}};_(lt(De)),fe.add(_);var P=void 0,Z=ft(()=>{var N=r??e.appendChild(U());return vt(N,{pending:()=>{}},c=>{if(s){ct({});var d=Se;d.c=s}if(o&&(i.$$events=o),E&&L(c,null),P=t(c,i)||{},E&&(F.nodes.end=v,v===null||v.nodeType!==he||v.data!==dt))throw ht(),oe;s&&_t()}),()=>{var R;for(var c of y){e.removeEventListener(c,H);var d=V.get(c);--d===0?(document.removeEventListener(c,H),V.delete(c)):V.set(c,d)}fe.delete(_),N!==r&&((R=N.parentNode)==null||R.removeChild(N))}});return ce.set(P,Z),P}let ce=new WeakMap;function xt(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}const St="5";var Te;typeof window<"u"&&((Te=window.__svelte??(window.__svelte={})).v??(Te.v=new Set)).add(St);export{Vt as a,wt as b,Pt as c,It as d,Ot as e,Ct as f,Lt as g,Yt as h,Dt as i,L as j,Nt as k,Rt as m,Mt as n,Bt as s,Ft as t,xt as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as W,N as X,ak as H,w as P,z as Y,ah as q,A as p,ae as m,al as x,am as rr,T as ir,an as fr,g as ar,ao as tr,S as U,ap as sr,aq as ur,ai as er,ar as or,as as lr,at as cr,au as nr,av as vr}from"./Ciq9INsC.js";import{B as dr}from"./CC-fhLYv.js";import{i as gr,b as br,d as hr,n as Ar,g as _r}from"./DqdrLdzV.js";function jr(r,a,...i){var f=new dr(r);W(()=>{const t=a()??null;f.ensure(t,t&&(s=>t(s,...i)))},X)}function Nr(r,a){var i=void 0,f;H(()=>{i!==(i=a())&&(f&&(P(f),f=null),i&&(f=Y(()=>{q(()=>i(r))})))})}function z(r){var a,i,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(a=0;a<t;a++)r[a]&&(i=z(r[a]))&&(f&&(f+=" "),f+=i)}else for(i in r)r[i]&&(f&&(f+=" "),f+=i);return f}function pr(){for(var r,a,i=0,f="",t=arguments.length;i<t;i++)(r=arguments[i])&&(a=z(r))&&(f&&(f+=" "),f+=a);return f}function Sr(r){return typeof r=="object"?pr(r):r??""}const B=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Tr(r,a,i){var f=r==null?"":""+r;if(a&&(f=f?f+" "+a:a),i){for(var t in i)if(i[t])f=f?f+" "+t:t;else if(f.length)for(var s=t.length,o=0;(o=f.indexOf(t,o))>=0;){var c=o+s;(o===0||B.includes(f[o-1]))&&(c===f.length||B.includes(f[c]))?f=(o===0?"":f.substring(0,o))+f.substring(c+1):o=c}}return f===""?null:f}function V(r,a=!1){var i=a?" !important;":";",f="";for(var t in r){var s=r[t];s!=null&&s!==""&&(f+=" "+t+": "+s+i)}return f}function M(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Er(r,a){if(a){var i="",f,t;if(Array.isArray(a)?(f=a[0],t=a[1]):f=a,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,c=!1,d=[];f&&d.push(...Object.keys(f).map(M)),t&&d.push(...Object.keys(t).map(M));var n=0,h=-1;const T=r.length;for(var v=0;v<T;v++){var u=r[v];if(c?u==="/"&&r[v-1]==="*"&&(c=!1):s?s===u&&(s=!1):u==="/"&&r[v+1]==="*"?c=!0:u==='"'||u==="'"?s=u:u==="("?o++:u===")"&&o--,!c&&s===!1&&o===0){if(u===":"&&h===-1)h=v;else if(u===";"||v===T-1){if(h!==-1){var S=M(r.substring(n,h).trim());if(!d.includes(S)){u!==";"&&v++;var N=r.substring(n,v).trim();i+=" "+N+";"}}n=v+1,h=-1}}}}return f&&(i+=V(f)),t&&(i+=V(t,!0)),i=i.trim(),i===""?null:i}return r==null?null:String(r)}function Lr(r,a,i,f,t,s){var o=r.__className;if(p||o!==i||o===void 0){var c=Tr(i,f,s);(!p||c!==r.getAttribute("class"))&&(c==null?r.removeAttribute("class"):a?r.className=c:r.setAttribute("class",c)),r.__className=i}else if(s&&t!==s)for(var d in s){var n=!!s[d];(t==null||n!==!!t[d])&&r.classList.toggle(d,n)}return s}function k(r,a={},i,f){for(var t in i){var s=i[t];a[t]!==s&&(i[t]==null?r.style.removeProperty(t):r.style.setProperty(t,s,f))}}function Ir(r,a,i,f){var t=r.__style;if(p||t!==a){var s=Er(a,f);(!p||s!==r.getAttribute("style"))&&(s==null?r.removeAttribute("style"):r.style.cssText=s),r.__style=a}else f&&(Array.isArray(f)?(k(r,i==null?void 0:i[0],f[0]),k(r,i==null?void 0:i[1],f[1],"important")):k(r,i,f));return f}function $(r,a,i=!1){if(r.multiple){if(a==null)return;if(!m(a))return x();for(var f of r.options)f.selected=a.includes(y(f));return}for(f of r.options){var t=y(f);if(rr(t,a)){f.selected=!0;return}}(!i||a!==void 0)&&(r.selectedIndex=-1)}function Or(r){var a=new MutationObserver(()=>{$(r,r.__value)});a.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ir(()=>{a.disconnect()})}function y(r){return"__value"in r?r.__value:r.value}const O=Symbol("class"),I=Symbol("style"),D=Symbol("is custom element"),K=Symbol("is html");function Cr(r){if(p){var a=!1,i=()=>{if(!a){if(a=!0,r.hasAttribute("value")){var f=r.value;C(r,"value",null),r.value=f}if(r.hasAttribute("checked")){var t=r.checked;C(r,"checked",null),r.checked=t}}};r.__on_r=i,er(i),or()}}function wr(r,a){a?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function C(r,a,i,f){var t=G(r);p&&(t[a]=r.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&r.nodeName==="LINK")||t[a]!==(t[a]=i)&&(a==="loading"&&(r[nr]=i),i==null?r.removeAttribute(a):typeof i!="string"&&Z(r).includes(a)?r[a]=i:r.setAttribute(a,i))}function Mr(r,a,i,f,t=!1,s=!1){if(p&&t&&r.tagName==="INPUT"){var o=r,c=o.type==="checkbox"?"defaultChecked":"defaultValue";c in i||Cr(o)}var d=G(r),n=d[D],h=!d[K];let v=p&&n;v&&U(!1);var u=a||{},S=r.tagName==="OPTION";for(var N in a)N in i||(i[N]=null);i.class?i.class=Sr(i.class):i.class=null,i[I]&&(i.style??(i.style=null));var T=Z(r);for(const e in i){let l=i[e];if(S&&e==="value"&&l==null){r.value=r.__value="",u[e]=l;continue}if(e==="class"){var L=r.namespaceURI==="http://www.w3.org/1999/xhtml";Lr(r,L,l,f,a==null?void 0:a[O],i[O]),u[e]=l,u[O]=i[O];continue}if(e==="style"){Ir(r,l,a==null?void 0:a[I],i[I]),u[e]=l,u[I]=i[I];continue}var A=u[e];if(!(l===A&&!(l===void 0&&r.hasAttribute(e)))){u[e]=l;var j=e[0]+e[1];if(j!=="$$")if(j==="on"){const _={},E="$$"+e;let g=e.slice(2);var w=_r(g);if(gr(g)&&(g=g.slice(0,-7),_.capture=!0),!w&&A){if(l!=null)continue;r.removeEventListener(g,u[E],_),u[E]=null}if(l!=null)if(w)r[`__${g}`]=l,hr([g]);else{let J=function(Q){u[e].call(this,Q)};u[E]=br(g,r,J,_)}else w&&(r[`__${g}`]=void 0)}else if(e==="style")C(r,e,l);else if(e==="autofocus")sr(r,!!l);else if(!n&&(e==="__value"||e==="value"&&l!=null))r.value=r.__value=l;else if(e==="selected"&&S)wr(r,l);else{var b=e;h||(b=Ar(b));var R=b==="defaultValue"||b==="defaultChecked";if(l==null&&!n&&!R)if(d[e]=null,b==="value"||b==="checked"){let _=r;const E=a===void 0;if(b==="value"){let g=_.defaultValue;_.removeAttribute(b),_.defaultValue=g,_.value=_.__value=E?g:null}else{let g=_.defaultChecked;_.removeAttribute(b),_.defaultChecked=g,_.checked=E?g:!1}}else r.removeAttribute(e);else R||T.includes(b)&&(n||typeof l!="string")?(r[b]=l,b in d&&(d[b]=ur)):typeof l!="function"&&C(r,b,l)}}}return v&&U(!0),u}function Rr(r,a,i=[],f=[],t=[],s,o=!1,c=!1){fr(t,i,f,d=>{var n=void 0,h={},v=r.nodeName==="SELECT",u=!1;if(H(()=>{var N=a(...d.map(ar)),T=Mr(r,n,N,s,o,c);u&&v&&"value"in N&&$(r,N.value);for(let A of Object.getOwnPropertySymbols(h))N[A]||P(h[A]);for(let A of Object.getOwnPropertySymbols(N)){var L=N[A];A.description===tr&&(!n||L!==n[A])&&(h[A]&&P(h[A]),h[A]=Y(()=>Nr(r,()=>L))),T[A]=L}n=T}),v){var S=r;q(()=>{$(S,n.value,!0),Or(S)})}u=!0})}function G(r){return r.__attributes??(r.__attributes={[D]:r.nodeName.includes("-"),[K]:r.namespaceURI===lr})}var F=new Map;function Z(r){var a=r.getAttribute("is")||r.nodeName,i=F.get(a);if(i)return i;F.set(a,i=[]);for(var f,t=r,s=Element.prototype;s!==t;){f=vr(t);for(var o in f)f[o].set&&i.push(o);t=cr(t)}return i}export{O as C,Lr as a,jr as b,Sr as c,Rr as d,Cr as r,C as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.i_jJRDZB.js","../chunks/DqdrLdzV.js","../chunks/Ciq9INsC.js","../chunks/P3PHXZz3.js","../chunks/CC-fhLYv.js","../chunks/BBdxXcNs.js","../chunks/BnKTx64M.js","../chunks/CARmnL8B.js","../chunks/B-2myMF5.js","../chunks/Cf7Xaqef.js","../assets/sockethub.Bpv0Wt6b.css","../chunks/Br1aAxXP.js","../chunks/BqKPKu0n.js","../assets/0.JUA-HkH6.css","../nodes/1.BlhUuP-P.js","../nodes/2.CggxtO4e.js","../chunks/D_xw8KSE.js","../nodes/3.1s4AoiT3.js","../chunks/BhL0iima.js","../chunks/CFHe0i8O.js","../chunks/CoHdmBcD.js","../chunks/C1LF9VyP.js","../nodes/4.Ck-0hor4.js","../nodes/5.BV2I1j0o.js","../nodes/6.PZ-pmrq7.js","../nodes/7.C7IiHO6h.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var M=e=>{throw TypeError(e)};var N=(e,t,r)=>t.has(e)||M("Cannot "+r);var f=(e,t,r)=>(N(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),j=(e,t,r,o)=>(N(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);import{A as Q,M as X,L as Z,N as $,ah as tt,J as et,e as rt,ai as st,aa as at,b as S,ab as nt,g as v,aj as ot,U as it,V as ct,p as ut,i as lt,j as ft,d as I,I as mt,f as x,s as dt,a as ht,c as _t,r as vt,u as V,t as gt}from"../chunks/Ciq9INsC.js";import{h as Et,m as yt,u as Pt,f as J,a as L,c as C,t as bt,s as Rt}from"../chunks/DqdrLdzV.js";import{o as Ot}from"../chunks/CARmnL8B.js";import{p as D,i as B}from"../chunks/Cf7Xaqef.js";import{B as At}from"../chunks/CC-fhLYv.js";function q(e,t,r){Q&&X();var o=new At(e);Z(()=>{var n=t()??null;o.ensure(n,n&&(i=>r(i,n)))},$)}function Y(e,t){return e===t||(e==null?void 0:e[at])===t}function U(e={},t,r,o){return tt(()=>{var n,i;return et(()=>{n=i,i=[],rt(()=>{e!==r(...i)&&(t(e,...i),n&&Y(r(...n),e)&&t(null,...n))})}),()=>{st(()=>{i&&Y(r(...i),e)&&t(null,...i)})}}),e}function Lt(e){return class extends kt{constructor(t){super({component:e,...t})}}}var g,m;class kt{constructor(t){p(this,g);p(this,m);var i;var r=new Map,o=(a,s)=>{var u=ct(s,!1,!1);return r.set(a,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(a,s){return v(r.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===nt?!0:(v(r.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,u){return S(r.get(s)??o(s,u),u),Reflect.set(a,s,u)}});j(this,m,(t.hydrate?Et:yt)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&ot(),j(this,g,n.$$events);for(const a of Object.keys(f(this,m)))a==="$set"||a==="$destroy"||a==="$on"||it(this,a,{get(){return f(this,m)[a]},set(s){f(this,m)[a]=s},enumerable:!0});f(this,m).$set=a=>{Object.assign(n,a)},f(this,m).$destroy=()=>{Pt(f(this,m))}}$set(t){f(this,m).$set(t)}$on(t,r){f(this,g)[t]=f(this,g)[t]||[];const o=(...n)=>r.call(this,...n);return f(this,g)[t].push(o),()=>{f(this,g)[t]=f(this,g)[t].filter(n=>n!==o)}}$destroy(){f(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;const Tt="modulepreload",wt=function(e,t){return new URL(e,t).href},G={},E=function(t,r,o){let n=Promise.resolve();if(r&&r.length>0){let a=function(l){return Promise.all(l.map(_=>Promise.resolve(_).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const s=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),k=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));n=a(r.map(l=>{if(l=wt(l,o),l in G)return;G[l]=!0;const _=l.endsWith(".css"),y=_?'[rel="stylesheet"]':"";if(o)for(let P=s.length-1;P>=0;P--){const c=s[P];if(c.href===l&&(!_||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${y}`))return;const h=document.createElement("link");if(h.rel=_?"stylesheet":Tt,_||(h.as="script"),h.crossOrigin="",h.href=l,k&&h.setAttribute("nonce",k),document.head.appendChild(h),_)return new Promise((P,c)=>{h.addEventListener("load",P),h.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})},Ft={};var xt=J('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),St=J("<!> <!>",1);function pt(e,t){ut(t,!0);let r=D(t,"components",23,()=>[]),o=D(t,"data_0",3,null),n=D(t,"data_1",3,null);lt(()=>t.stores.page.set(t.page)),ft(()=>{t.stores,t.page,t.constructors,r(),t.form,o(),n(),t.stores.page.notify()});let i=I(!1),a=I(!1),s=I(null);Ot(()=>{const c=t.stores.page.subscribe(()=>{v(i)&&(S(a,!0),mt().then(()=>{S(s,document.title||"untitled page",!0)}))});return S(i,!0),c});const u=V(()=>t.constructors[1]);var k=St(),l=x(k);{var _=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(d,It)=>{var F=C(),z=x(F);q(z,()=>v(u),(H,K)=>{U(K(H,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),w=>r()[1]=w,()=>{var w;return(w=r())==null?void 0:w[1]})}),L(d,F)},$$slots:{default:!0}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)},y=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)};B(l,c=>{t.constructors[1]?c(_):c(y,!1)})}var h=dt(l,2);{var P=c=>{var b=xt(),R=_t(b);{var T=O=>{var A=bt();gt(()=>Rt(A,v(s))),L(O,A)};B(R,O=>{v(a)&&O(T)})}vt(b),L(c,b)};B(h,c=>{v(i)&&c(P)})}L(e,k),ht()}const Mt=Lt(pt),Nt=[()=>E(()=>import("../nodes/0.i_jJRDZB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/1.BlhUuP-P.js"),__vite__mapDeps([14,1,2,6,8,12,7,11]),import.meta.url),()=>E(()=>import("../nodes/2.CggxtO4e.js"),__vite__mapDeps([15,1,2,6,3,4,11,16]),import.meta.url),()=>E(()=>import("../nodes/3.1s4AoiT3.js"),__vite__mapDeps([17,1,2,9,4,7,18,3,19,5,6,8,10,16,20,21]),import.meta.url),()=>E(()=>import("../nodes/4.Ck-0hor4.js"),__vite__mapDeps([22,1,2,7,18,9,4,3,19,5,6,8,10,16,21]),import.meta.url),()=>E(()=>import("../nodes/5.BV2I1j0o.js"),__vite__mapDeps([23,1,2,9,4,7,18,3,19,5,6,8,10,16,20]),import.meta.url),()=>E(()=>import("../nodes/6.PZ-pmrq7.js"),__vite__mapDeps([24,1,2,7,18,9,4,3,19,5,6,8,10,16,21]),import.meta.url),()=>E(()=>import("../nodes/7.C7IiHO6h.js"),__vite__mapDeps([25,1,2,5,6,7,8,9,4,3,10,19,16,21]),import.meta.url)],Yt=[],Gt={"/":[2],"/dummy":[7],"/feeds":[4],"/irc":[3],"/metadata":[6],"/xmpp":[5]},W={handleError:({error:e})=>{console.error(e)},reroute:()=>{},transport:{}},jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.decode])),Jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.encode])),Wt=!1,zt=(e,t)=>jt[e](t);export{zt as decode,jt as decoders,Gt as dictionary,Jt as encoders,Wt as hash,W as hooks,Ft as matchers,Nt as nodes,Mt as root,Yt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/BqKPKu0n.js";export{o as load_css,r as start};
|