@atproto/oauth-provider-ui 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{r as a,p as R,j as n,h as b0,T as d,u as w,B as c0,A as C0,i as t0,f as E0,C as V0,g as S0}from"./admonition-PcOMNxHc.js";import{Y as o0,k as N0,l as H0,L as k0,m as v0,O as F0,n as R0,o as _0,D as z0,p as P0,e as L0,_ as I0,H as T0,M as $0,s as U,$ as O0,S as B0,b as D,a0 as u0,U as U0,V as q0,W as D0,c as W0,N as G0,B as K0}from"./button-cooldown-Cek48u1l.js";import{e as Y0}from"./error-view-BzJJuW_V.js";const Q0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M219.23,159.2a196.66,196.66,0,0,0-18-31.2,196.66,196.66,0,0,0,18-31.2c11.84-26.31,11.69-47.48-.43-59.6s-33.29-12.27-59.6-.43a196.66,196.66,0,0,0-31.2,18,196.66,196.66,0,0,0-31.2-18c-26.31-11.84-47.48-11.69-59.6.43s-12.27,33.29-.43,59.6a196.66,196.66,0,0,0,18,31.2,196.66,196.66,0,0,0-18,31.2c-11.84,26.31-11.69,47.48.43,59.6h0C43.33,224.93,51.78,228,62,228c10,0,21.77-2.92,34.76-8.77a196.66,196.66,0,0,0,31.2-18,196.66,196.66,0,0,0,31.2,18c13,5.85,24.74,8.77,34.76,8.77,10.26,0,18.71-3.07,24.84-9.2h0C230.92,206.68,231.07,185.51,219.23,159.2Zm-17.41-105c5.25,5.26,1.79,26-16,53.78-5.61-6.66-11.65-13.25-18.07-19.67S154.7,75.83,148,70.22C175.82,52.39,196.56,48.93,201.82,54.18ZM171.24,128a288.6,288.6,0,0,1-20.51,22.73A288.6,288.6,0,0,1,128,171.24a288.6,288.6,0,0,1-22.73-20.51A288.6,288.6,0,0,1,84.76,128,298.55,298.55,0,0,1,128,84.76a286.83,286.83,0,0,1,22.73,20.51A286.83,286.83,0,0,1,171.24,128ZM54.18,54.18c1.46-1.45,4.1-2.24,7.75-2.24,9.53,0,25.94,5.39,46,18.28-6.66,5.61-13.25,11.65-19.67,18.07S75.83,101.3,70.22,108C52.39,80.18,48.93,59.44,54.18,54.18Zm0,147.64c-5.25-5.26-1.79-26,16-53.78,5.61,6.66,11.65,13.25,18.07,19.67s13,12.46,19.67,18.07C80.18,203.61,59.44,207.07,54.18,201.82Zm147.64,0c-5.26,5.25-26,1.79-53.78-16,6.66-5.61,13.25-11.65,19.67-18.07s12.46-13,18.07-19.67C203.61,175.82,207.07,196.56,201.82,201.82ZM144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M210.26,210.26c-17.23,17.23-68-5.63-113.46-51.06S28.51,63,45.74,45.74s68,5.63,113.46,51.06S227.49,193,210.26,210.26Z",opacity:"0.2"}),a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.47,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A302.47,302.47,0,0,0,141.27,70C172.15,49,196.91,43.81,204.55,51.45Zm-153.1,0c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.19,51.45,204.55ZM128,140a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm76.55,64.56c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M193.83,128a195.73,195.73,0,0,0,19.9-33.65c10.74-23.88,11-42.66.8-52.88s-29-9.94-52.88.8A195.73,195.73,0,0,0,128,62.17a195.73,195.73,0,0,0-33.65-19.9c-23.88-10.74-42.66-11-52.88-.8s-9.94,29,.8,52.88A195.73,195.73,0,0,0,62.17,128a195.73,195.73,0,0,0-19.9,33.65c-10.74,23.88-11,42.66-.8,52.88h0c5,5,12,7.47,20.63,7.47,9.1,0,20-2.76,32.25-8.27A195.73,195.73,0,0,0,128,193.83a195.73,195.73,0,0,0,33.65,19.9C173.9,219.24,184.8,222,193.9,222c8.64,0,15.65-2.49,20.63-7.47h0c10.23-10.22,9.94-29-.8-52.88A195.73,195.73,0,0,0,193.83,128ZM206,50c9.28,9.28,2.36,36.29-19.8,68a306.2,306.2,0,0,0-22.78-25.45A306.2,306.2,0,0,0,138,69.76C169.75,47.61,196.77,40.68,206,50Zm-27.19,78A289.17,289.17,0,0,1,155,155a289.17,289.17,0,0,1-27,23.88A289.17,289.17,0,0,1,101,155a290.62,290.62,0,0,1-23.88-27A297.06,297.06,0,0,1,128,77.14,290.74,290.74,0,0,1,155,101,289.17,289.17,0,0,1,178.85,128ZM50,50c2.68-2.69,6.84-4,12.17-4,13.11,0,33.3,8,55.87,23.81A302.94,302.94,0,0,0,92.54,92.54,306.2,306.2,0,0,0,69.76,118C47.6,86.25,40.68,59.24,50,50ZM50,206h0c-9.28-9.28-2.35-36.29,19.8-68a306.2,306.2,0,0,0,22.78,25.45A306.2,306.2,0,0,0,118,186.24C86.25,208.4,59.24,215.32,50,206ZM206,206c-9.28,9.28-36.29,2.35-68-19.81a304.26,304.26,0,0,0,25.45-22.77A306.2,306.2,0,0,0,186.24,138C208.4,169.75,215.32,196.76,206,206Zm-68-78a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M211.89,162.47A195.58,195.58,0,0,0,191.36,128a195.58,195.58,0,0,0,20.53-34.47c10.38-23.06,10.81-41,1.21-50.63s-27.57-9.17-50.63,1.21A195.58,195.58,0,0,0,128,64.64,195.58,195.58,0,0,0,93.53,44.11C70.47,33.73,52.49,33.3,42.9,42.9s-9.17,27.57,1.21,50.63A195.58,195.58,0,0,0,64.64,128a195.58,195.58,0,0,0-20.53,34.47c-10.38,23.06-10.81,41-1.21,50.63h0C47.5,217.7,54,220,62.12,220c8.78,0,19.41-2.71,31.41-8.11A195.58,195.58,0,0,0,128,191.36a195.58,195.58,0,0,0,34.47,20.53c12,5.4,22.63,8.11,31.41,8.11,8.09,0,14.62-2.3,19.22-6.9h0C222.7,203.51,222.27,185.53,211.89,162.47ZM207.45,48.55c10.27,10.28,3.14,39.05-21.1,72.84A301,301,0,0,0,162,94a301,301,0,0,0-27.43-24.31C168.4,45.4,197.17,38.27,207.45,48.55Zm-26,79.45a293.16,293.16,0,0,1-25,28.38,291.82,291.82,0,0,1-28.38,25,291.82,291.82,0,0,1-28.38-25,293.16,293.16,0,0,1-25-28.38A302.36,302.36,0,0,1,128,74.58a295.83,295.83,0,0,1,28.37,25A293.16,293.16,0,0,1,181.41,128ZM48.55,48.55c3.05-3,7.71-4.55,13.64-4.55,14.11,0,35.41,8.59,59.19,25.65a304.89,304.89,0,0,0-51.73,51.74C45.41,87.6,38.28,58.83,48.55,48.55Zm0,158.9c-10.27-10.28-3.14-39,21.1-72.84A301,301,0,0,0,94,162a301,301,0,0,0,27.43,24.31C87.6,210.59,58.83,217.72,48.55,207.45Zm158.9,0c-10.28,10.27-39,3.14-72.84-21.1A301,301,0,0,0,162,162a301,301,0,0,0,24.31-27.43C210.59,168.4,217.72,197.17,207.45,207.45ZM136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z"}))]]),X0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z",opacity:"0.2"}),a.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z"}))]]),J0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,140a12,12,0,0,1-12,12H72a12,12,0,0,1,0-24h44A12,12,0,0,1,128,140ZM116,88H72a12,12,0,0,0,0,24h44a12,12,0,0,0,0-24Zm120,79.14V228a12,12,0,0,1-17.95,10.42L196,225.82,174,238.42A12,12,0,0,1,156,228V204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216a20,20,0,0,1,20,20V88.86a55.87,55.87,0,0,1,0,78.28ZM196,160a32,32,0,1,0-32-32A32,32,0,0,0,196,160Zm-40,20V167.14a56,56,0,0,1,56-92.8V60H44V180Zm56,27.32V181.66a55.87,55.87,0,0,1-32,0v25.66l10.05-5.74a12,12,0,0,1,11.9,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,56V90.06h0a44,44,0,1,0-56,67.88h0V192H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),a.createElement("path",{d:"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,86.53V56a16,16,0,0,0-16-16H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16H160v24A8,8,0,0,0,172,231l24-13.74L220,231A8,8,0,0,0,232,224V161.47a51.88,51.88,0,0,0,0-74.94ZM128,144H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm0-32H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm88,98.21-16-9.16a8,8,0,0,0-7.94,0l-16,9.16V172a51.88,51.88,0,0,0,40,0ZM196,160a36,36,0,1,1,36-36A36,36,0,0,1,196,160Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M126,136a6,6,0,0,1-6,6H72a6,6,0,0,1,0-12h48A6,6,0,0,1,126,136Zm-6-38H72a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm110,62.62V224a6,6,0,0,1-9,5.21l-25-14.3-25,14.3a6,6,0,0,1-9-5.21V198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216a14,14,0,0,1,14,14V87.38a49.91,49.91,0,0,1,0,73.24ZM196,86a38,38,0,1,0,38,38A38,38,0,0,0,196,86ZM162,186V160.62a50,50,0,0,1,56-81.51V56a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2Zm56-17.11a49.91,49.91,0,0,1-44,0v44.77l19-10.87a6,6,0,0,1,6,0l19,10.87Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M124,136a4,4,0,0,1-4,4H72a4,4,0,0,1,0-8h48A4,4,0,0,1,124,136Zm-4-36H72a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm108,59.74V224a4,4,0,0,1-6,3.47l-26-14.86-26,14.86a4,4,0,0,1-6-3.47V196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216a12,12,0,0,1,12,12V88.26a47.92,47.92,0,0,1,0,71.48ZM196,84a40,40,0,1,0,40,40A40,40,0,0,0,196,84ZM164,188V159.74a48,48,0,0,1,56-77.28V56a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4Zm56-22.46a47.81,47.81,0,0,1-48,0v51.57l22-12.58a4,4,0,0,1,4,0l22,12.58Z"}))]]),ee=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z"}))]]),te=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,44a32,32,0,0,0-8,1V44a32,32,0,0,0-60.79-14A32,32,0,0,0,76,60v50.83a32,32,0,0,0-52,36.7C55.82,214.6,75.35,244,128,244a92.1,92.1,0,0,0,92-92V76A32,32,0,0,0,188,44Zm8,108a68.08,68.08,0,0,1-68,68c-35.83,0-49.71-14-82.48-83.14-.14-.29-.29-.58-.45-.86a8,8,0,0,1,13.85-8l.21.35,18.68,30A12,12,0,0,0,100,152V60a8,8,0,0,1,16,0v60a12,12,0,0,0,24,0V44a8,8,0,0,1,16,0v76a12,12,0,0,0,24,0V76a8,8,0,0,1,16,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,76v76a80,80,0,0,1-80,80c-44.18,0-60.75-21.28-93.32-90a20,20,0,0,1,34.64-20L88,152V60a20,20,0,0,1,40,0V44a20,20,0,0,1,40,0V76a20,20,0,0,1,40,0Z",opacity:"0.2"}),a.createElement("path",{d:"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,64v90.93c0,46.2-36.85,84.55-83,85.06A83.71,83.71,0,0,1,72.6,215.4C50.79,192.33,26.15,136,26.15,136a16,16,0,0,1,6.53-22.23c7.66-4,17.1-.84,21.4,6.62l21,36.44a6.09,6.09,0,0,0,6,3.09l.12,0A8.19,8.19,0,0,0,88,151.74V48a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V112a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V32a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V120a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V64.45c0-8.61,6.62-16,15.23-16.43A16,16,0,0,1,216,64Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,50a25.8,25.8,0,0,0-14,4.11V44a26,26,0,0,0-51.41-5.51A26,26,0,0,0,82,60v71l-7.53-12.1a26,26,0,0,0-45.11,25.87C60.76,211,78.51,238,128,238a86.1,86.1,0,0,0,86-86V76A26,26,0,0,0,188,50Zm14,102a74.09,74.09,0,0,1-74,74c-21,0-34.51-5.05-46.75-17.45C67.81,195,55.54,172,40.1,139.43l-.23-.43a14,14,0,0,1,24.25-14l.1.17,18.68,30A6,6,0,0,0,94,152V60a14,14,0,0,1,28,0v60a6,6,0,0,0,12,0V44a14,14,0,0,1,28,0v76a6,6,0,0,0,12,0V76a14,14,0,0,1,28,0Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,52a23.9,23.9,0,0,0-16,6.13V44a24,24,0,0,0-47.93-1.8A24,24,0,0,0,84,60v78L72.75,119.94a24,24,0,0,0-41.62,23.92C64.44,214.12,82.17,236,128,236a84.09,84.09,0,0,0,84-84V76A24,24,0,0,0,188,52Zm16,100a76.09,76.09,0,0,1-76,76c-37.29,0-53.59-11.51-89.71-87.71l-.15-.29a16,16,0,0,1,27.71-16,.75.75,0,0,1,.07.12l18.68,30A4,4,0,0,0,92,152V60a16,16,0,0,1,32,0v60a4,4,0,0,0,8,0V44a16,16,0,0,1,32,0v76a4,4,0,0,0,8,0V76a16,16,0,0,1,32,0Z"}))]]),re=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM84,68A12,12,0,0,1,96,56h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,68Zm8.8,127.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM128,116a20,20,0,1,1-20,20A20,20,0,0,1,128,116Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32ZM128,168a32,32,0,1,1,32-32A32,32,0,0,1,128,168Z",opacity:"0.2"}),a.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM96,48h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm84.81,150.4a8,8,0,0,1-11.21-1.6,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.6A67.88,67.88,0,0,1,101,165.51a40,40,0,1,1,53.94,0A67.88,67.88,0,0,1,182.4,187.2,8,8,0,0,1,180.81,198.4ZM152,136a24,24,0,1,1-24-24A24,24,0,0,1,152,136Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M151.11,166.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,75.2,188.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,151.11,166.13ZM128,110a26,26,0,1,1-26,26A26,26,0,0,1,128,110Zm72-84H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm2,190a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2ZM90,64a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M146.7,166.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,76.8,189.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,146.7,166.75ZM100,136a28,28,0,1,1,28,28A28,28,0,0,1,100,136ZM200,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Zm4,188a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4ZM92,64a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Z"}))]]),d0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:Q0}));d0.displayName="AtomIcon";const W=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:X0}));W.displayName="BookOpenIcon";const G=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:J0}));G.displayName="CertificateIcon";const Q=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:ee}));Q.displayName="ChatCircleDotsIcon";const m0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:te}));m0.displayName="HandIcon";const f0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:re}));f0.displayName="IdentificationBadgeIcon";function ne(t){return{success:!0,value:t}}function r0(t){return{success:!1,message:t}}function ae(t){return se(t).success}function se(t){return t.length>317?r0("NSID is too long (317 chars max)"):t.length<5||!/^[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?:\.[a-zA-Z](?:[a-zA-Z0-9]{0,62})?)$/.test(t)?r0("NSID didn't validate via regex"):ne(t)}function _(t,e){if(t.length>e.length){const r=t.charCodeAt(e.length);return r!==58&&r!==63?!1:t.startsWith(e)}else return t===e}function n0(t,e){return t.prefix===e}function ie(t,e){return t===-1?e:e===-1?t:Math.min(t,e)}function O(t){const e=new Set(t);return r=>e.has(r)}class Z{constructor(e,r,s){this.prefix=e,this.positional=r,this.params=s}*keys(){this.params&&(yield*this.params.keys())}getSingle(e){var s;if(!((s=this.params)!=null&&s.has(e)))return;const r=this.params.getAll(e);return r.length>1?null:r[0]}getMulti(e){var r;if((r=this.params)!=null&&r.has(e))return this.params.getAll(e)}toString(){var r;let e=this.prefix;return this.positional!==void 0&&(e+=`:${a0(encodeURIComponent(this.positional))}`),(r=this.params)!=null&&r.size&&(e+=`?${a0(this.params.toString())}`),e}static fromString(e){const r=e.indexOf("?"),s=e.indexOf(":"),i=ie(r,s);if(i===-1)return new Z(e);const l=e.slice(0,i),c=s!==-1?r===-1?decodeURIComponent(e.slice(s+1)):s<r?decodeURIComponent(e.slice(s+1,r)):void 0:void 0,o=r!==-1&&r<e.length-1?new URLSearchParams(e.slice(r+1)):void 0;return new Z(l,c,o)}}const le=new Set([":","/","+",",","@","%"]),ce=new Map(Array.from(le,t=>[encodeURIComponent(t),t]).filter(([t,e])=>t!==e&&t.length===3&&t.startsWith("%")));function a0(t){let e=t.length-2;for(let r=0;r<e;r++)if(t.charCodeAt(r)===37){const s=t.slice(r,r+3),i=ce.get(s);i&&(t=`${t.slice(0,r)}${i}${t.slice(r+s.length)}`,r+=i.length-1,e-=s.length-i.length)}return t}class z{constructor(e,r,s){this.prefix=e,this.schema=r,this.positionalName=s,this.schemaKeys=new Set(Object.keys(r))}format(e){const r=new URLSearchParams;let s;for(const i of this.schemaKeys){const l=e[i];if(l===void 0)continue;const c=this.schema[i],o=c.normalize?c.normalize(l):l;if(!(!c.required&&(c.default===o||c.multiple&&c.default&&oe(c.default,o))))if(Array.isArray(o))if(i===this.positionalName&&o.length===1)s=String(o[0]);else{const m=new Set(o.map(String));for(const u of m)r.append(i,u)}else i===this.positionalName?s=String(o):r.set(i,String(o))}return new Z(this.prefix,s,r).toString()}parse(e){for(const s of e.keys())if(!this.schemaKeys.has(s))return null;const r=Object.create(null);for(const s of this.schemaKeys){const i=this.schema[s],l=i.multiple?e.getMulti(s):e.getSingle(s);if(l===null)return null;if(l!==void 0){if(s===this.positionalName&&e.positional!==void 0)return null;if(i.multiple){if(!l.length||!l.every(i.validate))return null}else if(!i.validate(l))return null;r[s]=l}else if(s===this.positionalName&&e.positional!==void 0){const{positional:c}=e;if(!i.validate(c))return null;r[s]=i.multiple?[c]:c}else{if(i.required)return null;r[s]=i.default}}return r}}function oe(t,e){for(const r of t)if(!e.includes(r))return!1;for(const r of e)if(!t.includes(r))return!1;return!0}const ue=Object.freeze(["email","repo","status"]),de=Object.freeze(["read","manage"]),y=class y{constructor(e,r){this.attr=e,this.action=r}matches(e){return this.attr===e.attr&&(this.action.includes("manage")||this.action.includes(e.action))}toString(){return y.parser.format(this)}static fromString(e){if(!_(e,"account"))return null;const r=Z.fromString(e);return y.fromSyntax(r)}static fromSyntax(e){const r=y.parser.parse(e);return r?new y(r.attr,r.action):null}static scopeNeededFor(e){return y.parser.format({attr:e.attr,action:[e.action]})}};y.parser=new z("account",{attr:{multiple:!1,required:!0,validate:O(ue)},action:{multiple:!0,required:!1,validate:O(de),default:["read"]}},"attr");let F=y;function h0(t){const e=t.indexOf("/");return!(e===-1||e===0||e===t.length-1||t.includes("/",e+1)||t.includes(" "))}function me(t){return h0(t)&&!t.includes("*")}function fe(t){return typeof t!="string"?!1:t==="*/*"?!0:h0(t)?!t.includes("*")||t.endsWith("/*"):!1}function he(t,e){return t==="*/*"?!0:t.endsWith("/*")?e.startsWith(t.slice(0,-1)):t===e}function pe(t,e){for(const r of t)if(he(r,e))return!0;return!1}function xe(t,e){return me(e)&&pe(t,e)}const Ae=Object.freeze(["*/*"]),M=class M{constructor(e){this.accept=e}matches(e){return xe(this.accept,e.mime)}toString(){return M.parser.format(this)}static fromString(e){if(!_(e,"blob"))return null;const r=Z.fromString(e);return M.fromSyntax(r)}static fromSyntax(e){const r=M.parser.parse(e);return r?new M(r.accept):null}static scopeNeededFor(e){return M.parser.format({accept:[e.mime]})}};M.parser=new z("blob",{accept:{multiple:!0,required:!0,validate:fe,normalize:e=>e.includes("*/*")?Ae:e.map(ge).filter(je).sort()}},"accept");let N=M;function ge(t){return typeof t=="string"?t.toLowerCase():t}function je(t,e,r){if(typeof t!="string"||t.endsWith("/*"))return!0;const s=t.split("/",1)[0];return!r.includes(`${s}/*`)}const Ze=Object.freeze(["handle","*"]),b=class b{constructor(e){this.attr=e}matches(e){return this.attr==="*"||this.attr===e.attr}toString(){return b.parser.format(this)}static fromString(e){if(!_(e,"identity"))return null;const r=Z.fromString(e);return b.fromSyntax(r)}static fromSyntax(e){const r=b.parser.parse(e);return r?new b(r.attr):null}static scopeNeededFor(e){return b.parser.format(e)}};b.parser=new z("identity",{attr:{multiple:!1,required:!0,validate:O(Ze)}},"attr");let $=b;const X=t=>typeof t=="string"&&ae(t),s0=Array.isArray;class q{constructor(e){this.lexPermission=e}get prefix(){return this.lexPermission.resource}get positional(){}get(e){if(e!=="type"&&e!=="resource"&&Object.hasOwn(this.lexPermission,e))return this.lexPermission[e]}*keys(){for(const e of Object.keys(this.lexPermission))this.get(e)!==void 0&&(yield e)}getSingle(e){const r=this.get(e);return s0(r)?null:r}getMulti(e){const r=this.get(e);if(r!==void 0)return s0(r)?r:null}toJSON(){return this.lexPermission}}const T=Object.freeze(["create","update","delete"]),we=O(T),ye=t=>t==="*"||X(t),C=class C{constructor(e,r){this.collection=e,this.action=r}matches({action:e,collection:r}){return this.action.includes(e)&&(this.collection.includes("*")||this.collection.includes(r))}toString(){return C.parser.format(this)}static fromString(e){if(!_(e,"repo"))return null;const r=Z.fromString(e);return C.fromSyntax(r)}static fromSyntax(e){const r=C.parser.parse(e);return r?new C(r.collection,r.action):null}static scopeNeededFor(e){return C.parser.format({collection:[e.collection],action:[e.action]})}};C.parser=new z("repo",{collection:{multiple:!0,required:!0,validate:ye,normalize:e=>e.length>1?e.includes("*")?["*"]:[...new Set(e)].sort():e},action:{multiple:!0,required:!1,validate:we,default:T,normalize:e=>e===T?T:T.filter(Me,e)}},"collection");let g=C;function Me(t){return this.includes(t)}const be=t=>t==="*"||X(t),Ce=t=>t==="*"||o0(t),E=class E{constructor(e,r){this.aud=e,this.lxm=r}matches(e){const{aud:r,lxm:s}=this;return(r==="*"||r===e.aud)&&(s.includes("*")||s.includes(e.lxm))}toString(){return E.parser.format(this)}static fromString(e){if(!_(e,"rpc"))return null;const r=Z.fromString(e);return E.fromSyntax(r)}static fromSyntax(e){const r=E.parser.parse(e);return!r||r.aud==="*"&&r.lxm.includes("*")?null:new E(r.aud,r.lxm)}static scopeNeededFor(e){return E.parser.format({aud:e.aud,lxm:[e.lxm]})}};E.parser=new z("rpc",{lxm:{multiple:!0,required:!0,validate:be,normalize:e=>e.length>1&&e.includes("*")?["*"]:[...new Set(e)].sort()},aud:{multiple:!1,required:!0,validate:Ce}},"lxm");let A=E;const S=class S{constructor(e,r=void 0){this.nsid=e,this.aud=r}toString(){return S.parser.format(this)}toPermissions(e){return Array.from(this.buildPermissions(e))}toScopes(e){return Array.from(this.buildPermissions(e),r=>r.toString())}*buildPermissions(e){for(const r of e.permissions){const s=this.parseLexPermission(r);if(!s)continue;const i=Ee(s);i&&this.isAllowedPermission(i)&&(yield i)}}parseLexPermission(e){if(i0(e,"repo"))return new q(e);if(i0(e,"rpc")){if(e.aud!==void 0&&e.aud!=="*")return null;if(e.inheritAud===!0&&e.aud===void 0&&this.aud!==void 0){const{inheritAud:r,...s}=e;return new q({aud:this.aud,...s})}return new q(e)}return null}isAllowedPermission(e){if(e instanceof A)return e.lxm.every(this.isParentAuthorityOf,this);if(e instanceof g)return e.collection.every(this.isParentAuthorityOf,this);throw new TypeError(`Unexpected permission ${e}`)}isParentAuthorityOf(e){if(e==="*")return!1;const r=this.nsid,s=r.lastIndexOf(".");if(s===-1)throw new TypeError('Dot character (".") missing from lexicon NSID');if(s>=e.length-1)return!1;for(let i=s;i>=0;i--)if(r.charCodeAt(i)!==e.charCodeAt(i))return!1;return!0}static fromString(e){if(!_(e,"include"))return null;const r=Z.fromString(e);return S.fromSyntax(r)}static fromSyntax(e){const r=S.parser.parse(e);return r?new S(r.nsid,r.aud):null}};S.parser=new z("include",{nsid:{multiple:!1,required:!0,validate:X},aud:{multiple:!1,required:!1,validate:o0}},"nsid");let K=S;function Ee(t){return n0(t,"repo")?g.fromSyntax(t):n0(t,"rpc")?A.fromSyntax(t):null}function i0(t,e){return t.resource===e}class k extends Error{get statusCode(){return this.status}constructor(e){super(`Missing required scope "${e}"`),this.scope=e,this.name="ScopeMissingError",this.status=403,this.expose=!0}}class J extends Set{matches(e,r){for(const s of this)if(Se(s,e,r))return!0;return!1}assert(e,r){if(!this.matches(e,r)){const s=Ve(e,r);throw new k(s)}}some(e){for(const r of this)if(e(r))return!0;return!1}every(e){for(const r of this)if(!e(r))return!1;return!0}*filter(e){for(const r of this)e(r)&&(yield r)}*map(e){for(const r of this)yield e(r)}static fromString(e){return new J(e==null?void 0:e.split(" "))}}function Ve(t,e){switch(t){case"account":return F.scopeNeededFor(e);case"identity":return $.scopeNeededFor(e);case"repo":return g.scopeNeededFor(e);case"rpc":return A.scopeNeededFor(e);case"blob":return N.scopeNeededFor(e)}throw new TypeError(`Unknown resource: ${t}`)}function Se(t,e,r){const s=Ne(e,t);return s?s.matches(r):!1}function Ne(t,e){switch(t){case"account":return F.fromString(e);case"identity":return $.fromString(e);case"repo":return g.fromString(e);case"rpc":return A.fromString(e);case"blob":return N.fromString(e);default:return null}}class He{constructor(e){this.scopes=new J(e?typeof e=="string"?e.split(" "):e:void 0)}allowsAccount(e){return this.scopes.matches("account",e)}assertAccount(e){if(!this.allowsAccount(e)){const r=F.scopeNeededFor(e);throw new k(r)}}allowsIdentity(e){return this.scopes.matches("identity",e)}assertIdentity(e){if(!this.allowsIdentity(e)){const r=$.scopeNeededFor(e);throw new k(r)}}allowsBlob(e){return this.scopes.matches("blob",e)}assertBlob(e){if(!this.allowsBlob(e)){const r=N.scopeNeededFor(e);throw new k(r)}}allowsRepo(e){return this.scopes.matches("repo",e)}assertRepo(e){if(!this.allowsRepo(e)){const r=g.scopeNeededFor(e);throw new k(r)}}allowsRpc(e){return this.scopes.matches("rpc",e)}assertRpc(e){if(!this.allowsRpc(e)){const r=A.scopeNeededFor(e);throw new k(r)}}}class p0 extends He{get hasTransitionGeneric(){return this.scopes.has("transition:generic")}get hasTransitionEmail(){return this.scopes.has("transition:email")}get hasTransitionChatBsky(){return this.scopes.has("transition:chat.bsky")}allowsAccount(e){return e.attr==="email"&&e.action==="read"&&this.hasTransitionEmail?!0:super.allowsAccount(e)}allowsBlob(e){return this.hasTransitionGeneric?!0:super.allowsBlob(e)}allowsRepo(e){return this.hasTransitionGeneric?!0:super.allowsRepo(e)}allowsRpc(e){const{lxm:r}=e;return this.hasTransitionGeneric&&r==="*"||this.hasTransitionGeneric&&!r.startsWith("chat.bsky.")||this.hasTransitionChatBsky&&r.startsWith("chat.bsky.")?!0:super.allowsRpc(e)}}function ke({clientId:t,clientMetadata:e,clientTrusted:r}){const[s,i]=a.useState(!1),l=r?e.logo_uri:void 0,c=e.client_name||t;return a.useEffect(()=>{i(!1)},[l]),l&&!s?n.jsx("img",{"aria-hidden":!0,src:l,alt:c,className:"-ml-1 size-8",onError:()=>i(!0)}):n.jsx("div",{"aria-hidden":!0,className:"bg-primary flex size-8 items-center justify-center overflow-hidden rounded-full text-white",children:n.jsx(b0,{className:"size-4"})})}const ve=t=>{try{const e=new URL(t);return e.protocol==="https:"&&e.pathname==="/oauth-client-metadata.json"&&!e.port&&!e.search}catch{return!1}};function Fe({url:t,proto:e=!1,host:r=!0,path:s=!1,query:i=!1,hash:l=!1,as:c="span",...o}){const m=a.useMemo(()=>t instanceof URL?t:new URL(t),[t]);return n.jsxs(c,{...o,children:[e&&n.jsx(I,{value:`${m.protocol}//`,...e===!0?null:e}),r&&n.jsx(I,{value:m.host,...r===!0?{faded:!1,bold:!0}:r}),s&&n.jsx(I,{value:m.pathname,...s===!0?null:s}),i&&n.jsx(I,{value:m.search,...i===!0?null:i}),l&&n.jsx(I,{value:m.hash,...l===!0?null:l})]})}function I({value:t,faded:e=!0,bold:r=!1}){const s=r?"b":"span";return n.jsx(s,{className:e?"opacity-50":"",children:t})}function Re({clientId:t,clientMetadata:e,clientTrusted:r,...s}){const i=a.useMemo(()=>{try{return new URL(t)}catch{return null}},[t]);if(r&&e.client_name)return n.jsx("span",{...s,children:e.client_name});if((i==null?void 0:i.protocol)==="http:")return n.jsx("span",{...s,children:n.jsx(d,{id:"eYNzrj"})});if((i==null?void 0:i.protocol)==="https:"){const l=ve(t);return n.jsx(Fe,{...s,url:i,proto:!l,host:!0,path:!l,query:!l,hash:!1})}return n.jsx("span",{...s,children:t})}function j({hint:t,image:e,title:r,description:s,append:i,children:l,extra:c,...o}){const{i18n:m,_:u}=w();return n.jsx("div",{...o,children:n.jsxs("div",{className:"flex items-center justify-start gap-2",children:[n.jsx("div",{className:"ml-2 flex w-8 flex-grow-0 items-center justify-center","aria-hidden":!0,children:e}),n.jsxs("div",{className:"flex flex-1 flex-col",children:[n.jsx("h3",{children:r}),s&&n.jsx("p",{className:"text-sm",children:s})]}),n.jsxs("div",{className:"flex shrink-0 grow-0 items-center justify-center",children:[i,!!l&&n.jsxs(N0,{children:[n.jsx(H0,{asChild:!0,children:n.jsx(c0,{shape:"circle","aria-label":t??m._({id:"xAo8pm"}),"aria-haspopup":"dialog",size:"sm",children:n.jsx(k0,{className:"size-4","aria-hidden":!0})})}),n.jsxs(v0,{children:[n.jsx(F0,{className:"bg-contrast-900/30 dark:bg-contrast-0/60 fixed inset-0"}),n.jsx(R0,{role:"dialog","aria-label":r?void 0:m._({id:"URmyfc"}),className:"fixed left-1/2 top-1/2 max-h-[85vh] w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-lg border border-slate-200 bg-white p-6 shadow-xl dark:border-slate-700 dark:bg-slate-800",children:n.jsxs("div",{className:"relative flex flex-col gap-4",children:[n.jsx(_0,{className:"text-text-default text-lg font-semibold",children:r}),n.jsx(z0,{className:"text-text-light text-sm",children:l}),c,n.jsx(P0,{className:"absolute right-0 top-0 rounded-full bg-slate-100 p-1 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:bg-slate-700 dark:hover:bg-slate-600","aria-label":m._({id:"n5fb8M"}),children:n.jsx(L0,{className:"text-text-light size-4","aria-hidden":!0})})]})})]})]})]})]})})}function _e(t,e){const r=a.forwardRef(({title:s,...i},l)=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...i,ref:l,"aria-hidden":!s,children:[s&&n.jsx("title",{children:s}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:t})]}));return r.displayName=e,r}const x0=_e("M6.335 4.212c2.293 1.76 4.76 5.327 5.665 7.241.906-1.914 3.372-5.482 5.665-7.241C19.319 2.942 22 1.96 22 5.086c0 .624-.35 5.244-.556 5.994-.713 2.608-3.315 3.273-5.629 2.87 4.045.704 5.074 3.035 2.852 5.366-4.22 4.426-6.066-1.111-6.54-2.53-.086-.26-.126-.382-.127-.278 0-.104-.041.018-.128.278-.473 1.419-2.318 6.956-6.539 2.53-2.222-2.331-1.193-4.662 2.852-5.366-2.314.403-4.916-.262-5.63-2.87C2.35 10.33 2 5.71 2 5.086c0-3.126 2.68-2.144 4.335-.874Z","ButterflyIcon");function ze({scope:t,permissionSets:e,clientTrusted:r=!1,clientFirstParty:s=!1,allowEmail:i,onAllowEmail:l,className:c="",...o}){const m=a.useMemo(()=>Array.from(new Set(t==null?void 0:t.split(" ").map(h=>K.fromString(h)).filter(h=>h!=null))),[t]),u=a.useMemo(()=>new p0(t),[t]);return u.scopes.size===0||u.scopes.size===1&&u.scopes.has("atproto")?null:n.jsxs("div",{className:`flex flex-col gap-2 ${c}`,...o,role:"list",children:[n.jsx(Te,{permissions:u,allowEmail:i,onAllowEmail:l}),n.jsx(qe,{permissions:u}),n.jsx($e,{permissions:u}),n.jsx(Be,{permissions:u}),n.jsx(Ue,{permissions:u}),n.jsx(Pe,{includeScopes:m,permissionSets:e}),n.jsx(Oe,{permissions:u}),(!s||!r)&&n.jsx(Ie,{permissions:u})]})}function Pe({includeScopes:t,permissionSets:e}){return t.map((r,s)=>n.jsx(Le,{includeScope:r,permissionSet:e==null?void 0:e[r.nsid]},s))}function Le({includeScope:t,permissionSet:e}){const{nsid:r}=t,s=a.useMemo(()=>e?new p0(t.toScopes(e)):null,[t,e]);return n.jsx(j,{role:"listitem",image:Z0(r)?n.jsx(x0,{className:"size-6"}):e0(r)?n.jsx(Q,{className:"size-6"}):r.startsWith("com.atproto.moderation.")?n.jsx(m0,{className:"size-6"}):n.jsx(d0,{className:"size-6"}),title:n.jsx(t0,{object:e,property:"title",fallback:r}),description:n.jsx(t0,{object:e,property:"detail",fallback:e!=null&&e.title?r:null}),extra:s?n.jsxs(n.Fragment,{children:[n.jsx(A0,{className:"mt-2",permissions:s}),n.jsx(g0,{className:"mt-2",permissions:s})]}):null,children:n.jsx(d,{id:"ZEwA2R"})})}function Ie({permissions:t}){return a.useMemo(()=>t.allowsIdentity({attr:"*"}),[t])?n.jsx(C0,{role:"status",children:n.jsx(d,{id:"zb3TS0",components:{0:n.jsx("b",{}),1:n.jsx("b",{})}})}):null}function Te({permissions:t,allowEmail:e,onAllowEmail:r}){const{i18n:s,_:i}=w(),l=a.useMemo(()=>["manage","read"].find(c=>t.allowsAccount({attr:"email",action:c})),[t]);return l?n.jsx("label",{className:r?"cursor-pointer":void 0,children:n.jsx(j,{role:"listitem",image:n.jsx(T0,{className:"size-6"}),title:s._({id:"O3oNi5"}),description:l==="manage"?n.jsx(d,{id:"FLm/n9"}):n.jsx(d,{id:"fEvm25"}),append:r&&n.jsx(I0,{className:"m-2",checked:e,onChange:c=>r(c.target.checked)})})}):null}function $e({permissions:t}){const{i18n:e,_:r}=w();return t.allowsAccount({attr:"status",action:"manage"})?n.jsx(j,{role:"listitem",image:n.jsx($0,{className:"size-6"}),title:e._({id:"AeXO77"}),description:e._({id:"NKHn7N"})}):null}function Oe({permissions:t}){return a.useMemo(()=>{if(t.allowsAccount({attr:"repo",action:"manage"}))return!1;let r=!1;for(const s of t.scopes){const i=A.fromString(s);if(i){if(r=!0,j0(i.aud)||i.lxm.every(Y))continue;return!1}const l=g.fromString(s);if(l){if(r=!0,l.collection.every(Y))continue;return!1}}return r},[t])?null:n.jsxs(n.Fragment,{children:[n.jsx(We,{permissions:t}),n.jsx(De,{permissions:t})]})}function Be({permissions:t}){const e=a.useMemo(()=>t.scopes.some(Ke),[t]),r=a.useMemo(()=>t.scopes.some(Ye),[t]);return e||r?n.jsx(j,{role:"listitem",image:n.jsx(x0,{className:"size-6"}),title:"Bluesky",description:e&&r?n.jsx(d,{id:"0ZqxWk"}):n.jsx(d,{id:"YRqkn2"})}):null}function Ue({permissions:t}){const{i18n:e,_:r}=w();return a.useMemo(()=>t.hasTransitionChatBsky||t.scopes.some(Ge),[t])?n.jsx(j,{role:"listitem",image:n.jsx(Q,{className:"size-6"}),title:e._({id:"AHZflp"}),description:e._({id:"yZDyOS"})}):null}function qe({permissions:t}){const{i18n:e,_:r}=w(),s=a.useMemo(()=>t.allowsIdentity({attr:"*"})?"*":t.allowsIdentity({attr:"handle"})?"handle":null,[t]);return s?n.jsx(j,{role:"listitem",image:n.jsx(f0,{className:"size-6"}),title:e._({id:"ePYQjq"}),description:s==="*"?n.jsx(d,{id:"hqGoYC",components:{0:n.jsx("b",{}),1:n.jsx("b",{})}}):n.jsx(d,{id:"lbjZdy",components:{0:n.jsx("b",{})}})}):null}function De({permissions:t}){const{i18n:e,_:r}=w();return t.hasTransitionGeneric?n.jsx(j,{role:"listitem",image:n.jsx(G,{className:"size-6"}),title:e._({id:"ZJUrL+"}),description:n.jsx(d,{id:"17SnJo",components:{0:n.jsx("b",{})}})}):t.scopes.some(s=>A.fromString(s)!=null)?n.jsx(j,{role:"listitem",image:n.jsx(G,{className:"size-6"}),title:e._({id:"ZJUrL+"}),description:e._({id:"RZlEhS"}),extra:n.jsx(A0,{className:"mt-2",permissions:t}),children:n.jsx(d,{id:"C94+Ui"})}):null}function A0({permissions:t,className:e="",...r}){const s=a.useMemo(()=>{const i=new Map;for(const l of t.scopes){const c=A.fromString(l);if(!c)continue;let o=i.get(c.aud);o||i.set(c.aud,o=new Set);for(const m of c.lxm)o.add(m)}return Array.from(i.entries()).sort(([l],[c])=>l.localeCompare(c)).map(([l,c])=>[l,c.has("*")?["*"]:Array.from(c).sort((o,m)=>o.localeCompare(m))])},[t]);return s.length?n.jsxs("table",{className:`w-full table-auto ${e}`,...r,children:[n.jsx("thead",{children:n.jsxs("tr",{className:"text-sm",children:[n.jsx("th",{className:"text-left font-normal",children:n.jsx(d,{id:"b4SMYa"})}),n.jsx("th",{className:"text-left font-normal",children:n.jsx(d,{id:"nURwxX"})})]})}),n.jsx("tbody",{children:s.map(([i,l])=>l.map((c,o,m)=>n.jsxs("tr",{className:"text-xs",children:[n.jsx("td",{className:o>0?"pt-1":void 0,children:n.jsx(Qe,{lxm:c})}),o===0&&n.jsx("td",{className:"align-top",rowSpan:m.length,children:n.jsx(Xe,{aud:i})})]},c)))})]}):null}function We({permissions:t}){const{i18n:e,_:r}=w();return t.hasTransitionGeneric||t.allowsAccount({attr:"repo",action:"manage"})||t.allowsRepo({collection:"*",action:"create"})&&t.allowsRepo({collection:"*",action:"delete"})&&t.allowsRepo({collection:"*",action:"update"})?n.jsx(j,{role:"listitem",image:n.jsx(W,{className:"size-6"}),title:e._({id:"IreQBq"}),description:n.jsx(d,{id:"OuTWqr"})}):t.scopes.some(s=>g.fromString(s)!=null)?n.jsx(j,{role:"listitem",image:n.jsx(W,{className:"size-6"}),title:e._({id:"IreQBq"}),description:e._({id:"xs63gu"}),extra:n.jsx(g0,{className:"mt-2",permissions:t}),children:n.jsx(d,{id:"SCnKXT"})}):null}function g0({permissions:t,className:e,...r}){const{i18n:s,_:i}=w(),l=a.useMemo(()=>{const u=new Map;for(const h of t.scopes){const p=g.fromString(h);if(p)for(const f of p.collection)if(u.has(f)){const H=u.get(f);for(const P of p.action)H[P]=!0}else u.set(f,{create:p.action.includes("create"),update:p.action.includes("update"),delete:p.action.includes("delete")})}return u},[t]),c=a.useMemo(()=>t.hasTransitionGeneric?[new N(["*/*"])]:Array.from(t.scopes.map(u=>N.fromString(u))).filter(u=>u!=null),[t]);if(!l.size)return null;const o=l.get("*"),m=a.useMemo(()=>Array.from(l.entries()).sort(([u],[h])=>u.localeCompare(h)),[l]);return n.jsxs("table",{className:`w-full table-auto text-left ${e}`,...r,children:[n.jsx("thead",{children:n.jsxs("tr",{className:"text-sm",children:[n.jsx("th",{className:"font-normal",children:s._({id:"HKH+W+"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"hYgDIe"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"EkH9pt"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"cnGeoo"})})]})}),n.jsxs("tbody",{children:[m.map(([u,h],p)=>n.jsxs("tr",{className:"text-xs",children:[n.jsx("td",{className:p>0?"pt-1":void 0,children:n.jsx(Je,{coll:u})}),n.jsx("td",{className:"text-center",children:o!=null&&o.create||h.create?n.jsx(U,{className:"inline-block size-3"}):null}),n.jsx("td",{className:"text-center",children:o!=null&&o.update||h.update?n.jsx(U,{className:"inline-block size-3"}):null}),n.jsx("td",{className:"text-center",children:o!=null&&o.delete||h.delete?n.jsx(U,{className:"inline-block size-3"}):null})]},u)),c.length>0&&n.jsxs("tr",{children:[n.jsx("td",{className:"pt-2",children:n.jsx(d,{id:"4X0Qky"})}),n.jsx("td",{colSpan:3,className:"pt-2 text-center",children:n.jsx(d,{id:"sCtyHQ"})})]})]})]})}function j0(t){return t==="did:web:bsky.app#bsky_appview"}function Z0(t){return t.startsWith("app.bsky.")}function e0(t){return t.startsWith("chat.bsky.")}function Ge(t){if(t==="transition:chat.bsky")return!0;const e=A.fromString(t);return!e||j0(e.aud)?!1:e.lxm.includes("*")||e.lxm.some(e0)}function Y(t){return t==="*"?!1:t==="com.atproto.moderation.createReport"||Z0(t)||e0(t)}function Ke(t){if(t==="transition:generic")return!0;const e=g.fromString(t);return e?e.collection.includes("*")||e.collection.some(Y):!1}function Ye(t){if(t==="transition:generic")return!0;const e=A.fromString(t);return e?e.lxm.includes("app.bsky.actor.getPreferences")||e.lxm.includes("app.bsky.graph.block")||e.lxm.includes("app.bsky.graph.muteActor")||e.lxm.includes("app.bsky.graph.muteActorList")||e.lxm.includes("app.bsky.graph.muteThread")||e.lxm.includes("app.bsky.graph.unmuteActor")||e.lxm.includes("app.bsky.graph.unmuteActorList")||e.lxm.includes("app.bsky.graph.unmuteThread")||e.lxm.includes("app.bsky.graph.getMutes")||e.lxm.includes("*"):!1}function Qe({lxm:t,...e}){return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"P5xSNt"})}):n.jsx(w0,{...e,nsid:t})}function Xe({aud:t,...e}){if(t.startsWith("did:web:api.bsky.app#"))return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"3GEYP0"})});if(t.startsWith("did:web:api.bsky.chat#"))return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"eglFj/"})});if(t.startsWith("did:web:")&&t.includes("#")){const r=t.slice(8,t.indexOf("#"));return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"BO3Kuy",values:{domain:r},components:{0:n.jsx("b",{})}})})}return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"UuQciw"})}):n.jsx(y0,{...e,title:t,children:t})}function Je({coll:t,...e}){return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"a6yfpg"})}):n.jsx(w0,{...e,nsid:t})}function v({children:t,className:e="",...r}){return n.jsx("em",{...r,className:`text-text-light ${e}`,children:t})}function w0({nsid:t,...e}){return n.jsx(y0,{...e,children:t.split(".").map((r,s)=>s===0?r:n.jsxs(a.Fragment,{children:[".",n.jsx("wbr",{}),r]},s))})}function y0({children:t,className:e="",...r}){return n.jsx("code",{...r,className:`text-text-light ${e}`,children:t})}function e1(t){return t.startsWith("transition:")}function t1(t){const e=F.fromString(t);return e?e.matches({attr:"email",action:"read"}):!1}function r1(t){return t==null?void 0:t.split(" ").filter(e=>!t1(e)).join(" ")}function n1({clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onConsent:o,onReject:m,onBack:u}){const{i18n:h,_:p}=w(),f=O0(m),H=a.useRef(null),P=H.current,B=!(c!=null&&c.split(" ").some(e1));return n.jsx(B0,{ref:H,onBack:u,error:f.error,submitLabel:n.jsx(d,{id:"Xund1M"}),values:{allowEmail:!0},onValues:()=>f.reset(),validate:({allowEmail:L})=>({scope:B&&!L?r1(c):c}),handler:o,actions:n.jsx(c0,{onClick:L=>{L.preventDefault(),P==null||P.reset(),f.run()},children:n.jsx(d,{id:"u0sEZL"})}),fields:({values:L,setterFor:M0})=>n.jsxs(n.Fragment,{children:[n.jsx(j,{image:n.jsx(ke,{clientId:t,clientMetadata:e,clientTrusted:r}),title:n.jsx(Re,{clientId:t,clientMetadata:e,clientTrusted:r}),description:!c||c==="atproto"?n.jsx(d,{id:"AM8FL/",components:{0:n.jsx(D,{account:l,className:"font-bold"})}}):n.jsx(d,{id:"sUabXh",components:{0:n.jsx(D,{account:l,className:"font-bold"})}}),hint:h._({id:"69Gavs"}),children:c?n.jsxs(n.Fragment,{children:[n.jsx("p",{children:n.jsx(d,{id:"3g3aq0"})}),n.jsx("pre",{className:"bg-light mt-2 overflow-x-auto whitespace-pre-wrap rounded border p-2 text-sm",children:c})]}):null}),n.jsx(ze,{scope:c,permissionSets:i,clientTrusted:r,clientFirstParty:s,allowEmail:B?L.allowEmail:!0,onAllowEmail:B?M0("allowEmail"):void 0}),n.jsx("p",{children:n.jsx(d,{id:"K6KMLt",components:{0:n.jsx("b",{}),1:n.jsx("a",{role:"link",href:e.tos_uri,rel:"nofollow noopener",target:"_blank",className:e.tos_uri?"text-primary underline":void 0}),2:n.jsx("a",{role:"link",href:e.policy_uri,rel:"nofollow noopener",target:"_blank",className:e.policy_uri?"text-primary underline":void 0})}})})]})})}function a1({clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onConsent:o,onReject:m,onBack:u}){return n.jsx(u0,{title:{id:"Xund1M"},subtitle:n.jsx(d,{id:"i7VT2T",components:{0:n.jsx(D,{account:l})}}),children:n.jsx(n1,{clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onBack:u,onConsent:o,onReject:m})})}const{__authorizeData:x,__customizationData:s1,__sessions:i1}=window,V=new URL(window.location.href);V.pathname==="/oauth/authorize"&&!V.searchParams.has("request_uri")&&(V.search="",V.searchParams.set("client_id",x.clientId),V.searchParams.set("request_uri",x.requestUri),window.history.replaceState(history.state,"",V.pathname+V.search));const l1=document.getElementById("root");var l0;E0.createRoot(l1).render(n.jsx(a.StrictMode,{children:n.jsx(V0,{value:s1,children:n.jsx(S0,{userLocales:(l0=x.uiLocales)==null?void 0:l0.split(" "),children:n.jsx(U0,{children:n.jsx(q0,{fallbackRender:Y0,children:n.jsx(D0,{initialSessions:i1,initialSelected:x.selectedSub,children:n.jsx(c1,{})})})})})})}));function c1(){const t=x.loginHint||void 0,{session:e,setSession:r,api:s}=W0(),[i,l]=a.useState(void 0),[c,o]=a.useState(e!=null&&e.consentRequired===!1),m=a.useCallback(f=>{console.debug("Redirecting back to client:",f),window.location.replace(f)},[]),u=a.useCallback(f=>{m(f),l(f),setTimeout(()=>o(!0),250)},[m]),h=a.useCallback(async({scope:f})=>{const{url:H}=await s.consent(e.account.sub,f);u(H)},[s,e,u]),p=a.useCallback(async()=>{const{url:f}=await s.reject();u(f)},[s,u]);return n.jsx(G0,{onCancel:p,forcedIdentifier:t,promptMode:x.promptMode,children:e&&!c?n.jsx(a1,{clientId:x.clientId,clientMetadata:x.clientMetadata,clientTrusted:x.clientTrusted,clientFirstParty:x.clientFirstParty,permissionSets:x.permissionSets,account:e.account,scope:x.scope,onConsent:h,onReject:p,onBack:t?void 0:()=>r(null)}):n.jsxs(u0,{title:{id:"UCOd1e"},children:[n.jsx(d,{id:"qq6QQ5"}),n.jsx("br",{}),i&&n.jsx(K0,{startWithCooldown:!0,cooldown:10,action:()=>m(i),children:n.jsx(d,{id:"56n0wU"})})]})})}
2
- //# sourceMappingURL=authorization-page-CslmZWsi.js.map
1
+ import{r as a,p as R,j as n,h as b0,T as d,u as w,B as c0,A as C0,i as t0,f as E0,C as V0,g as S0}from"./admonition-PcOMNxHc.js";import{Y as o0,k as N0,l as H0,L as k0,m as v0,O as F0,n as R0,o as _0,D as z0,p as P0,e as L0,_ as I0,H as T0,M as $0,s as U,$ as O0,S as B0,b as D,a0 as u0,U as U0,V as q0,W as D0,c as W0,N as G0,B as K0}from"./button-cooldown-Cek48u1l.js";import{e as Y0}from"./error-view-BzJJuW_V.js";const Q0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M219.23,159.2a196.66,196.66,0,0,0-18-31.2,196.66,196.66,0,0,0,18-31.2c11.84-26.31,11.69-47.48-.43-59.6s-33.29-12.27-59.6-.43a196.66,196.66,0,0,0-31.2,18,196.66,196.66,0,0,0-31.2-18c-26.31-11.84-47.48-11.69-59.6.43s-12.27,33.29-.43,59.6a196.66,196.66,0,0,0,18,31.2,196.66,196.66,0,0,0-18,31.2c-11.84,26.31-11.69,47.48.43,59.6h0C43.33,224.93,51.78,228,62,228c10,0,21.77-2.92,34.76-8.77a196.66,196.66,0,0,0,31.2-18,196.66,196.66,0,0,0,31.2,18c13,5.85,24.74,8.77,34.76,8.77,10.26,0,18.71-3.07,24.84-9.2h0C230.92,206.68,231.07,185.51,219.23,159.2Zm-17.41-105c5.25,5.26,1.79,26-16,53.78-5.61-6.66-11.65-13.25-18.07-19.67S154.7,75.83,148,70.22C175.82,52.39,196.56,48.93,201.82,54.18ZM171.24,128a288.6,288.6,0,0,1-20.51,22.73A288.6,288.6,0,0,1,128,171.24a288.6,288.6,0,0,1-22.73-20.51A288.6,288.6,0,0,1,84.76,128,298.55,298.55,0,0,1,128,84.76a286.83,286.83,0,0,1,22.73,20.51A286.83,286.83,0,0,1,171.24,128ZM54.18,54.18c1.46-1.45,4.1-2.24,7.75-2.24,9.53,0,25.94,5.39,46,18.28-6.66,5.61-13.25,11.65-19.67,18.07S75.83,101.3,70.22,108C52.39,80.18,48.93,59.44,54.18,54.18Zm0,147.64c-5.25-5.26-1.79-26,16-53.78,5.61,6.66,11.65,13.25,18.07,19.67s13,12.46,19.67,18.07C80.18,203.61,59.44,207.07,54.18,201.82Zm147.64,0c-5.26,5.25-26,1.79-53.78-16,6.66-5.61,13.25-11.65,19.67-18.07s12.46-13,18.07-19.67C203.61,175.82,207.07,196.56,201.82,201.82ZM144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M210.26,210.26c-17.23,17.23-68-5.63-113.46-51.06S28.51,63,45.74,45.74s68,5.63,113.46,51.06S227.49,193,210.26,210.26Z",opacity:"0.2"}),a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.47,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A302.47,302.47,0,0,0,141.27,70C172.15,49,196.91,43.81,204.55,51.45Zm-153.1,0c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.19,51.45,204.55ZM128,140a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm76.55,64.56c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M193.83,128a195.73,195.73,0,0,0,19.9-33.65c10.74-23.88,11-42.66.8-52.88s-29-9.94-52.88.8A195.73,195.73,0,0,0,128,62.17a195.73,195.73,0,0,0-33.65-19.9c-23.88-10.74-42.66-11-52.88-.8s-9.94,29,.8,52.88A195.73,195.73,0,0,0,62.17,128a195.73,195.73,0,0,0-19.9,33.65c-10.74,23.88-11,42.66-.8,52.88h0c5,5,12,7.47,20.63,7.47,9.1,0,20-2.76,32.25-8.27A195.73,195.73,0,0,0,128,193.83a195.73,195.73,0,0,0,33.65,19.9C173.9,219.24,184.8,222,193.9,222c8.64,0,15.65-2.49,20.63-7.47h0c10.23-10.22,9.94-29-.8-52.88A195.73,195.73,0,0,0,193.83,128ZM206,50c9.28,9.28,2.36,36.29-19.8,68a306.2,306.2,0,0,0-22.78-25.45A306.2,306.2,0,0,0,138,69.76C169.75,47.61,196.77,40.68,206,50Zm-27.19,78A289.17,289.17,0,0,1,155,155a289.17,289.17,0,0,1-27,23.88A289.17,289.17,0,0,1,101,155a290.62,290.62,0,0,1-23.88-27A297.06,297.06,0,0,1,128,77.14,290.74,290.74,0,0,1,155,101,289.17,289.17,0,0,1,178.85,128ZM50,50c2.68-2.69,6.84-4,12.17-4,13.11,0,33.3,8,55.87,23.81A302.94,302.94,0,0,0,92.54,92.54,306.2,306.2,0,0,0,69.76,118C47.6,86.25,40.68,59.24,50,50ZM50,206h0c-9.28-9.28-2.35-36.29,19.8-68a306.2,306.2,0,0,0,22.78,25.45A306.2,306.2,0,0,0,118,186.24C86.25,208.4,59.24,215.32,50,206ZM206,206c-9.28,9.28-36.29,2.35-68-19.81a304.26,304.26,0,0,0,25.45-22.77A306.2,306.2,0,0,0,186.24,138C208.4,169.75,215.32,196.76,206,206Zm-68-78a10,10,0,1,1-10-10A10,10,0,0,1,138,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M196.12,128c24.65-34.61,37.22-70.38,19.74-87.86S162.61,35.23,128,59.88C93.39,35.23,57.62,22.66,40.14,40.14S35.23,93.39,59.88,128c-24.65,34.61-37.22,70.38-19.74,87.86h0c5.63,5.63,13.15,8.14,21.91,8.14,18.48,0,42.48-11.17,66-27.88C151.47,212.83,175.47,224,194,224c8.76,0,16.29-2.52,21.91-8.14h0C233.34,198.38,220.77,162.61,196.12,128Zm8.43-76.55c7.64,7.64,2.48,32.4-18.52,63.28a300.33,300.33,0,0,0-21.19-23.57A300.33,300.33,0,0,0,141.27,70C172.15,49,196.91,43.8,204.55,51.45ZM176.29,128a289.14,289.14,0,0,1-22.76,25.53A289.14,289.14,0,0,1,128,176.29a289.14,289.14,0,0,1-25.53-22.76A289.14,289.14,0,0,1,79.71,128,298.62,298.62,0,0,1,128,79.71a289.14,289.14,0,0,1,25.53,22.76A289.14,289.14,0,0,1,176.29,128ZM51.45,51.45c2.2-2.21,5.83-3.35,10.62-3.35C73.89,48.1,92.76,55,114.72,70A304,304,0,0,0,91.16,91.16,300.33,300.33,0,0,0,70,114.73C49,83.85,43.81,59.09,51.45,51.45Zm0,153.1C43.81,196.91,49,172.15,70,141.27a300.33,300.33,0,0,0,21.19,23.57A304.18,304.18,0,0,0,114.73,186C83.85,207,59.09,212.2,51.45,204.55Zm153.1,0c-7.64,7.65-32.4,2.48-63.28-18.52a304.18,304.18,0,0,0,23.57-21.19A300.33,300.33,0,0,0,186,141.27C207,172.15,212.19,196.91,204.55,204.55ZM140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M211.89,162.47A195.58,195.58,0,0,0,191.36,128a195.58,195.58,0,0,0,20.53-34.47c10.38-23.06,10.81-41,1.21-50.63s-27.57-9.17-50.63,1.21A195.58,195.58,0,0,0,128,64.64,195.58,195.58,0,0,0,93.53,44.11C70.47,33.73,52.49,33.3,42.9,42.9s-9.17,27.57,1.21,50.63A195.58,195.58,0,0,0,64.64,128a195.58,195.58,0,0,0-20.53,34.47c-10.38,23.06-10.81,41-1.21,50.63h0C47.5,217.7,54,220,62.12,220c8.78,0,19.41-2.71,31.41-8.11A195.58,195.58,0,0,0,128,191.36a195.58,195.58,0,0,0,34.47,20.53c12,5.4,22.63,8.11,31.41,8.11,8.09,0,14.62-2.3,19.22-6.9h0C222.7,203.51,222.27,185.53,211.89,162.47ZM207.45,48.55c10.27,10.28,3.14,39.05-21.1,72.84A301,301,0,0,0,162,94a301,301,0,0,0-27.43-24.31C168.4,45.4,197.17,38.27,207.45,48.55Zm-26,79.45a293.16,293.16,0,0,1-25,28.38,291.82,291.82,0,0,1-28.38,25,291.82,291.82,0,0,1-28.38-25,293.16,293.16,0,0,1-25-28.38A302.36,302.36,0,0,1,128,74.58a295.83,295.83,0,0,1,28.37,25A293.16,293.16,0,0,1,181.41,128ZM48.55,48.55c3.05-3,7.71-4.55,13.64-4.55,14.11,0,35.41,8.59,59.19,25.65a304.89,304.89,0,0,0-51.73,51.74C45.41,87.6,38.28,58.83,48.55,48.55Zm0,158.9c-10.27-10.28-3.14-39,21.1-72.84A301,301,0,0,0,94,162a301,301,0,0,0,27.43,24.31C87.6,210.59,58.83,217.72,48.55,207.45Zm158.9,0c-10.28,10.27-39,3.14-72.84-21.1A301,301,0,0,0,162,162a301,301,0,0,0,24.31-27.43C210.59,168.4,217.72,197.17,207.45,207.45ZM136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Z"}))]]),X0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z",opacity:"0.2"}),a.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z"}))]]),J0=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,140a12,12,0,0,1-12,12H72a12,12,0,0,1,0-24h44A12,12,0,0,1,128,140ZM116,88H72a12,12,0,0,0,0,24h44a12,12,0,0,0,0-24Zm120,79.14V228a12,12,0,0,1-17.95,10.42L196,225.82,174,238.42A12,12,0,0,1,156,228V204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216a20,20,0,0,1,20,20V88.86a55.87,55.87,0,0,1,0,78.28ZM196,160a32,32,0,1,0-32-32A32,32,0,0,0,196,160Zm-40,20V167.14a56,56,0,0,1,56-92.8V60H44V180Zm56,27.32V181.66a55.87,55.87,0,0,1-32,0v25.66l10.05-5.74a12,12,0,0,1,11.9,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,56V90.06h0a44,44,0,1,0-56,67.88h0V192H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),a.createElement("path",{d:"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M232,86.53V56a16,16,0,0,0-16-16H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16H160v24A8,8,0,0,0,172,231l24-13.74L220,231A8,8,0,0,0,232,224V161.47a51.88,51.88,0,0,0,0-74.94ZM128,144H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm0-32H72a8,8,0,0,1,0-16h56a8,8,0,0,1,0,16Zm88,98.21-16-9.16a8,8,0,0,0-7.94,0l-16,9.16V172a51.88,51.88,0,0,0,40,0ZM196,160a36,36,0,1,1,36-36A36,36,0,0,1,196,160Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M126,136a6,6,0,0,1-6,6H72a6,6,0,0,1,0-12h48A6,6,0,0,1,126,136Zm-6-38H72a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Zm110,62.62V224a6,6,0,0,1-9,5.21l-25-14.3-25,14.3a6,6,0,0,1-9-5.21V198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216a14,14,0,0,1,14,14V87.38a49.91,49.91,0,0,1,0,73.24ZM196,86a38,38,0,1,0,38,38A38,38,0,0,0,196,86ZM162,186V160.62a50,50,0,0,1,56-81.51V56a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2Zm56-17.11a49.91,49.91,0,0,1-44,0v44.77l19-10.87a6,6,0,0,1,6,0l19,10.87Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,136a8,8,0,0,1-8,8H72a8,8,0,0,1,0-16h48A8,8,0,0,1,128,136Zm-8-40H72a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Zm112,65.47V224A8,8,0,0,1,220,231l-24-13.74L172,231A8,8,0,0,1,160,224V200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216a16,16,0,0,1,16,16V86.53a51.88,51.88,0,0,1,0,74.94ZM160,184V161.47A52,52,0,0,1,216,76V56H40V184Zm56-12a51.88,51.88,0,0,1-40,0v38.22l16-9.16a8,8,0,0,1,7.94,0l16,9.16Zm16-48a36,36,0,1,0-36,36A36,36,0,0,0,232,124Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M124,136a4,4,0,0,1-4,4H72a4,4,0,0,1,0-8h48A4,4,0,0,1,124,136Zm-4-36H72a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Zm108,59.74V224a4,4,0,0,1-6,3.47l-26-14.86-26,14.86a4,4,0,0,1-6-3.47V196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216a12,12,0,0,1,12,12V88.26a47.92,47.92,0,0,1,0,71.48ZM196,84a40,40,0,1,0,40,40A40,40,0,0,0,196,84ZM164,188V159.74a48,48,0,0,1,56-77.28V56a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4Zm56-22.46a47.81,47.81,0,0,1-48,0v51.57l22-12.58a4,4,0,0,1,4,0l22,12.58Z"}))]]),ee=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),a.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z"}))]]),te=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,44a32,32,0,0,0-8,1V44a32,32,0,0,0-60.79-14A32,32,0,0,0,76,60v50.83a32,32,0,0,0-52,36.7C55.82,214.6,75.35,244,128,244a92.1,92.1,0,0,0,92-92V76A32,32,0,0,0,188,44Zm8,108a68.08,68.08,0,0,1-68,68c-35.83,0-49.71-14-82.48-83.14-.14-.29-.29-.58-.45-.86a8,8,0,0,1,13.85-8l.21.35,18.68,30A12,12,0,0,0,100,152V60a8,8,0,0,1,16,0v60a12,12,0,0,0,24,0V44a8,8,0,0,1,16,0v76a12,12,0,0,0,24,0V76a8,8,0,0,1,16,0Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M208,76v76a80,80,0,0,1-80,80c-44.18,0-60.75-21.28-93.32-90a20,20,0,0,1,34.64-20L88,152V60a20,20,0,0,1,40,0V44a20,20,0,0,1,40,0V76a20,20,0,0,1,40,0Z",opacity:"0.2"}),a.createElement("path",{d:"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M216,64v90.93c0,46.2-36.85,84.55-83,85.06A83.71,83.71,0,0,1,72.6,215.4C50.79,192.33,26.15,136,26.15,136a16,16,0,0,1,6.53-22.23c7.66-4,17.1-.84,21.4,6.62l21,36.44a6.09,6.09,0,0,0,6,3.09l.12,0A8.19,8.19,0,0,0,88,151.74V48a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V112a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V32a16,16,0,0,1,16.77-16c8.61.4,15.23,7.82,15.23,16.43V120a8,8,0,0,0,8.53,8,8.17,8.17,0,0,0,7.47-8.25V64.45c0-8.61,6.62-16,15.23-16.43A16,16,0,0,1,216,64Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,50a25.8,25.8,0,0,0-14,4.11V44a26,26,0,0,0-51.41-5.51A26,26,0,0,0,82,60v71l-7.53-12.1a26,26,0,0,0-45.11,25.87C60.76,211,78.51,238,128,238a86.1,86.1,0,0,0,86-86V76A26,26,0,0,0,188,50Zm14,102a74.09,74.09,0,0,1-74,74c-21,0-34.51-5.05-46.75-17.45C67.81,195,55.54,172,40.1,139.43l-.23-.43a14,14,0,0,1,24.25-14l.1.17,18.68,30A6,6,0,0,0,94,152V60a14,14,0,0,1,28,0v60a6,6,0,0,0,12,0V44a14,14,0,0,1,28,0v76a6,6,0,0,0,12,0V76a14,14,0,0,1,28,0Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,48a27.75,27.75,0,0,0-12,2.71V44a28,28,0,0,0-54.65-8.6A28,28,0,0,0,80,60v64l-3.82-6.13a28,28,0,0,0-48.6,27.82c16,33.77,28.93,57.72,43.72,72.69C86.24,233.54,103.2,240,128,240a88.1,88.1,0,0,0,88-88V76A28,28,0,0,0,188,48Zm12,104a72.08,72.08,0,0,1-72,72c-20.38,0-33.51-4.88-45.33-16.85C69.44,193.74,57.26,171,41.9,138.58a6.36,6.36,0,0,0-.3-.58,12,12,0,0,1,20.79-12,1.76,1.76,0,0,0,.14.23l18.67,30A8,8,0,0,0,96,152V60a12,12,0,0,1,24,0v60a8,8,0,0,0,16,0V44a12,12,0,0,1,24,0v76a8,8,0,0,0,16,0V76a12,12,0,0,1,24,0Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M188,52a23.9,23.9,0,0,0-16,6.13V44a24,24,0,0,0-47.93-1.8A24,24,0,0,0,84,60v78L72.75,119.94a24,24,0,0,0-41.62,23.92C64.44,214.12,82.17,236,128,236a84.09,84.09,0,0,0,84-84V76A24,24,0,0,0,188,52Zm16,100a76.09,76.09,0,0,1-76,76c-37.29,0-53.59-11.51-89.71-87.71l-.15-.29a16,16,0,0,1,27.71-16,.75.75,0,0,1,.07.12l18.68,30A4,4,0,0,0,92,152V60a16,16,0,0,1,32,0v60a4,4,0,0,0,8,0V44a16,16,0,0,1,32,0v76a4,4,0,0,0,8,0V76a16,16,0,0,1,32,0Z"}))]]),re=new Map([["bold",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM84,68A12,12,0,0,1,96,56h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,68Zm8.8,127.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM128,116a20,20,0,1,1-20,20A20,20,0,0,1,128,116Z"}))],["duotone",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,32H56a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V40A8,8,0,0,0,200,32ZM128,168a32,32,0,1,1,32-32A32,32,0,0,1,128,168Z",opacity:"0.2"}),a.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["fill",a.createElement(a.Fragment,null,a.createElement("path",{d:"M200,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24ZM96,48h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm84.81,150.4a8,8,0,0,1-11.21-1.6,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.6A67.88,67.88,0,0,1,101,165.51a40,40,0,1,1,53.94,0A67.88,67.88,0,0,1,182.4,187.2,8,8,0,0,1,180.81,198.4ZM152,136a24,24,0,1,1-24-24A24,24,0,0,1,152,136Z"}))],["light",a.createElement(a.Fragment,null,a.createElement("path",{d:"M151.11,166.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,75.2,188.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,151.11,166.13ZM128,110a26,26,0,1,1-26,26A26,26,0,0,1,128,110Zm72-84H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm2,190a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2ZM90,64a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,64Z"}))],["regular",a.createElement(a.Fragment,null,a.createElement("path",{d:"M75.19,198.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,155,165.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,73.6,187.2,8,8,0,0,0,75.19,198.4ZM128,112a24,24,0,1,1-24,24A24,24,0,0,1,128,112Zm72-88H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V40A16,16,0,0,0,200,24Zm0,192H56V40H200ZM88,64a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,64Z"}))],["thin",a.createElement(a.Fragment,null,a.createElement("path",{d:"M146.7,166.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,76.8,189.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,146.7,166.75ZM100,136a28,28,0,1,1,28,28A28,28,0,0,1,100,136ZM200,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V40A12,12,0,0,0,200,28Zm4,188a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4ZM92,64a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,64Z"}))]]),d0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:Q0}));d0.displayName="AtomIcon";const W=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:X0}));W.displayName="BookOpenIcon";const G=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:J0}));G.displayName="CertificateIcon";const Q=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:ee}));Q.displayName="ChatCircleDotsIcon";const m0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:te}));m0.displayName="HandIcon";const f0=a.forwardRef((t,e)=>a.createElement(R,{ref:e,...t,weights:re}));f0.displayName="IdentificationBadgeIcon";function ne(t){return{success:!0,value:t}}function r0(t){return{success:!1,message:t}}function ae(t){return se(t).success}function se(t){return t.length>317?r0("NSID is too long (317 chars max)"):t.length<5||!/^[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?:\.[a-zA-Z](?:[a-zA-Z0-9]{0,62})?)$/.test(t)?r0("NSID didn't validate via regex"):ne(t)}function _(t,e){if(t.length>e.length){const r=t.charCodeAt(e.length);return r!==58&&r!==63?!1:t.startsWith(e)}else return t===e}function n0(t,e){return t.prefix===e}function ie(t,e){return t===-1?e:e===-1?t:Math.min(t,e)}function O(t){const e=new Set(t);return r=>e.has(r)}class Z{constructor(e,r,s){this.prefix=e,this.positional=r,this.params=s}*keys(){this.params&&(yield*this.params.keys())}getSingle(e){var s;if(!((s=this.params)!=null&&s.has(e)))return;const r=this.params.getAll(e);return r.length>1?null:r[0]}getMulti(e){var r;if((r=this.params)!=null&&r.has(e))return this.params.getAll(e)}toString(){var r;let e=this.prefix;return this.positional!==void 0&&(e+=`:${a0(encodeURIComponent(this.positional))}`),(r=this.params)!=null&&r.size&&(e+=`?${a0(this.params.toString())}`),e}static fromString(e){const r=e.indexOf("?"),s=e.indexOf(":"),i=ie(r,s);if(i===-1)return new Z(e);const l=e.slice(0,i),c=s!==-1?r===-1?decodeURIComponent(e.slice(s+1)):s<r?decodeURIComponent(e.slice(s+1,r)):void 0:void 0,o=r!==-1&&r<e.length-1?new URLSearchParams(e.slice(r+1)):void 0;return new Z(l,c,o)}}const le=new Set([":","/","+",",","@","%"]),ce=new Map(Array.from(le,t=>[encodeURIComponent(t),t]).filter(([t,e])=>t!==e&&t.length===3&&t.startsWith("%")));function a0(t){let e=t.length-2;for(let r=0;r<e;r++)if(t.charCodeAt(r)===37){const s=t.slice(r,r+3),i=ce.get(s);i&&(t=`${t.slice(0,r)}${i}${t.slice(r+s.length)}`,r+=i.length-1,e-=s.length-i.length)}return t}class z{constructor(e,r,s){this.prefix=e,this.schema=r,this.positionalName=s,this.schemaKeys=new Set(Object.keys(r))}format(e){const r=new URLSearchParams;let s;for(const i of this.schemaKeys){const l=e[i];if(l===void 0)continue;const c=this.schema[i],o=c.normalize?c.normalize(l):l;if(!(!c.required&&(c.default===o||c.multiple&&c.default&&oe(c.default,o))))if(Array.isArray(o))if(i===this.positionalName&&o.length===1)s=String(o[0]);else{const m=new Set(o.map(String));for(const u of m)r.append(i,u)}else i===this.positionalName?s=String(o):r.set(i,String(o))}return new Z(this.prefix,s,r).toString()}parse(e){for(const s of e.keys())if(!this.schemaKeys.has(s))return null;const r=Object.create(null);for(const s of this.schemaKeys){const i=this.schema[s],l=i.multiple?e.getMulti(s):e.getSingle(s);if(l===null)return null;if(l!==void 0){if(s===this.positionalName&&e.positional!==void 0)return null;if(i.multiple){if(!l.length||!l.every(i.validate))return null}else if(!i.validate(l))return null;r[s]=l}else if(s===this.positionalName&&e.positional!==void 0){const{positional:c}=e;if(!i.validate(c))return null;r[s]=i.multiple?[c]:c}else{if(i.required)return null;r[s]=i.default}}return r}}function oe(t,e){for(const r of t)if(!e.includes(r))return!1;for(const r of e)if(!t.includes(r))return!1;return!0}const ue=Object.freeze(["email","repo","status"]),de=Object.freeze(["read","manage"]),y=class y{constructor(e,r){this.attr=e,this.action=r}matches(e){return this.attr===e.attr&&(this.action.includes("manage")||this.action.includes(e.action))}toString(){return y.parser.format(this)}static fromString(e){if(!_(e,"account"))return null;const r=Z.fromString(e);return y.fromSyntax(r)}static fromSyntax(e){const r=y.parser.parse(e);return r?new y(r.attr,r.action):null}static scopeNeededFor(e){return y.parser.format({attr:e.attr,action:[e.action]})}};y.parser=new z("account",{attr:{multiple:!1,required:!0,validate:O(ue)},action:{multiple:!0,required:!1,validate:O(de),default:["read"]}},"attr");let F=y;function h0(t){const e=t.indexOf("/");return!(e===-1||e===0||e===t.length-1||t.includes("/",e+1)||t.includes(" "))}function me(t){return h0(t)&&!t.includes("*")}function fe(t){return typeof t!="string"?!1:t==="*/*"?!0:h0(t)?!t.includes("*")||t.endsWith("/*"):!1}function he(t,e){return t==="*/*"?!0:t.endsWith("/*")?e.startsWith(t.slice(0,-1)):t===e}function pe(t,e){for(const r of t)if(he(r,e))return!0;return!1}function xe(t,e){return me(e)&&pe(t,e)}const Ae=Object.freeze(["*/*"]),M=class M{constructor(e){this.accept=e}matches(e){return xe(this.accept,e.mime)}toString(){return M.parser.format(this)}static fromString(e){if(!_(e,"blob"))return null;const r=Z.fromString(e);return M.fromSyntax(r)}static fromSyntax(e){const r=M.parser.parse(e);return r?new M(r.accept):null}static scopeNeededFor(e){return M.parser.format({accept:[e.mime]})}};M.parser=new z("blob",{accept:{multiple:!0,required:!0,validate:fe,normalize:e=>e.includes("*/*")?Ae:e.map(ge).filter(je).sort()}},"accept");let N=M;function ge(t){return typeof t=="string"?t.toLowerCase():t}function je(t,e,r){if(typeof t!="string"||t.endsWith("/*"))return!0;const s=t.split("/",1)[0];return!r.includes(`${s}/*`)}const Ze=Object.freeze(["handle","*"]),b=class b{constructor(e){this.attr=e}matches(e){return this.attr==="*"||this.attr===e.attr}toString(){return b.parser.format(this)}static fromString(e){if(!_(e,"identity"))return null;const r=Z.fromString(e);return b.fromSyntax(r)}static fromSyntax(e){const r=b.parser.parse(e);return r?new b(r.attr):null}static scopeNeededFor(e){return b.parser.format(e)}};b.parser=new z("identity",{attr:{multiple:!1,required:!0,validate:O(Ze)}},"attr");let $=b;const X=t=>typeof t=="string"&&ae(t),s0=Array.isArray;class q{constructor(e){this.lexPermission=e}get prefix(){return this.lexPermission.resource}get positional(){}get(e){if(e!=="type"&&e!=="resource"&&Object.hasOwn(this.lexPermission,e))return this.lexPermission[e]}*keys(){for(const e of Object.keys(this.lexPermission))this.get(e)!==void 0&&(yield e)}getSingle(e){const r=this.get(e);return s0(r)?null:r}getMulti(e){const r=this.get(e);if(r!==void 0)return s0(r)?r:null}toJSON(){return this.lexPermission}}const T=Object.freeze(["create","update","delete"]),we=O(T),ye=t=>t==="*"||X(t),C=class C{constructor(e,r){this.collection=e,this.action=r}matches({action:e,collection:r}){return this.action.includes(e)&&(this.collection.includes("*")||this.collection.includes(r))}toString(){return C.parser.format(this)}static fromString(e){if(!_(e,"repo"))return null;const r=Z.fromString(e);return C.fromSyntax(r)}static fromSyntax(e){const r=C.parser.parse(e);return r?new C(r.collection,r.action):null}static scopeNeededFor(e){return C.parser.format({collection:[e.collection],action:[e.action]})}};C.parser=new z("repo",{collection:{multiple:!0,required:!0,validate:ye,normalize:e=>e.length>1?e.includes("*")?["*"]:[...new Set(e)].sort():e},action:{multiple:!0,required:!1,validate:we,default:T,normalize:e=>e===T?T:T.filter(Me,e)}},"collection");let g=C;function Me(t){return this.includes(t)}const be=t=>t==="*"||X(t),Ce=t=>t==="*"||o0(t),E=class E{constructor(e,r){this.aud=e,this.lxm=r}matches(e){const{aud:r,lxm:s}=this;return(r==="*"||r===e.aud)&&(s.includes("*")||s.includes(e.lxm))}toString(){return E.parser.format(this)}static fromString(e){if(!_(e,"rpc"))return null;const r=Z.fromString(e);return E.fromSyntax(r)}static fromSyntax(e){const r=E.parser.parse(e);return!r||r.aud==="*"&&r.lxm.includes("*")?null:new E(r.aud,r.lxm)}static scopeNeededFor(e){return E.parser.format({aud:e.aud,lxm:[e.lxm]})}};E.parser=new z("rpc",{lxm:{multiple:!0,required:!0,validate:be,normalize:e=>e.length>1&&e.includes("*")?["*"]:[...new Set(e)].sort()},aud:{multiple:!1,required:!0,validate:Ce}},"lxm");let A=E;const S=class S{constructor(e,r=void 0){this.nsid=e,this.aud=r}toString(){return S.parser.format(this)}toPermissions(e){return Array.from(this.buildPermissions(e))}toScopes(e){return Array.from(this.buildPermissions(e),r=>r.toString())}*buildPermissions(e){for(const r of e.permissions){const s=this.parseLexPermission(r);if(!s)continue;const i=Ee(s);i&&this.isAllowedPermission(i)&&(yield i)}}parseLexPermission(e){if(i0(e,"repo"))return new q(e);if(i0(e,"rpc")){if(e.aud!==void 0&&e.aud!=="*")return null;if(e.inheritAud===!0&&e.aud===void 0&&this.aud!==void 0){const{inheritAud:r,...s}=e;return new q({aud:this.aud,...s})}return new q(e)}return null}isAllowedPermission(e){if(e instanceof A)return e.lxm.every(this.isParentAuthorityOf,this);if(e instanceof g)return e.collection.every(this.isParentAuthorityOf,this);throw new TypeError(`Unexpected permission ${e}`)}isParentAuthorityOf(e){if(e==="*")return!1;const r=this.nsid,s=r.lastIndexOf(".");if(s===-1)throw new TypeError('Dot character (".") missing from lexicon NSID');if(s>=e.length-1)return!1;for(let i=s;i>=0;i--)if(r.charCodeAt(i)!==e.charCodeAt(i))return!1;return!0}static fromString(e){if(!_(e,"include"))return null;const r=Z.fromString(e);return S.fromSyntax(r)}static fromSyntax(e){const r=S.parser.parse(e);return r?new S(r.nsid,r.aud):null}};S.parser=new z("include",{nsid:{multiple:!1,required:!0,validate:X},aud:{multiple:!1,required:!1,validate:o0}},"nsid");let K=S;function Ee(t){return n0(t,"repo")?g.fromSyntax(t):n0(t,"rpc")?A.fromSyntax(t):null}function i0(t,e){return t.resource===e}class k extends Error{get statusCode(){return this.status}constructor(e){super(`Missing required scope "${e}"`),this.scope=e,this.name="ScopeMissingError",this.status=403,this.expose=!0}}class J extends Set{matches(e,r){for(const s of this)if(Se(s,e,r))return!0;return!1}assert(e,r){if(!this.matches(e,r)){const s=Ve(e,r);throw new k(s)}}some(e){for(const r of this)if(e(r))return!0;return!1}every(e){for(const r of this)if(!e(r))return!1;return!0}*filter(e){for(const r of this)e(r)&&(yield r)}*map(e){for(const r of this)yield e(r)}static fromString(e){return new J(e==null?void 0:e.split(" "))}}function Ve(t,e){switch(t){case"account":return F.scopeNeededFor(e);case"identity":return $.scopeNeededFor(e);case"repo":return g.scopeNeededFor(e);case"rpc":return A.scopeNeededFor(e);case"blob":return N.scopeNeededFor(e)}throw new TypeError(`Unknown resource: ${t}`)}function Se(t,e,r){const s=Ne(e,t);return s?s.matches(r):!1}function Ne(t,e){switch(t){case"account":return F.fromString(e);case"identity":return $.fromString(e);case"repo":return g.fromString(e);case"rpc":return A.fromString(e);case"blob":return N.fromString(e);default:return null}}class He{constructor(e){this.scopes=new J(e?typeof e=="string"?e.split(" "):e:void 0)}allowsAccount(e){return this.scopes.matches("account",e)}assertAccount(e){if(!this.allowsAccount(e)){const r=F.scopeNeededFor(e);throw new k(r)}}allowsIdentity(e){return this.scopes.matches("identity",e)}assertIdentity(e){if(!this.allowsIdentity(e)){const r=$.scopeNeededFor(e);throw new k(r)}}allowsBlob(e){return this.scopes.matches("blob",e)}assertBlob(e){if(!this.allowsBlob(e)){const r=N.scopeNeededFor(e);throw new k(r)}}allowsRepo(e){return this.scopes.matches("repo",e)}assertRepo(e){if(!this.allowsRepo(e)){const r=g.scopeNeededFor(e);throw new k(r)}}allowsRpc(e){return this.scopes.matches("rpc",e)}assertRpc(e){if(!this.allowsRpc(e)){const r=A.scopeNeededFor(e);throw new k(r)}}}class p0 extends He{get hasTransitionGeneric(){return this.scopes.has("transition:generic")}get hasTransitionEmail(){return this.scopes.has("transition:email")}get hasTransitionChatBsky(){return this.scopes.has("transition:chat.bsky")}allowsAccount(e){return e.attr==="email"&&e.action==="read"&&this.hasTransitionEmail?!0:super.allowsAccount(e)}allowsBlob(e){return this.hasTransitionGeneric?!0:super.allowsBlob(e)}allowsRepo(e){return this.hasTransitionGeneric?!0:super.allowsRepo(e)}allowsRpc(e){const{lxm:r}=e;return this.hasTransitionGeneric&&r==="*"||this.hasTransitionGeneric&&!r.startsWith("chat.bsky.")||this.hasTransitionChatBsky&&r.startsWith("chat.bsky.")?!0:super.allowsRpc(e)}}function ke({clientId:t,clientMetadata:e,clientTrusted:r}){const[s,i]=a.useState(!1),l=r?e.logo_uri:void 0,c=e.client_name||t;return a.useEffect(()=>{i(!1)},[l]),l&&!s?n.jsx("img",{"aria-hidden":!0,src:l,alt:c,className:"-ml-1 size-8",onError:()=>i(!0)}):n.jsx("div",{"aria-hidden":!0,className:"bg-primary flex size-8 items-center justify-center overflow-hidden rounded-full text-white",children:n.jsx(b0,{className:"size-4"})})}const ve=t=>{try{const e=new URL(t);return e.protocol==="https:"&&e.pathname==="/oauth-client-metadata.json"&&!e.port&&!e.search}catch{return!1}};function Fe({url:t,proto:e=!1,host:r=!0,path:s=!1,query:i=!1,hash:l=!1,as:c="span",...o}){const m=a.useMemo(()=>t instanceof URL?t:new URL(t),[t]);return n.jsxs(c,{...o,children:[e&&n.jsx(I,{value:`${m.protocol}//`,...e===!0?null:e}),r&&n.jsx(I,{value:m.host,...r===!0?{faded:!1,bold:!0}:r}),s&&n.jsx(I,{value:m.pathname,...s===!0?null:s}),i&&n.jsx(I,{value:m.search,...i===!0?null:i}),l&&n.jsx(I,{value:m.hash,...l===!0?null:l})]})}function I({value:t,faded:e=!0,bold:r=!1}){const s=r?"b":"span";return n.jsx(s,{className:e?"opacity-50":"",children:t})}function Re({clientId:t,clientMetadata:e,clientTrusted:r,...s}){const i=a.useMemo(()=>{try{return new URL(t)}catch{return null}},[t]);if(r&&e.client_name)return n.jsx("span",{...s,children:e.client_name});if((i==null?void 0:i.protocol)==="http:")return n.jsx("span",{...s,children:n.jsx(d,{id:"eYNzrj"})});if((i==null?void 0:i.protocol)==="https:"){const l=ve(t);return n.jsx(Fe,{...s,url:i,proto:!l,host:!0,path:!l,query:!l,hash:!1})}return n.jsx("span",{...s,children:t})}function j({hint:t,image:e,title:r,description:s,append:i,children:l,extra:c,...o}){const{i18n:m,_:u}=w();return n.jsx("div",{...o,children:n.jsxs("div",{className:"flex items-center justify-start gap-2",children:[n.jsx("div",{className:"ml-2 flex w-8 flex-grow-0 items-center justify-center","aria-hidden":!0,children:e}),n.jsxs("div",{className:"flex flex-1 flex-col",children:[n.jsx("h3",{children:r}),s&&n.jsx("p",{className:"text-sm",children:s})]}),n.jsxs("div",{className:"flex shrink-0 grow-0 items-center justify-center",children:[i,!!l&&n.jsxs(N0,{children:[n.jsx(H0,{asChild:!0,children:n.jsx(c0,{shape:"circle","aria-label":t??m._({id:"xAo8pm"}),"aria-haspopup":"dialog",size:"sm",children:n.jsx(k0,{className:"size-4","aria-hidden":!0})})}),n.jsxs(v0,{children:[n.jsx(F0,{className:"bg-contrast-900/30 dark:bg-contrast-0/60 fixed inset-0"}),n.jsx(R0,{role:"dialog","aria-label":r?void 0:m._({id:"URmyfc"}),className:"fixed left-1/2 top-1/2 max-h-[85vh] w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-lg border border-slate-200 bg-white p-6 shadow-xl dark:border-slate-700 dark:bg-slate-800",children:n.jsxs("div",{className:"relative flex flex-col gap-4",children:[n.jsx(_0,{className:"text-text-default text-lg font-semibold",children:r}),n.jsx(z0,{className:"text-text-light text-sm",children:l}),c,n.jsx(P0,{className:"absolute right-0 top-0 rounded-full bg-slate-100 p-1 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:bg-slate-700 dark:hover:bg-slate-600","aria-label":m._({id:"n5fb8M"}),children:n.jsx(L0,{className:"text-text-light size-4","aria-hidden":!0})})]})})]})]})]})]})})}function _e(t,e){const r=a.forwardRef(({title:s,...i},l)=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...i,ref:l,"aria-hidden":!s,children:[s&&n.jsx("title",{children:s}),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:t})]}));return r.displayName=e,r}const x0=_e("M6.335 4.212c2.293 1.76 4.76 5.327 5.665 7.241.906-1.914 3.372-5.482 5.665-7.241C19.319 2.942 22 1.96 22 5.086c0 .624-.35 5.244-.556 5.994-.713 2.608-3.315 3.273-5.629 2.87 4.045.704 5.074 3.035 2.852 5.366-4.22 4.426-6.066-1.111-6.54-2.53-.086-.26-.126-.382-.127-.278 0-.104-.041.018-.128.278-.473 1.419-2.318 6.956-6.539 2.53-2.222-2.331-1.193-4.662 2.852-5.366-2.314.403-4.916-.262-5.63-2.87C2.35 10.33 2 5.71 2 5.086c0-3.126 2.68-2.144 4.335-.874Z","ButterflyIcon");function ze({scope:t,permissionSets:e,clientTrusted:r=!1,clientFirstParty:s=!1,allowEmail:i,onAllowEmail:l,className:c="",...o}){const m=a.useMemo(()=>Array.from(new Set(t==null?void 0:t.split(" ").map(h=>K.fromString(h)).filter(h=>h!=null))),[t]),u=a.useMemo(()=>new p0(t),[t]);return u.scopes.size===0||u.scopes.size===1&&u.scopes.has("atproto")?null:n.jsxs("div",{className:`flex flex-col gap-2 ${c}`,...o,role:"list",children:[n.jsx(Te,{permissions:u,allowEmail:i,onAllowEmail:l}),n.jsx(qe,{permissions:u}),n.jsx($e,{permissions:u}),n.jsx(Be,{permissions:u}),n.jsx(Ue,{permissions:u}),n.jsx(Pe,{includeScopes:m,permissionSets:e}),n.jsx(Oe,{permissions:u}),(!s||!r)&&n.jsx(Ie,{permissions:u})]})}function Pe({includeScopes:t,permissionSets:e}){return t.map((r,s)=>n.jsx(Le,{includeScope:r,permissionSet:e==null?void 0:e[r.nsid]},s))}function Le({includeScope:t,permissionSet:e}){const{nsid:r}=t,s=a.useMemo(()=>e?new p0(t.toScopes(e)):null,[t,e]);return n.jsx(j,{role:"listitem",image:Z0(r)?n.jsx(x0,{className:"size-6"}):e0(r)?n.jsx(Q,{className:"size-6"}):r.startsWith("com.atproto.moderation.")?n.jsx(m0,{className:"size-6"}):n.jsx(d0,{className:"size-6"}),title:n.jsx(t0,{object:e,property:"title",fallback:r}),description:n.jsx(t0,{object:e,property:"detail",fallback:e!=null&&e.title?r:null}),extra:s?n.jsxs(n.Fragment,{children:[n.jsx(A0,{className:"mt-2",permissions:s}),n.jsx(g0,{className:"mt-2",permissions:s})]}):null,children:n.jsx(d,{id:"ZEwA2R"})})}function Ie({permissions:t}){return a.useMemo(()=>t.allowsIdentity({attr:"*"}),[t])?n.jsx(C0,{role:"status",children:n.jsx(d,{id:"zb3TS0",components:{0:n.jsx("b",{}),1:n.jsx("b",{})}})}):null}function Te({permissions:t,allowEmail:e,onAllowEmail:r}){const{i18n:s,_:i}=w(),l=a.useMemo(()=>["manage","read"].find(c=>t.allowsAccount({attr:"email",action:c})),[t]);return l?n.jsx("label",{className:r?"cursor-pointer":void 0,children:n.jsx(j,{role:"listitem",image:n.jsx(T0,{className:"size-6"}),title:s._({id:"O3oNi5"}),description:l==="manage"?n.jsx(d,{id:"FLm/n9"}):n.jsx(d,{id:"fEvm25"}),append:r&&n.jsx(I0,{className:"m-2",checked:e,onChange:c=>r(c.target.checked)})})}):null}function $e({permissions:t}){const{i18n:e,_:r}=w();return t.allowsAccount({attr:"status",action:"manage"})?n.jsx(j,{role:"listitem",image:n.jsx($0,{className:"size-6"}),title:e._({id:"AeXO77"}),description:e._({id:"NKHn7N"})}):null}function Oe({permissions:t}){return a.useMemo(()=>{if(t.allowsAccount({attr:"repo",action:"manage"}))return!1;let r=!1;for(const s of t.scopes){const i=A.fromString(s);if(i){if(r=!0,j0(i.aud)||i.lxm.every(Y))continue;return!1}const l=g.fromString(s);if(l){if(r=!0,l.collection.every(Y))continue;return!1}}return r},[t])?null:n.jsxs(n.Fragment,{children:[n.jsx(We,{permissions:t}),n.jsx(De,{permissions:t})]})}function Be({permissions:t}){const e=a.useMemo(()=>t.scopes.some(Ke),[t]),r=a.useMemo(()=>t.scopes.some(Ye),[t]);return e||r?n.jsx(j,{role:"listitem",image:n.jsx(x0,{className:"size-6"}),title:"Bluesky",description:e&&r?n.jsx(d,{id:"0ZqxWk"}):n.jsx(d,{id:"YRqkn2"})}):null}function Ue({permissions:t}){const{i18n:e,_:r}=w();return a.useMemo(()=>t.hasTransitionChatBsky||t.scopes.some(Ge),[t])?n.jsx(j,{role:"listitem",image:n.jsx(Q,{className:"size-6"}),title:e._({id:"AHZflp"}),description:e._({id:"yZDyOS"})}):null}function qe({permissions:t}){const{i18n:e,_:r}=w(),s=a.useMemo(()=>t.allowsIdentity({attr:"*"})?"*":t.allowsIdentity({attr:"handle"})?"handle":null,[t]);return s?n.jsx(j,{role:"listitem",image:n.jsx(f0,{className:"size-6"}),title:e._({id:"ePYQjq"}),description:s==="*"?n.jsx(d,{id:"hqGoYC",components:{0:n.jsx("b",{}),1:n.jsx("b",{})}}):n.jsx(d,{id:"lbjZdy",components:{0:n.jsx("b",{})}})}):null}function De({permissions:t}){const{i18n:e,_:r}=w();return t.hasTransitionGeneric?n.jsx(j,{role:"listitem",image:n.jsx(G,{className:"size-6"}),title:e._({id:"ZJUrL+"}),description:n.jsx(d,{id:"17SnJo",components:{0:n.jsx("b",{})}})}):t.scopes.some(s=>A.fromString(s)!=null)?n.jsx(j,{role:"listitem",image:n.jsx(G,{className:"size-6"}),title:e._({id:"ZJUrL+"}),description:e._({id:"RZlEhS"}),extra:n.jsx(A0,{className:"mt-2",permissions:t}),children:n.jsx(d,{id:"C94+Ui"})}):null}function A0({permissions:t,className:e="",...r}){const s=a.useMemo(()=>{const i=new Map;for(const l of t.scopes){const c=A.fromString(l);if(!c)continue;let o=i.get(c.aud);o||i.set(c.aud,o=new Set);for(const m of c.lxm)o.add(m)}return Array.from(i.entries()).sort(([l],[c])=>l.localeCompare(c)).map(([l,c])=>[l,c.has("*")?["*"]:Array.from(c).sort((o,m)=>o.localeCompare(m))])},[t]);return s.length?n.jsxs("table",{className:`w-full table-auto ${e}`,...r,children:[n.jsx("thead",{children:n.jsxs("tr",{className:"text-sm",children:[n.jsx("th",{className:"text-left font-normal",children:n.jsx(d,{id:"b4SMYa"})}),n.jsx("th",{className:"text-left font-normal",children:n.jsx(d,{id:"nURwxX"})})]})}),n.jsx("tbody",{children:s.map(([i,l])=>l.map((c,o,m)=>n.jsxs("tr",{className:"text-xs",children:[n.jsx("td",{className:o>0?"pt-1":void 0,children:n.jsx(Qe,{lxm:c})}),o===0&&n.jsx("td",{className:"align-top",rowSpan:m.length,children:n.jsx(Xe,{aud:i})})]},c)))})]}):null}function We({permissions:t}){const{i18n:e,_:r}=w();return t.hasTransitionGeneric||t.allowsAccount({attr:"repo",action:"manage"})||t.allowsRepo({collection:"*",action:"create"})&&t.allowsRepo({collection:"*",action:"delete"})&&t.allowsRepo({collection:"*",action:"update"})?n.jsx(j,{role:"listitem",image:n.jsx(W,{className:"size-6"}),title:e._({id:"IreQBq"}),description:n.jsx(d,{id:"OuTWqr"})}):t.scopes.some(s=>g.fromString(s)!=null)?n.jsx(j,{role:"listitem",image:n.jsx(W,{className:"size-6"}),title:e._({id:"IreQBq"}),description:e._({id:"xs63gu"}),extra:n.jsx(g0,{className:"mt-2",permissions:t}),children:n.jsx(d,{id:"SCnKXT"})}):null}function g0({permissions:t,className:e,...r}){const{i18n:s,_:i}=w(),l=a.useMemo(()=>{const u=new Map;for(const h of t.scopes){const p=g.fromString(h);if(p)for(const f of p.collection)if(u.has(f)){const H=u.get(f);for(const P of p.action)H[P]=!0}else u.set(f,{create:p.action.includes("create"),update:p.action.includes("update"),delete:p.action.includes("delete")})}return u},[t]),c=a.useMemo(()=>t.hasTransitionGeneric?[new N(["*/*"])]:Array.from(t.scopes.map(u=>N.fromString(u))).filter(u=>u!=null),[t]);if(!l.size)return null;const o=l.get("*"),m=a.useMemo(()=>Array.from(l.entries()).sort(([u],[h])=>u.localeCompare(h)),[l]);return n.jsxs("table",{className:`w-full table-auto text-left ${e}`,...r,children:[n.jsx("thead",{children:n.jsxs("tr",{className:"text-sm",children:[n.jsx("th",{className:"font-normal",children:s._({id:"HKH+W+"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"hYgDIe"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"EkH9pt"})}),n.jsx("th",{className:"text-center font-normal",children:s._({id:"cnGeoo"})})]})}),n.jsxs("tbody",{children:[m.map(([u,h],p)=>n.jsxs("tr",{className:"text-xs",children:[n.jsx("td",{className:p>0?"pt-1":void 0,children:n.jsx(Je,{coll:u})}),n.jsx("td",{className:"text-center",children:o!=null&&o.create||h.create?n.jsx(U,{className:"inline-block size-3"}):null}),n.jsx("td",{className:"text-center",children:o!=null&&o.update||h.update?n.jsx(U,{className:"inline-block size-3"}):null}),n.jsx("td",{className:"text-center",children:o!=null&&o.delete||h.delete?n.jsx(U,{className:"inline-block size-3"}):null})]},u)),c.length>0&&n.jsxs("tr",{children:[n.jsx("td",{className:"pt-2",children:n.jsx(d,{id:"4X0Qky"})}),n.jsx("td",{colSpan:3,className:"pt-2 text-center",children:n.jsx(d,{id:"sCtyHQ"})})]})]})]})}function j0(t){return t==="did:web:bsky.app#bsky_appview"}function Z0(t){return t.startsWith("app.bsky.")}function e0(t){return t.startsWith("chat.bsky.")}function Ge(t){if(t==="transition:chat.bsky")return!0;const e=A.fromString(t);return!e||j0(e.aud)?!1:e.lxm.includes("*")||e.lxm.some(e0)}function Y(t){return t==="*"?!1:t==="com.atproto.moderation.createReport"||Z0(t)||e0(t)}function Ke(t){if(t==="transition:generic")return!0;const e=g.fromString(t);return e?e.collection.includes("*")||e.collection.some(Y):!1}function Ye(t){if(t==="transition:generic")return!0;const e=A.fromString(t);return e?e.lxm.includes("app.bsky.actor.getPreferences")||e.lxm.includes("app.bsky.graph.block")||e.lxm.includes("app.bsky.graph.muteActor")||e.lxm.includes("app.bsky.graph.muteActorList")||e.lxm.includes("app.bsky.graph.muteThread")||e.lxm.includes("app.bsky.graph.unmuteActor")||e.lxm.includes("app.bsky.graph.unmuteActorList")||e.lxm.includes("app.bsky.graph.unmuteThread")||e.lxm.includes("app.bsky.graph.getMutes")||e.lxm.includes("*"):!1}function Qe({lxm:t,...e}){return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"P5xSNt"})}):n.jsx(w0,{...e,nsid:t})}function Xe({aud:t,...e}){if(t.startsWith("did:web:api.bsky.app#"))return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"3GEYP0"})});if(t.startsWith("did:web:api.bsky.chat#"))return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"eglFj/"})});if(t.startsWith("did:web:")&&t.includes("#")){const r=t.slice(8,t.indexOf("#"));return n.jsx(v,{...e,title:t,children:n.jsx(d,{id:"BO3Kuy",values:{domain:r},components:{0:n.jsx("b",{})}})})}return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"UuQciw"})}):n.jsx(y0,{...e,title:t,children:t})}function Je({coll:t,...e}){return t==="*"?n.jsx(v,{...e,children:n.jsx(d,{id:"a6yfpg"})}):n.jsx(w0,{...e,nsid:t})}function v({children:t,className:e="",...r}){return n.jsx("em",{...r,className:`text-text-light ${e}`,children:t})}function w0({nsid:t,...e}){return n.jsx(y0,{...e,children:t.split(".").map((r,s)=>s===0?r:n.jsxs(a.Fragment,{children:[".",n.jsx("wbr",{}),r]},s))})}function y0({children:t,className:e="",...r}){return n.jsx("code",{...r,className:`text-text-light ${e}`,children:t})}function e1(t){return t.startsWith("transition:")}function t1(t){const e=F.fromString(t);return e?e.matches({attr:"email",action:"read"}):!1}function r1(t){return t==null?void 0:t.split(" ").filter(e=>!t1(e)).join(" ")}function n1({clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onConsent:o,onReject:m,onBack:u}){const{i18n:h,_:p}=w(),f=O0(m),H=a.useRef(null),P=H.current,B=!(c!=null&&c.split(" ").some(e1));return n.jsx(B0,{ref:H,onBack:u,error:f.error,submitLabel:n.jsx(d,{id:"Xund1M"}),values:{allowEmail:!0},onValues:()=>f.reset(),validate:({allowEmail:L})=>({scope:B&&!L?r1(c):c}),handler:o,actions:n.jsx(c0,{onClick:L=>{L.preventDefault(),P==null||P.reset(),f.run()},children:n.jsx(d,{id:"u0sEZL"})}),fields:({values:L,setterFor:M0})=>n.jsxs(n.Fragment,{children:[n.jsx(j,{image:n.jsx(ke,{clientId:t,clientMetadata:e,clientTrusted:r}),title:n.jsx(Re,{clientId:t,clientMetadata:e,clientTrusted:r}),description:!c||c==="atproto"?n.jsx(d,{id:"AM8FL/",components:{0:n.jsx(D,{account:l,className:"font-bold"})}}):n.jsx(d,{id:"sUabXh",components:{0:n.jsx(D,{account:l,className:"font-bold"})}}),hint:h._({id:"69Gavs"}),children:c?n.jsxs(n.Fragment,{children:[n.jsx("p",{children:n.jsx(d,{id:"3g3aq0"})}),n.jsx("pre",{className:"bg-light mt-2 overflow-x-auto whitespace-pre-wrap rounded border p-2 text-sm",children:c})]}):null}),n.jsx(ze,{scope:c,permissionSets:i,clientTrusted:r,clientFirstParty:s,allowEmail:B?L.allowEmail:!0,onAllowEmail:B?M0("allowEmail"):void 0}),n.jsx("p",{children:n.jsx(d,{id:"K6KMLt",components:{0:n.jsx("b",{}),1:n.jsx("a",{role:"link",href:e.tos_uri,rel:"nofollow noopener",target:"_blank",className:e.tos_uri?"text-primary underline":void 0}),2:n.jsx("a",{role:"link",href:e.policy_uri,rel:"nofollow noopener",target:"_blank",className:e.policy_uri?"text-primary underline":void 0})}})})]})})}function a1({clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onConsent:o,onReject:m,onBack:u}){return n.jsx(u0,{title:{id:"Xund1M"},subtitle:n.jsx(d,{id:"i7VT2T",components:{0:n.jsx(D,{account:l})}}),children:n.jsx(n1,{clientId:t,clientMetadata:e,clientTrusted:r,clientFirstParty:s,permissionSets:i,account:l,scope:c,onBack:u,onConsent:o,onReject:m})})}const{__authorizeData:x,__customizationData:s1,__sessions:i1}=window,V=new URL(window.location.href);V.pathname==="/oauth/authorize"&&!V.searchParams.has("request_uri")&&(V.search="",V.searchParams.set("client_id",x.clientId),V.searchParams.set("request_uri",x.requestUri),window.history.replaceState(history.state,"",V.pathname+V.search));const l1=document.getElementById("root");var l0;E0.createRoot(l1).render(n.jsx(a.StrictMode,{children:n.jsx(V0,{value:s1,children:n.jsx(S0,{userLocales:(l0=x.uiLocales)==null?void 0:l0.split(" "),children:n.jsx(U0,{children:n.jsx(q0,{fallbackRender:Y0,children:n.jsx(D0,{initialSessions:i1,initialSelected:x.selectedSub,children:n.jsx(c1,{})})})})})})}));function c1(){const t=x.loginHint||void 0,{session:e,setSession:r,api:s}=W0(),[i,l]=a.useState(void 0),[c,o]=a.useState(!1),m=a.useCallback(f=>{console.debug("Redirecting back to client:",f),window.location.replace(f)},[]),u=a.useCallback(f=>{m(f),l(f),setTimeout(()=>o(!0),250)},[m]),h=a.useCallback(async({scope:f})=>{const{url:H}=await s.consent(e.account.sub,f);u(H)},[s,e,u]),p=a.useCallback(async()=>{const{url:f}=await s.reject();u(f)},[s,u]);return n.jsx(G0,{onCancel:p,forcedIdentifier:t,promptMode:x.promptMode,children:e&&!c?n.jsx(a1,{clientId:x.clientId,clientMetadata:x.clientMetadata,clientTrusted:x.clientTrusted,clientFirstParty:x.clientFirstParty,permissionSets:x.permissionSets,account:e.account,scope:x.scope,onConsent:h,onReject:p,onBack:t?void 0:()=>r(null)}):n.jsxs(u0,{title:{id:"UCOd1e"},children:[n.jsx(d,{id:"qq6QQ5"}),n.jsx("br",{}),i&&n.jsx(K0,{startWithCooldown:!0,cooldown:10,action:()=>m(i),children:n.jsx(d,{id:"56n0wU"})})]})})}
2
+ //# sourceMappingURL=authorization-page-BrCP1UEq.js.map