custom element for embedding Bluesky posts and feeds mary-ext.github.io/bluesky-embed
typescript npm bluesky atcute
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

deploy: 85d3586c02e0255fb558430e566dbd8663c0c67b

Mary fc6cd627 74ae9054

+42 -42
-41
assets/index-DDUttTaL.js
··· 1 - (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function s(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(n){if(n.ep)return;n.ep=!0;const i=s(n);fetch(n.href,i)}})();var ne,x,Xe,S,Te,Ke,fe,Qe,ye,pe,he,B={},$e=[],zt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,we=Array.isArray;function N(e,t){for(var s in t)e[s]=t[s];return e}function xe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Pt(e,t,s){var r,n,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?n=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?ne.call(arguments,2):s),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return $(e,o,r,n,null)}function $(e,t,s,r,n){var i={type:e,props:t,key:s,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++Xe,__i:-1,__u:0};return n==null&&x.vnode!=null&&x.vnode(i),i}function M(e){return e.children}function ee(e,t){this.props=e,this.context=t}function Z(e,t){if(t==null)return e.__?Z(e.__,e.__i+1):null;for(var s;t<e.__k.length;t++)if((s=e.__k[t])!=null&&s.__e!=null)return s.__e;return typeof e.type=="function"?Z(e):null}function et(e){var t,s;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((s=e.__k[t])!=null&&s.__e!=null){e.__e=e.__c.base=s.__e;break}return et(e)}}function Se(e){(!e.__d&&(e.__d=!0)&&S.push(e)&&!se.__r++||Te!==x.debounceRendering)&&((Te=x.debounceRendering)||Ke)(se)}function se(){var e,t,s,r,n,i,o,l;for(S.sort(fe);e=S.shift();)e.__d&&(t=S.length,r=void 0,i=(n=(s=e).__v).__e,o=[],l=[],s.__P&&((r=N({},n)).__v=n.__v+1,x.vnode&&x.vnode(r),Ae(s.__P,r,n,s.__n,s.__P.namespaceURI,32&n.__u?[i]:null,o,i??Z(n),!!(32&n.__u),l),r.__v=n.__v,r.__.__k[r.__i]=r,rt(o,r,l),r.__e!=i&&et(r)),S.length>t&&S.sort(fe));se.__r=0}function tt(e,t,s,r,n,i,o,l,c,a,u){var d,h,f,g,z,y,k=r&&r.__k||$e,w=t.length;for(c=Ct(s,t,k,c),d=0;d<w;d++)(f=s.__k[d])!=null&&(h=f.__i===-1?B:k[f.__i]||B,f.__i=d,y=Ae(e,f,h,n,i,o,l,c,a,u),g=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Ue(h.ref,null,f),u.push(f.ref,f.__c||g,f)),z==null&&g!=null&&(z=g),4&f.__u||h.__k===f.__k?c=st(f,c,e):typeof f.type=="function"&&y!==void 0?c=y:g&&(c=g.nextSibling),f.__u&=-7);return s.__e=z,c}function Ct(e,t,s,r){var n,i,o,l,c,a=t.length,u=s.length,d=u,h=0;for(e.__k=[],n=0;n<a;n++)(i=t[n])!=null&&typeof i!="boolean"&&typeof i!="function"?(l=n+h,(i=e.__k[n]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?$(null,i,null,null,null):we(i)?$(M,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?$(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,(c=i.__i=Ft(i,s,l,d))!==-1&&(d--,(o=s[c])&&(o.__u|=2)),o==null||o.__v===null?(c==-1&&h--,typeof i.type!="function"&&(i.__u|=4)):c!==l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,i.__u|=4))):i=e.__k[n]=null;if(d)for(n=0;n<u;n++)(o=s[n])!=null&&!(2&o.__u)&&(o.__e==r&&(r=Z(o)),nt(o,o));return r}function st(e,t,s){var r,n;if(typeof e.type=="function"){for(r=e.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=e,t=st(r[n],t,s));return t}e.__e!=t&&(t&&e.type&&!s.contains(t)&&(t=Z(e)),s.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Ft(e,t,s,r){var n=e.key,i=e.type,o=s-1,l=s+1,c=t[s];if(c===null||c&&n==c.key&&i===c.type&&!(2&c.__u))return s;if((typeof i!="function"||i===M||n)&&r>(c!=null&&!(2&c.__u)?1:0))for(;o>=0||l<t.length;){if(o>=0){if((c=t[o])&&!(2&c.__u)&&n==c.key&&i===c.type)return o;o--}if(l<t.length){if((c=t[l])&&!(2&c.__u)&&n==c.key&&i===c.type)return l;l++}}return-1}function Me(e,t,s){t[0]==="-"?e.setProperty(t,s??""):e[t]=s==null?"":typeof s!="number"||zt.test(t)?s:s+"px"}function J(e,t,s,r,n){var i;e:if(t==="style")if(typeof s=="string")e.style.cssText=s;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)s&&t in s||Me(e.style,t,"");if(s)for(t in s)r&&s[t]===r[t]||Me(e.style,t,s[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(Qe,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=s,s?r?s.u=r.u:(s.u=ye,e.addEventListener(t,i?he:pe,i)):e.removeEventListener(t,i?he:pe,i);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=s??"";break e}catch{}typeof s=="function"||(s==null||s===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&s==1?"":s))}}function Ee(e){return function(t){if(this.l){var s=this.l[t.type+e];if(t.t==null)t.t=ye++;else if(t.t<s.u)return;return s(x.event?x.event(t):t)}}}function Ae(e,t,s,r,n,i,o,l,c,a){var u,d,h,f,g,z,y,k,w,I,F,Y,H,Ne,G,ae,oe,C=t.type;if(t.constructor!==void 0)return null;128&s.__u&&(c=!!(32&s.__u),i=[l=t.__e=s.__e]),(u=x.__b)&&u(t);e:if(typeof C=="function")try{if(k=t.props,w="prototype"in C&&C.prototype.render,I=(u=C.contextType)&&r[u.__c],F=u?I?I.props.value:u.__:r,s.__c?y=(d=t.__c=s.__c).__=d.__E:(w?t.__c=d=new C(k,F):(t.__c=d=new ee(k,F),d.constructor=C,d.render=Tt),I&&I.sub(d),d.props=k,d.state||(d.state={}),d.context=F,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=N({},d.__s)),N(d.__s,C.getDerivedStateFromProps(k,d.__s))),f=d.props,g=d.state,d.__v=t,h)w&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&C.getDerivedStateFromProps==null&&k!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(k,F),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(k,d.__s,F)===!1||t.__v===s.__v)){for(t.__v!==s.__v&&(d.props=k,d.state=d.__s,d.__d=!1),t.__e=s.__e,t.__k=s.__k,t.__k.some(function(j){j&&(j.__=t)}),Y=0;Y<d._sb.length;Y++)d.__h.push(d._sb[Y]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(k,d.__s,F),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,g,z)})}if(d.context=F,d.props=k,d.__P=e,d.__e=!1,H=x.__r,Ne=0,w){for(d.state=d.__s,d.__d=!1,H&&H(t),u=d.render(d.props,d.state,d.context),G=0;G<d._sb.length;G++)d.__h.push(d._sb[G]);d._sb=[]}else do d.__d=!1,H&&H(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++Ne<25);d.state=d.__s,d.getChildContext!=null&&(r=N(N({},r),d.getChildContext())),w&&!h&&d.getSnapshotBeforeUpdate!=null&&(z=d.getSnapshotBeforeUpdate(f,g)),l=tt(e,we(ae=u!=null&&u.type===M&&u.key==null?u.props.children:u)?ae:[ae],t,s,r,n,i,o,l,c,a),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),y&&(d.__E=d.__=null)}catch(j){if(t.__v=null,c||i!=null)if(j.then){for(t.__u|=c?160:128;l&&l.nodeType===8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else for(oe=i.length;oe--;)xe(i[oe]);else t.__e=s.__e,t.__k=s.__k;x.__e(j,t,s)}else i==null&&t.__v===s.__v?(t.__k=s.__k,t.__e=s.__e):l=t.__e=Nt(s.__e,t,s,r,n,i,o,c,a);return(u=x.diffed)&&u(t),128&t.__u?void 0:l}function rt(e,t,s){for(var r=0;r<s.length;r++)Ue(s[r],s[++r],s[++r]);x.__c&&x.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){x.__e(i,n.__v)}})}function Nt(e,t,s,r,n,i,o,l,c){var a,u,d,h,f,g,z,y=s.props,k=t.props,w=t.type;if(w==="svg"?n="http://www.w3.org/2000/svg":w==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((f=i[a])&&"setAttribute"in f==!!w&&(w?f.localName===w:f.nodeType===3)){e=f,i[a]=null;break}}if(e==null){if(w===null)return document.createTextNode(k);e=document.createElementNS(n,w,k.is&&k),l&&(x.__m&&x.__m(t,i),l=!1),i=null}if(w===null)y===k||l&&e.data===k||(e.data=k);else{if(i=i&&ne.call(e.childNodes),y=s.props||B,!l&&i!=null)for(y={},a=0;a<e.attributes.length;a++)y[(f=e.attributes[a]).name]=f.value;for(a in y)if(f=y[a],a!="children"){if(a=="dangerouslySetInnerHTML")d=f;else if(!(a in k)){if(a=="value"&&"defaultValue"in k||a=="checked"&&"defaultChecked"in k)continue;J(e,a,null,f,n)}}for(a in k)f=k[a],a=="children"?h=f:a=="dangerouslySetInnerHTML"?u=f:a=="value"?g=f:a=="checked"?z=f:l&&typeof f!="function"||y[a]===f||J(e,a,f,y[a],n);if(u)l||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),tt(e,we(h)?h:[h],t,s,r,w==="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,o,i?i[0]:s.__k&&Z(s,0),l,c),i!=null)for(a=i.length;a--;)xe(i[a]);l||(a="value",w==="progress"&&g==null?e.removeAttribute("value"):g!==void 0&&(g!==e[a]||w==="progress"&&!g||w==="option"&&g!==y[a])&&J(e,a,g,y[a],n),a="checked",z!==void 0&&z!==e[a]&&J(e,a,z,y[a],n))}return e}function Ue(e,t,s){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(n){x.__e(n,s)}}function nt(e,t,s){var r,n;if(x.unmount&&x.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ue(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){x.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&nt(r[n],t,s||typeof e.type!="function");s||xe(e.__e),e.__c=e.__=e.__e=void 0}function Tt(e,t,s){return this.constructor(e,s)}function St(e,t,s){var r,n,i,o;t===document&&(t=document.documentElement),x.__&&x.__(e,t),n=(r=typeof s=="function")?null:t.__k,i=[],o=[],Ae(t,e=(!r&&s||t).__k=Pt(M,null,[e]),n||B,B,t.namespaceURI,!r&&s?[s]:n?null:t.firstChild?ne.call(t.childNodes):null,i,!r&&s?s:n?n.__e:t.firstChild,r,o),rt(i,e,o)}ne=$e.slice,x={__e:function(e,t,s,r){for(var n,i,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),o=n.__d),o)return n.__E=n}catch(l){e=l}throw e}},Xe=0,ee.prototype.setState=function(e,t){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof e=="function"&&(e=e(N({},s),this.props)),e&&N(s,e),e!=null&&this.__v&&(t&&this._sb.push(t),Se(this))},ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Se(this))},ee.prototype.render=M,S=[],Ke=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fe=function(e,t){return e.__v.__b-t.__v.__b},se.__r=0,Qe=/(PointerCapture)$|Capture$/i,ye=0,pe=Ee(!1),he=Ee(!0);var Mt=0;function p(e,t,s,r,n,i){t||(t={});var o,l,c=t;"ref"in t&&(o=t.ref,delete t.ref);var a={type:e,props:c,key:s,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Mt,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(l in o)c[l]===void 0&&(c[l]=o[l]);return x.vnode&&x.vnode(a),a}var V,A,ce,Re,_e=0,it=[],U=x,qe=U.__b,Ze=U.__r,Le=U.diffed,Ie=U.__c,He=U.unmount,je=U.__;function ze(e,t){U.__h&&U.__h(A,e,_e||t),_e=0;var s=A.__H||(A.__H={__:[],__h:[]});return e>=s.__.length&&s.__.push({}),s.__[e]}function Pe(e){return _e=1,Et(ct,e)}function Et(e,t,s){var r=ze(V++,2);if(r.t=e,!r.__c&&(r.__=[ct(void 0,t),function(l){var c=r.__N?r.__N[0]:r.__[0],a=r.t(c,l);c!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=A,!A.u)){var n=function(l,c,a){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!i||i.call(this,l,c,a);var d=r.__c.props!==l;return u.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),i&&i.call(this,l,c,a)||d};A.u=!0;var i=A.shouldComponentUpdate,o=A.componentWillUpdate;A.componentWillUpdate=function(l,c,a){if(this.__e){var u=i;i=void 0,n(l,c,a),i=u}o&&o.call(this,l,c,a)},A.shouldComponentUpdate=n}return r.__N||r.__}function at(e,t){var s=ze(V++,3);!U.__s&&ot(s.__H,t)&&(s.__=e,s.i=t,A.__H.__h.push(s))}function Ce(e,t){var s=ze(V++,7);return ot(s.__H,t)&&(s.__=e(),s.__H=t,s.__h=e),s.__}function Rt(){for(var e;e=it.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(te),e.__H.__h.forEach(me),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}U.__b=function(e){A=null,qe&&qe(e)},U.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),je&&je(e,t)},U.__r=function(e){Ze&&Ze(e),V=0;var t=(A=e.__c).__H;t&&(ce===A?(t.__h=[],A.__h=[],t.__.forEach(function(s){s.__N&&(s.__=s.__N),s.i=s.__N=void 0})):(t.__h.forEach(te),t.__h.forEach(me),t.__h=[],V=0)),ce=A},U.diffed=function(e){Le&&Le(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(it.push(t)!==1&&Re===U.requestAnimationFrame||((Re=U.requestAnimationFrame)||qt)(Rt)),t.__H.__.forEach(function(s){s.i&&(s.__H=s.i),s.i=void 0})),ce=A=null},U.__c=function(e,t){t.some(function(s){try{s.__h.forEach(te),s.__h=s.__h.filter(function(r){return!r.__||me(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],U.__e(r,s.__v)}}),Ie&&Ie(e,t)},U.unmount=function(e){He&&He(e);var t,s=e.__c;s&&s.__H&&(s.__H.__.forEach(function(r){try{te(r)}catch(n){t=n}}),s.__H=void 0,t&&U.__e(t,s.__v))};var De=typeof requestAnimationFrame=="function";function qt(e){var t,s=function(){clearTimeout(r),De&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(s,100);De&&(t=requestAnimationFrame(s))}function te(e){var t=A,s=e.__c;typeof s=="function"&&(e.__c=void 0,s()),A=t}function me(e){var t=A;e.__c=e.__(),A=t}function ot(e,t){return!e||e.length!==t.length||t.some(function(s,r){return s!==e[r]})}function ct(e,t){return typeof t=="function"?t(e):t}const Zt=e=>typeof e=="object"?e.handle.bind(e):e,lt=({service:e,fetch:t=fetch})=>async(s,r)=>{const n=new URL(s,e);return t(n,r)},Lt=(e,t)=>{let s;for(const r in t){const n=t[r];n!==null&&(s??=new Headers(e),s.has(r)||s.set(r,n))}return s??e};class q extends Error{constructor(t,{kind:s=`HTTP error ${t}`,description:r="Unspecified error description",headers:n,cause:i}={}){super(`${s} > ${r}`,{cause:i}),this.name="XRPCError",this.status=t,this.kind=s,this.description=r,this.headers=n||{}}}class dt{constructor({handler:t,proxy:s}){this.handle=Zt(t),this.proxy=s}get(t,s){return this.request({type:"get",nsid:t,...s})}call(t,s){return this.request({type:"post",nsid:t,...s})}async request(t){const s=t.data,r=`/xrpc/${t.nsid}`+Ht(t.params),n=jt(s),i=await this.handle(r,{method:t.type,signal:t.signal,body:n?JSON.stringify(s):s,headers:Lt(t.headers,{"content-type":n?"application/json":null,"atproto-proxy":It(this.proxy)})}),o=i.status,l=Object.fromEntries(i.headers),c=l["content-type"];let a,u;c&&(c.startsWith("application/json")?a=i.json():c.startsWith("text/")&&(a=i.text()));try{u=await(a||i.arrayBuffer().then(d=>new Uint8Array(d)))}catch(d){throw new q(2,{cause:d,kind:"InvalidResponse",description:"Failed to parse response body",headers:l})}if(o===200)return{data:u,headers:l};throw Dt(u)?new q(o,{kind:u.error,description:u.message,headers:l}):new q(o,{headers:l})}}const It=e=>e?`${e.service}#${e.type}`:null,Ht=e=>{let t;for(const s in e){const r=e[s];if(r!==void 0)if(t??=new URLSearchParams,Array.isArray(r))for(let n=0,i=r.length;n<i;n++){const o=r[n];t.append(s,""+o)}else t.set(s,""+r)}return t?"?"+t.toString():""},jt=e=>{if(typeof e!="object"||e===null)return!1;if("toJSON"in e)return!0;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},Dt=e=>{if(typeof e!="object"||e===null)return!1;const t=typeof e.error,s=typeof e.message;return(t==="undefined"||t==="string")&&(s==="undefined"||s==="string")},X=(e,t)=>({text:e,features:e.length>0?t:void 0}),ut=(e,t)=>{if(t===void 0||t.length===0)return[X(e,void 0)];const s=[],r=e.length;let n=0,i=0;const o=(l,c)=>{let a=l;if(e.charCodeAt(a)<128)for(a+=1,i+=1;i+8<=c&&a+8<=r;){const d=e.charCodeAt(a),h=e.charCodeAt(a+1),f=e.charCodeAt(a+2),g=e.charCodeAt(a+3),z=e.charCodeAt(a+4),y=e.charCodeAt(a+5),k=e.charCodeAt(a+6),w=e.charCodeAt(a+7);if((d|h|f|g|z|y|k|w)<128){a+=8,i+=8;continue}break}for(;i<c&&a<r;){const d=e.charCodeAt(a);d<128?(a+=1,i+=1):d<2048?(a+=1,i+=2):d<55296||d>56319?(a+=1,i+=3):(a+=2,i+=4)}return a};for(let l=0,c=t.length;l<c;l++){const a=t[l],{byteStart:u,byteEnd:d}=a.index,h=a.features;if(!(u>d||h.length===0)){if(i<u){const f=o(n,u);f>n&&s.push(X(e.slice(n,f),void 0)),n=f}{const f=o(n,d);f>n&&s.push(X(e.slice(n,f),h)),n=f}}}return n<r&&s.push(X(e.slice(n),void 0)),s},Bt=/[&"<]/g,Vt=/[&<]/g;function v(e,t){const s=String(e??""),r=t?Bt:Vt;r.lastIndex=0;let n="",i=0;for(;r.test(s);){const o=r.lastIndex-1,l=s[o];n+=s.substring(i,o)+(l==="&"?"&amp;":l==='"'?"&quot;":"&lt;"),i=o+1}return n+s.substring(i)}function _(e,t,s=!1){if(t==null||!t&&s||t===""&&e==="class")return"";const n=s?"":`="${v(t,!0)}"`;return` ${e}${n}`}function Ot(e,t){const s={out:""};return e(s,t?.props??{}),{head:"",body:s.out}}function O(e){return typeof e=="string"?e:e==null?"":e+""}const Wt="https://public.api.bsky.app",Yt="!no-unauthenticated";function Be(e,t){const{children:s}=t;e.out+='<div class="bluesky-embed s-3olstj">',s(e),e.out+="</div>"}const W=e=>`https://bsky.app/profile/${e}`,ie=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,Gt=e=>`https://bsky.app/hashtag/${e}`,ft=(e,t)=>`https://bsky.app/profile/${e}/feed/${t}`,Jt=(e,t)=>`https://bsky.app/starter-pack/${e}/${t}`,Xt=(e,t)=>`https://ogcard.cdn.bsky.app/start/${e}/${t}`;let Ve=0,le=0;const Kt=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),Qt=new Intl.DateTimeFormat("en-US",{dateStyle:"medium"}),$t=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}),pt=e=>{const t=new Date(e),s=t.getTime();if(isNaN(s))return"N/A";const r=Date.now();if(r>le){const n=new Date(r);n.setMonth(0,1),n.setHours(0,0,0),Ve=n.getTime(),n.setFullYear(n.getFullYear()+1,0,0),n.setHours(23,59,59,999),le=n.getTime()}return s>=Ve&&s<=le?$t.format(t):Qt.format(t)},ht=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":Kt.format(t)},_t=new Intl.NumberFormat("en-US"),es=new Intl.NumberFormat("en-US",{notation:"compact"}),K=e=>e<1e3?""+e:e<1e5?_t.format(e):es.format(e),Q=e=>_t.format(e),ts=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,T=e=>{const t=ts.exec(e);if(!t)throw new ss(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};let ss=class extends Error{};const rs=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null};function ns(e,t){const{embed:s}=t,r=s.external,n=rs(r.uri)?.host;e.out+=`<a target="_blank"${_("href",n&&r.uri)} rel="noopener noreferrer nofollow" class="external-embed s-rtbqd8">`,r.thumb&&(e.out+=`<img loading="lazy"${_("src",r.thumb)} alt="" class="thumbnail s-rtbqd8">`),e.out+=` <div class="meta s-rtbqd8"><p class="title s-rtbqd8">${v(r.title)}</p> <p class="description s-rtbqd8">${v(r.description)}</p> `,n&&(e.out+=`<div class="domain s-rtbqd8"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="m4.172 8.07 3.94 2.957.977-1.941 3.887-.978 1.15-4.6M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-6.078 4.865.973-1.946-2.869-1.928-1.89-.12-1.08 1.075 1.947 2.919h2.919Z"></path></svg> <span class="domain-name">${v(n)}</span></div>`),e.out+="</div></a>"}function is(e,t){const{embed:s}=t,r=s.creator,n=ft(r.did,T(s.uri).rkey);e.out+=`<a target="_blank"${_("href",n)} class="feed-embed s-156tlwp"><div class="main s-156tlwp"><div class="avatar-wrapper s-156tlwp">`,s.avatar?e.out+=`<img loading="lazy"${_("src",s.avatar)} alt="" class="avatar s-156tlwp">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-156tlwp"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-156tlwp">${v(s.displayName)}</p> <p class="creator s-156tlwp">Feed by @${v(r.handle)}</p></div></div> <p class="description s-156tlwp">${v(s.description)}</p></a>`}function ve(e,t){const{embed:s,borderless:r,standalone:n}=t,i=s.images,o=i.length;function l(c,a){c.out+=`<img loading="lazy"${_("src",a.thumb)}${_("alt",a.alt)} class="image s-t3k6fc">`}if(e.out+=`<div${_("class",`${O("image-embed"+(r?"":" is-bordered")+(n&&o===1?" is-aligned":""))} s-t3k6fc`)}>`,o===4)e.out+='<div class="grid s-t3k6fc"><div class="col s-t3k6fc"><div class="item wide s-t3k6fc">',l(e,i[0]),e.out+='</div> <div class="item wide s-t3k6fc">',l(e,i[1]),e.out+='</div></div> <div class="col s-t3k6fc"><div class="item wide s-t3k6fc">',l(e,i[2]),e.out+='</div> <div class="item wide s-t3k6fc">',l(e,i[3]),e.out+="</div></div></div>";else if(o===3)e.out+='<div class="grid s-t3k6fc"><div class="col square s-t3k6fc"><div class="item s-t3k6fc">',l(e,i[0]),e.out+='</div></div> <div class="col square s-t3k6fc"><div class="item s-t3k6fc">',l(e,i[1]),e.out+='</div> <div class="item s-t3k6fc">',l(e,i[2]),e.out+="</div></div></div>";else if(o===2)e.out+='<div class="grid s-t3k6fc"><div class="col s-t3k6fc"><div class="item square s-t3k6fc">',l(e,i[0]),e.out+='</div></div> <div class="col s-t3k6fc"><div class="item square s-t3k6fc">',l(e,i[1]),e.out+="</div></div></div>";else if(o===1){const c=i[0],a=n&&c.aspectRatio;e.out+=`<div${_("class",`${O("single-item"+(a?" is-standalone":""))} s-t3k6fc`)}${_("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e,c),e.out+=" ",a&&(e.out+='<div class="placeholder s-t3k6fc"></div>'),e.out+="</div>"}e.out+="</div>"}const as=e=>{switch(e){case"app.bsky.graph.defs#curatelist":return"User list";case"app.bsky.graph.defs#modlist":return"Moderation list"}return"Unknown list"};function os(e,t){const{embed:s}=t,r=s.creator,n=ft(r.did,T(s.uri).rkey);e.out+=`<a target="_blank"${_("href",n)} class="list-embed s-6uize5"><div class="main s-6uize5"><div class="avatar-wrapper s-6uize5">`,s.avatar?e.out+=`<img loading="lazy"${_("src",s.avatar)} alt="" class="avatar s-6uize5">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-6uize5"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-6uize5">${v(s.name)}</p> <p class="creator s-6uize5">${v(as(s.purpose))} by @${v(r.handle)}</p></div></div> <p class="description s-6uize5">${v(s.description)}</p></a>`}function be(e,t){const{post:s,embed:r,borderless:n=!1,standalone:i=!1}=t,o=i&&r.aspectRatio,l=s&&ie(s.author.did,T(s.uri).rkey);function c(a){a.out+=`<img loading="lazy"${_("src",r.thumbnail)} alt="" class="thumbnail s-1azk58e"> `,o&&(a.out+='<div class="placeholder s-1azk58e"></div>'),a.out+=' <div class="play s-1azk58e"><svg class="icon s-1azk58e" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M22 12 5 2v20l17-10Z"></path></svg></div>'}i?(e.out+=`<a target="_blank"${_("href",l)}${_("class",`${O("video-embed"+(n?"":" is-bordered")+(i?" is-standalone":""))} s-1azk58e`)}><div class="constrainer s-1azk58e"${_("style",o?`aspect-ratio: ${o.width}/${o.height}`:"")}>`,c(e),e.out+="</div></a>"):(e.out+=`<div${_("class",`${O("video-embed"+(n?"":" is-bordered"))} s-1azk58e`)}${_("style",o?`aspect-ratio: ${o.width}/${o.height}`:"")}>`,c(e),e.out+="</div>")}const mt=e=>{if(e){if(e.$type==="app.bsky.embed.images#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return mt(e.media)}},vt=e=>{if(e){if(e.$type==="app.bsky.embed.video#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return vt(e.media)}};function cs(e,t){const{embed:s,large:r=!1}=t,n=s.value,i=n.text.trim(),o=s.author,l=o.displayName?.trim(),c=s.embeds?.[0],a=mt(c),u=vt(c),d=ie(o.did,T(s.uri).rkey);e.out+=`<a target="_blank"${_("href",d)} class="quote-embed s-za6fip"><div class="meta s-za6fip"><div class="avatar-wrapper s-za6fip">`,o.avatar&&(e.out+=`<img loading="lazy"${_("src",o.avatar)} alt="" class="avatar s-za6fip">`),e.out+='</div> <span class="name-wrapper s-za6fip">',l&&(e.out+=`<bdi class="display-name-wrapper s-za6fip"><span class="display-name s-za6fip">${v(l)}</span></bdi>`),e.out+=` <span class="handle s-za6fip">@${v(o.handle)}</span></span> <span aria-hidden="true" class="dot s-za6fip">·</span> <time${_("datetime",n.createdAt)} class="date s-za6fip">${v(pt(n.createdAt))}</time></div> `,i?(e.out+='<div class="body s-za6fip">',r||(a?(e.out+='<div class="aside s-za6fip">',ve(e,{embed:a}),e.out+="</div>"):u&&(e.out+='<div class="aside s-za6fip">',be(e,{embed:u}),e.out+="</div>")),e.out+=` <p class="text s-za6fip">${v(i)}</p></div>`):e.out+='<div class="divide s-za6fip"></div>',e.out+=" ",(r||!i)&&(a?ve(e,{embed:a,borderless:!0}):u&&be(e,{embed:u,borderless:!0})),e.out+="</a>"}function ls(e,t){const{embed:s,large:r=!1}=t,n=s.record,i=s.creator,o=i.did,l=T(s.uri).rkey,c=Jt(o,l);if(e.out+=`<a target="_blank"${_("href",c)} class="starterpack-embed s-15v965v">`,r){const a=Xt(o,l);e.out+=`<img loading="lazy"${_("src",a)} alt="" class="banner s-15v965v">`}e.out+=` <div class="meta s-15v965v"><div class="main s-15v965v"><svg fill="none" viewBox="0 0 24 24" class="avatar s-15v965v"><defs><linearGradient id="a" x1="0" x2="100%" y1="0" y2="0" gradientTransform="rotate(45)"><stop offset="0" stop-color="#0A7AFF"></stop><stop offset="1" stop-color="#59B9FF"></stop></linearGradient></defs><path fill="url(#a)" fill-rule="evenodd" d="M11.26 5.227 5.02 6.899c-.734.197-1.17.95-.973 1.685l1.672 6.24c.197.734.951 1.17 1.685.973l6.24-1.672a1.376 1.376 0 0 0 .973-1.685L12.945 6.2a1.375 1.375 0 0 0-1.685-.973Zm-6.566.459a2.632 2.632 0 0 0-1.86 3.223l1.672 6.24a2.632 2.632 0 0 0 3.223 1.861l6.24-1.672a2.631 2.631 0 0 0 1.861-3.223l-1.672-6.24a2.632 2.632 0 0 0-3.223-1.861l-6.24 1.672Z" clip-rule="evenodd"></path><path fill="url(#a)" fill-rule="evenodd" d="M15.138 18.411a4.606 4.606 0 1 0 0-9.211 4.606 4.606 0 0 0 0 9.211Zm0 1.257a5.862 5.862 0 1 0 0-11.724 5.862 5.862 0 0 0 0 11.724Z" clip-rule="evenodd"></path></svg> <div class="info"><p class="name s-15v965v">${v(n.name)}</p> <p class="creator s-15v965v">Starter pack by @${v(i.handle)}</p></div></div> <p class="description s-15v965v">${v(n.description)}</p></div></a>`}const ds=e=>{switch(e){case"app.bsky.feed.post":return"post";case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";case"app.bsky.graph.starterpack":return"starter pack";case"app.bsky.labeler.service":return"labeler"}return null};function bt(e,t){const{post:s,embed:r,large:n=!1}=t;function i(c,a){a.$type==="app.bsky.embed.external#view"?ns(c,{embed:a}):a.$type==="app.bsky.embed.images#view"?ve(c,{embed:a,standalone:!0}):a.$type==="app.bsky.embed.video#view"?be(c,{post:s,embed:a,standalone:!0}):l(c,"Unsupported media embed")}function o(c,a){const u=a.record;if(u.$type==="app.bsky.embed.record#viewRecord")cs(c,{embed:u,large:n});else if(u.$type==="app.bsky.feed.defs#generatorView")is(c,{embed:u});else if(u.$type==="app.bsky.graph.defs#listView")os(c,{embed:u});else if(u.$type==="app.bsky.graph.defs#starterPackViewBasic")ls(c,{embed:u,large:n});else{const d=T(u.uri),h=ds(d.collection),f=h&&(u.$type==="app.bsky.embed.record#viewNotFound"||u.$type==="app.bsky.embed.record#viewBlocked"||u.$type==="app.bsky.embed.record#viewDetached");l(c,f?`This ${h} is unavailable`:"Unsupported record embed")}}function l(c,a){c.out+=`<div class="message s-azdpbr">${v(a)}</div>`}e.out+='<div class="embeds s-azdpbr">',r.$type==="app.bsky.embed.recordWithMedia#view"?(i(e,r.media),e.out+=" ",o(e,r.record)):r.$type==="app.bsky.embed.record#view"?o(e,r):i(e,r),e.out+="</div>"}const us=e=>e?.find(t=>t.$type==="app.bsky.richtext.facet#link"||t.$type==="app.bsky.richtext.facet#mention"||t.$type==="app.bsky.richtext.facet#tag");function gt(e,t){const{text:s,facets:r,large:n}=t,i=ut(s,r);e.out+=`<p${_("class",`${O("rich-text"+(n?" is-large":" is-small"))} s-1lecfnd`)}>`;for(let o=0,l=i.length;o<l;o++){let c=i[o];const a=us(c.features);a?a.$type==="app.bsky.richtext.facet#link"?e.out+=`<a target="_blank"${_("href",a.uri)} rel="noopener nofollow" class="link s-1lecfnd">${v(c.text)}</a>`:a.$type==="app.bsky.richtext.facet#mention"?e.out+=`<a target="_blank"${_("href",W(a.did))} class="mention s-1lecfnd">${v(c.text)}</a>`:a.$type==="app.bsky.richtext.facet#tag"&&(e.out+=`<a target="_blank"${_("href",Gt(a.tag))} class="hashtag s-1lecfnd">${v(c.text)}</a>`):e.out+=v(c.text)}e.out+="</p>"}function fs(e,t){const{post:s,parent:r,prev:n=!1}=t,i=s.author,o=W(i.did),l=i.displayName?.trim(),c=s.record,a=ie(i.did,T(s.uri).rkey),u=s.replyCount||0,d=s.likeCount||0,h=(s.repostCount||0)+(s.quoteCount||0);if(e.out+=`<div class="highlighted-post s-hik11q"><div class="meta s-hik11q"><a${_("href",o)} target="_blank" class="avatar-wrapper s-hik11q">`,i.avatar&&(e.out+=`<img loading="lazy"${_("src",i.avatar)} class="avatar s-hik11q">`),e.out+=`</a> <a${_("href",o)} target="_blank" class="name-wrapper s-hik11q">`,l&&(e.out+=`<bdi class="display-name-wrapper s-hik11q"><span class="display-name s-hik11q">${v(l)}</span></bdi>`),e.out+=` <span class="handle s-hik11q">@${v(i.handle)}</span></a> `,n||(e.out+='<svg class="logo s-hik11q" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg>'),e.out+="</div> ",!n&&c.reply){if(e.out+='<p class="context s-hik11q">',r){const f=r.author;e.out+=`Replying to <a target="_blank"${_("href",W(f.did))} dir="auto" class="s-hik11q">${v(f.displayName?.trim()||`@${f.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",gt(e,{text:c.text,facets:c.facets,large:!0}),e.out+=" ",s.embed&&bt(e,{post:s,embed:s.embed,large:!0}),e.out+=` <time${_("datetime",c.createdAt)} class="date s-hik11q">${v(ht(c.createdAt))}</time> <div class="stats s-hik11q"><span class="stat s-hik11q"${_("title",d===1?`${Q(d)} like`:`${Q(d)} likes`)}><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M12 5.768c6.162-6.25 16.725 5.358 0 14.732C-4.725 11.126 5.838-.482 12 5.768Z"></path></svg> <span>${v(K(d))}</span></span> <span class="stat s-hik11q"${_("title",h===1?`${Q(h)} repost`:`${Q(h)} reposts`)}><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="m17 3 3 3-3 3M7 21l-3-3 3-3m-2 3h15v-5M4 11V6h15"></path></svg> <span>${v(K(h))}</span></span> <div class="gap s-hik11q"></div> <a${_("href",a)} target="_blank" class="permalink s-hik11q"><span>${v(u?u===1?`Read ${K(u)} reply on Bluesky`:`Read ${K(u)} replies on Bluesky`:"View on Bluesky")}</span></a></div></div>`}function ps(e,t){const{post:s,parent:r,prev:n}=t,i=s.author,o=W(i.did),l=i.displayName?.trim(),c=s.record,a=ie(i.did,T(s.uri).rkey);if(e.out+='<div class="post s-12mzi62">',n||(e.out+='<svg class="logo s-12mzi62" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg>'),e.out+=` <div class="aside s-12mzi62"><a target="_blank"${_("href",o)} class="avatar-wrapper s-12mzi62">`,i.avatar&&(e.out+=`<img loading="lazy"${_("src",i.avatar)} alt="" class="avatar s-12mzi62">`),e.out+=`</a> <div class="line s-12mzi62"></div></div> <div class="main s-12mzi62"><div class="meta s-12mzi62"><a${_("href",o)} target="_blank" class="name-wrapper s-12mzi62">`,l&&(e.out+=`<bdi class="display-name-wrapper s-12mzi62"><span class="display-name s-12mzi62">${v(l)}</span></bdi>`),e.out+=` <span class="handle s-12mzi62">@${v(i.handle)}</span></a> <span aria-hidden="true" class="dot s-12mzi62">·</span> <a target="_blank"${_("href",a)}${_("title",ht(c.createdAt))} class="date s-12mzi62"><time${_("datetime",c.createdAt)}>${v(pt(c.createdAt))}</time></a></div> `,!n&&c.reply){if(e.out+='<p class="context s-12mzi62">',r){const u=r.author;e.out+=`Replying to <a target="_blank"${_("href",W(u.did))} dir="auto" class="s-12mzi62">${v(u.displayName?.trim()||`@${u.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",gt(e,{text:c.text,facets:c.facets}),e.out+=" ",s.embed&&bt(e,{post:s,embed:s.embed}),e.out+="</div></div>"}const hs=(e,t,s)=>{const r=[];let n=0,i=t?1:2,o=e;for(;o&&!(o.$type==="app.bsky.feed.defs#notFoundPost"||o.$type==="app.bsky.feed.defs#blockedPost");){const l=o.post;if(n!==0&&(r[n-1].parent=l),++n>i)break;const c=l.author;if(!s&&c.labels?.some(a=>a.val==="!no-unauthenticated"))break;r.push({post:l,parent:null}),o=o.parent}return r.reverse()};function _s(e,t){const{thread:s,contextless:r,allowUnauthenticated:n}=t,i=!n&&s!==null&&s.$type==="app.bsky.feed.defs#threadViewPost"&&s.post.author.labels?.some(l=>l.val===Yt);function o(l,c){Be(l,{children:a=>{a.out+=`<div class="message s-1q9cbx0">${v(c)}</div>`}})}if(s===null)o(e,"The post can't be found, it may have been deleted.");else if(i)o(e,"The author has requested for their posts to not be displayed on external sites.");else{const l=hs(s,r,n);Be(e,{children:c=>{const a=l;for(let u=0,d=a.length;u<d;u++){let{post:h,parent:f}=a[u];const g=u!==0;u===l.length-1?fs(c,{post:h,parent:f,prev:g}):ps(c,{post:h,parent:f,prev:g})}}})}}const ms=async e=>{const t=new dt({handler:lt({service:e.serviceUri??Wt})}),s=e.contextless??!1,{data:r}=await t.get("app.bsky.feed.getPostThread",{signal:e.signal,params:{uri:e.uri,parentHeight:s?1:2,depth:0}}).catch(i=>i instanceof q&&i.kind==="NotFound"?{data:null}:Promise.reject(i));return{thread:r?.thread.$type==="app.bsky.feed.defs#threadViewPost"?r.thread:null,contextless:s,allowUnauthenticated:e.allowUnauthenticated??!1}},vs=e=>Ot(_s,{props:e}).body,bs=/[&"<]/g,gs=/[&<]/g;function b(e,t){const s=String(e??""),r=t?bs:gs;r.lastIndex=0;let n="",i=0;for(;r.test(s);){const o=r.lastIndex-1,l=s[o];n+=s.substring(i,o)+(l==="&"?"&amp;":l==='"'?"&quot;":"&lt;"),i=o+1}return n+s.substring(i)}function m(e,t,s=!1){if(t==null||!t&&s||t===""&&e==="class")return"";const n=s?"":`="${b(t,!0)}"`;return` ${e}${n}`}function ks(e,t){const s={out:""};return e(s,t?.props??{}),{head:"",body:s.out}}function L(e){return typeof e=="string"?e:e==null?"":e+""}const ys="https://public.api.bsky.app",Oe="!no-unauthenticated";function We(e,t){const{children:s}=t;e.out+='<div class="bluesky-embed s-1pz15a1">',s(e),e.out+="</div>"}const D=e=>`https://bsky.app/profile/${e}`,Fe=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,ws=e=>`https://bsky.app/hashtag/${e}`,kt=(e,t)=>`https://bsky.app/profile/${e}/feed/${t}`,xs=(e,t)=>`https://bsky.app/starter-pack/${e}/${t}`,As=(e,t)=>`https://ogcard.cdn.bsky.app/start/${e}/${t}`;let Ye=0,de=0;const Us=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),zs=new Intl.DateTimeFormat("en-US",{dateStyle:"medium"}),Ps=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}),yt=e=>{const t=new Date(e),s=t.getTime();if(isNaN(s))return"N/A";const r=Date.now();if(r>de){const n=new Date(r);n.setMonth(0,1),n.setHours(0,0,0),Ye=n.getTime(),n.setFullYear(n.getFullYear()+1,0,0),n.setHours(23,59,59,999),de=n.getTime()}return s>=Ye&&s<=de?Ps.format(t):zs.format(t)},Cs=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":Us.format(t)},Fs=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,E=e=>{const t=Fs.exec(e);if(!t)throw new Ns(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};let Ns=class extends Error{};const wt=new Intl.NumberFormat("en-US"),Ts=new Intl.NumberFormat("en-US",{notation:"compact"}),ue=e=>e<1e3?""+e:e<1e5?wt.format(e):Ts.format(e),R=e=>wt.format(e),Ss=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null};function Ms(e,t){const{embed:s}=t,r=s.external,n=Ss(r.uri)?.host;e.out+=`<a target="_blank"${m("href",n&&r.uri)} rel="noopener noreferrer nofollow" class="external-embed s-au8a8u">`,r.thumb&&(e.out+=`<img loading="lazy"${m("src",r.thumb)} alt="" class="thumbnail s-au8a8u">`),e.out+=` <div class="meta s-au8a8u"><p class="title s-au8a8u">${b(r.title)}</p> <p class="description s-au8a8u">${b(r.description)}</p> `,n&&(e.out+=`<div class="domain s-au8a8u"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="m4.172 8.07 3.94 2.957.977-1.941 3.887-.978 1.15-4.6M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-6.078 4.865.973-1.946-2.869-1.928-1.89-.12-1.08 1.075 1.947 2.919h2.919Z"></path></svg> <span class="domain-name">${b(n)}</span></div>`),e.out+="</div></a>"}function Es(e,t){const{embed:s}=t,r=s.creator,n=kt(r.did,E(s.uri).rkey);e.out+=`<a target="_blank"${m("href",n)} class="feed-embed s-1c1phtf"><div class="main s-1c1phtf"><div class="avatar-wrapper s-1c1phtf">`,s.avatar?e.out+=`<img loading="lazy"${m("src",s.avatar)} alt="" class="avatar s-1c1phtf">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-1c1phtf"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-1c1phtf">${b(s.displayName)}</p> <p class="creator s-1c1phtf">Feed by @${b(r.handle)}</p></div></div> <p class="description s-1c1phtf">${b(s.description)}</p></a>`}function ge(e,t){const{embed:s,borderless:r,standalone:n}=t,i=s.images,o=i.length;function l(c,a){c.out+=`<img loading="lazy"${m("src",a.thumb)}${m("alt",a.alt)} class="image s-1d339cy">`}if(e.out+=`<div${m("class",`${L("image-embed"+(r?"":" is-bordered")+(n&&o===1?" is-aligned":""))} s-1d339cy`)}>`,o===4)e.out+='<div class="grid s-1d339cy"><div class="col s-1d339cy"><div class="item wide s-1d339cy">',l(e,i[0]),e.out+='</div> <div class="item wide s-1d339cy">',l(e,i[1]),e.out+='</div></div> <div class="col s-1d339cy"><div class="item wide s-1d339cy">',l(e,i[2]),e.out+='</div> <div class="item wide s-1d339cy">',l(e,i[3]),e.out+="</div></div></div>";else if(o===3)e.out+='<div class="grid s-1d339cy"><div class="col square s-1d339cy"><div class="item s-1d339cy">',l(e,i[0]),e.out+='</div></div> <div class="col square s-1d339cy"><div class="item s-1d339cy">',l(e,i[1]),e.out+='</div> <div class="item s-1d339cy">',l(e,i[2]),e.out+="</div></div></div>";else if(o===2)e.out+='<div class="grid s-1d339cy"><div class="col s-1d339cy"><div class="item square s-1d339cy">',l(e,i[0]),e.out+='</div></div> <div class="col s-1d339cy"><div class="item square s-1d339cy">',l(e,i[1]),e.out+="</div></div></div>";else if(o===1){const c=i[0],a=n&&c.aspectRatio;e.out+=`<div${m("class",`${L("single-item"+(a?" is-standalone":""))} s-1d339cy`)}${m("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e,c),e.out+=" ",a&&(e.out+='<div class="placeholder s-1d339cy"></div>'),e.out+="</div>"}e.out+="</div>"}const Rs=e=>{switch(e){case"app.bsky.graph.defs#curatelist":return"User list";case"app.bsky.graph.defs#modlist":return"Moderation list"}return"Unknown list"};function qs(e,t){const{embed:s}=t,r=s.creator,n=kt(r.did,E(s.uri).rkey);e.out+=`<a target="_blank"${m("href",n)} class="list-embed s-1mo1e33"><div class="main s-1mo1e33"><div class="avatar-wrapper s-1mo1e33">`,s.avatar?e.out+=`<img loading="lazy"${m("src",s.avatar)} alt="" class="avatar s-1mo1e33">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-1mo1e33"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-1mo1e33">${b(s.name)}</p> <p class="creator s-1mo1e33">${b(Rs(s.purpose))} by @${b(r.handle)}</p></div></div> <p class="description s-1mo1e33">${b(s.description)}</p></a>`}function ke(e,t){const{post:s,embed:r,borderless:n=!1,standalone:i=!1}=t,o=i&&r.aspectRatio,l=s&&Fe(s.author.did,E(s.uri).rkey);function c(a){a.out+=`<img loading="lazy"${m("src",r.thumbnail)} alt="" class="thumbnail s-1h3cnsw"> `,o&&(a.out+='<div class="placeholder s-1h3cnsw"></div>'),a.out+=' <div class="play s-1h3cnsw"><svg class="icon s-1h3cnsw" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M22 12 5 2v20l17-10Z"></path></svg></div>'}i?(e.out+=`<a target="_blank"${m("href",l)}${m("class",`${L("video-embed"+(n?"":" is-bordered")+(i?" is-standalone":""))} s-1h3cnsw`)}><div class="constrainer s-1h3cnsw"${m("style",o?`aspect-ratio: ${o.width}/${o.height}`:"")}>`,c(e),e.out+="</div></a>"):(e.out+=`<div${m("class",`${L("video-embed"+(n?"":" is-bordered"))} s-1h3cnsw`)}${m("style",o?`aspect-ratio: ${o.width}/${o.height}`:"")}>`,c(e),e.out+="</div>")}const xt=e=>{if(e){if(e.$type==="app.bsky.embed.images#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return xt(e.media)}},At=e=>{if(e){if(e.$type==="app.bsky.embed.video#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return At(e.media)}};function Zs(e,t){const{embed:s,large:r=!1}=t,n=s.value,i=n.text.trim(),o=s.author,l=o.displayName?.trim(),c=s.embeds?.[0],a=xt(c),u=At(c),d=Fe(o.did,E(s.uri).rkey);e.out+=`<a target="_blank"${m("href",d)} class="quote-embed s-vbjlyj"><div class="meta s-vbjlyj"><div class="avatar-wrapper s-vbjlyj">`,o.avatar&&(e.out+=`<img loading="lazy"${m("src",o.avatar)} alt="" class="avatar s-vbjlyj">`),e.out+='</div> <span class="name-wrapper s-vbjlyj">',l&&(e.out+=`<bdi class="display-name-wrapper s-vbjlyj"><span class="display-name s-vbjlyj">${b(l)}</span></bdi>`),e.out+=` <span class="handle s-vbjlyj">@${b(o.handle)}</span></span> <span aria-hidden="true" class="dot s-vbjlyj">·</span> <time${m("datetime",n.createdAt)} class="date s-vbjlyj">${b(yt(n.createdAt))}</time></div> `,i?(e.out+='<div class="body s-vbjlyj">',r||(a?(e.out+='<div class="aside s-vbjlyj">',ge(e,{embed:a}),e.out+="</div>"):u&&(e.out+='<div class="aside s-vbjlyj">',ke(e,{embed:u}),e.out+="</div>")),e.out+=` <p class="text s-vbjlyj">${b(i)}</p></div>`):e.out+='<div class="divide s-vbjlyj"></div>',e.out+=" ",(r||!i)&&(a?ge(e,{embed:a,borderless:!0}):u&&ke(e,{embed:u,borderless:!0})),e.out+="</a>"}function Ls(e,t){const{embed:s,large:r=!1}=t,n=s.record,i=s.creator,o=i.did,l=E(s.uri).rkey,c=xs(o,l);if(e.out+=`<a target="_blank"${m("href",c)} class="starterpack-embed s-whpa2l">`,r){const a=As(o,l);e.out+=`<img loading="lazy"${m("src",a)} alt="" class="banner s-whpa2l">`}e.out+=` <div class="meta s-whpa2l"><div class="main s-whpa2l"><svg fill="none" viewBox="0 0 24 24" class="avatar s-whpa2l"><defs><linearGradient id="a" x1="0" x2="100%" y1="0" y2="0" gradientTransform="rotate(45)"><stop offset="0" stop-color="#0A7AFF"></stop><stop offset="1" stop-color="#59B9FF"></stop></linearGradient></defs><path fill="url(#a)" fill-rule="evenodd" d="M11.26 5.227 5.02 6.899c-.734.197-1.17.95-.973 1.685l1.672 6.24c.197.734.951 1.17 1.685.973l6.24-1.672a1.376 1.376 0 0 0 .973-1.685L12.945 6.2a1.375 1.375 0 0 0-1.685-.973Zm-6.566.459a2.632 2.632 0 0 0-1.86 3.223l1.672 6.24a2.632 2.632 0 0 0 3.223 1.861l6.24-1.672a2.631 2.631 0 0 0 1.861-3.223l-1.672-6.24a2.632 2.632 0 0 0-3.223-1.861l-6.24 1.672Z" clip-rule="evenodd"></path><path fill="url(#a)" fill-rule="evenodd" d="M15.138 18.411a4.606 4.606 0 1 0 0-9.211 4.606 4.606 0 0 0 0 9.211Zm0 1.257a5.862 5.862 0 1 0 0-11.724 5.862 5.862 0 0 0 0 11.724Z" clip-rule="evenodd"></path></svg> <div class="info"><p class="name s-whpa2l">${b(n.name)}</p> <p class="creator s-whpa2l">Starter pack by @${b(i.handle)}</p></div></div> <p class="description s-whpa2l">${b(n.description)}</p></div></a>`}const Is=e=>{switch(e){case"app.bsky.feed.post":return"post";case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";case"app.bsky.graph.starterpack":return"starter pack";case"app.bsky.labeler.service":return"labeler"}return null};function Hs(e,t){const{post:s,embed:r,large:n=!1}=t;function i(c,a){a.$type==="app.bsky.embed.external#view"?Ms(c,{embed:a}):a.$type==="app.bsky.embed.images#view"?ge(c,{embed:a,standalone:!0}):a.$type==="app.bsky.embed.video#view"?ke(c,{post:s,embed:a,standalone:!0}):l(c,"Unsupported media embed")}function o(c,a){const u=a.record;if(u.$type==="app.bsky.embed.record#viewRecord")Zs(c,{embed:u,large:n});else if(u.$type==="app.bsky.feed.defs#generatorView")Es(c,{embed:u});else if(u.$type==="app.bsky.graph.defs#listView")qs(c,{embed:u});else if(u.$type==="app.bsky.graph.defs#starterPackViewBasic")Ls(c,{embed:u,large:n});else{const d=E(u.uri),h=Is(d.collection),f=h&&(u.$type==="app.bsky.embed.record#viewNotFound"||u.$type==="app.bsky.embed.record#viewBlocked"||u.$type==="app.bsky.embed.record#viewDetached");l(c,f?`This ${h} is unavailable`:"Unsupported record embed")}}function l(c,a){c.out+=`<div class="message s-1nks9gp">${b(a)}</div>`}e.out+='<div class="embeds s-1nks9gp">',r.$type==="app.bsky.embed.recordWithMedia#view"?(i(e,r.media),e.out+=" ",o(e,r.record)):r.$type==="app.bsky.embed.record#view"?o(e,r):i(e,r),e.out+="</div>"}const js=e=>e?.find(t=>t.$type==="app.bsky.richtext.facet#link"||t.$type==="app.bsky.richtext.facet#mention"||t.$type==="app.bsky.richtext.facet#tag");function Ds(e,t){const{text:s,facets:r,large:n}=t,i=ut(s,r);e.out+=`<p${m("class",`${L("rich-text"+(n?" is-large":" is-small"))} s-10xqaeb`)}>`;for(let o=0,l=i.length;o<l;o++){let c=i[o];const a=js(c.features);a?a.$type==="app.bsky.richtext.facet#link"?e.out+=`<a target="_blank"${m("href",a.uri)} rel="noopener nofollow" class="link s-10xqaeb">${b(c.text)}</a>`:a.$type==="app.bsky.richtext.facet#mention"?e.out+=`<a target="_blank"${m("href",D(a.did))} class="mention s-10xqaeb">${b(c.text)}</a>`:a.$type==="app.bsky.richtext.facet#tag"&&(e.out+=`<a target="_blank"${m("href",ws(a.tag))} class="hashtag s-10xqaeb">${b(c.text)}</a>`):e.out+=b(c.text)}e.out+="</p>"}function Bs(e,t){const{item:s,prev:r=!1,next:n=!1}=t,i=s.reason,o=s.post,l=s.reply?.parent,c=o.author,a=D(c.did),u=c.displayName?.trim(),d=o.record,h=Fe(c.did,E(o.uri).rkey),f=o.replyCount||0,g=o.likeCount||0,z=(o.repostCount||0)+(o.quoteCount||0);if(e.out+=`<div${m("class",`${L("feed-post"+(n?"":" is-leaf"))} s-1c3lek9`)}><div class="contexts s-1c3lek9">`,r&&(e.out+='<div class="ascendant-line-wrapper s-1c3lek9"><div class="line s-1c3lek9"></div></div>'),e.out+=" ",i)if(i.$type==="app.bsky.feed.defs#reasonRepost"){const y=i.by;e.out+=`<div class="context s-1c3lek9"><div class="aside s-1c3lek9"><svg class="icon" viewBox="0 0 24 24" fill="none"><path d="M17 3L20 6L17 9M7 21L4 18L7 15M5 18H20V13M4 11V6H19" stroke="currentColor" stroke-width="2" stroke-linecap="square"></path></svg></div> <a${m("href",D(y.did))} class="main s-1c3lek9"><span dir="auto" class="name s-1c3lek9">${b(y.displayName)}</span> <span class="affix s-1c3lek9"> reposted</span></a></div>`}else i.$type==="app.bsky.feed.defs#reasonPin"&&(e.out+='<div class="context s-1c3lek9"><div class="aside s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="M12 15H5v-2.5l.377-.377A7.25 7.25 0 0 0 7.5 6.997V3h9v3.997a7.25 7.25 0 0 0 2.123 5.127L19 12.5V15h-7Zm0 0v6"></path></svg></div> <span class="flex min-w-0">Pinned</span></div>');if(e.out+=`</div> <div class="content s-1c3lek9"><div class="aside s-1c3lek9"><a target="_blank"${m("href",a)} class="avatar-wrapper s-1c3lek9">`,c.avatar&&(e.out+=`<img loading="lazy"${m("src",c.avatar)} alt="" class="avatar s-1c3lek9">`),e.out+="</a> ",n&&(e.out+='<div class="descendant-line s-1c3lek9"></div>'),e.out+=`</div> <div class="main s-1c3lek9"><div class="meta s-1c3lek9"><a${m("href",a)} target="_blank" class="name-wrapper s-1c3lek9">`,u&&(e.out+=`<bdi class="display-name-wrapper s-1c3lek9"><span class="display-name s-1c3lek9">${b(u)}</span></bdi>`),e.out+=` <span class="handle s-1c3lek9">@${b(c.handle)}</span></a> <span aria-hidden="true" class="dot s-1c3lek9">·</span> <a target="_blank"${m("href",h)}${m("title",Cs(d.createdAt))} class="date s-1c3lek9"><time${m("datetime",d.createdAt)}>${b(yt(d.createdAt))}</time></a></div> `,!r&&d.reply){if(e.out+='<p class="reply-context s-1c3lek9">',l&&l.$type==="app.bsky.feed.defs#postView"){const y=l.author;e.out+=`Replying to <a target="_blank"${m("href",D(y.did))} dir="auto" class="s-1c3lek9">${b(y.displayName?.trim()||`@${y.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",Ds(e,{text:d.text,facets:d.facets}),e.out+=" ",o.embed&&Hs(e,{post:o,embed:o.embed}),e.out+=` <div class="metrics s-1c3lek9"><div${m("title",f===1?`${R(f)} reply`:`${R(f)} replies`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="M3.002 4h18v14h-9l-5 3v-3h-4V4Z"></path></svg> <span class="count s-1c3lek9">${b(ue(f))}</span></div> <div${m("title",z===1?`${R(z)} repost`:`${R(z)} reposts`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="m17 3 3 3-3 3M7 21l-3-3 3-3m-2 3h15v-5M4 11V6h15"></path></svg> <span class="count s-1c3lek9">${b(ue(z))}</span></div> <div${m("title",g===1?`${R(g)} like`:`${R(g)} likes`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M12 5.768c6.162-6.25 16.725 5.358 0 14.732C-4.725 11.126 5.838-.482 12 5.768Z"></path></svg> <span class="count s-1c3lek9">${b(ue(g))}</span></div></div></div></div></div>`}function Vs(e,t){const{profile:s}=t;e.out+=`<div class="profile-feed-header s-1xh30xs"><a target="_blank"${m("href",D(s.did))} class="title s-1xh30xs">Posts from @${b(s.handle)}</a> <svg class="logo s-1xh30xs" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg></div>`}function Os(e,t){const{profile:s,feed:r,allowUnauthenticated:n}=t,i=!n&&s?.labels?.some(c=>c.val===Oe),o=r.filter(c=>{if(!s)return!1;const a=c.reason;if(a){if(a.$type==="app.bsky.feed.defs#reasonPin")return!0;if(a.$type==="app.bsky.feed.defs#reasonRepost"){const u=c.post.author;return u.did!==s.did?n||!u.labels?.some(d=>d.val===Oe):!0}return!1}return!c.reply});function l(c,a){We(c,{children:u=>{u.out+=`<div class="message s-f12rvk">${b(a)}</div>`}})}s===null?l(e,"The profile can't be found, it may have been deleted."):i?l(e,"The user has requested for their posts to not be displayed on external sites."):We(e,{children:c=>{if(Vs(c,{profile:s}),c.out+=" ",o.length>0){const a=o;c.out+='<div class="feed s-f12rvk">';for(let u=0,d=a.length;u<d;u++){let h=a[u];Bs(c,{item:h})}c.out+=' <div class="end-marker s-f12rvk"><div class="dot s-f12rvk"></div></div></div>'}else c.out+='<div class="message s-f12rvk">This user has not made any posts.</div>'}})}const Ws=async e=>{const t=e.actor,s=e.allowUnauthenticated??!1,r=new dt({handler:lt({service:e.serviceUri??ys})}),[{data:n},{data:i}]=await Promise.all([r.get("app.bsky.actor.getProfile",{signal:e.signal,params:{actor:t}}).catch(o=>o instanceof q&&o.kind==="InvalidRequest"&&o.description==="Profile not found"?{data:null}:Promise.reject(o)),r.get("app.bsky.feed.getAuthorFeed",{signal:e.signal,params:{actor:t,includePins:e.includePins,limit:30,filter:"posts_and_author_threads"}}).catch(o=>o instanceof q&&o.kind==="InvalidRequest"&&o.description==="Profile not found"?{data:{feed:[]}}:Promise.reject(o))]);return{profile:n,feed:i.feed,allowUnauthenticated:s}},Ys=e=>ks(Os,{props:e}).body,Gs=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,Js=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),Xs=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":Js.format(t)},Ks=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,Qs=e=>{const t=Ks.exec(e);if(!t)throw new $s(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};class $s extends Error{}const P=e=>e.replace(/[<"&]/g,t=>"&#"+t.charCodeAt(0)+";"),er=/^(?!\.{1,2}$)[a-zA-Z0-9_~.:-]{1,512}$/,tr=e=>e.length>=1&&e.length<=512&&er.test(e),sr=/^did:([a-z]+):([a-zA-Z0-9._:%-]*[a-zA-Z0-9._-])$/,rr=e=>e.length>=7&&e.length<=2048&&sr.test(e),nr=/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/,ir=e=>e.length>=3&&e.length<=253&&nr.test(e),Ge=e=>rr(e)||ir(e),ar=({data:e})=>{const t=Ce(()=>vs(e),[e]);return p("bluesky-post",{src:e.thread?.post.uri,dangerouslySetInnerHTML:{__html:t}})},or=({data:e})=>{const t=Ce(()=>Ys(e),[e]);return p("bluesky-profile-feed",{actor:e.profile?.did,dangerouslySetInnerHTML:{__html:t}})},re=({code:e})=>p("div",{class:"code-block",children:[p("pre",{children:p("code",{children:e})}),p("div",{class:"actions",children:p("button",{title:"Copy",onClick:()=>{navigator.clipboard.writeText(e).catch(()=>alert("Failed to copy to clipboard"))},class:"copy-button",children:p("svg",{fill:"none",viewBox:"0 0 24 24",children:p("path",{stroke:"currentColor","stroke-linecap":"square","stroke-width":"2",d:"M15 5h4v16H5V5h4m0-2h6v4H9V3Z"})})})})]}),Je="https://bsky.app/profile/did:plc:ragtjsm2j2vknwkz3zp4oxrd/post/3kj2umze7zj2n",cr=()=>{const[e,t]=Pe(""),s=Ce(()=>mr(e||Je),[e]);return p("div",{class:"app",children:[p("h1",{class:"header",children:p("code",{children:"<bluesky-embed>"})}),p("label",{class:"input-wrapper",children:[p("span",{class:"label",children:"Bluesky post or profile URL"}),p("input",{type:"url",placeholder:Je,value:e,onInput:r=>t(r.currentTarget.value),class:"text-input"})]}),s?s.type==="post"?p(lr,{matched:s},e):s.type==="profile"?p(fr,{matched:s},e):null:p("main",{class:"main",children:p("div",{class:"alert",children:"Invalid URL, did you type it correctly?"})}),p("footer",{class:"footer",children:[p("span",{children:["made with ❤️ by ",p("a",{href:"https://bsky.app/profile/did:plc:ia76kvnndjutgedggx2ibrem",children:"@mary.my.id"})]}),p("span",{"aria-hidden":"true",children:" · "}),p("span",{children:p("a",{href:"https://github.com/mary-ext/bluesky-embed",children:"source code"})}),p("span",{"aria-hidden":"true",children:" · "}),p("span",{children:"MIT License"})]})]})},Ut=()=>p("svg",{viewBox:"0 0 32 32",class:"circular-spinner",children:[p("circle",{cx:"16",cy:"16",fill:"none",r:"14","stroke-width":"4",class:"background"}),p("circle",{cx:"16",cy:"16",fill:"none",r:"14","stroke-width":"4","stroke-dasharray":"80px","stroke-dashoffset":"60px",class:"accented"})]}),lr=({matched:e})=>{const[t,s]=Pe();return at(()=>{if(t)return;const r=new AbortController,n=r.signal;return ms({uri:`at://${e.author}/app.bsky.feed.post/${e.rkey}`,signal:n,contextless:!1}).then(o=>{n.aborted||s({ok:!0,data:o})},o=>{n.aborted||s({ok:!1,message:""+o})}),()=>r.abort()},[e,t]),p("main",{class:"main",children:t?t.ok?p(M,{children:[p(ar,{data:t.data}),t.data.thread?p("div",{class:"guide",children:[p("h4",{class:"guide-header",children:"How do I embed this to my website?"}),p("div",{class:"inform",children:["Doing server-side rendering? Check out examples for"," ",p("a",{href:"https://github.com/mary-ext/bluesky-embed-astro",children:"Astro"})," and"," ",p("a",{href:"https://github.com/mary-ext/bluesky-embed-sveltekit",children:"SvelteKit"}),"."]}),p("ol",{class:"guide-instructions",children:[p("li",{children:[p("p",{children:["Insert the following scripts and stylesheets to the ",p("code",{children:"<head>"})," of your website."]}),p(re,{code:dr()})]}),p("li",{children:[p("p",{children:"Insert the following markup in wherever you want the post to be."}),p(re,{code:ur(t.data.thread.post)})]})]})]}):null]}):p("div",{class:"alert",children:t.message}):p(Ut,{})})},dr=()=>{const e="https://cdn.jsdelivr.net/npm/bluesky-post-embed@^1.0.0";return`<!-- Core web component and styling --> 2 - <script type="module" src="${e}/+esm"><\/script> 3 - <link rel="stylesheet" href="${e}/dist/core.min.css"> 4 - 5 - <!-- Built-in themes --> 6 - <link rel="stylesheet" href="${e}/themes/light.min.css" media="(prefers-color-scheme: light)"> 7 - <link rel="stylesheet" href="${e}/themes/dim.min.css" media="(prefers-color-scheme: dark)"> 8 - 9 - <!-- Fallback/placeholder elements if JS script is taking a while to load or is failing --> 10 - <style> 11 - .bluesky-post-fallback { 12 - margin: 16px 0; 13 - border-left: 3px solid var(--divider); 14 - padding: 4px 8px; 15 - white-space: pre-wrap; 16 - overflow-wrap: break-word; 17 - } 18 - .bluesky-post-fallback p { 19 - margin: 0 0 8px 0; 20 - } 21 - </style> 22 - `},ur=e=>{const t=e.author,s=e.record;return`<bluesky-post src="${P(e.uri)}"> 23 - <blockquote class="bluesky-post-fallback"> 24 - <p dir="auto">${P(s.text)}</p> 25 - — ${t.displayName?.trim()?`${P(t.displayName)} (@${P(t.handle)})`:`@${P(t.handle)}`} 26 - <a href="${P(Gs(t.did,Qs(e.uri).rkey))}">${Xs(e.indexedAt)}</a> 27 - </blockquote> 28 - </bluesky-post> 29 - `},fr=({matched:e})=>{const[t,s]=Pe();return at(()=>{if(t)return;const r=new AbortController,n=r.signal;return Ws({actor:e.actor,signal:n,includePins:!0}).then(o=>{n.aborted||s({ok:!0,data:o})},o=>{n.aborted||s({ok:!1,message:""+o})}),()=>r.abort()},[e,t]),p("main",{class:"main",children:t?t.ok?p(M,{children:[p(or,{data:t.data}),t.data.profile?p("div",{class:"guide",children:[p("h4",{class:"guide-header",children:"How do I embed this to my website?"}),p("div",{class:"inform",children:["Doing server-side rendering? Check out examples for"," ",p("a",{href:"https://github.com/mary-ext/bluesky-embed-astro",children:"Astro"})," and"," ",p("a",{href:"https://github.com/mary-ext/bluesky-embed-sveltekit",children:"SvelteKit"}),"."]}),p("ol",{class:"guide-instructions",children:[p("li",{children:[p("p",{children:["Insert the following scripts and stylesheets to the ",p("code",{children:"<head>"})," of your website."]}),p(re,{code:pr()})]}),p("li",{children:[p("p",{children:"Insert the following markup in wherever you want the profile feed to be."}),p(re,{code:hr(t.data.profile)})]})]})]}):null]}):p("div",{class:"alert",children:t.message}):p(Ut,{})})},pr=()=>{const e="https://cdn.jsdelivr.net/npm/bluesky-profile-feed-embed@^1.0.0";return`<!-- Core web component and styling --> 30 - <script type="module" src="${e}/+esm"><\/script> 31 - <link rel="stylesheet" href="${e}/dist/core.min.css"> 32 - 33 - <!-- Built-in themes --> 34 - <link rel="stylesheet" href="${e}/themes/light.min.css" media="(prefers-color-scheme: light)"> 35 - <link rel="stylesheet" href="${e}/themes/dim.min.css" media="(prefers-color-scheme: dark)"> 36 - `},hr=e=>{const t=`https://bsky.app/profile/${e.did}`;return`<bluesky-profile-feed actor="${P(e.did)}" include-pins> 37 - <a target="_blank" href="${P(t)}" class="bluesky-profile-feed-fallback"> 38 - ${e.displayName?.trim()?`Posts by ${P(e.displayName)} (@${P(e.handle)})`:`Posts by @${P(e.handle)}`} 39 - </a> 40 - </bluesky-profile-feed> 41 - `},_r=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null},mr=e=>{const t=_r(e);if(!t)return null;let s;if(t.host==="bsky.app"||t.host==="staging.bsky.app"||t.host==="main.bsky.dev"){if(s=/^\/profile\/([^/]+)\/post\/([^/]+)\/?$/.exec(t.pathname))return!Ge(s[1])||!tr(s[2])?null:{type:"post",author:s[1],rkey:s[2]};if(s=/^\/profile\/([^/]+)\/?$/.exec(t.pathname))return Ge(s[1])?{type:"profile",actor:s[1]}:null}return null};St(p(cr,{}),document.body);
+41
assets/index-jW3IhGIV.js
··· 1 + (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function s(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(n){if(n.ep)return;n.ep=!0;const i=s(n);fetch(n.href,i)}})();var ae,w,et,E,Me,tt,he,st,xe,_e,me,O={},rt=[],St=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ae=Array.isArray;function S(e,t){for(var s in t)e[s]=t[s];return e}function Ue(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Mt(e,t,s){var r,n,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?n=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?ae.call(arguments,2):s),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return te(e,a,r,n,null)}function te(e,t,s,r,n){var i={type:e,props:t,key:s,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++et,__i:-1,__u:0};return n==null&&w.vnode!=null&&w.vnode(i),i}function R(e){return e.children}function se(e,t){this.props=e,this.context=t}function I(e,t){if(t==null)return e.__?I(e.__,e.__i+1):null;for(var s;t<e.__k.length;t++)if((s=e.__k[t])!=null&&s.__e!=null)return s.__e;return typeof e.type=="function"?I(e):null}function nt(e){var t,s;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((s=e.__k[t])!=null&&s.__e!=null){e.__e=e.__c.base=s.__e;break}return nt(e)}}function Ee(e){(!e.__d&&(e.__d=!0)&&E.push(e)&&!ne.__r++||Me!==w.debounceRendering)&&((Me=w.debounceRendering)||tt)(ne)}function ne(){var e,t,s,r,n,i,a,c;for(E.sort(he);e=E.shift();)e.__d&&(t=E.length,r=void 0,i=(n=(s=e).__v).__e,a=[],c=[],s.__P&&((r=S({},n)).__v=n.__v+1,w.vnode&&w.vnode(r),ze(s.__P,r,n,s.__n,s.__P.namespaceURI,32&n.__u?[i]:null,a,i??I(n),!!(32&n.__u),c),r.__v=n.__v,r.__.__k[r.__i]=r,ot(a,r,c),r.__e!=i&&nt(r)),E.length>t&&E.sort(he));ne.__r=0}function it(e,t,s,r,n,i,a,c,l,o,u){var d,h,p,x,z,k,g=r&&r.__k||rt,y=t.length;for(l=Et(s,t,g,l),d=0;d<y;d++)(p=s.__k[d])!=null&&(h=p.__i===-1?O:g[p.__i]||O,p.__i=d,k=ze(e,p,h,n,i,a,c,l,o,u),x=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Pe(h.ref,null,p),u.push(p.ref,p.__c||x,p)),z==null&&x!=null&&(z=x),4&p.__u||h.__k===p.__k?l=at(p,l,e):typeof p.type=="function"&&k!==void 0?l=k:x&&(l=x.nextSibling),p.__u&=-7);return s.__e=z,l}function Et(e,t,s,r){var n,i,a,c,l,o=t.length,u=s.length,d=u,h=0;for(e.__k=[],n=0;n<o;n++)(i=t[n])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=n+h,(i=e.__k[n]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?te(null,i,null,null,null):Ae(i)?te(R,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?te(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=Rt(i,s,c,d))!==-1&&(d--,(a=s[l])&&(a.__u|=2)),a==null||a.__v===null?(l==-1&&h--,typeof i.type!="function"&&(i.__u|=4)):l!==c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,i.__u|=4))):i=e.__k[n]=null;if(d)for(n=0;n<u;n++)(a=s[n])!=null&&!(2&a.__u)&&(a.__e==r&&(r=I(a)),ct(a,a));return r}function at(e,t,s){var r,n;if(typeof e.type=="function"){for(r=e.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=e,t=at(r[n],t,s));return t}e.__e!=t&&(t&&e.type&&!s.contains(t)&&(t=I(e)),s.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Rt(e,t,s,r){var n=e.key,i=e.type,a=s-1,c=s+1,l=t[s];if(l===null||l&&n==l.key&&i===l.type&&!(2&l.__u))return s;if((typeof i!="function"||i===R||n)&&r>(l!=null&&!(2&l.__u)?1:0))for(;a>=0||c<t.length;){if(a>=0){if((l=t[a])&&!(2&l.__u)&&n==l.key&&i===l.type)return a;a--}if(c<t.length){if((l=t[c])&&!(2&l.__u)&&n==l.key&&i===l.type)return c;c++}}return-1}function Re(e,t,s){t[0]==="-"?e.setProperty(t,s??""):e[t]=s==null?"":typeof s!="number"||St.test(t)?s:s+"px"}function K(e,t,s,r,n){var i;e:if(t==="style")if(typeof s=="string")e.style.cssText=s;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)s&&t in s||Re(e.style,t,"");if(s)for(t in s)r&&s[t]===r[t]||Re(e.style,t,s[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(st,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=s,s?r?s.u=r.u:(s.u=xe,e.addEventListener(t,i?me:_e,i)):e.removeEventListener(t,i?me:_e,i);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=s??"";break e}catch{}typeof s=="function"||(s==null||s===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&s==1?"":s))}}function qe(e){return function(t){if(this.l){var s=this.l[t.type+e];if(t.t==null)t.t=xe++;else if(t.t<s.u)return;return s(w.event?w.event(t):t)}}}function ze(e,t,s,r,n,i,a,c,l,o){var u,d,h,p,x,z,k,g,y,j,T,J,D,Se,X,ce,le,C=t.type;if(t.constructor!==void 0)return null;128&s.__u&&(l=!!(32&s.__u),i=[c=t.__e=s.__e]),(u=w.__b)&&u(t);e:if(typeof C=="function")try{if(g=t.props,y="prototype"in C&&C.prototype.render,j=(u=C.contextType)&&r[u.__c],T=u?j?j.props.value:u.__:r,s.__c?k=(d=t.__c=s.__c).__=d.__E:(y?t.__c=d=new C(g,T):(t.__c=d=new se(g,T),d.constructor=C,d.render=Zt),j&&j.sub(d),d.props=g,d.state||(d.state={}),d.context=T,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),y&&d.__s==null&&(d.__s=d.state),y&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=S({},d.__s)),S(d.__s,C.getDerivedStateFromProps(g,d.__s))),p=d.props,x=d.state,d.__v=t,h)y&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),y&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(y&&C.getDerivedStateFromProps==null&&g!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,T),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,T)===!1||t.__v===s.__v)){for(t.__v!==s.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=s.__e,t.__k=s.__k,t.__k.some(function(B){B&&(B.__=t)}),J=0;J<d._sb.length;J++)d.__h.push(d._sb[J]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,T),y&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,x,z)})}if(d.context=T,d.props=g,d.__P=e,d.__e=!1,D=w.__r,Se=0,y){for(d.state=d.__s,d.__d=!1,D&&D(t),u=d.render(d.props,d.state,d.context),X=0;X<d._sb.length;X++)d.__h.push(d._sb[X]);d._sb=[]}else do d.__d=!1,D&&D(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++Se<25);d.state=d.__s,d.getChildContext!=null&&(r=S(S({},r),d.getChildContext())),y&&!h&&d.getSnapshotBeforeUpdate!=null&&(z=d.getSnapshotBeforeUpdate(p,x)),c=it(e,Ae(ce=u!=null&&u.type===R&&u.key==null?u.props.children:u)?ce:[ce],t,s,r,n,i,a,c,l,o),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),k&&(d.__E=d.__=null)}catch(B){if(t.__v=null,l||i!=null)if(B.then){for(t.__u|=l?160:128;c&&c.nodeType===8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else for(le=i.length;le--;)Ue(i[le]);else t.__e=s.__e,t.__k=s.__k;w.__e(B,t,s)}else i==null&&t.__v===s.__v?(t.__k=s.__k,t.__e=s.__e):c=t.__e=qt(s.__e,t,s,r,n,i,a,l,o);return(u=w.diffed)&&u(t),128&t.__u?void 0:c}function ot(e,t,s){for(var r=0;r<s.length;r++)Pe(s[r],s[++r],s[++r]);w.__c&&w.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){w.__e(i,n.__v)}})}function qt(e,t,s,r,n,i,a,c,l){var o,u,d,h,p,x,z,k=s.props,g=t.props,y=t.type;if(y==="svg"?n="http://www.w3.org/2000/svg":y==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(o=0;o<i.length;o++)if((p=i[o])&&"setAttribute"in p==!!y&&(y?p.localName===y:p.nodeType===3)){e=p,i[o]=null;break}}if(e==null){if(y===null)return document.createTextNode(g);e=document.createElementNS(n,y,g.is&&g),c&&(w.__m&&w.__m(t,i),c=!1),i=null}if(y===null)k===g||c&&e.data===g||(e.data=g);else{if(i=i&&ae.call(e.childNodes),k=s.props||O,!c&&i!=null)for(k={},o=0;o<e.attributes.length;o++)k[(p=e.attributes[o]).name]=p.value;for(o in k)if(p=k[o],o!="children"){if(o=="dangerouslySetInnerHTML")d=p;else if(!(o in g)){if(o=="value"&&"defaultValue"in g||o=="checked"&&"defaultChecked"in g)continue;K(e,o,null,p,n)}}for(o in g)p=g[o],o=="children"?h=p:o=="dangerouslySetInnerHTML"?u=p:o=="value"?x=p:o=="checked"?z=p:c&&typeof p!="function"||k[o]===p||K(e,o,p,k[o],n);if(u)c||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),it(e,Ae(h)?h:[h],t,s,r,y==="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,a,i?i[0]:s.__k&&I(s,0),c,l),i!=null)for(o=i.length;o--;)Ue(i[o]);c||(o="value",y==="progress"&&x==null?e.removeAttribute("value"):x!==void 0&&(x!==e[o]||y==="progress"&&!x||y==="option"&&x!==k[o])&&K(e,o,x,k[o],n),o="checked",z!==void 0&&z!==e[o]&&K(e,o,z,k[o],n))}return e}function Pe(e,t,s){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(n){w.__e(n,s)}}function ct(e,t,s){var r,n;if(w.unmount&&w.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Pe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){w.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&ct(r[n],t,s||typeof e.type!="function");s||Ue(e.__e),e.__c=e.__=e.__e=void 0}function Zt(e,t,s){return this.constructor(e,s)}function Lt(e,t,s){var r,n,i,a;t===document&&(t=document.documentElement),w.__&&w.__(e,t),n=(r=typeof s=="function")?null:t.__k,i=[],a=[],ze(t,e=(!r&&s||t).__k=Mt(R,null,[e]),n||O,O,t.namespaceURI,!r&&s?[s]:n?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&s?s:n?n.__e:t.firstChild,r,a),ot(i,e,a)}ae=rt.slice,w={__e:function(e,t,s,r){for(var n,i,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),a=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),a=n.__d),a)return n.__E=n}catch(c){e=c}throw e}},et=0,se.prototype.setState=function(e,t){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=S({},this.state),typeof e=="function"&&(e=e(S({},s),this.props)),e&&S(s,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ee(this))},se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ee(this))},se.prototype.render=R,E=[],tt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,he=function(e,t){return e.__v.__b-t.__v.__b},ne.__r=0,st=/(PointerCapture)$|Capture$/i,xe=0,_e=qe(!1),me=qe(!0);var It=0;function f(e,t,s,r,n,i){t||(t={});var a,c,l=t;"ref"in t&&(a=t.ref,delete t.ref);var o={type:e,props:l,key:s,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--It,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(c in a)l[c]===void 0&&(l[c]=a[c]);return w.vnode&&w.vnode(o),o}var W,A,de,Ze,ve=0,lt=[],U=w,Le=U.__b,Ie=U.__r,He=U.diffed,je=U.__c,De=U.unmount,Be=U.__;function Ce(e,t){U.__h&&U.__h(A,e,ve||t),ve=0;var s=A.__H||(A.__H={__:[],__h:[]});return e>=s.__.length&&s.__.push({}),s.__[e]}function Fe(e){return ve=1,Ht(ft,e)}function Ht(e,t,s){var r=Ce(W++,2);if(r.t=e,!r.__c&&(r.__=[ft(void 0,t),function(c){var l=r.__N?r.__N[0]:r.__[0],o=r.t(l,c);l!==o&&(r.__N=[o,r.__[1]],r.__c.setState({}))}],r.__c=A,!A.u)){var n=function(c,l,o){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!i||i.call(this,c,l,o);var d=r.__c.props!==c;return u.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),i&&i.call(this,c,l,o)||d};A.u=!0;var i=A.shouldComponentUpdate,a=A.componentWillUpdate;A.componentWillUpdate=function(c,l,o){if(this.__e){var u=i;i=void 0,n(c,l,o),i=u}a&&a.call(this,c,l,o)},A.shouldComponentUpdate=n}return r.__N||r.__}function dt(e,t){var s=Ce(W++,3);!U.__s&&ut(s.__H,t)&&(s.__=e,s.i=t,A.__H.__h.push(s))}function Ne(e,t){var s=Ce(W++,7);return ut(s.__H,t)&&(s.__=e(),s.__H=t,s.__h=e),s.__}function jt(){for(var e;e=lt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(re),e.__H.__h.forEach(be),e.__H.__h=[]}catch(t){e.__H.__h=[],U.__e(t,e.__v)}}U.__b=function(e){A=null,Le&&Le(e)},U.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Be&&Be(e,t)},U.__r=function(e){Ie&&Ie(e),W=0;var t=(A=e.__c).__H;t&&(de===A?(t.__h=[],A.__h=[],t.__.forEach(function(s){s.__N&&(s.__=s.__N),s.i=s.__N=void 0})):(t.__h.forEach(re),t.__h.forEach(be),t.__h=[],W=0)),de=A},U.diffed=function(e){He&&He(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(lt.push(t)!==1&&Ze===U.requestAnimationFrame||((Ze=U.requestAnimationFrame)||Dt)(jt)),t.__H.__.forEach(function(s){s.i&&(s.__H=s.i),s.i=void 0})),de=A=null},U.__c=function(e,t){t.some(function(s){try{s.__h.forEach(re),s.__h=s.__h.filter(function(r){return!r.__||be(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],U.__e(r,s.__v)}}),je&&je(e,t)},U.unmount=function(e){De&&De(e);var t,s=e.__c;s&&s.__H&&(s.__H.__.forEach(function(r){try{re(r)}catch(n){t=n}}),s.__H=void 0,t&&U.__e(t,s.__v))};var Ve=typeof requestAnimationFrame=="function";function Dt(e){var t,s=function(){clearTimeout(r),Ve&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(s,100);Ve&&(t=requestAnimationFrame(s))}function re(e){var t=A,s=e.__c;typeof s=="function"&&(e.__c=void 0,s()),A=t}function be(e){var t=A;e.__c=e.__(),A=t}function ut(e,t){return!e||e.length!==t.length||t.some(function(s,r){return s!==e[r]})}function ft(e,t){return typeof t=="function"?t(e):t}const Bt=e=>typeof e=="object"?e.handle.bind(e):e,pt=({service:e,fetch:t=fetch})=>async(s,r)=>{const n=new URL(s,e);return t(n,r)},Vt=(e,t)=>{let s;for(const r in t){const n=t[r];n!==null&&(s??=new Headers(e),s.has(r)||s.set(r,n))}return s??e};class L extends Error{constructor(t,{kind:s=`HTTP error ${t}`,description:r="Unspecified error description",headers:n,cause:i}={}){super(`${s} > ${r}`,{cause:i}),this.name="XRPCError",this.status=t,this.kind=s,this.description=r,this.headers=n||{}}}class ht{constructor({handler:t,proxy:s}){this.handle=Bt(t),this.proxy=s}get(t,s){return this.request({type:"get",nsid:t,...s})}call(t,s){return this.request({type:"post",nsid:t,...s})}async request(t){const s=t.data,r=`/xrpc/${t.nsid}`+Wt(t.params),n=Yt(s),i=await this.handle(r,{method:t.type,signal:t.signal,body:n?JSON.stringify(s):s,headers:Vt(t.headers,{"content-type":n?"application/json":null,"atproto-proxy":Ot(this.proxy)})}),a=i.status,c=Object.fromEntries(i.headers),l=c["content-type"];let o,u;l&&(l.startsWith("application/json")?o=i.json():l.startsWith("text/")&&(o=i.text()));try{u=await(o||i.arrayBuffer().then(d=>new Uint8Array(d)))}catch(d){throw new L(2,{cause:d,kind:"InvalidResponse",description:"Failed to parse response body",headers:c})}if(a===200)return{data:u,headers:c};throw Gt(u)?new L(a,{kind:u.error,description:u.message,headers:c}):new L(a,{headers:c})}}const Ot=e=>e?`${e.service}#${e.type}`:null,Wt=e=>{let t;for(const s in e){const r=e[s];if(r!==void 0)if(t??=new URLSearchParams,Array.isArray(r))for(let n=0,i=r.length;n<i;n++){const a=r[n];t.append(s,""+a)}else t.set(s,""+r)}return t?"?"+t.toString():""},Yt=e=>{if(typeof e!="object"||e===null)return!1;if("toJSON"in e)return!0;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},Gt=e=>{if(typeof e!="object"||e===null)return!1;const t=typeof e.error,s=typeof e.message;return(t==="undefined"||t==="string")&&(s==="undefined"||s==="string")},Q=(e,t)=>({text:e,features:e.length>0?t:void 0}),_t=(e,t)=>{if(t===void 0||t.length===0)return[Q(e,void 0)];const s=[],r=e.length;let n=0,i=0;const a=(c,l)=>{let o=c;if(e.charCodeAt(o)<128)for(o+=1,i+=1;i+8<=l&&o+8<=r;){const d=e.charCodeAt(o),h=e.charCodeAt(o+1),p=e.charCodeAt(o+2),x=e.charCodeAt(o+3),z=e.charCodeAt(o+4),k=e.charCodeAt(o+5),g=e.charCodeAt(o+6),y=e.charCodeAt(o+7);if((d|h|p|x|z|k|g|y)<128){o+=8,i+=8;continue}break}for(;i<l&&o<r;){const d=e.charCodeAt(o);d<128?(o+=1,i+=1):d<2048?(o+=1,i+=2):d<55296||d>56319?(o+=1,i+=3):(o+=2,i+=4)}return o};for(let c=0,l=t.length;c<l;c++){const o=t[c],{byteStart:u,byteEnd:d}=o.index,h=o.features;if(!(u>d||h.length===0)){if(i<u){const p=a(n,u);p>n&&s.push(Q(e.slice(n,p),void 0)),n=p}{const p=a(n,d);p>n&&s.push(Q(e.slice(n,p),h)),n=p}}}return n<r&&s.push(Q(e.slice(n),void 0)),s},Jt=/[&"<]/g,Xt=/[&<]/g;function v(e,t){const s=String(e??""),r=t?Jt:Xt;r.lastIndex=0;let n="",i=0;for(;r.test(s);){const a=r.lastIndex-1,c=s[a];n+=s.substring(i,a)+(c==="&"?"&amp;":c==='"'?"&quot;":"&lt;"),i=a+1}return n+s.substring(i)}function _(e,t,s=!1){if(t==null||!t&&s||t===""&&e==="class")return"";const n=s?"":`="${v(t,!0)}"`;return` ${e}${n}`}function Kt(e,t){const s={out:""};return e(s,t?.props??{}),{head:"",body:s.out}}function Y(e){return typeof e=="string"?e:e==null?"":e+""}const Qt="https://public.api.bsky.app",$t="!no-unauthenticated";function mt(e,t){const{children:s}=t;e.out+='<div class="bluesky-embed s-3olstj">',s(e),e.out+="</div>"}const G=e=>`https://bsky.app/profile/${e}`,oe=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,es=e=>`https://bsky.app/hashtag/${e}`,vt=(e,t)=>`https://bsky.app/profile/${e}/feed/${t}`,ts=(e,t)=>`https://bsky.app/starter-pack/${e}/${t}`,ss=(e,t)=>`https://ogcard.cdn.bsky.app/start/${e}/${t}`;let Oe=0,ue=0;const rs=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),ns=new Intl.DateTimeFormat("en-US",{dateStyle:"medium"}),is=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}),bt=e=>{const t=new Date(e),s=t.getTime();if(isNaN(s))return"N/A";const r=Date.now();if(r>ue){const n=new Date(r);n.setMonth(0,1),n.setHours(0,0,0),Oe=n.getTime(),n.setFullYear(n.getFullYear()+1,0,0),n.setHours(23,59,59,999),ue=n.getTime()}return s>=Oe&&s<=ue?is.format(t):ns.format(t)},gt=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":rs.format(t)},kt=new Intl.NumberFormat("en-US"),as=new Intl.NumberFormat("en-US",{notation:"compact"}),$=e=>e<1e3?""+e:e<1e5?kt.format(e):as.format(e),ee=e=>kt.format(e),os=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,M=e=>{const t=os.exec(e);if(!t)throw new cs(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};let cs=class extends Error{};const ls=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null};function ds(e,t){const{embed:s}=t,r=s.external,n=ls(r.uri)?.host;e.out+=`<a target="_blank"${_("href",n&&r.uri)} rel="noopener noreferrer nofollow" class="external-embed s-rtbqd8">`,r.thumb&&(e.out+=`<img loading="lazy"${_("src",r.thumb)} alt="" class="thumbnail s-rtbqd8">`),e.out+=` <div class="meta s-rtbqd8"><p class="title s-rtbqd8">${v(r.title)}</p> <p class="description s-rtbqd8">${v(r.description)}</p> `,n&&(e.out+=`<div class="domain s-rtbqd8"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="m4.172 8.07 3.94 2.957.977-1.941 3.887-.978 1.15-4.6M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-6.078 4.865.973-1.946-2.869-1.928-1.89-.12-1.08 1.075 1.947 2.919h2.919Z"></path></svg> <span class="domain-name">${v(n)}</span></div>`),e.out+="</div></a>"}function us(e,t){const{embed:s}=t,r=s.creator,n=vt(r.did,M(s.uri).rkey);e.out+=`<a target="_blank"${_("href",n)} class="feed-embed s-156tlwp"><div class="main s-156tlwp"><div class="avatar-wrapper s-156tlwp">`,s.avatar?e.out+=`<img loading="lazy"${_("src",s.avatar)} alt="" class="avatar s-156tlwp">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-156tlwp"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-156tlwp">${v(s.displayName)}</p> <p class="creator s-156tlwp">Feed by @${v(r.handle)}</p></div></div> <p class="description s-156tlwp">${v(s.description)}</p></a>`}function F(e,t){e.out+=`<img loading="lazy"${_("src",t.thumb)}${_("alt",t.alt)} class="image s-t3k6fc">`}function ge(e,t){const{embed:s,borderless:r,standalone:n}=t,i=s.images,a=i.length;if(e.out+=`<div${_("class",`${Y("image-embed"+(r?"":" is-bordered")+(n&&a===1?" is-aligned":""))} s-t3k6fc`)}>`,a===4)e.out+='<div class="grid s-t3k6fc"><div class="col s-t3k6fc"><div class="item wide s-t3k6fc">',F(e,i[0]),e.out+='</div> <div class="item wide s-t3k6fc">',F(e,i[1]),e.out+='</div></div> <div class="col s-t3k6fc"><div class="item wide s-t3k6fc">',F(e,i[2]),e.out+='</div> <div class="item wide s-t3k6fc">',F(e,i[3]),e.out+="</div></div></div>";else if(a===3)e.out+='<div class="grid s-t3k6fc"><div class="col square s-t3k6fc"><div class="item s-t3k6fc">',F(e,i[0]),e.out+='</div></div> <div class="col square s-t3k6fc"><div class="item s-t3k6fc">',F(e,i[1]),e.out+='</div> <div class="item s-t3k6fc">',F(e,i[2]),e.out+="</div></div></div>";else if(a===2)e.out+='<div class="grid s-t3k6fc"><div class="col s-t3k6fc"><div class="item square s-t3k6fc">',F(e,i[0]),e.out+='</div></div> <div class="col s-t3k6fc"><div class="item square s-t3k6fc">',F(e,i[1]),e.out+="</div></div></div>";else if(a===1){const c=i[0],l=n&&c.aspectRatio;e.out+=`<div${_("class",`${Y("single-item"+(l?" is-standalone":""))} s-t3k6fc`)}${_("style",l?`aspect-ratio: ${l.width}/${l.height}`:"")}>`,F(e,c),e.out+=" ",l&&(e.out+='<div class="placeholder s-t3k6fc"></div>'),e.out+="</div>"}e.out+="</div>"}const fs=e=>{switch(e){case"app.bsky.graph.defs#curatelist":return"User list";case"app.bsky.graph.defs#modlist":return"Moderation list"}return"Unknown list"};function ps(e,t){const{embed:s}=t,r=s.creator,n=vt(r.did,M(s.uri).rkey);e.out+=`<a target="_blank"${_("href",n)} class="list-embed s-6uize5"><div class="main s-6uize5"><div class="avatar-wrapper s-6uize5">`,s.avatar?e.out+=`<img loading="lazy"${_("src",s.avatar)} alt="" class="avatar s-6uize5">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-6uize5"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-6uize5">${v(s.name)}</p> <p class="creator s-6uize5">${v(fs(s.purpose))} by @${v(r.handle)}</p></div></div> <p class="description s-6uize5">${v(s.description)}</p></a>`}function ke(e,t){const{post:s,embed:r,borderless:n=!1,standalone:i=!1}=t,a=i&&r.aspectRatio,c=s&&oe(s.author.did,M(s.uri).rkey);function l(o){o.out+=`<img loading="lazy"${_("src",r.thumbnail)} alt="" class="thumbnail s-1azk58e"> `,a&&(o.out+='<div class="placeholder s-1azk58e"></div>'),o.out+=' <div class="play s-1azk58e"><svg class="icon s-1azk58e" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M22 12 5 2v20l17-10Z"></path></svg></div>'}i?(e.out+=`<a target="_blank"${_("href",c)}${_("class",`${Y("video-embed"+(n?"":" is-bordered")+(i?" is-standalone":""))} s-1azk58e`)}><div class="constrainer s-1azk58e"${_("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e),e.out+="</div></a>"):(e.out+=`<div${_("class",`${Y("video-embed"+(n?"":" is-bordered"))} s-1azk58e`)}${_("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e),e.out+="</div>")}const yt=e=>{if(e){if(e.$type==="app.bsky.embed.images#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return yt(e.media)}},wt=e=>{if(e){if(e.$type==="app.bsky.embed.video#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return wt(e.media)}};function hs(e,t){const{embed:s,large:r=!1}=t,n=s.value,i=n.text.trim(),a=s.author,c=a.displayName?.trim(),l=s.embeds?.[0],o=yt(l),u=wt(l),d=oe(a.did,M(s.uri).rkey);e.out+=`<a target="_blank"${_("href",d)} class="quote-embed s-za6fip"><div class="meta s-za6fip"><div class="avatar-wrapper s-za6fip">`,a.avatar&&(e.out+=`<img loading="lazy"${_("src",a.avatar)} alt="" class="avatar s-za6fip">`),e.out+='</div> <span class="name-wrapper s-za6fip">',c&&(e.out+=`<bdi class="display-name-wrapper s-za6fip"><span class="display-name s-za6fip">${v(c)}</span></bdi>`),e.out+=` <span class="handle s-za6fip">@${v(a.handle)}</span></span> <span aria-hidden="true" class="dot s-za6fip">·</span> <time${_("datetime",n.createdAt)} class="date s-za6fip">${v(bt(n.createdAt))}</time></div> `,i?(e.out+='<div class="body s-za6fip">',r||(o?(e.out+='<div class="aside s-za6fip">',ge(e,{embed:o}),e.out+="</div>"):u&&(e.out+='<div class="aside s-za6fip">',ke(e,{embed:u}),e.out+="</div>")),e.out+=` <p class="text s-za6fip">${v(i)}</p></div>`):e.out+='<div class="divide s-za6fip"></div>',e.out+=" ",(r||!i)&&(o?ge(e,{embed:o,borderless:!0}):u&&ke(e,{embed:u,borderless:!0})),e.out+="</a>"}function _s(e,t){const{embed:s,large:r=!1}=t,n=s.record,i=s.creator,a=i.did,c=M(s.uri).rkey,l=ts(a,c);if(e.out+=`<a target="_blank"${_("href",l)} class="starterpack-embed s-15v965v">`,r){const o=ss(a,c);e.out+=`<img loading="lazy"${_("src",o)} alt="" class="banner s-15v965v">`}e.out+=` <div class="meta s-15v965v"><div class="main s-15v965v"><svg fill="none" viewBox="0 0 24 24" class="avatar s-15v965v"><defs><linearGradient id="a" x1="0" x2="100%" y1="0" y2="0" gradientTransform="rotate(45)"><stop offset="0" stop-color="#0A7AFF"></stop><stop offset="1" stop-color="#59B9FF"></stop></linearGradient></defs><path fill="url(#a)" fill-rule="evenodd" d="M11.26 5.227 5.02 6.899c-.734.197-1.17.95-.973 1.685l1.672 6.24c.197.734.951 1.17 1.685.973l6.24-1.672a1.376 1.376 0 0 0 .973-1.685L12.945 6.2a1.375 1.375 0 0 0-1.685-.973Zm-6.566.459a2.632 2.632 0 0 0-1.86 3.223l1.672 6.24a2.632 2.632 0 0 0 3.223 1.861l6.24-1.672a2.631 2.631 0 0 0 1.861-3.223l-1.672-6.24a2.632 2.632 0 0 0-3.223-1.861l-6.24 1.672Z" clip-rule="evenodd"></path><path fill="url(#a)" fill-rule="evenodd" d="M15.138 18.411a4.606 4.606 0 1 0 0-9.211 4.606 4.606 0 0 0 0 9.211Zm0 1.257a5.862 5.862 0 1 0 0-11.724 5.862 5.862 0 0 0 0 11.724Z" clip-rule="evenodd"></path></svg> <div class="info"><p class="name s-15v965v">${v(n.name)}</p> <p class="creator s-15v965v">Starter pack by @${v(i.handle)}</p></div></div> <p class="description s-15v965v">${v(n.description)}</p></div></a>`}function We(e,t){e.out+=`<div class="message s-azdpbr">${v(t)}</div>`}const ms=e=>{switch(e){case"app.bsky.feed.post":return"post";case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";case"app.bsky.graph.starterpack":return"starter pack";case"app.bsky.labeler.service":return"labeler"}return null};function xt(e,t){const{post:s,embed:r,large:n=!1}=t;function i(c,l){l.$type==="app.bsky.embed.external#view"?ds(c,{embed:l}):l.$type==="app.bsky.embed.images#view"?ge(c,{embed:l,standalone:!0}):l.$type==="app.bsky.embed.video#view"?ke(c,{post:s,embed:l,standalone:!0}):We(c,"Unsupported media embed")}function a(c,l){const o=l.record;if(o.$type==="app.bsky.embed.record#viewRecord")hs(c,{embed:o,large:n});else if(o.$type==="app.bsky.feed.defs#generatorView")us(c,{embed:o});else if(o.$type==="app.bsky.graph.defs#listView")ps(c,{embed:o});else if(o.$type==="app.bsky.graph.defs#starterPackViewBasic")_s(c,{embed:o,large:n});else{const u=M(o.uri),d=ms(u.collection),h=d&&(o.$type==="app.bsky.embed.record#viewNotFound"||o.$type==="app.bsky.embed.record#viewBlocked"||o.$type==="app.bsky.embed.record#viewDetached");We(c,h?`This ${d} is unavailable`:"Unsupported record embed")}}e.out+='<div class="embeds s-azdpbr">',r.$type==="app.bsky.embed.recordWithMedia#view"?(i(e,r.media),e.out+=" ",a(e,r.record)):r.$type==="app.bsky.embed.record#view"?a(e,r):i(e,r),e.out+="</div>"}const vs=e=>e?.find(t=>t.$type==="app.bsky.richtext.facet#link"||t.$type==="app.bsky.richtext.facet#mention"||t.$type==="app.bsky.richtext.facet#tag");function At(e,t){const{text:s,facets:r,large:n}=t,i=_t(s,r);e.out+=`<p${_("class",`${Y("rich-text"+(n?" is-large":" is-small"))} s-1lecfnd`)}>`;for(let a=0,c=i.length;a<c;a++){let l=i[a];const o=vs(l.features);o?o.$type==="app.bsky.richtext.facet#link"?e.out+=`<a target="_blank"${_("href",o.uri)} rel="noopener nofollow" class="link s-1lecfnd">${v(l.text)}</a>`:o.$type==="app.bsky.richtext.facet#mention"?e.out+=`<a target="_blank"${_("href",G(o.did))} class="mention s-1lecfnd">${v(l.text)}</a>`:o.$type==="app.bsky.richtext.facet#tag"&&(e.out+=`<a target="_blank"${_("href",es(o.tag))} class="hashtag s-1lecfnd">${v(l.text)}</a>`):e.out+=v(l.text)}e.out+="</p>"}function bs(e,t){const{post:s,parent:r,prev:n=!1}=t,i=s.author,a=G(i.did),c=i.displayName?.trim(),l=s.record,o=oe(i.did,M(s.uri).rkey),u=s.replyCount||0,d=s.likeCount||0,h=(s.repostCount||0)+(s.quoteCount||0);if(e.out+=`<div class="highlighted-post s-hik11q"><div class="meta s-hik11q"><a${_("href",a)} target="_blank" class="avatar-wrapper s-hik11q">`,i.avatar&&(e.out+=`<img loading="lazy"${_("src",i.avatar)} class="avatar s-hik11q">`),e.out+=`</a> <a${_("href",a)} target="_blank" class="name-wrapper s-hik11q">`,c&&(e.out+=`<bdi class="display-name-wrapper s-hik11q"><span class="display-name s-hik11q">${v(c)}</span></bdi>`),e.out+=` <span class="handle s-hik11q">@${v(i.handle)}</span></a> `,n||(e.out+='<svg class="logo s-hik11q" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg>'),e.out+="</div> ",!n&&l.reply){if(e.out+='<p class="context s-hik11q">',r){const p=r.author;e.out+=`Replying to <a target="_blank"${_("href",G(p.did))} dir="auto" class="s-hik11q">${v(p.displayName?.trim()||`@${p.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",At(e,{text:l.text,facets:l.facets,large:!0}),e.out+=" ",s.embed&&xt(e,{post:s,embed:s.embed,large:!0}),e.out+=` <time${_("datetime",l.createdAt)} class="date s-hik11q">${v(gt(l.createdAt))}</time> <div class="stats s-hik11q"><span class="stat s-hik11q"${_("title",d===1?`${ee(d)} like`:`${ee(d)} likes`)}><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M12 5.768c6.162-6.25 16.725 5.358 0 14.732C-4.725 11.126 5.838-.482 12 5.768Z"></path></svg> <span>${v($(d))}</span></span> <span class="stat s-hik11q"${_("title",h===1?`${ee(h)} repost`:`${ee(h)} reposts`)}><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="m17 3 3 3-3 3M7 21l-3-3 3-3m-2 3h15v-5M4 11V6h15"></path></svg> <span>${v($(h))}</span></span> <div class="gap s-hik11q"></div> <a${_("href",o)} target="_blank" class="permalink s-hik11q"><span>${v(u?u===1?`Read ${$(u)} reply on Bluesky`:`Read ${$(u)} replies on Bluesky`:"View on Bluesky")}</span></a></div></div>`}function gs(e,t){const{post:s,parent:r,prev:n}=t,i=s.author,a=G(i.did),c=i.displayName?.trim(),l=s.record,o=oe(i.did,M(s.uri).rkey);if(e.out+='<div class="post s-12mzi62">',n||(e.out+='<svg class="logo s-12mzi62" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg>'),e.out+=` <div class="aside s-12mzi62"><a target="_blank"${_("href",a)} class="avatar-wrapper s-12mzi62">`,i.avatar&&(e.out+=`<img loading="lazy"${_("src",i.avatar)} alt="" class="avatar s-12mzi62">`),e.out+=`</a> <div class="line s-12mzi62"></div></div> <div class="main s-12mzi62"><div class="meta s-12mzi62"><a${_("href",a)} target="_blank" class="name-wrapper s-12mzi62">`,c&&(e.out+=`<bdi class="display-name-wrapper s-12mzi62"><span class="display-name s-12mzi62">${v(c)}</span></bdi>`),e.out+=` <span class="handle s-12mzi62">@${v(i.handle)}</span></a> <span aria-hidden="true" class="dot s-12mzi62">·</span> <a target="_blank"${_("href",o)}${_("title",gt(l.createdAt))} class="date s-12mzi62"><time${_("datetime",l.createdAt)}>${v(bt(l.createdAt))}</time></a></div> `,!n&&l.reply){if(e.out+='<p class="context s-12mzi62">',r){const u=r.author;e.out+=`Replying to <a target="_blank"${_("href",G(u.did))} dir="auto" class="s-12mzi62">${v(u.displayName?.trim()||`@${u.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",At(e,{text:l.text,facets:l.facets}),e.out+=" ",s.embed&&xt(e,{post:s,embed:s.embed}),e.out+="</div></div>"}function Ye(e,t){mt(e,{children:s=>{s.out+=`<div class="message s-1q9cbx0">${v(t)}</div>`}})}const ks=(e,t,s)=>{const r=[];let n=0,i=t?1:2,a=e;for(;a&&!(a.$type==="app.bsky.feed.defs#notFoundPost"||a.$type==="app.bsky.feed.defs#blockedPost");){const c=a.post;if(n!==0&&(r[n-1].parent=c),++n>i)break;const l=c.author;if(!s&&l.labels?.some(o=>o.val==="!no-unauthenticated"))break;r.push({post:c,parent:null}),a=a.parent}return r.reverse()};function ys(e,t){const{thread:s,contextless:r,allowUnauthenticated:n}=t,i=!n&&s!==null&&s.$type==="app.bsky.feed.defs#threadViewPost"&&s.post.author.labels?.some(a=>a.val===$t);if(s===null)Ye(e,"The post can't be found, it may have been deleted.");else if(i)Ye(e,"The author has requested for their posts to not be displayed on external sites.");else{const a=ks(s,r,n);mt(e,{children:c=>{const l=a;for(let o=0,u=l.length;o<u;o++){let{post:d,parent:h}=l[o];const p=o!==0;o===a.length-1?bs(c,{post:d,parent:h,prev:p}):gs(c,{post:d,parent:h,prev:p})}}})}}const ws=async e=>{const t=new ht({handler:pt({service:e.serviceUri??Qt})}),s=e.contextless??!1,{data:r}=await t.get("app.bsky.feed.getPostThread",{signal:e.signal,params:{uri:e.uri,parentHeight:s?1:2,depth:0}}).catch(i=>i instanceof L&&i.kind==="NotFound"?{data:null}:Promise.reject(i));return{thread:r?.thread.$type==="app.bsky.feed.defs#threadViewPost"?r.thread:null,contextless:s,allowUnauthenticated:e.allowUnauthenticated??!1}},xs=e=>Kt(ys,{props:e}).body,As=/[&"<]/g,Us=/[&<]/g;function b(e,t){const s=String(e??""),r=t?As:Us;r.lastIndex=0;let n="",i=0;for(;r.test(s);){const a=r.lastIndex-1,c=s[a];n+=s.substring(i,a)+(c==="&"?"&amp;":c==='"'?"&quot;":"&lt;"),i=a+1}return n+s.substring(i)}function m(e,t,s=!1){if(t==null||!t&&s||t===""&&e==="class")return"";const n=s?"":`="${b(t,!0)}"`;return` ${e}${n}`}function zs(e,t){const s={out:""};return e(s,t?.props??{}),{head:"",body:s.out}}function H(e){return typeof e=="string"?e:e==null?"":e+""}const Ps="https://public.api.bsky.app",Ge="!no-unauthenticated";function Ut(e,t){const{children:s}=t;e.out+='<div class="bluesky-embed s-1pz15a1">',s(e),e.out+="</div>"}const V=e=>`https://bsky.app/profile/${e}`,Te=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,Cs=e=>`https://bsky.app/hashtag/${e}`,zt=(e,t)=>`https://bsky.app/profile/${e}/feed/${t}`,Fs=(e,t)=>`https://bsky.app/starter-pack/${e}/${t}`,Ns=(e,t)=>`https://ogcard.cdn.bsky.app/start/${e}/${t}`;let Je=0,fe=0;const Ts=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),Ss=new Intl.DateTimeFormat("en-US",{dateStyle:"medium"}),Ms=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}),Pt=e=>{const t=new Date(e),s=t.getTime();if(isNaN(s))return"N/A";const r=Date.now();if(r>fe){const n=new Date(r);n.setMonth(0,1),n.setHours(0,0,0),Je=n.getTime(),n.setFullYear(n.getFullYear()+1,0,0),n.setHours(23,59,59,999),fe=n.getTime()}return s>=Je&&s<=fe?Ms.format(t):Ss.format(t)},Es=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":Ts.format(t)},Rs=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,q=e=>{const t=Rs.exec(e);if(!t)throw new qs(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};let qs=class extends Error{};const Ct=new Intl.NumberFormat("en-US"),Zs=new Intl.NumberFormat("en-US",{notation:"compact"}),pe=e=>e<1e3?""+e:e<1e5?Ct.format(e):Zs.format(e),Z=e=>Ct.format(e),Ls=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null};function Is(e,t){const{embed:s}=t,r=s.external,n=Ls(r.uri)?.host;e.out+=`<a target="_blank"${m("href",n&&r.uri)} rel="noopener noreferrer nofollow" class="external-embed s-au8a8u">`,r.thumb&&(e.out+=`<img loading="lazy"${m("src",r.thumb)} alt="" class="thumbnail s-au8a8u">`),e.out+=` <div class="meta s-au8a8u"><p class="title s-au8a8u">${b(r.title)}</p> <p class="description s-au8a8u">${b(r.description)}</p> `,n&&(e.out+=`<div class="domain s-au8a8u"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="m4.172 8.07 3.94 2.957.977-1.941 3.887-.978 1.15-4.6M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-6.078 4.865.973-1.946-2.869-1.928-1.89-.12-1.08 1.075 1.947 2.919h2.919Z"></path></svg> <span class="domain-name">${b(n)}</span></div>`),e.out+="</div></a>"}function Hs(e,t){const{embed:s}=t,r=s.creator,n=zt(r.did,q(s.uri).rkey);e.out+=`<a target="_blank"${m("href",n)} class="feed-embed s-1c1phtf"><div class="main s-1c1phtf"><div class="avatar-wrapper s-1c1phtf">`,s.avatar?e.out+=`<img loading="lazy"${m("src",s.avatar)} alt="" class="avatar s-1c1phtf">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-1c1phtf"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-1c1phtf">${b(s.displayName)}</p> <p class="creator s-1c1phtf">Feed by @${b(r.handle)}</p></div></div> <p class="description s-1c1phtf">${b(s.description)}</p></a>`}function N(e,t){e.out+=`<img loading="lazy"${m("src",t.thumb)}${m("alt",t.alt)} class="image s-1d339cy">`}function ye(e,t){const{embed:s,borderless:r,standalone:n}=t,i=s.images,a=i.length;if(e.out+=`<div${m("class",`${H("image-embed"+(r?"":" is-bordered")+(n&&a===1?" is-aligned":""))} s-1d339cy`)}>`,a===4)e.out+='<div class="grid s-1d339cy"><div class="col s-1d339cy"><div class="item wide s-1d339cy">',N(e,i[0]),e.out+='</div> <div class="item wide s-1d339cy">',N(e,i[1]),e.out+='</div></div> <div class="col s-1d339cy"><div class="item wide s-1d339cy">',N(e,i[2]),e.out+='</div> <div class="item wide s-1d339cy">',N(e,i[3]),e.out+="</div></div></div>";else if(a===3)e.out+='<div class="grid s-1d339cy"><div class="col square s-1d339cy"><div class="item s-1d339cy">',N(e,i[0]),e.out+='</div></div> <div class="col square s-1d339cy"><div class="item s-1d339cy">',N(e,i[1]),e.out+='</div> <div class="item s-1d339cy">',N(e,i[2]),e.out+="</div></div></div>";else if(a===2)e.out+='<div class="grid s-1d339cy"><div class="col s-1d339cy"><div class="item square s-1d339cy">',N(e,i[0]),e.out+='</div></div> <div class="col s-1d339cy"><div class="item square s-1d339cy">',N(e,i[1]),e.out+="</div></div></div>";else if(a===1){const c=i[0],l=n&&c.aspectRatio;e.out+=`<div${m("class",`${H("single-item"+(l?" is-standalone":""))} s-1d339cy`)}${m("style",l?`aspect-ratio: ${l.width}/${l.height}`:"")}>`,N(e,c),e.out+=" ",l&&(e.out+='<div class="placeholder s-1d339cy"></div>'),e.out+="</div>"}e.out+="</div>"}const js=e=>{switch(e){case"app.bsky.graph.defs#curatelist":return"User list";case"app.bsky.graph.defs#modlist":return"Moderation list"}return"Unknown list"};function Ds(e,t){const{embed:s}=t,r=s.creator,n=zt(r.did,q(s.uri).rkey);e.out+=`<a target="_blank"${m("href",n)} class="list-embed s-1mo1e33"><div class="main s-1mo1e33"><div class="avatar-wrapper s-1mo1e33">`,s.avatar?e.out+=`<img loading="lazy"${m("src",s.avatar)} alt="" class="avatar s-1mo1e33">`:e.out+='<svg viewBox="0 0 32 32" class="avatar s-1mo1e33"><path fill="#0070FF" d="M0 0h32v32H0z"></path><path fill="#fff" d="M22.153 22.354a9.328 9.328 0 0 0 3.837-.491 3.076 3.076 0 0 0-4.802-2.79m.965 3.281a6.128 6.128 0 0 0-.965-3.28Zm-11.342-3.28a3.077 3.077 0 0 0-4.801 2.79 9.21 9.21 0 0 0 3.835.49m.966-3.28a6.127 6.127 0 0 0-.966 3.28Zm8.265-8.997a3.076 3.076 0 1 1-6.153 0 3.076 3.076 0 0 1 6.153 0Zm6.154 3.077a2.307 2.307 0 1 1-4.615 0 2.307 2.307 0 0 1 4.615 0Zm-13.847 0a2.307 2.307 0 1 1-4.614 0 2.307 2.307 0 0 1 4.614 0Z"></path><path fill="#fff" d="M22 22c0 3.314-2.686 3.5-6 3.5s-6-.186-6-3.5a6 6 0 0 1 12 0Z"></path></svg>',e.out+=`</div> <div class="info"><p class="name s-1mo1e33">${b(s.name)}</p> <p class="creator s-1mo1e33">${b(js(s.purpose))} by @${b(r.handle)}</p></div></div> <p class="description s-1mo1e33">${b(s.description)}</p></a>`}function we(e,t){const{post:s,embed:r,borderless:n=!1,standalone:i=!1}=t,a=i&&r.aspectRatio,c=s&&Te(s.author.did,q(s.uri).rkey);function l(o){o.out+=`<img loading="lazy"${m("src",r.thumbnail)} alt="" class="thumbnail s-1h3cnsw"> `,a&&(o.out+='<div class="placeholder s-1h3cnsw"></div>'),o.out+=' <div class="play s-1h3cnsw"><svg class="icon s-1h3cnsw" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M22 12 5 2v20l17-10Z"></path></svg></div>'}i?(e.out+=`<a target="_blank"${m("href",c)}${m("class",`${H("video-embed"+(n?"":" is-bordered")+(i?" is-standalone":""))} s-1h3cnsw`)}><div class="constrainer s-1h3cnsw"${m("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e),e.out+="</div></a>"):(e.out+=`<div${m("class",`${H("video-embed"+(n?"":" is-bordered"))} s-1h3cnsw`)}${m("style",a?`aspect-ratio: ${a.width}/${a.height}`:"")}>`,l(e),e.out+="</div>")}const Ft=e=>{if(e){if(e.$type==="app.bsky.embed.images#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return Ft(e.media)}},Nt=e=>{if(e){if(e.$type==="app.bsky.embed.video#view")return e;if(e.$type==="app.bsky.embed.recordWithMedia#view")return Nt(e.media)}};function Bs(e,t){const{embed:s,large:r=!1}=t,n=s.value,i=n.text.trim(),a=s.author,c=a.displayName?.trim(),l=s.embeds?.[0],o=Ft(l),u=Nt(l),d=Te(a.did,q(s.uri).rkey);e.out+=`<a target="_blank"${m("href",d)} class="quote-embed s-vbjlyj"><div class="meta s-vbjlyj"><div class="avatar-wrapper s-vbjlyj">`,a.avatar&&(e.out+=`<img loading="lazy"${m("src",a.avatar)} alt="" class="avatar s-vbjlyj">`),e.out+='</div> <span class="name-wrapper s-vbjlyj">',c&&(e.out+=`<bdi class="display-name-wrapper s-vbjlyj"><span class="display-name s-vbjlyj">${b(c)}</span></bdi>`),e.out+=` <span class="handle s-vbjlyj">@${b(a.handle)}</span></span> <span aria-hidden="true" class="dot s-vbjlyj">·</span> <time${m("datetime",n.createdAt)} class="date s-vbjlyj">${b(Pt(n.createdAt))}</time></div> `,i?(e.out+='<div class="body s-vbjlyj">',r||(o?(e.out+='<div class="aside s-vbjlyj">',ye(e,{embed:o}),e.out+="</div>"):u&&(e.out+='<div class="aside s-vbjlyj">',we(e,{embed:u}),e.out+="</div>")),e.out+=` <p class="text s-vbjlyj">${b(i)}</p></div>`):e.out+='<div class="divide s-vbjlyj"></div>',e.out+=" ",(r||!i)&&(o?ye(e,{embed:o,borderless:!0}):u&&we(e,{embed:u,borderless:!0})),e.out+="</a>"}function Vs(e,t){const{embed:s,large:r=!1}=t,n=s.record,i=s.creator,a=i.did,c=q(s.uri).rkey,l=Fs(a,c);if(e.out+=`<a target="_blank"${m("href",l)} class="starterpack-embed s-whpa2l">`,r){const o=Ns(a,c);e.out+=`<img loading="lazy"${m("src",o)} alt="" class="banner s-whpa2l">`}e.out+=` <div class="meta s-whpa2l"><div class="main s-whpa2l"><svg fill="none" viewBox="0 0 24 24" class="avatar s-whpa2l"><defs><linearGradient id="a" x1="0" x2="100%" y1="0" y2="0" gradientTransform="rotate(45)"><stop offset="0" stop-color="#0A7AFF"></stop><stop offset="1" stop-color="#59B9FF"></stop></linearGradient></defs><path fill="url(#a)" fill-rule="evenodd" d="M11.26 5.227 5.02 6.899c-.734.197-1.17.95-.973 1.685l1.672 6.24c.197.734.951 1.17 1.685.973l6.24-1.672a1.376 1.376 0 0 0 .973-1.685L12.945 6.2a1.375 1.375 0 0 0-1.685-.973Zm-6.566.459a2.632 2.632 0 0 0-1.86 3.223l1.672 6.24a2.632 2.632 0 0 0 3.223 1.861l6.24-1.672a2.631 2.631 0 0 0 1.861-3.223l-1.672-6.24a2.632 2.632 0 0 0-3.223-1.861l-6.24 1.672Z" clip-rule="evenodd"></path><path fill="url(#a)" fill-rule="evenodd" d="M15.138 18.411a4.606 4.606 0 1 0 0-9.211 4.606 4.606 0 0 0 0 9.211Zm0 1.257a5.862 5.862 0 1 0 0-11.724 5.862 5.862 0 0 0 0 11.724Z" clip-rule="evenodd"></path></svg> <div class="info"><p class="name s-whpa2l">${b(n.name)}</p> <p class="creator s-whpa2l">Starter pack by @${b(i.handle)}</p></div></div> <p class="description s-whpa2l">${b(n.description)}</p></div></a>`}function Xe(e,t){e.out+=`<div class="message s-1nks9gp">${b(t)}</div>`}const Os=e=>{switch(e){case"app.bsky.feed.post":return"post";case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";case"app.bsky.graph.starterpack":return"starter pack";case"app.bsky.labeler.service":return"labeler"}return null};function Ws(e,t){const{post:s,embed:r,large:n=!1}=t;function i(c,l){l.$type==="app.bsky.embed.external#view"?Is(c,{embed:l}):l.$type==="app.bsky.embed.images#view"?ye(c,{embed:l,standalone:!0}):l.$type==="app.bsky.embed.video#view"?we(c,{post:s,embed:l,standalone:!0}):Xe(c,"Unsupported media embed")}function a(c,l){const o=l.record;if(o.$type==="app.bsky.embed.record#viewRecord")Bs(c,{embed:o,large:n});else if(o.$type==="app.bsky.feed.defs#generatorView")Hs(c,{embed:o});else if(o.$type==="app.bsky.graph.defs#listView")Ds(c,{embed:o});else if(o.$type==="app.bsky.graph.defs#starterPackViewBasic")Vs(c,{embed:o,large:n});else{const u=q(o.uri),d=Os(u.collection),h=d&&(o.$type==="app.bsky.embed.record#viewNotFound"||o.$type==="app.bsky.embed.record#viewBlocked"||o.$type==="app.bsky.embed.record#viewDetached");Xe(c,h?`This ${d} is unavailable`:"Unsupported record embed")}}e.out+='<div class="embeds s-1nks9gp">',r.$type==="app.bsky.embed.recordWithMedia#view"?(i(e,r.media),e.out+=" ",a(e,r.record)):r.$type==="app.bsky.embed.record#view"?a(e,r):i(e,r),e.out+="</div>"}const Ys=e=>e?.find(t=>t.$type==="app.bsky.richtext.facet#link"||t.$type==="app.bsky.richtext.facet#mention"||t.$type==="app.bsky.richtext.facet#tag");function Gs(e,t){const{text:s,facets:r,large:n}=t,i=_t(s,r);e.out+=`<p${m("class",`${H("rich-text"+(n?" is-large":" is-small"))} s-10xqaeb`)}>`;for(let a=0,c=i.length;a<c;a++){let l=i[a];const o=Ys(l.features);o?o.$type==="app.bsky.richtext.facet#link"?e.out+=`<a target="_blank"${m("href",o.uri)} rel="noopener nofollow" class="link s-10xqaeb">${b(l.text)}</a>`:o.$type==="app.bsky.richtext.facet#mention"?e.out+=`<a target="_blank"${m("href",V(o.did))} class="mention s-10xqaeb">${b(l.text)}</a>`:o.$type==="app.bsky.richtext.facet#tag"&&(e.out+=`<a target="_blank"${m("href",Cs(o.tag))} class="hashtag s-10xqaeb">${b(l.text)}</a>`):e.out+=b(l.text)}e.out+="</p>"}function Js(e,t){const{item:s,prev:r=!1,next:n=!1}=t,i=s.reason,a=s.post,c=s.reply?.parent,l=a.author,o=V(l.did),u=l.displayName?.trim(),d=a.record,h=Te(l.did,q(a.uri).rkey),p=a.replyCount||0,x=a.likeCount||0,z=(a.repostCount||0)+(a.quoteCount||0);if(e.out+=`<div${m("class",`${H("feed-post"+(n?"":" is-leaf"))} s-1c3lek9`)}><div class="contexts s-1c3lek9">`,r&&(e.out+='<div class="ascendant-line-wrapper s-1c3lek9"><div class="line s-1c3lek9"></div></div>'),e.out+=" ",i)if(i.$type==="app.bsky.feed.defs#reasonRepost"){const k=i.by;e.out+=`<div class="context s-1c3lek9"><div class="aside s-1c3lek9"><svg class="icon" viewBox="0 0 24 24" fill="none"><path d="M17 3L20 6L17 9M7 21L4 18L7 15M5 18H20V13M4 11V6H19" stroke="currentColor" stroke-width="2" stroke-linecap="square"></path></svg></div> <a${m("href",V(k.did))} class="main s-1c3lek9"><span dir="auto" class="name s-1c3lek9">${b(k.displayName)}</span> <span class="affix s-1c3lek9"> reposted</span></a></div>`}else i.$type==="app.bsky.feed.defs#reasonPin"&&(e.out+='<div class="context s-1c3lek9"><div class="aside s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="M12 15H5v-2.5l.377-.377A7.25 7.25 0 0 0 7.5 6.997V3h9v3.997a7.25 7.25 0 0 0 2.123 5.127L19 12.5V15h-7Zm0 0v6"></path></svg></div> <span class="flex min-w-0">Pinned</span></div>');if(e.out+=`</div> <div class="content s-1c3lek9"><div class="aside s-1c3lek9"><a target="_blank"${m("href",o)} class="avatar-wrapper s-1c3lek9">`,l.avatar&&(e.out+=`<img loading="lazy"${m("src",l.avatar)} alt="" class="avatar s-1c3lek9">`),e.out+="</a> ",n&&(e.out+='<div class="descendant-line s-1c3lek9"></div>'),e.out+=`</div> <div class="main s-1c3lek9"><div class="meta s-1c3lek9"><a${m("href",o)} target="_blank" class="name-wrapper s-1c3lek9">`,u&&(e.out+=`<bdi class="display-name-wrapper s-1c3lek9"><span class="display-name s-1c3lek9">${b(u)}</span></bdi>`),e.out+=` <span class="handle s-1c3lek9">@${b(l.handle)}</span></a> <span aria-hidden="true" class="dot s-1c3lek9">·</span> <a target="_blank"${m("href",h)}${m("title",Es(d.createdAt))} class="date s-1c3lek9"><time${m("datetime",d.createdAt)}>${b(Pt(d.createdAt))}</time></a></div> `,!r&&d.reply){if(e.out+='<p class="reply-context s-1c3lek9">',c&&c.$type==="app.bsky.feed.defs#postView"){const k=c.author;e.out+=`Replying to <a target="_blank"${m("href",V(k.did))} dir="auto" class="s-1c3lek9">${b(k.displayName?.trim()||`@${k.handle}`)}</a>`}else e.out+="Replying to an unknown post";e.out+="</p>"}e.out+=" ",Gs(e,{text:d.text,facets:d.facets}),e.out+=" ",a.embed&&Ws(e,{post:a,embed:a.embed}),e.out+=` <div class="metrics s-1c3lek9"><div${m("title",p===1?`${Z(p)} reply`:`${Z(p)} replies`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="M3.002 4h18v14h-9l-5 3v-3h-4V4Z"></path></svg> <span class="count s-1c3lek9">${b(pe(p))}</span></div> <div${m("title",z===1?`${Z(z)} repost`:`${Z(z)} reposts`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="square" stroke-width="2" d="m17 3 3 3-3 3M7 21l-3-3 3-3m-2 3h15v-5M4 11V6h15"></path></svg> <span class="count s-1c3lek9">${b(pe(z))}</span></div> <div${m("title",x===1?`${Z(x)} like`:`${Z(x)} likes`)} class="stat s-1c3lek9"><svg class="icon" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M12 5.768c6.162-6.25 16.725 5.358 0 14.732C-4.725 11.126 5.838-.482 12 5.768Z"></path></svg> <span class="count s-1c3lek9">${b(pe(x))}</span></div></div></div></div></div>`}function Xs(e,t){const{profile:s}=t;e.out+=`<div class="profile-feed-header s-1xh30xs"><a target="_blank"${m("href",V(s.did))} class="title s-1xh30xs">Posts from @${b(s.handle)}</a> <svg class="logo s-1xh30xs" fill="none" viewBox="0 0 320 286"><path fill="#0A7AFF" d="M69.364 19.146c36.687 27.806 76.147 84.186 90.636 114.439 14.489-30.253 53.948-86.633 90.636-114.439C277.107-.917 320-16.44 320 32.957c0 9.865-5.603 82.875-8.889 94.729-11.423 41.208-53.045 51.719-90.071 45.357 64.719 11.12 81.182 47.953 45.627 84.785-80 82.874-106.667-44.333-106.667-44.333s-26.667 127.207-106.667 44.333c-35.555-36.832-19.092-73.665 45.627-84.785-37.026 6.362-78.648-4.149-90.071-45.357C5.603 115.832 0 42.822 0 32.957 0-16.44 42.893-.917 69.364 19.147Z"></path></svg></div>`}function Ke(e,t){Ut(e,{children:s=>{s.out+=`<div class="message s-f12rvk">${b(t)}</div>`}})}function Ks(e,t){const{profile:s,feed:r,allowUnauthenticated:n}=t,i=!n&&s?.labels?.some(c=>c.val===Ge),a=r.filter(c=>{if(!s)return!1;const l=c.reason;if(l){if(l.$type==="app.bsky.feed.defs#reasonPin")return!0;if(l.$type==="app.bsky.feed.defs#reasonRepost"){const o=c.post.author;return o.did!==s.did?n||!o.labels?.some(u=>u.val===Ge):!0}return!1}return!c.reply});s===null?Ke(e,"The profile can't be found, it may have been deleted."):i?Ke(e,"The user has requested for their posts to not be displayed on external sites."):Ut(e,{children:c=>{if(Xs(c,{profile:s}),c.out+=" ",a.length>0){const l=a;c.out+='<div class="feed s-f12rvk">';for(let o=0,u=l.length;o<u;o++){let d=l[o];Js(c,{item:d})}c.out+=' <div class="end-marker s-f12rvk"><div class="dot s-f12rvk"></div></div></div>'}else c.out+='<div class="message s-f12rvk">This user has not made any posts.</div>'}})}const Qs=async e=>{const t=e.actor,s=e.allowUnauthenticated??!1,r=new ht({handler:pt({service:e.serviceUri??Ps})}),[{data:n},{data:i}]=await Promise.all([r.get("app.bsky.actor.getProfile",{signal:e.signal,params:{actor:t}}).catch(a=>a instanceof L&&a.kind==="InvalidRequest"&&a.description==="Profile not found"?{data:null}:Promise.reject(a)),r.get("app.bsky.feed.getAuthorFeed",{signal:e.signal,params:{actor:t,includePins:e.includePins,limit:30,filter:"posts_and_author_threads"}}).catch(a=>a instanceof L&&a.kind==="InvalidRequest"&&a.description==="Profile not found"?{data:{feed:[]}}:Promise.reject(a))]);return{profile:n,feed:i.feed,allowUnauthenticated:s}},$s=e=>zs(Ks,{props:e}).body,er=(e,t)=>`https://bsky.app/profile/${e}/post/${t}`,tr=new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short"}),sr=e=>{const t=new Date(e);return isNaN(t.getTime())?"N/A":tr.format(t)},rr=/^at:\/\/((?:did:[a-zA-Z0-9._:%-]+)|(?:[a-zA-Z0-9][a-zA-Z0-9-.]*))(?:\/([a-zA-Z0-9.-]+)(?:\/([a-zA-Z0-9_~.:-]{1,512}))?)?\/?(?:\?([^#\s]*))?(?:#([^\s]*))?$/,nr=e=>{const t=rr.exec(e);if(!t)throw new ir(`invalid at-uri: ${e}`);return{repo:t[1],collection:t[2]??"",rkey:t[3]??"",query:t[4]??"",fragment:t[5]??""}};class ir extends Error{}const P=e=>e.replace(/[<"&]/g,t=>"&#"+t.charCodeAt(0)+";"),ar=/^(?!\.{1,2}$)[a-zA-Z0-9_~.:-]{1,512}$/,or=e=>e.length>=1&&e.length<=512&&ar.test(e),cr=/^did:([a-z]+):([a-zA-Z0-9._:%-]*[a-zA-Z0-9._-])$/,lr=e=>e.length>=7&&e.length<=2048&&cr.test(e),dr=/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/,ur=e=>e.length>=3&&e.length<=253&&dr.test(e),Qe=e=>lr(e)||ur(e),fr=({data:e})=>{const t=Ne(()=>xs(e),[e]);return f("bluesky-post",{src:e.thread?.post.uri,dangerouslySetInnerHTML:{__html:t}})},pr=({data:e})=>{const t=Ne(()=>$s(e),[e]);return f("bluesky-profile-feed",{actor:e.profile?.did,dangerouslySetInnerHTML:{__html:t}})},ie=({code:e})=>f("div",{class:"code-block",children:[f("pre",{children:f("code",{children:e})}),f("div",{class:"actions",children:f("button",{title:"Copy",onClick:()=>{navigator.clipboard.writeText(e).catch(()=>alert("Failed to copy to clipboard"))},class:"copy-button",children:f("svg",{fill:"none",viewBox:"0 0 24 24",children:f("path",{stroke:"currentColor","stroke-linecap":"square","stroke-width":"2",d:"M15 5h4v16H5V5h4m0-2h6v4H9V3Z"})})})})]}),$e="https://bsky.app/profile/did:plc:ragtjsm2j2vknwkz3zp4oxrd/post/3kj2umze7zj2n",hr=()=>{const[e,t]=Fe(""),s=Ne(()=>wr(e||$e),[e]);return f("div",{class:"app",children:[f("h1",{class:"header",children:f("code",{children:"<bluesky-embed>"})}),f("label",{class:"input-wrapper",children:[f("span",{class:"label",children:"Bluesky post or profile URL"}),f("input",{type:"url",placeholder:$e,value:e,onInput:r=>t(r.currentTarget.value),class:"text-input"})]}),s?s.type==="post"?f(_r,{matched:s},e):s.type==="profile"?f(br,{matched:s},e):null:f("main",{class:"main",children:f("div",{class:"alert",children:"Invalid URL, did you type it correctly?"})}),f("footer",{class:"footer",children:[f("span",{children:["made with ❤️ by ",f("a",{href:"https://bsky.app/profile/did:plc:ia76kvnndjutgedggx2ibrem",children:"@mary.my.id"})]}),f("span",{"aria-hidden":"true",children:" · "}),f("span",{children:f("a",{href:"https://github.com/mary-ext/bluesky-embed",children:"source code"})}),f("span",{"aria-hidden":"true",children:" · "}),f("span",{children:"MIT License"})]})]})},Tt=()=>f("svg",{viewBox:"0 0 32 32",class:"circular-spinner",children:[f("circle",{cx:"16",cy:"16",fill:"none",r:"14","stroke-width":"4",class:"background"}),f("circle",{cx:"16",cy:"16",fill:"none",r:"14","stroke-width":"4","stroke-dasharray":"80px","stroke-dashoffset":"60px",class:"accented"})]}),_r=({matched:e})=>{const[t,s]=Fe();return dt(()=>{if(t)return;const r=new AbortController,n=r.signal;return ws({uri:`at://${e.author}/app.bsky.feed.post/${e.rkey}`,signal:n,contextless:!1}).then(a=>{n.aborted||s({ok:!0,data:a})},a=>{n.aborted||s({ok:!1,message:""+a})}),()=>r.abort()},[e,t]),f("main",{class:"main",children:t?t.ok?f(R,{children:[f(fr,{data:t.data}),t.data.thread?f("div",{class:"guide",children:[f("h4",{class:"guide-header",children:"How do I embed this to my website?"}),f("div",{class:"inform",children:["Doing server-side rendering? Check out examples for"," ",f("a",{href:"https://github.com/mary-ext/bluesky-embed-astro",children:"Astro"})," and"," ",f("a",{href:"https://github.com/mary-ext/bluesky-embed-sveltekit",children:"SvelteKit"}),"."]}),f("ol",{class:"guide-instructions",children:[f("li",{children:[f("p",{children:["Insert the following scripts and stylesheets to the ",f("code",{children:"<head>"})," of your website."]}),f(ie,{code:mr()})]}),f("li",{children:[f("p",{children:"Insert the following markup in wherever you want the post to be."}),f(ie,{code:vr(t.data.thread.post)})]})]})]}):null]}):f("div",{class:"alert",children:t.message}):f(Tt,{})})},mr=()=>{const e="https://cdn.jsdelivr.net/npm/bluesky-post-embed@^1.0.0";return`<!-- Core web component and styling --> 2 + <script type="module" src="${e}/+esm"><\/script> 3 + <link rel="stylesheet" href="${e}/dist/core.min.css"> 4 + 5 + <!-- Built-in themes --> 6 + <link rel="stylesheet" href="${e}/themes/light.min.css" media="(prefers-color-scheme: light)"> 7 + <link rel="stylesheet" href="${e}/themes/dim.min.css" media="(prefers-color-scheme: dark)"> 8 + 9 + <!-- Fallback/placeholder elements if JS script is taking a while to load or is failing --> 10 + <style> 11 + .bluesky-post-fallback { 12 + margin: 16px 0; 13 + border-left: 3px solid var(--divider); 14 + padding: 4px 8px; 15 + white-space: pre-wrap; 16 + overflow-wrap: break-word; 17 + } 18 + .bluesky-post-fallback p { 19 + margin: 0 0 8px 0; 20 + } 21 + </style> 22 + `},vr=e=>{const t=e.author,s=e.record;return`<bluesky-post src="${P(e.uri)}"> 23 + <blockquote class="bluesky-post-fallback"> 24 + <p dir="auto">${P(s.text)}</p> 25 + — ${t.displayName?.trim()?`${P(t.displayName)} (@${P(t.handle)})`:`@${P(t.handle)}`} 26 + <a href="${P(er(t.did,nr(e.uri).rkey))}">${sr(e.indexedAt)}</a> 27 + </blockquote> 28 + </bluesky-post> 29 + `},br=({matched:e})=>{const[t,s]=Fe();return dt(()=>{if(t)return;const r=new AbortController,n=r.signal;return Qs({actor:e.actor,signal:n,includePins:!0}).then(a=>{n.aborted||s({ok:!0,data:a})},a=>{n.aborted||s({ok:!1,message:""+a})}),()=>r.abort()},[e,t]),f("main",{class:"main",children:t?t.ok?f(R,{children:[f(pr,{data:t.data}),t.data.profile?f("div",{class:"guide",children:[f("h4",{class:"guide-header",children:"How do I embed this to my website?"}),f("div",{class:"inform",children:["Doing server-side rendering? Check out examples for"," ",f("a",{href:"https://github.com/mary-ext/bluesky-embed-astro",children:"Astro"})," and"," ",f("a",{href:"https://github.com/mary-ext/bluesky-embed-sveltekit",children:"SvelteKit"}),"."]}),f("ol",{class:"guide-instructions",children:[f("li",{children:[f("p",{children:["Insert the following scripts and stylesheets to the ",f("code",{children:"<head>"})," of your website."]}),f(ie,{code:gr()})]}),f("li",{children:[f("p",{children:"Insert the following markup in wherever you want the profile feed to be."}),f(ie,{code:kr(t.data.profile)})]})]})]}):null]}):f("div",{class:"alert",children:t.message}):f(Tt,{})})},gr=()=>{const e="https://cdn.jsdelivr.net/npm/bluesky-profile-feed-embed@^1.0.0";return`<!-- Core web component and styling --> 30 + <script type="module" src="${e}/+esm"><\/script> 31 + <link rel="stylesheet" href="${e}/dist/core.min.css"> 32 + 33 + <!-- Built-in themes --> 34 + <link rel="stylesheet" href="${e}/themes/light.min.css" media="(prefers-color-scheme: light)"> 35 + <link rel="stylesheet" href="${e}/themes/dim.min.css" media="(prefers-color-scheme: dark)"> 36 + `},kr=e=>{const t=`https://bsky.app/profile/${e.did}`;return`<bluesky-profile-feed actor="${P(e.did)}" include-pins> 37 + <a target="_blank" href="${P(t)}" class="bluesky-profile-feed-fallback"> 38 + ${e.displayName?.trim()?`Posts by ${P(e.displayName)} (@${P(e.handle)})`:`Posts by @${P(e.handle)}`} 39 + </a> 40 + </bluesky-profile-feed> 41 + `},yr=e=>{let t;if("parse"in URL)t=URL.parse(e);else try{t=new URL(e)}catch{}return t&&(t.protocol==="https:"||t.protocol==="http:")?t:null},wr=e=>{const t=yr(e);if(!t)return null;let s;if(t.host==="bsky.app"||t.host==="staging.bsky.app"||t.host==="main.bsky.dev"){if(s=/^\/profile\/([^/]+)\/post\/([^/]+)\/?$/.exec(t.pathname))return!Qe(s[1])||!or(s[2])?null:{type:"post",author:s[1],rkey:s[2]};if(s=/^\/profile\/([^/]+)\/?$/.exec(t.pathname))return Qe(s[1])?{type:"profile",actor:s[1]}:null}return null};Lt(f(hr,{}),document.body);
+1 -1
index.html
··· 4 4 <meta charset="utf-8" /> 5 5 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 6 6 <title>Bluesky embed</title> 7 - <script type="module" crossorigin src="./assets/index-DDUttTaL.js"></script> 7 + <script type="module" crossorigin src="./assets/index-jW3IhGIV.js"></script> 8 8 <link rel="stylesheet" crossorigin href="./assets/index-C-FSbVJg.css"> 9 9 </head> 10 10 <body>