@konemono/nostr-share-component 0.5.3 → 0.6.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var NostrShare=function(b){"use strict";var Rn=Object.defineProperty;var cr=b=>{throw TypeError(b)};var In=(b,w,k)=>w in b?Rn(b,w,{enumerable:!0,configurable:!0,writable:!0,value:k}):b[w]=k;var F=(b,w,k)=>In(b,typeof w!="symbol"?w+"":w,k),fr=(b,w,k)=>w.has(b)||cr("Cannot "+k);var z=(b,w,k)=>(fr(b,w,"read from private field"),k?k.call(b):w.get(b)),pe=(b,w,k)=>w.has(b)?cr("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(b):w.set(b,k),ge=(b,w,k,Ct)=>(fr(b,w,"write to private field"),Ct?Ct.call(b,k):w.set(b,k),k);var W,I;const w="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(w);const k=1,Ct=2,vr=16,hr=8,dr=1,_r=2,be="[",Kt="[!",Wt="]",_t={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var me=Array.isArray,Jt=Array.from,St=Object.keys,Nt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,mr=Object.getPrototypeOf;function yr(t){for(var e=0;e<t.length;e++)t[e]()}const D=2,ye=4,At=8,Xt=16,P=32,ot=64,Zt=128,lt=256,Ot=512,A=1024,J=2048,pt=4096,H=8192,st=16384,xr=32768,Qt=65536,wr=1<<19,xe=1<<20,Er=Symbol("$state"),we=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Tr(t,this.v)}function Sr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function zr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Rt(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Rr(t){return Ir(Rt(t))}function te(t,e=!1){const r=Rt(t);return e||(r.equals=Cr),r}function Ir(t){return y!==null&&y.f&D&&(q===null?Yr([t]):q.push(t)),t}function It(t,e){return y!==null&&Kr()&&y.f&(D|Xt)&&(q===null||!q.includes(t))&&Or(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Ce(t,J),p!==null&&p.f&A&&!(p.f&P)&&(T!==null&&T.includes(t)?(K(p,J),Vt(p)):Z===null?Gr([t]):Z.push(t))),e}function Ce(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var l=r[o],s=l.f;s&J||(K(l,e),s&(A|lt)&&(s&D?Ce(l,pt):Vt(l)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let $=!1;function B(t){$=t}let g;function M(t){if(t===null)throw ee(),_t;return g=t}function gt(){return M(Y(g))}function it(t){if($){if(Y(g)!==null)throw ee(),_t;g=t}}function Dr(t=1){if($){for(var e=t,r=g;e--;)r=Y(r);g=r}}function re(){for(var t=0,e=g;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=Y(e);e.remove(),e=n}}var Se,Ne,ze;function ne(){if(Se===void 0){Se=window;var t=Element.prototype,e=Node.prototype;Ne=zt(e,"firstChild").get,ze=zt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function bt(t=""){return document.createTextNode(t)}function U(t){return Ne.call(t)}function Y(t){return ze.call(t)}function $t(t,e){if(!$)return U(t);var r=U(g);if(r===null)r=g.appendChild(bt());else if(e&&r.nodeType!==3){var n=bt();return r==null||r.before(n),M(n),n}return M(r),r}function Ae(t,e){if(!$){var r=U(t);return r instanceof Comment&&r.data===""?Y(r):r}return g}function Dt(t,e=1,r=!1){let n=$?g:t;for(var o;e--;)o=n,n=Y(n);if(!$)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var s=bt();return n===null?o==null||o.after(s):n.before(s),M(s),s}return M(n),n}function Oe(t){t.textContent=""}function Re(t){var e=D|J;p===null?e|=lt:p.f|=xe;var r=y!==null&&y.f&D?y:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Ie(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&D?oe(n):G(n)}}}function Mr(t){for(var e=t.parent;e!==null;){if(!(e.f&D))return e;e=e.parent}return null}function De(t){var e,r=p;X(Mr(t));try{Ie(t),e=Ke(t)}finally{X(r)}return e}function Me(t){var e=De(t),r=(rt||t.f<)&&t.deps!==null?pt:A;K(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){Ie(t),Et(t,0),K(t,st),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Lr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function at(t,e,r,n=!0){var o=(t&ot)!==0,l=p,s={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|J,first:null,fn:e,last:null,next:null,parent:o?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ut;try{Ue(!0),qt(s),s.f|=xr}catch(c){throw G(s),c}finally{Ue(i)}}else e!==null&&Vt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&xe)===0;if(!u&&!o&&n&&(l!==null&&Lr(s,l),y!==null&&y.f&D)){var v=y;(v.children??(v.children=[])).push(s)}return s}function jr(t){const e=at(ot,t,!0);return()=>{G(e)}}function Fr(t){const e=at(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Mt(e,()=>{G(e),n(void 0)}):(G(e),n(void 0))})}function Pr(t){return at(ye,t,!1)}function Hr(t){return at(At,t,!0)}function le(t){return se(t)}function se(t,e=0){return at(At|Xt|e,t,!0)}function mt(t,e=!0){return at(At|P,t,!0,e)}function Le(t){var e=t.teardown;if(e!==null){const r=y;ft(null);try{e.call(null)}finally{ft(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;G(r,e),r=n}}function qr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&P||G(e),e=r}}function G(t,e=!0){var r=!1;if((e||t.f&wr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var l=n===o?null:Y(n);n.remove(),n=l}r=!0}Fe(t,e&&!r),je(t),Et(t,0),K(t,st);var s=t.transitions;if(s!==null)for(const u of s)u.stop();Le(t);var i=t.parent;i!==null&&i.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Mt(t,e){var r=[];ie(t,r,!0),He(r,()=>{G(t),e&&e()})}function He(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,l=(n.f&Qt)!==0||(n.f&P)!==0;ie(n,e,l?r:!1),n=o}}}function Lt(t){qe(t,!0)}function qe(t,e){if(t.f&H){wt(t)&&qt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&P)!==0;qe(r,o?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],yr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Ur=1;let Ft=!1,Pt=Be,yt=!1,xt=null,ut=!1;function Ue(t){ut=t}let et=[],ct=0,Dn=[],y=null;function ft(t){y=t}let p=null;function X(t){p=t}let q=null;function Yr(t){q=t}let T=null,O=0,Z=null;function Gr(t){Z=t}let Ye=1,rt=!1,L=null;function Ge(){return++Ye}function Kr(){return!ke}function wt(t){var s,i;var e=t.f;if(e&J)return!0;if(e&pt){var r=t.deps,n=(e<)!==0;if(r!==null){var o;if(e&Ot){for(o=0;o<r.length;o++)((s=r[o]).reactions??(s.reactions=[])).push(t);t.f^=Ot}for(o=0;o<r.length;o++){var l=r[o];if(wt(l)&&Me(l),n&&p!==null&&!rt&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!rt)&&K(t,A)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f&st)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function Ht(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var d;var e=T,r=O,n=Z,o=y,l=rt,s=q,i=L,u=t.f;T=null,O=0,Z=null,y=u&(P|ot)?null:t,rt=!ut&&(u<)!==0,q=null,L=t.ctx;try{var v=(0,t.fn)(),c=t.deps;if(T!==null){var a;if(Et(t,O),c!==null&&O>0)for(c.length=O+T.length,a=0;a<T.length;a++)c[O+a]=T[a];else t.deps=c=T;if(!rt)for(a=O;a<c.length;a++)((d=c[a]).reactions??(d.reactions=[])).push(t)}else c!==null&&O<c.length&&(Et(t,O),c.length=O);return v}finally{T=e,O=r,Z=n,y=o,rt=l,q=s,L=i}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&D&&(T===null||!T.includes(e))&&(K(e,pt),e.f&(lt|Ot)||(e.f^=Ot),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function qt(t){var e=t.f;if(!(e&st)){K(t,A);var r=p,n=L;p=t;try{e&Xt?qr(t):Fe(t),je(t),Le(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ye}catch(l){Ht(l,t,r,n||t.ctx)}finally{p=r}}}function We(){if(ct>1e3){ct=0;try{Sr()}catch(t){if(xt!==null)Ht(t,xt,null);else throw t}}ct++}function Je(t){var e=t.length;if(e!==0){We();var r=ut;ut=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&A||(o.f^=A);var l=[];Xe(o,l),Zr(l)}}finally{ut=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(st|H)))try{wt(n)&&(qt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){Ht(o,n,null,n.ctx)}}}function Qr(){if(yt=!1,ct>1001)return;const t=et;et=[],Je(t),yt||(ct=0,xt=null)}function Vt(t){Pt===Be&&(yt||(yt=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|P)){if(!(r&A))return;e.f^=A}}et.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,l=(o&P)!==0,s=l&&(o&A)!==0,i=r.next;if(!s&&!(o&H))if(o&At){if(l)r.f^=A;else try{wt(r)&&qt(r)}catch(a){Ht(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ye&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var v=a.next;if(v!==null){r=v;continue t}a=a.parent}}r=i}for(var c=0;c<n.length;c++)u=n[c],e.push(u),Xe(u,e)}function V(t){var e=Pt,r=et;try{We();const o=[];Pt=Ur,et=o,yt=!1,Je(r);var n=t==null?void 0:t();return Br(),(et.length>0||o.length>0)&&V(),ct=0,xt=null,n}finally{Pt=e,et=r}}function R(t){var c;var e=t.f,r=(e&D)!==0;if(r&&e&st){var n=De(t);return oe(t),n}if(y!==null){q!==null&&q.includes(t)&&Ar();var o=y.deps;T===null&&o!==null&&o[O]===t?O++:T===null?T=[t]:T.push(t),Z!==null&&p!==null&&p.f&A&&!(p.f&P)&&Z.includes(t)&&(K(p,J),Vt(p))}else if(r&&t.deps===null)for(var l=t,s=l.parent,i=l;s!==null;)if(s.f&D){var u=s;i=u,s=u.parent}else{var v=s;(c=v.deriveds)!=null&&c.includes(i)||(v.deriveds??(v.deriveds=[])).push(i);break}return r&&(l=t,wt(l)&&Me(l)),t.v}function tn(t){const e=y;try{return y=null,t()}finally{y=e}}const en=~(J|pt|A);function K(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Ut(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=p,n=y;e.e=null;try{for(var o=0;o<s.length;o++){var l=s[o];X(l.effect),ft(l.reaction),Pr(l.fn)}}finally{X(r),ft(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Yt(t){var _;var e=this,r=e.ownerDocument,n=t.type,o=((_=t.composedPath)==null?void 0:_.call(t))||[],l=o[0]||t.target,s=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var v=o.indexOf(e);if(v===-1)return;u<=v&&(s=u)}if(l=o[s]||t.target,l!==e){Nt(t,"currentTarget",{configurable:!0,get(){return l||r}});var c=y,a=p;ft(null),X(null);try{for(var d,h=[];l!==null;){var f=l.assignedSlot||l.parentNode||l.host||null;try{var m=l["__"+n];if(m!==void 0&&!l.disabled)if(me(m)){var[C,...S]=m;C.apply(l,[t,...S])}else m.call(l,t)}catch(x){d?h.push(x):d=x}if(t.cancelBubble||f===e||f===null)break;l=f}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{t.__root=e,delete t.currentTarget,ft(c),X(a)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function vt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&dr)!==0,n=(e&_r)!==0,o,l=!t.startsWith("<!>");return()=>{if($)return vt(g,null),g;o===void 0&&(o=tr(l?t:"<!>"+t),r||(o=U(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=U(s),u=s.lastChild;vt(i,u)}else vt(s,s);return s}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if($)return vt(g,null),g;if(!l){var s=tr(o),i=U(s);l=U(i)}var u=l.cloneNode(!0);return vt(u,u),u}}function nt(t,e){if($){p.nodes_end=g,gt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=$,o=g;try{for(var l=U(r);l&&(l.nodeType!==8||l.data!==be);)l=Y(l);if(!l)throw _t;B(!0),M(l),gt();const s=rr(t,{...e,anchor:l});if(g===null||g.nodeType!==8||g.data!==Wt)throw ee(),_t;return B(!1),s}catch(s){if(s===_t)return e.recover===!1&&Nr(),ne(),Oe(r),B(!1),er(t,e);throw s}finally{B(n),M(o)}}const ht=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:l,intro:s=!0}){ne();var i=new Set,u=a=>{for(var d=0;d<a.length;d++){var h=a[d];if(!i.has(h)){i.add(h);var f=br(h);e.addEventListener(h,Yt,{passive:f});var m=ht.get(h);m===void 0?(document.addEventListener(h,Yt,{passive:f}),ht.set(h,1)):ht.set(h,m+1)}}};u(Jt(Ze)),ue.add(u);var v=void 0,c=Fr(()=>{var a=r??e.appendChild(bt());return mt(()=>{if(l){Bt({});var d=L;d.c=l}o&&(n.$$events=o),$&&vt(a,null),v=t(a,n)||{},$&&(p.nodes_end=g),l&&Ut()}),()=>{var f;for(var d of i){e.removeEventListener(d,Yt);var h=ht.get(d);--h===0?(document.removeEventListener(d,Yt),ht.delete(d)):ht.set(d,h)}ue.delete(u),a!==r&&((f=a.parentNode)==null||f.removeChild(a))}});return ce.set(v,c),v}let ce=new WeakMap;function ln(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){$&>();var n=t,o=null,l=null,s=pr,i=r?Qt:0,u=!1;const v=(a,d=!0)=>{u=!0,c(d,a)},c=(a,d)=>{if(s===(s=a))return;let h=!1;if($){const f=n.data===Kt;!!s===f&&(n=re(),M(n),B(!1),h=!0)}s?(o?Lt(o):d&&(o=mt(()=>d(n))),l&&Mt(l,()=>{l=null})):(l?Lt(l):d&&(l=mt(()=>d(n))),o&&Mt(o,()=>{o=null})),h&&B(!0)};se(()=>{u=!1,e(v),u||c(null,null)},i),$&&(n=g)}function sn(t,e){return e}function an(t,e,r,n){for(var o=[],l=e.length,s=0;s<l;s++)ie(e[s].e,o,!0);var i=l>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Oe(u),u.append(r),n.clear(),Q(t,e[0].prev,e[l-1].next)}He(o,()=>{for(var v=0;v<l;v++){var c=e[v];i||(n.delete(c.k),Q(t,c.prev,c.next)),G(c.e,!i)}})}function un(t,e,r,n,o,l=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=$?M(U(u)):u.appendChild(bt())}$&>();var v=null,c=!1;se(()=>{var a=r(),d=me(a)?a:a==null?[]:Jt(a),h=d.length;if(c&&h===0)return;c=h===0;let f=!1;if($){var m=s.data===Kt;m!==(h===0)&&(s=re(),M(s),B(!1),f=!0)}if($){for(var C=null,S,_=0;_<h;_++){if(g.nodeType===8&&g.data===Wt){s=g,f=!0,B(!1);break}var x=d[_],j=n(x,_);S=or(g,i,C,null,x,j,_,o,e),i.items.set(j,S),C=S}h>0&&M(re())}if(!$){var E=y;cn(d,i,s,o,e,(E.f&H)!==0,n)}l!==null&&(h===0?v?Lt(v):v=mt(()=>l(s)):v!==null&&Mt(v,()=>{v=null})),f&&B(!0)}),$&&(s=g)}function cn(t,e,r,n,o,l,s,i){var u=t.length,v=e.items,c=e.first,a=c,d,h=null,f=[],m=[],C,S,_,x;for(x=0;x<u;x+=1){if(C=t[x],S=s(C,x),_=v.get(S),_===void 0){var j=a?a.e.nodes_start:r;h=or(j,e,h,h===null?e.first:h.next,C,S,x,n,o),v.set(S,h),f=[],m=[],a=h.next;continue}if(fn(_,C,x),_.e.f&H&&Lt(_.e),_!==a){if(d!==void 0&&d.has(_)){if(f.length<m.length){var E=m[0],N;h=E.prev;var dt=f[0],de=f[f.length-1];for(N=0;N<f.length;N+=1)lr(f[N],E,r);for(N=0;N<m.length;N+=1)d.delete(m[N]);Q(e,dt.prev,de.next),Q(e,h,dt),Q(e,de,E),a=E,h=de,x-=1,f=[],m=[]}else d.delete(_),lr(_,a,r),Q(e,_.prev,_.next),Q(e,_,h===null?e.first:h.next),Q(e,h,_),h=_;continue}for(f=[],m=[];a!==null&&a.k!==S;)(l||!(a.e.f&H))&&(d??(d=new Set)).add(a),m.push(a),a=a.next;if(a===null)continue;_=a}f.push(_),h=_,a=_.next}if(a!==null||d!==void 0){for(var _e=d===void 0?[]:Jt(d);a!==null;)(l||!(a.e.f&H))&&_e.push(a),a=a.next;var An=_e.length;if(An>0){var On=u===0?r:null;an(e,_e,On,v)}}p.first=e.first&&e.first.e,p.last=h&&h.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,l,s,i,u,v){var c=(u&k)!==0,a=(u&vr)===0,d=c?a?te(o):Rt(o):o,h=u&Ct?Rt(s):s,f={i:h,v:d,k:l,a:null,e:null,prev:r,next:n};try{return f.e=mt(()=>i(t,d,h),$),f.e.prev=r&&r.e,f.e.next=n&&n.e,r===null?e.first=f:(r.next=f,r.e.next=f.e),n!==null&&(n.prev=f,n.e.prev=f.e),f}finally{}}function lr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var s=Y(l);o.before(l),l=s}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var i;$&>();var l=(i=e.$$slots)==null?void 0:i[r],s=!1;l===!0&&(l=e.children,s=!0),l===void 0?o!==null&&o(t):l(t,s?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Tt(t,e,r,n){var o=t.__attributes??(t.__attributes={});$&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var sr=new Map;function hn(t){var e=sr.get(t.nodeName);if(e)return e;sr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var l in r)r[l].set&&e.push(l);n=mr(n)}return e}function dn(t){for(var e=p,r=p;e!==null&&!(e.f&(P|ot));)e=e.parent;try{return X(e),t()}finally{X(r)}}function tt(t,e,r,n){var j;var o=!ke,l=(r&hr)!==0,s=!1,i;i=t[e];var u=Er in t||we in t,v=((j=zt(t,e))==null?void 0:j.set)??(u&&l&&e in t?E=>t[e]=E:void 0),c=n,a=!0,d=!1,h=()=>(d=!0,a&&(a=!1,c=n),c);i===void 0&&n!==void 0&&(v&&o&&zr(),i=h(),v&&v(i));var f;if(f=()=>{var E=t[e];return E===void 0?h():(a=!0,d=!1,E)},v){var m=t.$$legacy;return function(E,N){return arguments.length>0?((!N||m||s)&&v(N?f():E),E):f()}}var C=!1,S=!1,_=te(i),x=dn(()=>Re(()=>{var E=f(),N=R(_);return C?(C=!1,S=!0,N):(S=!1,_.v=E)}));return function(E,N){if(arguments.length>0){const dt=N?R(x):E;return x.equals(dt)||(C=!0,It(_,dt),d&&c!==void 0&&(c=dt),tn(()=>R(x))),E}return R(x)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,W);pe(this,I);var l;var r=new Map,n=(s,i)=>{var u=te(i);return r.set(s,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(s,i){return R(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===we?!0:(R(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return It(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});ge(this,I,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&V(),ge(this,W,o.$$events);for(const s of Object.keys(z(this,I)))s==="$set"||s==="$destroy"||s==="$on"||Nt(this,s,{get(){return z(this,I)[s]},set(i){z(this,I)[s]=i},enumerable:!0});z(this,I).$set=s=>{Object.assign(o,s)},z(this,I).$destroy=()=>{ln(z(this,I))}}$set(e){z(this,I).$set(e)}$on(e,r){z(this,W)[e]=z(this,W)[e]||[];const n=(...o)=>r.call(this,...o);return z(this,W)[e].push(n),()=>{z(this,W)[e]=z(this,W)[e].filter(o=>o!==n)}}$destroy(){z(this,I).$destroy()}}W=new WeakMap,I=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();F(this,"$$ctor");F(this,"$$s");F(this,"$$c");F(this,"$$cn",!1);F(this,"$$d",{});F(this,"$$r",!1);F(this,"$$p_d",{});F(this,"$$l",{});F(this,"$$l_u",new Map);F(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return l=>{const s=document.createElement("slot");o!=="default"&&(s.name=o),nt(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Gt(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{Hr(()=>{var o;this.$$r=!0;for(const l of St(this.$$c)){if(!((o=this.$$p_d[l])!=null&&o.reflect))continue;this.$$d[l]=this.$$c[l];const s=Gt(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const s=this.$$c.$on(o,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return St(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var l;const o=(l=r[t])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,l){let s=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return St(e).map(i=>(e[i].attribute||i).toLowerCase())}};return St(e).forEach(i=>{Nt(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Gt(i,u,e),this.$$d[i]=u;var v=this.$$c;if(v){var c=(a=zt(v,i))==null?void 0:a.get;c?v[i]=u:v.$set({[i]:u})}}})}),n.forEach(i=>{Nt(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const bn=[{name:"eHagaki",url:"https://lokuyow.github.io/ehagaki/?content={text}",icon:"https://lokuyow.github.io/ehagaki/favicon.ico"},{name:"nokakoi",url:"https://nokakoi.com/app/?text={text}",icon:"https://nokakoi.com/favicon.ico"},{name:"Nos Haiku",url:"https://nos-haiku.vercel.app/antenna?content={text}",icon:"https://nos-haiku.vercel.app/favicon.png"},{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}&tags={tags}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),mn=(t,e,r)=>e(R(r).url),yn=kt('<button part="item" class="item svelte-1sy5hzc"><img> <span class="item-name"> </span></button>'),xn=kt('<div class="overlay svelte-1sy5hzc" part="overlay"><div class="inner svelte-1sy5hzc" part="dialog"><button part="close-button" class="close-button svelte-1sy5hzc" aria-label="Close">✖</button> <h2 part="title" class="title svelte-1sy5hzc">Select Share Client</h2> <div part="list" class="list svelte-1sy5hzc"></div> <div part="footer" class="footer svelte-1sy5hzc"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-1sy5hzc">nostr-share-component</a></div></div></div>');const wn={hash:"svelte-1sy5hzc",code:`
|
|
1
|
+
var NostrShare=function($){"use strict";var On=Object.defineProperty;var cr=$=>{throw TypeError($)};var Rn=($,E,k)=>E in $?On($,E,{enumerable:!0,configurable:!0,writable:!0,value:k}):$[E]=k;var j=($,E,k)=>Rn($,typeof E!="symbol"?E+"":E,k),fr=($,E,k)=>E.has($)||cr("Cannot "+k);var z=($,E,k)=>(fr($,E,"read from private field"),k?k.call($):E.get($)),pe=($,E,k)=>E.has($)?cr("Cannot add the same private member more than once"):E instanceof WeakSet?E.add($):E.set($,k),ge=($,E,k,St)=>(fr($,E,"write to private field"),St?St.call($,k):E.set($,k),k);var K,D;const E="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(E);const k=1,St=2,vr=16,hr=8,dr=1,_r=2,be="[",Kt="[!",Wt="]",_t={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var me=Array.isArray,Jt=Array.from,Ct=Object.keys,Nt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,mr=Object.getPrototypeOf;function yr(t){for(var e=0;e<t.length;e++)t[e]()}const I=2,ye=4,At=8,Xt=16,F=32,ot=64,Zt=128,lt=256,Ot=512,A=1024,J=2048,pt=4096,P=8192,st=16384,xr=32768,Qt=65536,wr=1<<19,xe=1<<20,Er=Symbol("$state"),we=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Sr(t){return!Tr(t,this.v)}function Cr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function zr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Rt(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Rr(t){return Dr(Rt(t))}function te(t,e=!1){const r=Rt(t);return e||(r.equals=Sr),r}function Dr(t){return y!==null&&y.f&I&&(H===null?Yr([t]):H.push(t)),t}function Dt(t,e){return y!==null&&Kr()&&y.f&(I|Xt)&&(H===null||!H.includes(t))&&Or(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Se(t,J),g!==null&&g.f&A&&!(g.f&F)&&(C!==null&&C.includes(t)?(G(g,J),Vt(g)):Z===null?Gr([t]):Z.push(t))),e}function Se(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var l=r[o],s=l.f;s&J||(G(l,e),s&(A|lt)&&(s&I?Se(l,pt):Vt(l)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function V(t){m=t}let b;function M(t){if(t===null)throw ee(),_t;return b=t}function gt(){return M(U(b))}function it(t){if(m){if(U(b)!==null)throw ee(),_t;b=t}}function Ir(t=1){if(m){for(var e=t,r=b;e--;)r=U(r);b=r}}function re(){for(var t=0,e=b;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=U(e);e.remove(),e=n}}var Ce,Ne,ze;function ne(){if(Ce===void 0){Ce=window;var t=Element.prototype,e=Node.prototype;Ne=zt(e,"firstChild").get,ze=zt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function bt(t=""){return document.createTextNode(t)}function B(t){return Ne.call(t)}function U(t){return ze.call(t)}function $t(t,e){if(!m)return B(t);var r=B(b);if(r===null)r=b.appendChild(bt());else if(e&&r.nodeType!==3){var n=bt();return r==null||r.before(n),M(n),n}return M(r),r}function Ae(t,e){if(!m){var r=B(t);return r instanceof Comment&&r.data===""?U(r):r}return b}function It(t,e=1,r=!1){let n=m?b:t;for(var o;e--;)o=n,n=U(n);if(!m)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var s=bt();return n===null?o==null||o.after(s):n.before(s),M(s),s}return M(n),n}function Oe(t){t.textContent=""}function Re(t){var e=I|J;g===null?e|=lt:g.f|=xe;var r=y!==null&&y.f&I?y:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??g};return r!==null&&(r.children??(r.children=[])).push(n),n}function De(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&I?oe(n):Y(n)}}}function Mr(t){for(var e=t.parent;e!==null;){if(!(e.f&I))return e;e=e.parent}return null}function Ie(t){var e,r=g;X(Mr(t));try{De(t),e=Ke(t)}finally{X(r)}return e}function Me(t){var e=Ie(t),r=(rt||t.f<)&&t.deps!==null?pt:A;G(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){De(t),Et(t,0),G(t,st),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Lr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function at(t,e,r,n=!0){var o=(t&ot)!==0,l=g,s={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|J,first:null,fn:e,last:null,next:null,parent:o?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var a=ut;try{Ue(!0),qt(s),s.f|=xr}catch(c){throw Y(s),c}finally{Ue(a)}}else e!==null&&Vt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&xe)===0;if(!u&&!o&&n&&(l!==null&&Lr(s,l),y!==null&&y.f&I)){var f=y;(f.children??(f.children=[])).push(s)}return s}function jr(t){const e=at(ot,t,!0);return()=>{Y(e)}}function Fr(t){const e=at(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Mt(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function Pr(t){return at(ye,t,!1)}function Hr(t){return at(At,t,!0)}function le(t){return se(t)}function se(t,e=0){return at(At|Xt|e,t,!0)}function mt(t,e=!0){return at(At|F,t,!0,e)}function Le(t){var e=t.teardown;if(e!==null){const r=y;ft(null);try{e.call(null)}finally{ft(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;Y(r,e),r=n}}function qr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&F||Y(e),e=r}}function Y(t,e=!0){var r=!1;if((e||t.f&wr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var l=n===o?null:U(n);n.remove(),n=l}r=!0}Fe(t,e&&!r),je(t),Et(t,0),G(t,st);var s=t.transitions;if(s!==null)for(const u of s)u.stop();Le(t);var a=t.parent;a!==null&&a.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Mt(t,e){var r=[];ie(t,r,!0),He(r,()=>{Y(t),e&&e()})}function He(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&P)){if(t.f^=P,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,l=(n.f&Qt)!==0||(n.f&F)!==0;ie(n,e,l?r:!1),n=o}}}function Lt(t){qe(t,!0)}function qe(t,e){if(t.f&P){wt(t)&&qt(t),t.f^=P;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&F)!==0;qe(r,o?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],yr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Ur=1;let Ft=!1,Pt=Be,yt=!1,xt=null,ut=!1;function Ue(t){ut=t}let et=[],ct=0,Dn=[],y=null;function ft(t){y=t}let g=null;function X(t){g=t}let H=null;function Yr(t){H=t}let C=null,O=0,Z=null;function Gr(t){Z=t}let Ye=1,rt=!1,L=null;function Ge(){return++Ye}function Kr(){return!ke}function wt(t){var s,a;var e=t.f;if(e&J)return!0;if(e&pt){var r=t.deps,n=(e<)!==0;if(r!==null){var o;if(e&Ot){for(o=0;o<r.length;o++)((s=r[o]).reactions??(s.reactions=[])).push(t);t.f^=Ot}for(o=0;o<r.length;o++){var l=r[o];if(wt(l)&&Me(l),n&&g!==null&&!rt&&!((a=l==null?void 0:l.reactions)!=null&&a.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||g!==null&&!rt)&&G(t,A)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f&st)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function Ht(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var h;var e=C,r=O,n=Z,o=y,l=rt,s=H,a=L,u=t.f;C=null,O=0,Z=null,y=u&(F|ot)?null:t,rt=!ut&&(u<)!==0,H=null,L=t.ctx;try{var f=(0,t.fn)(),c=t.deps;if(C!==null){var i;if(Et(t,O),c!==null&&O>0)for(c.length=O+C.length,i=0;i<C.length;i++)c[O+i]=C[i];else t.deps=c=C;if(!rt)for(i=O;i<c.length;i++)((h=c[i]).reactions??(h.reactions=[])).push(t)}else c!==null&&O<c.length&&(Et(t,O),c.length=O);return f}finally{C=e,O=r,Z=n,y=o,rt=l,H=s,L=a}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&I&&(C===null||!C.includes(e))&&(G(e,pt),e.f&(lt|Ot)||(e.f^=Ot),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function qt(t){var e=t.f;if(!(e&st)){G(t,A);var r=g,n=L;g=t;try{e&Xt?qr(t):Fe(t),je(t),Le(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ye}catch(l){Ht(l,t,r,n||t.ctx)}finally{g=r}}}function We(){if(ct>1e3){ct=0;try{Cr()}catch(t){if(xt!==null)Ht(t,xt,null);else throw t}}ct++}function Je(t){var e=t.length;if(e!==0){We();var r=ut;ut=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&A||(o.f^=A);var l=[];Xe(o,l),Zr(l)}}finally{ut=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(st|P)))try{wt(n)&&(qt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){Ht(o,n,null,n.ctx)}}}function Qr(){if(yt=!1,ct>1001)return;const t=et;et=[],Je(t),yt||(ct=0,xt=null)}function Vt(t){Pt===Be&&(yt||(yt=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|F)){if(!(r&A))return;e.f^=A}}et.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,l=(o&F)!==0,s=l&&(o&A)!==0,a=r.next;if(!s&&!(o&P))if(o&At){if(l)r.f^=A;else try{wt(r)&&qt(r)}catch(i){Ht(i,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ye&&n.push(r);if(a===null){let i=r.parent;for(;i!==null;){if(t===i)break t;var f=i.next;if(f!==null){r=f;continue t}i=i.parent}}r=a}for(var c=0;c<n.length;c++)u=n[c],e.push(u),Xe(u,e)}function q(t){var e=Pt,r=et;try{We();const o=[];Pt=Ur,et=o,yt=!1,Je(r);var n=t==null?void 0:t();return Br(),(et.length>0||o.length>0)&&q(),ct=0,xt=null,n}finally{Pt=e,et=r}}function R(t){var c;var e=t.f,r=(e&I)!==0;if(r&&e&st){var n=Ie(t);return oe(t),n}if(y!==null){H!==null&&H.includes(t)&&Ar();var o=y.deps;C===null&&o!==null&&o[O]===t?O++:C===null?C=[t]:C.push(t),Z!==null&&g!==null&&g.f&A&&!(g.f&F)&&Z.includes(t)&&(G(g,J),Vt(g))}else if(r&&t.deps===null)for(var l=t,s=l.parent,a=l;s!==null;)if(s.f&I){var u=s;a=u,s=u.parent}else{var f=s;(c=f.deriveds)!=null&&c.includes(a)||(f.deriveds??(f.deriveds=[])).push(a);break}return r&&(l=t,wt(l)&&Me(l)),t.v}function tn(t){const e=y;try{return y=null,t()}finally{y=e}}const en=~(J|pt|A);function G(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Ut(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=g,n=y;e.e=null;try{for(var o=0;o<s.length;o++){var l=s[o];X(l.effect),ft(l.reaction),Pr(l.fn)}}finally{X(r),ft(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Yt(t){var p;var e=this,r=e.ownerDocument,n=t.type,o=((p=t.composedPath)==null?void 0:p.call(t))||[],l=o[0]||t.target,s=0,a=t.__root;if(a){var u=o.indexOf(a);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=o.indexOf(e);if(f===-1)return;u<=f&&(s=u)}if(l=o[s]||t.target,l!==e){Nt(t,"currentTarget",{configurable:!0,get(){return l||r}});var c=y,i=g;ft(null),X(null);try{for(var h,v=[];l!==null;){var d=l.assignedSlot||l.parentNode||l.host||null;try{var _=l["__"+n];if(_!==void 0&&!l.disabled)if(me(_)){var[N,...T]=_;N.apply(l,[t,...T])}else _.call(l,t)}catch(x){h?v.push(x):h=x}if(t.cancelBubble||d===e||d===null)break;l=d}if(h){for(let x of v)queueMicrotask(()=>{throw x});throw h}}finally{t.__root=e,delete t.currentTarget,ft(c),X(i)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function vt(t,e){var r=g;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&dr)!==0,n=(e&_r)!==0,o,l=!t.startsWith("<!>");return()=>{if(m)return vt(b,null),b;o===void 0&&(o=tr(l?t:"<!>"+t),r||(o=B(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var a=B(s),u=s.lastChild;vt(a,u)}else vt(s,s);return s}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if(m)return vt(b,null),b;if(!l){var s=tr(o),a=B(s);l=B(a)}var u=l.cloneNode(!0);return vt(u,u),u}}function nt(t,e){if(m){g.nodes_end=b,gt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=m,o=b;try{for(var l=B(r);l&&(l.nodeType!==8||l.data!==be);)l=U(l);if(!l)throw _t;V(!0),M(l),gt();const s=rr(t,{...e,anchor:l});if(b===null||b.nodeType!==8||b.data!==Wt)throw ee(),_t;return V(!1),s}catch(s){if(s===_t)return e.recover===!1&&Nr(),ne(),Oe(r),V(!1),er(t,e);throw s}finally{V(n),M(o)}}const ht=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:l,intro:s=!0}){ne();var a=new Set,u=i=>{for(var h=0;h<i.length;h++){var v=i[h];if(!a.has(v)){a.add(v);var d=br(v);e.addEventListener(v,Yt,{passive:d});var _=ht.get(v);_===void 0?(document.addEventListener(v,Yt,{passive:d}),ht.set(v,1)):ht.set(v,_+1)}}};u(Jt(Ze)),ue.add(u);var f=void 0,c=Fr(()=>{var i=r??e.appendChild(bt());return mt(()=>{if(l){Bt({});var h=L;h.c=l}o&&(n.$$events=o),m&&vt(i,null),f=t(i,n)||{},m&&(g.nodes_end=b),l&&Ut()}),()=>{var d;for(var h of a){e.removeEventListener(h,Yt);var v=ht.get(h);--v===0?(document.removeEventListener(h,Yt),ht.delete(h)):ht.set(h,v)}ue.delete(u),i!==r&&((d=i.parentNode)==null||d.removeChild(i))}});return ce.set(f,c),f}let ce=new WeakMap;function ln(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){m&>();var n=t,o=null,l=null,s=pr,a=r?Qt:0,u=!1;const f=(i,h=!0)=>{u=!0,c(h,i)},c=(i,h)=>{if(s===(s=i))return;let v=!1;if(m){const d=n.data===Kt;!!s===d&&(n=re(),M(n),V(!1),v=!0)}s?(o?Lt(o):h&&(o=mt(()=>h(n))),l&&Mt(l,()=>{l=null})):(l?Lt(l):h&&(l=mt(()=>h(n))),o&&Mt(o,()=>{o=null})),v&&V(!0)};se(()=>{u=!1,e(f),u||c(null,null)},a),m&&(n=b)}function sn(t,e){return e}function an(t,e,r,n){for(var o=[],l=e.length,s=0;s<l;s++)ie(e[s].e,o,!0);var a=l>0&&o.length===0&&r!==null;if(a){var u=r.parentNode;Oe(u),u.append(r),n.clear(),Q(t,e[0].prev,e[l-1].next)}He(o,()=>{for(var f=0;f<l;f++){var c=e[f];a||(n.delete(c.k),Q(t,c.prev,c.next)),Y(c.e,!a)}})}function un(t,e,r,n,o,l=null){var s=t,a={flags:e,items:new Map,first:null};{var u=t;s=m?M(B(u)):u.appendChild(bt())}m&>();var f=null,c=!1;se(()=>{var i=r(),h=me(i)?i:i==null?[]:Jt(i),v=h.length;if(c&&v===0)return;c=v===0;let d=!1;if(m){var _=s.data===Kt;_!==(v===0)&&(s=re(),M(s),V(!1),d=!0)}if(m){for(var N=null,T,p=0;p<v;p++){if(b.nodeType===8&&b.data===Wt){s=b,d=!0,V(!1);break}var x=h[p],W=n(x,p);T=or(b,a,N,null,x,W,p,o,e),a.items.set(W,T),N=T}v>0&&M(re())}if(!m){var w=y;cn(h,a,s,o,e,(w.f&P)!==0,n)}l!==null&&(v===0?f?Lt(f):f=mt(()=>l(s)):f!==null&&Mt(f,()=>{f=null})),d&&V(!0)}),m&&(s=b)}function cn(t,e,r,n,o,l,s,a){var u=t.length,f=e.items,c=e.first,i=c,h,v=null,d=[],_=[],N,T,p,x;for(x=0;x<u;x+=1){if(N=t[x],T=s(N,x),p=f.get(T),p===void 0){var W=i?i.e.nodes_start:r;v=or(W,e,v,v===null?e.first:v.next,N,T,x,n,o),f.set(T,v),d=[],_=[],i=v.next;continue}if(fn(p,N,x),p.e.f&P&&Lt(p.e),p!==i){if(h!==void 0&&h.has(p)){if(d.length<_.length){var w=_[0],S;v=w.prev;var dt=d[0],de=d[d.length-1];for(S=0;S<d.length;S+=1)lr(d[S],w,r);for(S=0;S<_.length;S+=1)h.delete(_[S]);Q(e,dt.prev,de.next),Q(e,v,dt),Q(e,de,w),i=w,v=de,x-=1,d=[],_=[]}else h.delete(p),lr(p,i,r),Q(e,p.prev,p.next),Q(e,p,v===null?e.first:v.next),Q(e,v,p),v=p;continue}for(d=[],_=[];i!==null&&i.k!==T;)(l||!(i.e.f&P))&&(h??(h=new Set)).add(i),_.push(i),i=i.next;if(i===null)continue;p=i}d.push(p),v=p,i=p.next}if(i!==null||h!==void 0){for(var _e=h===void 0?[]:Jt(h);i!==null;)(l||!(i.e.f&P))&&_e.push(i),i=i.next;var zn=_e.length;if(zn>0){var An=u===0?r:null;an(e,_e,An,f)}}g.first=e.first&&e.first.e,g.last=v&&v.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,l,s,a,u,f){var c=(u&k)!==0,i=(u&vr)===0,h=c?i?te(o):Rt(o):o,v=u&St?Rt(s):s,d={i:v,v:h,k:l,a:null,e:null,prev:r,next:n};try{return d.e=mt(()=>a(t,h,v),m),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function lr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var s=U(l);o.before(l),l=s}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var a;m&>();var l=(a=e.$$slots)==null?void 0:a[r],s=!1;l===!0&&(l=e.children,s=!0),l===void 0?o!==null&&o(t):l(t,s?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Tt(t,e,r,n){var o=t.__attributes??(t.__attributes={});m&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var sr=new Map;function hn(t){var e=sr.get(t.nodeName);if(e)return e;sr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var l in r)r[l].set&&e.push(l);n=mr(n)}return e}function dn(t){for(var e=g,r=g;e!==null&&!(e.f&(F|ot));)e=e.parent;try{return X(e),t()}finally{X(r)}}function tt(t,e,r,n){var W;var o=!ke,l=(r&hr)!==0,s=!1,a;a=t[e];var u=Er in t||we in t,f=((W=zt(t,e))==null?void 0:W.set)??(u&&l&&e in t?w=>t[e]=w:void 0),c=n,i=!0,h=!1,v=()=>(h=!0,i&&(i=!1,c=n),c);a===void 0&&n!==void 0&&(f&&o&&zr(),a=v(),f&&f(a));var d;if(d=()=>{var w=t[e];return w===void 0?v():(i=!0,h=!1,w)},f){var _=t.$$legacy;return function(w,S){return arguments.length>0?((!S||_||s)&&f(S?d():w),w):d()}}var N=!1,T=!1,p=te(a),x=dn(()=>Re(()=>{var w=d(),S=R(p);return N?(N=!1,T=!0,S):(T=!1,p.v=w)}));return function(w,S){if(arguments.length>0){const dt=S?R(x):w;return x.equals(dt)||(N=!0,Dt(p,dt),h&&c!==void 0&&(c=dt),tn(()=>R(x))),w}return R(x)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,K);pe(this,D);var l;var r=new Map,n=(s,a)=>{var u=te(a);return r.set(s,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(s,a){return R(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===we?!0:(R(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,u){return Dt(r.get(a)??n(a,u),u),Reflect.set(s,a,u)}});ge(this,D,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&q(),ge(this,K,o.$$events);for(const s of Object.keys(z(this,D)))s==="$set"||s==="$destroy"||s==="$on"||Nt(this,s,{get(){return z(this,D)[s]},set(a){z(this,D)[s]=a},enumerable:!0});z(this,D).$set=s=>{Object.assign(o,s)},z(this,D).$destroy=()=>{ln(z(this,D))}}$set(e){z(this,D).$set(e)}$on(e,r){z(this,K)[e]=z(this,K)[e]||[];const n=(...o)=>r.call(this,...o);return z(this,K)[e].push(n),()=>{z(this,K)[e]=z(this,K)[e].filter(o=>o!==n)}}$destroy(){z(this,D).$destroy()}}K=new WeakMap,D=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();j(this,"$$ctor");j(this,"$$s");j(this,"$$c");j(this,"$$cn",!1);j(this,"$$d",{});j(this,"$$r",!1);j(this,"$$p_d",{});j(this,"$$l",{});j(this,"$$l_u",new Map);j(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return l=>{const s=document.createElement("slot");o!=="default"&&(s.name=o),nt(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Gt(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{Hr(()=>{var o;this.$$r=!0;for(const l of Ct(this.$$c)){if(!((o=this.$$p_d[l])!=null&&o.reflect))continue;this.$$d[l]=this.$$c[l];const s=Gt(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const s=this.$$c.$on(o,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var l;const o=(l=r[t])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,l){let s=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Ct(e).forEach(a=>{Nt(s.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var i;u=Gt(a,u,e),this.$$d[a]=u;var f=this.$$c;if(f){var c=(i=zt(f,a))==null?void 0:i.get;c?f[a]=u:f.$set({[a]:u})}}})}),n.forEach(a=>{Nt(s.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),t.element=s,s}const bn=[{name:"eHagaki",url:"https://lokuyow.github.io/ehagaki/?content={text}",icon:"https://lokuyow.github.io/ehagaki/favicon.ico"},{name:"nokakoi",url:"https://nokakoi.com/app/?text={text}",icon:"https://nokakoi.com/favicon.ico"},{name:"Nos Haiku",url:"https://nos-haiku.vercel.app/antenna?content={text}",icon:"https://nos-haiku.vercel.app/favicon.png"},{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}&tags={tags}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),mn=(t,e,r)=>e(R(r).url),yn=kt('<button part="item" class="item svelte-1sy5hzc"><img> <span class="item-name"> </span></button>'),xn=kt('<div class="overlay svelte-1sy5hzc" part="overlay"><div class="inner svelte-1sy5hzc" part="dialog"><button part="close-button" class="close-button svelte-1sy5hzc" aria-label="Close">✖</button> <h2 part="title" class="title svelte-1sy5hzc">Select Share Client</h2> <div part="list" class="list svelte-1sy5hzc"></div> <div part="footer" class="footer svelte-1sy5hzc"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-1sy5hzc">nostr-share-component</a></div></div></div>');const wn={hash:"svelte-1sy5hzc",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-1sy5hzc {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;z-index:50;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-1sy5hzc {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -12,7 +12,7 @@ var NostrShare=function(b){"use strict";var Rn=Object.defineProperty;var cr=b=>{
|
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-1sy5hzc {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
14
|
transform 0.1s ease;}.close-button.svelte-1sy5hzc:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-1sy5hzc:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-1sy5hzc {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-1sy5hzc {font-weight:500;color:var(--button1-border-color);}a.svelte-1sy5hzc:hover {color:var(--button2-text-color);}`};function he(t,e){Bt(e,!0),fe(t,wn);let r=tt(e,"text",7,""),n=tt(e,"tags",7,""),o=tt(e,"handleClose",7);const l=c=>{r()===""&&r(`${document.title}
|
|
15
|
-
${window.location.href}`);let
|
|
15
|
+
${window.location.href}`);let i=c.replace("{text}",encodeURIComponent(r()??""));i=i.replace("{tags}",encodeURIComponent(n()??"")),console.log(i),window.open(i,"_blank","noreferrer"),o()()};var s=xn();s.__click=function(...c){var i;(i=o())==null||i.apply(this,c)};var a=$t(s);a.__click=[$n];var u=$t(a);u.__click=function(...c){var i;(i=o())==null||i.apply(this,c)};var f=It(u,4);return un(f,21,()=>bn,sn,(c,i)=>{var h=yn();h.__click=[mn,l,i];var v=$t(h);Tt(v,"width",24);var d=It(v,2),_=$t(d,!0);it(d),it(h),le(()=>{Tt(v,"src",R(i).icon),Tt(v,"alt",R(i).name),nn(_,R(i).name)}),nt(c,h)}),it(f),Ir(2),it(a),it(s),nt(t,s),Ut({get text(){return r()},set text(c=""){r(c),q()},get tags(){return n()},set tags(c=""){n(c),q()},get handleClose(){return o()},set handleClose(c){o(c),q()}})}Qe(["click"]),customElements.define("nostr-share-dialog",ve(he,{text:{},tags:{},handleClose:{}},[],[],!0));var En=rn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
16
16
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
17
17
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
18
18
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -28,8 +28,8 @@ ${window.location.href}`);let a=c.replace("{text}",encodeURIComponent(r()??""));
|
|
|
28
28
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
29
29
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
30
30
|
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const kn={hash:"svelte-givlj7",code:`
|
|
31
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=tt(e,"size",7,28);var n=En();return le(()=>Tt(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),nt(t,n),Ut({get size(){return r()},set size(o=28){r(o),
|
|
31
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=tt(e,"size",7,28);var n=En();return le(()=>Tt(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),nt(t,n),Ut({get size(){return r()},set size(o=28){r(o),q()}})}ve(ar,{size:{}},[],[],!0);var Tn=kt('<span part="text" class="svelte-1h3gn4x">Nostr</span>'),Sn=kt("<!> <!>",1),Cn=kt('<button part="button" title="Share on Nostr" class="svelte-1h3gn4x"><!></button> <!>',1);const Nn={hash:"svelte-1h3gn4x",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
32
32
|
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-active-color: #999999;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
33
33
|
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-active-color: #757575;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
34
34
|
}[part="button"].svelte-1h3gn4x {display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.5em;transition:all 0.1s ease-in-out;border-radius:8px;font-weight:bold;}[part="button"].svelte-1h3gn4x:active {transform:scale(0.98);}[data-nostr-share="default"].svelte-1h3gn4x {padding:6px 16px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="mini"].svelte-1h3gn4x {padding:2px 6px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="default"].svelte-1h3gn4x:hover,
|
|
35
|
-
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,
|
|
35
|
+
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,Nn);let r=tt(e,"data-text",7,""),n=tt(e,"data-tags",7,""),o=tt(e,"data-type",7,"default"),l=tt(e,"icon-size",7,28),s=Rr(!1);function a(){Dt(s,!0)}function u(){Dt(s,!1)}const f=typeof l()=="string"?parseInt(l(),10):l();var c=Cn(),i=Ae(c);i.__click=a;var h=$t(i);vn(h,e,"default",{},_=>{var N=Sn(),T=Ae(N),p=Re(()=>o()==="icon"?f:28);ar(T,{get size(){return R(p)}});var x=It(T,2);{var W=w=>{var S=Tn();nt(w,S)};nr(x,w=>{o()!=="icon"&&w(W)})}nt(_,N)}),it(i);var v=It(i,2);{var d=_=>{he(_,{handleClose:u,get text(){return r()},get tags(){return n()}})};nr(v,_=>{R(s)&&_(d)})}return le(()=>Tt(i,"data-nostr-share",o())),nt(t,c),Ut({openDialog:a,closeDialog:u,get"data-text"(){return r()},set"data-text"(_=""){r(_),q()},get"data-tags"(){return n()},set"data-tags"(_=""){n(_),q()},get"data-type"(){return o()},set"data-type"(_="default"){o(_),q()},get"icon-size"(){return l()},set"icon-size"(_=28){l(_),q()}})}return Qe(["click"]),customElements.define("nostr-share",ve(ur,{"data-text":{},"data-tags":{},"data-type":{},"icon-size":{}},["default"],["openDialog","closeDialog"],!0)),$.Dialog=he,$.NostrShare=ur,Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),$}({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(g,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(g=typeof globalThis<"u"?globalThis:g||self,$(g.NostrShare={}))})(this,function(g){"use strict";var Rn=Object.defineProperty;var cr=g=>{throw TypeError(g)};var In=(g,$,k)=>$ in g?Rn(g,$,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[$]=k;var F=(g,$,k)=>In(g,typeof $!="symbol"?$+"":$,k),fr=(g,$,k)=>$.has(g)||cr("Cannot "+k);var z=(g,$,k)=>(fr(g,$,"read from private field"),k?k.call(g):$.get(g)),pe=(g,$,k)=>$.has(g)?cr("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(g):$.set(g,k),ge=(g,$,k,Ct)=>(fr(g,$,"write to private field"),Ct?Ct.call(g,k):$.set(g,k),k);var W,I;const $="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add($);const k=1,Ct=2,vr=16,hr=8,dr=1,_r=2,be="[",Kt="[!",Wt="]",_t={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var me=Array.isArray,Jt=Array.from,St=Object.keys,Nt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,mr=Object.getPrototypeOf;function yr(t){for(var e=0;e<t.length;e++)t[e]()}const D=2,ye=4,At=8,Xt=16,P=32,ot=64,Zt=128,st=256,Ot=512,A=1024,J=2048,pt=4096,H=8192,lt=16384,xr=32768,Qt=65536,wr=1<<19,xe=1<<20,Er=Symbol("$state"),we=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Tr(t,this.v)}function Sr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function zr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Rt(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Rr(t){return Ir(Rt(t))}function te(t,e=!1){const r=Rt(t);return e||(r.equals=Cr),r}function Ir(t){return x!==null&&x.f&D&&(q===null?Yr([t]):q.push(t)),t}function It(t,e){return x!==null&&Kr()&&x.f&(D|Xt)&&(q===null||!q.includes(t))&&Or(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Ce(t,J),p!==null&&p.f&A&&!(p.f&P)&&(T!==null&&T.includes(t)?(K(p,J),Vt(p)):Z===null?Gr([t]):Z.push(t))),e}function Ce(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var s=r[o],l=s.f;l&J||(K(s,e),l&(A|st)&&(l&D?Ce(s,pt):Vt(s)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let m=!1;function B(t){m=t}let b;function M(t){if(t===null)throw ee(),_t;return b=t}function gt(){return M(Y(b))}function it(t){if(m){if(Y(b)!==null)throw ee(),_t;b=t}}function Dr(t=1){if(m){for(var e=t,r=b;e--;)r=Y(r);b=r}}function re(){for(var t=0,e=b;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=Y(e);e.remove(),e=n}}var Se,Ne,ze;function ne(){if(Se===void 0){Se=window;var t=Element.prototype,e=Node.prototype;Ne=zt(e,"firstChild").get,ze=zt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function bt(t=""){return document.createTextNode(t)}function U(t){return Ne.call(t)}function Y(t){return ze.call(t)}function $t(t,e){if(!m)return U(t);var r=U(b);if(r===null)r=b.appendChild(bt());else if(e&&r.nodeType!==3){var n=bt();return r==null||r.before(n),M(n),n}return M(r),r}function Ae(t,e){if(!m){var r=U(t);return r instanceof Comment&&r.data===""?Y(r):r}return b}function Dt(t,e=1,r=!1){let n=m?b:t;for(var o;e--;)o=n,n=Y(n);if(!m)return n;var s=n==null?void 0:n.nodeType;if(r&&s!==3){var l=bt();return n===null?o==null||o.after(l):n.before(l),M(l),l}return M(n),n}function Oe(t){t.textContent=""}function Re(t){var e=D|J;p===null?e|=st:p.f|=xe;var r=x!==null&&x.f&D?x:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Ie(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&D?oe(n):G(n)}}}function Mr(t){for(var e=t.parent;e!==null;){if(!(e.f&D))return e;e=e.parent}return null}function De(t){var e,r=p;X(Mr(t));try{Ie(t),e=Ke(t)}finally{X(r)}return e}function Me(t){var e=De(t),r=(rt||t.f&st)&&t.deps!==null?pt:A;K(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){Ie(t),Et(t,0),K(t,lt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Lr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function at(t,e,r,n=!0){var o=(t&ot)!==0,s=p,l={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|J,first:null,fn:e,last:null,next:null,parent:o?null:s,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ut;try{Ue(!0),qt(l),l.f|=xr}catch(c){throw G(l),c}finally{Ue(i)}}else e!==null&&Vt(l);var u=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&xe)===0;if(!u&&!o&&n&&(s!==null&&Lr(l,s),x!==null&&x.f&D)){var v=x;(v.children??(v.children=[])).push(l)}return l}function jr(t){const e=at(ot,t,!0);return()=>{G(e)}}function Fr(t){const e=at(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Mt(e,()=>{G(e),n(void 0)}):(G(e),n(void 0))})}function Pr(t){return at(ye,t,!1)}function Hr(t){return at(At,t,!0)}function se(t){return le(t)}function le(t,e=0){return at(At|Xt|e,t,!0)}function mt(t,e=!0){return at(At|P,t,!0,e)}function Le(t){var e=t.teardown;if(e!==null){const r=x;ft(null);try{e.call(null)}finally{ft(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;G(r,e),r=n}}function qr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&P||G(e),e=r}}function G(t,e=!0){var r=!1;if((e||t.f&wr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var s=n===o?null:Y(n);n.remove(),n=s}r=!0}Fe(t,e&&!r),je(t),Et(t,0),K(t,lt);var l=t.transitions;if(l!==null)for(const u of l)u.stop();Le(t);var i=t.parent;i!==null&&i.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Mt(t,e){var r=[];ie(t,r,!0),He(r,()=>{G(t),e&&e()})}function He(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&e.push(l);for(var n=t.first;n!==null;){var o=n.next,s=(n.f&Qt)!==0||(n.f&P)!==0;ie(n,e,s?r:!1),n=o}}}function Lt(t){qe(t,!0)}function qe(t,e){if(t.f&H){wt(t)&&qt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&P)!==0;qe(r,o?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],yr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Ur=1;let Ft=!1,Pt=Be,yt=!1,xt=null,ut=!1;function Ue(t){ut=t}let et=[],ct=0,Dn=[],x=null;function ft(t){x=t}let p=null;function X(t){p=t}let q=null;function Yr(t){q=t}let T=null,O=0,Z=null;function Gr(t){Z=t}let Ye=1,rt=!1,L=null;function Ge(){return++Ye}function Kr(){return!ke}function wt(t){var l,i;var e=t.f;if(e&J)return!0;if(e&pt){var r=t.deps,n=(e&st)!==0;if(r!==null){var o;if(e&Ot){for(o=0;o<r.length;o++)((l=r[o]).reactions??(l.reactions=[])).push(t);t.f^=Ot}for(o=0;o<r.length;o++){var s=r[o];if(wt(s)&&Me(s),n&&p!==null&&!rt&&!((i=s==null?void 0:s.reactions)!=null&&i.includes(t))&&(s.reactions??(s.reactions=[])).push(t),s.version>t.version)return!0}}(!n||p!==null&&!rt)&&K(t,A)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f<)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function Ht(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var d;var e=T,r=O,n=Z,o=x,s=rt,l=q,i=L,u=t.f;T=null,O=0,Z=null,x=u&(P|ot)?null:t,rt=!ut&&(u&st)!==0,q=null,L=t.ctx;try{var v=(0,t.fn)(),c=t.deps;if(T!==null){var a;if(Et(t,O),c!==null&&O>0)for(c.length=O+T.length,a=0;a<T.length;a++)c[O+a]=T[a];else t.deps=c=T;if(!rt)for(a=O;a<c.length;a++)((d=c[a]).reactions??(d.reactions=[])).push(t)}else c!==null&&O<c.length&&(Et(t,O),c.length=O);return v}finally{T=e,O=r,Z=n,x=o,rt=s,q=l,L=i}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&D&&(T===null||!T.includes(e))&&(K(e,pt),e.f&(st|Ot)||(e.f^=Ot),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function qt(t){var e=t.f;if(!(e<)){K(t,A);var r=p,n=L;p=t;try{e&Xt?qr(t):Fe(t),je(t),Le(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ye}catch(s){Ht(s,t,r,n||t.ctx)}finally{p=r}}}function We(){if(ct>1e3){ct=0;try{Sr()}catch(t){if(xt!==null)Ht(t,xt,null);else throw t}}ct++}function Je(t){var e=t.length;if(e!==0){We();var r=ut;ut=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&A||(o.f^=A);var s=[];Xe(o,s),Zr(s)}}finally{ut=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(lt|H)))try{wt(n)&&(qt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){Ht(o,n,null,n.ctx)}}}function Qr(){if(yt=!1,ct>1001)return;const t=et;et=[],Je(t),yt||(ct=0,xt=null)}function Vt(t){Pt===Be&&(yt||(yt=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|P)){if(!(r&A))return;e.f^=A}}et.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,s=(o&P)!==0,l=s&&(o&A)!==0,i=r.next;if(!l&&!(o&H))if(o&At){if(s)r.f^=A;else try{wt(r)&&qt(r)}catch(a){Ht(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ye&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var v=a.next;if(v!==null){r=v;continue t}a=a.parent}}r=i}for(var c=0;c<n.length;c++)u=n[c],e.push(u),Xe(u,e)}function V(t){var e=Pt,r=et;try{We();const o=[];Pt=Ur,et=o,yt=!1,Je(r);var n=t==null?void 0:t();return Br(),(et.length>0||o.length>0)&&V(),ct=0,xt=null,n}finally{Pt=e,et=r}}function R(t){var c;var e=t.f,r=(e&D)!==0;if(r&&e<){var n=De(t);return oe(t),n}if(x!==null){q!==null&&q.includes(t)&&Ar();var o=x.deps;T===null&&o!==null&&o[O]===t?O++:T===null?T=[t]:T.push(t),Z!==null&&p!==null&&p.f&A&&!(p.f&P)&&Z.includes(t)&&(K(p,J),Vt(p))}else if(r&&t.deps===null)for(var s=t,l=s.parent,i=s;l!==null;)if(l.f&D){var u=l;i=u,l=u.parent}else{var v=l;(c=v.deriveds)!=null&&c.includes(i)||(v.deriveds??(v.deriveds=[])).push(i);break}return r&&(s=t,wt(s)&&Me(s)),t.v}function tn(t){const e=x;try{return x=null,t()}finally{x=e}}const en=~(J|pt|A);function K(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Ut(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const l=e.e;if(l!==null){var r=p,n=x;e.e=null;try{for(var o=0;o<l.length;o++){var s=l[o];X(s.effect),ft(s.reaction),Pr(s.fn)}}finally{X(r),ft(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Yt(t){var _;var e=this,r=e.ownerDocument,n=t.type,o=((_=t.composedPath)==null?void 0:_.call(t))||[],s=o[0]||t.target,l=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var v=o.indexOf(e);if(v===-1)return;u<=v&&(l=u)}if(s=o[l]||t.target,s!==e){Nt(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=x,a=p;ft(null),X(null);try{for(var d,h=[];s!==null;){var f=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+n];if(y!==void 0&&!s.disabled)if(me(y)){var[C,...S]=y;C.apply(s,[t,...S])}else y.call(s,t)}catch(w){d?h.push(w):d=w}if(t.cancelBubble||f===e||f===null)break;s=f}if(d){for(let w of h)queueMicrotask(()=>{throw w});throw d}}finally{t.__root=e,delete t.currentTarget,ft(c),X(a)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function vt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&dr)!==0,n=(e&_r)!==0,o,s=!t.startsWith("<!>");return()=>{if(m)return vt(b,null),b;o===void 0&&(o=tr(s?t:"<!>"+t),r||(o=U(o)));var l=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=U(l),u=l.lastChild;vt(i,u)}else vt(l,l);return l}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,s;return()=>{if(m)return vt(b,null),b;if(!s){var l=tr(o),i=U(l);s=U(i)}var u=s.cloneNode(!0);return vt(u,u),u}}function nt(t,e){if(m){p.nodes_end=b,gt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=m,o=b;try{for(var s=U(r);s&&(s.nodeType!==8||s.data!==be);)s=Y(s);if(!s)throw _t;B(!0),M(s),gt();const l=rr(t,{...e,anchor:s});if(b===null||b.nodeType!==8||b.data!==Wt)throw ee(),_t;return B(!1),l}catch(l){if(l===_t)return e.recover===!1&&Nr(),ne(),Oe(r),B(!1),er(t,e);throw l}finally{B(n),M(o)}}const ht=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:s,intro:l=!0}){ne();var i=new Set,u=a=>{for(var d=0;d<a.length;d++){var h=a[d];if(!i.has(h)){i.add(h);var f=br(h);e.addEventListener(h,Yt,{passive:f});var y=ht.get(h);y===void 0?(document.addEventListener(h,Yt,{passive:f}),ht.set(h,1)):ht.set(h,y+1)}}};u(Jt(Ze)),ue.add(u);var v=void 0,c=Fr(()=>{var a=r??e.appendChild(bt());return mt(()=>{if(s){Bt({});var d=L;d.c=s}o&&(n.$$events=o),m&&vt(a,null),v=t(a,n)||{},m&&(p.nodes_end=b),s&&Ut()}),()=>{var f;for(var d of i){e.removeEventListener(d,Yt);var h=ht.get(d);--h===0?(document.removeEventListener(d,Yt),ht.delete(d)):ht.set(d,h)}ue.delete(u),a!==r&&((f=a.parentNode)==null||f.removeChild(a))}});return ce.set(v,c),v}let ce=new WeakMap;function sn(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){m&>();var n=t,o=null,s=null,l=pr,i=r?Qt:0,u=!1;const v=(a,d=!0)=>{u=!0,c(d,a)},c=(a,d)=>{if(l===(l=a))return;let h=!1;if(m){const f=n.data===Kt;!!l===f&&(n=re(),M(n),B(!1),h=!0)}l?(o?Lt(o):d&&(o=mt(()=>d(n))),s&&Mt(s,()=>{s=null})):(s?Lt(s):d&&(s=mt(()=>d(n))),o&&Mt(o,()=>{o=null})),h&&B(!0)};le(()=>{u=!1,e(v),u||c(null,null)},i),m&&(n=b)}function ln(t,e){return e}function an(t,e,r,n){for(var o=[],s=e.length,l=0;l<s;l++)ie(e[l].e,o,!0);var i=s>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Oe(u),u.append(r),n.clear(),Q(t,e[0].prev,e[s-1].next)}He(o,()=>{for(var v=0;v<s;v++){var c=e[v];i||(n.delete(c.k),Q(t,c.prev,c.next)),G(c.e,!i)}})}function un(t,e,r,n,o,s=null){var l=t,i={flags:e,items:new Map,first:null};{var u=t;l=m?M(U(u)):u.appendChild(bt())}m&>();var v=null,c=!1;le(()=>{var a=r(),d=me(a)?a:a==null?[]:Jt(a),h=d.length;if(c&&h===0)return;c=h===0;let f=!1;if(m){var y=l.data===Kt;y!==(h===0)&&(l=re(),M(l),B(!1),f=!0)}if(m){for(var C=null,S,_=0;_<h;_++){if(b.nodeType===8&&b.data===Wt){l=b,f=!0,B(!1);break}var w=d[_],j=n(w,_);S=or(b,i,C,null,w,j,_,o,e),i.items.set(j,S),C=S}h>0&&M(re())}if(!m){var E=x;cn(d,i,l,o,e,(E.f&H)!==0,n)}s!==null&&(h===0?v?Lt(v):v=mt(()=>s(l)):v!==null&&Mt(v,()=>{v=null})),f&&B(!0)}),m&&(l=b)}function cn(t,e,r,n,o,s,l,i){var u=t.length,v=e.items,c=e.first,a=c,d,h=null,f=[],y=[],C,S,_,w;for(w=0;w<u;w+=1){if(C=t[w],S=l(C,w),_=v.get(S),_===void 0){var j=a?a.e.nodes_start:r;h=or(j,e,h,h===null?e.first:h.next,C,S,w,n,o),v.set(S,h),f=[],y=[],a=h.next;continue}if(fn(_,C,w),_.e.f&H&&Lt(_.e),_!==a){if(d!==void 0&&d.has(_)){if(f.length<y.length){var E=y[0],N;h=E.prev;var dt=f[0],de=f[f.length-1];for(N=0;N<f.length;N+=1)sr(f[N],E,r);for(N=0;N<y.length;N+=1)d.delete(y[N]);Q(e,dt.prev,de.next),Q(e,h,dt),Q(e,de,E),a=E,h=de,w-=1,f=[],y=[]}else d.delete(_),sr(_,a,r),Q(e,_.prev,_.next),Q(e,_,h===null?e.first:h.next),Q(e,h,_),h=_;continue}for(f=[],y=[];a!==null&&a.k!==S;)(s||!(a.e.f&H))&&(d??(d=new Set)).add(a),y.push(a),a=a.next;if(a===null)continue;_=a}f.push(_),h=_,a=_.next}if(a!==null||d!==void 0){for(var _e=d===void 0?[]:Jt(d);a!==null;)(s||!(a.e.f&H))&&_e.push(a),a=a.next;var An=_e.length;if(An>0){var On=u===0?r:null;an(e,_e,On,v)}}p.first=e.first&&e.first.e,p.last=h&&h.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,s,l,i,u,v){var c=(u&k)!==0,a=(u&vr)===0,d=c?a?te(o):Rt(o):o,h=u&Ct?Rt(l):l,f={i:h,v:d,k:s,a:null,e:null,prev:r,next:n};try{return f.e=mt(()=>i(t,d,h),m),f.e.prev=r&&r.e,f.e.next=n&&n.e,r===null?e.first=f:(r.next=f,r.e.next=f.e),n!==null&&(n.prev=f,n.e.prev=f.e),f}finally{}}function sr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==n;){var l=Y(s);o.before(s),s=l}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var i;m&>();var s=(i=e.$$slots)==null?void 0:i[r],l=!1;s===!0&&(s=e.children,l=!0),s===void 0?o!==null&&o(t):s(t,l?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Tt(t,e,r,n){var o=t.__attributes??(t.__attributes={});m&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var lr=new Map;function hn(t){var e=lr.get(t.nodeName);if(e)return e;lr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var s in r)r[s].set&&e.push(s);n=mr(n)}return e}function dn(t){for(var e=p,r=p;e!==null&&!(e.f&(P|ot));)e=e.parent;try{return X(e),t()}finally{X(r)}}function tt(t,e,r,n){var j;var o=!ke,s=(r&hr)!==0,l=!1,i;i=t[e];var u=Er in t||we in t,v=((j=zt(t,e))==null?void 0:j.set)??(u&&s&&e in t?E=>t[e]=E:void 0),c=n,a=!0,d=!1,h=()=>(d=!0,a&&(a=!1,c=n),c);i===void 0&&n!==void 0&&(v&&o&&zr(),i=h(),v&&v(i));var f;if(f=()=>{var E=t[e];return E===void 0?h():(a=!0,d=!1,E)},v){var y=t.$$legacy;return function(E,N){return arguments.length>0?((!N||y||l)&&v(N?f():E),E):f()}}var C=!1,S=!1,_=te(i),w=dn(()=>Re(()=>{var E=f(),N=R(_);return C?(C=!1,S=!0,N):(S=!1,_.v=E)}));return function(E,N){if(arguments.length>0){const dt=N?R(w):E;return w.equals(dt)||(C=!0,It(_,dt),d&&c!==void 0&&(c=dt),tn(()=>R(w))),E}return R(w)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,W);pe(this,I);var s;var r=new Map,n=(l,i)=>{var u=te(i);return r.set(l,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(l,i){return R(r.get(i)??n(i,Reflect.get(l,i)))},has(l,i){return i===we?!0:(R(r.get(i)??n(i,Reflect.get(l,i))),Reflect.has(l,i))},set(l,i,u){return It(r.get(i)??n(i,u),u),Reflect.set(l,i,u)}});ge(this,I,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&V(),ge(this,W,o.$$events);for(const l of Object.keys(z(this,I)))l==="$set"||l==="$destroy"||l==="$on"||Nt(this,l,{get(){return z(this,I)[l]},set(i){z(this,I)[l]=i},enumerable:!0});z(this,I).$set=l=>{Object.assign(o,l)},z(this,I).$destroy=()=>{sn(z(this,I))}}$set(e){z(this,I).$set(e)}$on(e,r){z(this,W)[e]=z(this,W)[e]||[];const n=(...o)=>r.call(this,...o);return z(this,W)[e].push(n),()=>{z(this,W)[e]=z(this,W)[e].filter(o=>o!==n)}}$destroy(){z(this,I).$destroy()}}W=new WeakMap,I=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();F(this,"$$ctor");F(this,"$$s");F(this,"$$c");F(this,"$$cn",!1);F(this,"$$d",{});F(this,"$$r",!1);F(this,"$$p_d",{});F(this,"$$l",{});F(this,"$$l_u",new Map);F(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return s=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),nt(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=Gt(s,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{Hr(()=>{var o;this.$$r=!0;for(const s of St(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const l=Gt(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const o in this.$$l)for(const s of this.$$l[o]){const l=this.$$c.$on(o,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return St(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var s;const o=(s=r[t])==null?void 0:s.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,s){let l=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return St(e).map(i=>(e[i].attribute||i).toLowerCase())}};return St(e).forEach(i=>{Nt(l.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Gt(i,u,e),this.$$d[i]=u;var v=this.$$c;if(v){var c=(a=zt(v,i))==null?void 0:a.get;c?v[i]=u:v.$set({[i]:u})}}})}),n.forEach(i=>{Nt(l.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=l,l}const bn=[{name:"eHagaki",url:"https://lokuyow.github.io/ehagaki/?content={text}",icon:"https://lokuyow.github.io/ehagaki/favicon.ico"},{name:"nokakoi",url:"https://nokakoi.com/app/?text={text}",icon:"https://nokakoi.com/favicon.ico"},{name:"Nos Haiku",url:"https://nos-haiku.vercel.app/antenna?content={text}",icon:"https://nos-haiku.vercel.app/favicon.png"},{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}&tags={tags}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),mn=(t,e,r)=>e(R(r).url),yn=kt('<button part="item" class="item svelte-1sy5hzc"><img> <span class="item-name"> </span></button>'),xn=kt('<div class="overlay svelte-1sy5hzc" part="overlay"><div class="inner svelte-1sy5hzc" part="dialog"><button part="close-button" class="close-button svelte-1sy5hzc" aria-label="Close">✖</button> <h2 part="title" class="title svelte-1sy5hzc">Select Share Client</h2> <div part="list" class="list svelte-1sy5hzc"></div> <div part="footer" class="footer svelte-1sy5hzc"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-1sy5hzc">nostr-share-component</a></div></div></div>');const wn={hash:"svelte-1sy5hzc",code:`
|
|
1
|
+
(function(b,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(b=typeof globalThis<"u"?globalThis:b||self,m(b.NostrShare={}))})(this,function(b){"use strict";var On=Object.defineProperty;var cr=b=>{throw TypeError(b)};var Rn=(b,m,k)=>m in b?On(b,m,{enumerable:!0,configurable:!0,writable:!0,value:k}):b[m]=k;var j=(b,m,k)=>Rn(b,typeof m!="symbol"?m+"":m,k),fr=(b,m,k)=>m.has(b)||cr("Cannot "+k);var z=(b,m,k)=>(fr(b,m,"read from private field"),k?k.call(b):m.get(b)),pe=(b,m,k)=>m.has(b)?cr("Cannot add the same private member more than once"):m instanceof WeakSet?m.add(b):m.set(b,k),ge=(b,m,k,St)=>(fr(b,m,"write to private field"),St?St.call(b,k):m.set(b,k),k);var K,D;const m="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(m);const k=1,St=2,vr=16,hr=8,dr=1,_r=2,be="[",Kt="[!",Wt="]",_t={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var me=Array.isArray,Jt=Array.from,Ct=Object.keys,Nt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,mr=Object.getPrototypeOf;function yr(t){for(var e=0;e<t.length;e++)t[e]()}const I=2,ye=4,At=8,Xt=16,F=32,ot=64,Zt=128,st=256,Ot=512,A=1024,J=2048,pt=4096,P=8192,lt=16384,xr=32768,Qt=65536,wr=1<<19,xe=1<<20,Er=Symbol("$state"),we=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Sr(t){return!Tr(t,this.v)}function Cr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function zr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Rt(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Rr(t){return Dr(Rt(t))}function te(t,e=!1){const r=Rt(t);return e||(r.equals=Sr),r}function Dr(t){return x!==null&&x.f&I&&(H===null?Yr([t]):H.push(t)),t}function Dt(t,e){return x!==null&&Kr()&&x.f&(I|Xt)&&(H===null||!H.includes(t))&&Or(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Se(t,J),g!==null&&g.f&A&&!(g.f&F)&&(C!==null&&C.includes(t)?(G(g,J),Vt(g)):Z===null?Gr([t]):Z.push(t))),e}function Se(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var s=r[o],l=s.f;l&J||(G(s,e),l&(A|st)&&(l&I?Se(s,pt):Vt(s)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let y=!1;function V(t){y=t}let $;function M(t){if(t===null)throw ee(),_t;return $=t}function gt(){return M(U($))}function it(t){if(y){if(U($)!==null)throw ee(),_t;$=t}}function Ir(t=1){if(y){for(var e=t,r=$;e--;)r=U(r);$=r}}function re(){for(var t=0,e=$;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=U(e);e.remove(),e=n}}var Ce,Ne,ze;function ne(){if(Ce===void 0){Ce=window;var t=Element.prototype,e=Node.prototype;Ne=zt(e,"firstChild").get,ze=zt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function bt(t=""){return document.createTextNode(t)}function B(t){return Ne.call(t)}function U(t){return ze.call(t)}function $t(t,e){if(!y)return B(t);var r=B($);if(r===null)r=$.appendChild(bt());else if(e&&r.nodeType!==3){var n=bt();return r==null||r.before(n),M(n),n}return M(r),r}function Ae(t,e){if(!y){var r=B(t);return r instanceof Comment&&r.data===""?U(r):r}return $}function It(t,e=1,r=!1){let n=y?$:t;for(var o;e--;)o=n,n=U(n);if(!y)return n;var s=n==null?void 0:n.nodeType;if(r&&s!==3){var l=bt();return n===null?o==null||o.after(l):n.before(l),M(l),l}return M(n),n}function Oe(t){t.textContent=""}function Re(t){var e=I|J;g===null?e|=st:g.f|=xe;var r=x!==null&&x.f&I?x:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??g};return r!==null&&(r.children??(r.children=[])).push(n),n}function De(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&I?oe(n):Y(n)}}}function Mr(t){for(var e=t.parent;e!==null;){if(!(e.f&I))return e;e=e.parent}return null}function Ie(t){var e,r=g;X(Mr(t));try{De(t),e=Ke(t)}finally{X(r)}return e}function Me(t){var e=Ie(t),r=(rt||t.f&st)&&t.deps!==null?pt:A;G(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){De(t),Et(t,0),G(t,lt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Lr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function at(t,e,r,n=!0){var o=(t&ot)!==0,s=g,l={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|J,first:null,fn:e,last:null,next:null,parent:o?null:s,prev:null,teardown:null,transitions:null,version:0};if(r){var a=ut;try{Ue(!0),qt(l),l.f|=xr}catch(c){throw Y(l),c}finally{Ue(a)}}else e!==null&&Vt(l);var u=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&xe)===0;if(!u&&!o&&n&&(s!==null&&Lr(l,s),x!==null&&x.f&I)){var f=x;(f.children??(f.children=[])).push(l)}return l}function jr(t){const e=at(ot,t,!0);return()=>{Y(e)}}function Fr(t){const e=at(ot,t,!0);return(r={})=>new Promise(n=>{r.outro?Mt(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function Pr(t){return at(ye,t,!1)}function Hr(t){return at(At,t,!0)}function se(t){return le(t)}function le(t,e=0){return at(At|Xt|e,t,!0)}function mt(t,e=!0){return at(At|F,t,!0,e)}function Le(t){var e=t.teardown;if(e!==null){const r=x;ft(null);try{e.call(null)}finally{ft(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;Y(r,e),r=n}}function qr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&F||Y(e),e=r}}function Y(t,e=!0){var r=!1;if((e||t.f&wr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var s=n===o?null:U(n);n.remove(),n=s}r=!0}Fe(t,e&&!r),je(t),Et(t,0),G(t,lt);var l=t.transitions;if(l!==null)for(const u of l)u.stop();Le(t);var a=t.parent;a!==null&&a.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Mt(t,e){var r=[];ie(t,r,!0),He(r,()=>{Y(t),e&&e()})}function He(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&P)){if(t.f^=P,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&e.push(l);for(var n=t.first;n!==null;){var o=n.next,s=(n.f&Qt)!==0||(n.f&F)!==0;ie(n,e,s?r:!1),n=o}}}function Lt(t){qe(t,!0)}function qe(t,e){if(t.f&P){wt(t)&&qt(t),t.f^=P;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&F)!==0;qe(r,o?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],yr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Ur=1;let Ft=!1,Pt=Be,yt=!1,xt=null,ut=!1;function Ue(t){ut=t}let et=[],ct=0,Dn=[],x=null;function ft(t){x=t}let g=null;function X(t){g=t}let H=null;function Yr(t){H=t}let C=null,O=0,Z=null;function Gr(t){Z=t}let Ye=1,rt=!1,L=null;function Ge(){return++Ye}function Kr(){return!ke}function wt(t){var l,a;var e=t.f;if(e&J)return!0;if(e&pt){var r=t.deps,n=(e&st)!==0;if(r!==null){var o;if(e&Ot){for(o=0;o<r.length;o++)((l=r[o]).reactions??(l.reactions=[])).push(t);t.f^=Ot}for(o=0;o<r.length;o++){var s=r[o];if(wt(s)&&Me(s),n&&g!==null&&!rt&&!((a=s==null?void 0:s.reactions)!=null&&a.includes(t))&&(s.reactions??(s.reactions=[])).push(t),s.version>t.version)return!0}}(!n||g!==null&&!rt)&&G(t,A)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f<)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function Ht(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var h;var e=C,r=O,n=Z,o=x,s=rt,l=H,a=L,u=t.f;C=null,O=0,Z=null,x=u&(F|ot)?null:t,rt=!ut&&(u&st)!==0,H=null,L=t.ctx;try{var f=(0,t.fn)(),c=t.deps;if(C!==null){var i;if(Et(t,O),c!==null&&O>0)for(c.length=O+C.length,i=0;i<C.length;i++)c[O+i]=C[i];else t.deps=c=C;if(!rt)for(i=O;i<c.length;i++)((h=c[i]).reactions??(h.reactions=[])).push(t)}else c!==null&&O<c.length&&(Et(t,O),c.length=O);return f}finally{C=e,O=r,Z=n,x=o,rt=s,H=l,L=a}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&I&&(C===null||!C.includes(e))&&(G(e,pt),e.f&(st|Ot)||(e.f^=Ot),Et(e,0))}function Et(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function qt(t){var e=t.f;if(!(e<)){G(t,A);var r=g,n=L;g=t;try{e&Xt?qr(t):Fe(t),je(t),Le(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ye}catch(s){Ht(s,t,r,n||t.ctx)}finally{g=r}}}function We(){if(ct>1e3){ct=0;try{Cr()}catch(t){if(xt!==null)Ht(t,xt,null);else throw t}}ct++}function Je(t){var e=t.length;if(e!==0){We();var r=ut;ut=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&A||(o.f^=A);var s=[];Xe(o,s),Zr(s)}}finally{ut=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(lt|P)))try{wt(n)&&(qt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){Ht(o,n,null,n.ctx)}}}function Qr(){if(yt=!1,ct>1001)return;const t=et;et=[],Je(t),yt||(ct=0,xt=null)}function Vt(t){Pt===Be&&(yt||(yt=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(ot|F)){if(!(r&A))return;e.f^=A}}et.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,s=(o&F)!==0,l=s&&(o&A)!==0,a=r.next;if(!l&&!(o&P))if(o&At){if(s)r.f^=A;else try{wt(r)&&qt(r)}catch(i){Ht(i,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ye&&n.push(r);if(a===null){let i=r.parent;for(;i!==null;){if(t===i)break t;var f=i.next;if(f!==null){r=f;continue t}i=i.parent}}r=a}for(var c=0;c<n.length;c++)u=n[c],e.push(u),Xe(u,e)}function q(t){var e=Pt,r=et;try{We();const o=[];Pt=Ur,et=o,yt=!1,Je(r);var n=t==null?void 0:t();return Br(),(et.length>0||o.length>0)&&q(),ct=0,xt=null,n}finally{Pt=e,et=r}}function R(t){var c;var e=t.f,r=(e&I)!==0;if(r&&e<){var n=Ie(t);return oe(t),n}if(x!==null){H!==null&&H.includes(t)&&Ar();var o=x.deps;C===null&&o!==null&&o[O]===t?O++:C===null?C=[t]:C.push(t),Z!==null&&g!==null&&g.f&A&&!(g.f&F)&&Z.includes(t)&&(G(g,J),Vt(g))}else if(r&&t.deps===null)for(var s=t,l=s.parent,a=s;l!==null;)if(l.f&I){var u=l;a=u,l=u.parent}else{var f=l;(c=f.deriveds)!=null&&c.includes(a)||(f.deriveds??(f.deriveds=[])).push(a);break}return r&&(s=t,wt(s)&&Me(s)),t.v}function tn(t){const e=x;try{return x=null,t()}finally{x=e}}const en=~(J|pt|A);function G(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Ut(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const l=e.e;if(l!==null){var r=g,n=x;e.e=null;try{for(var o=0;o<l.length;o++){var s=l[o];X(s.effect),ft(s.reaction),Pr(s.fn)}}finally{X(r),ft(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Yt(t){var p;var e=this,r=e.ownerDocument,n=t.type,o=((p=t.composedPath)==null?void 0:p.call(t))||[],s=o[0]||t.target,l=0,a=t.__root;if(a){var u=o.indexOf(a);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=o.indexOf(e);if(f===-1)return;u<=f&&(l=u)}if(s=o[l]||t.target,s!==e){Nt(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=x,i=g;ft(null),X(null);try{for(var h,v=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var _=s["__"+n];if(_!==void 0&&!s.disabled)if(me(_)){var[N,...T]=_;N.apply(s,[t,...T])}else _.call(s,t)}catch(w){h?v.push(w):h=w}if(t.cancelBubble||d===e||d===null)break;s=d}if(h){for(let w of v)queueMicrotask(()=>{throw w});throw h}}finally{t.__root=e,delete t.currentTarget,ft(c),X(i)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function vt(t,e){var r=g;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function kt(t,e){var r=(e&dr)!==0,n=(e&_r)!==0,o,s=!t.startsWith("<!>");return()=>{if(y)return vt($,null),$;o===void 0&&(o=tr(s?t:"<!>"+t),r||(o=B(o)));var l=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var a=B(l),u=l.lastChild;vt(a,u)}else vt(l,l);return l}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,s;return()=>{if(y)return vt($,null),$;if(!s){var l=tr(o),a=B(l);s=B(a)}var u=s.cloneNode(!0);return vt(u,u),u}}function nt(t,e){if(y){g.nodes_end=$,gt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=y,o=$;try{for(var s=B(r);s&&(s.nodeType!==8||s.data!==be);)s=U(s);if(!s)throw _t;V(!0),M(s),gt();const l=rr(t,{...e,anchor:s});if($===null||$.nodeType!==8||$.data!==Wt)throw ee(),_t;return V(!1),l}catch(l){if(l===_t)return e.recover===!1&&Nr(),ne(),Oe(r),V(!1),er(t,e);throw l}finally{V(n),M(o)}}const ht=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:s,intro:l=!0}){ne();var a=new Set,u=i=>{for(var h=0;h<i.length;h++){var v=i[h];if(!a.has(v)){a.add(v);var d=br(v);e.addEventListener(v,Yt,{passive:d});var _=ht.get(v);_===void 0?(document.addEventListener(v,Yt,{passive:d}),ht.set(v,1)):ht.set(v,_+1)}}};u(Jt(Ze)),ue.add(u);var f=void 0,c=Fr(()=>{var i=r??e.appendChild(bt());return mt(()=>{if(s){Bt({});var h=L;h.c=s}o&&(n.$$events=o),y&&vt(i,null),f=t(i,n)||{},y&&(g.nodes_end=$),s&&Ut()}),()=>{var d;for(var h of a){e.removeEventListener(h,Yt);var v=ht.get(h);--v===0?(document.removeEventListener(h,Yt),ht.delete(h)):ht.set(h,v)}ue.delete(u),i!==r&&((d=i.parentNode)==null||d.removeChild(i))}});return ce.set(f,c),f}let ce=new WeakMap;function sn(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){y&>();var n=t,o=null,s=null,l=pr,a=r?Qt:0,u=!1;const f=(i,h=!0)=>{u=!0,c(h,i)},c=(i,h)=>{if(l===(l=i))return;let v=!1;if(y){const d=n.data===Kt;!!l===d&&(n=re(),M(n),V(!1),v=!0)}l?(o?Lt(o):h&&(o=mt(()=>h(n))),s&&Mt(s,()=>{s=null})):(s?Lt(s):h&&(s=mt(()=>h(n))),o&&Mt(o,()=>{o=null})),v&&V(!0)};le(()=>{u=!1,e(f),u||c(null,null)},a),y&&(n=$)}function ln(t,e){return e}function an(t,e,r,n){for(var o=[],s=e.length,l=0;l<s;l++)ie(e[l].e,o,!0);var a=s>0&&o.length===0&&r!==null;if(a){var u=r.parentNode;Oe(u),u.append(r),n.clear(),Q(t,e[0].prev,e[s-1].next)}He(o,()=>{for(var f=0;f<s;f++){var c=e[f];a||(n.delete(c.k),Q(t,c.prev,c.next)),Y(c.e,!a)}})}function un(t,e,r,n,o,s=null){var l=t,a={flags:e,items:new Map,first:null};{var u=t;l=y?M(B(u)):u.appendChild(bt())}y&>();var f=null,c=!1;le(()=>{var i=r(),h=me(i)?i:i==null?[]:Jt(i),v=h.length;if(c&&v===0)return;c=v===0;let d=!1;if(y){var _=l.data===Kt;_!==(v===0)&&(l=re(),M(l),V(!1),d=!0)}if(y){for(var N=null,T,p=0;p<v;p++){if($.nodeType===8&&$.data===Wt){l=$,d=!0,V(!1);break}var w=h[p],W=n(w,p);T=or($,a,N,null,w,W,p,o,e),a.items.set(W,T),N=T}v>0&&M(re())}if(!y){var E=x;cn(h,a,l,o,e,(E.f&P)!==0,n)}s!==null&&(v===0?f?Lt(f):f=mt(()=>s(l)):f!==null&&Mt(f,()=>{f=null})),d&&V(!0)}),y&&(l=$)}function cn(t,e,r,n,o,s,l,a){var u=t.length,f=e.items,c=e.first,i=c,h,v=null,d=[],_=[],N,T,p,w;for(w=0;w<u;w+=1){if(N=t[w],T=l(N,w),p=f.get(T),p===void 0){var W=i?i.e.nodes_start:r;v=or(W,e,v,v===null?e.first:v.next,N,T,w,n,o),f.set(T,v),d=[],_=[],i=v.next;continue}if(fn(p,N,w),p.e.f&P&&Lt(p.e),p!==i){if(h!==void 0&&h.has(p)){if(d.length<_.length){var E=_[0],S;v=E.prev;var dt=d[0],de=d[d.length-1];for(S=0;S<d.length;S+=1)sr(d[S],E,r);for(S=0;S<_.length;S+=1)h.delete(_[S]);Q(e,dt.prev,de.next),Q(e,v,dt),Q(e,de,E),i=E,v=de,w-=1,d=[],_=[]}else h.delete(p),sr(p,i,r),Q(e,p.prev,p.next),Q(e,p,v===null?e.first:v.next),Q(e,v,p),v=p;continue}for(d=[],_=[];i!==null&&i.k!==T;)(s||!(i.e.f&P))&&(h??(h=new Set)).add(i),_.push(i),i=i.next;if(i===null)continue;p=i}d.push(p),v=p,i=p.next}if(i!==null||h!==void 0){for(var _e=h===void 0?[]:Jt(h);i!==null;)(s||!(i.e.f&P))&&_e.push(i),i=i.next;var zn=_e.length;if(zn>0){var An=u===0?r:null;an(e,_e,An,f)}}g.first=e.first&&e.first.e,g.last=v&&v.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,s,l,a,u,f){var c=(u&k)!==0,i=(u&vr)===0,h=c?i?te(o):Rt(o):o,v=u&St?Rt(l):l,d={i:v,v:h,k:s,a:null,e:null,prev:r,next:n};try{return d.e=mt(()=>a(t,h,v),y),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function sr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==n;){var l=U(s);o.before(s),s=l}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var a;y&>();var s=(a=e.$$slots)==null?void 0:a[r],l=!1;s===!0&&(s=e.children,l=!0),s===void 0?o!==null&&o(t):s(t,l?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Tt(t,e,r,n){var o=t.__attributes??(t.__attributes={});y&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&hn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var lr=new Map;function hn(t){var e=lr.get(t.nodeName);if(e)return e;lr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var s in r)r[s].set&&e.push(s);n=mr(n)}return e}function dn(t){for(var e=g,r=g;e!==null&&!(e.f&(F|ot));)e=e.parent;try{return X(e),t()}finally{X(r)}}function tt(t,e,r,n){var W;var o=!ke,s=(r&hr)!==0,l=!1,a;a=t[e];var u=Er in t||we in t,f=((W=zt(t,e))==null?void 0:W.set)??(u&&s&&e in t?E=>t[e]=E:void 0),c=n,i=!0,h=!1,v=()=>(h=!0,i&&(i=!1,c=n),c);a===void 0&&n!==void 0&&(f&&o&&zr(),a=v(),f&&f(a));var d;if(d=()=>{var E=t[e];return E===void 0?v():(i=!0,h=!1,E)},f){var _=t.$$legacy;return function(E,S){return arguments.length>0?((!S||_||l)&&f(S?d():E),E):d()}}var N=!1,T=!1,p=te(a),w=dn(()=>Re(()=>{var E=d(),S=R(p);return N?(N=!1,T=!0,S):(T=!1,p.v=E)}));return function(E,S){if(arguments.length>0){const dt=S?R(w):E;return w.equals(dt)||(N=!0,Dt(p,dt),h&&c!==void 0&&(c=dt),tn(()=>R(w))),E}return R(w)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,K);pe(this,D);var s;var r=new Map,n=(l,a)=>{var u=te(a);return r.set(l,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(l,a){return R(r.get(a)??n(a,Reflect.get(l,a)))},has(l,a){return a===we?!0:(R(r.get(a)??n(a,Reflect.get(l,a))),Reflect.has(l,a))},set(l,a,u){return Dt(r.get(a)??n(a,u),u),Reflect.set(l,a,u)}});ge(this,D,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&q(),ge(this,K,o.$$events);for(const l of Object.keys(z(this,D)))l==="$set"||l==="$destroy"||l==="$on"||Nt(this,l,{get(){return z(this,D)[l]},set(a){z(this,D)[l]=a},enumerable:!0});z(this,D).$set=l=>{Object.assign(o,l)},z(this,D).$destroy=()=>{sn(z(this,D))}}$set(e){z(this,D).$set(e)}$on(e,r){z(this,K)[e]=z(this,K)[e]||[];const n=(...o)=>r.call(this,...o);return z(this,K)[e].push(n),()=>{z(this,K)[e]=z(this,K)[e].filter(o=>o!==n)}}$destroy(){z(this,D).$destroy()}}K=new WeakMap,D=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();j(this,"$$ctor");j(this,"$$s");j(this,"$$c");j(this,"$$cn",!1);j(this,"$$d",{});j(this,"$$r",!1);j(this,"$$p_d",{});j(this,"$$l",{});j(this,"$$l_u",new Map);j(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return s=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),nt(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=Gt(s,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{Hr(()=>{var o;this.$$r=!0;for(const s of Ct(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const l=Gt(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const o in this.$$l)for(const s of this.$$l[o]){const l=this.$$c.$on(o,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ct(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var s;const o=(s=r[t])==null?void 0:s.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,s){let l=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Ct(e).map(a=>(e[a].attribute||a).toLowerCase())}};return Ct(e).forEach(a=>{Nt(l.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){var i;u=Gt(a,u,e),this.$$d[a]=u;var f=this.$$c;if(f){var c=(i=zt(f,a))==null?void 0:i.get;c?f[a]=u:f.$set({[a]:u})}}})}),n.forEach(a=>{Nt(l.prototype,a,{get(){var u;return(u=this.$$c)==null?void 0:u[a]}})}),t.element=l,l}const bn=[{name:"eHagaki",url:"https://lokuyow.github.io/ehagaki/?content={text}",icon:"https://lokuyow.github.io/ehagaki/favicon.ico"},{name:"nokakoi",url:"https://nokakoi.com/app/?text={text}",icon:"https://nokakoi.com/favicon.ico"},{name:"Nos Haiku",url:"https://nos-haiku.vercel.app/antenna?content={text}",icon:"https://nos-haiku.vercel.app/favicon.png"},{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}&tags={tags}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),mn=(t,e,r)=>e(R(r).url),yn=kt('<button part="item" class="item svelte-1sy5hzc"><img> <span class="item-name"> </span></button>'),xn=kt('<div class="overlay svelte-1sy5hzc" part="overlay"><div class="inner svelte-1sy5hzc" part="dialog"><button part="close-button" class="close-button svelte-1sy5hzc" aria-label="Close">✖</button> <h2 part="title" class="title svelte-1sy5hzc">Select Share Client</h2> <div part="list" class="list svelte-1sy5hzc"></div> <div part="footer" class="footer svelte-1sy5hzc"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-1sy5hzc">nostr-share-component</a></div></div></div>');const wn={hash:"svelte-1sy5hzc",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-1sy5hzc {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;z-index:50;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-1sy5hzc {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-1sy5hzc {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
14
|
transform 0.1s ease;}.close-button.svelte-1sy5hzc:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-1sy5hzc:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-1sy5hzc {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-1sy5hzc {font-weight:500;color:var(--button1-border-color);}a.svelte-1sy5hzc:hover {color:var(--button2-text-color);}`};function he(t,e){Bt(e,!0),fe(t,wn);let r=tt(e,"text",7,""),n=tt(e,"tags",7,""),o=tt(e,"handleClose",7);const s=c=>{r()===""&&r(`${document.title}
|
|
15
|
-
${window.location.href}`);let
|
|
15
|
+
${window.location.href}`);let i=c.replace("{text}",encodeURIComponent(r()??""));i=i.replace("{tags}",encodeURIComponent(n()??"")),console.log(i),window.open(i,"_blank","noreferrer"),o()()};var l=xn();l.__click=function(...c){var i;(i=o())==null||i.apply(this,c)};var a=$t(l);a.__click=[$n];var u=$t(a);u.__click=function(...c){var i;(i=o())==null||i.apply(this,c)};var f=It(u,4);return un(f,21,()=>bn,ln,(c,i)=>{var h=yn();h.__click=[mn,s,i];var v=$t(h);Tt(v,"width",24);var d=It(v,2),_=$t(d,!0);it(d),it(h),se(()=>{Tt(v,"src",R(i).icon),Tt(v,"alt",R(i).name),nn(_,R(i).name)}),nt(c,h)}),it(f),Ir(2),it(a),it(l),nt(t,l),Ut({get text(){return r()},set text(c=""){r(c),q()},get tags(){return n()},set tags(c=""){n(c),q()},get handleClose(){return o()},set handleClose(c){o(c),q()}})}Qe(["click"]),customElements.define("nostr-share-dialog",ve(he,{text:{},tags:{},handleClose:{}},[],[],!0));var En=rn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
16
16
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
17
17
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
18
18
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -28,8 +28,8 @@ ${window.location.href}`);let a=c.replace("{text}",encodeURIComponent(r()??""));
|
|
|
28
28
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
29
29
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
30
30
|
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const kn={hash:"svelte-givlj7",code:`
|
|
31
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=tt(e,"size",7,28);var n=En();return se(()=>Tt(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),nt(t,n),Ut({get size(){return r()},set size(o=28){r(o),
|
|
31
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=tt(e,"size",7,28);var n=En();return se(()=>Tt(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),nt(t,n),Ut({get size(){return r()},set size(o=28){r(o),q()}})}ve(ar,{size:{}},[],[],!0);var Tn=kt('<span part="text" class="svelte-1h3gn4x">Nostr</span>'),Sn=kt("<!> <!>",1),Cn=kt('<button part="button" title="Share on Nostr" class="svelte-1h3gn4x"><!></button> <!>',1);const Nn={hash:"svelte-1h3gn4x",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
32
32
|
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-active-color: #999999;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
33
33
|
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-active-color: #757575;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
34
34
|
}[part="button"].svelte-1h3gn4x {display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.5em;transition:all 0.1s ease-in-out;border-radius:8px;font-weight:bold;}[part="button"].svelte-1h3gn4x:active {transform:scale(0.98);}[data-nostr-share="default"].svelte-1h3gn4x {padding:6px 16px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="mini"].svelte-1h3gn4x {padding:2px 6px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="default"].svelte-1h3gn4x:hover,
|
|
35
|
-
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,
|
|
35
|
+
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,Nn);let r=tt(e,"data-text",7,""),n=tt(e,"data-tags",7,""),o=tt(e,"data-type",7,"default"),s=tt(e,"icon-size",7,28),l=Rr(!1);function a(){Dt(l,!0)}function u(){Dt(l,!1)}const f=typeof s()=="string"?parseInt(s(),10):s();var c=Cn(),i=Ae(c);i.__click=a;var h=$t(i);vn(h,e,"default",{},_=>{var N=Sn(),T=Ae(N),p=Re(()=>o()==="icon"?f:28);ar(T,{get size(){return R(p)}});var w=It(T,2);{var W=E=>{var S=Tn();nt(E,S)};nr(w,E=>{o()!=="icon"&&E(W)})}nt(_,N)}),it(i);var v=It(i,2);{var d=_=>{he(_,{handleClose:u,get text(){return r()},get tags(){return n()}})};nr(v,_=>{R(l)&&_(d)})}return se(()=>Tt(i,"data-nostr-share",o())),nt(t,c),Ut({openDialog:a,closeDialog:u,get"data-text"(){return r()},set"data-text"(_=""){r(_),q()},get"data-tags"(){return n()},set"data-tags"(_=""){n(_),q()},get"data-type"(){return o()},set"data-type"(_="default"){o(_),q()},get"icon-size"(){return s()},set"icon-size"(_=28){s(_),q()}})}Qe(["click"]),customElements.define("nostr-share",ve(ur,{"data-text":{},"data-tags":{},"data-type":{},"icon-size":{}},["default"],["openDialog","closeDialog"],!0)),b.Dialog=he,b.NostrShare=ur,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|