@yourusername@example.com
)","activitypub"),{code:(0,l.createElement)("code",null)})),(0,l.createElement)("div",{className:"activitypub-dialog__button-group"},(0,l.createElement)("label",{htmlFor:"remote-profile",className:"screen-reader-text"},(0,s.__)("Enter your ActivityPub profile","activitypub")),(0,l.createElement)("input",{type:"text",id:"remote-profile",value:N,onKeyDown:e=>{"Enter"===e?.code&&$()},onChange:e=>I(e.target.value),"aria-invalid":b===v}),(0,l.createElement)(d.Button,{onClick:$,"aria-label":(0,s.__)("Submit profile","activitypub")},(0,l.createElement)(x,{icon:a}),b)),i&&(0,l.createElement)("div",{className:"activitypub-dialog__remember"},(0,l.createElement)(d.CheckboxControl,{checked:R,label:(0,s.__)("Remember me for easier comments","activitypub"),onChange:()=>{U(!R)}}))))}const{namespace:I}=window._activityPubOptions,R={avatar:"",webfinger:"@well@hello.dolly",name:(0,s.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function U(e){if(!e)return R;const t={...R,...e};return t.avatar=t?.icon?.url,t}function P({profile:e,popupStyles:t,userId:r}){const{webfinger:o,avatar:n,name:i}=e,a=o.startsWith("@")?o:`@${o}`;return(0,l.createElement)("div",{className:"activitypub-profile"},(0,l.createElement)("img",{className:"activitypub-profile__avatar",src:n,alt:i}),(0,l.createElement)("div",{className:"activitypub-profile__content"},(0,l.createElement)("div",{className:"activitypub-profile__name"},i),(0,l.createElement)("div",{className:"activitypub-profile__handle",title:a},a)),(0,l.createElement)($,{profile:e,popupStyles:t,userId:r}))}function $({profile:e,popupStyles:t,userId:r}){const[o,n]=(0,m.useState)(!1),i=(0,s.sprintf)((0,s.__)("Follow %s","activitypub"),e?.name);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(d.Button,{className:"activitypub-profile__follow",onClick:()=>n(!0),"aria-haspopup":"dialog","aria-expanded":o,"aria-label":(0,s.__)("Follow me on the Fediverse","activitypub")},(0,s.__)("Follow","activitypub")),o&&(0,l.createElement)(d.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>n(!1),title:i,"aria-label":i,role:"dialog"},(0,l.createElement)(T,{profile:e,userId:r}),(0,l.createElement)("style",null,t)))}function T({profile:e,userId:t}){const{webfinger:r}=e,o=(0,s.__)("Follow","activitypub"),n=`/${I}/actors/${t}/remote-follow?resource=`,i=(0,s.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub"),a=r.startsWith("@")?r:`@${r}`;return(0,l.createElement)(N,{actionText:o,copyDescription:i,handle:a,resourceUrl:n})}function j({selectedUser:e,style:t,backgroundColor:r,id:o,useId:n=!1,profileData:i=!1}){const[a,c]=(0,m.useState)(U()),s="site"===e?0:e,u=function(e){return h(".apfmd__button-group .components-button",_(e?.elements?.link?.color?.text)||"#111","#fff",_(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),p=n?{id:o}:{};function d(e){c(U(e))}return(0,m.useEffect)((()=>{if(i)return d(i);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${I}/actors/${e}`};return y()(t)})(s).then(d)}),[s,i]),(0,l.createElement)("div",{...p},(0,l.createElement)(g,{selector:`#${o}`,style:t,backgroundColor:r}),(0,l.createElement)(P,{profile:a,userId:s,popupStyles:u}))}const F=window._activityPubOptions?.enabled;function B({name:e}){const t=F?.site?"":(0,s.__)("It will be empty in other non-author contexts.","activitypub"),r=(0,s.sprintf)(/* translators: %1$s: block name, %2$s: extra information for non-author context */ /* translators: %1$s: block name, %2$s: extra information for non-author context */
-(0,s.__)("This %1$s block will adapt to the page it is on, displaying the user profile associated with a post author (in a loop) or a user archive. %2$s","activitypub"),e,t).trim();return(0,l.createElement)(d.Card,null,(0,l.createElement)(d.CardBody,null,(0,m.createInterpolateElement)(r,{strong:(0,l.createElement)("strong",null)})))}(0,o.registerBlockType)("activitypub/follow-me",{edit:function({attributes:e,setAttributes:t,context:{postType:r,postId:o}}){const n=(0,c.useBlockProps)({className:"activitypub-follow-me-block-wrapper"}),i=function({withInherit:e=!1}){const t=v?.users?(0,u.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,m.useMemo)((()=>{if(!t)return[];const r=[];return v?.site&&r.push({label:(0,s.__)("Site","activitypub"),value:"site"}),e&&v?.users&&r.push({label:(0,s.__)("Dynamic User","activitypub"),value:"inherit"}),t.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),r)}),[t])}({withInherit:!0}),{selectedUser:a}=e,f="inherit"===a,y=(0,u.useSelect)((e=>{const{getEditedEntityRecord:t}=e(p.store),n=t("postType",r,o)?.author;return null!=n?n:null}),[r,o]);return(0,m.useEffect)((()=>{i.length&&(i.find((({value:e})=>e===a))||t({selectedUser:i[0].value}))}),[a,i]),(0,l.createElement)("div",{...n},i.length>1&&(0,l.createElement)(c.InspectorControls,{key:"setting"},(0,l.createElement)(d.PanelBody,{title:(0,s.__)("Followers Options","activitypub")},(0,l.createElement)(d.SelectControl,{label:(0,s.__)("Select User","activitypub"),value:e.selectedUser,options:i,onChange:e=>t({selectedUser:e})}))),f?y?(0,l.createElement)(j,{...e,id:n.id,selectedUser:y}):(0,l.createElement)(B,{name:(0,s.__)("Follow Me","activitypub")}):(0,l.createElement)(j,{...e,id:n.id}))},save:()=>null,icon:a})},20:(e,t,r)=>{var o=r(609),n=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},s=null,u=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,o)&&!l.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:u,props:c,_owner:a.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,r,n,i)=>{if(!r){var a=1/0;for(u=0;u@yourusername@example.com
)","activitypub"),{code:(0,a.createElement)("code",null)})),(0,a.createElement)("div",{className:"activitypub-dialog__button-group"},(0,a.createElement)("label",{htmlFor:"remote-profile",className:"screen-reader-text"},(0,c.__)("Enter your ActivityPub profile","activitypub")),(0,a.createElement)("input",{type:"text",id:"remote-profile",value:T,onKeyDown:e=>{"Enter"===e?.code&&$()},onChange:e=>N(e.target.value),"aria-invalid":y===b}),(0,a.createElement)(p.Button,{onClick:$,"aria-label":(0,c.__)("Submit profile","activitypub")},(0,a.createElement)(S,{icon:i}),y)),r&&(0,a.createElement)("div",{className:"activitypub-dialog__remember"},(0,a.createElement)(p.CheckboxControl,{checked:z,label:(0,c.__)("Remember me for easier comments","activitypub"),onChange:()=>{I(!z)}}))))}const{namespace:T}=window._activityPubOptions,N={avatar:"",webfinger:"@well@hello.dolly",name:(0,c.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function z(e){if(!e)return N;const t={...N,...e};return t.avatar=t?.icon?.url,t}function I({profile:e,popupStyles:t,userId:o,buttonText:l,buttonOnly:n,buttonSize:i}){const{webfinger:r,avatar:c,name:u}=e,s=r.startsWith("@")?r:`@${r}`;return n?(0,a.createElement)("div",{className:"activitypub-profile"},(0,a.createElement)(U,{profile:e,popupStyles:t,userId:o,buttonText:l,buttonSize:i})):(0,a.createElement)("div",{className:"activitypub-profile"},(0,a.createElement)("img",{className:"activitypub-profile__avatar",src:c,alt:u}),(0,a.createElement)("div",{className:"activitypub-profile__content"},(0,a.createElement)("div",{className:"activitypub-profile__name"},u),(0,a.createElement)("div",{className:"activitypub-profile__handle",title:s},s)),(0,a.createElement)(U,{profile:e,popupStyles:t,userId:o,buttonText:l,buttonSize:i}))}function U({profile:e,popupStyles:t,userId:o,buttonText:l,buttonSize:n}){const[i,r]=(0,m.useState)(!1),u=(0,c.sprintf)((0,c.__)("Follow %s","activitypub"),e?.name);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.Button,{className:"activitypub-profile__follow",onClick:()=>r(!0),"aria-haspopup":"dialog","aria-expanded":i,"aria-label":(0,c.__)("Follow me on the Fediverse","activitypub"),size:n},l),i&&(0,a.createElement)(p.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>r(!1),title:u,"aria-label":u,role:"dialog"},(0,a.createElement)($,{profile:e,userId:o}),(0,a.createElement)("style",null,t)))}function $({profile:e,userId:t}){const{webfinger:o}=e,l=(0,c.__)("Follow","activitypub"),n=`/${T}/actors/${t}/remote-follow?resource=`,i=(0,c.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub"),r=o.startsWith("@")?o:`@${o}`;return(0,a.createElement)(O,{actionText:l,copyDescription:i,handle:r,resourceUrl:n})}function P({selectedUser:e,style:t,backgroundColor:o,id:l,useId:n=!1,profileData:i=!1,buttonOnly:r=!1,buttonText:u=(0,c.__)("Follow","activitypub"),buttonSize:s="default"}){const[p,d]=(0,m.useState)(z()),b="site"===e?0:e,f=function(e){return h(".apfmd__button-group .components-button",y(e?.elements?.link?.color?.text)||"#111","#fff",y(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),_=n?{id:l}:{};return(0,m.useEffect)((()=>{i?d(z(i)):function(e){const t={headers:{Accept:"application/activity+json"},path:`/${T}/actors/${e}`};return v()(t)}(b).then((e=>{d(z(e))}))}),[b,i]),(0,a.createElement)("div",{..._,className:"activitypub-follow-me-block-wrapper"},(0,a.createElement)(w,{selector:`#${l}`,style:t,backgroundColor:o}),(0,a.createElement)(I,{profile:p,userId:b,popupStyles:f,buttonText:u,buttonOnly:r,buttonSize:s}))}const R=window._activityPubOptions?.enabled;function B({name:e}){const t=R?.site?"":(0,c.__)("It will be empty in other non-author contexts.","activitypub"),o=(0,c.sprintf)(/* translators: %1$s: block name, %2$s: extra information for non-author context */ /* translators: %1$s: block name, %2$s: extra information for non-author context */
+(0,c.__)("This %1$s block will adapt to the page it is on, displaying the user profile associated with a post author (in a loop) or a user archive. %2$s","activitypub"),e,t).trim();return(0,a.createElement)(p.Card,null,(0,a.createElement)(p.CardBody,null,(0,m.createInterpolateElement)(o,{strong:(0,a.createElement)("strong",null)})))}(0,l.registerBlockType)("activitypub/follow-me",{edit:function({attributes:e,setAttributes:t,context:{postType:o,postId:l}}){const n=(0,r.useBlockProps)({className:"activitypub-follow-me-block-wrapper"}),i=function({withInherit:e=!1}){const t=d?.users?(0,u.useSelect)((e=>e("core").getUsers({who:"authors"}))):[];return(0,m.useMemo)((()=>{if(!t)return[];const o=[];return d?.site&&o.push({label:(0,c.__)("Site","activitypub"),value:"site"}),e&&d?.users&&o.push({label:(0,c.__)("Dynamic User","activitypub"),value:"inherit"}),t.reduce(((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e)),o)}),[t])}({withInherit:!0}),{selectedUser:b,buttonOnly:v,buttonText:f,buttonSize:y}=e,_="inherit"===b,h=(0,u.useSelect)((e=>{const{getEditedEntityRecord:t}=e(s.store),a=t("postType",o,l)?.author;return null!=a?a:null}),[o,l]);return(0,m.useEffect)((()=>{i.length&&(i.find((({value:e})=>e===b))||t({selectedUser:i[0].value}))}),[b,i]),(0,a.createElement)("div",{...n},(0,a.createElement)(r.InspectorControls,{key:"activitypub-follow-me"},(0,a.createElement)(p.PanelBody,{title:(0,c.__)("Follow Me Options","activitypub")},i.length>1&&(0,a.createElement)(p.SelectControl,{label:(0,c.__)("Select User","activitypub"),value:e.selectedUser,options:i,onChange:e=>t({selectedUser:e})}),(0,a.createElement)(p.ToggleControl,{label:(0,c.__)("Button Only Mode","activitypub"),checked:v,onChange:e=>t({buttonOnly:e}),help:(0,c.__)("Only show the follow button without profile information","activitypub")}),(0,a.createElement)(p.TextControl,{label:(0,c.__)("Button Text","activitypub"),value:f,onChange:e=>t({buttonText:e})}),(0,a.createElement)(p.SelectControl,{label:(0,c.__)("Button Size","activitypub"),value:y,options:[{label:(0,c.__)("Default","activitypub"),value:"default"},{label:(0,c.__)("Compact","activitypub"),value:"compact"},{label:(0,c.__)("Small","activitypub"),value:"small"}],onChange:e=>t({buttonSize:e}),help:(0,c.__)("Choose the size of the follow button","activitypub")}))),_?h?(0,a.createElement)(P,{...e,id:n.id,selectedUser:h}):(0,a.createElement)(B,{name:(0,c.__)("Follow Me","activitypub")}):(0,a.createElement)(P,{...e,id:n.id}))},save:()=>null,icon:i})}},o={};function l(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,l),n.exports}l.m=t,e=[],l.O=(t,o,a,n)=>{if(!o){var i=1/0;for(s=0;s@yourusername@example.com
)","activitypub"),{code:(0,o.createElement)("code",null)})),(0,o.createElement)("div",{className:"activitypub-dialog__button-group"},(0,o.createElement)("label",{htmlFor:"remote-profile",className:"screen-reader-text"},(0,u.__)("Enter your ActivityPub profile","activitypub")),(0,o.createElement)("input",{type:"text",id:"remote-profile",value:C,onKeyDown:e=>{"Enter"===e?.code&&j()},onChange:e=>R(e.target.value),"aria-invalid":y===v}),(0,o.createElement)(s.Button,{onClick:j,"aria-label":(0,u.__)("Submit profile","activitypub")},(0,o.createElement)(h,{icon:g}),y)),l&&(0,o.createElement)("div",{className:"activitypub-dialog__remember"},(0,o.createElement)(s.CheckboxControl,{checked:I,label:(0,u.__)("Remember me for easier comments","activitypub"),onChange:()=>{$(!I)}}))))}const{namespace:O}=window._activityPubOptions,N={avatar:"",webfinger:"@well@hello.dolly",name:(0,u.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function C(e){if(!e)return N;const t={...N,...e};return t.avatar=t?.icon?.url,t}function R({profile:e,popupStyles:t,userId:r}){const{webfinger:a,avatar:n,name:i}=e,l=a.startsWith("@")?a:`@${a}`;return(0,o.createElement)("div",{className:"activitypub-profile"},(0,o.createElement)("img",{className:"activitypub-profile__avatar",src:n,alt:i}),(0,o.createElement)("div",{className:"activitypub-profile__content"},(0,o.createElement)("div",{className:"activitypub-profile__name"},i),(0,o.createElement)("div",{className:"activitypub-profile__handle",title:l},l)),(0,o.createElement)(I,{profile:e,popupStyles:t,userId:r}))}function I({profile:e,popupStyles:t,userId:r}){const[n,i]=(0,a.useState)(!1),l=(0,u.sprintf)((0,u.__)("Follow %s","activitypub"),e?.name);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.Button,{className:"activitypub-profile__follow",onClick:()=>i(!0),"aria-haspopup":"dialog","aria-expanded":n,"aria-label":(0,u.__)("Follow me on the Fediverse","activitypub")},(0,u.__)("Follow","activitypub")),n&&(0,o.createElement)(s.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>i(!1),title:l,"aria-label":l,role:"dialog"},(0,o.createElement)($,{profile:e,userId:r}),(0,o.createElement)("style",null,t)))}function $({profile:e,userId:t}){const{webfinger:r}=e,a=(0,u.__)("Follow","activitypub"),n=`/${O}/actors/${t}/remote-follow?resource=`,i=(0,u.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub"),l=r.startsWith("@")?r:`@${r}`;return(0,o.createElement)(S,{actionText:a,copyDescription:i,handle:l,resourceUrl:n})}function P({selectedUser:e,style:t,backgroundColor:r,id:n,useId:i=!1,profileData:l=!1}){const[s,u]=(0,a.useState)(C()),p="site"===e?0:e,m=function(e){return v(".apfmd__button-group .components-button",d(e?.elements?.link?.color?.text)||"#111","#fff",d(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),y=i?{id:n}:{};function b(e){u(C(e))}return(0,a.useEffect)((()=>{if(l)return b(l);(function(e){const t={headers:{Accept:"application/activity+json"},path:`/${O}/actors/${e}`};return c()(t)})(p).then(b)}),[p,l]),(0,o.createElement)("div",{...y},(0,o.createElement)(f,{selector:`#${n}`,style:t,backgroundColor:r}),(0,o.createElement)(R,{profile:s,userId:p,popupStyles:m}))}let j=1;i()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follow-me-block-wrapper"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,a.createRoot)(e).render((0,o.createElement)(P,{...t,id:"activitypub-follow-me-block-"+j++,useId:!0}))}))}))},20:(e,t,r)=>{var o=r(609),a=Symbol.for("react.element"),n=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},s=null,u=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)n.call(t,o)&&!l.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:a,type:e,key:s,ref:u,props:c,_owner:i.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,e=[],o.O=(t,r,a,n)=>{if(!r){var i=1/0;for(u=0;u@yourusername@example.com
)","activitypub"),{code:(0,r.createElement)("code",null)})),(0,r.createElement)("div",{className:"activitypub-dialog__button-group"},(0,r.createElement)("label",{htmlFor:"remote-profile",className:"screen-reader-text"},(0,s.__)("Enter your ActivityPub profile","activitypub")),(0,r.createElement)("input",{type:"text",id:"remote-profile",value:C,onKeyDown:e=>{"Enter"===e?.code&&$()},onChange:e=>R(e.target.value),"aria-invalid":f===v}),(0,r.createElement)(u.Button,{onClick:$,"aria-label":(0,s.__)("Submit profile","activitypub")},(0,r.createElement)(w,{icon:h}),f)),i&&(0,r.createElement)("div",{className:"activitypub-dialog__remember"},(0,r.createElement)(u.CheckboxControl,{checked:T,label:(0,s.__)("Remember me for easier comments","activitypub"),onChange:()=>{z(!T)}}))))}const{namespace:S}=window._activityPubOptions,N={avatar:"",webfinger:"@well@hello.dolly",name:(0,s.__)("Hello Dolly Fan Account","activitypub"),url:"#"};function O(e){if(!e)return N;const t={...N,...e};return t.avatar=t?.icon?.url,t}function C({profile:e,popupStyles:t,userId:o,buttonText:a,buttonOnly:l,buttonSize:n}){const{webfinger:i,avatar:c,name:u}=e,s=i.startsWith("@")?i:`@${i}`;return l?(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)(R,{profile:e,popupStyles:t,userId:o,buttonText:a,buttonSize:n})):(0,r.createElement)("div",{className:"activitypub-profile"},(0,r.createElement)("img",{className:"activitypub-profile__avatar",src:c,alt:u}),(0,r.createElement)("div",{className:"activitypub-profile__content"},(0,r.createElement)("div",{className:"activitypub-profile__name"},u),(0,r.createElement)("div",{className:"activitypub-profile__handle",title:s},s)),(0,r.createElement)(R,{profile:e,popupStyles:t,userId:o,buttonText:a,buttonSize:n}))}function R({profile:e,popupStyles:t,userId:o,buttonText:l,buttonSize:n}){const[i,c]=(0,a.useState)(!1),p=(0,s.sprintf)((0,s.__)("Follow %s","activitypub"),e?.name);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Button,{className:"activitypub-profile__follow",onClick:()=>c(!0),"aria-haspopup":"dialog","aria-expanded":i,"aria-label":(0,s.__)("Follow me on the Fediverse","activitypub"),size:n},l),i&&(0,r.createElement)(u.Modal,{className:"activitypub-profile__confirm activitypub__modal",onRequestClose:()=>c(!1),title:p,"aria-label":p,role:"dialog"},(0,r.createElement)(T,{profile:e,userId:o}),(0,r.createElement)("style",null,t)))}function T({profile:e,userId:t}){const{webfinger:o}=e,a=(0,s.__)("Follow","activitypub"),l=`/${S}/actors/${t}/remote-follow?resource=`,n=(0,s.__)("Copy and paste my profile into the search field of your favorite fediverse app or server.","activitypub"),i=o.startsWith("@")?o:`@${o}`;return(0,r.createElement)(x,{actionText:a,copyDescription:n,handle:i,resourceUrl:l})}function z({selectedUser:e,style:t,backgroundColor:o,id:l,useId:n=!1,profileData:i=!1,buttonOnly:u=!1,buttonText:p=(0,s.__)("Follow","activitypub"),buttonSize:d="default"}){const[f,y]=(0,a.useState)(O()),_="site"===e?0:e,w=function(e){return v(".apfmd__button-group .components-button",m(e?.elements?.link?.color?.text)||"#111","#fff",m(e?.elements?.link?.[":hover"]?.color?.text)||"#333")}(t),h=n?{id:l}:{};return(0,a.useEffect)((()=>{i?y(O(i)):function(e){const t={headers:{Accept:"application/activity+json"},path:`/${S}/actors/${e}`};return c()(t)}(_).then((e=>{y(O(e))}))}),[_,i]),(0,r.createElement)("div",{...h,className:"activitypub-follow-me-block-wrapper"},(0,r.createElement)(b,{selector:`#${l}`,style:t,backgroundColor:o}),(0,r.createElement)(C,{profile:f,userId:_,popupStyles:w,buttonText:p,buttonOnly:u,buttonSize:d}))}let I=1;n()((()=>{[].forEach.call(document.querySelectorAll(".activitypub-follow-me-block-wrapper"),(e=>{const t=JSON.parse(e.dataset.attrs);(0,a.createRoot)(e).render((0,r.createElement)(z,{...t,id:"activitypub-follow-me-block-"+I++,useId:!0}))}))}))}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var l=o[e]={exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,o,a,l)=>{if(!o){var n=1/0;for(s=0;s