Verifier
\ No newline at end of file
+Verifier
\ No newline at end of file
diff --git a/build/static/js/main.53eb0178.js b/build/static/js/main.53eb0178.js
new file mode 100644
--- /dev/null
+++ b/build/static/js/main.53eb0178.js
@@ -0,0 +1,3 @@
+/*! For license information please see main.53eb0178.js.LICENSE.txt */
+(()=>{var e={3:(e,t)=>{"use strict";function r(e,t){return async r=>t(await e(r))}Object.defineProperty(t,"__esModule",{value:!0}),t.pipeTwo=t.pipe=void 0,t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DID_WEB_PREFIX=void 0,t.isDidWeb=function(e){if("string"!==typeof e)return!1;if(!e.startsWith(t.DID_WEB_PREFIX))return!1;if(":"===e.charAt(t.DID_WEB_PREFIX.length))return!1;try{return s(e),!0}catch{return!1}},t.asDidWeb=function(e){return i(e),e},t.assertDidWeb=i,t.didWebToUrl=s,t.urlToDidWeb=function(e){const t=e.port?`%3A${e.port}`:"",r="/"===e.pathname?"":e.pathname.replaceAll("/",":");return`did:web:${e.hostname}${t}${r}`};const n=r(2915),o=r(9776);function i(e){if("string"!==typeof e)throw new n.InvalidDidError(typeof e,"DID must be a string");if(!e.startsWith(t.DID_WEB_PREFIX))throw new n.InvalidDidError(e,"Invalid did:web prefix");if(":"===e.charAt(t.DID_WEB_PREFIX.length))throw new n.InvalidDidError(e,"did:web MSID must not start with a colon");s(e)}function s(e){(0,o.assertDidMsid)(e,t.DID_WEB_PREFIX.length);const r=t.DID_WEB_PREFIX.length,i=e.indexOf(":",r),s=-1===i?e.slice(r):e.slice(r,i),a=-1===i?"":e.slice(i);try{const e=new URL(`https://${s.replaceAll("%3A",":")}${a.replaceAll(":","/")}`);return"localhost"===e.hostname&&(e.protocol="http:"),e}catch(c){throw new n.InvalidDidError(e,"Invalid Web DID",c)}}t.DID_WEB_PREFIX="did:web:"},28:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REASONAPPEAL=t.REASONOTHER=t.REASONRUDE=t.REASONSEXUAL=t.REASONMISLEADING=t.REASONVIOLATION=t.REASONSPAM=void 0,t.REASONSPAM="com.atproto.moderation.defs#reasonSpam",t.REASONVIOLATION="com.atproto.moderation.defs#reasonViolation",t.REASONMISLEADING="com.atproto.moderation.defs#reasonMisleading",t.REASONSEXUAL="com.atproto.moderation.defs#reasonSexual",t.REASONRUDE="com.atproto.moderation.defs#reasonRude",t.REASONOTHER="com.atproto.moderation.defs#reasonOther",t.REASONAPPEAL="com.atproto.moderation.defs#reasonAppeal"},59:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},65:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DID_PLC_PREFIX=void 0,t.isDidPlc=function(e){if("string"!==typeof e)return!1;if(e.length!==s)return!1;if(!e.startsWith(o))return!1;for(let t=i;te>=97&&e<=122||e>=50&&e<=55},73:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(2741),t),o(r(3691),t),o(r(6907),t),o(r(4920),t),o(r(6229),t),o(r(7867),t),o(r(2867),t),o(r(5889),t)},85:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},125:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(e,t,r,n){switch(r.type){case"boolean":return function(e,t,r,n){const o=typeof n;if("undefined"===o)return"boolean"===typeof r.default?{success:!0,value:r.default}:{success:!1,error:new c.ValidationError(`${t} must be a boolean`)};if("boolean"!==o)return{success:!1,error:new c.ValidationError(`${t} must be a boolean`)};if("boolean"===typeof r.const&&n!==r.const)return{success:!1,error:new c.ValidationError(`${t} must be ${r.const}`)};return{success:!0,value:n}}(0,t,r,n);case"integer":return function(e,t,r,n){const o=typeof n;if("undefined"===o)return"number"===typeof r.default?{success:!0,value:r.default}:{success:!1,error:new c.ValidationError(`${t} must be an integer`)};if(!Number.isInteger(n))return{success:!1,error:new c.ValidationError(`${t} must be an integer`)};if("number"===typeof r.const&&n!==r.const)return{success:!1,error:new c.ValidationError(`${t} must be ${r.const}`)};if(Array.isArray(r.enum)&&!r.enum.includes(n))return{success:!1,error:new c.ValidationError(`${t} must be one of (${r.enum.join("|")})`)};if("number"===typeof r.maximum&&n>r.maximum)return{success:!1,error:new c.ValidationError(`${t} can not be greater than ${r.maximum}`)};if("number"===typeof r.minimum&&nr.maxLength)return{success:!1,error:new c.ValidationError(`${t} must not be longer than ${r.maxLength} characters`)};if("number"===typeof r.minLength&&er.maxGraphemes)return{success:!1,error:new c.ValidationError(`${t} must not be longer than ${r.maxGraphemes} graphemes`)};if("number"===typeof r.minGraphemes&&er.maxLength)return{success:!1,error:new c.ValidationError(`${t} must not be larger than ${r.maxLength} bytes`)};if("number"===typeof r.minLength&&n.byteLength{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mock=void 0;const r="bafyreiclp443lavogvhj3d2ob2cxbfuscni2k5jk7bebjzg7khl3esabwq";t.mock={post(e){let{text:t,facets:r,reply:n,embed:o}=e;return{$type:"app.bsky.feed.post",text:t,facets:r,reply:n,embed:o,langs:["en"],createdAt:(new Date).toISOString()}},postView(e){let{record:t,author:n,embed:o,replyCount:i,repostCount:s,likeCount:a,viewer:c,labels:l}=e;return{$type:"app.bsky.feed.defs#postView",uri:`at://${n.did}/app.bsky.feed.post/fake`,cid:r,author:n,record:t,embed:o,replyCount:i,repostCount:s,likeCount:a,indexedAt:(new Date).toISOString(),viewer:c,labels:l}},embedRecordView(e){let{record:t,author:n,labels:o}=e;return{$type:"app.bsky.embed.record#view",record:{$type:"app.bsky.embed.record#viewRecord",uri:`at://${n.did}/app.bsky.feed.post/fake`,cid:r,author:n,value:t,labels:o,indexedAt:(new Date).toISOString()}}},profileViewBasic(e){let{handle:t,displayName:r,description:n,viewer:o,labels:i}=e;return{did:`did:web:${t}`,handle:t,displayName:r,description:n,viewer:o,labels:i}},actorViewerState(e){let{muted:t,mutedByList:r,blockedBy:n,blocking:o,blockingByList:i,following:s,followedBy:a}=e;return{muted:t,mutedByList:r,blockedBy:n,blocking:o,blockingByList:i,following:s,followedBy:a}},listViewBasic(e){let{name:t}=e;return{uri:"at://did:plc:fake/app.bsky.graph.list/fake",cid:r,name:t,purpose:"app.bsky.graph.defs#modlist",indexedAt:(new Date).toISOString()}},replyNotification(e){let{author:t,record:n,labels:o}=e;return{uri:`at://${t.did}/app.bsky.feed.post/fake`,cid:r,author:t,reason:"reply",reasonSubject:`at://${t.did}/app.bsky.feed.post/fake-parent`,record:n,isRead:!1,indexedAt:(new Date).toISOString(),labels:o}},followNotification(e){let{author:t,subjectDid:n,labels:o}=e;return{uri:`at://${t.did}/app.bsky.graph.follow/fake`,cid:r,author:t,reason:"follow",record:{$type:"app.bsky.graph.follow",createdAt:(new Date).toISOString(),subject:n},isRead:!1,indexedAt:(new Date).toISOString(),labels:o}},label(e){let{val:t,uri:r,src:n}=e;return{src:n||"did:plc:fake-labeler",uri:r,val:t,cts:(new Date).toISOString()}}}},156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestLocalLock=void 0;const r=new Map;t.requestLocalLock=(e,t)=>function(e){return new Promise((t=>{const n=(r.get(e)??Promise.resolve()).then((()=>new Promise((o=>{t((()=>{r.get(e)===n&&r.delete(e),o()}))}))));r.set(e,n)}))}(e).then((async e=>{try{return await t()}finally{e()}}))},180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TAG_REGEX=t.TRAILING_PUNCTUATION_REGEX=t.URL_REGEX=t.MENTION_REGEX=void 0,t.MENTION_REGEX=/(^|\s|\()(@)([a-zA-Z0-9.-]+)(\b)/g,t.URL_REGEX=/(^|\s|\()((https?:\/\/[\S]+)|((?[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gim,t.TRAILING_PUNCTUATION_REGEX=/\p{P}+$/gu,t.TAG_REGEX=/(^|\s)[#\uff03]((?!\ufe0f)[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*[^\d\s\p{P}\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]+[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*)?/gu},224:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BadQueryStringError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"BadQueryString"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BadQueryStringError=o},258:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildLoopbackClientId=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"127.0.0.1";if(!(0,n.isLoopbackHost)(e.hostname))throw new TypeError(`Expected a loopback host, got ${e.hostname}`);const r=`http://${"localhost"===e.hostname?t:e.hostname}${e.port&&!e.port.startsWith(":")?`:${e.port}`:e.port}${e.pathname}`;return`http://localhost${"/"===e.pathname?"":e.pathname}?redirect_uri=${encodeURIComponent(r)}`};const n=r(8511)},268:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModerationUI=void 0;t.ModerationUI=class{constructor(){Object.defineProperty(this,"noOverride",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"filters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"blurs",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"alerts",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"informs",{enumerable:!0,configurable:!0,writable:!0,value:[]})}get filter(){return 0!==this.filters.length}get blur(){return 0!==this.blurs.length}get alert(){return 0!==this.alerts.length}get inform(){return 0!==this.informs.length}}},308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockedByActorError=t.BlockedActorError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("BlockedActor"===e.error)return new o(e);if("BlockedByActor"===e.error)return new i(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlockedActorError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlockedByActorError=i},337:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,function(e){e.errToObj=e=>"string"===typeof e?{message:e}:e||{},e.toString=e=>"string"===typeof e?e:null===e||void 0===e?void 0:e.message}(r||(t.errorUtil=r={}))},341:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AtUri=t.ATP_URI_REGEX=void 0,o(r(5447),t),t.ATP_URI_REGEX=/^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;const i=/^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;class s{constructor(e,t){let r;if(Object.defineProperty(this,"hash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"host",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathname",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"searchParams",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t){if(r=a(t),!r)throw new Error(`Invalid at uri: ${t}`);const n=function(e){const t=i.exec(e);if(t)return{hash:t[3]||"",pathname:t[1]||"",searchParams:new URLSearchParams(t[2]||"")};return}(e);if(!n)throw new Error(`Invalid path: ${e}`);Object.assign(r,n)}else if(r=a(e),!r)throw new Error(`Invalid at uri: ${e}`);this.hash=r.hash,this.host=r.host,this.pathname=r.pathname,this.searchParams=r.searchParams}static make(e,t,r){let n=e;return t&&(n+="/"+t),r&&(n+="/"+r),new s(n)}get protocol(){return"at:"}get origin(){return`at://${this.host}`}get hostname(){return this.host}set hostname(e){this.host=e}get search(){return this.searchParams.toString()}set search(e){this.searchParams=new URLSearchParams(e)}get collection(){return this.pathname.split("/").filter(Boolean)[0]||""}set collection(e){const t=this.pathname.split("/").filter(Boolean);t[0]=e,this.pathname=t.join("/")}get rkey(){return this.pathname.split("/").filter(Boolean)[1]||""}set rkey(e){const t=this.pathname.split("/").filter(Boolean);t[0]||(t[0]="undefined"),t[1]=e,this.pathname=t.join("/")}get href(){return this.toString()}toString(){let e=this.pathname||"/";e.startsWith("/")||(e=`/${e}`);let t=this.searchParams.toString();t&&!t.startsWith("?")&&(t=`?${t}`);let r=this.hash;return r&&!r.startsWith("#")&&(r=`#${r}`),`at://${this.host}${e}${t}${r}`}}function a(e){const r=t.ATP_URI_REGEX.exec(e);if(r)return{hash:r[5]||"",host:r[2]||"",pathname:r[3]||"",searchParams:new URLSearchParams(r[4]||"")}}t.AtUri=s},371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDidError=t.ensureValidDidRegex=t.ensureValidDid=void 0;t.ensureValidDid=e=>{if(!e.startsWith("did:"))throw new r('DID requires "did:" prefix');if(!/^[a-zA-Z0-9._:%-]*$/.test(e))throw new r("Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)");const{length:t,1:n}=e.split(":");if(t<3)throw new r("DID requires prefix, method, and method-specific content");if(!/^[a-z]+$/.test(n))throw new r("DID method must be lower-case letters");if(e.endsWith(":")||e.endsWith("%"))throw new r('DID can not end with ":" or "%"');if(e.length>2048)throw new r("DID is too long (2048 chars max)")};t.ensureValidDidRegex=e=>{if(!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(e))throw new r("DID didn't validate via regex");if(e.length>2048)throw new r("DID is too long (2048 chars max)")};class r extends Error{}t.InvalidDidError=r},373:function(e,t,r){"use strict";var n,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleStoreMemory=void 0;const s=r(6011),a=r(8693),c=Symbol("nullItem"),l=e=>e===c?null:e;t.SimpleStoreMemory=class{constructor(e){let{sizeCalculation:t,...r}=e;n.set(this,void 0),o(this,n,new s.LRUCache({...r,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,sizeCalculation:t?(e,r)=>t(l(e),r):null!=r.maxEntrySize||null!=r.maxSize?a.roughSizeOfObject:void 0}),"f")}get(e){const t=i(this,n,"f").get(e);if(void 0!==t)return l(t)}set(e,t){i(this,n,"f").set(e,(e=>null===e?c:e)(t))}del(e){i(this,n,"f").delete(e)}clear(){i(this,n,"f").clear()}},n=new WeakMap},374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},412:(e,t,r)=>{"use strict";r.r(t),r.d(t,{compare:()=>h,concat:()=>y,equals:()=>m,fromString:()=>ne,toString:()=>oe,xor:()=>ie});var n={};r.r(n),r.d(n,{identity:()=>v});var o={};r.r(o),r.d(o,{base2:()=>E});var i={};r.r(i),r.d(i,{base8:()=>w});var s={};r.r(s),r.d(s,{base10:()=>R});var a={};r.r(a),r.d(a,{base16:()=>A,base16upper:()=>S});var c={};r.r(c),r.d(c,{base36:()=>k,base36upper:()=>T});var l={};r.r(l),r.d(l,{base256emoji:()=>j});var d={};r.r(d),r.d(d,{sha256:()=>K,sha512:()=>M});var u={};r.r(u),r.d(u,{identity:()=>N});var p={};r.r(p),r.d(p,{code:()=>$,decode:()=>q,encode:()=>F,name:()=>z});var f={};function h(e,t){for(let r=0;rt[r])return 1}return e.byteLength>t.byteLength?1:e.byteLengthe+t.length),0));const r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function m(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;rX,decode:()=>J,encode:()=>Z,name:()=>W});var g=r(5555),b=r(4192);const v=(0,g.HT)({prefix:"\0",name:"identity",encode:e=>(0,b.dI)(e),decode:e=>(0,b.sH)(e)}),E=(0,g.yE)({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),w=(0,g.yE)({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),R=(0,g._Q)({prefix:"9",name:"base10",alphabet:"0123456789"}),A=(0,g.yE)({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),S=(0,g.yE)({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var _=r(1808);const k=(0,g._Q)({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),T=(0,g._Q)({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var C=r(6516),L=r(5407);const x=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),P=x.reduce(((e,t,r)=>(e[r]=t,e)),[]),B=x.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const j=(0,g.HT)({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=P[t]),"")},decode:function(e){const t=[];for(const r of e){const e=B[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var D=r(2770);const U=e=>{let{name:t,code:r,encode:n}=e;return new I(t,r,n)};class I{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?D.vt(this.code,t):t.then((e=>D.vt(this.code,e)))}throw Error("Unknown type, must be binary type")}}const O=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),K=U({name:"sha2-256",code:18,encode:O("SHA-256")}),M=U({name:"sha2-512",code:19,encode:O("SHA-512")}),V=b.au,N={code:0,name:"identity",encode:V,digest:e=>D.vt(0,V(e))},z="raw",$=85,F=e=>(0,b.au)(e),q=e=>(0,b.au)(e),G=new TextEncoder,H=new TextDecoder,W="json",X=512,Z=e=>G.encode(JSON.stringify(e)),J=e=>JSON.parse(H.decode(e));r(6571),r(1182);const Q={...n,...o,...i,...s,...a,..._,...c,...C,...L,...l};function Y(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const ee=Y("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),te=Y("ascii","a",(e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=new Uint8Array(e.length);for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=re[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return r.decoder.decode(`${r.prefix}${e}`)}function oe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=re[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return r.encoder.encode(e).substring(1)}function ie(e,t){if(e.length!==t.length)throw new Error("Inputs should have the same length");const r=new Uint8Array(e.length);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchError=void 0;class r extends Error{constructor(e,t,r){super(t,r),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:e})}get expose(){return!0}}t.FetchError=r},438:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidPlcMethod=void 0;const n=r(2741),o=r(6211),i=(0,r(2011).pipe)((0,o.fetchOkProcessor)(),(0,o.fetchJsonProcessor)(/^application\/(did\+ld\+)?json$/),(0,o.fetchJsonZodProcessor)(n.didDocumentValidator));t.DidPlcMethod=class{constructor(e){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"plcDirectoryUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.plcDirectoryUrl=new URL(e?.plcDirectoryUrl||"https://plc.directory/"),this.fetch=(0,o.bindFetch)(e?.fetch)}async resolve(e,t){(0,n.assertDidPlc)(e);const r=new URL(`/${encodeURIComponent(e)}`,this.plcDirectoryUrl);return this.fetch(r,{redirect:"error",headers:{accept:"application/did+ld+json,application/json"},signal:t?.signal}).then(i)}}},478:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecordNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"RecordNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RecordNotFoundError=o},544:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidRecordKeyError=t.isValidRecordKey=t.ensureValidRecordKey=void 0;t.ensureValidRecordKey=e=>{if(e.length>512||e.length<1)throw new r("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(e))throw new r("record key syntax not valid (regex)");if("."===e||".."===e)throw new r('record key can not be "." or ".."')};t.isValidRecordKey=e=>{try{(0,t.ensureValidRecordKey)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};class r extends Error{}t.InvalidRecordKeyError=r},552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoDeactivatedError=t.RepoSuspendedError=t.RepoTakendownError=t.RepoNotFoundError=t.RecordNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("RecordNotFound"===e.error)return new o(e);if("RepoNotFound"===e.error)return new i(e);if("RepoTakendown"===e.error)return new s(e);if("RepoSuspended"===e.error)return new a(e);if("RepoDeactivated"===e.error)return new c(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RecordNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoTakendownError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoSuspendedError=a;class c extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoDeactivatedError=c},554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ids=t.lexicons=t.schemas=t.schemaDict=void 0;const n=r(9559);t.schemaDict={ComAtprotoAdminDefs:{lexicon:1,id:"com.atproto.admin.defs",defs:{statusAttr:{type:"object",required:["applied"],properties:{applied:{type:"boolean"},ref:{type:"string"}}},accountView:{type:"object",required:["did","handle","indexedAt"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},emailConfirmedAt:{type:"string",format:"datetime"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoRef:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},repoBlobRef:{type:"object",required:["did","cid"],properties:{did:{type:"string",format:"did"},cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}},threatSignature:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ComAtprotoAdminDeleteAccount:{lexicon:1,id:"com.atproto.admin.deleteAccount",defs:{main:{type:"procedure",description:"Delete a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}}}},ComAtprotoAdminDisableAccountInvites:{lexicon:1,id:"com.atproto.admin.disableAccountInvites",defs:{main:{type:"procedure",description:"Disable an account from receiving new invite codes, but does not invalidate existing codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for disabled invites."}}}}}}},ComAtprotoAdminDisableInviteCodes:{lexicon:1,id:"com.atproto.admin.disableInviteCodes",defs:{main:{type:"procedure",description:"Disable some set of codes and/or all codes associated with a set of users.",input:{encoding:"application/json",schema:{type:"object",properties:{codes:{type:"array",items:{type:"string"}},accounts:{type:"array",items:{type:"string"}}}}}}}},ComAtprotoAdminEnableAccountInvites:{lexicon:1,id:"com.atproto.admin.enableAccountInvites",defs:{main:{type:"procedure",description:"Re-enable an account's ability to receive invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for enabled invites."}}}}}}},ComAtprotoAdminGetAccountInfo:{lexicon:1,id:"com.atproto.admin.getAccountInfo",defs:{main:{type:"query",description:"Get details about an account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}},ComAtprotoAdminGetAccountInfos:{lexicon:1,id:"com.atproto.admin.getAccountInfos",defs:{main:{type:"query",description:"Get details about some accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["infos"],properties:{infos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminGetInviteCodes:{lexicon:1,id:"com.atproto.admin.getInviteCodes",defs:{main:{type:"query",description:"Get an admin view of invite codes.",parameters:{type:"params",properties:{sort:{type:"string",knownValues:["recent","usage"],default:"recent"},limit:{type:"integer",minimum:1,maximum:500,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{cursor:{type:"string"},codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}}}}},ComAtprotoAdminGetSubjectStatus:{lexicon:1,id:"com.atproto.admin.getSubjectStatus",defs:{main:{type:"query",description:"Get the service-specific admin status of a subject (account, record, or blob).",parameters:{type:"params",properties:{did:{type:"string",format:"did"},uri:{type:"string",format:"at-uri"},blob:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoAdminSearchAccounts:{lexicon:1,id:"com.atproto.admin.searchAccounts",defs:{main:{type:"query",description:"Get list of accounts that matches your search query.",parameters:{type:"params",properties:{email:{type:"string"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminSendEmail:{lexicon:1,id:"com.atproto.admin.sendEmail",defs:{main:{type:"procedure",description:"Send email to a user's account email address.",input:{encoding:"application/json",schema:{type:"object",required:["recipientDid","content","senderDid"],properties:{recipientDid:{type:"string",format:"did"},content:{type:"string"},subject:{type:"string"},senderDid:{type:"string",format:"did"},comment:{type:"string",description:"Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"}}}},output:{encoding:"application/json",schema:{type:"object",required:["sent"],properties:{sent:{type:"boolean"}}}}}}},ComAtprotoAdminUpdateAccountEmail:{lexicon:1,id:"com.atproto.admin.updateAccountEmail",defs:{main:{type:"procedure",description:"Administrative action to update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["account","email"],properties:{account:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},email:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountHandle:{lexicon:1,id:"com.atproto.admin.updateAccountHandle",defs:{main:{type:"procedure",description:"Administrative action to update an account's handle.",input:{encoding:"application/json",schema:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"}}}}}}},ComAtprotoAdminUpdateAccountPassword:{lexicon:1,id:"com.atproto.admin.updateAccountPassword",defs:{main:{type:"procedure",description:"Update the password for a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did","password"],properties:{did:{type:"string",format:"did"},password:{type:"string"}}}}}}},ComAtprotoAdminUpdateSubjectStatus:{lexicon:1,id:"com.atproto.admin.updateSubjectStatus",defs:{main:{type:"procedure",description:"Update the service-specific admin status of a subject (account, record, or blob).",input:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoIdentityGetRecommendedDidCredentials:{lexicon:1,id:"com.atproto.identity.getRecommendedDidCredentials",defs:{main:{type:"query",description:"Describe the credentials that should be included in the DID doc of an account that is migrating to this service.",output:{encoding:"application/json",schema:{type:"object",properties:{rotationKeys:{description:"Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.",type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}}}}},ComAtprotoIdentityRequestPlcOperationSignature:{lexicon:1,id:"com.atproto.identity.requestPlcOperationSignature",defs:{main:{type:"procedure",description:"Request an email with a code to in order to request a signed PLC operation. Requires Auth."}}},ComAtprotoIdentityResolveHandle:{lexicon:1,id:"com.atproto.identity.resolveHandle",defs:{main:{type:"query",description:"Resolves a handle (domain name) to a DID.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The handle to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}}}},ComAtprotoIdentitySignPlcOperation:{lexicon:1,id:"com.atproto.identity.signPlcOperation",defs:{main:{type:"procedure",description:"Signs a PLC operation to update some value(s) in the requesting DID's document.",input:{encoding:"application/json",schema:{type:"object",properties:{token:{description:"A token received through com.atproto.identity.requestPlcOperationSignature",type:"string"},rotationKeys:{type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}},output:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown",description:"A signed DID PLC operation."}}}}}}},ComAtprotoIdentitySubmitPlcOperation:{lexicon:1,id:"com.atproto.identity.submitPlcOperation",defs:{main:{type:"procedure",description:"Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry",input:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown"}}}}}}},ComAtprotoIdentityUpdateHandle:{lexicon:1,id:"com.atproto.identity.updateHandle",defs:{main:{type:"procedure",description:"Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The new handle."}}}}}}},ComAtprotoLabelDefs:{lexicon:1,id:"com.atproto.label.defs",defs:{label:{type:"object",description:"Metadata tag on an atproto resource (eg, repo or record).",required:["src","uri","val","cts"],properties:{ver:{type:"integer",description:"The AT Protocol version of the label object."},src:{type:"string",format:"did",description:"DID of the actor who created this label."},uri:{type:"string",format:"uri",description:"AT URI of the record, repository (account), or other resource that this label applies to."},cid:{type:"string",format:"cid",description:"Optionally, CID specifying the specific version of 'uri' resource this label applies to."},val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."},neg:{type:"boolean",description:"If true, this is a negation label, overwriting a previous label."},cts:{type:"string",format:"datetime",description:"Timestamp when this label was created."},exp:{type:"string",format:"datetime",description:"Timestamp at which this label expires (no longer applies)."},sig:{type:"bytes",description:"Signature of dag-cbor encoded label."}}},selfLabels:{type:"object",description:"Metadata tags on an atproto record, published by the author within the record.",required:["values"],properties:{values:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#selfLabel"},maxLength:10}}},selfLabel:{type:"object",description:"Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",required:["val"],properties:{val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."}}},labelValueDefinition:{type:"object",description:"Declares a label value and its expected interpretations and behaviors.",required:["identifier","severity","blurs","locales"],properties:{identifier:{type:"string",description:"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",maxLength:100,maxGraphemes:100},severity:{type:"string",description:"How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",knownValues:["inform","alert","none"]},blurs:{type:"string",description:"What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",knownValues:["content","media","none"]},defaultSetting:{type:"string",description:"The default setting for this label.",knownValues:["ignore","warn","hide"],default:"warn"},adultOnly:{type:"boolean",description:"Does the user need to have adult content enabled in order to configure this label?"},locales:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinitionStrings"}}}},labelValueDefinitionStrings:{type:"object",description:"Strings which describe the label in the UI, localized into a specific language.",required:["lang","name","description"],properties:{lang:{type:"string",description:"The code of the language these strings are written in.",format:"language"},name:{type:"string",description:"A short human-readable name for the label.",maxGraphemes:64,maxLength:640},description:{type:"string",description:"A longer description of what the label means and why it might be applied.",maxGraphemes:1e4,maxLength:1e5}}},labelValue:{type:"string",knownValues:["!hide","!no-promote","!warn","!no-unauthenticated","dmca-violation","doxxing","porn","sexual","nudity","nsfl","gore"]}}},ComAtprotoLabelQueryLabels:{lexicon:1,id:"com.atproto.label.queryLabels",defs:{main:{type:"query",description:"Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",parameters:{type:"params",required:["uriPatterns"],properties:{uriPatterns:{type:"array",items:{type:"string"},description:"List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."},sources:{type:"array",items:{type:"string",format:"did"},description:"Optional list of label sources (DIDs) to filter on."},limit:{type:"integer",minimum:1,maximum:250,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{cursor:{type:"string"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoLabelSubscribeLabels:{lexicon:1,id:"com.atproto.label.subscribeLabels",defs:{main:{type:"subscription",description:"Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.label.subscribeLabels#labels","lex:com.atproto.label.subscribeLabels#info"]}},errors:[{name:"FutureCursor"}]},labels:{type:"object",required:["seq","labels"],properties:{seq:{type:"integer"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}}}},ComAtprotoLexiconSchema:{lexicon:1,id:"com.atproto.lexicon.schema",defs:{main:{type:"record",description:"Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).",key:"nsid",record:{type:"object",required:["lexicon"],properties:{lexicon:{type:"integer",description:"Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."}}}}}},ComAtprotoModerationCreateReport:{lexicon:1,id:"com.atproto.moderation.createReport",defs:{main:{type:"procedure",description:"Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["reasonType","subject"],properties:{reasonType:{type:"ref",description:"Indicates the broad category of violation the report is for.",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4,description:"Additional context about the content and violation."},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["id","reasonType","subject","reportedBy","createdAt"],properties:{id:{type:"integer"},reasonType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},reportedBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}}}},ComAtprotoModerationDefs:{lexicon:1,id:"com.atproto.moderation.defs",defs:{reasonType:{type:"string",knownValues:["com.atproto.moderation.defs#reasonSpam","com.atproto.moderation.defs#reasonViolation","com.atproto.moderation.defs#reasonMisleading","com.atproto.moderation.defs#reasonSexual","com.atproto.moderation.defs#reasonRude","com.atproto.moderation.defs#reasonOther","com.atproto.moderation.defs#reasonAppeal"]},reasonSpam:{type:"token",description:"Spam: frequent unwanted promotion, replies, mentions"},reasonViolation:{type:"token",description:"Direct violation of server rules, laws, terms of service"},reasonMisleading:{type:"token",description:"Misleading identity, affiliation, or content"},reasonSexual:{type:"token",description:"Unwanted or mislabeled sexual content"},reasonRude:{type:"token",description:"Rude, harassing, explicit, or otherwise unwelcoming behavior"},reasonOther:{type:"token",description:"Other: reports not falling under another report category"},reasonAppeal:{type:"token",description:"Appeal: appeal a previously taken moderation action"}}},ComAtprotoRepoApplyWrites:{lexicon:1,id:"com.atproto.repo.applyWrites",defs:{main:{type:"procedure",description:"Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","writes"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."},writes:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#create","lex:com.atproto.repo.applyWrites#update","lex:com.atproto.repo.applyWrites#delete"],closed:!0}},swapCommit:{type:"string",description:"If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.",format:"cid"}}}},output:{encoding:"application/json",schema:{type:"object",required:[],properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},results:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#createResult","lex:com.atproto.repo.applyWrites#updateResult","lex:com.atproto.repo.applyWrites#deleteResult"],closed:!0}}}}},errors:[{name:"InvalidSwap",description:"Indicates that the 'swapCommit' parameter did not match current commit."}]},create:{type:"object",description:"Operation which creates a new record.",required:["collection","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",maxLength:512},value:{type:"unknown"}}},update:{type:"object",description:"Operation which updates an existing record.",required:["collection","rkey","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string"},value:{type:"unknown"}}},delete:{type:"object",description:"Operation which deletes an existing record.",required:["collection","rkey"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string"}}},createResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},updateResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},deleteResult:{type:"object",required:[],properties:{}}}},ComAtprotoRepoCreateRecord:{lexicon:1,id:"com.atproto.repo.createRecord",defs:{main:{type:"procedure",description:"Create a single new repository record. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","record"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."},record:{type:"unknown",description:"The record itself. Must contain a $type field."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap",description:"Indicates that 'swapCommit' didn't match current repo commit."}]}}},ComAtprotoRepoDefs:{lexicon:1,id:"com.atproto.repo.defs",defs:{commitMeta:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string"}}}}},ComAtprotoRepoDeleteRecord:{lexicon:1,id:"com.atproto.repo.deleteRecord",defs:{main:{type:"procedure",description:"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoDescribeRepo:{lexicon:1,id:"com.atproto.repo.describeRepo",defs:{main:{type:"query",description:"Get information about an account and repository, including the list of collections. Does not require auth.",parameters:{type:"params",required:["repo"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","did","didDoc","collections","handleIsCorrect"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown",description:"The complete DID document for this account."},collections:{type:"array",description:"List of all the collections (NSIDs) for which this repo contains at least one record.",items:{type:"string",format:"nsid"}},handleIsCorrect:{type:"boolean",description:"Indicates if handle is currently valid (resolves bi-directionally)"}}}}}}},ComAtprotoRepoGetRecord:{lexicon:1,id:"com.atproto.repo.getRecord",defs:{main:{type:"query",description:"Get a single record from a repository. Does not require auth.",parameters:{type:"params",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key."},cid:{type:"string",format:"cid",description:"The CID of the version of the record. If not specified, then return the most recent version."}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}},errors:[{name:"RecordNotFound"}]}}},ComAtprotoRepoImportRepo:{lexicon:1,id:"com.atproto.repo.importRepo",defs:{main:{type:"procedure",description:"Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.",input:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoRepoListMissingBlobs:{lexicon:1,id:"com.atproto.repo.listMissingBlobs",defs:{main:{type:"query",description:"Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blobs"],properties:{cursor:{type:"string"},blobs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listMissingBlobs#recordBlob"}}}}}},recordBlob:{type:"object",required:["cid","recordUri"],properties:{cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}}}},ComAtprotoRepoListRecords:{lexicon:1,id:"com.atproto.repo.listRecords",defs:{main:{type:"query",description:"List a range of records in a repository, matching a specific collection. Does not require auth.",parameters:{type:"params",required:["repo","collection"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record type."},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"The number of records to return."},cursor:{type:"string"},rkeyStart:{type:"string",description:"DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)"},rkeyEnd:{type:"string",description:"DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)"},reverse:{type:"boolean",description:"Flag to reverse the order of the returned records."}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{cursor:{type:"string"},records:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listRecords#record"}}}}}},record:{type:"object",required:["uri","cid","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}}},ComAtprotoRepoPutRecord:{lexicon:1,id:"com.atproto.repo.putRecord",defs:{main:{type:"procedure",description:"Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey","record"],nullable:["swapRecord"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."},record:{type:"unknown",description:"The record to write."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoStrongRef:{lexicon:1,id:"com.atproto.repo.strongRef",description:"A URI with a content-hash fingerprint.",defs:{main:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}}},ComAtprotoRepoUploadBlob:{lexicon:1,id:"com.atproto.repo.uploadBlob",defs:{main:{type:"procedure",description:"Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",input:{encoding:"*/*"},output:{encoding:"application/json",schema:{type:"object",required:["blob"],properties:{blob:{type:"blob"}}}}}}},ComAtprotoServerActivateAccount:{lexicon:1,id:"com.atproto.server.activateAccount",defs:{main:{type:"procedure",description:"Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."}}},ComAtprotoServerCheckAccountStatus:{lexicon:1,id:"com.atproto.server.checkAccountStatus",defs:{main:{type:"query",description:"Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.",output:{encoding:"application/json",schema:{type:"object",required:["activated","validDid","repoCommit","repoRev","repoBlocks","indexedRecords","privateStateValues","expectedBlobs","importedBlobs"],properties:{activated:{type:"boolean"},validDid:{type:"boolean"},repoCommit:{type:"string",format:"cid"},repoRev:{type:"string"},repoBlocks:{type:"integer"},indexedRecords:{type:"integer"},privateStateValues:{type:"integer"},expectedBlobs:{type:"integer"},importedBlobs:{type:"integer"}}}}}}},ComAtprotoServerConfirmEmail:{lexicon:1,id:"com.atproto.server.confirmEmail",defs:{main:{type:"procedure",description:"Confirm an email using a token from com.atproto.server.requestEmailConfirmation.",input:{encoding:"application/json",schema:{type:"object",required:["email","token"],properties:{email:{type:"string"},token:{type:"string"}}}},errors:[{name:"AccountNotFound"},{name:"ExpiredToken"},{name:"InvalidToken"},{name:"InvalidEmail"}]}}},ComAtprotoServerCreateAccount:{lexicon:1,id:"com.atproto.server.createAccount",defs:{main:{type:"procedure",description:"Create an account. Implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{email:{type:"string"},handle:{type:"string",format:"handle",description:"Requested handle for the account."},did:{type:"string",format:"did",description:"Pre-existing atproto DID, being imported to a new account."},inviteCode:{type:"string"},verificationCode:{type:"string"},verificationPhone:{type:"string"},password:{type:"string",description:"Initial account password. May need to meet instance-specific password strength requirements."},recoveryKey:{type:"string",description:"DID PLC rotation key (aka, recovery key) to be included in PLC creation operation."},plcOp:{type:"unknown",description:"A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented."}}}},output:{encoding:"application/json",schema:{type:"object",description:"Account login session returned on successful account creation.",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did",description:"The DID of the new account."},didDoc:{type:"unknown",description:"Complete DID document."}}}},errors:[{name:"InvalidHandle"},{name:"InvalidPassword"},{name:"InvalidInviteCode"},{name:"HandleNotAvailable"},{name:"UnsupportedDomain"},{name:"UnresolvableDid"},{name:"IncompatibleDidDoc"}]}}},ComAtprotoServerCreateAppPassword:{lexicon:1,id:"com.atproto.server.createAppPassword",defs:{main:{type:"procedure",description:"Create an App Password.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"A short name for the App Password, to help distinguish them."},privileged:{type:"boolean",description:"If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.server.createAppPassword#appPassword"}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","password","createdAt"],properties:{name:{type:"string"},password:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerCreateInviteCode:{lexicon:1,id:"com.atproto.server.createInviteCode",defs:{main:{type:"procedure",description:"Create an invite code.",input:{encoding:"application/json",schema:{type:"object",required:["useCount"],properties:{useCount:{type:"integer"},forAccount:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["code"],properties:{code:{type:"string"}}}}}}},ComAtprotoServerCreateInviteCodes:{lexicon:1,id:"com.atproto.server.createInviteCodes",defs:{main:{type:"procedure",description:"Create invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["codeCount","useCount"],properties:{codeCount:{type:"integer",default:1},useCount:{type:"integer"},forAccounts:{type:"array",items:{type:"string",format:"did"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.createInviteCodes#accountCodes"}}}}}},accountCodes:{type:"object",required:["account","codes"],properties:{account:{type:"string"},codes:{type:"array",items:{type:"string"}}}}}},ComAtprotoServerCreateSession:{lexicon:1,id:"com.atproto.server.createSession",defs:{main:{type:"procedure",description:"Create an authentication session.",input:{encoding:"application/json",schema:{type:"object",required:["identifier","password"],properties:{identifier:{type:"string",description:"Handle or other identifier supported by the server for the authenticating user."},password:{type:"string"},authFactorToken:{type:"string"},allowTakendown:{type:"boolean",description:"When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned"}}}},output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"},{name:"AuthFactorTokenRequired"}]}}},ComAtprotoServerDeactivateAccount:{lexicon:1,id:"com.atproto.server.deactivateAccount",defs:{main:{type:"procedure",description:"Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",input:{encoding:"application/json",schema:{type:"object",properties:{deleteAfter:{type:"string",format:"datetime",description:"A recommendation to server as to how long they should hold onto the deactivated account before deleting."}}}}}}},ComAtprotoServerDefs:{lexicon:1,id:"com.atproto.server.defs",defs:{inviteCode:{type:"object",required:["code","available","disabled","forAccount","createdBy","createdAt","uses"],properties:{code:{type:"string"},available:{type:"integer"},disabled:{type:"boolean"},forAccount:{type:"string"},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"},uses:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCodeUse"}}}},inviteCodeUse:{type:"object",required:["usedBy","usedAt"],properties:{usedBy:{type:"string",format:"did"},usedAt:{type:"string",format:"datetime"}}}}},ComAtprotoServerDeleteAccount:{lexicon:1,id:"com.atproto.server.deleteAccount",defs:{main:{type:"procedure",description:"Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["did","password","token"],properties:{did:{type:"string",format:"did"},password:{type:"string"},token:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerDeleteSession:{lexicon:1,id:"com.atproto.server.deleteSession",defs:{main:{type:"procedure",description:"Delete the current session. Requires auth."}}},ComAtprotoServerDescribeServer:{lexicon:1,id:"com.atproto.server.describeServer",defs:{main:{type:"query",description:"Describes the server's account creation requirements and capabilities. Implemented by PDS.",output:{encoding:"application/json",schema:{type:"object",required:["did","availableUserDomains"],properties:{inviteCodeRequired:{type:"boolean",description:"If true, an invite code must be supplied to create an account on this instance."},phoneVerificationRequired:{type:"boolean",description:"If true, a phone verification token must be supplied to create an account on this instance."},availableUserDomains:{type:"array",description:"List of domain suffixes that can be used in account handles.",items:{type:"string"}},links:{type:"ref",description:"URLs of service policy documents.",ref:"lex:com.atproto.server.describeServer#links"},contact:{type:"ref",description:"Contact information",ref:"lex:com.atproto.server.describeServer#contact"},did:{type:"string",format:"did"}}}}},links:{type:"object",properties:{privacyPolicy:{type:"string",format:"uri"},termsOfService:{type:"string",format:"uri"}}},contact:{type:"object",properties:{email:{type:"string"}}}}},ComAtprotoServerGetAccountInviteCodes:{lexicon:1,id:"com.atproto.server.getAccountInviteCodes",defs:{main:{type:"query",description:"Get all invite codes for the current account. Requires auth.",parameters:{type:"params",properties:{includeUsed:{type:"boolean",default:!0},createAvailable:{type:"boolean",default:!0,description:"Controls whether any new 'earned' but not 'created' invites should be created."}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}},errors:[{name:"DuplicateCreate"}]}}},ComAtprotoServerGetServiceAuth:{lexicon:1,id:"com.atproto.server.getServiceAuth",defs:{main:{type:"query",description:"Get a signed token on behalf of the requesting DID for the requested service.",parameters:{type:"params",required:["aud"],properties:{aud:{type:"string",format:"did",description:"The DID of the service that the token will be used to authenticate with"},exp:{type:"integer",description:"The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope."},lxm:{type:"string",format:"nsid",description:"Lexicon (XRPC) method to bind the requested token to"}}},output:{encoding:"application/json",schema:{type:"object",required:["token"],properties:{token:{type:"string"}}}},errors:[{name:"BadExpiration",description:"Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."}]}}},ComAtprotoServerGetSession:{lexicon:1,id:"com.atproto.server.getSession",defs:{main:{type:"query",description:"Get information about the current auth session. Requires auth.",output:{encoding:"application/json",schema:{type:"object",required:["handle","did"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}}}}},ComAtprotoServerListAppPasswords:{lexicon:1,id:"com.atproto.server.listAppPasswords",defs:{main:{type:"query",description:"List all App Passwords.",output:{encoding:"application/json",schema:{type:"object",required:["passwords"],properties:{passwords:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.listAppPasswords#appPassword"}}}}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","createdAt"],properties:{name:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerRefreshSession:{lexicon:1,id:"com.atproto.server.refreshSession",defs:{main:{type:"procedure",description:"Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').",output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"Hosting status of the account. If not specified, then assume 'active'.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"}]}}},ComAtprotoServerRequestAccountDelete:{lexicon:1,id:"com.atproto.server.requestAccountDelete",defs:{main:{type:"procedure",description:"Initiate a user account deletion via email."}}},ComAtprotoServerRequestEmailConfirmation:{lexicon:1,id:"com.atproto.server.requestEmailConfirmation",defs:{main:{type:"procedure",description:"Request an email with a code to confirm ownership of email."}}},ComAtprotoServerRequestEmailUpdate:{lexicon:1,id:"com.atproto.server.requestEmailUpdate",defs:{main:{type:"procedure",description:"Request a token in order to update email.",output:{encoding:"application/json",schema:{type:"object",required:["tokenRequired"],properties:{tokenRequired:{type:"boolean"}}}}}}},ComAtprotoServerRequestPasswordReset:{lexicon:1,id:"com.atproto.server.requestPasswordReset",defs:{main:{type:"procedure",description:"Initiate a user account password reset via email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"}}}}}}},ComAtprotoServerReserveSigningKey:{lexicon:1,id:"com.atproto.server.reserveSigningKey",defs:{main:{type:"procedure",description:"Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",input:{encoding:"application/json",schema:{type:"object",properties:{did:{type:"string",format:"did",description:"The DID to reserve a key for."}}}},output:{encoding:"application/json",schema:{type:"object",required:["signingKey"],properties:{signingKey:{type:"string",description:"The public key for the reserved signing key, in did:key serialization."}}}}}}},ComAtprotoServerResetPassword:{lexicon:1,id:"com.atproto.server.resetPassword",defs:{main:{type:"procedure",description:"Reset a user account password using a token.",input:{encoding:"application/json",schema:{type:"object",required:["token","password"],properties:{token:{type:"string"},password:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerRevokeAppPassword:{lexicon:1,id:"com.atproto.server.revokeAppPassword",defs:{main:{type:"procedure",description:"Revoke an App Password by name.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string"}}}}}}},ComAtprotoServerUpdateEmail:{lexicon:1,id:"com.atproto.server.updateEmail",defs:{main:{type:"procedure",description:"Update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"},emailAuthFactor:{type:"boolean"},token:{type:"string",description:"Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed."}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"},{name:"TokenRequired"}]}}},ComAtprotoSyncGetBlob:{lexicon:1,id:"com.atproto.sync.getBlob",defs:{main:{type:"query",description:"Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cid"],properties:{did:{type:"string",format:"did",description:"The DID of the account."},cid:{type:"string",format:"cid",description:"The CID of the blob to fetch"}}},output:{encoding:"*/*"},errors:[{name:"BlobNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetBlocks:{lexicon:1,id:"com.atproto.sync.getBlocks",defs:{main:{type:"query",description:"Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cids"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},cids:{type:"array",items:{type:"string",format:"cid"}}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"BlockNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetCheckout:{lexicon:1,id:"com.atproto.sync.getCheckout",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getRepo instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoSyncGetHead:{lexicon:1,id:"com.atproto.sync.getHead",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getLatestCommit instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"cid"}}}},errors:[{name:"HeadNotFound"}]}}},ComAtprotoSyncGetLatestCommit:{lexicon:1,id:"com.atproto.sync.getLatestCommit",defs:{main:{type:"query",description:"Get the current commit CID & revision of the specified repo. Does not require auth.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string"}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRecord:{lexicon:1,id:"com.atproto.sync.getRecord",defs:{main:{type:"query",description:"Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.",parameters:{type:"params",required:["did","collection","rkey"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},collection:{type:"string",format:"nsid"},rkey:{type:"string",description:"Record Key"},commit:{type:"string",format:"cid",description:"DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit"}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RecordNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepo:{lexicon:1,id:"com.atproto.sync.getRepo",defs:{main:{type:"query",description:"Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",description:"The revision ('rev') of the repo to create a diff from."}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepoStatus:{lexicon:1,id:"com.atproto.sync.getRepoStatus",defs:{main:{type:"query",description:"Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["did","active"],properties:{did:{type:"string",format:"did"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]},rev:{type:"string",description:"Optional field, the current rev of the repo, if active=true"}}}},errors:[{name:"RepoNotFound"}]}}},ComAtprotoSyncListBlobs:{lexicon:1,id:"com.atproto.sync.listBlobs",defs:{main:{type:"query",description:"List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",description:"Optional revision of the repo to list blobs since."},limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["cids"],properties:{cursor:{type:"string"},cids:{type:"array",items:{type:"string",format:"cid"}}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncListRepos:{lexicon:1,id:"com.atproto.sync.listRepos",defs:{main:{type:"query",description:"Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listRepos#repo"}}}}}},repo:{type:"object",required:["did","head","rev"],properties:{did:{type:"string",format:"did"},head:{type:"string",format:"cid",description:"Current repo commit CID"},rev:{type:"string"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}}},ComAtprotoSyncNotifyOfUpdate:{lexicon:1,id:"com.atproto.sync.notifyOfUpdate",defs:{main:{type:"procedure",description:"Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (usually a PDS) that is notifying of update."}}}}}}},ComAtprotoSyncRequestCrawl:{lexicon:1,id:"com.atproto.sync.requestCrawl",defs:{main:{type:"procedure",description:"Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (eg, PDS) that is requesting to be crawled."}}}}}}},ComAtprotoSyncSubscribeRepos:{lexicon:1,id:"com.atproto.sync.subscribeRepos",defs:{main:{type:"subscription",description:"Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.sync.subscribeRepos#commit","lex:com.atproto.sync.subscribeRepos#identity","lex:com.atproto.sync.subscribeRepos#account","lex:com.atproto.sync.subscribeRepos#handle","lex:com.atproto.sync.subscribeRepos#migrate","lex:com.atproto.sync.subscribeRepos#tombstone","lex:com.atproto.sync.subscribeRepos#info"]}},errors:[{name:"FutureCursor"},{name:"ConsumerTooSlow",description:"If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."}]},commit:{type:"object",description:"Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",required:["seq","rebase","tooBig","repo","commit","rev","since","blocks","ops","blobs","time"],nullable:["prev","since"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},rebase:{type:"boolean",description:"DEPRECATED -- unused"},tooBig:{type:"boolean",description:"Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."},repo:{type:"string",format:"did",description:"The repo this event comes from."},commit:{type:"cid-link",description:"Repo commit object CID."},prev:{type:"cid-link",description:"DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability."},rev:{type:"string",description:"The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."},since:{type:"string",description:"The rev of the last emitted commit from this repo (if any)."},blocks:{type:"bytes",description:"CAR file containing relevant blocks, as a diff since the previous repo state.",maxLength:1e6},ops:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.subscribeRepos#repoOp",description:"List of repo mutation operations in this commit (eg, records created, updated, or deleted)."},maxLength:200},blobs:{type:"array",items:{type:"cid-link",description:"List of new blobs (by CID) referenced by records in this commit."}},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},identity:{type:"object",description:"Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",required:["seq","did","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},handle:{type:"string",format:"handle",description:"The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."}}},account:{type:"object",description:"Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",required:["seq","did","time","active"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",description:"If active=false, this optional field indicates a reason for why the account is not active.",knownValues:["takendown","suspended","deleted","deactivated"]}}},handle:{type:"object",description:"DEPRECATED -- Use #identity event instead",required:["seq","did","handle","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},time:{type:"string",format:"datetime"}}},migrate:{type:"object",description:"DEPRECATED -- Use #account event instead",required:["seq","did","migrateTo","time"],nullable:["migrateTo"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},migrateTo:{type:"string"},time:{type:"string",format:"datetime"}}},tombstone:{type:"object",description:"DEPRECATED -- Use #account event instead",required:["seq","did","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}},repoOp:{type:"object",description:"A repo operation, ie a mutation of a single record.",required:["action","path","cid"],nullable:["cid"],properties:{action:{type:"string",knownValues:["create","update","delete"]},path:{type:"string"},cid:{type:"cid-link",description:"For creates and updates, the new record CID. For deletions, null."}}}}},ComAtprotoTempAddReservedHandle:{lexicon:1,id:"com.atproto.temp.addReservedHandle",defs:{main:{type:"procedure",description:"Add a handle to the set of reserved handles.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ComAtprotoTempCheckSignupQueue:{lexicon:1,id:"com.atproto.temp.checkSignupQueue",defs:{main:{type:"query",description:"Check accounts location in signup queue.",output:{encoding:"application/json",schema:{type:"object",required:["activated"],properties:{activated:{type:"boolean"},placeInQueue:{type:"integer"},estimatedTimeMs:{type:"integer"}}}}}}},ComAtprotoTempFetchLabels:{lexicon:1,id:"com.atproto.temp.fetchLabels",defs:{main:{type:"query",description:"DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",parameters:{type:"params",properties:{since:{type:"integer"},limit:{type:"integer",minimum:1,maximum:250,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoTempRequestPhoneVerification:{lexicon:1,id:"com.atproto.temp.requestPhoneVerification",defs:{main:{type:"procedure",description:"Request a verification code to be sent to the supplied phone number",input:{encoding:"application/json",schema:{type:"object",required:["phoneNumber"],properties:{phoneNumber:{type:"string"}}}}}}},AppBskyActorDefs:{lexicon:1,id:"app.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},createdAt:{type:"string",format:"datetime"}}},profileView:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},profileViewDetailed:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},banner:{type:"string",format:"uri"},followersCount:{type:"integer"},followsCount:{type:"integer"},postsCount:{type:"integer"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},joinedViaStarterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},profileAssociated:{type:"object",properties:{lists:{type:"integer"},feedgens:{type:"integer"},starterPacks:{type:"integer"},labeler:{type:"boolean"},chat:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedChat"}}},profileAssociatedChat:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",properties:{muted:{type:"boolean"},mutedByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},blockedBy:{type:"boolean"},blocking:{type:"string",format:"at-uri"},blockingByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},following:{type:"string",format:"at-uri"},followedBy:{type:"string",format:"at-uri"},knownFollowers:{type:"ref",ref:"lex:app.bsky.actor.defs#knownFollowers"}}},knownFollowers:{type:"object",description:"The subject's followers whom you also follow",required:["count","followers"],properties:{count:{type:"integer"},followers:{type:"array",minLength:0,maxLength:5,items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},preferences:{type:"array",items:{type:"union",refs:["lex:app.bsky.actor.defs#adultContentPref","lex:app.bsky.actor.defs#contentLabelPref","lex:app.bsky.actor.defs#savedFeedsPref","lex:app.bsky.actor.defs#savedFeedsPrefV2","lex:app.bsky.actor.defs#personalDetailsPref","lex:app.bsky.actor.defs#feedViewPref","lex:app.bsky.actor.defs#threadViewPref","lex:app.bsky.actor.defs#interestsPref","lex:app.bsky.actor.defs#mutedWordsPref","lex:app.bsky.actor.defs#hiddenPostsPref","lex:app.bsky.actor.defs#bskyAppStatePref","lex:app.bsky.actor.defs#labelersPref","lex:app.bsky.actor.defs#postInteractionSettingsPref"]}},adultContentPref:{type:"object",required:["enabled"],properties:{enabled:{type:"boolean",default:!1}}},contentLabelPref:{type:"object",required:["label","visibility"],properties:{labelerDid:{type:"string",description:"Which labeler does this preference apply to? If undefined, applies globally.",format:"did"},label:{type:"string"},visibility:{type:"string",knownValues:["ignore","show","warn","hide"]}}},savedFeed:{type:"object",required:["id","type","value","pinned"],properties:{id:{type:"string"},type:{type:"string",knownValues:["feed","list","timeline"]},value:{type:"string"},pinned:{type:"boolean"}}},savedFeedsPrefV2:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#savedFeed"}}}},savedFeedsPref:{type:"object",required:["pinned","saved"],properties:{pinned:{type:"array",items:{type:"string",format:"at-uri"}},saved:{type:"array",items:{type:"string",format:"at-uri"}},timelineIndex:{type:"integer"}}},personalDetailsPref:{type:"object",properties:{birthDate:{type:"string",format:"datetime",description:"The birth date of account owner."}}},feedViewPref:{type:"object",required:["feed"],properties:{feed:{type:"string",description:"The URI of the feed, or an identifier which describes the feed."},hideReplies:{type:"boolean",description:"Hide replies in the feed."},hideRepliesByUnfollowed:{type:"boolean",description:"Hide replies in the feed if they are not by followed users.",default:!0},hideRepliesByLikeCount:{type:"integer",description:"Hide replies in the feed if they do not have this number of likes."},hideReposts:{type:"boolean",description:"Hide reposts in the feed."},hideQuotePosts:{type:"boolean",description:"Hide quote posts in the feed."}}},threadViewPref:{type:"object",properties:{sort:{type:"string",description:"Sorting mode for threads.",knownValues:["oldest","newest","most-likes","random","hotness"]},prioritizeFollowedUsers:{type:"boolean",description:"Show followed users at the top of all replies."}}},interestsPref:{type:"object",required:["tags"],properties:{tags:{type:"array",maxLength:100,items:{type:"string",maxLength:640,maxGraphemes:64},description:"A list of tags which describe the account owner's interests gathered during onboarding."}}},mutedWordTarget:{type:"string",knownValues:["content","tag"],maxLength:640,maxGraphemes:64},mutedWord:{type:"object",description:"A word that the account owner has muted.",required:["value","targets"],properties:{id:{type:"string"},value:{type:"string",description:"The muted word itself.",maxLength:1e4,maxGraphemes:1e3},targets:{type:"array",description:"The intended targets of the muted word.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWordTarget"}},actorTarget:{type:"string",description:"Groups of users to apply the muted word to. If undefined, applies to all users.",knownValues:["all","exclude-following"],default:"all"},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the muted word will expire and no longer be applied."}}},mutedWordsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWord"},description:"A list of words the account owner has muted."}}},hiddenPostsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"string",format:"at-uri"},description:"A list of URIs of posts the account owner has hidden."}}},labelersPref:{type:"object",required:["labelers"],properties:{labelers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#labelerPrefItem"}}}},labelerPrefItem:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},bskyAppStatePref:{description:"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",type:"object",properties:{activeProgressGuide:{type:"ref",ref:"lex:app.bsky.actor.defs#bskyAppProgressGuide"},queuedNudges:{description:"An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",type:"array",maxLength:1e3,items:{type:"string",maxLength:100}},nuxs:{description:"Storage for NUXs the user has encountered.",type:"array",maxLength:100,items:{type:"ref",ref:"lex:app.bsky.actor.defs#nux"}}}},bskyAppProgressGuide:{description:"If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",type:"object",required:["guide"],properties:{guide:{type:"string",maxLength:100}}},nux:{type:"object",description:"A new user experiences (NUX) storage object",required:["id","completed"],properties:{id:{type:"string",maxLength:100},completed:{type:"boolean",default:!1},data:{description:"Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",type:"string",maxLength:3e3,maxGraphemes:300},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the NUX will expire and should be considered completed."}}},postInteractionSettingsPref:{type:"object",description:"Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",required:[],properties:{threadgateAllowRules:{description:"Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},postgateEmbeddingRules:{description:"Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}}},AppBskyActorGetPreferences:{lexicon:1,id:"app.bsky.actor.getPreferences",defs:{main:{type:"query",description:"Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorGetProfile:{lexicon:1,id:"app.bsky.actor.getProfile",defs:{main:{type:"query",description:"Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Handle or DID of account to fetch profile of."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}},AppBskyActorGetProfiles:{lexicon:1,id:"app.bsky.actor.getProfiles",defs:{main:{type:"query",description:"Get detailed profile views of multiple actors.",parameters:{type:"params",required:["actors"],properties:{actors:{type:"array",items:{type:"string",format:"at-identifier"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["profiles"],properties:{profiles:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}}}}},AppBskyActorGetSuggestions:{lexicon:1,id:"app.bsky.actor.getSuggestions",defs:{main:{type:"query",description:"Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyActorProfile:{lexicon:1,id:"app.bsky.actor.profile",defs:{main:{type:"record",description:"A declaration of a Bluesky account profile.",key:"literal:self",record:{type:"object",properties:{displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",description:"Free-form profile description text.",maxGraphemes:256,maxLength:2560},avatar:{type:"blob",description:"Small image to be displayed next to posts from account. AKA, 'profile picture'",accept:["image/png","image/jpeg"],maxSize:1e6},banner:{type:"blob",description:"Larger horizontal image to display behind profile view.",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",description:"Self-label values, specific to the Bluesky application, on the overall account.",refs:["lex:com.atproto.label.defs#selfLabels"]},joinedViaStarterPack:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyActorPutPreferences:{lexicon:1,id:"app.bsky.actor.putPreferences",defs:{main:{type:"procedure",description:"Set the private preferences attached to the account.",input:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorSearchActors:{lexicon:1,id:"app.bsky.actor.searchActors",defs:{main:{type:"query",description:"Find actors (profiles) matching search criteria. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyActorSearchActorsTypeahead:{lexicon:1,id:"app.bsky.actor.searchActorsTypeahead",defs:{main:{type:"query",description:"Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query prefix; not a full query string."},limit:{type:"integer",minimum:1,maximum:100,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}}}}}},AppBskyEmbedDefs:{lexicon:1,id:"app.bsky.embed.defs",defs:{aspectRatio:{type:"object",description:"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",required:["width","height"],properties:{width:{type:"integer",minimum:1},height:{type:"integer",minimum:1}}}}},AppBskyEmbedExternal:{lexicon:1,id:"app.bsky.embed.external",defs:{main:{type:"object",description:"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#external"}}},external:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"blob",accept:["image/*"],maxSize:1e6}}},view:{type:"object",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternal"}}},viewExternal:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"string",format:"uri"}}}}},AppBskyEmbedImages:{lexicon:1,id:"app.bsky.embed.images",description:"A set of images embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#image"},maxLength:4}}},image:{type:"object",required:["image","alt"],properties:{image:{type:"blob",accept:["image/*"],maxSize:1e6},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},view:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#viewImage"},maxLength:4}}},viewImage:{type:"object",required:["thumb","fullsize","alt"],properties:{thumb:{type:"string",format:"uri",description:"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},fullsize:{type:"string",format:"uri",description:"Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyEmbedRecord:{lexicon:1,id:"app.bsky.embed.record",description:"A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.",defs:{main:{type:"object",required:["record"],properties:{record:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},view:{type:"object",required:["record"],properties:{record:{type:"union",refs:["lex:app.bsky.embed.record#viewRecord","lex:app.bsky.embed.record#viewNotFound","lex:app.bsky.embed.record#viewBlocked","lex:app.bsky.embed.record#viewDetached","lex:app.bsky.feed.defs#generatorView","lex:app.bsky.graph.defs#listView","lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.graph.defs#starterPackViewBasic"]}}},viewRecord:{type:"object",required:["uri","cid","author","value","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},value:{type:"unknown",description:"The record data itself."},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},embeds:{type:"array",items:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]}},indexedAt:{type:"string",format:"datetime"}}},viewNotFound:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},viewBlocked:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},viewDetached:{type:"object",required:["uri","detached"],properties:{uri:{type:"string",format:"at-uri"},detached:{type:"boolean",const:!0}}}}},AppBskyEmbedRecordWithMedia:{lexicon:1,id:"app.bsky.embed.recordWithMedia",description:"A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.",defs:{main:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record"},media:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external"]}}},view:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record#view"},media:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view"]}}}}},AppBskyEmbedVideo:{lexicon:1,id:"app.bsky.embed.video",description:"A video embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["video"],properties:{video:{type:"blob",accept:["video/mp4"],maxSize:5e7},captions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.video#caption"},maxLength:20},alt:{type:"string",description:"Alt text description of the video, for accessibility.",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},caption:{type:"object",required:["lang","file"],properties:{lang:{type:"string",format:"language"},file:{type:"blob",accept:["text/vtt"],maxSize:2e4}}},view:{type:"object",required:["cid","playlist"],properties:{cid:{type:"string",format:"cid"},playlist:{type:"string",format:"uri"},thumbnail:{type:"string",format:"uri"},alt:{type:"string",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyFeedDefs:{lexicon:1,id:"app.bsky.feed.defs",defs:{postView:{type:"object",required:["uri","cid","author","record","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},record:{type:"unknown"},embed:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},indexedAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",properties:{repost:{type:"string",format:"at-uri"},like:{type:"string",format:"at-uri"},threadMuted:{type:"boolean"},replyDisabled:{type:"boolean"},embeddingDisabled:{type:"boolean"},pinned:{type:"boolean"}}},threadContext:{type:"object",description:"Metadata about this post within the context of the thread it is in.",properties:{rootAuthorLike:{type:"string",format:"at-uri"}}},feedViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},reply:{type:"ref",ref:"lex:app.bsky.feed.defs#replyRef"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#reasonRepost","lex:app.bsky.feed.defs#reasonPin"]},feedContext:{type:"string",description:"Context provided by feed generator that may be passed back alongside interactions.",maxLength:2e3}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},parent:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},grandparentAuthor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic",description:"When parent is a reply to another post, this is the author of that post."}}},reasonRepost:{type:"object",required:["by","indexedAt"],properties:{by:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},indexedAt:{type:"string",format:"datetime"}}},reasonPin:{type:"object",properties:{}},threadViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},parent:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},replies:{type:"array",items:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]}},threadContext:{type:"ref",ref:"lex:app.bsky.feed.defs#threadContext"}}},notFoundPost:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},blockedPost:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},blockedAuthor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"}}},generatorView:{type:"object",required:["uri","cid","did","creator","displayName","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},did:{type:"string",format:"did"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},displayName:{type:"string"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},likeCount:{type:"integer",minimum:0},acceptsInteractions:{type:"boolean"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorViewerState"},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},indexedAt:{type:"string",format:"datetime"}}},generatorViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},skeletonFeedPost:{type:"object",required:["post"],properties:{post:{type:"string",format:"at-uri"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#skeletonReasonRepost","lex:app.bsky.feed.defs#skeletonReasonPin"]},feedContext:{type:"string",description:"Context that will be passed through to client and may be passed to feed generator back alongside interactions.",maxLength:2e3}}},skeletonReasonRepost:{type:"object",required:["repost"],properties:{repost:{type:"string",format:"at-uri"}}},skeletonReasonPin:{type:"object",properties:{}},threadgateView:{type:"object",properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"}}}},interaction:{type:"object",properties:{item:{type:"string",format:"at-uri"},event:{type:"string",knownValues:["app.bsky.feed.defs#requestLess","app.bsky.feed.defs#requestMore","app.bsky.feed.defs#clickthroughItem","app.bsky.feed.defs#clickthroughAuthor","app.bsky.feed.defs#clickthroughReposter","app.bsky.feed.defs#clickthroughEmbed","app.bsky.feed.defs#interactionSeen","app.bsky.feed.defs#interactionLike","app.bsky.feed.defs#interactionRepost","app.bsky.feed.defs#interactionReply","app.bsky.feed.defs#interactionQuote","app.bsky.feed.defs#interactionShare"]},feedContext:{type:"string",description:"Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",maxLength:2e3}}},requestLess:{type:"token",description:"Request that less content like the given feed item be shown in the feed"},requestMore:{type:"token",description:"Request that more content like the given feed item be shown in the feed"},clickthroughItem:{type:"token",description:"User clicked through to the feed item"},clickthroughAuthor:{type:"token",description:"User clicked through to the author of the feed item"},clickthroughReposter:{type:"token",description:"User clicked through to the reposter of the feed item"},clickthroughEmbed:{type:"token",description:"User clicked through to the embedded content of the feed item"},contentModeUnspecified:{type:"token",description:"Declares the feed generator returns any types of posts."},contentModeVideo:{type:"token",description:"Declares the feed generator returns posts containing app.bsky.embed.video embeds."},interactionSeen:{type:"token",description:"Feed item was seen by user"},interactionLike:{type:"token",description:"User liked the feed item"},interactionRepost:{type:"token",description:"User reposted the feed item"},interactionReply:{type:"token",description:"User replied to the feed item"},interactionQuote:{type:"token",description:"User quoted the feed item"},interactionShare:{type:"token",description:"User shared the feed item"}}},AppBskyFeedDescribeFeedGenerator:{lexicon:1,id:"app.bsky.feed.describeFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).",output:{encoding:"application/json",schema:{type:"object",required:["did","feeds"],properties:{did:{type:"string",format:"did"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#feed"}},links:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#links"}}}}},feed:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},links:{type:"object",properties:{privacyPolicy:{type:"string"},termsOfService:{type:"string"}}}}},AppBskyFeedGenerator:{lexicon:1,id:"app.bsky.feed.generator",defs:{main:{type:"record",description:"Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.",key:"any",record:{type:"object",required:["did","displayName","createdAt"],properties:{did:{type:"string",format:"did"},displayName:{type:"string",maxGraphemes:24,maxLength:240},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},acceptsInteractions:{type:"boolean",description:"Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions"},labels:{type:"union",description:"Self-label values",refs:["lex:com.atproto.label.defs#selfLabels"]},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedGetActorFeeds:{lexicon:1,id:"app.bsky.feed.getActorFeeds",defs:{main:{type:"query",description:"Get a list of feeds (feed generator records) created by the actor (in the actor's repo).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetActorLikes:{lexicon:1,id:"app.bsky.feed.getActorLikes",defs:{main:{type:"query",description:"Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetAuthorFeed:{lexicon:1,id:"app.bsky.feed.getAuthorFeed",defs:{main:{type:"query",description:"Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},filter:{type:"string",description:"Combinations of post/repost types to include in response.",knownValues:["posts_with_replies","posts_no_replies","posts_with_media","posts_and_author_threads","posts_with_video"],default:"posts_with_replies"},includePins:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetFeed:{lexicon:1,id:"app.bsky.feed.getFeed",defs:{main:{type:"query",description:"Get a hydrated feed from an actor's selected feed generator. Implemented by App View.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetFeedGenerator:{lexicon:1,id:"app.bsky.feed.getFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator. Implemented by AppView.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"AT-URI of the feed generator record."}}},output:{encoding:"application/json",schema:{type:"object",required:["view","isOnline","isValid"],properties:{view:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"},isOnline:{type:"boolean",description:"Indicates whether the feed generator service has been online recently, or else seems to be inactive."},isValid:{type:"boolean",description:"Indicates whether the feed generator service is compatible with the record declaration."}}}}}}},AppBskyFeedGetFeedGenerators:{lexicon:1,id:"app.bsky.feed.getFeedGenerators",defs:{main:{type:"query",description:"Get information about a list of feed generators.",parameters:{type:"params",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetFeedSkeleton:{lexicon:1,id:"app.bsky.feed.getFeedSkeleton",defs:{main:{type:"query",description:"Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"Reference to feed generator record describing the specific feed being requested."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#skeletonFeedPost"}}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetLikes:{lexicon:1,id:"app.bsky.feed.getLikes",defs:{main:{type:"query",description:"Get like records which reference a subject (by AT-URI and CID).",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"AT-URI of the subject (eg, a post record)."},cid:{type:"string",format:"cid",description:"CID of the subject record (aka, specific version of record), to filter likes."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","likes"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},likes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.getLikes#like"}}}}}},like:{type:"object",required:["indexedAt","createdAt","actor"],properties:{indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},actor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}},AppBskyFeedGetListFeed:{lexicon:1,id:"app.bsky.feed.getListFeed",defs:{main:{type:"query",description:"Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownList"}]}}},AppBskyFeedGetPostThread:{lexicon:1,id:"app.bsky.feed.getPostThread",defs:{main:{type:"query",description:"Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record."},depth:{type:"integer",description:"How many levels of reply depth should be included in response.",default:6,minimum:0,maximum:1e3},parentHeight:{type:"integer",description:"How many levels of parent (and grandparent, etc) post to include.",default:80,minimum:0,maximum:1e3}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}}},errors:[{name:"NotFound"}]}}},AppBskyFeedGetPosts:{lexicon:1,id:"app.bsky.feed.getPosts",defs:{main:{type:"query",description:"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",description:"List of post AT-URIs to return hydrated views for.",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetQuotes:{lexicon:1,id:"app.bsky.feed.getQuotes",defs:{main:{type:"query",description:"Get a list of quotes for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to quotes of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","posts"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetRepostedBy:{lexicon:1,id:"app.bsky.feed.getRepostedBy",defs:{main:{type:"query",description:"Get a list of reposts for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to reposts of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","repostedBy"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},repostedBy:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyFeedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.feed.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds (feed generators) for the requesting account.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetTimeline:{lexicon:1,id:"app.bsky.feed.getTimeline",defs:{main:{type:"query",description:"Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.",parameters:{type:"params",properties:{algorithm:{type:"string",description:"Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}}}}},AppBskyFeedLike:{lexicon:1,id:"app.bsky.feed.like",defs:{main:{type:"record",description:"Record declaring a 'like' of a piece of subject content.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedPost:{lexicon:1,id:"app.bsky.feed.post",defs:{main:{type:"record",description:"Record containing a Bluesky post.",key:"tid",record:{type:"object",required:["text","createdAt"],properties:{text:{type:"string",maxLength:3e3,maxGraphemes:300,description:"The primary post content. May be an empty string, if there are embeds."},entities:{type:"array",description:"DEPRECATED: replaced by app.bsky.richtext.facet.",items:{type:"ref",ref:"lex:app.bsky.feed.post#entity"}},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},reply:{type:"ref",ref:"lex:app.bsky.feed.post#replyRef"},embed:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external","lex:app.bsky.embed.record","lex:app.bsky.embed.recordWithMedia"]},langs:{type:"array",description:"Indicates human language of post primary text content.",maxLength:3,items:{type:"string",format:"language"}},labels:{type:"union",description:"Self-label values for this post. Effectively content warnings.",refs:["lex:com.atproto.label.defs#selfLabels"]},tags:{type:"array",description:"Additional hashtags, in addition to any included in post text and facets.",maxLength:8,items:{type:"string",maxLength:640,maxGraphemes:64}},createdAt:{type:"string",format:"datetime",description:"Client-declared timestamp when this post was originally created."}}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},parent:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},entity:{type:"object",description:"Deprecated: use facets instead.",required:["index","type","value"],properties:{index:{type:"ref",ref:"lex:app.bsky.feed.post#textSlice"},type:{type:"string",description:"Expected values are 'mention' and 'link'."},value:{type:"string"}}},textSlice:{type:"object",description:"Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.",required:["start","end"],properties:{start:{type:"integer",minimum:0},end:{type:"integer",minimum:0}}}}},AppBskyFeedPostgate:{lexicon:1,id:"app.bsky.feed.postgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{createdAt:{type:"string",format:"datetime"},post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},detachedEmbeddingUris:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of AT-URIs embedding this post that the author has detached from."},embeddingRules:{description:"List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}},disableRule:{type:"object",description:"Disables embedding of this post.",properties:{}}}},AppBskyFeedRepost:{lexicon:1,id:"app.bsky.feed.repost",defs:{main:{description:"Record representing a 'repost' of an existing Bluesky post.",type:"record",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedSearchPosts:{lexicon:1,id:"app.bsky.feed.searchPosts",defs:{main:{type:"query",description:"Find posts matching search criteria, returning views of those posts.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyFeedSendInteractions:{lexicon:1,id:"app.bsky.feed.sendInteractions",defs:{main:{type:"procedure",description:"Send information about interactions with feed items back to the feed generator that served them.",input:{encoding:"application/json",schema:{type:"object",required:["interactions"],properties:{interactions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#interaction"}}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},AppBskyFeedThreadgate:{lexicon:1,id:"app.bsky.feed.threadgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},allow:{description:"List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},createdAt:{type:"string",format:"datetime"},hiddenReplies:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of hidden reply URIs."}}}},mentionRule:{type:"object",description:"Allow replies from actors mentioned in your post.",properties:{}},followerRule:{type:"object",description:"Allow replies from actors who follow you.",properties:{}},followingRule:{type:"object",description:"Allow replies from actors you follow.",properties:{}},listRule:{type:"object",description:"Allow replies from actors on a list.",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}},AppBskyGraphBlock:{lexicon:1,id:"app.bsky.graph.block",defs:{main:{type:"record",description:"Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did",description:"DID of the account to be blocked."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphDefs:{lexicon:1,id:"app.bsky.graph.defs",defs:{listViewBasic:{type:"object",required:["uri","cid","name","purpose"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listView:{type:"object",required:["uri","cid","creator","name","purpose","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listItemView:{type:"object",required:["uri","subject"],properties:{uri:{type:"string",format:"at-uri"},subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}},starterPackView:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},listItemsSample:{type:"array",maxLength:12,items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},starterPackViewBasic:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},listItemCount:{type:"integer",minimum:0},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},listPurpose:{type:"string",knownValues:["app.bsky.graph.defs#modlist","app.bsky.graph.defs#curatelist","app.bsky.graph.defs#referencelist"]},modlist:{type:"token",description:"A list of actors to apply an aggregate moderation action (mute/block) on."},curatelist:{type:"token",description:"A list of actors used for curation purposes such as list feeds or interaction gating."},referencelist:{type:"token",description:"A list of actors used for only for reference purposes such as within a starter pack."},listViewerState:{type:"object",properties:{muted:{type:"boolean"},blocked:{type:"string",format:"at-uri"}}},notFoundActor:{type:"object",description:"indicates that a handle or DID could not be resolved",required:["actor","notFound"],properties:{actor:{type:"string",format:"at-identifier"},notFound:{type:"boolean",const:!0}}},relationship:{type:"object",description:"lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",required:["did"],properties:{did:{type:"string",format:"did"},following:{type:"string",format:"at-uri",description:"if the actor follows this DID, this is the AT-URI of the follow record"},followedBy:{type:"string",format:"at-uri",description:"if the actor is followed by this DID, contains the AT-URI of the follow record"}}}}},AppBskyGraphFollow:{lexicon:1,id:"app.bsky.graph.follow",defs:{main:{type:"record",description:"Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphGetActorStarterPacks:{lexicon:1,id:"app.bsky.graph.getActorStarterPacks",defs:{main:{type:"query",description:"Get a list of starter packs created by the actor.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetBlocks:{lexicon:1,id:"app.bsky.graph.getBlocks",defs:{main:{type:"query",description:"Enumerates which accounts the requesting account is currently blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blocks"],properties:{cursor:{type:"string"},blocks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollowers:{lexicon:1,id:"app.bsky.graph.getFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollows:{lexicon:1,id:"app.bsky.graph.getFollows",defs:{main:{type:"query",description:"Enumerates accounts which a specified account (actor) follows.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","follows"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},follows:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetKnownFollowers:{lexicon:1,id:"app.bsky.graph.getKnownFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor) and are followed by the viewer.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetList:{lexicon:1,id:"app.bsky.graph.getList",defs:{main:{type:"query",description:"Gets a 'view' (with additional context) of a specified list.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the list record to hydrate."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["list","items"],properties:{cursor:{type:"string"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}}}}},AppBskyGraphGetListBlocks:{lexicon:1,id:"app.bsky.graph.getListBlocks",defs:{main:{type:"query",description:"Get mod lists that the requesting account (actor) is blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListMutes:{lexicon:1,id:"app.bsky.graph.getListMutes",defs:{main:{type:"query",description:"Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetLists:{lexicon:1,id:"app.bsky.graph.getLists",defs:{main:{type:"query",description:"Enumerates the lists created by a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to enumerate lists from."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetMutes:{lexicon:1,id:"app.bsky.graph.getMutes",defs:{main:{type:"query",description:"Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["mutes"],properties:{cursor:{type:"string"},mutes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetRelationships:{lexicon:1,id:"app.bsky.graph.getRelationships",defs:{main:{type:"query",description:"Enumerates public relationships between one account, and a list of other accounts. Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Primary account requesting relationships for."},others:{type:"array",description:"List of 'other' accounts to be related back to the primary.",maxLength:30,items:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"object",required:["relationships"],properties:{actor:{type:"string",format:"did"},relationships:{type:"array",items:{type:"union",refs:["lex:app.bsky.graph.defs#relationship","lex:app.bsky.graph.defs#notFoundActor"]}}}}},errors:[{name:"ActorNotFound",description:"the primary actor at-identifier could not be resolved"}]}}},AppBskyGraphGetStarterPack:{lexicon:1,id:"app.bsky.graph.getStarterPack",defs:{main:{type:"query",description:"Gets a view of a starter pack.",parameters:{type:"params",required:["starterPack"],properties:{starterPack:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the starter pack record."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}},AppBskyGraphGetStarterPacks:{lexicon:1,id:"app.bsky.graph.getStarterPacks",defs:{main:{type:"query",description:"Get views for a list of starter packs.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetSuggestedFollowsByActor:{lexicon:1,id:"app.bsky.graph.getSuggestedFollowsByActor",defs:{main:{type:"query",description:"Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},isFallback:{type:"boolean",description:"If true, response has fallen-back to generic results, and is not scoped using relativeToDid",default:!1},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyGraphList:{lexicon:1,id:"app.bsky.graph.list",defs:{main:{type:"record",description:"Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",key:"tid",record:{type:"object",required:["name","purpose","createdAt"],properties:{purpose:{type:"ref",description:"Defines the purpose of the list (aka, moderation-oriented or curration-oriented)",ref:"lex:app.bsky.graph.defs#listPurpose"},name:{type:"string",maxLength:64,minLength:1,description:"Display name for list; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListblock:{lexicon:1,id:"app.bsky.graph.listblock",defs:{main:{type:"record",description:"Record representing a block relationship against an entire an entire list of accounts (actors).",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the mod list record."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListitem:{lexicon:1,id:"app.bsky.graph.listitem",defs:{main:{type:"record",description:"Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",key:"tid",record:{type:"object",required:["subject","list","createdAt"],properties:{subject:{type:"string",format:"did",description:"The account which is included on the list."},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record (app.bsky.graph.list)."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphMuteActor:{lexicon:1,id:"app.bsky.graph.muteActor",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphMuteActorList:{lexicon:1,id:"app.bsky.graph.muteActorList",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphMuteThread:{lexicon:1,id:"app.bsky.graph.muteThread",defs:{main:{type:"procedure",description:"Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphSearchStarterPacks:{lexicon:1,id:"app.bsky.graph.searchStarterPacks",defs:{main:{type:"query",description:"Find starter packs matching search criteria. Does not require auth.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphStarterpack:{lexicon:1,id:"app.bsky.graph.starterpack",defs:{main:{type:"record",description:"Record defining a starter pack of actors and feeds for new users.",key:"tid",record:{type:"object",required:["name","list","createdAt"],properties:{name:{type:"string",maxGraphemes:50,maxLength:500,minLength:1,description:"Display name for starter pack; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.graph.starterpack#feedItem"}},createdAt:{type:"string",format:"datetime"}}}},feedItem:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}}},AppBskyGraphUnmuteActor:{lexicon:1,id:"app.bsky.graph.unmuteActor",defs:{main:{type:"procedure",description:"Unmutes the specified account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphUnmuteActorList:{lexicon:1,id:"app.bsky.graph.unmuteActorList",defs:{main:{type:"procedure",description:"Unmutes the specified list of accounts. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphUnmuteThread:{lexicon:1,id:"app.bsky.graph.unmuteThread",defs:{main:{type:"procedure",description:"Unmutes the specified thread. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyLabelerDefs:{lexicon:1,id:"app.bsky.labeler.defs",defs:{labelerView:{type:"object",required:["uri","cid","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},labelerViewDetailed:{type:"object",required:["uri","cid","creator","policies","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},labelerViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},labelerPolicies:{type:"object",required:["labelValues"],properties:{labelValues:{type:"array",description:"The label values which this labeler publishes. May include global or custom labels.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValue"}},labelValueDefinitions:{type:"array",description:"Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinition"}}}}}},AppBskyLabelerGetServices:{lexicon:1,id:"app.bsky.labeler.getServices",defs:{main:{type:"query",description:"Get information about a list of labeler services.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},detailed:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["views"],properties:{views:{type:"array",items:{type:"union",refs:["lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.labeler.defs#labelerViewDetailed"]}}}}}}}},AppBskyLabelerService:{lexicon:1,id:"app.bsky.labeler.service",defs:{main:{type:"record",description:"A declaration of the existence of labeler service.",key:"literal:self",record:{type:"object",required:["policies","createdAt"],properties:{policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyNotificationGetUnreadCount:{lexicon:1,id:"app.bsky.notification.getUnreadCount",defs:{main:{type:"query",description:"Count the number of unread notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["count"],properties:{count:{type:"integer"}}}}}}},AppBskyNotificationListNotifications:{lexicon:1,id:"app.bsky.notification.listNotifications",defs:{main:{type:"query",description:"Enumerate notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{reasons:{description:"Notification reasons to include in response.",type:"array",items:{type:"string",description:"A reason that matches the reason property of #notification."}},limit:{type:"integer",minimum:1,maximum:100,default:50},priority:{type:"boolean"},cursor:{type:"string"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["notifications"],properties:{cursor:{type:"string"},notifications:{type:"array",items:{type:"ref",ref:"lex:app.bsky.notification.listNotifications#notification"}},priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}}}},notification:{type:"object",required:["uri","cid","author","reason","record","isRead","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},reason:{type:"string",description:"Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'.",knownValues:["like","repost","follow","mention","reply","quote","starterpack-joined"]},reasonSubject:{type:"string",format:"at-uri"},record:{type:"unknown"},isRead:{type:"boolean"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}},AppBskyNotificationPutPreferences:{lexicon:1,id:"app.bsky.notification.putPreferences",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["priority"],properties:{priority:{type:"boolean"}}}}}}},AppBskyNotificationRegisterPush:{lexicon:1,id:"app.bsky.notification.registerPush",defs:{main:{type:"procedure",description:"Register to receive push notifications, via a specified service, for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"}}}}}}},AppBskyNotificationUpdateSeen:{lexicon:1,id:"app.bsky.notification.updateSeen",defs:{main:{type:"procedure",description:"Notify server that the requesting account has seen notifications. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["seenAt"],properties:{seenAt:{type:"string",format:"datetime"}}}}}}},AppBskyRichtextFacet:{lexicon:1,id:"app.bsky.richtext.facet",defs:{main:{type:"object",description:"Annotation of a sub-string within rich text.",required:["index","features"],properties:{index:{type:"ref",ref:"lex:app.bsky.richtext.facet#byteSlice"},features:{type:"array",items:{type:"union",refs:["lex:app.bsky.richtext.facet#mention","lex:app.bsky.richtext.facet#link","lex:app.bsky.richtext.facet#tag"]}}}},mention:{type:"object",description:"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",required:["did"],properties:{did:{type:"string",format:"did"}}},link:{type:"object",description:"Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",required:["uri"],properties:{uri:{type:"string",format:"uri"}}},tag:{type:"object",description:"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",required:["tag"],properties:{tag:{type:"string",maxLength:640,maxGraphemes:64}}},byteSlice:{type:"object",description:"Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",required:["byteStart","byteEnd"],properties:{byteStart:{type:"integer",minimum:0},byteEnd:{type:"integer",minimum:0}}}}},AppBskyUnspeccedDefs:{lexicon:1,id:"app.bsky.unspecced.defs",defs:{skeletonSearchPost:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},skeletonSearchActor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},skeletonSearchStarterPack:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},trendingTopic:{type:"object",required:["topic","link"],properties:{topic:{type:"string"},displayName:{type:"string"},description:{type:"string"},link:{type:"string"}}}}},AppBskyUnspeccedGetConfig:{lexicon:1,id:"app.bsky.unspecced.getConfig",defs:{main:{type:"query",description:"Get miscellaneous runtime configuration.",output:{encoding:"application/json",schema:{type:"object",required:[],properties:{checkEmailConfirmed:{type:"boolean"}}}}}}},AppBskyUnspeccedGetPopularFeedGenerators:{lexicon:1,id:"app.bsky.unspecced.getPopularFeedGenerators",defs:{main:{type:"query",description:"An unspecced view of globally popular feed generators.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},query:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetSuggestionsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestionsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},relativeToDid:{type:"string",format:"did",description:"DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}},relativeToDid:{type:"string",format:"did",description:"DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer."},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetTaggedSuggestions:{lexicon:1,id:"app.bsky.unspecced.getTaggedSuggestions",defs:{main:{type:"query",description:"Get a list of suggestions (feeds and users) tagged with categories",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getTaggedSuggestions#suggestion"}}}}}},suggestion:{type:"object",required:["tag","subjectType","subject"],properties:{tag:{type:"string"},subjectType:{type:"string",knownValues:["actor","feed"]},subject:{type:"string",format:"uri"}}}}},AppBskyUnspeccedGetTrendingTopics:{lexicon:1,id:"app.bsky.unspecced.getTrendingTopics",defs:{main:{type:"query",description:"Get a list of trending topics",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["topics","suggested"],properties:{topics:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}},suggested:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}}}}}}}},AppBskyUnspeccedSearchActorsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchActorsSkeleton",defs:{main:{type:"query",description:"Backend Actors (profile) search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},typeahead:{type:"boolean",description:"If true, acts as fast/simple 'typeahead' query."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchPostsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchPostsSkeleton",defs:{main:{type:"query",description:"Backend Posts search, returns only skeleton",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchPost"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchStarterPacksSkeleton",defs:{main:{type:"query",description:"Backend Starter Pack search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchStarterPack"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyVideoDefs:{lexicon:1,id:"app.bsky.video.defs",defs:{jobStatus:{type:"object",required:["jobId","did","state"],properties:{jobId:{type:"string"},did:{type:"string",format:"did"},state:{type:"string",description:"The state of the video processing job. All values not listed as a known value indicate that the job is in process.",knownValues:["JOB_STATE_COMPLETED","JOB_STATE_FAILED"]},progress:{type:"integer",minimum:0,maximum:100,description:"Progress within the current processing state."},blob:{type:"blob"},error:{type:"string"},message:{type:"string"}}}}},AppBskyVideoGetJobStatus:{lexicon:1,id:"app.bsky.video.getJobStatus",defs:{main:{type:"query",description:"Get status details for a video processing job.",parameters:{type:"params",required:["jobId"],properties:{jobId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},AppBskyVideoGetUploadLimits:{lexicon:1,id:"app.bsky.video.getUploadLimits",defs:{main:{type:"query",description:"Get video upload limits for the authenticated user.",output:{encoding:"application/json",schema:{type:"object",required:["canUpload"],properties:{canUpload:{type:"boolean"},remainingDailyVideos:{type:"integer"},remainingDailyBytes:{type:"integer"},message:{type:"string"},error:{type:"string"}}}}}}},AppBskyVideoUploadVideo:{lexicon:1,id:"app.bsky.video.uploadVideo",defs:{main:{type:"procedure",description:"Upload a video to be processed then stored on the PDS.",input:{encoding:"video/mp4"},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},ChatBskyActorDeclaration:{lexicon:1,id:"chat.bsky.actor.declaration",defs:{main:{type:"record",description:"A declaration of a Bluesky chat account.",key:"literal:self",record:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}}}}},ChatBskyActorDefs:{lexicon:1,id:"chat.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},chatDisabled:{type:"boolean",description:"Set to true when the actor cannot actively participate in converations"}}}}},ChatBskyActorDeleteAccount:{lexicon:1,id:"chat.bsky.actor.deleteAccount",defs:{main:{type:"procedure",output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ChatBskyActorExportAccountData:{lexicon:1,id:"chat.bsky.actor.exportAccountData",defs:{main:{type:"query",output:{encoding:"application/jsonl"}}}},ChatBskyConvoDefs:{lexicon:1,id:"chat.bsky.convo.defs",defs:{messageRef:{type:"object",required:["did","messageId","convoId"],properties:{did:{type:"string",format:"did"},convoId:{type:"string"},messageId:{type:"string"}}},messageInput:{type:"object",required:["text"],properties:{text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record"]}}},messageView:{type:"object",required:["id","rev","text","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record#view"]},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},deletedMessageView:{type:"object",required:["id","rev","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},messageViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},convoView:{type:"object",required:["id","rev","members","muted","unreadCount"],properties:{id:{type:"string"},rev:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}},lastMessage:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},muted:{type:"boolean"},opened:{type:"boolean"},unreadCount:{type:"integer"}}},logBeginConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logLeaveConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logCreateMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logDeleteMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}},ChatBskyConvoDeleteMessageForSelf:{lexicon:1,id:"chat.bsky.convo.deleteMessageForSelf",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#deletedMessageView"}}}}},ChatBskyConvoGetConvo:{lexicon:1,id:"chat.bsky.convo.getConvo",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoForMembers:{lexicon:1,id:"chat.bsky.convo.getConvoForMembers",defs:{main:{type:"query",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetLog:{lexicon:1,id:"chat.bsky.convo.getLog",defs:{main:{type:"query",parameters:{type:"params",required:[],properties:{cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["logs"],properties:{cursor:{type:"string"},logs:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#logBeginConvo","lex:chat.bsky.convo.defs#logLeaveConvo","lex:chat.bsky.convo.defs#logCreateMessage","lex:chat.bsky.convo.defs#logDeleteMessage"]}}}}}}}},ChatBskyConvoGetMessages:{lexicon:1,id:"chat.bsky.convo.getMessages",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{cursor:{type:"string"},messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyConvoLeaveConvo:{lexicon:1,id:"chat.bsky.convo.leaveConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convoId","rev"],properties:{convoId:{type:"string"},rev:{type:"string"}}}}}}},ChatBskyConvoListConvos:{lexicon:1,id:"chat.bsky.convo.listConvos",defs:{main:{type:"query",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convos"],properties:{cursor:{type:"string"},convos:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}}},ChatBskyConvoMuteConvo:{lexicon:1,id:"chat.bsky.convo.muteConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoSendMessage:{lexicon:1,id:"chat.bsky.convo.sendMessage",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}},ChatBskyConvoSendMessageBatch:{lexicon:1,id:"chat.bsky.convo.sendMessageBatch",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",maxLength:100,items:{type:"ref",ref:"lex:chat.bsky.convo.sendMessageBatch#batchItem"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}}},batchItem:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}}},ChatBskyConvoUnmuteConvo:{lexicon:1,id:"chat.bsky.convo.unmuteConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoUpdateRead:{lexicon:1,id:"chat.bsky.convo.updateRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyModerationGetActorMetadata:{lexicon:1,id:"chat.bsky.moderation.getActorMetadata",defs:{main:{type:"query",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["day","month","all"],properties:{day:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},month:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},all:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"}}}}},metadata:{type:"object",required:["messagesSent","messagesReceived","convos","convosStarted"],properties:{messagesSent:{type:"integer"},messagesReceived:{type:"integer"},convos:{type:"integer"},convosStarted:{type:"integer"}}}}},ChatBskyModerationGetMessageContext:{lexicon:1,id:"chat.bsky.moderation.getMessageContext",defs:{main:{type:"query",parameters:{type:"params",required:["messageId"],properties:{convoId:{type:"string",description:"Conversation that the message is from. NOTE: this field will eventually be required."},messageId:{type:"string"},before:{type:"integer",default:5},after:{type:"integer",default:5}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyModerationUpdateActorAccess:{lexicon:1,id:"chat.bsky.moderation.updateActorAccess",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["actor","allowAccess"],properties:{actor:{type:"string",format:"did"},allowAccess:{type:"boolean"},ref:{type:"string"}}}}}}},ToolsOzoneCommunicationCreateTemplate:{lexicon:1,id:"tools.ozone.communication.createTemplate",defs:{main:{type:"procedure",description:"Administrative action to create a new, re-usable communication (email for now) template.",input:{encoding:"application/json",schema:{type:"object",required:["subject","contentMarkdown","name"],properties:{name:{type:"string",description:"Name of the template."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},lang:{type:"string",format:"language",description:"Message language."},createdBy:{type:"string",format:"did",description:"DID of the user who is creating the template."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneCommunicationDefs:{lexicon:1,id:"tools.ozone.communication.defs",defs:{templateView:{type:"object",required:["id","name","contentMarkdown","disabled","lastUpdatedBy","createdAt","updatedAt"],properties:{id:{type:"string"},name:{type:"string",description:"Name of the template."},subject:{type:"string",description:"Content of the template, can contain markdown and variable placeholders."},contentMarkdown:{type:"string",description:"Subject of the message, used in emails."},disabled:{type:"boolean"},lang:{type:"string",format:"language",description:"Message language."},lastUpdatedBy:{type:"string",format:"did",description:"DID of the user who last updated the template."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneCommunicationDeleteTemplate:{lexicon:1,id:"tools.ozone.communication.deleteTemplate",defs:{main:{type:"procedure",description:"Delete a communication template.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string"}}}}}}},ToolsOzoneCommunicationListTemplates:{lexicon:1,id:"tools.ozone.communication.listTemplates",defs:{main:{type:"query",description:"Get list of all communication templates.",output:{encoding:"application/json",schema:{type:"object",required:["communicationTemplates"],properties:{communicationTemplates:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}}}}}}}},ToolsOzoneCommunicationUpdateTemplate:{lexicon:1,id:"tools.ozone.communication.updateTemplate",defs:{main:{type:"procedure",description:"Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",description:"ID of the template to be updated."},name:{type:"string",description:"Name of the template."},lang:{type:"string",format:"language",description:"Message language."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},updatedBy:{type:"string",format:"did",description:"DID of the user who is updating the template."},disabled:{type:"boolean"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneModerationDefs:{lexicon:1,id:"tools.ozone.moderation.defs",defs:{modEventView:{type:"object",required:["id","event","subject","subjectBlobCids","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},subjectBlobCids:{type:"array",items:{type:"string"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},creatorHandle:{type:"string"},subjectHandle:{type:"string"}}},modEventViewDetail:{type:"object",required:["id","event","subject","subjectBlobs","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoView","lex:tools.ozone.moderation.defs#repoViewNotFound","lex:tools.ozone.moderation.defs#recordView","lex:tools.ozone.moderation.defs#recordViewNotFound"]},subjectBlobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}},subjectStatusView:{type:"object",required:["id","subject","createdAt","updatedAt","reviewState"],properties:{id:{type:"integer"},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},hosting:{type:"union",refs:["lex:tools.ozone.moderation.defs#accountHosting","lex:tools.ozone.moderation.defs#recordHosting"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},subjectRepoHandle:{type:"string"},updatedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the last update was made to the moderation status of the subject"},createdAt:{type:"string",format:"datetime",description:"Timestamp referencing the first moderation status impacting event was emitted on the subject"},reviewState:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectReviewState"},comment:{type:"string",description:"Sticky comment on the subject."},priorityScore:{type:"integer",description:"Numeric value representing the level of priority. Higher score means higher priority.",minimum:0,maximum:100},muteUntil:{type:"string",format:"datetime"},muteReportingUntil:{type:"string",format:"datetime"},lastReviewedBy:{type:"string",format:"did"},lastReviewedAt:{type:"string",format:"datetime"},lastReportedAt:{type:"string",format:"datetime"},lastAppealedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the author of the subject appealed a moderation action"},takendown:{type:"boolean"},appealed:{type:"boolean",description:"True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."},suspendUntil:{type:"string",format:"datetime"},tags:{type:"array",items:{type:"string"}},accountStats:{description:"Statistics related to the account subject",type:"ref",ref:"lex:tools.ozone.moderation.defs#accountStats"},recordsStats:{description:"Statistics related to the record subjects authored by the subject's account",type:"ref",ref:"lex:tools.ozone.moderation.defs#recordsStats"}}},accountStats:{description:"Statistics about a particular account subject",type:"object",properties:{reportCount:{description:"Total number of reports on the account",type:"integer"},appealCount:{description:"Total number of appeals against a moderation action on the account",type:"integer"},suspendCount:{description:"Number of times the account was suspended",type:"integer"},escalateCount:{description:"Number of times the account was escalated",type:"integer"},takedownCount:{description:"Number of times the account was taken down",type:"integer"}}},recordsStats:{description:"Statistics about a set of record subject items",type:"object",properties:{totalReports:{description:"Cumulative sum of the number of reports on the items in the set",type:"integer"},reportedCount:{description:"Number of items that were reported at least once",type:"integer"},escalatedCount:{description:"Number of items that were escalated at least once",type:"integer"},appealedCount:{description:"Number of items that were appealed at least once",type:"integer"},subjectCount:{description:"Total number of item in the set",type:"integer"},pendingCount:{description:'Number of item currently in "reviewOpen" or "reviewEscalated" state',type:"integer"},processedCount:{description:'Number of item currently in "reviewNone" or "reviewClosed" state',type:"integer"},takendownCount:{description:"Number of item currently taken down",type:"integer"}}},subjectReviewState:{type:"string",knownValues:["lex:tools.ozone.moderation.defs#reviewOpen","lex:tools.ozone.moderation.defs#reviewEscalated","lex:tools.ozone.moderation.defs#reviewClosed","lex:tools.ozone.moderation.defs#reviewNone"]},reviewOpen:{type:"token",description:"Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator"},reviewEscalated:{type:"token",description:"Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator"},reviewClosed:{type:"token",description:"Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator"},reviewNone:{type:"token",description:"Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it"},modEventTakedown:{type:"object",description:"Take down a subject permanently or temporarily",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."}}},modEventReverseTakedown:{type:"object",description:"Revert take down action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventResolveAppeal:{type:"object",description:"Resolve appeal on a subject",properties:{comment:{type:"string",description:"Describe resolution."}}},modEventComment:{type:"object",description:"Add a comment to a subject",required:["comment"],properties:{comment:{type:"string"},sticky:{type:"boolean",description:"Make the comment persistent on the subject"}}},modEventReport:{type:"object",description:"Report a subject",required:["reportType"],properties:{comment:{type:"string"},isReporterMuted:{type:"boolean",description:"Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject."},reportType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}}},modEventLabel:{type:"object",description:"Apply/Negate labels on a subject",required:["createLabelVals","negateLabelVals"],properties:{comment:{type:"string"},createLabelVals:{type:"array",items:{type:"string"}},negateLabelVals:{type:"array",items:{type:"string"}},durationInHours:{type:"integer",description:"Indicates how long the label will remain on the subject. Only applies on labels that are being added."}}},modEventPriorityScore:{type:"object",description:"Set priority score of the subject. Higher score means higher priority.",required:["score"],properties:{comment:{type:"string"},score:{type:"integer",minimum:0,maximum:100}}},modEventAcknowledge:{type:"object",properties:{comment:{type:"string"},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."}}},modEventEscalate:{type:"object",properties:{comment:{type:"string"}}},modEventMute:{type:"object",description:"Mute incoming reports on a subject",required:["durationInHours"],properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the subject should remain muted."}}},modEventUnmute:{type:"object",description:"Unmute action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventMuteReporter:{type:"object",description:"Mute incoming reports from an account",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the account should remain muted. Falsy value here means a permanent mute."}}},modEventUnmuteReporter:{type:"object",description:"Unmute incoming reports from an account",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventEmail:{type:"object",description:"Keep a log of outgoing email to a user",required:["subjectLine"],properties:{subjectLine:{type:"string",description:"The subject line of the email sent to the user."},content:{type:"string",description:"The content of the email sent to the user."},comment:{type:"string",description:"Additional comment about the outgoing comm."}}},modEventDivert:{type:"object",description:"Divert a record's blobs to a 3rd party service for further scanning/tagging",properties:{comment:{type:"string"}}},modEventTag:{type:"object",description:"Add/Remove a tag on a subject",required:["add","remove"],properties:{add:{type:"array",items:{type:"string"},description:"Tags to be added to the subject. If already exists, won't be duplicated."},remove:{type:"array",items:{type:"string"},description:"Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated."},comment:{type:"string",description:"Additional comment about added/removed tags."}}},accountEvent:{type:"object",description:"Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","active"],properties:{comment:{type:"string"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",knownValues:["unknown","deactivated","deleted","takendown","suspended","tombstoned"]},timestamp:{type:"string",format:"datetime"}}},identityEvent:{type:"object",description:"Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp"],properties:{comment:{type:"string"},handle:{type:"string",format:"handle"},pdsHost:{type:"string",format:"uri"},tombstone:{type:"boolean"},timestamp:{type:"string",format:"datetime"}}},recordEvent:{type:"object",description:"Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","op"],properties:{comment:{type:"string"},op:{type:"string",knownValues:["create","update","delete"]},cid:{type:"string",format:"cid"},timestamp:{type:"string",format:"datetime"}}},repoView:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewDetail:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},emailConfirmedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewNotFound:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},recordView:{type:"object",required:["uri","cid","value","blobCids","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobCids:{type:"array",items:{type:"string",format:"cid"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewDetail:{type:"object",required:["uri","cid","value","blobs","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewNotFound:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},moderation:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},moderationDetail:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},blobView:{type:"object",required:["cid","mimeType","size","createdAt"],properties:{cid:{type:"string",format:"cid"},mimeType:{type:"string"},size:{type:"integer"},createdAt:{type:"string",format:"datetime"},details:{type:"union",refs:["lex:tools.ozone.moderation.defs#imageDetails","lex:tools.ozone.moderation.defs#videoDetails"]},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"}}},imageDetails:{type:"object",required:["width","height"],properties:{width:{type:"integer"},height:{type:"integer"}}},videoDetails:{type:"object",required:["width","height","length"],properties:{width:{type:"integer"},height:{type:"integer"},length:{type:"integer"}}},accountHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["takendown","suspended","deleted","deactivated","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},reactivatedAt:{type:"string",format:"datetime"}}},recordHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["deleted","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneModerationEmitEvent:{lexicon:1,id:"tools.ozone.moderation.emitEvent",defs:{main:{type:"procedure",description:"Take a moderation action on an actor.",input:{encoding:"application/json",schema:{type:"object",required:["event","subject","createdBy"],properties:{event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},createdBy:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}},errors:[{name:"SubjectHasAction"}]}}},ToolsOzoneModerationGetEvent:{lexicon:1,id:"tools.ozone.moderation.getEvent",defs:{main:{type:"query",description:"Get details about a moderation event.",parameters:{type:"params",required:["id"],properties:{id:{type:"integer"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventViewDetail"}}}}},ToolsOzoneModerationGetRecord:{lexicon:1,id:"tools.ozone.moderation.getRecord",defs:{main:{type:"query",description:"Get details about a record.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}},errors:[{name:"RecordNotFound"}]}}},ToolsOzoneModerationGetRecords:{lexicon:1,id:"tools.ozone.moderation.getRecords",defs:{main:{type:"query",description:"Get details about some records.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",maxLength:100,items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{records:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#recordViewDetail","lex:tools.ozone.moderation.defs#recordViewNotFound"]}}}}}}}},ToolsOzoneModerationGetRepo:{lexicon:1,id:"tools.ozone.moderation.getRepo",defs:{main:{type:"query",description:"Get details about a repository.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"}},errors:[{name:"RepoNotFound"}]}}},ToolsOzoneModerationGetRepos:{lexicon:1,id:"tools.ozone.moderation.getRepos",defs:{main:{type:"query",description:"Get details about some repositories.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{repos:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}}}}},ToolsOzoneModerationQueryEvents:{lexicon:1,id:"tools.ozone.moderation.queryEvents",defs:{main:{type:"query",description:"List moderation events related to a subject.",parameters:{type:"params",properties:{types:{type:"array",items:{type:"string"},description:"The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned."},createdBy:{type:"string",format:"did"},sortDirection:{type:"string",default:"desc",enum:["asc","desc"],description:"Sort direction for the events. Defaults to descending order of created at timestamp."},createdAfter:{type:"string",format:"datetime",description:"Retrieve events created after a given timestamp"},createdBefore:{type:"string",format:"datetime",description:"Retrieve events created before a given timestamp"},subject:{type:"string",format:"uri"},collections:{type:"array",maxLength:20,description:"If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},includeAllUserRecords:{type:"boolean",default:!1,description:"If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."},limit:{type:"integer",minimum:1,maximum:100,default:50},hasComment:{type:"boolean",description:"If true, only events with comments are returned"},comment:{type:"string",description:"If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."},addedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were added are returned"},removedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were removed are returned"},addedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were added are returned"},removedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were removed are returned"},reportTypes:{type:"array",items:{type:"string"}},policies:{type:"array",items:{type:"string",description:"If specified, only events where the action policies match any of the given policies are returned"}},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}}}}}}}},ToolsOzoneModerationQueryStatuses:{lexicon:1,id:"tools.ozone.moderation.queryStatuses",defs:{main:{type:"query",description:"View moderation statuses of subjects (record or repo).",parameters:{type:"params",properties:{queueCount:{type:"integer",description:"Number of queues being used by moderators. Subjects will be split among all queues."},queueIndex:{type:"integer",description:"Index of the queue to fetch subjects from. Works only when queueCount value is specified."},queueSeed:{type:"string",description:"A seeder to shuffle/balance the queue items."},includeAllUserRecords:{type:"boolean",description:"All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."},subject:{type:"string",format:"uri",description:"The subject to get the status for."},comment:{type:"string",description:"Search subjects by keyword from comments"},reportedAfter:{type:"string",format:"datetime",description:"Search subjects reported after a given timestamp"},reportedBefore:{type:"string",format:"datetime",description:"Search subjects reported before a given timestamp"},reviewedAfter:{type:"string",format:"datetime",description:"Search subjects reviewed after a given timestamp"},hostingDeletedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted after a given timestamp"},hostingDeletedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted before a given timestamp"},hostingUpdatedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated after a given timestamp"},hostingUpdatedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated before a given timestamp"},hostingStatuses:{type:"array",items:{type:"string"},description:"Search subjects by the status of the associated record/account"},reviewedBefore:{type:"string",format:"datetime",description:"Search subjects reviewed before a given timestamp"},includeMuted:{type:"boolean",description:"By default, we don't include muted subjects in the results. Set this to true to include them."},onlyMuted:{type:"boolean",description:"When set to true, only muted subjects and reporters will be returned."},reviewState:{type:"string",description:"Specify when fetching subjects in a certain state"},ignoreSubjects:{type:"array",items:{type:"string",format:"uri"}},lastReviewedBy:{type:"string",format:"did",description:"Get all subject statuses that were reviewed by a specific moderator"},sortField:{type:"string",default:"lastReportedAt",enum:["lastReviewedAt","lastReportedAt","reportedRecordsCount","takendownRecordsCount","priorityScore"]},sortDirection:{type:"string",default:"desc",enum:["asc","desc"]},takendown:{type:"boolean",description:"Get subjects that were taken down"},appealed:{type:"boolean",description:"Get subjects in unresolved appealed status"},limit:{type:"integer",minimum:1,maximum:100,default:50},tags:{type:"array",maxLength:25,items:{type:"string",description:"Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"}},excludeTags:{type:"array",items:{type:"string"}},cursor:{type:"string"},collections:{type:"array",maxLength:20,description:"If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},minAccountSuspendCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many suspensions will be returned."},minReportedRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many reported records will be returned."},minTakendownRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many taken down records will be returned."},minPriorityScore:{minimum:0,maximum:100,type:"integer",description:"If specified, only subjects that have priority score value above the given value will be returned."}}},output:{encoding:"application/json",schema:{type:"object",required:["subjectStatuses"],properties:{cursor:{type:"string"},subjectStatuses:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}}}}}}},ToolsOzoneModerationSearchRepos:{lexicon:1,id:"tools.ozone.moderation.searchRepos",defs:{main:{type:"query",description:"Find repositories based on a search term.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead"},q:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}}}}}}},ToolsOzoneServerGetConfig:{lexicon:1,id:"tools.ozone.server.getConfig",defs:{main:{type:"query",description:"Get details about ozone's server configuration.",output:{encoding:"application/json",schema:{type:"object",properties:{appview:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},pds:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},blobDivert:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},chat:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},viewer:{type:"ref",ref:"lex:tools.ozone.server.getConfig#viewerConfig"}}}}},serviceConfig:{type:"object",properties:{url:{type:"string",format:"uri"}}},viewerConfig:{type:"object",properties:{role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage"]}}}}},ToolsOzoneSetAddValues:{lexicon:1,id:"tools.ozone.set.addValues",defs:{main:{type:"procedure",description:"Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to add values to"},values:{type:"array",minLength:1,maxLength:1e3,items:{type:"string"},description:"Array of string values to add to the set"}}}}}}},ToolsOzoneSetDefs:{lexicon:1,id:"tools.ozone.set.defs",defs:{set:{type:"object",required:["name"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240}}},setView:{type:"object",required:["name","setSize","createdAt","updatedAt"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240},setSize:{type:"integer"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneSetDeleteSet:{lexicon:1,id:"tools.ozone.set.deleteSet",defs:{main:{type:"procedure",description:"Delete an entire set. Attempting to delete a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"Name of the set to delete"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetDeleteValues:{lexicon:1,id:"tools.ozone.set.deleteValues",defs:{main:{type:"procedure",description:"Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to delete values from"},values:{type:"array",minLength:1,items:{type:"string"},description:"Array of string values to delete from the set"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetGetValues:{lexicon:1,id:"tools.ozone.set.getValues",defs:{main:{type:"query",description:"Get a specific set and its values",parameters:{type:"params",required:["name"],properties:{name:{type:"string"},limit:{type:"integer",minimum:1,maximum:1e3,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["set","values"],properties:{set:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"},values:{type:"array",items:{type:"string"}},cursor:{type:"string"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetQuerySets:{lexicon:1,id:"tools.ozone.set.querySets",defs:{main:{type:"query",description:"Query available sets",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},namePrefix:{type:"string"},sortBy:{type:"string",enum:["name","createdAt","updatedAt"],default:"name"},sortDirection:{type:"string",default:"asc",enum:["asc","desc"],description:"Defaults to ascending order of name field."}}},output:{encoding:"application/json",schema:{type:"object",required:["sets"],properties:{sets:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}},cursor:{type:"string"}}}}}}},ToolsOzoneSetUpsertSet:{lexicon:1,id:"tools.ozone.set.upsertSet",defs:{main:{type:"procedure",description:"Create or update set metadata",input:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#set"}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}}}}},ToolsOzoneSettingDefs:{lexicon:1,id:"tools.ozone.setting.defs",defs:{option:{type:"object",required:["key","value","did","scope","createdBy","lastUpdatedBy"],properties:{key:{type:"string",format:"nsid"},did:{type:"string",format:"did"},value:{type:"unknown"},description:{type:"string",maxGraphemes:1024,maxLength:10240},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleAdmin"]},scope:{type:"string",knownValues:["instance","personal"]},createdBy:{type:"string",format:"did"},lastUpdatedBy:{type:"string",format:"did"}}}}},ToolsOzoneSettingListOptions:{lexicon:1,id:"tools.ozone.setting.listOptions",defs:{main:{type:"query",description:"List settings with optional filtering",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},scope:{type:"string",knownValues:["instance","personal"],default:"instance"},prefix:{type:"string",description:"Filter keys by prefix"},keys:{type:"array",maxLength:100,items:{type:"string",format:"nsid"},description:"Filter for only the specified keys. Ignored if prefix is provided"}}},output:{encoding:"application/json",schema:{type:"object",required:["options"],properties:{cursor:{type:"string"},options:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}}},ToolsOzoneSettingRemoveOptions:{lexicon:1,id:"tools.ozone.setting.removeOptions",defs:{main:{type:"procedure",description:"Delete settings by key",input:{encoding:"application/json",schema:{type:"object",required:["keys","scope"],properties:{keys:{type:"array",minLength:1,maxLength:200,items:{type:"string",format:"nsid"}},scope:{type:"string",knownValues:["instance","personal"]}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ToolsOzoneSettingUpsertOption:{lexicon:1,id:"tools.ozone.setting.upsertOption",defs:{main:{type:"procedure",description:"Create or update setting option",input:{encoding:"application/json",schema:{type:"object",required:["key","scope","value"],properties:{key:{type:"string",format:"nsid"},scope:{type:"string",knownValues:["instance","personal"]},value:{type:"unknown"},description:{type:"string",maxLength:2e3},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleAdmin"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["option"],properties:{option:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}},ToolsOzoneSignatureDefs:{lexicon:1,id:"tools.ozone.signature.defs",defs:{sigDetail:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ToolsOzoneSignatureFindCorrelation:{lexicon:1,id:"tools.ozone.signature.findCorrelation",defs:{main:{type:"query",description:"Find all correlated threat signatures between 2 or more accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["details"],properties:{details:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}}}},ToolsOzoneSignatureFindRelatedAccounts:{lexicon:1,id:"tools.ozone.signature.findRelatedAccounts",defs:{main:{type:"query",description:"Get accounts that share some matching threat signatures with the root account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.findRelatedAccounts#relatedAccount"}}}}}},relatedAccount:{type:"object",required:["account"],properties:{account:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"},similarities:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}},ToolsOzoneSignatureSearchAccounts:{lexicon:1,id:"tools.ozone.signature.searchAccounts",defs:{main:{type:"query",description:"Search for accounts that match one or more threat signature values.",parameters:{type:"params",required:["values"],properties:{values:{type:"array",items:{type:"string"}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ToolsOzoneTeamAddMember:{lexicon:1,id:"tools.ozone.team.addMember",defs:{main:{type:"procedure",description:"Add a member to the ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberAlreadyExists",description:"Member already exists in the team."}]}}},ToolsOzoneTeamDefs:{lexicon:1,id:"tools.ozone.team.defs",defs:{member:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},profile:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},lastUpdatedBy:{type:"string"},role:{type:"string",knownValues:["lex:tools.ozone.team.defs#roleAdmin","lex:tools.ozone.team.defs#roleModerator","lex:tools.ozone.team.defs#roleTriage"]}}},roleAdmin:{type:"token",description:"Admin role. Highest level of access, can perform all actions."},roleModerator:{type:"token",description:"Moderator role. Can perform most actions."},roleTriage:{type:"token",description:"Triage role. Mostly intended for monitoring and escalating issues."}}},ToolsOzoneTeamDeleteMember:{lexicon:1,id:"tools.ozone.team.deleteMember",defs:{main:{type:"procedure",description:"Delete a member from ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"MemberNotFound",description:"The member being deleted does not exist"},{name:"CannotDeleteSelf",description:"You can not delete yourself from the team"}]}}},ToolsOzoneTeamListMembers:{lexicon:1,id:"tools.ozone.team.listMembers",defs:{main:{type:"query",description:"List all members with access to the ozone service.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["members"],properties:{cursor:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}}}}}}}},ToolsOzoneTeamUpdateMember:{lexicon:1,id:"tools.ozone.team.updateMember",defs:{main:{type:"procedure",description:"Update a member in the ozone service. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberNotFound",description:"The member being updated does not exist in the team"}]}}}},t.schemas=Object.values(t.schemaDict),t.lexicons=new n.Lexicons(t.schemas),t.ids={ComAtprotoAdminDefs:"com.atproto.admin.defs",ComAtprotoAdminDeleteAccount:"com.atproto.admin.deleteAccount",ComAtprotoAdminDisableAccountInvites:"com.atproto.admin.disableAccountInvites",ComAtprotoAdminDisableInviteCodes:"com.atproto.admin.disableInviteCodes",ComAtprotoAdminEnableAccountInvites:"com.atproto.admin.enableAccountInvites",ComAtprotoAdminGetAccountInfo:"com.atproto.admin.getAccountInfo",ComAtprotoAdminGetAccountInfos:"com.atproto.admin.getAccountInfos",ComAtprotoAdminGetInviteCodes:"com.atproto.admin.getInviteCodes",ComAtprotoAdminGetSubjectStatus:"com.atproto.admin.getSubjectStatus",ComAtprotoAdminSearchAccounts:"com.atproto.admin.searchAccounts",ComAtprotoAdminSendEmail:"com.atproto.admin.sendEmail",ComAtprotoAdminUpdateAccountEmail:"com.atproto.admin.updateAccountEmail",ComAtprotoAdminUpdateAccountHandle:"com.atproto.admin.updateAccountHandle",ComAtprotoAdminUpdateAccountPassword:"com.atproto.admin.updateAccountPassword",ComAtprotoAdminUpdateSubjectStatus:"com.atproto.admin.updateSubjectStatus",ComAtprotoIdentityGetRecommendedDidCredentials:"com.atproto.identity.getRecommendedDidCredentials",ComAtprotoIdentityRequestPlcOperationSignature:"com.atproto.identity.requestPlcOperationSignature",ComAtprotoIdentityResolveHandle:"com.atproto.identity.resolveHandle",ComAtprotoIdentitySignPlcOperation:"com.atproto.identity.signPlcOperation",ComAtprotoIdentitySubmitPlcOperation:"com.atproto.identity.submitPlcOperation",ComAtprotoIdentityUpdateHandle:"com.atproto.identity.updateHandle",ComAtprotoLabelDefs:"com.atproto.label.defs",ComAtprotoLabelQueryLabels:"com.atproto.label.queryLabels",ComAtprotoLabelSubscribeLabels:"com.atproto.label.subscribeLabels",ComAtprotoLexiconSchema:"com.atproto.lexicon.schema",ComAtprotoModerationCreateReport:"com.atproto.moderation.createReport",ComAtprotoModerationDefs:"com.atproto.moderation.defs",ComAtprotoRepoApplyWrites:"com.atproto.repo.applyWrites",ComAtprotoRepoCreateRecord:"com.atproto.repo.createRecord",ComAtprotoRepoDefs:"com.atproto.repo.defs",ComAtprotoRepoDeleteRecord:"com.atproto.repo.deleteRecord",ComAtprotoRepoDescribeRepo:"com.atproto.repo.describeRepo",ComAtprotoRepoGetRecord:"com.atproto.repo.getRecord",ComAtprotoRepoImportRepo:"com.atproto.repo.importRepo",ComAtprotoRepoListMissingBlobs:"com.atproto.repo.listMissingBlobs",ComAtprotoRepoListRecords:"com.atproto.repo.listRecords",ComAtprotoRepoPutRecord:"com.atproto.repo.putRecord",ComAtprotoRepoStrongRef:"com.atproto.repo.strongRef",ComAtprotoRepoUploadBlob:"com.atproto.repo.uploadBlob",ComAtprotoServerActivateAccount:"com.atproto.server.activateAccount",ComAtprotoServerCheckAccountStatus:"com.atproto.server.checkAccountStatus",ComAtprotoServerConfirmEmail:"com.atproto.server.confirmEmail",ComAtprotoServerCreateAccount:"com.atproto.server.createAccount",ComAtprotoServerCreateAppPassword:"com.atproto.server.createAppPassword",ComAtprotoServerCreateInviteCode:"com.atproto.server.createInviteCode",ComAtprotoServerCreateInviteCodes:"com.atproto.server.createInviteCodes",ComAtprotoServerCreateSession:"com.atproto.server.createSession",ComAtprotoServerDeactivateAccount:"com.atproto.server.deactivateAccount",ComAtprotoServerDefs:"com.atproto.server.defs",ComAtprotoServerDeleteAccount:"com.atproto.server.deleteAccount",ComAtprotoServerDeleteSession:"com.atproto.server.deleteSession",ComAtprotoServerDescribeServer:"com.atproto.server.describeServer",ComAtprotoServerGetAccountInviteCodes:"com.atproto.server.getAccountInviteCodes",ComAtprotoServerGetServiceAuth:"com.atproto.server.getServiceAuth",ComAtprotoServerGetSession:"com.atproto.server.getSession",ComAtprotoServerListAppPasswords:"com.atproto.server.listAppPasswords",ComAtprotoServerRefreshSession:"com.atproto.server.refreshSession",ComAtprotoServerRequestAccountDelete:"com.atproto.server.requestAccountDelete",ComAtprotoServerRequestEmailConfirmation:"com.atproto.server.requestEmailConfirmation",ComAtprotoServerRequestEmailUpdate:"com.atproto.server.requestEmailUpdate",ComAtprotoServerRequestPasswordReset:"com.atproto.server.requestPasswordReset",ComAtprotoServerReserveSigningKey:"com.atproto.server.reserveSigningKey",ComAtprotoServerResetPassword:"com.atproto.server.resetPassword",ComAtprotoServerRevokeAppPassword:"com.atproto.server.revokeAppPassword",ComAtprotoServerUpdateEmail:"com.atproto.server.updateEmail",ComAtprotoSyncGetBlob:"com.atproto.sync.getBlob",ComAtprotoSyncGetBlocks:"com.atproto.sync.getBlocks",ComAtprotoSyncGetCheckout:"com.atproto.sync.getCheckout",ComAtprotoSyncGetHead:"com.atproto.sync.getHead",ComAtprotoSyncGetLatestCommit:"com.atproto.sync.getLatestCommit",ComAtprotoSyncGetRecord:"com.atproto.sync.getRecord",ComAtprotoSyncGetRepo:"com.atproto.sync.getRepo",ComAtprotoSyncGetRepoStatus:"com.atproto.sync.getRepoStatus",ComAtprotoSyncListBlobs:"com.atproto.sync.listBlobs",ComAtprotoSyncListRepos:"com.atproto.sync.listRepos",ComAtprotoSyncNotifyOfUpdate:"com.atproto.sync.notifyOfUpdate",ComAtprotoSyncRequestCrawl:"com.atproto.sync.requestCrawl",ComAtprotoSyncSubscribeRepos:"com.atproto.sync.subscribeRepos",ComAtprotoTempAddReservedHandle:"com.atproto.temp.addReservedHandle",ComAtprotoTempCheckSignupQueue:"com.atproto.temp.checkSignupQueue",ComAtprotoTempFetchLabels:"com.atproto.temp.fetchLabels",ComAtprotoTempRequestPhoneVerification:"com.atproto.temp.requestPhoneVerification",AppBskyActorDefs:"app.bsky.actor.defs",AppBskyActorGetPreferences:"app.bsky.actor.getPreferences",AppBskyActorGetProfile:"app.bsky.actor.getProfile",AppBskyActorGetProfiles:"app.bsky.actor.getProfiles",AppBskyActorGetSuggestions:"app.bsky.actor.getSuggestions",AppBskyActorProfile:"app.bsky.actor.profile",AppBskyActorPutPreferences:"app.bsky.actor.putPreferences",AppBskyActorSearchActors:"app.bsky.actor.searchActors",AppBskyActorSearchActorsTypeahead:"app.bsky.actor.searchActorsTypeahead",AppBskyEmbedDefs:"app.bsky.embed.defs",AppBskyEmbedExternal:"app.bsky.embed.external",AppBskyEmbedImages:"app.bsky.embed.images",AppBskyEmbedRecord:"app.bsky.embed.record",AppBskyEmbedRecordWithMedia:"app.bsky.embed.recordWithMedia",AppBskyEmbedVideo:"app.bsky.embed.video",AppBskyFeedDefs:"app.bsky.feed.defs",AppBskyFeedDescribeFeedGenerator:"app.bsky.feed.describeFeedGenerator",AppBskyFeedGenerator:"app.bsky.feed.generator",AppBskyFeedGetActorFeeds:"app.bsky.feed.getActorFeeds",AppBskyFeedGetActorLikes:"app.bsky.feed.getActorLikes",AppBskyFeedGetAuthorFeed:"app.bsky.feed.getAuthorFeed",AppBskyFeedGetFeed:"app.bsky.feed.getFeed",AppBskyFeedGetFeedGenerator:"app.bsky.feed.getFeedGenerator",AppBskyFeedGetFeedGenerators:"app.bsky.feed.getFeedGenerators",AppBskyFeedGetFeedSkeleton:"app.bsky.feed.getFeedSkeleton",AppBskyFeedGetLikes:"app.bsky.feed.getLikes",AppBskyFeedGetListFeed:"app.bsky.feed.getListFeed",AppBskyFeedGetPostThread:"app.bsky.feed.getPostThread",AppBskyFeedGetPosts:"app.bsky.feed.getPosts",AppBskyFeedGetQuotes:"app.bsky.feed.getQuotes",AppBskyFeedGetRepostedBy:"app.bsky.feed.getRepostedBy",AppBskyFeedGetSuggestedFeeds:"app.bsky.feed.getSuggestedFeeds",AppBskyFeedGetTimeline:"app.bsky.feed.getTimeline",AppBskyFeedLike:"app.bsky.feed.like",AppBskyFeedPost:"app.bsky.feed.post",AppBskyFeedPostgate:"app.bsky.feed.postgate",AppBskyFeedRepost:"app.bsky.feed.repost",AppBskyFeedSearchPosts:"app.bsky.feed.searchPosts",AppBskyFeedSendInteractions:"app.bsky.feed.sendInteractions",AppBskyFeedThreadgate:"app.bsky.feed.threadgate",AppBskyGraphBlock:"app.bsky.graph.block",AppBskyGraphDefs:"app.bsky.graph.defs",AppBskyGraphFollow:"app.bsky.graph.follow",AppBskyGraphGetActorStarterPacks:"app.bsky.graph.getActorStarterPacks",AppBskyGraphGetBlocks:"app.bsky.graph.getBlocks",AppBskyGraphGetFollowers:"app.bsky.graph.getFollowers",AppBskyGraphGetFollows:"app.bsky.graph.getFollows",AppBskyGraphGetKnownFollowers:"app.bsky.graph.getKnownFollowers",AppBskyGraphGetList:"app.bsky.graph.getList",AppBskyGraphGetListBlocks:"app.bsky.graph.getListBlocks",AppBskyGraphGetListMutes:"app.bsky.graph.getListMutes",AppBskyGraphGetLists:"app.bsky.graph.getLists",AppBskyGraphGetMutes:"app.bsky.graph.getMutes",AppBskyGraphGetRelationships:"app.bsky.graph.getRelationships",AppBskyGraphGetStarterPack:"app.bsky.graph.getStarterPack",AppBskyGraphGetStarterPacks:"app.bsky.graph.getStarterPacks",AppBskyGraphGetSuggestedFollowsByActor:"app.bsky.graph.getSuggestedFollowsByActor",AppBskyGraphList:"app.bsky.graph.list",AppBskyGraphListblock:"app.bsky.graph.listblock",AppBskyGraphListitem:"app.bsky.graph.listitem",AppBskyGraphMuteActor:"app.bsky.graph.muteActor",AppBskyGraphMuteActorList:"app.bsky.graph.muteActorList",AppBskyGraphMuteThread:"app.bsky.graph.muteThread",AppBskyGraphSearchStarterPacks:"app.bsky.graph.searchStarterPacks",AppBskyGraphStarterpack:"app.bsky.graph.starterpack",AppBskyGraphUnmuteActor:"app.bsky.graph.unmuteActor",AppBskyGraphUnmuteActorList:"app.bsky.graph.unmuteActorList",AppBskyGraphUnmuteThread:"app.bsky.graph.unmuteThread",AppBskyLabelerDefs:"app.bsky.labeler.defs",AppBskyLabelerGetServices:"app.bsky.labeler.getServices",AppBskyLabelerService:"app.bsky.labeler.service",AppBskyNotificationGetUnreadCount:"app.bsky.notification.getUnreadCount",AppBskyNotificationListNotifications:"app.bsky.notification.listNotifications",AppBskyNotificationPutPreferences:"app.bsky.notification.putPreferences",AppBskyNotificationRegisterPush:"app.bsky.notification.registerPush",AppBskyNotificationUpdateSeen:"app.bsky.notification.updateSeen",AppBskyRichtextFacet:"app.bsky.richtext.facet",AppBskyUnspeccedDefs:"app.bsky.unspecced.defs",AppBskyUnspeccedGetConfig:"app.bsky.unspecced.getConfig",AppBskyUnspeccedGetPopularFeedGenerators:"app.bsky.unspecced.getPopularFeedGenerators",AppBskyUnspeccedGetSuggestionsSkeleton:"app.bsky.unspecced.getSuggestionsSkeleton",AppBskyUnspeccedGetTaggedSuggestions:"app.bsky.unspecced.getTaggedSuggestions",AppBskyUnspeccedGetTrendingTopics:"app.bsky.unspecced.getTrendingTopics",AppBskyUnspeccedSearchActorsSkeleton:"app.bsky.unspecced.searchActorsSkeleton",AppBskyUnspeccedSearchPostsSkeleton:"app.bsky.unspecced.searchPostsSkeleton",AppBskyUnspeccedSearchStarterPacksSkeleton:"app.bsky.unspecced.searchStarterPacksSkeleton",AppBskyVideoDefs:"app.bsky.video.defs",AppBskyVideoGetJobStatus:"app.bsky.video.getJobStatus",AppBskyVideoGetUploadLimits:"app.bsky.video.getUploadLimits",AppBskyVideoUploadVideo:"app.bsky.video.uploadVideo",ChatBskyActorDeclaration:"chat.bsky.actor.declaration",ChatBskyActorDefs:"chat.bsky.actor.defs",ChatBskyActorDeleteAccount:"chat.bsky.actor.deleteAccount",ChatBskyActorExportAccountData:"chat.bsky.actor.exportAccountData",ChatBskyConvoDefs:"chat.bsky.convo.defs",ChatBskyConvoDeleteMessageForSelf:"chat.bsky.convo.deleteMessageForSelf",ChatBskyConvoGetConvo:"chat.bsky.convo.getConvo",ChatBskyConvoGetConvoForMembers:"chat.bsky.convo.getConvoForMembers",ChatBskyConvoGetLog:"chat.bsky.convo.getLog",ChatBskyConvoGetMessages:"chat.bsky.convo.getMessages",ChatBskyConvoLeaveConvo:"chat.bsky.convo.leaveConvo",ChatBskyConvoListConvos:"chat.bsky.convo.listConvos",ChatBskyConvoMuteConvo:"chat.bsky.convo.muteConvo",ChatBskyConvoSendMessage:"chat.bsky.convo.sendMessage",ChatBskyConvoSendMessageBatch:"chat.bsky.convo.sendMessageBatch",ChatBskyConvoUnmuteConvo:"chat.bsky.convo.unmuteConvo",ChatBskyConvoUpdateRead:"chat.bsky.convo.updateRead",ChatBskyModerationGetActorMetadata:"chat.bsky.moderation.getActorMetadata",ChatBskyModerationGetMessageContext:"chat.bsky.moderation.getMessageContext",ChatBskyModerationUpdateActorAccess:"chat.bsky.moderation.updateActorAccess",ToolsOzoneCommunicationCreateTemplate:"tools.ozone.communication.createTemplate",ToolsOzoneCommunicationDefs:"tools.ozone.communication.defs",ToolsOzoneCommunicationDeleteTemplate:"tools.ozone.communication.deleteTemplate",ToolsOzoneCommunicationListTemplates:"tools.ozone.communication.listTemplates",ToolsOzoneCommunicationUpdateTemplate:"tools.ozone.communication.updateTemplate",ToolsOzoneModerationDefs:"tools.ozone.moderation.defs",ToolsOzoneModerationEmitEvent:"tools.ozone.moderation.emitEvent",ToolsOzoneModerationGetEvent:"tools.ozone.moderation.getEvent",ToolsOzoneModerationGetRecord:"tools.ozone.moderation.getRecord",ToolsOzoneModerationGetRecords:"tools.ozone.moderation.getRecords",ToolsOzoneModerationGetRepo:"tools.ozone.moderation.getRepo",ToolsOzoneModerationGetRepos:"tools.ozone.moderation.getRepos",ToolsOzoneModerationQueryEvents:"tools.ozone.moderation.queryEvents",ToolsOzoneModerationQueryStatuses:"tools.ozone.moderation.queryStatuses",ToolsOzoneModerationSearchRepos:"tools.ozone.moderation.searchRepos",ToolsOzoneServerGetConfig:"tools.ozone.server.getConfig",ToolsOzoneSetAddValues:"tools.ozone.set.addValues",ToolsOzoneSetDefs:"tools.ozone.set.defs",ToolsOzoneSetDeleteSet:"tools.ozone.set.deleteSet",ToolsOzoneSetDeleteValues:"tools.ozone.set.deleteValues",ToolsOzoneSetGetValues:"tools.ozone.set.getValues",ToolsOzoneSetQuerySets:"tools.ozone.set.querySets",ToolsOzoneSetUpsertSet:"tools.ozone.set.upsertSet",ToolsOzoneSettingDefs:"tools.ozone.setting.defs",ToolsOzoneSettingListOptions:"tools.ozone.setting.listOptions",ToolsOzoneSettingRemoveOptions:"tools.ozone.setting.removeOptions",ToolsOzoneSettingUpsertOption:"tools.ozone.setting.upsertOption",ToolsOzoneSignatureDefs:"tools.ozone.signature.defs",ToolsOzoneSignatureFindCorrelation:"tools.ozone.signature.findCorrelation",ToolsOzoneSignatureFindRelatedAccounts:"tools.ozone.signature.findRelatedAccounts",ToolsOzoneSignatureSearchAccounts:"tools.ozone.signature.searchAccounts",ToolsOzoneTeamAddMember:"tools.ozone.team.addMember",ToolsOzoneTeamDefs:"tools.ozone.team.defs",ToolsOzoneTeamDeleteMember:"tools.ozone.team.deleteMember",ToolsOzoneTeamListMembers:"tools.ozone.team.listMembers",ToolsOzoneTeamUpdateMember:"tools.ozone.team.updateMember"}},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureValidAtUriRegex=t.ensureValidAtUri=void 0;const n=r(833),o=r(2424),i=r(6352);t.ensureValidAtUri=e=>{const t=e.split("#");if(t.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const r=t[1]||null;if(e=t[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(e))throw new Error("Disallowed characters in ATURI (ASCII)");const s=e.split("/");if(s.length>=3&&("at:"!==s[0]||0!==s[1].length))throw new Error('ATURI must start with "at://"');if(s.length<3)throw new Error("ATURI requires at least method and authority sections");try{s[2].startsWith("did:")?(0,n.ensureValidDid)(s[2]):(0,o.ensureValidHandle)(s[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(s.length>=4){if(0===s[3].length)throw new Error("ATURI can not have a slash after authority without a path segment");try{(0,i.ensureValidNsid)(s[3])}catch{throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}}if(s.length>=5&&0===s[4].length)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(s.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(t.length>=2&&null==r)throw new Error("ATURI fragment must be non-empty and start with slash");if(null!=r){if(0===r.length||"/"!==r[0])throw new Error("ATURI fragment must be non-empty and start with slash");if(!/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/.test(r))throw new Error("Disallowed characters in ATURI fragment (ASCII)")}if(e.length>8192)throw new Error("ATURI is far too long")};t.ensureValidAtUriRegex=e=>{const t=e.match(/^at:\/\/(?[a-zA-Z0-9._:%-]+)(\/(?[a-zA-Z0-9-.]+)(\/(?[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/);if(!t||!t.groups)throw new Error("ATURI didn't validate via regex");const r=t.groups;try{(0,o.ensureValidHandleRegex)(r.authority)}catch{try{(0,n.ensureValidDidRegex)(r.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(r.collection)try{(0,i.ensureValidNsidRegex)(r.collection)}catch{throw new Error("ATURI collection path segment must be a valid NSID")}if(e.length>8192)throw new Error("ATURI is far too long")}},579:(e,t,r)=>{"use strict";e.exports=r(1153)},586:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;var i=r(1085);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return i.ZodError}}),o(r(8640),t),o(r(3679),t),o(r(5574),t),o(r(7229),t),o(r(8914),t),o(r(85),t),o(r(4847),t),o(r(1701),t),o(r(8477),t),o(r(8404),t)},590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTakedownError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"AccountTakedown"===e.error)return new s(e);return e},t.isAppPassword=function(e){return(0,o.isObj)(e)&&(0,o.hasProp)(e,"$type")&&"com.atproto.server.listAppPasswords#appPassword"===e.$type},t.validateAppPassword=function(e){return i.lexicons.validate("com.atproto.server.listAppPasswords#appPassword",e)};const n=r(1510),o=r(2127),i=r(554);class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AccountTakedownError=s},599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=t.FetchRequestError=void 0,t.protocolCheckRequestTransform=function(e){return(t,r)=>{const{protocol:n,port:a}=(0,i.extractUrl)(t),c=(0,o.asRequest)(t,r),l=Object.hasOwn(e,n)?e[n]:void 0;if(!l)throw new s(c,400,`Forbidden protocol "${n}"`);if(!0===l);else if(!l.allowCustomPort&&""!==a)throw new s(c,400,`Custom ${n} ports not allowed`);return c}},t.redirectCheckRequestTransform=function(){return(e,t)=>{const r=(0,o.asRequest)(e,t);if("follow"===r.redirect)throw new s(r,500,'Request redirect must be "error" or "manual"');return r}},t.requireHostHeaderTransform=function(){return(e,t)=>{const{protocol:r,hostname:n}=(0,i.extractUrl)(e),a=(0,o.asRequest)(e,t);if("http:"!==r&&"https:"!==r)throw new s(a,400,`"${r}" requests are not allowed`);if(!n||(0,i.isIp)(n))throw new s(a,400,"Invalid hostname");return a}},t.forbiddenDomainNameRequestTransform=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.DEFAULT_FORBIDDEN_DOMAIN_NAMES;const r=new Set(e);if(0===r.size)return o.asRequest;return async(e,t)=>{const{hostname:n}=(0,i.extractUrl)(e),a=(0,o.asRequest)(e,t);if(r.has(n))throw new s(a,403,"Forbidden hostname");let c=n.indexOf(".");for(;-1!==c;){const e=n.slice(c+1);if(r.has(`*.${e}`))throw new s(a,403,"Forbidden hostname");c=n.indexOf(".",c+1)}return a}};const n=r(436),o=r(4007),i=r(2283);class s extends n.FetchError{constructor(e,t,r,n){if(null==t||!r){const e=function(e){if("string"===typeof e&&e.length>0)return[500,e];if(!(e instanceof Error))return[500,"Failed to fetch"];switch(e.message){case"failed to fetch the data URL":return[400,e.message];case"unexpected redirect":case"cors failure":case"blocked":case"proxy authentication required":return[502,e.message]}const t=e.code;if("string"===typeof t)switch(!0){case"ENOTFOUND"===t:return[400,"Invalid hostname"];case"ECONNREFUSED"===t:return[502,"Connection refused"];case"DEPTH_ZERO_SELF_SIGNED_CERT"===t:return[502,"Self-signed certificate"];case t.startsWith("ERR_TLS"):return[502,"TLS error"];case t.startsWith("ECONN"):return[502,"Connection error"];default:return[500,`${t} error`]}return[500,e.message]}(function(e){if(e instanceof TypeError&&"fetch failed"===e.message&&void 0!==e.cause)return e.cause;return e}(n?.cause));t??(t=e[0]),r||(r=e[1])}super(t,r,n),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:e})}get expose(){return 500!==this.statusCode}static from(e,t){return t instanceof s?t:new s(e,void 0,void 0,{cause:t})}}t.FetchRequestError=s,t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=["example.com","*.example.com","example.org","*.example.org","example.net","*.example.net","googleusercontent.com","*.googleusercontent.com"]},631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},654:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNsidError=t.ensureValidNsidRegex=t.ensureValidNsid=t.NSID=void 0;class r{static parse(e){return new r(e)}static create(e,t){const n=[...e.split(".").reverse(),t].join(".");return new r(n)}static isValid(e){try{return r.parse(e),!0}catch(t){return!1}}constructor(e){Object.defineProperty(this,"segments",{enumerable:!0,configurable:!0,writable:!0,value:[]}),(0,t.ensureValidNsid)(e),this.segments=e.split(".")}get authority(){return this.segments.slice(0,this.segments.length-1).reverse().join(".")}get name(){return this.segments.at(this.segments.length-1)}toString(){return this.segments.join(".")}}t.NSID=r;t.ensureValidNsid=e=>{const t=e;if(!/^[a-zA-Z0-9.-]*$/.test(t))throw new n("Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)");if(t.length>317)throw new n("NSID is too long (317 chars max)");const r=t.split(".");if(r.length<3)throw new n("NSID needs at least three parts");for(let o=0;o63)throw new n("NSID part too long (max 63 chars)");if(e.endsWith("-")||e.startsWith("-"))throw new n("NSID parts can not start or end with hyphen");if(/^[0-9]/.test(e)&&0===o)throw new n("NSID first part may not start with a digit");if(!/^[a-zA-Z]+$/.test(e)&&o+1===r.length)throw new n("NSID name part must be only letters")}};t.ensureValidNsidRegex=e=>{if(!/^[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-Z]{0,61}[a-zA-Z])?)$/.test(e))throw new n("NSID didn't validate via regex");if(e.length>317)throw new n("NSID is too long (317 chars max)")};class n extends Error{}t.InvalidNsidError=n},668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthGrantTypeSchema=void 0;const n=r(1085);t.oauthGrantTypeSchema=n.z.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"])},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLabels=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.subscribeLabels#labels"===e.$type},t.validateLabels=function(e){return o.lexicons.validate("com.atproto.label.subscribeLabels#labels",e)},t.isInfo=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.subscribeLabels#info"===e.$type},t.validateInfo=function(e){return o.lexicons.validate("com.atproto.label.subscribeLabels#info",e)};const n=r(2127),o=r(554)},818:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isRelatedAccount=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.signature.findRelatedAccounts#relatedAccount"===e.$type},t.validateRelatedAccount=function(e){return o.lexicons.validate("tools.ozone.signature.findRelatedAccounts#relatedAccount",e)};const n=r(2127),o=r(554)},833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDidError=t.ensureValidDidRegex=t.ensureValidDid=void 0;t.ensureValidDid=e=>{if(!e.startsWith("did:"))throw new r('DID requires "did:" prefix');if(!/^[a-zA-Z0-9._:%-]*$/.test(e))throw new r("Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)");const{length:t,1:n}=e.split(":");if(t<3)throw new r("DID requires prefix, method, and method-specific content");if(!/^[a-z]+$/.test(n))throw new r("DID method must be lower-case letters");if(e.endsWith(":")||e.endsWith("%"))throw new r('DID can not end with ":" or "%"');if(e.length>2048)throw new r("DID is too long (2048 chars max)")};t.ensureValidDidRegex=e=>{if(!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(e))throw new r("DID didn't validate via regex");if(e.length>2048)throw new r("DID is too long (2048 chars max)")};class r extends Error{}t.InvalidDidError=r},838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidRecordKeyError=t.isValidRecordKey=t.ensureValidRecordKey=void 0;t.ensureValidRecordKey=e=>{if(e.length>512||e.length<1)throw new r("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(e))throw new r("record key syntax not valid (regex)");if("."===e||".."===e)throw new r('record key can not be "." or ".."')};t.isValidRecordKey=e=>{try{(0,t.ensureValidRecordKey)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};class r extends Error{}t.InvalidRecordKeyError=r},852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BskyAgent=void 0;const n=r(2468);class o extends n.AtpAgent{clone(){if(this.constructor===o){const e=new o(this.sessionManager);return this.copyInto(e)}throw new TypeError("Cannot clone a subclass of BskyAgent")}}t.BskyAgent=o},868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REFERENCELIST=t.CURATELIST=t.MODLIST=void 0,t.isListViewBasic=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#listViewBasic"===e.$type},t.validateListViewBasic=function(e){return o.lexicons.validate("app.bsky.graph.defs#listViewBasic",e)},t.isListView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#listView"===e.$type},t.validateListView=function(e){return o.lexicons.validate("app.bsky.graph.defs#listView",e)},t.isListItemView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#listItemView"===e.$type},t.validateListItemView=function(e){return o.lexicons.validate("app.bsky.graph.defs#listItemView",e)},t.isStarterPackView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#starterPackView"===e.$type},t.validateStarterPackView=function(e){return o.lexicons.validate("app.bsky.graph.defs#starterPackView",e)},t.isStarterPackViewBasic=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#starterPackViewBasic"===e.$type},t.validateStarterPackViewBasic=function(e){return o.lexicons.validate("app.bsky.graph.defs#starterPackViewBasic",e)},t.isListViewerState=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#listViewerState"===e.$type},t.validateListViewerState=function(e){return o.lexicons.validate("app.bsky.graph.defs#listViewerState",e)},t.isNotFoundActor=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#notFoundActor"===e.$type},t.validateNotFoundActor=function(e){return o.lexicons.validate("app.bsky.graph.defs#notFoundActor",e)},t.isRelationship=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.graph.defs#relationship"===e.$type},t.validateRelationship=function(e){return o.lexicons.validate("app.bsky.graph.defs#relationship",e)};const n=r(2127),o=r(554);t.MODLIST="app.bsky.graph.defs#modlist",t.CURATELIST="app.bsky.graph.defs#curatelist",t.REFERENCELIST="app.bsky.graph.defs#referencelist"},912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthResponseModeSchema=void 0;const n=r(1085);t.oauthResponseModeSchema=n.z.enum(["query","fragment","form_post"])},956:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(7467),t)},960:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisallowedDomainError=t.UnsupportedDomainError=t.ReservedHandleError=t.InvalidHandleError=t.isValidTld=t.isValidHandle=t.normalizeAndEnsureValidHandle=t.normalizeHandle=t.ensureValidHandleRegex=t.ensureValidHandle=t.DISALLOWED_TLDS=t.INVALID_HANDLE=void 0,t.INVALID_HANDLE="handle.invalid",t.DISALLOWED_TLDS=[".local",".arpa",".invalid",".localhost",".internal",".example",".alt",".onion"];t.ensureValidHandle=e=>{if(!/^[a-zA-Z0-9.-]*$/.test(e))throw new r("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(e.length>253)throw new r("Handle is too long (253 chars max)");const t=e.split(".");if(t.length<2)throw new r("Handle domain needs at least two parts");for(let n=0;n63)throw new r("Handle part too long (max 63 chars)");if(e.endsWith("-")||e.startsWith("-"))throw new r("Handle parts can not start or end with hyphens");if(n+1===t.length&&!/^[a-zA-Z]/.test(e))throw new r("Handle final component (TLD) must start with ASCII letter")}};t.ensureValidHandleRegex=e=>{if(!/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(e))throw new r("Handle didn't validate via regex");if(e.length>253)throw new r("Handle is too long (253 chars max)")};t.normalizeHandle=e=>e.toLowerCase();t.normalizeAndEnsureValidHandle=e=>{const r=(0,t.normalizeHandle)(e);return(0,t.ensureValidHandle)(r),r};t.isValidHandle=e=>{try{(0,t.ensureValidHandle)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};t.isValidTld=e=>!t.DISALLOWED_TLDS.some((t=>e.endsWith(t)));class r extends Error{}t.InvalidHandleError=r;class n extends Error{}t.ReservedHandleError=n;class o extends Error{}t.UnsupportedDomainError=o;class i extends Error{}t.DisallowedDomainError=i},980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isBatchItem=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.sendMessageBatch#batchItem"===e.$type},t.validateBatchItem=function(e){return o.lexicons.validate("chat.bsky.convo.sendMessageBatch#batchItem",e)};const n=r(2127),o=r(554)},1036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.atprotoDidSchema=void 0,t.isAtprotoDid=s,t.asAtprotoDid=function(e){return a(e),e},t.assertAtprotoDid=a,t.assertAtprotoDidWeb=c,t.isAtprotoDidWeb=l;const n=r(1085),o=r(2915),i=r(7247);function s(e){return"string"===typeof e&&(e.startsWith(i.DID_PLC_PREFIX)?(0,i.isDidPlc)(e):!!e.startsWith(i.DID_WEB_PREFIX)&&l(e))}function a(e){if("string"!==typeof e)throw new o.InvalidDidError(typeof e,"DID must be a string");if(e.startsWith(i.DID_PLC_PREFIX))(0,i.assertDidPlc)(e);else{if(!e.startsWith(i.DID_WEB_PREFIX))throw new o.InvalidDidError(e,'Atproto only allows "plc" and "web" DID methods');c(e)}}function c(e){if((0,i.assertDidWeb)(e),e.includes(":",i.DID_WEB_PREFIX.length))throw new o.InvalidDidError(e,"Atproto does not allow path components in Web DIDs");if(e.includes("%3A",i.DID_WEB_PREFIX.length)&&!e.startsWith("did:web:localhost%3A"))throw new o.InvalidDidError(e,"Atproto does not allow port numbers in Web DIDs, except for localhost")}function l(e){try{return c(e),!0}catch{return!1}}t.atprotoDidSchema=n.z.string().refine(s,'Atproto only allows "plc" and "web" DID methods')},1085:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const a=i(r(5582));t.z=a,s(r(5582),t),t.default=a},1153:(e,t,r)=>{"use strict";var n=r(5043),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,i={},l=null,d=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:d,props:i,_owner:a.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},1159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationRequestUriSchema=void 0;const n=r(1085),o=r(4047);t.oauthAuthorizationRequestUriSchema=n.z.object({request_uri:o.oauthRequestUriSchema})},1182:(e,t,r)=>{"use strict";r.d(t,{D4:()=>E,s_:()=>w,OY:()=>R});var n=function e(t,r,n){r=r||[];var a=n=n||0;for(;t>=s;)r[n++]=255&t|o,t/=128;for(;t&i;)r[n++]=255&t|o,t>>>=7;return r[n]=0|t,e.bytes=n-a+1,r},o=128,i=-128,s=Math.pow(2,31);var a=function e(t,r){var n,o=0,i=0,s=r=r||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],o+=i<28?(n&l)<=c);return e.bytes=s-r,o},c=128,l=127;var d=Math.pow(2,7),u=Math.pow(2,14),p=Math.pow(2,21),f=Math.pow(2,28),h=Math.pow(2,35),y=Math.pow(2,42),m=Math.pow(2,49),g=Math.pow(2,56),b=Math.pow(2,63);const v={encode:n,decode:a,encodingLength:function(e){return e1&&void 0!==arguments[1]?arguments[1]:0;return[v.decode(e,t),v.decode.bytes]},w=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return v.encode(e,t,r),t},R=e=>v.encodingLength(e)},1185:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decideProfile=function(e,t){const r=new n.ModerationDecision;r.setDid(e.did),r.setIsMe(e.did===t.userDid);for(const n of o(e.labels))r.addLabel("profile",n,t);return r},t.filterProfileLabels=o;const n=r(9092);function o(e){return e?e.filter((e=>e.uri.endsWith("/app.bsky.actor.profile/self"))):[]}},1196:function(e,t){"use strict";var r,n,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){r.set(this,!1),n.set(this,new Set)}get acquired(){return o(this,r,"f")}acquireAsync(){let e,t,{timeout:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,r,"f")?null==s?new Promise((e=>{o(this,n,"f").add(e)})):Promise.race([new Promise((r=>{e=()=>{clearTimeout(t),r()},o(this,n,"f").add(e)})),new Promise(((r,i)=>{t=setTimeout((()=>{o(this,n,"f").delete(e),i(new Error("Timed out waiting for lock"))}),s)}))]):(i(this,r,!0,"f"),Promise.resolve())}tryAcquire(){return!o(this,r,"f")&&(i(this,r,!0,"f"),!0)}release(){if(!o(this,r,"f"))throw new Error("Cannot release an unacquired lock");if(o(this,n,"f").size>0){const[e]=o(this,n,"f");o(this,n,"f").delete(e),e()}else i(this,r,!1,"f")}},r=new WeakMap,n=new WeakMap},1228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.graph.list#main"===e.$type||"app.bsky.graph.list"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.graph.list#main",e)};const n=r(2127),o=r(554)},1231:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(9845),o(r(2681),t),o(r(8876),t),o(r(7829),t),o(r(4580),t)},1247:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ComAtprotoServerDeleteAccount=t.ComAtprotoServerDefs=t.ComAtprotoServerDeactivateAccount=t.ComAtprotoServerCreateSession=t.ComAtprotoServerCreateInviteCodes=t.ComAtprotoServerCreateInviteCode=t.ComAtprotoServerCreateAppPassword=t.ComAtprotoServerCreateAccount=t.ComAtprotoServerConfirmEmail=t.ComAtprotoServerCheckAccountStatus=t.ComAtprotoServerActivateAccount=t.ComAtprotoRepoUploadBlob=t.ComAtprotoRepoStrongRef=t.ComAtprotoRepoPutRecord=t.ComAtprotoRepoListRecords=t.ComAtprotoRepoListMissingBlobs=t.ComAtprotoRepoImportRepo=t.ComAtprotoRepoGetRecord=t.ComAtprotoRepoDescribeRepo=t.ComAtprotoRepoDeleteRecord=t.ComAtprotoRepoDefs=t.ComAtprotoRepoCreateRecord=t.ComAtprotoRepoApplyWrites=t.ComAtprotoModerationDefs=t.ComAtprotoModerationCreateReport=t.ComAtprotoLexiconSchema=t.ComAtprotoLabelSubscribeLabels=t.ComAtprotoLabelQueryLabels=t.ComAtprotoLabelDefs=t.ComAtprotoIdentityUpdateHandle=t.ComAtprotoIdentitySubmitPlcOperation=t.ComAtprotoIdentitySignPlcOperation=t.ComAtprotoIdentityResolveHandle=t.ComAtprotoIdentityRequestPlcOperationSignature=t.ComAtprotoIdentityGetRecommendedDidCredentials=t.ComAtprotoAdminUpdateSubjectStatus=t.ComAtprotoAdminUpdateAccountPassword=t.ComAtprotoAdminUpdateAccountHandle=t.ComAtprotoAdminUpdateAccountEmail=t.ComAtprotoAdminSendEmail=t.ComAtprotoAdminSearchAccounts=t.ComAtprotoAdminGetSubjectStatus=t.ComAtprotoAdminGetInviteCodes=t.ComAtprotoAdminGetAccountInfos=t.ComAtprotoAdminGetAccountInfo=t.ComAtprotoAdminEnableAccountInvites=t.ComAtprotoAdminDisableInviteCodes=t.ComAtprotoAdminDisableAccountInvites=t.ComAtprotoAdminDeleteAccount=t.ComAtprotoAdminDefs=void 0,t.AppBskyFeedGenerator=t.AppBskyFeedDescribeFeedGenerator=t.AppBskyFeedDefs=t.AppBskyEmbedVideo=t.AppBskyEmbedRecordWithMedia=t.AppBskyEmbedRecord=t.AppBskyEmbedImages=t.AppBskyEmbedExternal=t.AppBskyEmbedDefs=t.AppBskyActorSearchActorsTypeahead=t.AppBskyActorSearchActors=t.AppBskyActorPutPreferences=t.AppBskyActorProfile=t.AppBskyActorGetSuggestions=t.AppBskyActorGetProfiles=t.AppBskyActorGetProfile=t.AppBskyActorGetPreferences=t.AppBskyActorDefs=t.ComAtprotoTempRequestPhoneVerification=t.ComAtprotoTempFetchLabels=t.ComAtprotoTempCheckSignupQueue=t.ComAtprotoTempAddReservedHandle=t.ComAtprotoSyncSubscribeRepos=t.ComAtprotoSyncRequestCrawl=t.ComAtprotoSyncNotifyOfUpdate=t.ComAtprotoSyncListRepos=t.ComAtprotoSyncListBlobs=t.ComAtprotoSyncGetRepoStatus=t.ComAtprotoSyncGetRepo=t.ComAtprotoSyncGetRecord=t.ComAtprotoSyncGetLatestCommit=t.ComAtprotoSyncGetHead=t.ComAtprotoSyncGetCheckout=t.ComAtprotoSyncGetBlocks=t.ComAtprotoSyncGetBlob=t.ComAtprotoServerUpdateEmail=t.ComAtprotoServerRevokeAppPassword=t.ComAtprotoServerResetPassword=t.ComAtprotoServerReserveSigningKey=t.ComAtprotoServerRequestPasswordReset=t.ComAtprotoServerRequestEmailUpdate=t.ComAtprotoServerRequestEmailConfirmation=t.ComAtprotoServerRequestAccountDelete=t.ComAtprotoServerRefreshSession=t.ComAtprotoServerListAppPasswords=t.ComAtprotoServerGetSession=t.ComAtprotoServerGetServiceAuth=t.ComAtprotoServerGetAccountInviteCodes=t.ComAtprotoServerDescribeServer=t.ComAtprotoServerDeleteSession=void 0,t.AppBskyGraphUnmuteThread=t.AppBskyGraphUnmuteActorList=t.AppBskyGraphUnmuteActor=t.AppBskyGraphStarterpack=t.AppBskyGraphSearchStarterPacks=t.AppBskyGraphMuteThread=t.AppBskyGraphMuteActorList=t.AppBskyGraphMuteActor=t.AppBskyGraphListitem=t.AppBskyGraphListblock=t.AppBskyGraphList=t.AppBskyGraphGetSuggestedFollowsByActor=t.AppBskyGraphGetStarterPacks=t.AppBskyGraphGetStarterPack=t.AppBskyGraphGetRelationships=t.AppBskyGraphGetMutes=t.AppBskyGraphGetLists=t.AppBskyGraphGetListMutes=t.AppBskyGraphGetListBlocks=t.AppBskyGraphGetList=t.AppBskyGraphGetKnownFollowers=t.AppBskyGraphGetFollows=t.AppBskyGraphGetFollowers=t.AppBskyGraphGetBlocks=t.AppBskyGraphGetActorStarterPacks=t.AppBskyGraphFollow=t.AppBskyGraphDefs=t.AppBskyGraphBlock=t.AppBskyFeedThreadgate=t.AppBskyFeedSendInteractions=t.AppBskyFeedSearchPosts=t.AppBskyFeedRepost=t.AppBskyFeedPostgate=t.AppBskyFeedPost=t.AppBskyFeedLike=t.AppBskyFeedGetTimeline=t.AppBskyFeedGetSuggestedFeeds=t.AppBskyFeedGetRepostedBy=t.AppBskyFeedGetQuotes=t.AppBskyFeedGetPosts=t.AppBskyFeedGetPostThread=t.AppBskyFeedGetListFeed=t.AppBskyFeedGetLikes=t.AppBskyFeedGetFeedSkeleton=t.AppBskyFeedGetFeedGenerators=t.AppBskyFeedGetFeedGenerator=t.AppBskyFeedGetFeed=t.AppBskyFeedGetAuthorFeed=t.AppBskyFeedGetActorLikes=t.AppBskyFeedGetActorFeeds=void 0,t.ToolsOzoneModerationGetEvent=t.ToolsOzoneModerationEmitEvent=t.ToolsOzoneModerationDefs=t.ToolsOzoneCommunicationUpdateTemplate=t.ToolsOzoneCommunicationListTemplates=t.ToolsOzoneCommunicationDeleteTemplate=t.ToolsOzoneCommunicationDefs=t.ToolsOzoneCommunicationCreateTemplate=t.ChatBskyModerationUpdateActorAccess=t.ChatBskyModerationGetMessageContext=t.ChatBskyModerationGetActorMetadata=t.ChatBskyConvoUpdateRead=t.ChatBskyConvoUnmuteConvo=t.ChatBskyConvoSendMessageBatch=t.ChatBskyConvoSendMessage=t.ChatBskyConvoMuteConvo=t.ChatBskyConvoListConvos=t.ChatBskyConvoLeaveConvo=t.ChatBskyConvoGetMessages=t.ChatBskyConvoGetLog=t.ChatBskyConvoGetConvoForMembers=t.ChatBskyConvoGetConvo=t.ChatBskyConvoDeleteMessageForSelf=t.ChatBskyConvoDefs=t.ChatBskyActorExportAccountData=t.ChatBskyActorDeleteAccount=t.ChatBskyActorDefs=t.ChatBskyActorDeclaration=t.AppBskyVideoUploadVideo=t.AppBskyVideoGetUploadLimits=t.AppBskyVideoGetJobStatus=t.AppBskyVideoDefs=t.AppBskyUnspeccedSearchStarterPacksSkeleton=t.AppBskyUnspeccedSearchPostsSkeleton=t.AppBskyUnspeccedSearchActorsSkeleton=t.AppBskyUnspeccedGetTrendingTopics=t.AppBskyUnspeccedGetTaggedSuggestions=t.AppBskyUnspeccedGetSuggestionsSkeleton=t.AppBskyUnspeccedGetPopularFeedGenerators=t.AppBskyUnspeccedGetConfig=t.AppBskyUnspeccedDefs=t.AppBskyRichtextFacet=t.AppBskyNotificationUpdateSeen=t.AppBskyNotificationRegisterPush=t.AppBskyNotificationPutPreferences=t.AppBskyNotificationListNotifications=t.AppBskyNotificationGetUnreadCount=t.AppBskyLabelerService=t.AppBskyLabelerGetServices=t.AppBskyLabelerDefs=void 0,t.ProfileRecord=t.AppBskyActorNS=t.AppBskyNS=t.AppNS=t.ComAtprotoTempNS=t.ComAtprotoSyncNS=t.ComAtprotoServerNS=t.ComAtprotoRepoNS=t.ComAtprotoModerationNS=t.SchemaRecord=t.ComAtprotoLexiconNS=t.ComAtprotoLabelNS=t.ComAtprotoIdentityNS=t.ComAtprotoAdminNS=t.ComAtprotoNS=t.ComNS=t.AtpBaseClient=t.TOOLS_OZONE_TEAM=t.TOOLS_OZONE_MODERATION=t.APP_BSKY_GRAPH=t.APP_BSKY_FEED=t.COM_ATPROTO_MODERATION=t.ToolsOzoneTeamUpdateMember=t.ToolsOzoneTeamListMembers=t.ToolsOzoneTeamDeleteMember=t.ToolsOzoneTeamDefs=t.ToolsOzoneTeamAddMember=t.ToolsOzoneSignatureSearchAccounts=t.ToolsOzoneSignatureFindRelatedAccounts=t.ToolsOzoneSignatureFindCorrelation=t.ToolsOzoneSignatureDefs=t.ToolsOzoneSettingUpsertOption=t.ToolsOzoneSettingRemoveOptions=t.ToolsOzoneSettingListOptions=t.ToolsOzoneSettingDefs=t.ToolsOzoneSetUpsertSet=t.ToolsOzoneSetQuerySets=t.ToolsOzoneSetGetValues=t.ToolsOzoneSetDeleteValues=t.ToolsOzoneSetDeleteSet=t.ToolsOzoneSetDefs=t.ToolsOzoneSetAddValues=t.ToolsOzoneServerGetConfig=t.ToolsOzoneModerationSearchRepos=t.ToolsOzoneModerationQueryStatuses=t.ToolsOzoneModerationQueryEvents=t.ToolsOzoneModerationGetRepos=t.ToolsOzoneModerationGetRepo=t.ToolsOzoneModerationGetRecords=t.ToolsOzoneModerationGetRecord=void 0,t.ToolsOzoneTeamNS=t.ToolsOzoneSignatureNS=t.ToolsOzoneSettingNS=t.ToolsOzoneSetNS=t.ToolsOzoneServerNS=t.ToolsOzoneModerationNS=t.ToolsOzoneCommunicationNS=t.ToolsOzoneNS=t.ToolsNS=t.ChatBskyModerationNS=t.ChatBskyConvoNS=t.DeclarationRecord=t.ChatBskyActorNS=t.ChatBskyNS=t.ChatNS=t.AppBskyVideoNS=t.AppBskyUnspeccedNS=t.AppBskyRichtextNS=t.AppBskyNotificationNS=t.ServiceRecord=t.AppBskyLabelerNS=t.StarterpackRecord=t.ListitemRecord=t.ListblockRecord=t.ListRecord=t.FollowRecord=t.BlockRecord=t.AppBskyGraphNS=t.ThreadgateRecord=t.RepostRecord=t.PostgateRecord=t.PostRecord=t.LikeRecord=t.GeneratorRecord=t.AppBskyFeedNS=t.AppBskyEmbedNS=void 0;const s=r(1510),a=r(554),c=i(r(7846)),l=i(r(4133)),d=i(r(6526)),u=i(r(4995)),p=i(r(1574)),f=i(r(5589)),h=i(r(2230)),y=i(r(2515)),m=i(r(2801)),g=i(r(3263)),b=i(r(5914)),v=i(r(6608)),E=i(r(590)),w=i(r(4516)),R=i(r(6379)),A=i(r(9574)),S=i(r(5350)),_=i(r(5623)),k=i(r(2887)),T=i(r(7635)),C=i(r(552)),L=i(r(2853)),x=i(r(7e3)),P=i(r(2989)),B=i(r(1829)),j=i(r(333)),D=i(r(5978)),U=i(r(9037)),I=i(r(6494)),O=i(r(2008)),K=i(r(4857)),M=i(r(3547)),V=i(r(7481)),N=i(r(6630)),z=i(r(256)),$=i(r(7106)),F=i(r(2763)),q=i(r(4439)),G=i(r(531)),H=i(r(1942)),W=i(r(5999)),X=i(r(6777)),Z=i(r(8432)),J=i(r(4122)),Q=i(r(2458)),Y=i(r(1700));t.ComAtprotoAdminDefs=i(r(4977)),t.ComAtprotoAdminDeleteAccount=i(r(7107)),t.ComAtprotoAdminDisableAccountInvites=i(r(1282)),t.ComAtprotoAdminDisableInviteCodes=i(r(2152)),t.ComAtprotoAdminEnableAccountInvites=i(r(2329)),t.ComAtprotoAdminGetAccountInfo=i(r(1634)),t.ComAtprotoAdminGetAccountInfos=i(r(2417)),t.ComAtprotoAdminGetInviteCodes=i(r(980)),t.ComAtprotoAdminGetSubjectStatus=i(r(7915)),t.ComAtprotoAdminSearchAccounts=i(r(7853)),t.ComAtprotoAdminSendEmail=i(r(9151)),t.ComAtprotoAdminUpdateAccountEmail=i(r(5237)),t.ComAtprotoAdminUpdateAccountHandle=i(r(8655)),t.ComAtprotoAdminUpdateAccountPassword=i(r(1704)),t.ComAtprotoAdminUpdateSubjectStatus=i(r(8344)),t.ComAtprotoIdentityGetRecommendedDidCredentials=i(r(2764)),t.ComAtprotoIdentityRequestPlcOperationSignature=i(r(7233)),t.ComAtprotoIdentityResolveHandle=i(r(6758)),t.ComAtprotoIdentitySignPlcOperation=i(r(9885)),t.ComAtprotoIdentitySubmitPlcOperation=i(r(224)),t.ComAtprotoIdentityUpdateHandle=i(r(6093)),t.ComAtprotoLabelDefs=i(r(1966)),t.ComAtprotoLabelQueryLabels=i(r(4303)),t.ComAtprotoLabelSubscribeLabels=i(r(735)),t.ComAtprotoLexiconSchema=i(r(3051)),t.ComAtprotoModerationCreateReport=i(r(9842)),t.ComAtprotoModerationDefs=i(r(28)),t.ComAtprotoRepoApplyWrites=i(r(7846)),t.ComAtprotoRepoCreateRecord=i(r(4133)),t.ComAtprotoRepoDefs=i(r(9904)),t.ComAtprotoRepoDeleteRecord=i(r(6526)),t.ComAtprotoRepoDescribeRepo=i(r(3405)),t.ComAtprotoRepoGetRecord=i(r(4995)),t.ComAtprotoRepoImportRepo=i(r(6161)),t.ComAtprotoRepoListMissingBlobs=i(r(3548)),t.ComAtprotoRepoListRecords=i(r(3392)),t.ComAtprotoRepoPutRecord=i(r(1574)),t.ComAtprotoRepoStrongRef=i(r(6466)),t.ComAtprotoRepoUploadBlob=i(r(4334)),t.ComAtprotoServerActivateAccount=i(r(8661)),t.ComAtprotoServerCheckAccountStatus=i(r(3112)),t.ComAtprotoServerConfirmEmail=i(r(5589)),t.ComAtprotoServerCreateAccount=i(r(2230)),t.ComAtprotoServerCreateAppPassword=i(r(2515)),t.ComAtprotoServerCreateInviteCode=i(r(9717)),t.ComAtprotoServerCreateInviteCodes=i(r(6320)),t.ComAtprotoServerCreateSession=i(r(2801)),t.ComAtprotoServerDeactivateAccount=i(r(960)),t.ComAtprotoServerDefs=i(r(6317)),t.ComAtprotoServerDeleteAccount=i(r(3263)),t.ComAtprotoServerDeleteSession=i(r(7248)),t.ComAtprotoServerDescribeServer=i(r(2099)),t.ComAtprotoServerGetAccountInviteCodes=i(r(5914)),t.ComAtprotoServerGetServiceAuth=i(r(6608)),t.ComAtprotoServerGetSession=i(r(6953)),t.ComAtprotoServerListAppPasswords=i(r(590)),t.ComAtprotoServerRefreshSession=i(r(4516)),t.ComAtprotoServerRequestAccountDelete=i(r(5466)),t.ComAtprotoServerRequestEmailConfirmation=i(r(7172)),t.ComAtprotoServerRequestEmailUpdate=i(r(1559)),t.ComAtprotoServerRequestPasswordReset=i(r(2534)),t.ComAtprotoServerReserveSigningKey=i(r(6927)),t.ComAtprotoServerResetPassword=i(r(6379)),t.ComAtprotoServerRevokeAppPassword=i(r(3313)),t.ComAtprotoServerUpdateEmail=i(r(9574)),t.ComAtprotoSyncGetBlob=i(r(5350)),t.ComAtprotoSyncGetBlocks=i(r(5623)),t.ComAtprotoSyncGetCheckout=i(r(8981)),t.ComAtprotoSyncGetHead=i(r(2887)),t.ComAtprotoSyncGetLatestCommit=i(r(7635)),t.ComAtprotoSyncGetRecord=i(r(552)),t.ComAtprotoSyncGetRepo=i(r(2853)),t.ComAtprotoSyncGetRepoStatus=i(r(7e3)),t.ComAtprotoSyncListBlobs=i(r(2989)),t.ComAtprotoSyncListRepos=i(r(5168)),t.ComAtprotoSyncNotifyOfUpdate=i(r(1424)),t.ComAtprotoSyncRequestCrawl=i(r(645)),t.ComAtprotoSyncSubscribeRepos=i(r(3128)),t.ComAtprotoTempAddReservedHandle=i(r(5985)),t.ComAtprotoTempCheckSignupQueue=i(r(4961)),t.ComAtprotoTempFetchLabels=i(r(9839)),t.ComAtprotoTempRequestPhoneVerification=i(r(478)),t.AppBskyActorDefs=i(r(2799)),t.AppBskyActorGetPreferences=i(r(9541)),t.AppBskyActorGetProfile=i(r(2862)),t.AppBskyActorGetProfiles=i(r(4725)),t.AppBskyActorGetSuggestions=i(r(1670)),t.AppBskyActorProfile=i(r(5762)),t.AppBskyActorPutPreferences=i(r(7830)),t.AppBskyActorSearchActors=i(r(8033)),t.AppBskyActorSearchActorsTypeahead=i(r(240)),t.AppBskyEmbedDefs=i(r(2603)),t.AppBskyEmbedExternal=i(r(1644)),t.AppBskyEmbedImages=i(r(9141)),t.AppBskyEmbedRecord=i(r(5694)),t.AppBskyEmbedRecordWithMedia=i(r(8284)),t.AppBskyEmbedVideo=i(r(5632)),t.AppBskyFeedDefs=i(r(5684)),t.AppBskyFeedDescribeFeedGenerator=i(r(9564)),t.AppBskyFeedGenerator=i(r(3747)),t.AppBskyFeedGetActorFeeds=i(r(3404)),t.AppBskyFeedGetActorLikes=i(r(1829)),t.AppBskyFeedGetAuthorFeed=i(r(333)),t.AppBskyFeedGetFeed=i(r(5978)),t.AppBskyFeedGetFeedGenerator=i(r(5817)),t.AppBskyFeedGetFeedGenerators=i(r(5628)),t.AppBskyFeedGetFeedSkeleton=i(r(9037)),t.AppBskyFeedGetLikes=i(r(7584)),t.AppBskyFeedGetListFeed=i(r(6494)),t.AppBskyFeedGetPostThread=i(r(2008)),t.AppBskyFeedGetPosts=i(r(3831)),t.AppBskyFeedGetQuotes=i(r(5975)),t.AppBskyFeedGetRepostedBy=i(r(7013)),t.AppBskyFeedGetSuggestedFeeds=i(r(5006)),t.AppBskyFeedGetTimeline=i(r(9157)),t.AppBskyFeedLike=i(r(7003)),t.AppBskyFeedPost=i(r(5890)),t.AppBskyFeedPostgate=i(r(3921)),t.AppBskyFeedRepost=i(r(7383)),t.AppBskyFeedSearchPosts=i(r(4857)),t.AppBskyFeedSendInteractions=i(r(9091)),t.AppBskyFeedThreadgate=i(r(4940)),t.AppBskyGraphBlock=i(r(1279)),t.AppBskyGraphDefs=i(r(868)),t.AppBskyGraphFollow=i(r(8365)),t.AppBskyGraphGetActorStarterPacks=i(r(7046)),t.AppBskyGraphGetBlocks=i(r(3868)),t.AppBskyGraphGetFollowers=i(r(3735)),t.AppBskyGraphGetFollows=i(r(4454)),t.AppBskyGraphGetKnownFollowers=i(r(3340)),t.AppBskyGraphGetList=i(r(5758)),t.AppBskyGraphGetListBlocks=i(r(6016)),t.AppBskyGraphGetListMutes=i(r(438)),t.AppBskyGraphGetLists=i(r(4933)),t.AppBskyGraphGetMutes=i(r(8602)),t.AppBskyGraphGetRelationships=i(r(3547)),t.AppBskyGraphGetStarterPack=i(r(8250)),t.AppBskyGraphGetStarterPacks=i(r(1369)),t.AppBskyGraphGetSuggestedFollowsByActor=i(r(4639)),t.AppBskyGraphList=i(r(1228)),t.AppBskyGraphListblock=i(r(2711)),t.AppBskyGraphListitem=i(r(7020)),t.AppBskyGraphMuteActor=i(r(7068)),t.AppBskyGraphMuteActorList=i(r(308)),t.AppBskyGraphMuteThread=i(r(2629)),t.AppBskyGraphSearchStarterPacks=i(r(6931)),t.AppBskyGraphStarterpack=i(r(6692)),t.AppBskyGraphUnmuteActor=i(r(8737)),t.AppBskyGraphUnmuteActorList=i(r(2773)),t.AppBskyGraphUnmuteThread=i(r(6318)),t.AppBskyLabelerDefs=i(r(4123)),t.AppBskyLabelerGetServices=i(r(5011)),t.AppBskyLabelerService=i(r(7208)),t.AppBskyNotificationGetUnreadCount=i(r(2243)),t.AppBskyNotificationListNotifications=i(r(9645)),t.AppBskyNotificationPutPreferences=i(r(4392)),t.AppBskyNotificationRegisterPush=i(r(9292)),t.AppBskyNotificationUpdateSeen=i(r(631)),t.AppBskyRichtextFacet=i(r(9956)),t.AppBskyUnspeccedDefs=i(r(2092)),t.AppBskyUnspeccedGetConfig=i(r(4832)),t.AppBskyUnspeccedGetPopularFeedGenerators=i(r(3891)),t.AppBskyUnspeccedGetSuggestionsSkeleton=i(r(8094)),t.AppBskyUnspeccedGetTaggedSuggestions=i(r(6897)),t.AppBskyUnspeccedGetTrendingTopics=i(r(8879)),t.AppBskyUnspeccedSearchActorsSkeleton=i(r(7481)),t.AppBskyUnspeccedSearchPostsSkeleton=i(r(6630)),t.AppBskyUnspeccedSearchStarterPacksSkeleton=i(r(256)),t.AppBskyVideoDefs=i(r(5921)),t.AppBskyVideoGetJobStatus=i(r(1616)),t.AppBskyVideoGetUploadLimits=i(r(7260)),t.AppBskyVideoUploadVideo=i(r(8949)),t.ChatBskyActorDeclaration=i(r(9168)),t.ChatBskyActorDefs=i(r(6992)),t.ChatBskyActorDeleteAccount=i(r(7422)),t.ChatBskyActorExportAccountData=i(r(9969)),t.ChatBskyConvoDefs=i(r(2792)),t.ChatBskyConvoDeleteMessageForSelf=i(r(6491)),t.ChatBskyConvoGetConvo=i(r(3135)),t.ChatBskyConvoGetConvoForMembers=i(r(5437)),t.ChatBskyConvoGetLog=i(r(4730)),t.ChatBskyConvoGetMessages=i(r(374)),t.ChatBskyConvoLeaveConvo=i(r(4498)),t.ChatBskyConvoListConvos=i(r(3660)),t.ChatBskyConvoMuteConvo=i(r(8478)),t.ChatBskyConvoSendMessage=i(r(4227)),t.ChatBskyConvoSendMessageBatch=i(r(1003)),t.ChatBskyConvoUnmuteConvo=i(r(7311)),t.ChatBskyConvoUpdateRead=i(r(5781)),t.ChatBskyModerationGetActorMetadata=i(r(9539)),t.ChatBskyModerationGetMessageContext=i(r(4921)),t.ChatBskyModerationUpdateActorAccess=i(r(59)),t.ToolsOzoneCommunicationCreateTemplate=i(r(7106)),t.ToolsOzoneCommunicationDefs=i(r(9696)),t.ToolsOzoneCommunicationDeleteTemplate=i(r(8525)),t.ToolsOzoneCommunicationListTemplates=i(r(3569)),t.ToolsOzoneCommunicationUpdateTemplate=i(r(2763)),t.ToolsOzoneModerationDefs=i(r(3328)),t.ToolsOzoneModerationEmitEvent=i(r(4439)),t.ToolsOzoneModerationGetEvent=i(r(9332)),t.ToolsOzoneModerationGetRecord=i(r(531)),t.ToolsOzoneModerationGetRecords=i(r(4214)),t.ToolsOzoneModerationGetRepo=i(r(1942)),t.ToolsOzoneModerationGetRepos=i(r(6653)),t.ToolsOzoneModerationQueryEvents=i(r(4797)),t.ToolsOzoneModerationQueryStatuses=i(r(1520)),t.ToolsOzoneModerationSearchRepos=i(r(3087)),t.ToolsOzoneServerGetConfig=i(r(9783)),t.ToolsOzoneSetAddValues=i(r(9123)),t.ToolsOzoneSetDefs=i(r(8360)),t.ToolsOzoneSetDeleteSet=i(r(5999)),t.ToolsOzoneSetDeleteValues=i(r(6777)),t.ToolsOzoneSetGetValues=i(r(8432)),t.ToolsOzoneSetQuerySets=i(r(8403)),t.ToolsOzoneSetUpsertSet=i(r(5383)),t.ToolsOzoneSettingDefs=i(r(2596)),t.ToolsOzoneSettingListOptions=i(r(2888)),t.ToolsOzoneSettingRemoveOptions=i(r(4687)),t.ToolsOzoneSettingUpsertOption=i(r(3377)),t.ToolsOzoneSignatureDefs=i(r(9914)),t.ToolsOzoneSignatureFindCorrelation=i(r(6665)),t.ToolsOzoneSignatureFindRelatedAccounts=i(r(818)),t.ToolsOzoneSignatureSearchAccounts=i(r(1414)),t.ToolsOzoneTeamAddMember=i(r(4122)),t.ToolsOzoneTeamDefs=i(r(5123)),t.ToolsOzoneTeamDeleteMember=i(r(2458)),t.ToolsOzoneTeamListMembers=i(r(4688)),t.ToolsOzoneTeamUpdateMember=i(r(1700)),t.COM_ATPROTO_MODERATION={DefsReasonSpam:"com.atproto.moderation.defs#reasonSpam",DefsReasonViolation:"com.atproto.moderation.defs#reasonViolation",DefsReasonMisleading:"com.atproto.moderation.defs#reasonMisleading",DefsReasonSexual:"com.atproto.moderation.defs#reasonSexual",DefsReasonRude:"com.atproto.moderation.defs#reasonRude",DefsReasonOther:"com.atproto.moderation.defs#reasonOther",DefsReasonAppeal:"com.atproto.moderation.defs#reasonAppeal"},t.APP_BSKY_FEED={DefsRequestLess:"app.bsky.feed.defs#requestLess",DefsRequestMore:"app.bsky.feed.defs#requestMore",DefsClickthroughItem:"app.bsky.feed.defs#clickthroughItem",DefsClickthroughAuthor:"app.bsky.feed.defs#clickthroughAuthor",DefsClickthroughReposter:"app.bsky.feed.defs#clickthroughReposter",DefsClickthroughEmbed:"app.bsky.feed.defs#clickthroughEmbed",DefsContentModeUnspecified:"app.bsky.feed.defs#contentModeUnspecified",DefsContentModeVideo:"app.bsky.feed.defs#contentModeVideo",DefsInteractionSeen:"app.bsky.feed.defs#interactionSeen",DefsInteractionLike:"app.bsky.feed.defs#interactionLike",DefsInteractionRepost:"app.bsky.feed.defs#interactionRepost",DefsInteractionReply:"app.bsky.feed.defs#interactionReply",DefsInteractionQuote:"app.bsky.feed.defs#interactionQuote",DefsInteractionShare:"app.bsky.feed.defs#interactionShare"},t.APP_BSKY_GRAPH={DefsModlist:"app.bsky.graph.defs#modlist",DefsCuratelist:"app.bsky.graph.defs#curatelist",DefsReferencelist:"app.bsky.graph.defs#referencelist"},t.TOOLS_OZONE_MODERATION={DefsReviewOpen:"tools.ozone.moderation.defs#reviewOpen",DefsReviewEscalated:"tools.ozone.moderation.defs#reviewEscalated",DefsReviewClosed:"tools.ozone.moderation.defs#reviewClosed",DefsReviewNone:"tools.ozone.moderation.defs#reviewNone"},t.TOOLS_OZONE_TEAM={DefsRoleAdmin:"tools.ozone.team.defs#roleAdmin",DefsRoleModerator:"tools.ozone.team.defs#roleModerator",DefsRoleTriage:"tools.ozone.team.defs#roleTriage"};class ee extends s.XrpcClient{constructor(e){super(e,a.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.com=new te(this),this.app=new fe(this),this.chat=new Ke(this),this.tools=new Fe(this)}get xrpc(){return this}}t.AtpBaseClient=ee;class te{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"atproto",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.atproto=new re(e)}}t.ComNS=te;class re{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"admin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"identity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lexicon",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sync",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"temp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.admin=new ne(e),this.identity=new oe(e),this.label=new ie(e),this.lexicon=new se(e),this.moderation=new ce(e),this.repo=new le(e),this.server=new de(e),this.sync=new ue(e),this.temp=new pe(e)}}t.ComAtprotoNS=re;class ne{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}deleteAccount(e,t){return this._client.call("com.atproto.admin.deleteAccount",t?.qp,e,t)}disableAccountInvites(e,t){return this._client.call("com.atproto.admin.disableAccountInvites",t?.qp,e,t)}disableInviteCodes(e,t){return this._client.call("com.atproto.admin.disableInviteCodes",t?.qp,e,t)}enableAccountInvites(e,t){return this._client.call("com.atproto.admin.enableAccountInvites",t?.qp,e,t)}getAccountInfo(e,t){return this._client.call("com.atproto.admin.getAccountInfo",e,void 0,t)}getAccountInfos(e,t){return this._client.call("com.atproto.admin.getAccountInfos",e,void 0,t)}getInviteCodes(e,t){return this._client.call("com.atproto.admin.getInviteCodes",e,void 0,t)}getSubjectStatus(e,t){return this._client.call("com.atproto.admin.getSubjectStatus",e,void 0,t)}searchAccounts(e,t){return this._client.call("com.atproto.admin.searchAccounts",e,void 0,t)}sendEmail(e,t){return this._client.call("com.atproto.admin.sendEmail",t?.qp,e,t)}updateAccountEmail(e,t){return this._client.call("com.atproto.admin.updateAccountEmail",t?.qp,e,t)}updateAccountHandle(e,t){return this._client.call("com.atproto.admin.updateAccountHandle",t?.qp,e,t)}updateAccountPassword(e,t){return this._client.call("com.atproto.admin.updateAccountPassword",t?.qp,e,t)}updateSubjectStatus(e,t){return this._client.call("com.atproto.admin.updateSubjectStatus",t?.qp,e,t)}}t.ComAtprotoAdminNS=ne;class oe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getRecommendedDidCredentials(e,t){return this._client.call("com.atproto.identity.getRecommendedDidCredentials",e,void 0,t)}requestPlcOperationSignature(e,t){return this._client.call("com.atproto.identity.requestPlcOperationSignature",t?.qp,e,t)}resolveHandle(e,t){return this._client.call("com.atproto.identity.resolveHandle",e,void 0,t)}signPlcOperation(e,t){return this._client.call("com.atproto.identity.signPlcOperation",t?.qp,e,t)}submitPlcOperation(e,t){return this._client.call("com.atproto.identity.submitPlcOperation",t?.qp,e,t)}updateHandle(e,t){return this._client.call("com.atproto.identity.updateHandle",t?.qp,e,t)}}t.ComAtprotoIdentityNS=oe;class ie{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}queryLabels(e,t){return this._client.call("com.atproto.label.queryLabels",e,void 0,t)}}t.ComAtprotoLabelNS=ie;class se{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.schema=new ae(e)}}t.ComAtprotoLexiconNS=se;class ae{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"com.atproto.lexicon.schema",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"com.atproto.lexicon.schema",...e})).data}async create(e,t,r){t.$type="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"com.atproto.lexicon.schema",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.atproto.lexicon.schema",...e},{headers:t})}}t.SchemaRecord=ae;class ce{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createReport(e,t){return this._client.call("com.atproto.moderation.createReport",t?.qp,e,t)}}t.ComAtprotoModerationNS=ce;class le{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}applyWrites(e,t){return this._client.call("com.atproto.repo.applyWrites",t?.qp,e,t).catch((e=>{throw c.toKnownErr(e)}))}createRecord(e,t){return this._client.call("com.atproto.repo.createRecord",t?.qp,e,t).catch((e=>{throw l.toKnownErr(e)}))}deleteRecord(e,t){return this._client.call("com.atproto.repo.deleteRecord",t?.qp,e,t).catch((e=>{throw d.toKnownErr(e)}))}describeRepo(e,t){return this._client.call("com.atproto.repo.describeRepo",e,void 0,t)}getRecord(e,t){return this._client.call("com.atproto.repo.getRecord",e,void 0,t).catch((e=>{throw u.toKnownErr(e)}))}importRepo(e,t){return this._client.call("com.atproto.repo.importRepo",t?.qp,e,t)}listMissingBlobs(e,t){return this._client.call("com.atproto.repo.listMissingBlobs",e,void 0,t)}listRecords(e,t){return this._client.call("com.atproto.repo.listRecords",e,void 0,t)}putRecord(e,t){return this._client.call("com.atproto.repo.putRecord",t?.qp,e,t).catch((e=>{throw p.toKnownErr(e)}))}uploadBlob(e,t){return this._client.call("com.atproto.repo.uploadBlob",t?.qp,e,t)}}t.ComAtprotoRepoNS=le;class de{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}activateAccount(e,t){return this._client.call("com.atproto.server.activateAccount",t?.qp,e,t)}checkAccountStatus(e,t){return this._client.call("com.atproto.server.checkAccountStatus",e,void 0,t)}confirmEmail(e,t){return this._client.call("com.atproto.server.confirmEmail",t?.qp,e,t).catch((e=>{throw f.toKnownErr(e)}))}createAccount(e,t){return this._client.call("com.atproto.server.createAccount",t?.qp,e,t).catch((e=>{throw h.toKnownErr(e)}))}createAppPassword(e,t){return this._client.call("com.atproto.server.createAppPassword",t?.qp,e,t).catch((e=>{throw y.toKnownErr(e)}))}createInviteCode(e,t){return this._client.call("com.atproto.server.createInviteCode",t?.qp,e,t)}createInviteCodes(e,t){return this._client.call("com.atproto.server.createInviteCodes",t?.qp,e,t)}createSession(e,t){return this._client.call("com.atproto.server.createSession",t?.qp,e,t).catch((e=>{throw m.toKnownErr(e)}))}deactivateAccount(e,t){return this._client.call("com.atproto.server.deactivateAccount",t?.qp,e,t)}deleteAccount(e,t){return this._client.call("com.atproto.server.deleteAccount",t?.qp,e,t).catch((e=>{throw g.toKnownErr(e)}))}deleteSession(e,t){return this._client.call("com.atproto.server.deleteSession",t?.qp,e,t)}describeServer(e,t){return this._client.call("com.atproto.server.describeServer",e,void 0,t)}getAccountInviteCodes(e,t){return this._client.call("com.atproto.server.getAccountInviteCodes",e,void 0,t).catch((e=>{throw b.toKnownErr(e)}))}getServiceAuth(e,t){return this._client.call("com.atproto.server.getServiceAuth",e,void 0,t).catch((e=>{throw v.toKnownErr(e)}))}getSession(e,t){return this._client.call("com.atproto.server.getSession",e,void 0,t)}listAppPasswords(e,t){return this._client.call("com.atproto.server.listAppPasswords",e,void 0,t).catch((e=>{throw E.toKnownErr(e)}))}refreshSession(e,t){return this._client.call("com.atproto.server.refreshSession",t?.qp,e,t).catch((e=>{throw w.toKnownErr(e)}))}requestAccountDelete(e,t){return this._client.call("com.atproto.server.requestAccountDelete",t?.qp,e,t)}requestEmailConfirmation(e,t){return this._client.call("com.atproto.server.requestEmailConfirmation",t?.qp,e,t)}requestEmailUpdate(e,t){return this._client.call("com.atproto.server.requestEmailUpdate",t?.qp,e,t)}requestPasswordReset(e,t){return this._client.call("com.atproto.server.requestPasswordReset",t?.qp,e,t)}reserveSigningKey(e,t){return this._client.call("com.atproto.server.reserveSigningKey",t?.qp,e,t)}resetPassword(e,t){return this._client.call("com.atproto.server.resetPassword",t?.qp,e,t).catch((e=>{throw R.toKnownErr(e)}))}revokeAppPassword(e,t){return this._client.call("com.atproto.server.revokeAppPassword",t?.qp,e,t)}updateEmail(e,t){return this._client.call("com.atproto.server.updateEmail",t?.qp,e,t).catch((e=>{throw A.toKnownErr(e)}))}}t.ComAtprotoServerNS=de;class ue{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getBlob(e,t){return this._client.call("com.atproto.sync.getBlob",e,void 0,t).catch((e=>{throw S.toKnownErr(e)}))}getBlocks(e,t){return this._client.call("com.atproto.sync.getBlocks",e,void 0,t).catch((e=>{throw _.toKnownErr(e)}))}getCheckout(e,t){return this._client.call("com.atproto.sync.getCheckout",e,void 0,t)}getHead(e,t){return this._client.call("com.atproto.sync.getHead",e,void 0,t).catch((e=>{throw k.toKnownErr(e)}))}getLatestCommit(e,t){return this._client.call("com.atproto.sync.getLatestCommit",e,void 0,t).catch((e=>{throw T.toKnownErr(e)}))}getRecord(e,t){return this._client.call("com.atproto.sync.getRecord",e,void 0,t).catch((e=>{throw C.toKnownErr(e)}))}getRepo(e,t){return this._client.call("com.atproto.sync.getRepo",e,void 0,t).catch((e=>{throw L.toKnownErr(e)}))}getRepoStatus(e,t){return this._client.call("com.atproto.sync.getRepoStatus",e,void 0,t).catch((e=>{throw x.toKnownErr(e)}))}listBlobs(e,t){return this._client.call("com.atproto.sync.listBlobs",e,void 0,t).catch((e=>{throw P.toKnownErr(e)}))}listRepos(e,t){return this._client.call("com.atproto.sync.listRepos",e,void 0,t)}notifyOfUpdate(e,t){return this._client.call("com.atproto.sync.notifyOfUpdate",t?.qp,e,t)}requestCrawl(e,t){return this._client.call("com.atproto.sync.requestCrawl",t?.qp,e,t)}}t.ComAtprotoSyncNS=ue;class pe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addReservedHandle(e,t){return this._client.call("com.atproto.temp.addReservedHandle",t?.qp,e,t)}checkSignupQueue(e,t){return this._client.call("com.atproto.temp.checkSignupQueue",e,void 0,t)}fetchLabels(e,t){return this._client.call("com.atproto.temp.fetchLabels",e,void 0,t)}requestPhoneVerification(e,t){return this._client.call("com.atproto.temp.requestPhoneVerification",t?.qp,e,t)}}t.ComAtprotoTempNS=pe;class fe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.bsky=new he(e)}}t.AppNS=fe;class he{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"embed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"feed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"graph",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labeler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"notification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"richtext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unspecced",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"video",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.actor=new ye(e),this.embed=new ge(e),this.feed=new be(e),this.graph=new _e(e),this.labeler=new Be(e),this.notification=new De(e),this.richtext=new Ue(e),this.unspecced=new Ie(e),this.video=new Oe(e)}}t.AppBskyNS=he;class ye{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"profile",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.profile=new me(e)}getPreferences(e,t){return this._client.call("app.bsky.actor.getPreferences",e,void 0,t)}getProfile(e,t){return this._client.call("app.bsky.actor.getProfile",e,void 0,t)}getProfiles(e,t){return this._client.call("app.bsky.actor.getProfiles",e,void 0,t)}getSuggestions(e,t){return this._client.call("app.bsky.actor.getSuggestions",e,void 0,t)}putPreferences(e,t){return this._client.call("app.bsky.actor.putPreferences",t?.qp,e,t)}searchActors(e,t){return this._client.call("app.bsky.actor.searchActors",e,void 0,t)}searchActorsTypeahead(e,t){return this._client.call("app.bsky.actor.searchActorsTypeahead",e,void 0,t)}}t.AppBskyActorNS=ye;class me{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.profile",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.profile",...e})).data}async create(e,t,r){t.$type="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.actor.profile",rkey:"self",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.profile",...e},{headers:t})}}t.ProfileRecord=me;class ge{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}t.AppBskyEmbedNS=ge;class be{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"generator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"like",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"post",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"postgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repost",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threadgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.generator=new ve(e),this.like=new Ee(e),this.post=new we(e),this.postgate=new Re(e),this.repost=new Ae(e),this.threadgate=new Se(e)}describeFeedGenerator(e,t){return this._client.call("app.bsky.feed.describeFeedGenerator",e,void 0,t)}getActorFeeds(e,t){return this._client.call("app.bsky.feed.getActorFeeds",e,void 0,t)}getActorLikes(e,t){return this._client.call("app.bsky.feed.getActorLikes",e,void 0,t).catch((e=>{throw B.toKnownErr(e)}))}getAuthorFeed(e,t){return this._client.call("app.bsky.feed.getAuthorFeed",e,void 0,t).catch((e=>{throw j.toKnownErr(e)}))}getFeed(e,t){return this._client.call("app.bsky.feed.getFeed",e,void 0,t).catch((e=>{throw D.toKnownErr(e)}))}getFeedGenerator(e,t){return this._client.call("app.bsky.feed.getFeedGenerator",e,void 0,t)}getFeedGenerators(e,t){return this._client.call("app.bsky.feed.getFeedGenerators",e,void 0,t)}getFeedSkeleton(e,t){return this._client.call("app.bsky.feed.getFeedSkeleton",e,void 0,t).catch((e=>{throw U.toKnownErr(e)}))}getLikes(e,t){return this._client.call("app.bsky.feed.getLikes",e,void 0,t)}getListFeed(e,t){return this._client.call("app.bsky.feed.getListFeed",e,void 0,t).catch((e=>{throw I.toKnownErr(e)}))}getPostThread(e,t){return this._client.call("app.bsky.feed.getPostThread",e,void 0,t).catch((e=>{throw O.toKnownErr(e)}))}getPosts(e,t){return this._client.call("app.bsky.feed.getPosts",e,void 0,t)}getQuotes(e,t){return this._client.call("app.bsky.feed.getQuotes",e,void 0,t)}getRepostedBy(e,t){return this._client.call("app.bsky.feed.getRepostedBy",e,void 0,t)}getSuggestedFeeds(e,t){return this._client.call("app.bsky.feed.getSuggestedFeeds",e,void 0,t)}getTimeline(e,t){return this._client.call("app.bsky.feed.getTimeline",e,void 0,t)}searchPosts(e,t){return this._client.call("app.bsky.feed.searchPosts",e,void 0,t).catch((e=>{throw K.toKnownErr(e)}))}sendInteractions(e,t){return this._client.call("app.bsky.feed.sendInteractions",t?.qp,e,t)}}t.AppBskyFeedNS=be;class ve{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.generator",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.generator",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.generator",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.generator",...e},{headers:t})}}t.GeneratorRecord=ve;class Ee{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.like",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.like",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.like",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.like",...e},{headers:t})}}t.LikeRecord=Ee;class we{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.post",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.post",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.post",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.post",...e},{headers:t})}}t.PostRecord=we;class Re{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.postgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.postgate",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.postgate",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.postgate",...e},{headers:t})}}t.PostgateRecord=Re;class Ae{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.repost",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.repost",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.repost",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.repost",...e},{headers:t})}}t.RepostRecord=Ae;class Se{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.threadgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.threadgate",...e})).data}async create(e,t,r){t.$type="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.feed.threadgate",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.threadgate",...e},{headers:t})}}t.ThreadgateRecord=Se;class _e{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"follow",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listblock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listitem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"starterpack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.block=new ke(e),this.follow=new Te(e),this.list=new Ce(e),this.listblock=new Le(e),this.listitem=new xe(e),this.starterpack=new Pe(e)}getActorStarterPacks(e,t){return this._client.call("app.bsky.graph.getActorStarterPacks",e,void 0,t)}getBlocks(e,t){return this._client.call("app.bsky.graph.getBlocks",e,void 0,t)}getFollowers(e,t){return this._client.call("app.bsky.graph.getFollowers",e,void 0,t)}getFollows(e,t){return this._client.call("app.bsky.graph.getFollows",e,void 0,t)}getKnownFollowers(e,t){return this._client.call("app.bsky.graph.getKnownFollowers",e,void 0,t)}getList(e,t){return this._client.call("app.bsky.graph.getList",e,void 0,t)}getListBlocks(e,t){return this._client.call("app.bsky.graph.getListBlocks",e,void 0,t)}getListMutes(e,t){return this._client.call("app.bsky.graph.getListMutes",e,void 0,t)}getLists(e,t){return this._client.call("app.bsky.graph.getLists",e,void 0,t)}getMutes(e,t){return this._client.call("app.bsky.graph.getMutes",e,void 0,t)}getRelationships(e,t){return this._client.call("app.bsky.graph.getRelationships",e,void 0,t).catch((e=>{throw M.toKnownErr(e)}))}getStarterPack(e,t){return this._client.call("app.bsky.graph.getStarterPack",e,void 0,t)}getStarterPacks(e,t){return this._client.call("app.bsky.graph.getStarterPacks",e,void 0,t)}getSuggestedFollowsByActor(e,t){return this._client.call("app.bsky.graph.getSuggestedFollowsByActor",e,void 0,t)}muteActor(e,t){return this._client.call("app.bsky.graph.muteActor",t?.qp,e,t)}muteActorList(e,t){return this._client.call("app.bsky.graph.muteActorList",t?.qp,e,t)}muteThread(e,t){return this._client.call("app.bsky.graph.muteThread",t?.qp,e,t)}searchStarterPacks(e,t){return this._client.call("app.bsky.graph.searchStarterPacks",e,void 0,t)}unmuteActor(e,t){return this._client.call("app.bsky.graph.unmuteActor",t?.qp,e,t)}unmuteActorList(e,t){return this._client.call("app.bsky.graph.unmuteActorList",t?.qp,e,t)}unmuteThread(e,t){return this._client.call("app.bsky.graph.unmuteThread",t?.qp,e,t)}}t.AppBskyGraphNS=_e;class ke{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.block",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.block",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.block",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.block",...e},{headers:t})}}t.BlockRecord=ke;class Te{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.follow",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.follow",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.follow",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.follow",...e},{headers:t})}}t.FollowRecord=Te;class Ce{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.list",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.list",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.list",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.list",...e},{headers:t})}}t.ListRecord=Ce;class Le{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listblock",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listblock",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.listblock",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listblock",...e},{headers:t})}}t.ListblockRecord=Le;class xe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listitem",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listitem",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.listitem",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listitem",...e},{headers:t})}}t.ListitemRecord=xe;class Pe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.starterpack",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.starterpack",...e})).data}async create(e,t,r){t.$type="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.graph.starterpack",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.starterpack",...e},{headers:t})}}t.StarterpackRecord=Pe;class Be{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"service",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.service=new je(e)}getServices(e,t){return this._client.call("app.bsky.labeler.getServices",e,void 0,t)}}t.AppBskyLabelerNS=Be;class je{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.labeler.service",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.labeler.service",...e})).data}async create(e,t,r){t.$type="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"app.bsky.labeler.service",rkey:"self",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.labeler.service",...e},{headers:t})}}t.ServiceRecord=je;class De{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getUnreadCount(e,t){return this._client.call("app.bsky.notification.getUnreadCount",e,void 0,t)}listNotifications(e,t){return this._client.call("app.bsky.notification.listNotifications",e,void 0,t)}putPreferences(e,t){return this._client.call("app.bsky.notification.putPreferences",t?.qp,e,t)}registerPush(e,t){return this._client.call("app.bsky.notification.registerPush",t?.qp,e,t)}updateSeen(e,t){return this._client.call("app.bsky.notification.updateSeen",t?.qp,e,t)}}t.AppBskyNotificationNS=De;class Ue{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}t.AppBskyRichtextNS=Ue;class Ie{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,t){return this._client.call("app.bsky.unspecced.getConfig",e,void 0,t)}getPopularFeedGenerators(e,t){return this._client.call("app.bsky.unspecced.getPopularFeedGenerators",e,void 0,t)}getSuggestionsSkeleton(e,t){return this._client.call("app.bsky.unspecced.getSuggestionsSkeleton",e,void 0,t)}getTaggedSuggestions(e,t){return this._client.call("app.bsky.unspecced.getTaggedSuggestions",e,void 0,t)}getTrendingTopics(e,t){return this._client.call("app.bsky.unspecced.getTrendingTopics",e,void 0,t)}searchActorsSkeleton(e,t){return this._client.call("app.bsky.unspecced.searchActorsSkeleton",e,void 0,t).catch((e=>{throw V.toKnownErr(e)}))}searchPostsSkeleton(e,t){return this._client.call("app.bsky.unspecced.searchPostsSkeleton",e,void 0,t).catch((e=>{throw N.toKnownErr(e)}))}searchStarterPacksSkeleton(e,t){return this._client.call("app.bsky.unspecced.searchStarterPacksSkeleton",e,void 0,t).catch((e=>{throw z.toKnownErr(e)}))}}t.AppBskyUnspeccedNS=Ie;class Oe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getJobStatus(e,t){return this._client.call("app.bsky.video.getJobStatus",e,void 0,t)}getUploadLimits(e,t){return this._client.call("app.bsky.video.getUploadLimits",e,void 0,t)}uploadVideo(e,t){return this._client.call("app.bsky.video.uploadVideo",t?.qp,e,t)}}t.AppBskyVideoNS=Oe;class Ke{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.bsky=new Me(e)}}t.ChatNS=Ke;class Me{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"convo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.actor=new Ve(e),this.convo=new ze(e),this.moderation=new $e(e)}}t.ChatBskyNS=Me;class Ve{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"declaration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.declaration=new Ne(e)}deleteAccount(e,t){return this._client.call("chat.bsky.actor.deleteAccount",t?.qp,e,t)}exportAccountData(e,t){return this._client.call("chat.bsky.actor.exportAccountData",e,void 0,t)}}t.ChatBskyActorNS=Ve;class Ne{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"chat.bsky.actor.declaration",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"chat.bsky.actor.declaration",...e})).data}async create(e,t,r){t.$type="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:"chat.bsky.actor.declaration",rkey:"self",...e,record:t},{encoding:"application/json",headers:r})).data}async delete(e,t){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"chat.bsky.actor.declaration",...e},{headers:t})}}t.DeclarationRecord=Ne;class ze{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}deleteMessageForSelf(e,t){return this._client.call("chat.bsky.convo.deleteMessageForSelf",t?.qp,e,t)}getConvo(e,t){return this._client.call("chat.bsky.convo.getConvo",e,void 0,t)}getConvoForMembers(e,t){return this._client.call("chat.bsky.convo.getConvoForMembers",e,void 0,t)}getLog(e,t){return this._client.call("chat.bsky.convo.getLog",e,void 0,t)}getMessages(e,t){return this._client.call("chat.bsky.convo.getMessages",e,void 0,t)}leaveConvo(e,t){return this._client.call("chat.bsky.convo.leaveConvo",t?.qp,e,t)}listConvos(e,t){return this._client.call("chat.bsky.convo.listConvos",e,void 0,t)}muteConvo(e,t){return this._client.call("chat.bsky.convo.muteConvo",t?.qp,e,t)}sendMessage(e,t){return this._client.call("chat.bsky.convo.sendMessage",t?.qp,e,t)}sendMessageBatch(e,t){return this._client.call("chat.bsky.convo.sendMessageBatch",t?.qp,e,t)}unmuteConvo(e,t){return this._client.call("chat.bsky.convo.unmuteConvo",t?.qp,e,t)}updateRead(e,t){return this._client.call("chat.bsky.convo.updateRead",t?.qp,e,t)}}t.ChatBskyConvoNS=ze;class $e{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getActorMetadata(e,t){return this._client.call("chat.bsky.moderation.getActorMetadata",e,void 0,t)}getMessageContext(e,t){return this._client.call("chat.bsky.moderation.getMessageContext",e,void 0,t)}updateActorAccess(e,t){return this._client.call("chat.bsky.moderation.updateActorAccess",t?.qp,e,t)}}t.ChatBskyModerationNS=$e;class Fe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ozone",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.ozone=new qe(e)}}t.ToolsNS=Fe;class qe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"communication",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"set",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"setting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"team",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.communication=new Ge(e),this.moderation=new He(e),this.server=new We(e),this.set=new Xe(e),this.setting=new Ze(e),this.signature=new Je(e),this.team=new Qe(e)}}t.ToolsOzoneNS=qe;class Ge{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createTemplate(e,t){return this._client.call("tools.ozone.communication.createTemplate",t?.qp,e,t).catch((e=>{throw $.toKnownErr(e)}))}deleteTemplate(e,t){return this._client.call("tools.ozone.communication.deleteTemplate",t?.qp,e,t)}listTemplates(e,t){return this._client.call("tools.ozone.communication.listTemplates",e,void 0,t)}updateTemplate(e,t){return this._client.call("tools.ozone.communication.updateTemplate",t?.qp,e,t).catch((e=>{throw F.toKnownErr(e)}))}}t.ToolsOzoneCommunicationNS=Ge;class He{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}emitEvent(e,t){return this._client.call("tools.ozone.moderation.emitEvent",t?.qp,e,t).catch((e=>{throw q.toKnownErr(e)}))}getEvent(e,t){return this._client.call("tools.ozone.moderation.getEvent",e,void 0,t)}getRecord(e,t){return this._client.call("tools.ozone.moderation.getRecord",e,void 0,t).catch((e=>{throw G.toKnownErr(e)}))}getRecords(e,t){return this._client.call("tools.ozone.moderation.getRecords",e,void 0,t)}getRepo(e,t){return this._client.call("tools.ozone.moderation.getRepo",e,void 0,t).catch((e=>{throw H.toKnownErr(e)}))}getRepos(e,t){return this._client.call("tools.ozone.moderation.getRepos",e,void 0,t)}queryEvents(e,t){return this._client.call("tools.ozone.moderation.queryEvents",e,void 0,t)}queryStatuses(e,t){return this._client.call("tools.ozone.moderation.queryStatuses",e,void 0,t)}searchRepos(e,t){return this._client.call("tools.ozone.moderation.searchRepos",e,void 0,t)}}t.ToolsOzoneModerationNS=He;class We{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,t){return this._client.call("tools.ozone.server.getConfig",e,void 0,t)}}t.ToolsOzoneServerNS=We;class Xe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addValues(e,t){return this._client.call("tools.ozone.set.addValues",t?.qp,e,t)}deleteSet(e,t){return this._client.call("tools.ozone.set.deleteSet",t?.qp,e,t).catch((e=>{throw W.toKnownErr(e)}))}deleteValues(e,t){return this._client.call("tools.ozone.set.deleteValues",t?.qp,e,t).catch((e=>{throw X.toKnownErr(e)}))}getValues(e,t){return this._client.call("tools.ozone.set.getValues",e,void 0,t).catch((e=>{throw Z.toKnownErr(e)}))}querySets(e,t){return this._client.call("tools.ozone.set.querySets",e,void 0,t)}upsertSet(e,t){return this._client.call("tools.ozone.set.upsertSet",t?.qp,e,t)}}t.ToolsOzoneSetNS=Xe;class Ze{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}listOptions(e,t){return this._client.call("tools.ozone.setting.listOptions",e,void 0,t)}removeOptions(e,t){return this._client.call("tools.ozone.setting.removeOptions",t?.qp,e,t)}upsertOption(e,t){return this._client.call("tools.ozone.setting.upsertOption",t?.qp,e,t)}}t.ToolsOzoneSettingNS=Ze;class Je{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}findCorrelation(e,t){return this._client.call("tools.ozone.signature.findCorrelation",e,void 0,t)}findRelatedAccounts(e,t){return this._client.call("tools.ozone.signature.findRelatedAccounts",e,void 0,t)}searchAccounts(e,t){return this._client.call("tools.ozone.signature.searchAccounts",e,void 0,t)}}t.ToolsOzoneSignatureNS=Je;class Qe{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addMember(e,t){return this._client.call("tools.ozone.team.addMember",t?.qp,e,t).catch((e=>{throw J.toKnownErr(e)}))}deleteMember(e,t){return this._client.call("tools.ozone.team.deleteMember",t?.qp,e,t).catch((e=>{throw Q.toKnownErr(e)}))}listMembers(e,t){return this._client.call("tools.ozone.team.listMembers",e,void 0,t)}updateMember(e,t){return this._client.call("tools.ozone.team.updateMember",t?.qp,e,t).catch((e=>{throw Y.toKnownErr(e)}))}}t.ToolsOzoneTeamNS=Qe},1279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.graph.block#main"===e.$type||"app.bsky.graph.block"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.graph.block#main",e)};const n=r(2127),o=r(554)},1282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1308:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const n=r(2559);t.ZodIssueCode=n.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);t.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class o extends Error{get errors(){return this.issues}constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(n);else if("invalid_return_type"===o.code)n(o.returnTypeError);else if("invalid_arguments"===o.code)n(o.argumentsError);else if(0===o.path.length)r._errors.push(t(o));else{let e=r,n=0;for(;n0&&void 0!==arguments[0]?arguments[0]:e=>e.message;const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=o,o.create=e=>new o(e)},1369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1414:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthenticationErrorResponseSchema=void 0;const n=r(1085);t.oauthAuthenticationErrorResponseSchema=n.z.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"])},1454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oidcClaimsPropertiesSchema=void 0;const n=r(1085),o=n.z.union([n.z.string(),n.z.number(),n.z.boolean()]);t.oidcClaimsPropertiesSchema=n.z.object({essential:n.z.boolean().optional(),value:o.optional(),values:n.z.array(o).optional()})},1507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlobRef=t.jsonBlobRef=t.untypedJsonBlobRef=t.typedJsonBlobRef=void 0;const n=r(6571),o=r(1085),i=r(8021);t.typedJsonBlobRef=o.z.object({$type:o.z.literal("blob"),ref:i.schema.cid,mimeType:o.z.string(),size:o.z.number()}).strict(),t.untypedJsonBlobRef=o.z.object({cid:o.z.string(),mimeType:o.z.string()}).strict(),t.jsonBlobRef=o.z.union([t.typedJsonBlobRef,t.untypedJsonBlobRef]);class s{constructor(e,t,r,n){Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"mimeType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"original",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.original=n??{$type:"blob",ref:e,mimeType:t,size:r}}static asBlobRef(e){return i.check.is(e,t.jsonBlobRef)?s.fromJsonRef(e):null}static fromJsonRef(e){return i.check.is(e,t.typedJsonBlobRef)?new s(e.ref,e.mimeType,e.size):new s(n.CID.parse(e.cid),e.mimeType,-1,e)}ipld(){return{$type:"blob",ref:this.ref,mimeType:this.mimeType,size:this.size}}toJSON(){return(0,i.ipldToJson)(this.ipld())}}t.BlobRef=s},1510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(4735),t),o(r(4791),t),o(r(6891),t),o(r(7515),t),o(r(7955),t);const i=new(r(4735).Client);t.default=i},1520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1559:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSwapError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"InvalidSwap"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidSwapError=o},1603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=o,t.createRetryable=function(e){return async(t,r)=>o(t,{...r,retryable:e})},t.backoffMs=i;const n=r(4997);async function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{maxRetries:r=3,retryable:o=()=>!0,getWaitMs:s=i}=t;let a,c=0;for(;!a;)try{return await e()}catch(l){const e=s(c);c1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;const n=Math.pow(2,e)*t;return function(e){const t=.15*e;return e+(r=-t,n=t,Math.random()*(n-r)+r);var r,n}(Math.min(n,r))}},1608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidRecordKeyError=t.isValidRecordKey=t.ensureValidRecordKey=void 0;t.ensureValidRecordKey=e=>{if(e.length>512||e.length<1)throw new r("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(e))throw new r("record key syntax not valid (regex)");if("."===e||".."===e)throw new r('record key can not be "." or ".."')};t.isValidRecordKey=e=>{try{(0,t.ensureValidRecordKey)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};class r extends Error{}t.InvalidRecordKeyError=r},1616:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1634:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMain=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.embed.external#main"===e.$type||"app.bsky.embed.external"===e.$type)},t.validateMain=function(e){return o.lexicons.validate("app.bsky.embed.external#main",e)},t.isExternal=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.external#external"===e.$type},t.validateExternal=function(e){return o.lexicons.validate("app.bsky.embed.external#external",e)},t.isView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.external#view"===e.$type},t.validateView=function(e){return o.lexicons.validate("app.bsky.embed.external#view",e)},t.isViewExternal=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.external#viewExternal"===e.$type},t.validateViewExternal=function(e){return o.lexicons.validate("app.bsky.embed.external#viewExternal",e)};const n=r(2127),o=r(554)},1670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemberNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"MemberNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.MemberNotFoundError=o},1701:function(e,t,r){"use strict";var n=this&&this.__runInitializers||function(e,t,r){for(var n=arguments.length>2,o=0;o=0;f--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var m=(0,r[f])("accessor"===c?{get:u.get,set:u.set}:u[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!==typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(u.get=a),(a=s(m.set))&&(u.set=a),(a=s(m.init))&&o.unshift(a)}else(a=s(m))&&("field"===c?o.unshift(a):u[l]=a)}d&&Object.defineProperty(d,n.name,u),p=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.Key=void 0;const i=r(8640),s=r(3679),a=r(5574),c=r(8404),l=a.jwkSchema.readonly();let d=(()=>{var e;let t,r,a,d=[];return e=class{constructor(e){if(Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(n(this,d),e)}),!e.use)throw new s.JwkError('Missing "use" Parameter value')}get isPrivate(){const{jwk:e}=this;return"d"in e&&void 0!==e.d||"k"in e&&void 0!==e.k}get isSymetric(){const{jwk:e}=this;return"k"in e&&void 0!==e.k}get privateJwk(){return this.isPrivate?this.jwk:void 0}get publicJwk(){if(!this.isSymetric)return l.parse({...this.jwk,d:void 0,k:void 0})}get bareJwk(){if(this.isSymetric)return;const{kty:e,crv:t,e:r,n:n,x:o,y:i}=this.jwk;return l.parse({crv:t,e:r,kty:e,n:n,x:o,y:i})}get use(){return this.jwk.use}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Object.freeze(Array.from((0,i.jwkAlgorithms)(this.jwk)))}},(()=>{const n="function"===typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[c.cachedGetter],r=[c.cachedGetter],a=[c.cachedGetter],o(e,null,t,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:e=>"publicJwk"in e,get:e=>e.publicJwk},metadata:n},null,d),o(e,null,r,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:e=>"bareJwk"in e,get:e=>e.bareJwk},metadata:n},null,d),o(e,null,a,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:e=>"algorithms"in e,get:e=>e.algorithms},metadata:n},null,d),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),e})();t.Key=d},1704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},1710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isQuotedPost=function(e){return Boolean(e&&n.AppBskyEmbedRecord.isView(e))},t.isQuotedPostWithMedia=function(e){return Boolean(e&&n.AppBskyEmbedRecordWithMedia.isView(e))},t.interpretLabelValueDefinition=o,t.interpretLabelValueDefinitions=function(e){return(e.policies?.labelValueDefinitions||[]).filter((e=>n.ComAtprotoLabelDefs.validateLabelValueDefinition(e).success)).map((t=>o(t,e.creator.did)))};const n=r(1247);function o(e,t){const r={account:{},profile:{},content:{}},n="alert"===e.severity?"alert":"inform"===e.severity?"inform":void 0;"content"===e.blurs?(r.account.profileList=n,r.account.profileView=n,r.account.contentList="blur",r.account.contentView=e.adultOnly?"blur":n,r.profile.profileList=n,r.profile.profileView=n,r.content.contentList="blur",r.content.contentView=e.adultOnly?"blur":n):"media"===e.blurs?(r.account.profileList=n,r.account.profileView=n,r.account.avatar="blur",r.account.banner="blur",r.profile.profileList=n,r.profile.profileView=n,r.profile.avatar="blur",r.profile.banner="blur",r.content.contentMedia="blur"):"none"===e.blurs&&(r.account.profileList=n,r.account.profileView=n,r.account.contentList=n,r.account.contentView=n,r.profile.profileList=n,r.profile.profileView=n,r.content.contentList=n,r.content.contentView=n);let o="warn";"hide"!==e.defaultSetting&&"ignore"!==e.defaultSetting||(o=e.defaultSetting);const i=["no-self"];return e.adultOnly&&i.push("adult"),{...e,definedBy:t,configurable:!0,defaultSetting:o,flags:i,behaviors:r}}},1757:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectFacets=function(e){let t;const r=[];{const n=i.MENTION_REGEX;for(;t=n.exec(e.utf16);){if(!s(t[3])&&!t[3].endsWith(".test"))continue;const n=e.utf16.indexOf(t[3],t.index)-1;r.push({$type:"app.bsky.richtext.facet",index:{byteStart:e.utf16IndexToUtf8Index(n),byteEnd:e.utf16IndexToUtf8Index(n+t[3].length+1)},features:[{$type:"app.bsky.richtext.facet#mention",did:t[3]}]})}}{const n=i.URL_REGEX;for(;t=n.exec(e.utf16);){let n=t[2];if(!n.startsWith("http")){const e=t.groups?.domain;if(!e||!s(e))continue;n=`https://${n}`}const o=e.utf16.indexOf(t[2],t.index),i={start:o,end:o+t[2].length};/[.,;:!?]$/.test(n)&&(n=n.slice(0,-1),i.end--),/[)]$/.test(n)&&!n.includes("(")&&(n=n.slice(0,-1),i.end--),r.push({index:{byteStart:e.utf16IndexToUtf8Index(i.start),byteEnd:e.utf16IndexToUtf8Index(i.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:n}]})}}{const n=i.TAG_REGEX;for(;t=n.exec(e.utf16);){const n=t[1];let o=t[2];if(!o)continue;if(o=o.trim().replace(i.TRAILING_PUNCTUATION_REGEX,""),0===o.length||o.length>64)continue;const s=t.index+n.length;r.push({index:{byteStart:e.utf16IndexToUtf8Index(s),byteEnd:e.utf16IndexToUtf8Index(s+1+o.length)},features:[{$type:"app.bsky.richtext.facet#tag",tag:o}]})}}return r.length>0?r:void 0};const o=n(r(9011)),i=r(180);function s(e){return!!o.default.find((t=>{const r=e.lastIndexOf(t);return-1!==r&&("."===e.charAt(r-1)&&r===e.length-t.length)}))}},1764:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ipldEquals=t.ipldToJson=t.jsonToIpld=void 0;const s=r(6571),a=i(r(412));t.jsonToIpld=e=>{if(Array.isArray(e))return e.map((e=>(0,t.jsonToIpld)(e)));if(e&&"object"===typeof e){if("string"===typeof e.$link&&1===Object.keys(e).length)return s.CID.parse(e.$link);if("string"===typeof e.$bytes&&1===Object.keys(e).length)return a.fromString(e.$bytes,"base64");const r={};for(const n of Object.keys(e))r[n]=(0,t.jsonToIpld)(e[n]);return r}return e};t.ipldToJson=e=>{if(Array.isArray(e))return e.map((e=>(0,t.ipldToJson)(e)));if(e&&"object"===typeof e){if(e instanceof Uint8Array)return{$bytes:a.toString(e,"base64")};if(s.CID.asCID(e))return{$link:e.toString()};const r={};for(const n of Object.keys(e))r[n]=(0,t.ipldToJson)(e[n]);return r}return e};t.ipldEquals=(e,r)=>{if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationRequestJarSchema=void 0;const n=r(1085),o=r(586);t.oauthAuthorizationRequestJarSchema=n.z.object({request:n.z.union([o.signedJwtSchema,o.unsignedJwtSchema])})},1808:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base32:()=>o,base32hex:()=>c,base32hexpad:()=>d,base32hexpadupper:()=>u,base32hexupper:()=>l,base32pad:()=>s,base32padupper:()=>a,base32upper:()=>i,base32z:()=>p});var n=r(5555);const o=(0,n.yE)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),i=(0,n.yE)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s=(0,n.yE)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.yE)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),c=(0,n.yE)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),l=(0,n.yE)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),d=(0,n.yE)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),u=(0,n.yE)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),p=(0,n.yE)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},1820:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserOAuthClient=void 0;const o=r(9835),i=r(8511),s=r(3558),a=r(3592),c=r(7881),l=r(258),d="@@atproto/oauth-client-browser",u=`${d}(popup-channel)`,p=`${d}(popup-state):`,f=new BroadcastChannel(`${d}(synchronization-channel)`);class h extends o.OAuthClient{static async load(e){let{clientId:t,...r}=e;if(t.startsWith("http:")){const e=(0,i.atprotoLoopbackClientMetadata)(t);return new h({clientMetadata:e,...r})}if(t.startsWith("https:")){(0,i.assertOAuthDiscoverableClientId)(t);const e=await o.OAuthClient.fetchMetadata({clientId:t,...r});return new h({clientMetadata:e,...r})}throw new TypeError(`Invalid client id: ${t}`)}constructor(e){let{clientMetadata:t=(0,i.atprotoLoopbackClientMetadata)((0,l.buildLoopbackClientId)(window.location)),responseMode:r="fragment",...o}=e;if(!globalThis.crypto?.subtle)throw new Error("WebCrypto API is required");if(!["query","fragment"].includes(r))throw new TypeError(`Invalid response mode: ${r}`);const c=new s.BrowserOAuthDatabase;super({...o,clientMetadata:t,responseMode:r,keyset:void 0,runtimeImplementation:new a.BrowserRuntimeImplementation,sessionStore:c.getSessionStore(),stateStore:c.getStateStore(),didCache:c.getDidCache(),handleCache:c.getHandleCache(),dpopNonceCache:c.getDpopNonceCache(),authorizationServerMetadataCache:c.getAuthorizationServerMetadataCache(),protectedResourceMetadataCache:c.getProtectedResourceMetadataCache()}),Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:void 0});const u=new AbortController,{signal:p}=u;this[Symbol.dispose]=()=>u.abort(),p.addEventListener("abort",(()=>c[Symbol.asyncDispose]()),{once:!0}),this.addEventListener("deleted",(e=>{let{detail:{sub:t}}=e;localStorage.getItem(`${d}(sub)`)===t&&localStorage.removeItem(`${d}(sub)`)}));for(const n of["deleted","updated"])this.sessionGetter.addEventListener(n,(e=>{let{detail:t}=e;f.postMessage([n,t])}));f.addEventListener("message",(e=>{if(e.source!==window){const[t,r]=e.data;this.dispatchCustomEvent(t,r)}}),{signal:p})}async init(e){await function(e){if(!(0,i.isOAuthClientIdLoopback)(e.client_id))return;if("localhost"!==window.location.hostname)return;const t=new URL(window.location.href);for(const r of e.redirect_uris){const e=new URL(r);if(("127.0.0.1"===e.hostname||"[::1]"===e.hostname)&&(!e.port||e.port===t.port)&&e.protocol===t.protocol&&e.pathname===t.pathname)throw e.port=t.port,window.location.href=e.href,new Error("Redirecting to loopback IP...")}throw new Error(`Please use the loopback IP address instead of ${t}`)}(this.clientMetadata);const t=await this.signInCallback();if(t)return localStorage.setItem(`${d}(sub)`,t.session.sub),t;const r=localStorage.getItem(`${d}(sub)`);if(r)try{return{session:await this.restore(r,e)}}catch(n){throw localStorage.removeItem(`${d}(sub)`),n}}async restore(e,t){const r=await super.restore(e,t);return localStorage.setItem(`${d}(sub)`,r.sub),r}async revoke(e){return localStorage.removeItem(`${d}(sub)`),super.revoke(e)}async signIn(e,t){return"popup"===t?.display?this.signInPopup(e,t):this.signInRedirect(e,t)}async signInRedirect(e,t){const r=await this.authorize(e,t);return window.location.href=r.href,new Promise(((e,t)=>{setTimeout((e=>{this.abortRequest(r).then((()=>t(e)),(r=>t(new AggregateError([e,r]))))}),5e3,new Error("User navigated back"))}))}async signInPopup(e,t){const r="width=600,height=600,menubar=no,toolbar=no";let n=window.open("about:blank","_blank",r);const i=`${Math.random().toString(36).slice(2)}`,s=await this.authorize(e,{...t,state:`${p}${i}`,display:t?.display??"popup"});return t?.signal?.throwIfAborted(),n?n.window.location.href=s.href:n=window.open(s.href,"_blank",r),n?.focus(),new Promise(((e,r)=>{const s=new BroadcastChannel(u),a=()=>{clearTimeout(l),s.removeEventListener("message",d),s.close(),t?.signal?.removeEventListener("abort",c),n?.close()},c=()=>{r(new Error(t?.signal?.aborted?"Aborted":"Timeout")),a()};t?.signal?.addEventListener("abort",c);const l=setTimeout(c,3e5),d=async n=>{let{data:c}=n;if(c.key!==i)return;if(!("result"in c))return;s.postMessage({key:i,ack:!0}),a();const{result:l}=c;if("fulfilled"===l.status){const n=l.value;try{t?.signal?.throwIfAborted(),e(await this.restore(n,!1))}catch(d){r(d),this.revoke(n)}}else{const{message:e,params:t}=l.reason;r(new o.OAuthCallbackError(new URLSearchParams(t),e))}};s.addEventListener("message",d)}))}readCallbackParams(){const e="fragment"===this.responseMode?new URLSearchParams(location.hash.slice(1)):new URLSearchParams(location.search);if(!e.has("state")||!e.has("code")&&!e.has("error"))return null;return this.clientMetadata.redirect_uris.map((e=>new URL(e))).some((e=>location.origin===e.origin&&location.pathname===e.pathname))?e:null}async signInCallback(){const e=this.readCallbackParams();if(!e)return null;"fragment"===this.responseMode?history.replaceState(null,"",location.pathname+location.search):"query"===this.responseMode&&history.replaceState(null,"",location.pathname);const t=e=>{const t=new BroadcastChannel(u);return new Promise((r=>{const n=e=>{clearTimeout(i),t.removeEventListener("message",o),t.close(),r(e)},o=t=>{let{data:r}=t;"ack"in r&&e.key===r.key&&n(!0)};t.addEventListener("message",o),t.postMessage(e);const i=setTimeout(n,500,!1)}))};return this.callback(e).then((async e=>{if(e.state?.startsWith(p)){throw await t({key:e.state.slice(p.length),result:{status:"fulfilled",value:e.session.sub}})||await e.session.signOut(),new c.LoginContinuedInParentWindowError}return e})).catch((async e=>{if(e instanceof o.OAuthCallbackError&&e.state?.startsWith(p))throw await t({key:e.state.slice(p.length),result:{status:"rejected",reason:{message:e.message,params:Array.from(e.params.entries())}}}),new c.LoginContinuedInParentWindowError;throw e})).catch((e=>{throw e instanceof c.LoginContinuedInParentWindowError&&window.close(),e}))}dispose(){this[Symbol.dispose]()}}t.BrowserOAuthClient=h,n=Symbol.dispose},1829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockedByActorError=t.BlockedActorError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("BlockedActor"===e.error)return new o(e);if("BlockedByActor"===e.error)return new i(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlockedActorError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlockedByActorError=i},1871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResolvedHandle=function(e){return null===e||(0,n.isAtprotoDid)(e)};const n=r(2741)},1940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthProtectedResourceMetadataSchema=void 0;const n=r(1085),o=r(8924),i=r(4633);t.oauthProtectedResourceMetadataSchema=n.z.object({resource:i.webUriSchema.refine((e=>!e.includes("?")),{message:"Resource URL must not contain query parameters"}).refine((e=>!e.includes("#")),{message:"Resource URL must not contain a fragment"}),authorization_servers:n.z.array(o.oauthIssuerIdentifierSchema).optional(),jwks_uri:i.webUriSchema.optional(),scopes_supported:n.z.array(n.z.string()).optional(),bearer_methods_supported:n.z.array(n.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:n.z.array(n.z.string()).optional(),resource_documentation:i.webUriSchema.optional(),resource_policy_uri:i.webUriSchema.optional(),resource_tos_uri:i.webUriSchema.optional()})},1942:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"RepoNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=o},1966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLabel=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.defs#label"===e.$type},t.validateLabel=function(e){return o.lexicons.validate("com.atproto.label.defs#label",e)},t.isSelfLabels=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.defs#selfLabels"===e.$type},t.validateSelfLabels=function(e){return o.lexicons.validate("com.atproto.label.defs#selfLabels",e)},t.isSelfLabel=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.defs#selfLabel"===e.$type},t.validateSelfLabel=function(e){return o.lexicons.validate("com.atproto.label.defs#selfLabel",e)},t.isLabelValueDefinition=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.defs#labelValueDefinition"===e.$type},t.validateLabelValueDefinition=function(e){return o.lexicons.validate("com.atproto.label.defs#labelValueDefinition",e)},t.isLabelValueDefinitionStrings=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.label.defs#labelValueDefinitionStrings"===e.$type},t.validateLabelValueDefinitionStrings=function(e){return o.lexicons.validate("com.atproto.label.defs#labelValueDefinitionStrings",e)};const n=r(2127),o=r(554)},1967:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.lexicons=t.default=t.BskyAgent=t.CredentialSession=t.AtpAgent=t.Agent=t.LABELS=t.DEFAULT_LABEL_SETTINGS=t.schemas=t.parseLanguage=t.stringifyLex=t.lexToJson=t.jsonToLex=t.jsonStringToLex=t.BlobRef=t.AtUri=void 0;const i=r(9559),s=r(554);var a=r(6406);Object.defineProperty(t,"AtUri",{enumerable:!0,get:function(){return a.AtUri}});var c=r(9559);Object.defineProperty(t,"BlobRef",{enumerable:!0,get:function(){return c.BlobRef}}),Object.defineProperty(t,"jsonStringToLex",{enumerable:!0,get:function(){return c.jsonStringToLex}}),Object.defineProperty(t,"jsonToLex",{enumerable:!0,get:function(){return c.jsonToLex}}),Object.defineProperty(t,"lexToJson",{enumerable:!0,get:function(){return c.lexToJson}}),Object.defineProperty(t,"stringifyLex",{enumerable:!0,get:function(){return c.stringifyLex}});var l=r(8021);Object.defineProperty(t,"parseLanguage",{enumerable:!0,get:function(){return l.parseLanguage}}),o(r(3910),t),o(r(5812),t),o(r(3167),t),o(r(1247),t);var d=r(554);Object.defineProperty(t,"schemas",{enumerable:!0,get:function(){return d.schemas}}),o(r(3892),t),o(r(5733),t),o(r(5305),t),o(r(180),t),o(r(8268),t),o(r(6249),t),o(r(142),t);var u=r(6818);Object.defineProperty(t,"DEFAULT_LABEL_SETTINGS",{enumerable:!0,get:function(){return u.DEFAULT_LABEL_SETTINGS}}),Object.defineProperty(t,"LABELS",{enumerable:!0,get:function(){return u.LABELS}});var p=r(3942);Object.defineProperty(t,"Agent",{enumerable:!0,get:function(){return p.Agent}});var f=r(2468);Object.defineProperty(t,"AtpAgent",{enumerable:!0,get:function(){return f.AtpAgent}});var h=r(2468);Object.defineProperty(t,"CredentialSession",{enumerable:!0,get:function(){return h.CredentialSession}});var y=r(852);Object.defineProperty(t,"BskyAgent",{enumerable:!0,get:function(){return y.BskyAgent}});var m=r(2468);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return m.AtpAgent}}),t.lexicons=new i.Lexicons(s.lexicons)},2008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"NotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.NotFoundError=o},2011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeTwo=t.pipe=void 0;var n=r(3);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return n.pipe}}),Object.defineProperty(t,"pipeTwo",{enumerable:!0,get:function(){return n.pipeTwo}})},2034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this._index=0,this._str=e,this._nextBreak=t}[Symbol.iterator](){return this}next(){let e;if((e=this._nextBreak(this._str,this._index)){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthTokenResponseSchema=void 0;const n=r(1085),o=r(586),i=r(6383),s=r(4225);t.oauthTokenResponseSchema=n.z.object({access_token:n.z.string(),token_type:s.oauthTokenTypeSchema,scope:n.z.string().optional(),refresh_token:n.z.string().optional(),expires_in:n.z.number().optional(),id_token:o.signedJwtSchema.optional(),authorization_details:i.oauthAuthorizationDetailsSchema.optional()}).passthrough()},2092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSkeletonSearchPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.unspecced.defs#skeletonSearchPost"===e.$type},t.validateSkeletonSearchPost=function(e){return o.lexicons.validate("app.bsky.unspecced.defs#skeletonSearchPost",e)},t.isSkeletonSearchActor=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.unspecced.defs#skeletonSearchActor"===e.$type},t.validateSkeletonSearchActor=function(e){return o.lexicons.validate("app.bsky.unspecced.defs#skeletonSearchActor",e)},t.isSkeletonSearchStarterPack=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.unspecced.defs#skeletonSearchStarterPack"===e.$type},t.validateSkeletonSearchStarterPack=function(e){return o.lexicons.validate("app.bsky.unspecced.defs#skeletonSearchStarterPack",e)},t.isTrendingTopic=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.unspecced.defs#trendingTopic"===e.$type},t.validateTrendingTopic=function(e){return o.lexicons.validate("app.bsky.unspecced.defs#trendingTopic",e)};const n=r(2127),o=r(554)},2098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthRedirectUriSchema=t.oauthPrivateUseRedirectURISchema=t.oauthHttpsRedirectURISchema=t.oauthLoopbackRedirectURISchema=void 0;const n=r(1085),o=r(4633);t.oauthLoopbackRedirectURISchema=o.loopbackUriSchema.superRefine(((e,t)=>!e.startsWith("http://localhost")||(t.addIssue({code:n.ZodIssueCode.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1))),t.oauthHttpsRedirectURISchema=o.httpsUriSchema,t.oauthPrivateUseRedirectURISchema=o.privateUseUriSchema,t.oauthRedirectUriSchema=n.z.union([t.oauthLoopbackRedirectURISchema,t.oauthHttpsRedirectURISchema,t.oauthPrivateUseRedirectURISchema],{message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'})},2099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isLinks=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.server.describeServer#links"===e.$type},t.validateLinks=function(e){return o.lexicons.validate("com.atproto.server.describeServer#links",e)},t.isContact=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.server.describeServer#contact"===e.$type},t.validateContact=function(e){return o.lexicons.validate("com.atproto.server.describeServer#contact",e)};const n=r(2127),o=r(554)},2127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObj=function(e){return"object"===typeof e&&null!==e},t.hasProp=function(e,t){return t in e}},2151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAccessTokenSchema=void 0;const n=r(1085);t.oauthAccessTokenSchema=n.z.string().min(1)},2152:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2230:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncompatibleDidDocError=t.UnresolvableDidError=t.UnsupportedDomainError=t.HandleNotAvailableError=t.InvalidInviteCodeError=t.InvalidPasswordError=t.InvalidHandleError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("InvalidHandle"===e.error)return new o(e);if("InvalidPassword"===e.error)return new i(e);if("InvalidInviteCode"===e.error)return new s(e);if("HandleNotAvailable"===e.error)return new a(e);if("UnsupportedDomain"===e.error)return new c(e);if("UnresolvableDid"===e.error)return new l(e);if("IncompatibleDidDoc"===e.error)return new d(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidHandleError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidPasswordError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidInviteCodeError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.HandleNotAvailableError=a;class c extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.UnsupportedDomainError=c;class l extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.UnresolvableDidError=l;class d extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.IncompatibleDidDocError=d},2242:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(1871),t),o(r(9789),t),o(r(7303),t),o(r(2581),t),o(r(9896),t)},2243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2254:function(e,t,r){"use strict";var n=this&&this.__addDisposableResource||function(e,t,r){if(null!==t&&void 0!==t){if("object"!==typeof t&&"function"!==typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!==typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t},o=this&&this.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}var n,o=0;return function e(){for(;n=t.stack.pop();)try{if(!n.async&&1===o)return o=0,t.stack.push(n),Promise.resolve().then(e);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(e,(function(t){return r(t),e()}))}else o|=1}catch(s){r(s)}if(1===o)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}}("function"===typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n});Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthServerAgent=void 0;const i=r(8511),s=r(6211),a=r(2480),c=r(8590),l=r(4619),d=r(7259),u=r(8261),p=r(6387);t.OAuthServerAgent=class{constructor(e,t,r,n,o,i,a,c){Object.defineProperty(this,"dpopKey",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"serverMetadata",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"dpopNonces",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"oauthResolver",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"dpopFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dpopFetch=(0,d.dpopFetchWrapper)({fetch:(0,s.bindFetch)(c),iss:r.client_id,key:e,supportedAlgs:t.dpop_signing_alg_values_supported,sha256:async e=>i.sha256(e),nonces:n,isAuthServer:!0})}get issuer(){return this.serverMetadata.issuer}async revoke(e){try{await this.request("revocation",{token:e})}catch{}}async exchangeCode(e,t){const r=Date.now(),n=await this.request("token",{grant_type:"authorization_code",redirect_uri:this.clientMetadata.redirect_uris[0],code:e,code_verifier:t});try{return{aud:await this.verifyIssuer(n.sub),sub:n.sub,iss:this.issuer,scope:n.scope,refresh_token:n.refresh_token,access_token:n.access_token,token_type:n.token_type,expires_at:"number"===typeof n.expires_in?new Date(r+1e3*n.expires_in).toISOString():void 0}}catch(o){throw await this.revoke(n.access_token),o}}async refresh(e){if(!e.refresh_token)throw new l.TokenRefreshError(e.sub,"No refresh token available");const t=await this.verifyIssuer(e.sub),r=Date.now(),n=await this.request("token",{grant_type:"refresh_token",refresh_token:e.refresh_token});return{aud:t,sub:e.sub,iss:this.issuer,scope:n.scope,refresh_token:n.refresh_token,access_token:n.access_token,token_type:n.token_type,expires_at:"number"===typeof n.expires_in?new Date(r+1e3*n.expires_in).toISOString():void 0}}async verifyIssuer(e){const t={stack:[],error:void 0,hasError:!1};try{const r=n(t,(0,p.timeoutSignal)(1e4),!1),o=await this.oauthResolver.resolveFromIdentity(e,{noCache:!0,allowStale:!1,signal:r});if(this.issuer!==o.metadata.issuer)throw new TypeError("Issuer mismatch");return o.identity.pds.href}catch(r){t.error=r,t.hasError=!0}finally{o(t)}}async request(e,t){const r=this.serverMetadata[`${e}_endpoint`];if(!r)throw new Error(`No ${e} endpoint available`);const n=await this.buildClientAuth(e),{response:o,json:c}=await this.dpopFetch(r,{method:"POST",headers:{...n.headers,"Content-Type":"application/json"},body:JSON.stringify({...t,...n.payload})}).then((0,s.fetchJsonProcessor)());if(!o.ok)throw new u.OAuthResponseError(o,c);switch(e){case"token":return a.atprotoTokenResponseSchema.parse(c);case"pushed_authorization_request":return i.oauthParResponseSchema.parse(c);default:return c}}async buildClientAuth(e){const t=this.serverMetadata.token_endpoint_auth_methods_supported,r=this.clientMetadata.token_endpoint_auth_method;if("private_key_jwt"===r||this.keyset&&!r&&t?.includes("private_key_jwt")){if(!this.keyset)throw new Error("No keyset available");try{const e=this.serverMetadata.token_endpoint_auth_signing_alg_values_supported??c.FALLBACK_ALG,t=this.clientMetadata.jwks?.keys.map((e=>{let{kid:t}=e;return t})).filter((e=>"string"===typeof e));return{payload:{client_id:this.clientMetadata.client_id,client_assertion_type:i.CLIENT_ASSERTION_TYPE_JWT_BEARER,client_assertion:await this.keyset.createJwt({alg:e,kid:t},{iss:this.clientMetadata.client_id,sub:this.clientMetadata.client_id,aud:this.serverMetadata.issuer,jti:await this.runtime.generateNonce(),iat:Math.floor(Date.now()/1e3)})}}}catch(n){if("private_key_jwt"===r)throw n}}if("none"===r||!r&&(t?.includes("none")??1))return{payload:{client_id:this.clientMetadata.client_id}};throw new Error(`Unsupported ${e} authentication method`)}}},2283:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractUrl=t.MaxBytesTransformStream=t.ifString=void 0,t.isIp=function(e){return!!e.match(/^\d+\.\d+\.\d+\.\d+$/)||!(!e.startsWith("[")||!e.endsWith("]"))},t.padLines=function(e,t){return e?t+e.replace(n,`$&${t}`):e},t.cancelBody=o,t.logCancellationError=i,t.stringifyMessage=async function(e){try{const t=function(e){return Array.from(e).map((e=>{let[t,r]=e;return`${t}: ${r}`})).join("\n")}(e.headers),r=await async function(e){try{const t=await e.blob();if(t.type?.startsWith("text/")){const e=await t.text();return JSON.stringify(e)}if(/application\/(?:\w+\+)?json/.test(t.type)){const e=await t.text();return e.includes("\n")?JSON.stringify(JSON.parse(e)):e}return`[Body size: ${t.size}, type: ${JSON.stringify(t.type)} ]`}catch{return"[Body could not be read]"}}(e);return t&&r?`${t}\n${r}`:t||r}finally{o(e,"log")}};t.ifString=e=>"string"===typeof e?e:void 0;class r extends TransformStream{constructor(e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");let t=0;super({transform:(r,n)=>{(t+=r.length)<=e?n.enqueue(r):n.error(new Error("Response too large"))}})}}t.MaxBytesTransformStream=r;const n=/\r?\n/g;async function o(e,t){!e.body||e.bodyUsed||e.body.locked||"function"!==typeof e.body.cancel||("function"===typeof t?e.body.cancel().catch(t):"log"===t?e.body.cancel().catch(i):await e.body.cancel())}function i(e){console.warn("Failed to cancel response body",e)}t.extractUrl=e=>"string"===typeof e?new URL(e):e instanceof URL?e:new URL(e.url)},2289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureValidAtUriRegex=t.ensureValidAtUri=void 0;const n=r(371),o=r(3466),i=r(654);t.ensureValidAtUri=e=>{const t=e.split("#");if(t.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const r=t[1]||null;if(e=t[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(e))throw new Error("Disallowed characters in ATURI (ASCII)");const s=e.split("/");if(s.length>=3&&("at:"!==s[0]||0!==s[1].length))throw new Error('ATURI must start with "at://"');if(s.length<3)throw new Error("ATURI requires at least method and authority sections");try{s[2].startsWith("did:")?(0,n.ensureValidDid)(s[2]):(0,o.ensureValidHandle)(s[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(s.length>=4){if(0===s[3].length)throw new Error("ATURI can not have a slash after authority without a path segment");try{(0,i.ensureValidNsid)(s[3])}catch{throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}}if(s.length>=5&&0===s[4].length)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(s.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(t.length>=2&&null==r)throw new Error("ATURI fragment must be non-empty and start with slash");if(null!=r){if(0===r.length||"/"!==r[0])throw new Error("ATURI fragment must be non-empty and start with slash");if(!/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/.test(r))throw new Error("Disallowed characters in ATURI fragment (ASCII)")}if(e.length>8192)throw new Error("ATURI is far too long")};t.ensureValidAtUriRegex=e=>{const t=e.match(/^at:\/\/(?[a-zA-Z0-9._:%-]+)(\/(?[a-zA-Z0-9-.]+)(\/(?[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/);if(!t||!t.groups)throw new Error("ATURI didn't validate via regex");const r=t.groups;try{(0,o.ensureValidHandleRegex)(r.authority)}catch{try{(0,n.ensureValidDidRegex)(r.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(r.collection)try{(0,i.ensureValidNsidRegex)(r.collection)}catch{throw new Error("ATURI collection path segment must be a valid NSID")}if(e.length>8192)throw new Error("ATURI is far too long")}},2297:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityResolver=void 0;const n=r(7792),o=r(2242);function i(e){return"string"===typeof e.serviceEndpoint&&"AtprotoPersonalDataServer"===e.type&&(e.id.startsWith("#")?"#atproto_pds"===e.id:e.id===`${this.id}#atproto_pds`)}t.IdentityResolver=class{constructor(e,t){Object.defineProperty(this,"didResolver",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"handleResolver",{enumerable:!0,configurable:!0,writable:!0,value:t})}async resolve(e,t){const r=(0,o.isResolvedHandle)(e)?await this.getDocumentFromDid(e,t):await this.getDocumentFromHandle(e,t),n=r.service?.find(i,r);if(!n)throw new TypeError(`No valid "AtprotoPersonalDataServer" service found in "${r.id}" DID document`);return{did:r.id,pds:new URL(n.serviceEndpoint)}}async getDocumentFromDid(e,t){return this.didResolver.resolve(e,t)}async getDocumentFromHandle(e,t){const r=(0,n.normalizeAndEnsureValidHandle)(e),o=await this.handleResolver.resolve(r,t);if(!o)throw new TypeError(`Handle "${r}" does not resolve to a DID`);t?.signal?.throwIfAborted();const i=await this.didResolver.resolve(o,t);if(!i.alsoKnownAs?.includes(`at://${r}`))throw new TypeError(`Did document for "${o}" does not include the handle "${r}"`);return i}}},2329:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthResponseTypeSchema=void 0;const n=r(1085);t.oauthResponseTypeSchema=n.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"])},2417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisallowedDomainError=t.UnsupportedDomainError=t.ReservedHandleError=t.InvalidHandleError=t.isValidTld=t.isValidHandle=t.normalizeAndEnsureValidHandle=t.normalizeHandle=t.ensureValidHandleRegex=t.ensureValidHandle=t.DISALLOWED_TLDS=t.INVALID_HANDLE=void 0,t.INVALID_HANDLE="handle.invalid",t.DISALLOWED_TLDS=[".local",".arpa",".invalid",".localhost",".internal",".example",".alt",".onion"];t.ensureValidHandle=e=>{if(!/^[a-zA-Z0-9.-]*$/.test(e))throw new r("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(e.length>253)throw new r("Handle is too long (253 chars max)");const t=e.split(".");if(t.length<2)throw new r("Handle domain needs at least two parts");for(let n=0;n63)throw new r("Handle part too long (max 63 chars)");if(e.endsWith("-")||e.startsWith("-"))throw new r("Handle parts can not start or end with hyphens");if(n+1===t.length&&!/^[a-zA-Z]/.test(e))throw new r("Handle final component (TLD) must start with ASCII letter")}};t.ensureValidHandleRegex=e=>{if(!/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(e))throw new r("Handle didn't validate via regex");if(e.length>253)throw new r("Handle is too long (253 chars max)")};t.normalizeHandle=e=>e.toLowerCase();t.normalizeAndEnsureValidHandle=e=>{const r=(0,t.normalizeHandle)(e);return(0,t.ensureValidHandle)(r),r};t.isValidHandle=e=>{try{(0,t.ensureValidHandle)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};t.isValidTld=e=>!t.DISALLOWED_TLDS.some((t=>e.endsWith(t)));class r extends Error{}t.InvalidHandleError=r;class n extends Error{}t.ReservedHandleError=n;class o extends Error{}t.UnsupportedDomainError=o;class i extends Error{}t.DisallowedDomainError=i},2434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationRequestParSchema=void 0;const n=r(1085),o=r(1788),i=r(4561);t.oauthAuthorizationRequestParSchema=n.z.union([i.oauthAuthorizationRequestParametersSchema,o.oauthAuthorizationRequestJarSchema])},2440:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNsidError=t.ensureValidNsidRegex=t.ensureValidNsid=t.NSID=void 0;class r{static parse(e){return new r(e)}static create(e,t){const n=[...e.split(".").reverse(),t].join(".");return new r(n)}static isValid(e){try{return r.parse(e),!0}catch(t){return!1}}constructor(e){Object.defineProperty(this,"segments",{enumerable:!0,configurable:!0,writable:!0,value:[]}),(0,t.ensureValidNsid)(e),this.segments=e.split(".")}get authority(){return this.segments.slice(0,this.segments.length-1).reverse().join(".")}get name(){return this.segments.at(this.segments.length-1)}toString(){return this.segments.join(".")}}t.NSID=r;t.ensureValidNsid=e=>{const t=e;if(!/^[a-zA-Z0-9.-]*$/.test(t))throw new n("Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)");if(t.length>317)throw new n("NSID is too long (317 chars max)");const r=t.split(".");if(r.length<3)throw new n("NSID needs at least three parts");for(let o=0;o63)throw new n("NSID part too long (max 63 chars)");if(e.endsWith("-")||e.startsWith("-"))throw new n("NSID parts can not start or end with hyphen");if(/^[0-9]/.test(e)&&0===o)throw new n("NSID first part may not start with a digit");if(!/^[a-zA-Z][a-zA-Z0-9]*$/.test(e)&&o+1===r.length)throw new n("NSID name part must be only letters and digits (and no leading digit)")}};t.ensureValidNsidRegex=e=>{if(!/^[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(e))throw new n("NSID didn't validate via regex");if(e.length>317)throw new n("NSID is too long (317 chars max)")};class n extends Error{}t.InvalidNsidError=n},2458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CannotDeleteSelfError=t.MemberNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("MemberNotFound"===e.error)return new o(e);if("CannotDeleteSelf"===e.error)return new i(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.MemberNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.CannotDeleteSelfError=i},2468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CredentialSession=t.AtpAgent=void 0;const n=r(8021),o=r(1510),i=r(3942),s=r(1247),a=r(554),c=globalThis.ReadableStream;class l extends i.Agent{constructor(e){const t=e instanceof d?e:new d(new URL(e.service),e.fetch,e.persistSession);if(super(t),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sessionManager=t,!(e instanceof d)&&e.headers)for(const[r,n]of e.headers)this.setHeader(r,n)}clone(){return this.copyInto(new l(this.sessionManager))}get session(){return this.sessionManager.session}get hasSession(){return this.sessionManager.hasSession}get did(){return this.sessionManager.did}get serviceUrl(){return this.sessionManager.serviceUrl}get pdsUrl(){return this.sessionManager.pdsUrl}get dispatchUrl(){return this.sessionManager.dispatchUrl}get service(){return this.serviceUrl}get persistSession(){throw new Error('Cannot set persistSession directly. "persistSession" is defined through the constructor and will be invoked automatically when session data changes.')}set persistSession(e){throw new Error('Cannot set persistSession directly. "persistSession" must be defined in the constructor and can no longer be changed.')}getServiceUrl(){return this.serviceUrl}async resumeSession(e){return this.sessionManager.resumeSession(e)}async createAccount(e,t){return this.sessionManager.createAccount(e,t)}async login(e){return this.sessionManager.login(e)}async logout(){return this.sessionManager.logout()}}t.AtpAgent=l;class d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis.fetch,r=arguments.length>2?arguments[2]:void 0;Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"persistSession",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"pdsUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"session",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"refreshSessionPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:new s.ComAtprotoServerNS(new o.XrpcClient(((e,t)=>(0,this.fetch)(new URL(e,this.serviceUrl),t)),a.schemas))})}get did(){return this.session?.did}get dispatchUrl(){return this.pdsUrl||this.serviceUrl}get hasSession(){return!!this.session}setFetch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis.fetch;this.fetch=e}async fetchHandler(e,t){await this.refreshSessionPromise;const r=new URL(e,this.dispatchUrl),n=new Request(r,t),i=this.session?.accessJwt;if(!i||n.headers.has("authorization"))return(0,this.fetch)(n);n.headers.set("authorization",`Bearer ${i}`);const s=await(0,this.fetch)(n);if(!this.session?.refreshJwt)return s;const a=await async function(e,t,r){if(!t.includes(e.status))return!1;try{const t=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if("application/json"!==function(e){let{headers:t}=e;return t.get("Content-Type")?.split(";")[0]?.trim()}(e))throw new Error("Not JSON");if(function(e){let{headers:t}=e;return t.get("Content-Length")?Number(t.get("Content-Length")):NaN}(e)>t)throw new Error("Response too large");return e.clone().json()}(e,10240);return n=t,o.errorResponseBody.safeParse(n).success&&r.includes(t.error)}catch(i){return!1}var n}(s,[400],["ExpiredToken"]);if(!a)return s;try{await this.refreshSession()}catch{return s}if(t?.signal?.aborted)return s;if(c&&t?.body instanceof c)return s;const l=this.session?.accessJwt;if(!l||l===i)return s;await(s.body?.cancel());const d=new URL(e,this.dispatchUrl),u=new Request(d,t);return u.headers.set("authorization",`Bearer ${l}`),await(0,this.fetch)(u)}async createAccount(e,t){try{const r=await this.server.createAccount(e,t);return this.session={accessJwt:r.data.accessJwt,refreshJwt:r.data.refreshJwt,handle:r.data.handle,did:r.data.did,email:e.email,emailConfirmed:!1,emailAuthFactor:!1,active:!0},this.persistSession?.("create",this.session),this._updateApiEndpoint(r.data.didDoc),r}catch(r){throw this.session=void 0,this.persistSession?.("create-failed",void 0),r}}async login(e){try{const t=await this.server.createSession({identifier:e.identifier,password:e.password,authFactorToken:e.authFactorToken,allowTakendown:e.allowTakendown});return this.session={accessJwt:t.data.accessJwt,refreshJwt:t.data.refreshJwt,handle:t.data.handle,did:t.data.did,email:t.data.email,emailConfirmed:t.data.emailConfirmed,emailAuthFactor:t.data.emailAuthFactor,active:t.data.active??!0,status:t.data.status},this._updateApiEndpoint(t.data.didDoc),this.persistSession?.("create",this.session),t}catch(t){throw this.session=void 0,this.persistSession?.("create-failed",void 0),t}}async logout(){if(this.session)try{await this.server.deleteSession(void 0,{headers:{authorization:`Bearer ${this.session.accessJwt}`}})}catch{}finally{this.session=void 0,this.persistSession?.("expired",void 0)}}async resumeSession(e){this.session=e;try{const t=await this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}}).catch((async t=>{if(t instanceof o.XRPCError&&["ExpiredToken","InvalidToken"].includes(t.error)&&e.refreshJwt)try{const t=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${e.refreshJwt}`}});return e.accessJwt=t.data.accessJwt,e.refreshJwt=t.data.refreshJwt,this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}})}catch{}throw t}));if(t.data.did!==e.did)throw new o.XRPCError(o.ResponseType.InvalidRequest,"Invalid session","InvalidDID");return e.email=t.data.email,e.handle=t.data.handle,e.emailConfirmed=t.data.emailConfirmed,e.emailAuthFactor=t.data.emailAuthFactor,e.active=t.data.active??!0,e.status=t.data.status,this.session===e&&(this._updateApiEndpoint(t.data.didDoc),this.persistSession?.("update",e)),t}catch(t){throw this.session===e&&(this.session=void 0,this.persistSession?.(t instanceof o.XRPCError&&["ExpiredToken","InvalidToken"].includes(t.error)?"expired":"network-error",void 0)),t}}async refreshSession(){return this.refreshSessionPromise||(this.refreshSessionPromise=this._refreshSessionInner().finally((()=>{this.refreshSessionPromise=void 0})))}async _refreshSessionInner(){if(this.session?.refreshJwt)try{const e=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}});this.session={...this.session,accessJwt:e.data.accessJwt,refreshJwt:e.data.refreshJwt,handle:e.data.handle,did:e.data.did},this._updateApiEndpoint(e.data.didDoc),this.persistSession?.("update",this.session)}catch(e){e instanceof o.XRPCError&&e.error&&["ExpiredToken","InvalidToken"].includes(e.error)&&(this.session=void 0,this.persistSession?.("expired",void 0))}}_updateApiEndpoint(e){if((0,n.isValidDidDoc)(e)){const t=(0,n.getPdsEndpoint)(e);this.pdsUrl=t?new URL(t):void 0}else this.pdsUrl=void 0}}t.CredentialSession=d},2480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.atprotoTokenResponseSchema=t.atprotoScopeSchema=t.isAtprotoScope=void 0;const n=r(1085),o=r(2741),i=r(8511),s=r(6387);t.isAtprotoScope=e=>(0,s.includesSpaceSeparatedValue)(e,"atproto"),t.atprotoScopeSchema=n.z.string().refine(t.isAtprotoScope,'The "atproto" scope is required'),t.atprotoTokenResponseSchema=i.oauthTokenResponseSchema.extend({token_type:n.z.literal("DPoP"),sub:o.atprotoDidSchema,scope:t.atprotoScopeSchema,id_token:n.z.never().optional()})},2515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTakedownError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"AccountTakedown"===e.error)return new s(e);return e},t.isAppPassword=function(e){return(0,o.isObj)(e)&&(0,o.hasProp)(e,"$type")&&"com.atproto.server.createAppPassword#appPassword"===e.$type},t.validateAppPassword=function(e){return i.lexicons.validate("com.atproto.server.createAppPassword#appPassword",e)};const n=r(1510),o=r(2127),i=r(554);class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AccountTakedownError=s},2523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.datetime=function(e,t){try{if(!(0,n.isValidISODateString)(t))throw new Error}catch{return{success:!1,error:new a.ValidationError(`${e} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)}}return{success:!0,value:t}},t.uri=function(e,t){if(null===t.match(/^\w+:(?:\/\/)?[^\s/][^\s]*$/))return{success:!1,error:new a.ValidationError(`${e} must be a uri`)};return{success:!0,value:t}},t.atUri=function(e,t){try{(0,s.ensureValidAtUri)(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a valid at-uri`)}}return{success:!0,value:t}},t.did=c,t.handle=l,t.atIdentifier=function(e,t){if(t.startsWith("did:")){const r=c(e,t);if(r.success)return r}else{const r=l(e,t);if(r.success)return r}return{success:!1,error:new a.ValidationError(`${e} must be a valid did or a handle`)}},t.nsid=function(e,t){try{(0,s.ensureValidNsid)(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a valid nsid`)}}return{success:!0,value:t}},t.cid=function(e,t){try{o.CID.parse(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a cid string`)}}return{success:!0,value:t}},t.language=function(e,t){if((0,i.validateLanguage)(t))return{success:!0,value:t};return{success:!1,error:new a.ValidationError(`${e} must be a well-formed BCP 47 language tag`)}},t.tid=function(e,t){if((0,s.isValidTid)(t))return{success:!0,value:t};return{success:!1,error:new a.ValidationError(`${e} must be a valid TID`)}},t.recordKey=function(e,t){try{(0,s.ensureValidRecordKey)(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a valid Record Key`)}}return{success:!0,value:t}};const n=r(7671),o=r(6571),i=r(8021),s=r(7480),a=r(6078);function c(e,t){try{(0,s.ensureValidDid)(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a valid did`)}}return{success:!0,value:t}}function l(e,t){try{(0,s.ensureValidHandle)(t)}catch{return{success:!1,error:new a.ValidationError(`${e} must be a valid handle`)}}return{success:!0,value:t}}},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2559:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>"number"!==typeof t[t[e]])),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"===typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"===typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"===typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((e=>"string"===typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"===typeof t?t.toString():t}(r||(t.util=r={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(n||(t.objectUtil=n={})),t.ZodParsedType=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);t.getParsedType=e=>{switch(typeof e){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(e)?t.ZodParsedType.array:null===e?t.ZodParsedType.null:e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?t.ZodParsedType.promise:"undefined"!==typeof Map&&e instanceof Map?t.ZodParsedType.map:"undefined"!==typeof Set&&e instanceof Set?t.ZodParsedType.set:"undefined"!==typeof Date&&e instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}}},2581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AtprotoHandleResolver=void 0;const n=r(5229),o=r(4312),i=()=>{};t.AtprotoHandleResolver=class{constructor(e){Object.defineProperty(this,"httpResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dnsResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dnsResolverFallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.httpResolver=new o.WellKnownHandleResolver(e),this.dnsResolver=new n.DnsHandleResolver(e.resolveTxt),this.dnsResolverFallback=e.resolveTxtFallback?new n.DnsHandleResolver(e.resolveTxtFallback):void 0}async resolve(e,t){t?.signal?.throwIfAborted();const r=new AbortController,{signal:n}=r;t?.signal?.addEventListener("abort",(()=>r.abort()),{signal:n});const o={...t,signal:n};try{const t=this.dnsResolver.resolve(e,o),r=this.httpResolver.resolve(e,o);r.catch(i);const s=await t;if(s)return s;n.throwIfAborted();const a=await r;return a||(n.throwIfAborted(),this.dnsResolverFallback?.resolve(e,o)??null)}finally{r.abort()}}}},2583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthProtectedResourceMetadataResolver=void 0;const n=r(8511),o=r(6211),i=r(8917),s=r(6387);class a extends i.CachedGetter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:globalThis.fetch,r=arguments.length>2?arguments[2]:void 0;super((async(e,t)=>this.fetchMetadata(e,t)),e),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttpResource",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,o.bindFetch)(t),this.allowHttpResource=!0===r?.allowHttpResource}async get(e,t){const{protocol:r,origin:n}=new URL(e);if("https:"!==r&&"http:"!==r)throw new TypeError(`Invalid protected resource metadata URL protocol: ${r}`);if("http:"===r&&!this.allowHttpResource)throw new TypeError(`Unsecure resource metadata URL (${r}) only allowed in development and test environments`);return super.get(n,t)}async fetchMetadata(e,t){const r=new URL("/.well-known/oauth-protected-resource",e),i=new Request(r,{signal:t?.signal,headers:{accept:"application/json"},cache:t?.noCache?"no-cache":void 0,redirect:"manual"}),a=await this.fetch(i);if(200!==a.status)throw await(0,o.cancelBody)(a,"log"),await o.FetchResponseError.from(a,`Unexpected status code ${a.status} for "${r}"`,void 0,{cause:i});if("application/json"!==(0,s.contentMime)(a.headers))throw await(0,o.cancelBody)(a,"log"),await o.FetchResponseError.from(a,`Unexpected content type for "${r}"`,void 0,{cause:i});const c=n.oauthProtectedResourceMetadataSchema.parse(await a.json());if(c.resource!==e)throw new TypeError(`Invalid issuer ${c.resource}`);return c}}t.OAuthProtectedResourceMetadataResolver=a},2596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOption=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.setting.defs#option"===e.$type},t.validateOption=function(e){return o.lexicons.validate("tools.ozone.setting.defs#option",e)};const n=r(2127),o=r(554)},2603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAspectRatio=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.defs#aspectRatio"===e.$type},t.validateAspectRatio=function(e){return o.lexicons.validate("app.bsky.embed.defs#aspectRatio",e)};const n=r(2127),o=r(554)},2629:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2646:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRevokedError=void 0;class r extends Error{constructor(e){super(arguments.length>1&&void 0!==arguments[1]?arguments[1]:`The session for "${e}" was successfully revoked`,arguments.length>2?arguments[2]:void 0),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}t.TokenRevokedError=r},2681:function(e,t,r){"use strict";var n,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DB=void 0;const s=r(4580);class a{static async open(e,t,r){const n=await new Promise(((r,n)=>{const o=indexedDB.open(e,t.length);o.onerror=()=>n(o.error),o.onsuccess=()=>r(o.result),o.onupgradeneeded=e=>{let{oldVersion:r,newVersion:i}=e;const s=o.result;try{for(let e=r;e<(i??t.length);++e){const r=t[e];if(!r)throw new Error(`Missing migration for version ${e}`);r(s)}}catch(a){s.close(),n(a)}}}));return new a(n,r)}constructor(e,t){Object.defineProperty(this,"txOptions",{enumerable:!0,configurable:!0,writable:!0,value:t}),n.set(this,void 0),o(this,n,e,"f");const r=()=>{o(this,n,null,"f"),e.removeEventListener("versionchange",r),e.removeEventListener("close",r),e.close()};e.addEventListener("versionchange",r),e.addEventListener("close",r)}get db(){if(!i(this,n,"f"))throw new Error("Database closed");return i(this,n,"f")}get name(){return this.db.name}get objectStoreNames(){return this.db.objectStoreNames}get version(){return this.db.version}async transaction(e,t,r){return new Promise((async(n,o)=>{try{const a=this.db.transaction(e,t,this.txOptions);let c={done:!1};a.oncomplete=()=>{c.done?n(c.value):o(new Error("Transaction completed without result"))},a.onerror=()=>o(a.error),a.onabort=()=>o(a.error||new Error("Transaction aborted"));try{const e=await r(new s.DBTransaction(a));c={done:!0,value:e},a.commit()}catch(i){throw a.abort(),i}}catch(i){o(i)}}))}close(){const{db:e}=this;o(this,n,null,"f"),e.close()}[(n=new WeakMap,Symbol.dispose)](){if(i(this,n,"f"))return this.close()}}t.DB=a},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.graph.listblock#main"===e.$type||"app.bsky.graph.listblock"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.graph.listblock#main",e)};const n=r(2127),o=r(554)},2730:(e,t,r)=>{"use strict";var n=r(5043),o=r(8853);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;rt}return!1}(t,r,o,n)&&(r=null),n||null===o?function(e){return!!u.call(h,e)||!u.call(f,e)&&(p.test(e)?h[e]=!0:(f[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=null===r?3!==o.type&&"":r:(t=o.attributeName,n=o.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(o=o.type)||4===o&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);m[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),R=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),B=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var j=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var D=Symbol.iterator;function U(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=D&&e[D]||e["@@iterator"])?e:null}var I,O=Object.assign;function K(e){if(void 0===I)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var M=!1;function V(e,t){if(!e||M)return"";M=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var n=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){n=l}e.call(t.prototype)}else{try{throw Error()}catch(l){n=l}e()}}catch(l){if(l&&n&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=n.stack.split("\n"),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(1!==s||1!==a)do{if(s--,0>--a||o[s]!==i[a]){var c="\n"+o[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=s&&0<=a);break}}}finally{M=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?K(e):""}function N(e){switch(e.tag){case 5:return K(e.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 1:return e=V(e.type,!0);default:return""}}function z(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case A:return"Fragment";case R:return"Portal";case _:return"Profiler";case S:return"StrictMode";case L:return"Suspense";case x:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:z(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return z(e(t))}catch(r){}}return null}function $(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return z(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function F(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function H(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=q(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function W(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var r=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function Z(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=F(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function Q(e,t){J(e,t);var r=F(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,F(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Y(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&W(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction((function(){return de(e,t)}))}:de);function pe(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function ye(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function me(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),o=ye(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}Object.keys(fe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ge=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ee=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Re=null,Ae=null,Se=null;function _e(e){if(e=Eo(e)){if("function"!==typeof Re)throw Error(i(280));var t=e.stateNode;t&&(t=Ro(t),Re(e.stateNode,e.type,t))}}function ke(e){Ae?Se?Se.push(e):Se=[e]:Ae=e}function Te(){if(Ae){var e=Ae,t=Se;if(Se=Ae=null,_e(e),t)for(e=0;e>>=0,0===e?32:31-(at(e)/ct|0)|0},at=Math.log,ct=Math.LN2;var lt=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=268435455&r;if(0!==s){var a=s&~o;0!==a?n=ut(a):0!==(i&=s)&&(n=ut(i))}else 0!==(s=r&~o)?n=ut(s):0!==i&&(n=ut(i));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&o)&&((o=n&-n)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&n)&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function gt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=r}function bt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-st(r),o=1<=Dr),Or=String.fromCharCode(32),Kr=!1;function Mr(e,t){switch(e){case"keyup":return-1!==Br.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Nr=!1;var zr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zr[e.type]:"textarea"===t}function Fr(e,t,r,n){ke(n),0<(t=Gn(t,"onChange")).length&&(r=new lr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var qr=null,Gr=null;function Hr(e){Kn(e,0)}function Wr(e){if(H(wo(e)))return e}function Xr(e,t){if("change"===e)return t}var Zr=!1;if(d){var Jr;if(d){var Qr="oninput"in document;if(!Qr){var Yr=document.createElement("div");Yr.setAttribute("oninput","return;"),Qr="function"===typeof Yr.oninput}Jr=Qr}else Jr=!1;Zr=Jr&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ln(n)}}function un(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?un(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pn(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(n){r=!1}if(!r)break;t=W((e=t.contentWindow).document)}return t}function fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hn(e){var t=pn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&un(r.ownerDocument.documentElement,r)){if(null!==n&&fn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=void 0===n.end?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=dn(r,i);var s=dn(r,n);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof r.focus&&r.focus(),r=0;r=document.documentMode,mn=null,gn=null,bn=null,vn=!1;function En(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;vn||null==mn||mn!==W(n)||("selectionStart"in(n=mn)&&fn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},bn&&cn(bn,n)||(bn=n,0<(n=Gn(gn,"onSelect")).length&&(t=new lr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=mn)))}function wn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Rn={animationend:wn("Animation","AnimationEnd"),animationiteration:wn("Animation","AnimationIteration"),animationstart:wn("Animation","AnimationStart"),transitionend:wn("Transition","TransitionEnd")},An={},Sn={};function _n(e){if(An[e])return An[e];if(!Rn[e])return e;var t,r=Rn[e];for(t in r)if(r.hasOwnProperty(t)&&t in Sn)return An[e]=r[t];return e}d&&(Sn=document.createElement("div").style,"AnimationEvent"in window||(delete Rn.animationend.animation,delete Rn.animationiteration.animation,delete Rn.animationstart.animation),"TransitionEvent"in window||delete Rn.transitionend.transition);var kn=_n("animationend"),Tn=_n("animationiteration"),Cn=_n("animationstart"),Ln=_n("transitionend"),xn=new Map,Pn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bn(e,t){xn.set(e,t),c(t,[e])}for(var jn=0;jnSo||(e.current=Ao[So],Ao[So]=null,So--)}function To(e,t){So++,Ao[So]=e.current,e.current=t}var Co={},Lo=_o(Co),xo=_o(!1),Po=Co;function Bo(e,t){var r=e.type.contextTypes;if(!r)return Co;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in r)i[o]=t[o];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function jo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Do(){ko(xo),ko(Lo)}function Uo(e,t,r){if(Lo.current!==Co)throw Error(i(168));To(Lo,t),To(xo,r)}function Io(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!==typeof n.getChildContext)return r;for(var o in n=n.getChildContext())if(!(o in t))throw Error(i(108,$(e)||"Unknown",o));return O({},r,n)}function Oo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Co,Po=Lo.current,To(Lo,e),To(xo,xo.current),!0}function Ko(e,t,r){var n=e.stateNode;if(!n)throw Error(i(169));r?(e=Io(e,t,Po),n.__reactInternalMemoizedMergedChildContext=e,ko(xo),ko(Lo),To(Lo,e)):ko(xo),To(xo,r)}var Mo=null,Vo=!1,No=!1;function zo(e){null===Mo?Mo=[e]:Mo.push(e)}function $o(){if(!No&&null!==Mo){No=!0;var e=0,t=vt;try{var r=Mo;for(vt=1;e>=s,o-=s,Jo=1<<32-st(t)+o|r<y?(m=u,u=null):m=u.sibling;var g=f(o,u,a[y],c);if(null===g){null===u&&(u=m);break}e&&u&&null===g.alternate&&t(o,u),i=s(g,i,y),null===d?l=g:d.sibling=g,d=g,u=m}if(y===a.length)return r(o,u),ii&&Yo(o,y),l;if(null===u){for(;ym?(g=y,y=null):g=y.sibling;var v=f(o,y,b.value,l);if(null===v){null===y&&(y=g);break}e&&y&&null===v.alternate&&t(o,y),a=s(v,a,m),null===u?d=v:u.sibling=v,u=v,y=g}if(b.done)return r(o,y),ii&&Yo(o,m),d;if(null===y){for(;!b.done;m++,b=c.next())null!==(b=p(o,b.value,l))&&(a=s(b,a,m),null===u?d=b:u.sibling=b,u=b);return ii&&Yo(o,m),d}for(y=n(o,y);!b.done;m++,b=c.next())null!==(b=h(y,o,m,b.value,l))&&(e&&null!==b.alternate&&y.delete(null===b.key?m:b.key),a=s(b,a,m),null===u?d=b:u.sibling=b,u=b);return e&&y.forEach((function(e){return t(o,e)})),ii&&Yo(o,m),d}return function e(n,i,s,c){if("object"===typeof s&&null!==s&&s.type===A&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var l=s.key,d=i;null!==d;){if(d.key===l){if((l=s.type)===A){if(7===d.tag){r(n,d.sibling),(i=o(d,s.props.children)).return=n,n=i;break e}}else if(d.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===B&&vi(l)===d.type){r(n,d.sibling),(i=o(d,s.props)).ref=gi(n,d,s),i.return=n,n=i;break e}r(n,d);break}t(n,d),d=d.sibling}s.type===A?((i=Ul(s.props.children,n.mode,c,s.key)).return=n,n=i):((c=Dl(s.type,s.key,s.props,null,n.mode,c)).ref=gi(n,i,s),c.return=n,n=c)}return a(n);case R:e:{for(d=s.key;null!==i;){if(i.key===d){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){r(n,i.sibling),(i=o(i,s.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Kl(s,n.mode,c)).return=n,n=i}return a(n);case B:return e(n,i,(d=s._init)(s._payload),c)}if(te(s))return y(n,i,s,c);if(U(s))return m(n,i,s,c);bi(n,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,s)).return=n,n=i):(r(n,i),(i=Ol(s,n.mode,c)).return=n,n=i),a(n)):r(n,i)}}var wi=Ei(!0),Ri=Ei(!1),Ai=_o(null),Si=null,_i=null,ki=null;function Ti(){ki=_i=Si=null}function Ci(e){var t=Ai.current;ko(Ai),e._currentValue=t}function Li(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function xi(e,t){Si=e,ki=_i=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(va=!0),e.firstContext=null)}function Pi(e){var t=e._currentValue;if(ki!==e)if(e={context:e,memoizedValue:t,next:null},null===_i){if(null===Si)throw Error(i(308));_i=e,Si.dependencies={lanes:0,firstContext:e}}else _i=_i.next=e;return t}var Bi=null;function ji(e){null===Bi?Bi=[e]:Bi.push(e)}function Di(e,t,r,n){var o=t.interleaved;return null===o?(r.next=r,ji(t)):(r.next=o.next,o.next=r),t.interleaved=r,Ui(e,n)}function Ui(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var Ii=!1;function Oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ki(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vi(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,0!==(2&Cc)){var o=n.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Ui(e,r)}return null===(o=n.interleaved)?(t.next=t,ji(n)):(t.next=o.next,o.next=t),n.interleaved=t,Ui(e,r)}function Ni(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&r))){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,bt(e,r)}}function zi(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var o=null,i=null;if(null!==(r=r.firstBaseUpdate)){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===i?o=i=s:i=i.next=s,r=r.next}while(null!==r);null===i?o=i=t:i=i.next=t}else o=i=t;return r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function $i(e,t,r,n){var o=e.updateQueue;Ii=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(null!==a){o.shared.pending=null;var c=a,l=c.next;c.next=null,null===s?i=l:s.next=l,s=c;var d=e.alternate;null!==d&&((a=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===a?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=c))}if(null!==i){var u=o.baseState;for(s=0,d=l=c=null,a=i;;){var p=a.lane,f=a.eventTime;if((n&p)===p){null!==d&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,y=a;switch(p=t,f=r,y.tag){case 1:if("function"===typeof(h=y.payload)){u=h.call(f,u,p);break e}u=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null===(p="function"===typeof(h=y.payload)?h.call(f,u,p):h)||void 0===p)break e;u=O({},u,p);break e;case 2:Ii=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(l=d=f,c=u):d=d.next=f,s|=p;if(null===(a=a.next)){if(null===(a=o.shared.pending))break;a=(p=a).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===d&&(c=u),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=d,null!==(t=o.shared.interleaved)){o=t;do{s|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ic|=s,e.lanes=s,e.memoizedState=u}}function Fi(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;tr?r:4,e(!0);var n=is.transition;is.transition={};try{e(!1),t()}finally{vt=r,is.transition=n}}function Gs(){return vs().memoizedState}function Hs(e,t,r){var n=tl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Xs(e))Zs(t,r);else if(null!==(r=Di(e,t,r,n))){rl(r,e,n,el()),Js(r,t,n)}}function Ws(e,t,r){var n=tl(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Xs(e))Zs(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,an(a,s)){var c=t.interleaved;return null===c?(o.next=o,ji(t)):(o.next=c.next,c.next=o),void(t.interleaved=o)}}catch(l){}null!==(r=Di(e,t,o,n))&&(rl(r,e,n,o=el()),Js(r,t,n))}}function Xs(e){var t=e.alternate;return e===as||null!==t&&t===as}function Zs(e,t){us=ds=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Js(e,t,r){if(0!==(4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,bt(e,r)}}var Qs={readContext:Pi,useCallback:hs,useContext:hs,useEffect:hs,useImperativeHandle:hs,useInsertionEffect:hs,useLayoutEffect:hs,useMemo:hs,useReducer:hs,useRef:hs,useState:hs,useDebugValue:hs,useDeferredValue:hs,useTransition:hs,useMutableSource:hs,useSyncExternalStore:hs,useId:hs,unstable_isNewReconciler:!1},Ys={readContext:Pi,useCallback:function(e,t){return bs().memoizedState=[e,void 0===t?null:t],e},useContext:Pi,useEffect:Us,useImperativeHandle:function(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,js(4194308,4,Ms.bind(null,t,e),r)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var r=bs();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=bs();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Hs.bind(null,as,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},bs().memoizedState=e},useState:xs,useDebugValue:Ns,useDeferredValue:function(e){return bs().memoizedState=e},useTransition:function(){var e=xs(!1),t=e[0];return e=qs.bind(null,e[1]),bs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=as,o=bs();if(ii){if(void 0===r)throw Error(i(407));r=r()}else{if(r=t(),null===Lc)throw Error(i(349));0!==(30&ss)||_s(n,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,Us(Ts.bind(null,n,s,e),[e]),n.flags|=2048,Ps(9,ks.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=bs(),t=Lc.identifierPrefix;if(ii){var r=Qo;t=":"+t+"R"+(r=(Jo&~(1<<32-st(Jo)-1)).toString(32)+r),0<(r=ps++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=fs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Pi,useCallback:zs,useContext:Pi,useEffect:Is,useImperativeHandle:Vs,useInsertionEffect:Os,useLayoutEffect:Ks,useMemo:$s,useReducer:ws,useRef:Bs,useState:function(){return ws(Es)},useDebugValue:Ns,useDeferredValue:function(e){return Fs(vs(),cs.memoizedState,e)},useTransition:function(){return[ws(Es)[0],vs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ss,useId:Gs,unstable_isNewReconciler:!1},ta={readContext:Pi,useCallback:zs,useContext:Pi,useEffect:Is,useImperativeHandle:Vs,useInsertionEffect:Os,useLayoutEffect:Ks,useMemo:$s,useReducer:Rs,useRef:Bs,useState:function(){return Rs(Es)},useDebugValue:Ns,useDeferredValue:function(e){var t=vs();return null===cs?t.memoizedState=e:Fs(t,cs.memoizedState,e)},useTransition:function(){return[Rs(Es)[0],vs().memoizedState]},useMutableSource:As,useSyncExternalStore:Ss,useId:Gs,unstable_isNewReconciler:!1};function ra(e,t){if(e&&e.defaultProps){for(var r in t=O({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}function na(e,t,r,n){r=null===(r=r(n,t=e.memoizedState))||void 0===r?t:O({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var oa={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=el(),o=tl(e),i=Mi(n,o);i.payload=t,void 0!==r&&null!==r&&(i.callback=r),null!==(t=Vi(e,i,o))&&(rl(t,e,o,n),Ni(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=el(),o=tl(e),i=Mi(n,o);i.tag=1,i.payload=t,void 0!==r&&null!==r&&(i.callback=r),null!==(t=Vi(e,i,o))&&(rl(t,e,o,n),Ni(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=el(),n=tl(e),o=Mi(r,n);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Vi(e,o,n))&&(rl(t,e,n,r),Ni(t,e,n))}};function ia(e,t,r,n,o,i,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!cn(r,n)||!cn(o,i))}function sa(e,t,r){var n=!1,o=Co,i=t.contextType;return"object"===typeof i&&null!==i?i=Pi(i):(o=jo(t)?Po:Lo.current,i=(n=null!==(n=t.contextTypes)&&void 0!==n)?Bo(e,o):Co),t=new t(r,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=oa,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function aa(e,t,r,n){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&oa.enqueueReplaceState(t,t.state,null)}function ca(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},Oi(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=Pi(i):(i=jo(t)?Po:Lo.current,o.context=Bo(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(na(e,t,i,r),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&oa.enqueueReplaceState(o,o.state,null),$i(e,r,o,n),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function la(e,t){try{var r="",n=t;do{r+=N(n),n=n.return}while(n);var o=r}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function da(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function ua(e,t){try{console.error(t.value)}catch(r){setTimeout((function(){throw r}))}}var pa="function"===typeof WeakMap?WeakMap:Map;function fa(e,t,r){(r=Mi(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Fc||(Fc=!0,qc=n),ua(0,t)},r}function ha(e,t,r){(r=Mi(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"===typeof n){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){ua(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(r.callback=function(){ua(0,t),"function"!==typeof n&&(null===Gc?Gc=new Set([this]):Gc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function ya(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new pa;var o=new Set;n.set(t,o)}else void 0===(o=n.get(t))&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=_l.bind(null,e,t,r),t.then(e,e))}function ma(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ga(e,t,r,n,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=Mi(-1,1)).tag=2,Vi(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ba=E.ReactCurrentOwner,va=!1;function Ea(e,t,r,n){t.child=null===e?Ri(t,null,r,n):wi(t,e.child,r,n)}function wa(e,t,r,n,o){r=r.render;var i=t.ref;return xi(t,o),n=ms(e,t,r,n,i,o),r=gs(),null===e||va?(ii&&r&&ti(t),t.flags|=1,Ea(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Fa(e,t,o))}function Ra(e,t,r,n,o){if(null===e){var i=r.type;return"function"!==typeof i||Bl(i)||void 0!==i.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Dl(r.type,null,n,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Aa(e,t,i,n,o))}if(i=e.child,0===(e.lanes&o)){var s=i.memoizedProps;if((r=null!==(r=r.compare)?r:cn)(s,n)&&e.ref===t.ref)return Fa(e,t,o)}return t.flags|=1,(e=jl(i,n)).ref=t.ref,e.return=t,t.child=e}function Aa(e,t,r,n,o){if(null!==e){var i=e.memoizedProps;if(cn(i,n)&&e.ref===t.ref){if(va=!1,t.pendingProps=n=i,0===(e.lanes&o))return t.lanes=e.lanes,Fa(e,t,o);0!==(131072&e.flags)&&(va=!0)}}return ka(e,t,r,n,o)}function Sa(e,t,r){var n=t.pendingProps,o=n.children,i=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},To(jc,Bc),Bc|=r;else{if(0===(1073741824&r))return e=null!==i?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,To(jc,Bc),Bc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==i?i.baseLanes:r,To(jc,Bc),Bc|=n}else null!==i?(n=i.baseLanes|r,t.memoizedState=null):n=r,To(jc,Bc),Bc|=n;return Ea(e,t,o,r),t.child}function _a(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ka(e,t,r,n,o){var i=jo(r)?Po:Lo.current;return i=Bo(t,i),xi(t,o),r=ms(e,t,r,n,i,o),n=gs(),null===e||va?(ii&&n&&ti(t),t.flags|=1,Ea(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Fa(e,t,o))}function Ta(e,t,r,n,o){if(jo(r)){var i=!0;Oo(t)}else i=!1;if(xi(t,o),null===t.stateNode)$a(e,t),sa(t,r,n),ca(t,r,n,o),n=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,l=r.contextType;"object"===typeof l&&null!==l?l=Pi(l):l=Bo(t,l=jo(r)?Po:Lo.current);var d=r.getDerivedStateFromProps,u="function"===typeof d||"function"===typeof s.getSnapshotBeforeUpdate;u||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==n||c!==l)&&aa(t,s,n,l),Ii=!1;var p=t.memoizedState;s.state=p,$i(t,n,s,o),c=t.memoizedState,a!==n||p!==c||xo.current||Ii?("function"===typeof d&&(na(t,r,d,n),c=t.memoizedState),(a=Ii||ia(t,r,a,n,p,c,l))?(u||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),s.props=n,s.state=c,s.context=l,n=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Ki(e,t),a=t.memoizedProps,l=t.type===t.elementType?a:ra(t.type,a),s.props=l,u=t.pendingProps,p=s.context,"object"===typeof(c=r.contextType)&&null!==c?c=Pi(c):c=Bo(t,c=jo(r)?Po:Lo.current);var f=r.getDerivedStateFromProps;(d="function"===typeof f||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==u||p!==c)&&aa(t,s,n,c),Ii=!1,p=t.memoizedState,s.state=p,$i(t,n,s,o);var h=t.memoizedState;a!==u||p!==h||xo.current||Ii?("function"===typeof f&&(na(t,r,f,n),h=t.memoizedState),(l=Ii||ia(t,r,l,n,p,h,c)||!1)?(d||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(n,h,c),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(n,h,c)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=h),s.props=n,s.state=h,s.context=c,n=l):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ca(e,t,r,n,i,o)}function Ca(e,t,r,n,o,i){_a(e,t);var s=0!==(128&t.flags);if(!n&&!s)return o&&Ko(t,r,!1),Fa(e,t,i);n=t.stateNode,ba.current=t;var a=s&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&s?(t.child=wi(t,e.child,null,i),t.child=wi(t,null,a,i)):Ea(e,t,a,i),t.memoizedState=n.state,o&&Ko(t,r,!0),t.child}function La(e){var t=e.stateNode;t.pendingContext?Uo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Uo(0,t.context,!1),Zi(e,t.containerInfo)}function xa(e,t,r,n,o){return hi(),yi(o),t.flags|=256,Ea(e,t,r,n),t.child}var Pa,Ba,ja,Da,Ua={dehydrated:null,treeContext:null,retryLane:0};function Ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oa(e,t,r){var n,o=t.pendingProps,s=es.current,a=!1,c=0!==(128&t.flags);if((n=c)||(n=(null===e||null!==e.memoizedState)&&0!==(2&s)),n?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),To(es,1&s),null===e)return di(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=o.children,e=o.fallback,a?(o=t.mode,a=t.child,c={mode:"hidden",children:c},0===(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=c):a=Il(c,o,0,null),e=Ul(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ia(r),t.memoizedState=Ua,e):Ka(t,c));if(null!==(s=e.memoizedState)&&null!==(n=s.dehydrated))return function(e,t,r,n,o,s,a){if(r)return 256&t.flags?(t.flags&=-257,Ma(e,t,a,n=da(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=n.fallback,o=t.mode,n=Il({mode:"visible",children:n.children},o,0,null),(s=Ul(s,o,a,null)).flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,0!==(1&t.mode)&&wi(t,e.child,null,a),t.child.memoizedState=Ia(a),t.memoizedState=Ua,s);if(0===(1&t.mode))return Ma(e,t,a,null);if("$!"===o.data){if(n=o.nextSibling&&o.nextSibling.dataset)var c=n.dgst;return n=c,Ma(e,t,a,n=da(s=Error(i(419)),n,void 0))}if(c=0!==(a&e.childLanes),va||c){if(null!==(n=Lc)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(n.suspendedLanes|a))?0:o)&&o!==s.retryLane&&(s.retryLane=o,Ui(e,o),rl(n,e,o,-1))}return yl(),Ma(e,t,a,n=da(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Tl.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,oi=lo(o.nextSibling),ni=t,ii=!0,si=null,null!==e&&(Wo[Xo++]=Jo,Wo[Xo++]=Qo,Wo[Xo++]=Zo,Jo=e.id,Qo=e.overflow,Zo=t),t=Ka(t,n.children),t.flags|=4096,t)}(e,t,c,o,n,s,r);if(a){a=o.fallback,c=t.mode,n=(s=e.child).sibling;var l={mode:"hidden",children:o.children};return 0===(1&c)&&t.child!==s?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=jl(s,l)).subtreeFlags=14680064&s.subtreeFlags,null!==n?a=jl(n,a):(a=Ul(a,c,r,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,c=null===(c=e.child.memoizedState)?Ia(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},a.memoizedState=c,a.childLanes=e.childLanes&~r,t.memoizedState=Ua,o}return e=(a=e.child).sibling,o=jl(a,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Ka(e,t){return(t=Il({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ma(e,t,r,n){return null!==n&&yi(n),wi(t,e.child,null,r),(e=Ka(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Va(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Li(e.return,t,r)}function Na(e,t,r,n,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function za(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Ea(e,t,n.children,r),0!==(2&(n=es.current)))n=1&n|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Va(e,r,t);else if(19===e.tag)Va(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(To(es,n),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;null!==r;)null!==(e=r.alternate)&&null===ts(e)&&(o=r),r=r.sibling;null===(r=o)?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Na(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ts(e)){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Na(t,!0,r,null,i);break;case"together":Na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $a(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fa(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Ic|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(r=jl(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=jl(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function qa(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ga(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=14680064&o.subtreeFlags,n|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Ha(e,t,r){var n=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ga(t),null;case 1:case 17:return jo(t.type)&&Do(),Ga(t),null;case 3:return n=t.stateNode,Ji(),ko(xo),ko(Lo),ns(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(pi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==si&&(sl(si),si=null))),Ba(e,t),Ga(t),null;case 5:Yi(t);var o=Xi(Wi.current);if(r=t.type,null!==e&&null!=t.stateNode)ja(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(i(166));return Ga(t),null}if(e=Xi(Gi.current),pi(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[fo]=t,n[ho]=s,e=0!==(1&t.mode),r){case"dialog":Mn("cancel",n),Mn("close",n);break;case"iframe":case"object":case"embed":Mn("load",n);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof n.is?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),"select"===r&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[fo]=t,e[ho]=n,Pa(e,t,!1,!1),t.stateNode=e;e:{switch(c=ve(r,n),r){case"dialog":Mn("cancel",e),Mn("close",e),o=n;break;case"iframe":case"object":case"embed":Mn("load",e),o=n;break;case"video":case"audio":for(o=0;ozc&&(t.flags|=128,n=!0,qa(s,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ts(c))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),qa(s,!0),null===s.tail&&"hidden"===s.tailMode&&!c.alternate&&!ii)return Ga(t),null}else 2*Je()-s.renderingStartTime>zc&&1073741824!==r&&(t.flags|=128,n=!0,qa(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=s.last)?r.sibling=c:t.child=c,s.last=c)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,r=es.current,To(es,n?1&r|2:1&r),t):(Ga(t),null);case 22:case 23:return ul(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!==(1&t.mode)?0!==(1073741824&Bc)&&(Ga(t),6&t.subtreeFlags&&(t.flags|=8192)):Ga(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Wa(e,t){switch(ri(t),t.tag){case 1:return jo(t.type)&&Do(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ji(),ko(xo),ko(Lo),ns(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Yi(t),null;case 13:if(ko(es),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));hi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ko(es),null;case 4:return Ji(),null;case 10:return Ci(t.type._context),null;case 22:case 23:return ul(),null;default:return null}}Pa=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ba=function(){},ja=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Xi(Gi.current);var i,s=null;switch(r){case"input":o=X(e,o),n=X(e,n),s=[];break;case"select":o=O({},o,{value:void 0}),n=O({},n,{value:void 0}),s=[];break;case"textarea":o=ne(e,o),n=ne(e,n),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof n.onClick&&(e.onclick=Yn)}for(d in be(r,n),r=null,o)if(!n.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(i in c)c.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(a.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in n){var l=n[d];if(c=null!=o?o[d]:void 0,n.hasOwnProperty(d)&&l!==c&&(null!=l||null!=c))if("style"===d)if(c){for(i in c)!c.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&c[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(s||(s=[]),s.push(d,r)),r=l;else"dangerouslySetInnerHTML"===d?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(d,l)):"children"===d?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(d,""+l):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(a.hasOwnProperty(d)?(null!=l&&"onScroll"===d&&Mn("scroll",e),s||c===l||(s=[])):(s=s||[]).push(d,l))}r&&(s=s||[]).push("style",r);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Da=function(e,t,r,n){r!==n&&(t.flags|=4)};var Xa=!1,Za=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Qa=null;function Ya(e,t){var r=e.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(n){Sl(e,t,n)}else r.current=null}function ec(e,t,r){try{r()}catch(n){Sl(e,t,n)}}var tc=!1;function rc(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&ec(t,r,i)}o=o.next}while(o!==n)}}function nc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function oc(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"===typeof t?t(e):t.current=e}}function ic(e){var t=e.alternate;null!==t&&(e.alternate=null,ic(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fo],delete t[ho],delete t[mo],delete t[go],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sc(e){return 5===e.tag||3===e.tag||4===e.tag}function ac(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==t.onclick||(t.onclick=Yn));else if(4!==n&&null!==(e=e.child))for(cc(e,t,r),e=e.sibling;null!==e;)cc(e,t,r),e=e.sibling}function lc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(lc(e,t,r),e=e.sibling;null!==e;)lc(e,t,r),e=e.sibling}var dc=null,uc=!1;function pc(e,t,r){for(r=r.child;null!==r;)fc(e,t,r),r=r.sibling}function fc(e,t,r){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,r)}catch(a){}switch(r.tag){case 5:Za||Ya(r,t);case 6:var n=dc,o=uc;dc=null,pc(e,t,r),uc=o,null!==(dc=n)&&(uc?(e=dc,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):dc.removeChild(r.stateNode));break;case 18:null!==dc&&(uc?(e=dc,r=r.stateNode,8===e.nodeType?co(e.parentNode,r):1===e.nodeType&&co(e,r),zt(e)):co(dc,r.stateNode));break;case 4:n=dc,o=uc,dc=r.stateNode.containerInfo,uc=!0,pc(e,t,r),dc=n,uc=o;break;case 0:case 11:case 14:case 15:if(!Za&&(null!==(n=r.updateQueue)&&null!==(n=n.lastEffect))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,void 0!==s&&(0!==(2&i)||0!==(4&i))&&ec(r,t,s),o=o.next}while(o!==n)}pc(e,t,r);break;case 1:if(!Za&&(Ya(r,t),"function"===typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Sl(r,t,a)}pc(e,t,r);break;case 21:pc(e,t,r);break;case 22:1&r.mode?(Za=(n=Za)||null!==r.memoizedState,pc(e,t,r),Za=n):pc(e,t,r);break;default:pc(e,t,r)}}function hc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Ja),t.forEach((function(t){var n=Cl.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function yc(e,t){var r=t.deletions;if(null!==r)for(var n=0;no&&(o=a),n&=~s}if(n=o,10<(n=(120>(n=Je()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Sc(n/1960))-n)){e.timeoutHandle=no(wl.bind(null,e,Vc,$c),n);break}wl(e,Vc,$c);break;default:throw Error(i(329))}}}return nl(e,Je()),e.callbackNode===r?ol.bind(null,e):null}function il(e,t){var r=Mc;return e.current.memoizedState.isDehydrated&&(pl(e,t).flags|=256),2!==(e=ml(e,t))&&(t=Vc,Vc=r,null!==t&&sl(t)),e}function sl(e){null===Vc?Vc=e:Vc.push.apply(Vc,e)}function al(e,t){for(t&=~Kc,t&=~Oc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Wc)var n=!1;else{if(e=Wc,Wc=null,Xc=0,0!==(6&Cc))throw Error(i(331));var o=Cc;for(Cc|=4,Qa=e.current;null!==Qa;){var s=Qa,a=s.child;if(0!==(16&Qa.flags)){var c=s.deletions;if(null!==c){for(var l=0;lJe()-Nc?pl(e,0):Kc|=r),nl(e,t)}function kl(e,t){0===t&&(0===(1&e.mode)?t=1:(t=dt,0===(130023424&(dt<<=1))&&(dt=4194304)));var r=el();null!==(e=Ui(e,t))&&(gt(e,t,r),nl(e,r))}function Tl(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),kl(e,r)}function Cl(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(i(314))}null!==n&&n.delete(t),kl(e,r)}function Ll(e,t){return He(e,t)}function xl(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pl(e,t,r,n){return new xl(e,t,r,n)}function Bl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function jl(e,t){var r=e.alternate;return null===r?((r=Pl(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Dl(e,t,r,n,o,s){var a=2;if(n=e,"function"===typeof e)Bl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case A:return Ul(r.children,o,s,t);case S:a=8,o|=8;break;case _:return(e=Pl(12,r,t,2|o)).elementType=_,e.lanes=s,e;case L:return(e=Pl(13,r,t,o)).elementType=L,e.lanes=s,e;case x:return(e=Pl(19,r,t,o)).elementType=x,e.lanes=s,e;case j:return Il(r,o,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case k:a=10;break e;case T:a=9;break e;case C:a=11;break e;case P:a=14;break e;case B:a=16,n=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Pl(a,r,t,o)).elementType=e,t.type=n,t.lanes=s,t}function Ul(e,t,r,n){return(e=Pl(7,e,n,t)).lanes=r,e}function Il(e,t,r,n){return(e=Pl(22,e,n,t)).elementType=j,e.lanes=r,e.stateNode={isHidden:!1},e}function Ol(e,t,r){return(e=Pl(6,e,null,t)).lanes=r,e}function Kl(e,t,r){return(t=Pl(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ml(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vl(e,t,r,n,o,i,s,a,c){return e=new Ml(e,t,r,a,c),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Pl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oi(i),e}function Nl(e){if(!e)return Co;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(jo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var r=e.type;if(jo(r))return Io(e,r,t)}return t}function zl(e,t,r,n,o,i,s,a,c){return(e=Vl(r,n,!0,e,0,i,0,a,c)).context=Nl(null),r=e.current,(i=Mi(n=el(),o=tl(r))).callback=void 0!==t&&null!==t?t:null,Vi(r,i,o),e.current.lanes=o,gt(e,o,n),nl(e,n),e}function $l(e,t,r,n){var o=t.current,i=el(),s=tl(o);return r=Nl(r),null===t.context?t.context=r:t.pendingContext=r,(t=Mi(i,s)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=Vi(o,t,s))&&(rl(e,o,s,i),Ni(e,o,s)),s}function Fl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DuplicateTemplateNameError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"DuplicateTemplateName"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.DuplicateTemplateNameError=o},2764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2770:(e,t,r)=>{"use strict";r.d(t,{D4:()=>s,aI:()=>a,np:()=>c,vt:()=>i});var n=r(4192),o=r(1182);const i=(e,t)=>{const r=t.byteLength,n=o.OY(e),i=n+o.OY(r),s=new Uint8Array(i+r);return o.s_(e,s,0),o.s_(r,s,n),s.set(t,i),new c(e,r,t,s)},s=e=>{const t=(0,n.au)(e),[r,i]=o.D4(t),[s,a]=o.D4(t.subarray(i)),l=t.subarray(i+a);if(l.byteLength!==s)throw new Error("Incorrect length");return new c(r,s,l,t)},a=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&(0,n.aI)(e.bytes,t.bytes);class c{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}},2773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2781:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthServerFactory=void 0;const n=r(2254);t.OAuthServerFactory=class{constructor(e,t,r,n,o,i){Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"resolver",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"dpopNonceCache",{enumerable:!0,configurable:!0,writable:!0,value:i})}async fromIssuer(e,t,r){const n=await this.resolver.getAuthorizationServerMetadata(e,r);return this.fromMetadata(n,t)}async fromMetadata(e,t){return new n.OAuthServerAgent(t,e,this.clientMetadata,this.dpopNonceCache,this.resolver,this.runtime,this.keyset,this.fetch)}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMessageRef=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#messageRef"===e.$type},t.validateMessageRef=function(e){return o.lexicons.validate("chat.bsky.convo.defs#messageRef",e)},t.isMessageInput=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#messageInput"===e.$type},t.validateMessageInput=function(e){return o.lexicons.validate("chat.bsky.convo.defs#messageInput",e)},t.isMessageView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#messageView"===e.$type},t.validateMessageView=function(e){return o.lexicons.validate("chat.bsky.convo.defs#messageView",e)},t.isDeletedMessageView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#deletedMessageView"===e.$type},t.validateDeletedMessageView=function(e){return o.lexicons.validate("chat.bsky.convo.defs#deletedMessageView",e)},t.isMessageViewSender=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#messageViewSender"===e.$type},t.validateMessageViewSender=function(e){return o.lexicons.validate("chat.bsky.convo.defs#messageViewSender",e)},t.isConvoView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#convoView"===e.$type},t.validateConvoView=function(e){return o.lexicons.validate("chat.bsky.convo.defs#convoView",e)},t.isLogBeginConvo=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#logBeginConvo"===e.$type},t.validateLogBeginConvo=function(e){return o.lexicons.validate("chat.bsky.convo.defs#logBeginConvo",e)},t.isLogLeaveConvo=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#logLeaveConvo"===e.$type},t.validateLogLeaveConvo=function(e){return o.lexicons.validate("chat.bsky.convo.defs#logLeaveConvo",e)},t.isLogCreateMessage=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#logCreateMessage"===e.$type},t.validateLogCreateMessage=function(e){return o.lexicons.validate("chat.bsky.convo.defs#logCreateMessage",e)},t.isLogDeleteMessage=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"chat.bsky.convo.defs#logDeleteMessage"===e.$type},t.validateLogDeleteMessage=function(e){return o.lexicons.validate("chat.bsky.convo.defs#logDeleteMessage",e)};const n=r(2127),o=r(554)},2799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isProfileViewBasic=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#profileViewBasic"===e.$type},t.validateProfileViewBasic=function(e){return o.lexicons.validate("app.bsky.actor.defs#profileViewBasic",e)},t.isProfileView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#profileView"===e.$type},t.validateProfileView=function(e){return o.lexicons.validate("app.bsky.actor.defs#profileView",e)},t.isProfileViewDetailed=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#profileViewDetailed"===e.$type},t.validateProfileViewDetailed=function(e){return o.lexicons.validate("app.bsky.actor.defs#profileViewDetailed",e)},t.isProfileAssociated=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#profileAssociated"===e.$type},t.validateProfileAssociated=function(e){return o.lexicons.validate("app.bsky.actor.defs#profileAssociated",e)},t.isProfileAssociatedChat=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#profileAssociatedChat"===e.$type},t.validateProfileAssociatedChat=function(e){return o.lexicons.validate("app.bsky.actor.defs#profileAssociatedChat",e)},t.isViewerState=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#viewerState"===e.$type},t.validateViewerState=function(e){return o.lexicons.validate("app.bsky.actor.defs#viewerState",e)},t.isKnownFollowers=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#knownFollowers"===e.$type},t.validateKnownFollowers=function(e){return o.lexicons.validate("app.bsky.actor.defs#knownFollowers",e)},t.isAdultContentPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#adultContentPref"===e.$type},t.validateAdultContentPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#adultContentPref",e)},t.isContentLabelPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#contentLabelPref"===e.$type},t.validateContentLabelPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#contentLabelPref",e)},t.isSavedFeed=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#savedFeed"===e.$type},t.validateSavedFeed=function(e){return o.lexicons.validate("app.bsky.actor.defs#savedFeed",e)},t.isSavedFeedsPrefV2=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#savedFeedsPrefV2"===e.$type},t.validateSavedFeedsPrefV2=function(e){return o.lexicons.validate("app.bsky.actor.defs#savedFeedsPrefV2",e)},t.isSavedFeedsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#savedFeedsPref"===e.$type},t.validateSavedFeedsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#savedFeedsPref",e)},t.isPersonalDetailsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#personalDetailsPref"===e.$type},t.validatePersonalDetailsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#personalDetailsPref",e)},t.isFeedViewPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#feedViewPref"===e.$type},t.validateFeedViewPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#feedViewPref",e)},t.isThreadViewPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#threadViewPref"===e.$type},t.validateThreadViewPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#threadViewPref",e)},t.isInterestsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#interestsPref"===e.$type},t.validateInterestsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#interestsPref",e)},t.isMutedWord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#mutedWord"===e.$type},t.validateMutedWord=function(e){return o.lexicons.validate("app.bsky.actor.defs#mutedWord",e)},t.isMutedWordsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#mutedWordsPref"===e.$type},t.validateMutedWordsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#mutedWordsPref",e)},t.isHiddenPostsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#hiddenPostsPref"===e.$type},t.validateHiddenPostsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#hiddenPostsPref",e)},t.isLabelersPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#labelersPref"===e.$type},t.validateLabelersPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#labelersPref",e)},t.isLabelerPrefItem=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#labelerPrefItem"===e.$type},t.validateLabelerPrefItem=function(e){return o.lexicons.validate("app.bsky.actor.defs#labelerPrefItem",e)},t.isBskyAppStatePref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#bskyAppStatePref"===e.$type},t.validateBskyAppStatePref=function(e){return o.lexicons.validate("app.bsky.actor.defs#bskyAppStatePref",e)},t.isBskyAppProgressGuide=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#bskyAppProgressGuide"===e.$type},t.validateBskyAppProgressGuide=function(e){return o.lexicons.validate("app.bsky.actor.defs#bskyAppProgressGuide",e)},t.isNux=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#nux"===e.$type},t.validateNux=function(e){return o.lexicons.validate("app.bsky.actor.defs#nux",e)},t.isPostInteractionSettingsPref=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.actor.defs#postInteractionSettingsPref"===e.$type},t.validatePostInteractionSettingsPref=function(e){return o.lexicons.validate("app.bsky.actor.defs#postInteractionSettingsPref",e)};const n=r(2127),o=r(554)},2801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthFactorTokenRequiredError=t.AccountTakedownError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("AccountTakedown"===e.error)return new o(e);if("AuthFactorTokenRequired"===e.error)return new i(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AccountTakedownError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AuthFactorTokenRequiredError=i},2835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapDefined=void 0,t.keyBy=function(e,t){return e.reduce(((e,r)=>(e.set(r[t],r),e)),new Map)};t.mapDefined=(e,t)=>{const r=[];for(const n of e){const e=t(n);void 0!==e&&r.push(e)}return r}},2853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoDeactivatedError=t.RepoSuspendedError=t.RepoTakendownError=t.RepoNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("RepoNotFound"===e.error)return new o(e);if("RepoTakendown"===e.error)return new i(e);if("RepoSuspended"===e.error)return new s(e);if("RepoDeactivated"===e.error)return new a(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoTakendownError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoSuspendedError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoDeactivatedError=a},2862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2867:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(469),t),o(r(9318),t)},2875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decideAccount=function(e,t){const r=new n.ModerationDecision;r.setDid(e.did),r.setIsMe(e.did===t.userDid),e.viewer?.muted&&(e.viewer?.mutedByList?r.addMutedByList(e.viewer?.mutedByList):r.addMuted(e.viewer?.muted));e.viewer?.blocking&&(e.viewer?.blockingByList?r.addBlockingByList(e.viewer?.blockingByList):r.addBlocking(e.viewer?.blocking));r.addBlockedBy(e.viewer?.blockedBy);for(const n of o(e.labels))r.addLabel("account",n,t);return r},t.filterAccountLabels=o;const n=r(9092);function o(e){return e?e.filter((e=>!e.uri.endsWith("/app.bsky.actor.profile/self")||"!no-unauthenticated"===e.val)):[]}},2887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeadNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"HeadNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.HeadNotFoundError=o},2888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},2915:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDidError=t.DidError=void 0;class r extends Error{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:400;super(t,{cause:arguments.length>4?arguments[4]:void 0}),Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:n})}get statusCode(){return this.status}toString(){return`${this.constructor.name} ${this.code} (${this.did}): ${this.message}`}static from(e,t){if(e instanceof r)return e;const n=e instanceof Error?e.message:"string"===typeof e?e:"An unknown error occurred",o=("number"===typeof e?.statusCode?e.statusCode:void 0)??("number"===typeof e?.status?e.status:void 0);return new r(t,n,"did-unknown-error",o,e)}}t.DidError=r;t.InvalidDidError=class extends r{constructor(e,t,r){super(e,t,"did-invalid",400,r)}}},2931:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addHoursToDate=t.lessThanAgoMs=t.DAY=t.HOUR=t.MINUTE=t.SECOND=void 0,t.SECOND=1e3,t.MINUTE=60*t.SECOND,t.HOUR=60*t.MINUTE,t.DAY=24*t.HOUR;t.lessThanAgoMs=(e,t)=>Date.now(){const r=t?new Date(t):new Date;return r.setHours(r.getHours()+e),r}},2989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoDeactivatedError=t.RepoSuspendedError=t.RepoTakendownError=t.RepoNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("RepoNotFound"===e.error)return new o(e);if("RepoTakendown"===e.error)return new i(e);if("RepoSuspended"===e.error)return new s(e);if("RepoDeactivated"===e.error)return new a(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoTakendownError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoSuspendedError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoDeactivatedError=a},3004:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const o=r(6354),i=n(r(3690));t.makeIssue=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(void 0!==o.message)return{...o,path:i,message:o.message};let a="";const c=n.filter((e=>!!e)).slice().reverse();for(const l of c)a=l(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,r){const n=(0,o.getErrorMap)(),s=(0,t.makeIssue)({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===i.default?void 0:i.default].filter((e=>!!e))});e.common.issues.push(s)};class s{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const o of r){if("aborted"===o.status)return t.INVALID;"dirty"===o.status&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const e=await n.key,t=await n.value;r.push({key:e,value:t})}return s.mergeObjectSync(e,r)}static mergeObjectSync(e,r){const n={};for(const o of r){const{key:r,value:i}=o;if("aborted"===r.status)return t.INVALID;if("aborted"===i.status)return t.INVALID;"dirty"===r.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===r.value||"undefined"===typeof i.value&&!o.alwaysSet||(n[r.value]=i.value)}return{status:e.value,value:n}}}t.ParseStatus=s,t.INVALID=Object.freeze({status:"aborted"});t.DIRTY=e=>({status:"dirty",value:e});t.OK=e=>({status:"valid",value:e});t.isAborted=e=>"aborted"===e.status;t.isDirty=e=>"dirty"===e.status;t.isValid=e=>"valid"===e.status;t.isAsync=e=>"undefined"!==typeof Promise&&e instanceof Promise},3051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("com.atproto.lexicon.schema#main"===e.$type||"com.atproto.lexicon.schema"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("com.atproto.lexicon.schema#main",e)};const n=r(2127),o=r(554)},3087:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCommit=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#commit"===e.$type},t.validateCommit=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#commit",e)},t.isIdentity=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#identity"===e.$type},t.validateIdentity=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#identity",e)},t.isAccount=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#account"===e.$type},t.validateAccount=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#account",e)},t.isHandle=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#handle"===e.$type},t.validateHandle=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#handle",e)},t.isMigrate=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#migrate"===e.$type},t.validateMigrate=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#migrate",e)},t.isTombstone=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#tombstone"===e.$type},t.validateTombstone=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#tombstone",e)},t.isInfo=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#info"===e.$type},t.validateInfo=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#info",e)},t.isRepoOp=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.subscribeRepos#repoOp"===e.$type},t.validateRepoOp=function(e){return o.lexicons.validate("com.atproto.sync.subscribeRepos#repoOp",e)};const n=r(2127),o=r(554)},3133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebcryptoKey=t.jwkWithAlgSchema=void 0;const n=r(1085),o=r(586),i=r(956),s=r(6194);t.jwkWithAlgSchema=n.z.intersection(o.jwkSchema,n.z.object({alg:n.z.string()}));class a extends i.JoseKey{static async generate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["ES256"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:crypto.randomUUID(),r=arguments.length>2?arguments[2]:void 0;const n=await this.generateKeyPair(e,r);if(!(0,s.isCryptoKeyPair)(n))throw new TypeError("Invalid CryptoKeyPair");return this.fromKeypair(n,t)}static async fromKeypair(e,r){const{key_ops:n,use:o,alg:i=(0,s.fromSubtleAlgorithm)(e.privateKey.algorithm),...c}=await crypto.subtle.exportKey("jwk",e.privateKey.extractable?e.privateKey:e.publicKey);if(o&&"sig"!==o)throw new TypeError(`Unsupported JWK use "${o}"`);if(n&&!n.some((e=>"sign"===e||"verify"===e)))throw new TypeError(`Invalid key_ops "${n}" for "sig" use`);return new a(t.jwkWithAlgSchema.parse({...c,kid:r,alg:i,use:"sig"}),e)}constructor(e,t){super(e),Object.defineProperty(this,"cryptoKeyPair",{enumerable:!0,configurable:!0,writable:!0,value:t})}get isPrivate(){return!0}get privateJwk(){if(super.isPrivate)return this.jwk;throw new Error("Private Webcrypto Key not exportable")}async getKeyObj(e){if(this.jwk.alg!==e)throw new o.JwkError(`Key cannot be used with algorithm "${e}"`);return this.cryptoKeyPair.privateKey}}t.WebcryptoKey=a},3135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3160:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(4295),i=n(r(5596)),s=n(r(2034));class a{static nextBreak(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;const r=i.default.codePointAt(e,t),n=a.getGraphemeBreakProperty(r),o=a.getEmojiProperty(r),s=[],c=[];for(let l=t+1;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nuxSchema=t.asDid=t.isDid=void 0,t.sanitizeMutedWordValue=function(e){return e.trim().replace(/^#(?!\ufe0f)/,"").replace(/[\r\n\u00AD\u2060\u200D\u200C\u200B]+/,"")},t.savedFeedsToUriArrays=function(e){const t=[],r=[];for(const n of e)n.pinned?(t.push(n.value),r.push(n.value)):r.push(n.value);return{pinned:t,saved:r}},t.getSavedFeedType=function(e){switch(new i.AtUri(e).collection){case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";default:return"unknown"}},t.validateSavedFeed=function(e){if(new o.TID(e.id),["feed","list"].includes(e.type)){const t=new i.AtUri(e.value),r="app.bsky.feed.generator"===t.collection,n="app.bsky.graph.list"===t.collection;if("feed"===e.type&&!r)throw new Error(`Saved feed of type 'feed' must be a feed, got ${t.collection}`);if("list"===e.type&&!n)throw new Error(`Saved feed of type 'list' must be a list, got ${t.collection}`)}},t.validateNux=function(e){t.nuxSchema.parse(e)};const n=r(1085),o=r(8021),i=r(6406);t.isDid=e=>"string"===typeof e&&e.startsWith("did:")&&e.includes(":",4)&&e.length>8&&e.length<=2048;t.asDid=e=>{if((0,t.isDid)(e))return e;throw new TypeError(`Invalid DID: ${e}`)},t.nuxSchema=n.z.object({id:n.z.string().max(64),completed:n.z.boolean(),data:n.z.string().max(300).optional(),expiresAt:n.z.string().datetime().optional()}).strict()},3189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationRequestQuerySchema=void 0;const n=r(1085),o=r(1788),i=r(4561),s=r(1159);t.oauthAuthorizationRequestQuerySchema=n.z.union([i.oauthAuthorizationRequestParametersSchema,o.oauthAuthorizationRequestJarSchema,s.oauthAuthorizationRequestUriSchema])},3216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthResolverError=void 0;const n=r(1085);class o extends Error{constructor(e,t){super(e,t)}static from(e,t){if(e instanceof o)return e;const r=e instanceof n.ZodError?`${e.errors[0].path} ${e.errors[0].message}`:null;return new o((t??"Unable to resolve identity")+(r?` (${r})`:""),{cause:e})}}t.OAuthResolverError=o},3263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTokenError=t.ExpiredTokenError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("ExpiredToken"===e.error)return new o(e);if("InvalidToken"===e.error)return new i(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.ExpiredTokenError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidTokenError=i},3292:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.params=function(e,t,r,n){const o=n&&"object"===typeof n?n:{},i=new Set(r.required??[]);let l=o;if("object"===typeof r.properties)for(const d in r.properties){const n=r.properties[d],u="array"===n.type?(0,a.array)(e,d,n,o[d]):c.validate(e,d,n,o[d]),p=u.success?u.value:o[d],f="undefined"===typeof p;if(f&&i.has(d))return{success:!1,error:new s.ValidationError(`${t} must have the property "${d}"`)};if(!f&&!u.success)return u;p!==o[d]&&(l===o&&(l={...o}),l[d]=p)}return{success:!0,value:l}};const s=r(6078),a=r(3487),c=i(r(125))},3310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oidcAuthenticationErrorResponseSchema=void 0;const n=r(1085);t.oidcAuthenticationErrorResponseSchema=n.z.enum(["interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"])},3313:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.REVIEWNONE=t.REVIEWCLOSED=t.REVIEWESCALATED=t.REVIEWOPEN=void 0,t.isModEventView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventView"===e.$type},t.validateModEventView=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventView",e)},t.isModEventViewDetail=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventViewDetail"===e.$type},t.validateModEventViewDetail=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventViewDetail",e)},t.isSubjectStatusView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#subjectStatusView"===e.$type},t.validateSubjectStatusView=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#subjectStatusView",e)},t.isAccountStats=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#accountStats"===e.$type},t.validateAccountStats=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#accountStats",e)},t.isRecordsStats=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordsStats"===e.$type},t.validateRecordsStats=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordsStats",e)},t.isModEventTakedown=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventTakedown"===e.$type},t.validateModEventTakedown=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventTakedown",e)},t.isModEventReverseTakedown=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventReverseTakedown"===e.$type},t.validateModEventReverseTakedown=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventReverseTakedown",e)},t.isModEventResolveAppeal=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventResolveAppeal"===e.$type},t.validateModEventResolveAppeal=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventResolveAppeal",e)},t.isModEventComment=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventComment"===e.$type},t.validateModEventComment=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventComment",e)},t.isModEventReport=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventReport"===e.$type},t.validateModEventReport=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventReport",e)},t.isModEventLabel=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventLabel"===e.$type},t.validateModEventLabel=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventLabel",e)},t.isModEventPriorityScore=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventPriorityScore"===e.$type},t.validateModEventPriorityScore=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventPriorityScore",e)},t.isModEventAcknowledge=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventAcknowledge"===e.$type},t.validateModEventAcknowledge=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventAcknowledge",e)},t.isModEventEscalate=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventEscalate"===e.$type},t.validateModEventEscalate=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventEscalate",e)},t.isModEventMute=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventMute"===e.$type},t.validateModEventMute=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventMute",e)},t.isModEventUnmute=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventUnmute"===e.$type},t.validateModEventUnmute=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventUnmute",e)},t.isModEventMuteReporter=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventMuteReporter"===e.$type},t.validateModEventMuteReporter=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventMuteReporter",e)},t.isModEventUnmuteReporter=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventUnmuteReporter"===e.$type},t.validateModEventUnmuteReporter=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventUnmuteReporter",e)},t.isModEventEmail=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventEmail"===e.$type},t.validateModEventEmail=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventEmail",e)},t.isModEventDivert=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventDivert"===e.$type},t.validateModEventDivert=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventDivert",e)},t.isModEventTag=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#modEventTag"===e.$type},t.validateModEventTag=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#modEventTag",e)},t.isAccountEvent=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#accountEvent"===e.$type},t.validateAccountEvent=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#accountEvent",e)},t.isIdentityEvent=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#identityEvent"===e.$type},t.validateIdentityEvent=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#identityEvent",e)},t.isRecordEvent=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordEvent"===e.$type},t.validateRecordEvent=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordEvent",e)},t.isRepoView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#repoView"===e.$type},t.validateRepoView=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#repoView",e)},t.isRepoViewDetail=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#repoViewDetail"===e.$type},t.validateRepoViewDetail=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#repoViewDetail",e)},t.isRepoViewNotFound=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#repoViewNotFound"===e.$type},t.validateRepoViewNotFound=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#repoViewNotFound",e)},t.isRecordView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordView"===e.$type},t.validateRecordView=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordView",e)},t.isRecordViewDetail=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordViewDetail"===e.$type},t.validateRecordViewDetail=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordViewDetail",e)},t.isRecordViewNotFound=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordViewNotFound"===e.$type},t.validateRecordViewNotFound=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordViewNotFound",e)},t.isModeration=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#moderation"===e.$type},t.validateModeration=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#moderation",e)},t.isModerationDetail=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#moderationDetail"===e.$type},t.validateModerationDetail=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#moderationDetail",e)},t.isBlobView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#blobView"===e.$type},t.validateBlobView=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#blobView",e)},t.isImageDetails=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#imageDetails"===e.$type},t.validateImageDetails=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#imageDetails",e)},t.isVideoDetails=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#videoDetails"===e.$type},t.validateVideoDetails=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#videoDetails",e)},t.isAccountHosting=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#accountHosting"===e.$type},t.validateAccountHosting=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#accountHosting",e)},t.isRecordHosting=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.moderation.defs#recordHosting"===e.$type},t.validateRecordHosting=function(e){return o.lexicons.validate("tools.ozone.moderation.defs#recordHosting",e)};const n=r(2127),o=r(554);t.REVIEWOPEN="tools.ozone.moderation.defs#reviewOpen",t.REVIEWESCALATED="tools.ozone.moderation.defs#reviewEscalated",t.REVIEWCLOSED="tools.ozone.moderation.defs#reviewClosed",t.REVIEWNONE="tools.ozone.moderation.defs#reviewNone"},3340:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3377:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.repo.listRecords#record"===e.$type},t.validateRecord=function(e){return o.lexicons.validate("com.atproto.repo.listRecords#record",e)};const n=r(2127),o=r(554)},3404:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisallowedDomainError=t.UnsupportedDomainError=t.ReservedHandleError=t.InvalidHandleError=t.isValidTld=t.isValidHandle=t.normalizeAndEnsureValidHandle=t.normalizeHandle=t.ensureValidHandleRegex=t.ensureValidHandle=t.DISALLOWED_TLDS=t.INVALID_HANDLE=void 0,t.INVALID_HANDLE="handle.invalid",t.DISALLOWED_TLDS=[".local",".arpa",".invalid",".localhost",".internal",".example",".alt",".onion"];t.ensureValidHandle=e=>{if(!/^[a-zA-Z0-9.-]*$/.test(e))throw new r("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(e.length>253)throw new r("Handle is too long (253 chars max)");const t=e.split(".");if(t.length<2)throw new r("Handle domain needs at least two parts");for(let n=0;n63)throw new r("Handle part too long (max 63 chars)");if(e.endsWith("-")||e.startsWith("-"))throw new r("Handle parts can not start or end with hyphens");if(n+1===t.length&&!/^[a-zA-Z]/.test(e))throw new r("Handle final component (TLD) must start with ASCII letter")}};t.ensureValidHandleRegex=e=>{if(!/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(e))throw new r("Handle didn't validate via regex");if(e.length>253)throw new r("Handle is too long (253 chars max)")};t.normalizeHandle=e=>e.toLowerCase();t.normalizeAndEnsureValidHandle=e=>{const r=(0,t.normalizeHandle)(e);return(0,t.ensureValidHandle)(r),r};t.isValidHandle=e=>{try{(0,t.ensureValidHandle)(e)}catch(n){if(n instanceof r)return!1;throw n}return!0};t.isValidTld=e=>!t.DISALLOWED_TLDS.some((t=>e.endsWith(t)));class r extends Error{}t.InvalidHandleError=r;class n extends Error{}t.ReservedHandleError=n;class o extends Error{}t.UnsupportedDomainError=o;class i extends Error{}t.DisallowedDomainError=i},3481:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTidError=t.isValidTid=t.ensureValidTid=void 0;const r=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/;t.ensureValidTid=e=>{if(13!==e.length)throw new n("TID must be 13 characters");if(!r.test(e))throw new n("TID syntax not valid (regex)")};t.isValidTid=e=>13===e.length&&r.test(e);class n extends Error{}t.InvalidTidError=n},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=a,t.array=c,t.object=l,t.validateOneOf=d;const n=r(6078),o=r(3591),i=r(6740),s=r(125);function a(e,t,r,n){switch(r.type){case"object":return l(e,t,r,n);case"array":return c(e,t,r,n);case"blob":return(0,i.blob)(e,t,r,n);default:return(0,s.validate)(e,t,r,n)}}function c(e,t,r,o){if(!Array.isArray(o))return{success:!1,error:new n.ValidationError(`${t} must be an array`)};if("number"===typeof r.maxLength&&o.length>r.maxLength)return{success:!1,error:new n.ValidationError(`${t} must not have more than ${r.maxLength} elements`)};if("number"===typeof r.minLength&&o.length4&&void 0!==arguments[4]&&arguments[4];if("union"===r.type){if(!(0,n.isDiscriminatedObject)(o))return{success:!1,error:new n.ValidationError(`${t} must be an object which includes the "$type" property`)};if(!u(r.refs,o.$type))return r.closed?{success:!1,error:new n.ValidationError(`${t} $type must be one of ${r.refs.join(", ")}`)}:{success:!0,value:o};i=e.getDefOrThrow(o.$type)}else i="ref"===r.type?e.getDefOrThrow(r.ref):r;return s?l(e,t,i,o):a(e,t,i,o)}const u=(e,t)=>{const r=(0,o.toLexUri)(t);return!!e.includes(r)||(r.endsWith("#main")?e.includes(r.slice(0,-5)):!r.includes("#")&&e.includes(`${r}#main`))}},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oidcEntityTypeSchema=void 0;const n=r(1085);t.oidcEntityTypeSchema=n.z.enum(["userinfo","id_token"])},3547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"ActorNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.ActorNotFoundError=o},3548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isRecordBlob=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.repo.listMissingBlobs#recordBlob"===e.$type},t.validateRecordBlob=function(e){return o.lexicons.validate("com.atproto.repo.listMissingBlobs#recordBlob",e)};const n=r(2127),o=r(554)},3558:function(e,t,r){"use strict";var n,o,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserOAuthDatabase=void 0;const a=r(4472),c=r(1231);function l(e){if(!(e instanceof a.WebcryptoKey)||!e.kid)throw new Error("Invalid key object");return{keyId:e.kid,keyPair:e.cryptoKeyPair}}async function d(e){return a.WebcryptoKey.fromKeypair(e.keyPair,e.keyId)}const u=["state","session","didCache","dpopNonceCache","handleCache","authorizationServerMetadataCache","protectedResourceMetadataCache"];class p{constructor(e){n.set(this,void 0),o.set(this,void 0),i(this,n,c.DB.open(e?.name??"@atproto-oauth-client",[e=>{for(const t of u){e.createObjectStore(t,{autoIncrement:!0}).createIndex("expiresAt","expiresAt",{unique:!1})}}],{durability:e?.durability??"strict"}),"f"),i(this,o,setInterval((()=>{this.cleanup()}),e?.cleanupInterval??3e4),"f")}async run(e,t,r){const o=await s(this,n,"f");return await o.transaction([e],t,(t=>r(t.objectStore(e))))}createStore(e,t){let{encode:r,decode:n,expiresAt:o}=t;return{get:async t=>{const r=await this.run(e,"readonly",(e=>e.get(t)));if(void 0!==r){if(!(null!=r.expiresAt&&new Date(r.expiresAt)e.delete(t)))}},set:async(t,n)=>{const i={value:await r(n),expiresAt:o(n)?.toISOString()};await this.run(e,"readwrite",(e=>e.put(i,t)))},del:async t=>{await this.run(e,"readwrite",(e=>e.delete(t)))}}}getSessionStore(){return this.createStore("session",{expiresAt:e=>{let{tokenSet:t}=e;return t.refresh_token||null==t.expires_at?null:new Date(t.expires_at)},encode:e=>{let{dpopKey:t,...r}=e;return{...r,dpopKey:l(t)}},decode:async e=>{let{dpopKey:t,...r}=e;return{...r,dpopKey:await d(t)}}})}getStateStore(){return this.createStore("state",{expiresAt:e=>new Date(Date.now()+6e5),encode:e=>{let{dpopKey:t,...r}=e;return{...r,dpopKey:l(t)}},decode:async e=>{let{dpopKey:t,...r}=e;return{...r,dpopKey:await d(t)}}})}getDpopNonceCache(){return this.createStore("dpopNonceCache",{expiresAt:e=>new Date(Date.now()+6e5),encode:e=>e,decode:e=>e})}getDidCache(){return this.createStore("didCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getHandleCache(){return this.createStore("handleCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getAuthorizationServerMetadataCache(){return this.createStore("authorizationServerMetadataCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getProtectedResourceMetadataCache(){return this.createStore("protectedResourceMetadataCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}async cleanup(){const e=await s(this,n,"f");for(const t of u)await e.transaction([t],"readwrite",(e=>e.objectStore(t).index("expiresAt").deleteAll(IDBKeyRange.upperBound(Date.now()))))}async[(n=new WeakMap,o=new WeakMap,Symbol.asyncDispose)](){clearInterval(s(this,o,"f")),i(this,o,void 0,"f");const e=s(this,n,"f");i(this,n,Promise.reject(new Error("Database has been disposed")),"f"),s(this,n,"f").catch((()=>null));const t=await e.catch((()=>null));t&&await(t[Symbol.asyncDispose]||t[Symbol.dispose]).call(t)}}t.BrowserOAuthDatabase=p},3569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLexUri=function(e,t){if(e.split("#").length>2)throw new Error("Uri can only have one hash segment");if(e.startsWith("lex:"))return e;if(e.startsWith("#")){if(!t)throw new Error(`Unable to resolve uri without anchor: ${e}`);return`${t}${e}`}return`lex:${e}`},t.requiredPropertiesRefinement=function(e,t){if(void 0===e.required)return;if(!Array.isArray(e.required))return void t.addIssue({code:n.z.ZodIssueCode.invalid_type,received:typeof e.required,expected:"array"});if(void 0===e.properties)return void(e.required.length>0&&t.addIssue({code:n.z.ZodIssueCode.custom,message:"Required fields defined but no properties defined"}));for(const r of e.required)void 0===e.properties[r]&&t.addIssue({code:n.z.ZodIssueCode.custom,message:`Required field "${r}" not defined`})};const n=r(1085)},3592:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntimeImplementation=void 0;const n=r(4472),o=navigator.locks?.request?(e,t)=>navigator.locks.request(e,{mode:"exclusive"},(async()=>t())):void 0;t.BrowserRuntimeImplementation=class{constructor(){if(Object.defineProperty(this,"requestLock",{enumerable:!0,configurable:!0,writable:!0,value:o}),"object"!==typeof crypto||!crypto?.subtle)throw new Error("Crypto with CryptoSubtle is required. If running in a browser, make sure the current page is loaded over HTTPS.");this.requestLock||console.warn("Locks API not available. You should consider using a more recent browser.")}async createKey(e){return n.WebcryptoKey.generate(e)}getRandomValues(e){return crypto.getRandomValues(new Uint8Array(e))}async digest(e,t){let{name:r}=t;switch(r){case"sha256":case"sha384":case"sha512":{const t=await crypto.subtle.digest(`SHA-${r.slice(3)}`,e);return new Uint8Array(t)}default:throw new Error(`Unsupported digest algorithm: ${r}`)}}}},3660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3679:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JwtVerifyError=t.JwtCreateError=t.JwkError=t.ERR_JWT_VERIFY=t.ERR_JWT_CREATE=t.ERR_JWT_INVALID=t.ERR_JWK_NOT_FOUND=t.ERR_JWK_INVALID=t.ERR_JWKS_NO_MATCHING_KEY=void 0,t.ERR_JWKS_NO_MATCHING_KEY="ERR_JWKS_NO_MATCHING_KEY",t.ERR_JWK_INVALID="ERR_JWK_INVALID",t.ERR_JWK_NOT_FOUND="ERR_JWK_NOT_FOUND",t.ERR_JWT_INVALID="ERR_JWT_INVALID",t.ERR_JWT_CREATE="ERR_JWT_CREATE",t.ERR_JWT_VERIFY="ERR_JWT_VERIFY";class r extends TypeError{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"JWK error",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.ERR_JWK_INVALID;super(e,arguments.length>2?arguments[2]:void 0),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:r})}}t.JwkError=r;class n extends Error{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unable to create JWT",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.ERR_JWT_CREATE;super(e,arguments.length>2?arguments[2]:void 0),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:r})}static from(e,t,o){return e instanceof n?e:new n(o,e instanceof r?e.code:t,{cause:e})}}t.JwtCreateError=n;class o extends Error{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Invalid JWT",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.ERR_JWT_VERIFY;super(e,arguments.length>2?arguments[2]:void 0),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:r})}static from(e,t,n){return e instanceof o?e:new o(n,e instanceof r?e.code:t,{cause:e})}}t.JwtVerifyError=o},3690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2559),o=r(1308);t.default=(e,t)=>{let r;switch(e.code){case o.ZodIssueCode.invalid_type:r=e.received===n.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,n.util.jsonStringifyReplacer)}`;break;case o.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${n.util.joinValues(e.keys,", ")}`;break;case o.ZodIssueCode.invalid_union:r="Invalid input";break;case o.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${n.util.joinValues(e.options)}`;break;case o.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${n.util.joinValues(e.options)}, received '${e.received}'`;break;case o.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case o.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case o.ZodIssueCode.invalid_date:r="Invalid date";break;case o.ZodIssueCode.invalid_string:"object"===typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"===typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:n.util.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.ZodIssueCode.custom:r="Invalid input";break;case o.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case o.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case o.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,n.util.assertNever(e)}return{message:r}}},3691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCacheMemory=void 0;const n=r(373),o=36e5;class i extends n.SimpleStoreMemory{constructor(e){super(null==e?.max?{ttl:o,maxSize:52428800,...e}:{ttl:o,...e})}}t.DidCacheMemory=i},3735:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3739:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.feed.generator#main"===e.$type||"app.bsky.feed.generator"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.feed.generator#main",e)};const n=r(2127),o=r(554)},3831:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3868:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},3892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RichText=t.RichTextSegment=void 0;const n=r(1247),o=r(1757),i=r(5733),s=r(5305);class a{constructor(e,t){Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"facet",{enumerable:!0,configurable:!0,writable:!0,value:t})}get link(){const e=this.facet?.features.find(n.AppBskyRichtextFacet.isLink);if(n.AppBskyRichtextFacet.isLink(e))return e}isLink(){return!!this.link}get mention(){const e=this.facet?.features.find(n.AppBskyRichtextFacet.isMention);if(n.AppBskyRichtextFacet.isMention(e))return e}isMention(){return!!this.mention}get tag(){const e=this.facet?.features.find(n.AppBskyRichtextFacet.isTag);if(n.AppBskyRichtextFacet.isTag(e))return e}isTag(){return!!this.tag}}t.RichTextSegment=a;class c{constructor(e,t){Object.defineProperty(this,"unicodeText",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"facets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.unicodeText=new s.UnicodeString(e.text),this.facets=e.facets,!this.facets?.length&&e.entities?.length&&(this.facets=function(e,t){const r=[];for(const n of t)"link"===n.type?r.push({$type:"app.bsky.richtext.facet",index:{byteStart:e.utf16IndexToUtf8Index(n.index.start),byteEnd:e.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:n.value}]}):"mention"===n.type&&r.push({$type:"app.bsky.richtext.facet",index:{byteStart:e.utf16IndexToUtf8Index(n.index.start),byteEnd:e.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#mention",did:n.value}]});return r}(this.unicodeText,e.entities)),this.facets&&(this.facets=this.facets.filter(d).sort(l)),t?.cleanNewlines&&(0,i.sanitizeRichText)(this,{cleanNewlines:!0}).copyInto(this)}get text(){return this.unicodeText.toString()}get length(){return this.unicodeText.length}get graphemeLength(){return this.unicodeText.graphemeLength}clone(){return new c({text:this.unicodeText.utf16,facets:u(this.facets)})}copyInto(e){e.unicodeText=this.unicodeText,e.facets=u(this.facets)}*segments(){const e=this.facets||[];if(!e.length)return void(yield new a(this.unicodeText.utf16));let t=0,r=0;do{const n=e[r];if(tn.index.byteStart){r++;continue}if(n.index.byteStart=n.index.byteStart&&e=n.index.byteEnd?(n.index.byteStart=0,n.index.byteEnd=0):e>n.index.byteEnd||(e>n.index.byteStart&&e<=n.index.byteEnd&&t>n.index.byteEnd?n.index.byteEnd=e:e>=n.index.byteStart&&t<=n.index.byteEnd?n.index.byteEnd-=r:e=n.index.byteStart&&t<=n.index.byteEnd?(n.index.byteStart=e,n.index.byteEnd-=r):te.index.byteStarte?.data.did)).catch((e=>{})).then((e=>{o.did=e||""})));await Promise.allSettled(t),this.facets.sort(l)}}detectFacetsWithoutResolution(){this.facets=(0,o.detectFacets)(this.unicodeText),this.facets&&this.facets.sort(l)}}t.RichText=c;const l=(e,t)=>e.index.byteStart-t.index.byteStart,d=e=>e.index.byteStart<=e.index.byteEnd;function u(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}},3910:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.feed.postgate#main"===e.$type||"app.bsky.feed.postgate"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.feed.postgate#main",e)},t.isDisableRule=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.postgate#disableRule"===e.$type},t.validateDisableRule=function(e){return o.lexicons.validate("app.bsky.feed.postgate#disableRule",e)};const n=r(2127),o=r(554)},3942:function(e,t,r){"use strict";var n,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Agent=void 0;const s=i(r(1196)),a=r(8021),c=r(6406),l=r(1510),d=r(1247),u=r(554),p=r(5812),f=r(8268),h=r(6818),y=r(3167),m={hideReplies:!1,hideRepliesByUnfollowed:!0,hideRepliesByLikeCount:0,hideReposts:!1,hideQuotePosts:!1},g={sort:"hotness",prioritizeFollowedUsers:!0};class b extends l.XrpcClient{static configure(e){e.appLabelers&&(this.appLabelers=e.appLabelers.map(y.asDid))}get xrpc(){return this}constructor(e){const t="string"===typeof e||e instanceof URL?{did:void 0,fetchHandler:(0,l.buildFetchHandler)(e)}:e;super(((e,t)=>{const r=new Headers(t?.headers);return this.proxy&&!r.has("atproto-proxy")&&r.set("atproto-proxy",this.proxy),r.set("atproto-accept-labelers",[...this.appLabelers.map((e=>`${e};redact`)),...this.labelers,r.get("atproto-accept-labelers")?.trim()].filter(Boolean).join(", ")),this.sessionManager.fetchHandler(e,{...t,headers:r})}),u.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:new d.ComNS(this)}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:new d.AppNS(this)}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:new d.ChatNS(this)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:new d.ToolsNS(this)}),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labelers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"proxy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"uploadBlob",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.com.atproto.repo.uploadBlob(e,t)}),Object.defineProperty(this,"resolveHandle",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.com.atproto.identity.resolveHandle(e,t)}),Object.defineProperty(this,"updateHandle",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.com.atproto.identity.updateHandle(e,t)}),Object.defineProperty(this,"createModerationReport",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.com.atproto.moderation.createReport(e,t)}),Object.defineProperty(this,"getTimeline",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getTimeline(e,t)}),Object.defineProperty(this,"getAuthorFeed",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getAuthorFeed(e,t)}),Object.defineProperty(this,"getActorLikes",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getActorLikes(e,t)}),Object.defineProperty(this,"getPostThread",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getPostThread(e,t)}),Object.defineProperty(this,"getPost",{enumerable:!0,configurable:!0,writable:!0,value:e=>this.app.bsky.feed.post.get(e)}),Object.defineProperty(this,"getPosts",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getPosts(e,t)}),Object.defineProperty(this,"getLikes",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getLikes(e,t)}),Object.defineProperty(this,"getRepostedBy",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.feed.getRepostedBy(e,t)}),Object.defineProperty(this,"getFollows",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.graph.getFollows(e,t)}),Object.defineProperty(this,"getFollowers",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.graph.getFollowers(e,t)}),Object.defineProperty(this,"getProfile",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.actor.getProfile(e,t)}),Object.defineProperty(this,"getProfiles",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.actor.getProfiles(e,t)}),Object.defineProperty(this,"getSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.actor.getSuggestions(e,t)}),Object.defineProperty(this,"searchActors",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.actor.searchActors(e,t)}),Object.defineProperty(this,"searchActorsTypeahead",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.actor.searchActorsTypeahead(e,t)}),Object.defineProperty(this,"listNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.notification.listNotifications(e,t)}),Object.defineProperty(this,"countUnreadNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.notification.getUnreadCount(e,t)}),Object.defineProperty(this,"getLabelers",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>this.app.bsky.labeler.getServices(e,t)}),n.set(this,new s.default),this.sessionManager=t}clone(){return this.copyInto(new b(this.sessionManager))}copyInto(e){e.configureLabelers(this.labelers),e.configureProxy(this.proxy??null),e.clearHeaders();for(const[t,r]of this.headers)e.setHeader(t,r);return e}withProxy(e,t){const r=this.clone();return r.configureProxy(`${(0,y.asDid)(t)}#${e}`),r}get appLabelers(){return this.constructor.appLabelers}configureLabelers(e){this.labelers=e.map(y.asDid)}configureLabelersHeader(e){this.configureLabelers(e.filter(y.isDid))}configureProxy(e){if(null===e)this.proxy=void 0;else{if(!(0,y.isDid)(e))throw new TypeError("Invalid proxy DID");this.proxy=e}}configureProxyHeader(e,t){(0,y.isDid)(t)&&this.configureProxy(`${t}#${e}`)}get did(){return this.sessionManager.did}get accountDid(){return this.assertDid}get assertDid(){return this.assertAuthenticated(),this.did}assertAuthenticated(){if(!this.did)throw new Error("Not logged in")}get api(){return this}async getLabelDefinitions(e){const t=[...this.appLabelers];var r;(r=e)&&"object"===typeof r&&"moderationPrefs"in r&&w(r.moderationPrefs)?t.push(...e.moderationPrefs.labelers.map((e=>e.did))):w(e)?t.push(...e.labelers.map((e=>e.did))):t.push(...e);const n=await this.getLabelers({dids:t,detailed:!0}),o={};if(n.data)for(const i of n.data.views)o[i.creator.did]=(0,f.interpretLabelValueDefinitions)(i);return o}async post(e){return e.createdAt||(e.createdAt=(new Date).toISOString()),this.app.bsky.feed.post.create({repo:this.accountDid},e)}async deletePost(e){this.assertAuthenticated();const t=new c.AtUri(e);return this.app.bsky.feed.post.delete({repo:t.hostname,rkey:t.rkey})}async like(e,t){return this.app.bsky.feed.like.create({repo:this.accountDid},{subject:{uri:e,cid:t},createdAt:(new Date).toISOString()})}async deleteLike(e){this.assertAuthenticated();const t=new c.AtUri(e);return this.app.bsky.feed.like.delete({repo:t.hostname,rkey:t.rkey})}async repost(e,t){return this.app.bsky.feed.repost.create({repo:this.accountDid},{subject:{uri:e,cid:t},createdAt:(new Date).toISOString()})}async deleteRepost(e){this.assertAuthenticated();const t=new c.AtUri(e);return this.app.bsky.feed.repost.delete({repo:t.hostname,rkey:t.rkey})}async follow(e){return this.app.bsky.graph.follow.create({repo:this.accountDid},{subject:e,createdAt:(new Date).toISOString()})}async deleteFollow(e){this.assertAuthenticated();const t=new c.AtUri(e);return this.app.bsky.graph.follow.delete({repo:t.hostname,rkey:t.rkey})}async upsertProfile(e){const t=this.accountDid;let r=5;for(;r>=0;){const o=await this.com.atproto.repo.getRecord({repo:t,collection:"app.bsky.actor.profile",rkey:"self"}).catch((e=>{})),i=await e(o?.data.value);i&&(i.$type="app.bsky.actor.profile");const s=d.AppBskyActorProfile.validateRecord(i);if(!s.success)throw s.error;try{await this.com.atproto.repo.putRecord({repo:t,collection:"app.bsky.actor.profile",rkey:"self",record:i,swapRecord:o?.data.cid||null})}catch(n){if(r>0&&n instanceof d.ComAtprotoRepoPutRecord.InvalidSwapError){r--;continue}throw n}break}}async mute(e){return this.app.bsky.graph.muteActor({actor:e})}async unmute(e){return this.app.bsky.graph.unmuteActor({actor:e})}async muteModList(e){return this.app.bsky.graph.muteActorList({list:e})}async unmuteModList(e){return this.app.bsky.graph.unmuteActorList({list:e})}async blockModList(e){return this.app.bsky.graph.listblock.create({repo:this.accountDid},{subject:e,createdAt:(new Date).toISOString()})}async unblockModList(e){const t=this.accountDid,r=await this.app.bsky.graph.getList({list:e,limit:1}),n=r.data.list.viewer?.blocked;if(n){const{rkey:e}=new c.AtUri(n);return this.app.bsky.graph.listblock.delete({repo:t,rkey:e})}}async updateSeenNotifications(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).toISOString();return this.app.bsky.notification.updateSeen({seenAt:e})}async getPreferences(){const e={feeds:{saved:void 0,pinned:void 0},savedFeeds:void 0,feedViewPrefs:{home:{...m}},threadViewPrefs:{...g},moderationPrefs:{adultContentEnabled:!1,labels:{...h.DEFAULT_LABEL_SETTINGS},labelers:this.appLabelers.map((e=>({did:e,labels:{}}))),mutedWords:[],hiddenPosts:[]},birthDate:void 0,interests:{tags:[]},bskyAppState:{queuedNudges:[],activeProgressGuide:void 0,nuxs:[]},postInteractionSettings:{threadgateAllowRules:void 0,postgateEmbeddingRules:void 0}},t=await this.app.bsky.actor.getPreferences({}),r=[];for(const n of t.data.preferences)if(d.AppBskyActorDefs.isAdultContentPref(n)&&d.AppBskyActorDefs.validateAdultContentPref(n).success)e.moderationPrefs.adultContentEnabled=n.enabled;else if(d.AppBskyActorDefs.isContentLabelPref(n)&&d.AppBskyActorDefs.validateContentLabelPref(n).success){const e=v(n);r.push(e)}else if(d.AppBskyActorDefs.isLabelersPref(n)&&d.AppBskyActorDefs.validateLabelersPref(n).success)e.moderationPrefs.labelers=this.appLabelers.map((e=>({did:e,labels:{}}))).concat(n.labelers.map((e=>({...e,labels:{}}))));else if(d.AppBskyActorDefs.isSavedFeedsPrefV2(n)&&d.AppBskyActorDefs.validateSavedFeedsPrefV2(n).success)e.savedFeeds=n.items;else if(d.AppBskyActorDefs.isSavedFeedsPref(n)&&d.AppBskyActorDefs.validateSavedFeedsPref(n).success)e.feeds.saved=n.saved,e.feeds.pinned=n.pinned;else if(d.AppBskyActorDefs.isPersonalDetailsPref(n)&&d.AppBskyActorDefs.validatePersonalDetailsPref(n).success)n.birthDate&&(e.birthDate=new Date(n.birthDate));else if(d.AppBskyActorDefs.isFeedViewPref(n)&&d.AppBskyActorDefs.validateFeedViewPref(n).success){const{$type:t,feed:r,...o}=n;e.feedViewPrefs[n.feed]={...m,...o}}else if(d.AppBskyActorDefs.isThreadViewPref(n)&&d.AppBskyActorDefs.validateThreadViewPref(n).success){const{$type:t,...r}=n;e.threadViewPrefs={...e.threadViewPrefs,...r}}else if(d.AppBskyActorDefs.isInterestsPref(n)&&d.AppBskyActorDefs.validateInterestsPref(n).success){const{$type:t,...r}=n;e.interests={...e.interests,...r}}else if(d.AppBskyActorDefs.isMutedWordsPref(n)&&d.AppBskyActorDefs.validateMutedWordsPref(n).success){const{$type:t,...r}=n;e.moderationPrefs.mutedWords=r.items,e.moderationPrefs.mutedWords.length&&(e.moderationPrefs.mutedWords=e.moderationPrefs.mutedWords.map((e=>(e.actorTarget=e.actorTarget||"all",e))))}else if(d.AppBskyActorDefs.isHiddenPostsPref(n)&&d.AppBskyActorDefs.validateHiddenPostsPref(n).success){const{$type:t,...r}=n;e.moderationPrefs.hiddenPosts=r.items}else if(d.AppBskyActorDefs.isBskyAppStatePref(n)&&d.AppBskyActorDefs.validateBskyAppStatePref(n).success){const{$type:t,...r}=n;e.bskyAppState.queuedNudges=r.queuedNudges||[],e.bskyAppState.activeProgressGuide=r.activeProgressGuide,e.bskyAppState.nuxs=r.nuxs||[]}else d.AppBskyActorDefs.isPostInteractionSettingsPref(n)&&d.AppBskyActorDefs.validatePostInteractionSettingsPref(n).success&&(e.postInteractionSettings.threadgateAllowRules=n.threadgateAllowRules,e.postInteractionSettings.postgateEmbeddingRules=n.postgateEmbeddingRules);if(null==e.savedFeeds){const{saved:t,pinned:r}=e.feeds;if(t&&r){const n=new Map;n.set("timeline",{id:a.TID.nextStr(),type:"timeline",value:"following",pinned:!0});for(const e of r){const t=(0,y.getSavedFeedType)(e);"unknown"!==t&&n.set(e,{id:a.TID.nextStr(),type:t,value:e,pinned:!0})}for(const e of t)if(!n.has(e)){const t=(0,y.getSavedFeedType)(e);if("unknown"===t)continue;n.set(e,{id:a.TID.nextStr(),type:t,value:e,pinned:!1})}e.savedFeeds=Array.from(n.values())}else e.savedFeeds=[{id:a.TID.nextStr(),type:"timeline",value:"following",pinned:!0}];await this.overwriteSavedFeeds(e.savedFeeds)}for(const n of r)if(n.labelerDid){const t=e.moderationPrefs.labelers.find((e=>e.did===n.labelerDid));if(!t)continue;t.labels[n.label]=n.visibility}else e.moderationPrefs.labels[n.label]=n.visibility;return e.moderationPrefs.labels=function(e){const t={...e},r={gore:"graphic-media",nsfw:"porn",suggestive:"sexual"};for(const n in t){const e=r[n];e&&(t[e]=t[n])}return t}(e.moderationPrefs.labels),this.configureLabelers(E(t.data.preferences)),e}async overwriteSavedFeeds(e){e.forEach(y.validateSavedFeed);const t=new Map;return e.forEach((e=>{t.has(e.id)&&t.delete(e.id),t.set(e.id,e)})),this.updateSavedFeedsV2Preferences((()=>Array.from(t.values())))}async updateSavedFeeds(e){return e.map(y.validateSavedFeed),this.updateSavedFeedsV2Preferences((t=>t.map((t=>{const r=e.find((e=>t.id===e.id));return r?{...t,pinned:r.pinned}:t}))))}async addSavedFeeds(e){const t=e.map((e=>({...e,id:a.TID.nextStr()})));return t.forEach(y.validateSavedFeed),this.updateSavedFeedsV2Preferences((e=>[...e,...t]))}async removeSavedFeeds(e){return this.updateSavedFeedsV2Preferences((t=>[...t.filter((t=>!e.find((e=>t.id===e))))]))}async setSavedFeeds(e,t){return this.updateFeedPreferences((()=>({saved:e,pinned:t})))}async addSavedFeed(e){return this.updateFeedPreferences(((t,r)=>({saved:[...t.filter((t=>t!==e)),e],pinned:r})))}async removeSavedFeed(e){return this.updateFeedPreferences(((t,r)=>({saved:t.filter((t=>t!==e)),pinned:r.filter((t=>t!==e))})))}async addPinnedFeed(e){return this.updateFeedPreferences(((t,r)=>({saved:[...t.filter((t=>t!==e)),e],pinned:[...r.filter((t=>t!==e)),e]})))}async removePinnedFeed(e){return this.updateFeedPreferences(((t,r)=>({saved:t,pinned:r.filter((t=>t!==e))})))}async setAdultContentEnabled(e){await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isAdultContentPref(e)&&d.AppBskyActorDefs.validateAdultContentPref(e).success));return r?r.enabled=e:r={$type:"app.bsky.actor.defs#adultContentPref",enabled:e},t.filter((e=>!d.AppBskyActorDefs.isAdultContentPref(e))).concat([r])}))}async setContentLabelPref(e,t,r){r&&(0,c.ensureValidDid)(r),await this.updatePreferences((n=>{let o,i=n.findLast((t=>d.AppBskyActorDefs.isContentLabelPref(t)&&d.AppBskyActorDefs.validateContentLabelPref(t).success&&t.label===e&&t.labelerDid===r));if(i?i.visibility=t:i={$type:"app.bsky.actor.defs#contentLabelPref",label:e,labelerDid:r,visibility:t},d.AppBskyActorDefs.isContentLabelPref(i)&&!i.labelerDid){const e={"graphic-media":"gore",porn:"nsfw",sexual:"suggestive"}[i.label];e&&(o=n.findLast((t=>d.AppBskyActorDefs.isContentLabelPref(t)&&d.AppBskyActorDefs.validateContentLabelPref(t).success&&t.label===e&&void 0===t.labelerDid)),o?o.visibility=t:o={$type:"app.bsky.actor.defs#contentLabelPref",label:e,labelerDid:void 0,visibility:t})}return n.filter((t=>!d.AppBskyActorDefs.isContentLabelPref(t)||!(t.label===e&&t.labelerDid===r))).concat([i]).filter((e=>!o||(!d.AppBskyActorDefs.isContentLabelPref(e)||!(e.label===o.label&&void 0===e.labelerDid)))).concat(o?[o]:[])}))}async addLabeler(e){const t=await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isLabelersPref(e)&&d.AppBskyActorDefs.validateLabelersPref(e).success));if(r||(r={$type:"app.bsky.actor.defs#labelersPref",labelers:[]}),d.AppBskyActorDefs.isLabelersPref(r)){let t=r.labelers.find((t=>t.did===e));t||(t={did:e},r.labelers.push(t))}return t.filter((e=>!d.AppBskyActorDefs.isLabelersPref(e))).concat([r])}));this.configureLabelers(E(t))}async removeLabeler(e){const t=await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isLabelersPref(e)&&d.AppBskyActorDefs.validateLabelersPref(e).success));return r||(r={$type:"app.bsky.actor.defs#labelersPref",labelers:[]}),d.AppBskyActorDefs.isLabelersPref(r)&&(r.labelers=r.labelers.filter((t=>t.did!==e))),t.filter((e=>!d.AppBskyActorDefs.isLabelersPref(e))).concat([r])}));this.configureLabelers(E(t))}async setPersonalDetails(e){let{birthDate:t}=e;t=t instanceof Date?t.toISOString():t,await this.updatePreferences((e=>{let r=e.findLast((e=>d.AppBskyActorDefs.isPersonalDetailsPref(e)&&d.AppBskyActorDefs.validatePersonalDetailsPref(e).success));return r?r.birthDate=t:r={$type:"app.bsky.actor.defs#personalDetailsPref",birthDate:t},e.filter((e=>!d.AppBskyActorDefs.isPersonalDetailsPref(e))).concat([r])}))}async setFeedViewPrefs(e,t){await this.updatePreferences((r=>{const n=r.findLast((t=>d.AppBskyActorDefs.isFeedViewPref(t)&&d.AppBskyActorDefs.validateFeedViewPref(t).success&&t.feed===e));return n&&(t={...n,...t}),r.filter((r=>!d.AppBskyActorDefs.isFeedViewPref(t)||r.feed!==e)).concat([{...t,$type:"app.bsky.actor.defs#feedViewPref",feed:e}])}))}async setThreadViewPrefs(e){await this.updatePreferences((t=>{const r=t.findLast((e=>d.AppBskyActorDefs.isThreadViewPref(e)&&d.AppBskyActorDefs.validateThreadViewPref(e).success));return r&&(e={...r,...e}),t.filter((e=>!d.AppBskyActorDefs.isThreadViewPref(e))).concat([{...e,$type:"app.bsky.actor.defs#threadViewPref"}])}))}async setInterestsPref(e){await this.updatePreferences((t=>{const r=t.findLast((e=>d.AppBskyActorDefs.isInterestsPref(e)&&d.AppBskyActorDefs.validateInterestsPref(e).success));return r&&(e={...r,...e}),t.filter((e=>!d.AppBskyActorDefs.isInterestsPref(e))).concat([{...e,$type:"app.bsky.actor.defs#interestsPref"}])}))}async addMutedWord(e){const t=(0,y.sanitizeMutedWordValue)(e.value);t&&await this.updatePreferences((r=>{let n=r.findLast((e=>d.AppBskyActorDefs.isMutedWordsPref(e)&&d.AppBskyActorDefs.validateMutedWordsPref(e).success));const o={id:a.TID.nextStr(),value:t,targets:e.targets||[],actorTarget:e.actorTarget||"all",expiresAt:e.expiresAt||void 0};return n&&d.AppBskyActorDefs.isMutedWordsPref(n)?(n.items.push(o),n.items=R(n.items)):n={items:[o]},r.filter((e=>!d.AppBskyActorDefs.isMutedWordsPref(e))).concat([{...n,$type:"app.bsky.actor.defs#mutedWordsPref"}])}))}async addMutedWords(e){await Promise.all(e.map((e=>this.addMutedWord(e))))}async upsertMutedWords(e){await this.addMutedWords(e)}async updateMutedWord(e){await this.updatePreferences((t=>{const r=t.findLast((e=>d.AppBskyActorDefs.isMutedWordsPref(e)&&d.AppBskyActorDefs.validateMutedWordsPref(e).success));return r&&d.AppBskyActorDefs.isMutedWordsPref(r)?(r.items=r.items.map((t=>{if(A(t,e)){const r={...t,...e};return{id:t.id||a.TID.nextStr(),value:(0,y.sanitizeMutedWordValue)(r.value)||t.value,targets:r.targets||[],actorTarget:r.actorTarget||"all",expiresAt:r.expiresAt||void 0}}return t})),r.items=R(r.items),t.filter((e=>!d.AppBskyActorDefs.isMutedWordsPref(e))).concat([{...r,$type:"app.bsky.actor.defs#mutedWordsPref"}])):t}))}async removeMutedWord(e){await this.updatePreferences((t=>{const r=t.findLast((e=>d.AppBskyActorDefs.isMutedWordsPref(e)&&d.AppBskyActorDefs.validateMutedWordsPref(e).success));if(r&&d.AppBskyActorDefs.isMutedWordsPref(r)){for(let t=0;t!d.AppBskyActorDefs.isMutedWordsPref(e))).concat([{...r,$type:"app.bsky.actor.defs#mutedWordsPref"}])}return t}))}async removeMutedWords(e){await Promise.all(e.map((e=>this.removeMutedWord(e))))}async hidePost(e){await this.updateHiddenPost(e,"hide")}async unhidePost(e){await this.updateHiddenPost(e,"unhide")}async bskyAppQueueNudges(e){await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isBskyAppStatePref(e)&&d.AppBskyActorDefs.validateBskyAppStatePref(e).success));return r=r||{},e=Array.isArray(e)?e:[e],r.queuedNudges=(r.queuedNudges||[]).concat(e),t.filter((e=>!d.AppBskyActorDefs.isBskyAppStatePref(e))).concat([{...r,$type:"app.bsky.actor.defs#bskyAppStatePref"}])}))}async bskyAppDismissNudges(e){await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isBskyAppStatePref(e)&&d.AppBskyActorDefs.validateBskyAppStatePref(e).success));return r=r||{},e=Array.isArray(e)?e:[e],r.queuedNudges=(r.queuedNudges||[]).filter((t=>!e.includes(t))),t.filter((e=>!d.AppBskyActorDefs.isBskyAppStatePref(e))).concat([{...r,$type:"app.bsky.actor.defs#bskyAppStatePref"}])}))}async bskyAppSetActiveProgressGuide(e){if(e&&!d.AppBskyActorDefs.validateBskyAppProgressGuide(e).success)throw new Error("Invalid progress guide");await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isBskyAppStatePref(e)&&d.AppBskyActorDefs.validateBskyAppStatePref(e).success));return r=r||{},r.activeProgressGuide=e,t.filter((e=>!d.AppBskyActorDefs.isBskyAppStatePref(e))).concat([{...r,$type:"app.bsky.actor.defs#bskyAppStatePref"}])}))}async bskyAppUpsertNux(e){(0,y.validateNux)(e),await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isBskyAppStatePref(e)&&d.AppBskyActorDefs.validateBskyAppStatePref(e).success));r=r||{},r.nuxs=r.nuxs||[];const n=r.nuxs?.find((t=>t.id===e.id));let o;return o=n?{id:n.id,completed:e.completed,data:e.data,expiresAt:e.expiresAt}:e,r.nuxs=r.nuxs.filter((t=>t.id!==e.id)).concat(o),t.filter((e=>!d.AppBskyActorDefs.isBskyAppStatePref(e))).concat([{...r,$type:"app.bsky.actor.defs#bskyAppStatePref"}])}))}async bskyAppRemoveNuxs(e){await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isBskyAppStatePref(e)&&d.AppBskyActorDefs.validateBskyAppStatePref(e).success));return r=r||{},r.nuxs=(r.nuxs||[]).filter((t=>!e.includes(t.id))),t.filter((e=>!d.AppBskyActorDefs.isBskyAppStatePref(e))).concat([{...r,$type:"app.bsky.actor.defs#bskyAppStatePref"}])}))}async setPostInteractionSettings(e){if(!d.AppBskyActorDefs.validatePostInteractionSettingsPref(e).success)throw new Error("Invalid post interaction settings");await this.updatePreferences((t=>{let r=t.findLast((e=>d.AppBskyActorDefs.isPostInteractionSettingsPref(e)&&d.AppBskyActorDefs.validatePostInteractionSettingsPref(e).success));return r||(r={threadgateAllowRules:void 0,postgateEmbeddingRules:void 0}),r.threadgateAllowRules=e.threadgateAllowRules,r.postgateEmbeddingRules=e.postgateEmbeddingRules,t.filter((e=>!d.AppBskyActorDefs.isPostInteractionSettingsPref(e))).concat([{...r,$type:"app.bsky.actor.defs#postInteractionSettingsPref"}])}))}async updatePreferences(e){try{await o(this,n,"f").acquireAsync();const t=await this.app.bsky.actor.getPreferences({}),r=e(t.data.preferences);return!1===r?t.data.preferences:(await this.app.bsky.actor.putPreferences({preferences:r}),r)}finally{o(this,n,"f").release()}}async updateHiddenPost(e,t){await this.updatePreferences((r=>{let n=r.findLast((e=>d.AppBskyActorDefs.isHiddenPostsPref(e)&&d.AppBskyActorDefs.validateHiddenPostsPref(e).success));return n&&d.AppBskyActorDefs.isHiddenPostsPref(n)?n.items="hide"===t?Array.from(new Set([...n.items,e])):n.items.filter((t=>t!==e)):"hide"===t&&(n={$type:"app.bsky.actor.defs#hiddenPostsPref",items:[e]}),r.filter((e=>!d.AppBskyActorDefs.isInterestsPref(e))).concat([{...n,$type:"app.bsky.actor.defs#hiddenPostsPref"}])}))}async updateFeedPreferences(e){let t;return await this.updatePreferences((r=>{let n=r.findLast((e=>d.AppBskyActorDefs.isSavedFeedsPref(e)&&d.AppBskyActorDefs.validateSavedFeedsPref(e).success));return n?(t=e(n.saved,n.pinned),n.saved=t.saved,n.pinned=t.pinned):(t=e([],[]),n={$type:"app.bsky.actor.defs#savedFeedsPref",saved:t.saved,pinned:t.pinned}),r.filter((e=>!d.AppBskyActorDefs.isSavedFeedsPref(e))).concat([n])})),t}async updateSavedFeedsV2Preferences(e){let t=[];return await this.updatePreferences((r=>{let n=r.findLast((e=>d.AppBskyActorDefs.isSavedFeedsPrefV2(e)&&d.AppBskyActorDefs.validateSavedFeedsPrefV2(e).success)),o=r.findLast((e=>d.AppBskyActorDefs.isSavedFeedsPref(e)&&d.AppBskyActorDefs.validateSavedFeedsPref(e).success));n?(t=e(n.items),n={...n,items:t}):(t=e([]),n={$type:"app.bsky.actor.defs#savedFeedsPrefV2",items:t});const i=n.items.filter((e=>e.pinned)),s=n.items.filter((e=>!e.pinned));n.items=i.concat(s);let a=r.filter((e=>!d.AppBskyActorDefs.isSavedFeedsPrefV2(e))).concat(n);if(o){const{saved:e,pinned:t}=o,r=(0,y.savedFeedsToUriArrays)(n.items.filter((e=>["feed","list"].includes(e.type))));o={...o,saved:Array.from(new Set([...e,...r.saved])),pinned:Array.from(new Set([...t,...r.pinned]))},a=a.filter((e=>!d.AppBskyActorDefs.isSavedFeedsPref(e))).concat(o)}return a})),t}}function v(e){let t=e.visibility;return"show"===t&&(t="ignore"),{...e,visibility:t}}function E(e){const t=e.findLast((e=>d.AppBskyActorDefs.isLabelersPref(e)&&d.AppBskyActorDefs.validateLabelersPref(e).success));let r=[];return t&&(r=t.labelers.map((e=>e.did))),r}function w(e){return e&&"object"===typeof e&&"labelers"in e}function R(e){return e.map((e=>({...e,id:e.id||a.TID.nextStr()})))}function A(e,t){const r=e.id,n=r&&r===t.id,o=!r&&e.value===t.value;return n||o}t.Agent=b,n=new WeakMap,Object.defineProperty(b,"appLabelers",{enumerable:!0,configurable:!0,writable:!0,value:[p.BSKY_LABELER_DID]})},4007:(e,t)=>{"use strict";function r(e,t){return!t&&e instanceof Request?e:new Request(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.toRequestTransformer=function(e){return function(t,n){return e.call(this,r(t,n))}},t.asRequest=r},4047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthRequestUriSchema=void 0;const n=r(1085);t.oauthRequestUriSchema=n.z.string()},4121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidResolverBase=void 0;const n=r(1085),o=r(2741),i=r(6211);t.DidResolverBase=class{constructor(e){Object.defineProperty(this,"methods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.methods=new Map(Object.entries(e))}async resolve(e,t){t?.signal?.throwIfAborted();const r=(0,o.extractDidMethod)(e),s=this.methods.get(r);if(!s)throw new o.DidError(e,"Unsupported DID method","did-method-invalid",400);try{const r=await s.resolve(e,t);if(r.id!==e)throw new o.DidError(e,`DID document id (${r.id}) does not match DID`,"did-document-id-mismatch",400);return r}catch(a){if(a instanceof i.FetchResponseError){const t=a.response.status>=500?502:a.response.status;throw new o.DidError(e,a.message,"did-fetch-error",t,a)}if(a instanceof i.FetchError)throw new o.DidError(e,a.message,"did-fetch-error",400,a);if(a instanceof n.ZodError)throw new o.DidError(e,a.message,"did-document-format-error",503,a);throw o.DidError.from(a,e)}}}},4122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemberAlreadyExistsError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"MemberAlreadyExists"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.MemberAlreadyExistsError=o},4123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLabelerView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.labeler.defs#labelerView"===e.$type},t.validateLabelerView=function(e){return o.lexicons.validate("app.bsky.labeler.defs#labelerView",e)},t.isLabelerViewDetailed=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.labeler.defs#labelerViewDetailed"===e.$type},t.validateLabelerViewDetailed=function(e){return o.lexicons.validate("app.bsky.labeler.defs#labelerViewDetailed",e)},t.isLabelerViewerState=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.labeler.defs#labelerViewerState"===e.$type},t.validateLabelerViewerState=function(e){return o.lexicons.validate("app.bsky.labeler.defs#labelerViewerState",e)},t.isLabelerPolicies=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.labeler.defs#labelerPolicies"===e.$type},t.validateLabelerPolicies=function(e){return o.lexicons.validate("app.bsky.labeler.defs#labelerPolicies",e)};const n=r(2127),o=r(554)},4133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSwapError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"InvalidSwap"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidSwapError=o},4135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateClientMetadata=function(e,t){if(e.jwks){if(!t)throw new TypeError("Keyset must not be provided when jwks is provided");for(const r of e.jwks.keys){if(!r.kid)throw new TypeError('Key must have a "kid" property');if(!t.has(r.kid))throw new TypeError(`Key with kid "${r.kid}" not found in keyset`)}}e.jwks||e.jwks_uri||!t?.size||(e={...e,jwks:t.toJSON()});const r=o.clientMetadataSchema.parse(e);r.client_id.startsWith("http:")?(0,n.assertOAuthLoopbackClientId)(r.client_id):(0,n.assertOAuthDiscoverableClientId)(r.client_id);const a=r.scope?.split(" ");if(!a?.includes("atproto"))throw new TypeError('Client metadata must include the "atproto" scope');if(!r.response_types.includes("code"))throw new TypeError('"response_types" must include "code"');if(!r.grant_types.includes("authorization_code"))throw new TypeError('"grant_types" must include "authorization_code"');const c=r[i];switch(c){case void 0:throw new TypeError(`${i} must be provided`);case"none":if(r[s])throw new TypeError(`${s} must not be provided when ${i} is "${c}"`);break;case"private_key_jwt":if(!t?.size)throw new TypeError(`A non-empty keyset must be provided when ${i} is "${c}"`);if(!r[s])throw new TypeError(`${s} must be provided when ${i} is "${c}"`);break;default:throw new TypeError(`Invalid "token_endpoint_auth_method" value: ${c}`)}return r};const n=r(8511),o=r(6138),i="token_endpoint_auth_method",s="token_endpoint_auth_signing_alg"},4166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema=void 0;const n=r(1085),o=r(6424),i=r(8924),s=r(4633);t.oauthAuthorizationServerMetadataSchema=n.z.object({issuer:i.oauthIssuerIdentifierSchema,claims_supported:n.z.array(n.z.string()).optional(),claims_locales_supported:n.z.array(n.z.string()).optional(),claims_parameter_supported:n.z.boolean().optional(),request_parameter_supported:n.z.boolean().optional(),request_uri_parameter_supported:n.z.boolean().optional(),require_request_uri_registration:n.z.boolean().optional(),scopes_supported:n.z.array(n.z.string()).optional(),subject_types_supported:n.z.array(n.z.string()).optional(),response_types_supported:n.z.array(n.z.string()).optional(),response_modes_supported:n.z.array(n.z.string()).optional(),grant_types_supported:n.z.array(n.z.string()).optional(),code_challenge_methods_supported:n.z.array(o.oauthCodeChallengeMethodSchema).min(1).optional(),ui_locales_supported:n.z.array(n.z.string()).optional(),id_token_signing_alg_values_supported:n.z.array(n.z.string()).optional(),display_values_supported:n.z.array(n.z.string()).optional(),request_object_signing_alg_values_supported:n.z.array(n.z.string()).optional(),authorization_response_iss_parameter_supported:n.z.boolean().optional(),authorization_details_types_supported:n.z.array(n.z.string()).optional(),request_object_encryption_alg_values_supported:n.z.array(n.z.string()).optional(),request_object_encryption_enc_values_supported:n.z.array(n.z.string()).optional(),jwks_uri:s.webUriSchema.optional(),authorization_endpoint:s.webUriSchema,token_endpoint:s.webUriSchema,token_endpoint_auth_methods_supported:n.z.array(n.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:n.z.array(n.z.string()).optional(),revocation_endpoint:s.webUriSchema.optional(),introspection_endpoint:s.webUriSchema.optional(),pushed_authorization_request_endpoint:s.webUriSchema.optional(),require_pushed_authorization_requests:n.z.boolean().optional(),userinfo_endpoint:s.webUriSchema.optional(),end_session_endpoint:s.webUriSchema.optional(),registration_endpoint:s.webUriSchema.optional(),dpop_signing_alg_values_supported:n.z.array(n.z.string()).optional(),protected_resources:n.z.array(s.webUriSchema).optional(),client_id_metadata_document_supported:n.z.boolean().optional()}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema.superRefine(((e,t)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&t.addIssue({code:n.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})})).superRefine(((e,t)=>{e.response_types_supported&&(e.response_types_supported.includes("code")||t.addIssue({code:n.z.ZodIssueCode.custom,message:'Response type "code" is required'}))}))},4192:(e,t,r)=>{"use strict";r.d(t,{aI:()=>n,au:()=>o,dI:()=>s,sH:()=>i});new Uint8Array(0);const n=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},i=e=>(new TextEncoder).encode(e),s=e=>(new TextDecoder).decode(e)},4202:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,m={};function g(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||h}function b(){}function v(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var E=v.prototype=new b;E.constructor=v,y(E,g.prototype),E.isPureReactComponent=!0;var w=Array.isArray,R=Object.prototype.hasOwnProperty,A={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var o,i={},s=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)R.call(t,o)&&!S.hasOwnProperty(o)&&(i[o]=t[o]);var c=arguments.length-2;if(1===c)i.children=n;else if(1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema=void 0,t.isOAuthClientIdDiscoverable=function(e){return t.oauthClientIdDiscoverableSchema.safeParse(e).success},t.isConventionalOAuthClientId=function(e){return t.conventionalOAuthClientIdSchema.safeParse(e).success},t.assertOAuthDiscoverableClientId=function(e){t.oauthClientIdDiscoverableSchema.parse(e)},t.parseOAuthDiscoverableClientId=function(e){return new URL(t.oauthClientIdDiscoverableSchema.parse(e))};const n=r(1085),o=r(4522),i=r(4633),s=r(6479);t.oauthClientIdDiscoverableSchema=n.z.intersection(o.oauthClientIdSchema,i.httpsUriSchema).superRefine(((e,t)=>{const r=new URL(e);return r.username||r.password?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):r.hash?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):"/"===r.pathname?(t.addIssue({code:n.z.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):r.pathname.endsWith("/")?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):(0,s.isHostnameIP)(r.hostname)?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):(0,s.extractUrlPath)(e)===r.pathname||(t.addIssue({code:n.z.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${r.href}", got "${e}")`}),!1)})),t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema.superRefine(((e,t)=>{const r=new URL(e);return r.port?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):r.search?(t.addIssue({code:n.z.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):"/oauth-client-metadata.json"===r.pathname||(t.addIssue({code:n.z.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1)}))},4225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthTokenTypeSchema=void 0;const n=r(1085);t.oauthTokenTypeSchema=n.z.union([n.z.string().regex(/^DPoP$/i).transform((()=>"DPoP")),n.z.string().regex(/^Bearer$/i).transform((()=>"Bearer"))])},4227:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.def=t.schema=void 0;const n=r(6571),o=r(1085),i=o.z.any().refine((e=>null!==n.CID.asCID(e)),{message:"Not a CID"}).transform((e=>n.CID.asCID(e))),s=o.z.object({version:o.z.literal(1),roots:o.z.array(i)});t.schema={cid:i,carHeader:s,bytes:o.z.instanceof(Uint8Array),string:o.z.string(),array:o.z.array(o.z.unknown()),map:o.z.record(o.z.string(),o.z.unknown()),unknown:o.z.unknown()},t.def={cid:{name:"cid",schema:t.schema.cid},carHeader:{name:"CAR header",schema:t.schema.carHeader},bytes:{name:"bytes",schema:t.schema.bytes},string:{name:"string",schema:t.schema.string},map:{name:"map",schema:t.schema.map},unknown:{name:"unknown",schema:t.schema.unknown}}},4295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENDED_PICTOGRAPHIC=t.CLUSTER_BREAK=void 0,function(e){e[e.CR=0]="CR",e[e.LF=1]="LF",e[e.CONTROL=2]="CONTROL",e[e.EXTEND=3]="EXTEND",e[e.REGIONAL_INDICATOR=4]="REGIONAL_INDICATOR",e[e.SPACINGMARK=5]="SPACINGMARK",e[e.L=6]="L",e[e.V=7]="V",e[e.T=8]="T",e[e.LV=9]="LV",e[e.LVT=10]="LVT",e[e.OTHER=11]="OTHER",e[e.PREPEND=12]="PREPEND",e[e.E_BASE=13]="E_BASE",e[e.E_MODIFIER=14]="E_MODIFIER",e[e.ZWJ=15]="ZWJ",e[e.GLUE_AFTER_ZWJ=16]="GLUE_AFTER_ZWJ",e[e.E_BASE_GAZ=17]="E_BASE_GAZ"}(t.CLUSTER_BREAK||(t.CLUSTER_BREAK={})),t.EXTENDED_PICTOGRAPHIC=101},4303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WellKnownHandleResolver=void 0;const n=r(1871);t.WellKnownHandleResolver=class{constructor(e){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=e?.fetch??globalThis.fetch}async resolve(e,t){const r=new URL("/.well-known/atproto-did",`https://${e}`);try{const e=await this.fetch.call(null,r,{cache:t?.noCache?"no-cache":void 0,signal:t?.signal,redirect:"error"}),o=(await e.text()).split("\n")[0].trim();return(0,n.isResolvedHandle)(o)?o:null}catch(o){return t?.signal?.throwIfAborted(),null}}}},4334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4343:function(e,t,r){"use strict";var n=this&&this.__addDisposableResource||function(e,t,r){if(null!==t&&void 0!==t){if("object"!==typeof t&&"function"!==typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!==typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t},o=this&&this.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}var n,o=0;return function e(){for(;n=t.stack.pop();)try{if(!n.async&&1===o)return o=0,t.stack.push(n),Promise.resolve().then(e);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(e,(function(t){return r(t),e()}))}else o|=1}catch(s){r(s)}if(1===o)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}}("function"===typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n});Object.defineProperty(t,"__esModule",{value:!0}),t.SessionGetter=void 0;const i=r(8917),s=r(7619),a=r(4619),c=r(2646),l=r(8261),d=r(6387);class u extends i.CachedGetter{constructor(e,t,r){super((async(e,n,o)=>{if(void 0===o){const t="The session was deleted by another process",r=new a.TokenRefreshError(e,t);throw this.dispatchEvent("deleted",{sub:e,cause:r}),r}const{dpopKey:i,tokenSet:s}=o;if(e!==s.sub)throw new a.TokenRefreshError(e,"Stored session sub mismatch");if(!s.refresh_token)throw new a.TokenRefreshError(e,"No refresh token available");const c=await t.fromIssuer(s.iss,i);n?.signal?.throwIfAborted();try{const t=await c.refresh(s);if(e!==t.sub)throw new a.TokenRefreshError(e,"Token set sub mismatch");return{dpopKey:i,tokenSet:t}}catch(d){if(d instanceof l.OAuthResponseError&&400===d.status&&"invalid_grant"===d.error){if(!r.hasImplementationLock){await new Promise((e=>setTimeout(e,1e3)));const t=await this.getStored(e);if(void 0===t){const t="The session was deleted by another process";throw new a.TokenRefreshError(e,t,{cause:d})}if(t.tokenSet.access_token!==s.access_token||t.tokenSet.refresh_token!==s.refresh_token)return t}const t=d.errorDescription??"The session was revoked";throw new a.TokenRefreshError(e,t,{cause:d})}throw d}}),e,{isStale:(e,t)=>{let{tokenSet:r}=t;return null!=r.expires_at&&new Date(r.expires_at).getTime(){let{tokenSet:o,dpopKey:i}=n;const s=await t.fromIssuer(o.iss,i);throw await s.revoke(o.refresh_token??o.access_token),e},deleteOnError:async e=>e instanceof a.TokenRefreshError||e instanceof c.TokenRevokedError||e instanceof s.TokenInvalidError}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"eventTarget",{enumerable:!0,configurable:!0,writable:!0,value:new d.CustomEventTarget})}addEventListener(e,t,r){this.eventTarget.addEventListener(e,t,r)}removeEventListener(e,t,r){this.eventTarget.removeEventListener(e,t,r)}dispatchEvent(e,t){return this.eventTarget.dispatchCustomEvent(e,t)}async setStored(e,t){if(e!==t.tokenSet.sub)throw new TypeError("Token set does not match the expected sub");await super.setStored(e,t),this.dispatchEvent("updated",{sub:e,...t})}async delStored(e,t){await super.delStored(e,t),this.dispatchEvent("deleted",{sub:e,cause:t})}async getSession(e,t){return this.get(e,{noCache:!0===t,allowStale:!1===t})}async get(e,t){const r=await this.runtime.usingLock(`@atproto-oauth-client-${e}`,(async()=>{const r={stack:[],error:void 0,hasError:!1};try{const o=n(r,(0,d.timeoutSignal)(3e4,t),!1),i=n(r,(0,d.combineSignals)([t?.signal,o]),!1);return await super.get(e,{...t,signal:i.signal})}catch(i){r.error=i,r.hasError=!0}finally{o(r)}}));if(e!==r.tokenSet.sub)throw new Error("Token set does not match the expected sub");return r}}t.SessionGetter=u},4344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthTokenRequestSchema=void 0;const n=r(1085),o=r(8319),i=r(6914),s=r(8759),a=r(9853);t.oauthTokenRequestSchema=n.z.discriminatedUnion("grant_type",[o.oauthAuthorizationCodeGrantTokenRequestSchema,a.oauthRefreshTokenGrantTokenRequestSchema,s.oauthPasswordGrantTokenRequestSchema,i.oauthClientCredentialsGrantTokenRequestSchema])},4391:(e,t,r)=>{"use strict";var n=r(7950);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},4392:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthEndpointAuthMethod=void 0;const n=r(1085);t.oauthEndpointAuthMethod=n.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"])},4439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubjectHasActionError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"SubjectHasAction"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.SubjectHasActionError=o},4454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decidePost=function(e,t){const r=new o.ModerationDecision;if(r.setDid(e.author.did),r.setIsMe(e.author.did===t.userDid),e.labels?.length)for(const n of e.labels)r.addLabel("content",n,t);r.addHidden(function(e,t){if(!t?.length)return!1;if(t.includes(e.uri))return!0;if(e.embed){if(n.AppBskyEmbedRecord.isViewRecord(e.embed.record)&&t.includes(e.embed.record.uri))return!0;if(n.AppBskyEmbedRecordWithMedia.isView(e.embed)&&n.AppBskyEmbedRecord.isViewRecord(e.embed.record.record)&&t.includes(e.embed.record.record.uri))return!0}return!1}(e,t.prefs.hiddenPosts)),r.isMe||r.addMutedWord(function(e,t){if(!t?.length)return!1;const r=e.author;if(n.AppBskyFeedPost.isRecord(e.record)){if((0,i.hasMutedWord)({mutedWords:t,text:e.record.text,facets:e.record.facets,outlineTags:e.record.tags,languages:e.record.langs,actor:r}))return!0;if(e.record.embed&&n.AppBskyEmbedImages.isMain(e.record.embed))for(const n of e.record.embed.images)if((0,i.hasMutedWord)({mutedWords:t,text:n.alt,languages:e.record.langs,actor:r}))return!0}if(e.embed)if(n.AppBskyEmbedRecord.isViewRecord(e.embed.record)){if(n.AppBskyFeedPost.isRecord(e.embed.record.value)){const r=e.embed.record.value,o=e.embed.record.author;if((0,i.hasMutedWord)({mutedWords:t,text:r.text,facets:r.facets,outlineTags:r.tags,languages:r.langs,actor:o}))return!0;if(n.AppBskyEmbedImages.isMain(r.embed))for(const e of r.embed.images)if((0,i.hasMutedWord)({mutedWords:t,text:e.alt,languages:r.langs,actor:o}))return!0;if(n.AppBskyEmbedExternal.isMain(r.embed)){const{external:e}=r.embed;if((0,i.hasMutedWord)({mutedWords:t,text:e.title+" "+e.description,languages:[],actor:o}))return!0}if(n.AppBskyEmbedRecordWithMedia.isMain(r.embed)){if(n.AppBskyEmbedExternal.isMain(r.embed.media)){const{external:e}=r.embed.media;if((0,i.hasMutedWord)({mutedWords:t,text:e.title+" "+e.description,languages:[],actor:o}))return!0}if(n.AppBskyEmbedImages.isMain(r.embed.media))for(const e of r.embed.media.images)if((0,i.hasMutedWord)({mutedWords:t,text:e.alt,languages:n.AppBskyFeedPost.isRecord(r.record)?r.langs:[],actor:o}))return!0}}}else if(n.AppBskyEmbedExternal.isView(e.embed)){const{external:n}=e.embed;if((0,i.hasMutedWord)({mutedWords:t,text:n.title+" "+n.description,languages:[],actor:r}))return!0}else if(n.AppBskyEmbedRecordWithMedia.isView(e.embed)&&n.AppBskyEmbedRecord.isViewRecord(e.embed.record.record)){const r=e.embed.record.record.author;if(n.AppBskyFeedPost.isRecord(e.embed.record.record.value)){const n=e.embed.record.record.value;if((0,i.hasMutedWord)({mutedWords:t,text:n.text,facets:n.facets,outlineTags:n.tags,languages:n.langs,actor:r}))return!0}if(n.AppBskyEmbedImages.isView(e.embed.media))for(const o of e.embed.media.images)if((0,i.hasMutedWord)({mutedWords:t,text:o.alt,languages:n.AppBskyFeedPost.isRecord(e.record)?e.record.langs:[],actor:r}))return!0;if(n.AppBskyEmbedExternal.isView(e.embed.media)){const{external:n}=e.embed.media;if((0,i.hasMutedWord)({mutedWords:t,text:n.title+" "+n.description,languages:[],actor:r}))return!0}}return!1}(e,t.prefs.mutedWords));let d;e.embed&&(n.AppBskyEmbedRecord.isViewRecord(e.embed.record)?d=c(e.embed.record,t):n.AppBskyEmbedRecordWithMedia.isView(e.embed)&&n.AppBskyEmbedRecord.isViewRecord(e.embed.record.record)?d=c(e.embed.record.record,t):n.AppBskyEmbedRecord.isViewBlocked(e.embed.record)?d=l(e.embed.record,t):n.AppBskyEmbedRecordWithMedia.isView(e.embed)&&n.AppBskyEmbedRecord.isViewBlocked(e.embed.record.record)&&(d=l(e.embed.record.record,t)));return o.ModerationDecision.merge(r,d?.downgrade(),(0,s.decideAccount)(e.author,t),(0,a.decideProfile)(e.author,t))};const n=r(1247),o=r(9092),i=r(9146),s=r(2875),a=r(1185);function c(e,t){const r=new o.ModerationDecision;if(r.setDid(e.author.did),r.setIsMe(e.author.did===t.userDid),e.labels?.length)for(const n of e.labels)r.addLabel("content",n,t);return o.ModerationDecision.merge(r,(0,s.decideAccount)(e.author,t),(0,a.decideProfile)(e.author,t))}function l(e,t){const r=new o.ModerationDecision;return r.setDid(e.author.did),r.setIsMe(e.author.did===t.userDid),e.author.viewer?.muted&&(e.author.viewer?.mutedByList?r.addMutedByList(e.author.viewer?.mutedByList):r.addMuted(e.author.viewer?.muted)),e.author.viewer?.blocking&&(e.author.viewer?.blockingByList?r.addBlockingByList(e.author.viewer?.blockingByList):r.addBlocking(e.author.viewer?.blocking)),r.addBlockedBy(e.author.viewer?.blockedBy),r}},4472:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(3133),t)},4482:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthClientMetadataSchema=void 0;const n=r(1085),o=r(586),i=r(4522),s=r(4437),a=r(668),c=r(2098),l=r(2335),d=r(9497),u=r(4633);t.oauthClientMetadataSchema=n.z.object({redirect_uris:n.z.array(c.oauthRedirectUriSchema).nonempty(),response_types:n.z.array(l.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:n.z.array(a.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:d.oauthScopeSchema.optional(),token_endpoint_auth_method:s.oauthEndpointAuthMethod.default("none").optional(),token_endpoint_auth_signing_alg:n.z.string().optional(),userinfo_signed_response_alg:n.z.string().optional(),userinfo_encrypted_response_alg:n.z.string().optional(),jwks_uri:u.webUriSchema.optional(),jwks:o.jwksPubSchema.optional(),application_type:n.z.enum(["web","native"]).default("web").optional(),subject_type:n.z.enum(["public","pairwise"]).default("public").optional(),request_object_signing_alg:n.z.string().optional(),id_token_signed_response_alg:n.z.string().optional(),authorization_signed_response_alg:n.z.string().default("RS256").optional(),authorization_encrypted_response_enc:n.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:n.z.string().optional(),client_id:i.oauthClientIdSchema.optional(),client_name:n.z.string().optional(),client_uri:u.webUriSchema.optional(),policy_uri:u.webUriSchema.optional(),tos_uri:u.webUriSchema.optional(),logo_uri:u.webUriSchema.optional(),default_max_age:n.z.number().optional(),require_auth_time:n.z.boolean().optional(),contacts:n.z.array(n.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:n.z.boolean().optional(),dpop_bound_access_tokens:n.z.boolean().optional(),authorization_details_types:n.z.array(n.z.string()).optional()})},4498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTakedownError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"AccountTakedown"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AccountTakedownError=o},4522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthClientIdSchema=void 0;const n=r(1085);t.oauthClientIdSchema=n.z.string().min(1)},4561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationRequestParametersSchema=void 0;const n=r(1085),o=r(586),i=r(6383),s=r(4522),a=r(6424),c=r(2098),l=r(912),d=r(2335),u=r(9497),p=r(8844),f=r(1454),h=r(3533);t.oauthAuthorizationRequestParametersSchema=n.z.object({client_id:s.oauthClientIdSchema,state:n.z.string().optional(),redirect_uri:c.oauthRedirectUriSchema.optional(),scope:u.oauthScopeSchema.optional(),response_type:d.oauthResponseTypeSchema,code_challenge:n.z.string().optional(),code_challenge_method:a.oauthCodeChallengeMethodSchema.default("S256").optional(),dpop_jkt:n.z.string().optional(),response_mode:l.oauthResponseModeSchema.optional(),nonce:n.z.string().optional(),max_age:n.z.number().int().min(0).optional(),claims:n.z.record(h.oidcEntityTypeSchema,n.z.record(p.oidcClaimsParameterSchema,n.z.union([n.z.literal(null),f.oidcClaimsPropertiesSchema]))).optional(),login_hint:n.z.string().min(1).optional(),ui_locales:n.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:o.signedJwtSchema.optional(),display:n.z.enum(["page","popup","touch","wap"]).optional(),prompt:n.z.enum(["none","login","consent","select_account"]).optional(),authorization_details:i.oauthAuthorizationDetailsSchema.optional()})},4580:function(e,t,r){"use strict";var n,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DBTransaction=void 0;const s=r(7829);class a{constructor(e){n.set(this,void 0),o(this,n,e,"f");const t=()=>{i()},r=()=>{i()},i=()=>{o(this,n,null,"f"),e.removeEventListener("abort",t),e.removeEventListener("complete",r)};e.addEventListener("abort",t),e.addEventListener("complete",r)}get tx(){if(!i(this,n,"f"))throw new Error("Transaction already ended");return i(this,n,"f")}async abort(){const{tx:e}=this;o(this,n,null,"f"),e.abort()}async commit(){const{tx:e}=this;o(this,n,null,"f"),e.commit?.()}objectStore(e){const t=this.tx.objectStore(e);return new s.DBObjectStore(t)}[(n=new WeakMap,Symbol.dispose)](){i(this,n,"f")&&this.commit()}}t.DBTransaction=a},4595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRefreshError=void 0;class r extends Error{constructor(e,t,r){super(t,r),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}t.TokenRefreshError=r},4633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.privateUseUriSchema=t.webUriSchema=t.httpsUriSchema=t.loopbackUriSchema=t.dangerousUriSchema=void 0;const n=r(1085),o=r(6479),i=URL.canParse??(e=>{try{return new URL(e),!0}catch{return!1}});t.dangerousUriSchema=n.z.string().refine((e=>e.includes(":")&&i(e)),{message:"Invalid URL"}),t.loopbackUriSchema=t.dangerousUriSchema.superRefine(((e,t)=>{if(!e.startsWith("http://"))return t.addIssue({code:n.ZodIssueCode.custom,message:'URL must use the "http:" protocol'}),!1;const r=new URL(e);return!!(0,o.isLoopbackHost)(r.hostname)||(t.addIssue({code:n.ZodIssueCode.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)})),t.httpsUriSchema=t.dangerousUriSchema.superRefine(((e,t)=>{if(!e.startsWith("https://"))return t.addIssue({code:n.ZodIssueCode.custom,message:'URL must use the "https:" protocol'}),!1;const r=new URL(e);if((0,o.isLoopbackHost)(r.hostname))return t.addIssue({code:n.ZodIssueCode.custom,message:"https: URL must not use a loopback host"}),!1;if((0,o.isHostnameIP)(r.hostname));else{if(!r.hostname.includes("."))return t.addIssue({code:n.ZodIssueCode.custom,message:"Domain name must contain at least two segments"}),!1;if(r.hostname.endsWith(".local"))return t.addIssue({code:n.ZodIssueCode.custom,message:'Domain name must not end with ".local"'}),!1}return!0})),t.webUriSchema=n.z.string().superRefine(((e,r)=>{if(e.startsWith("http://")){const n=t.loopbackUriSchema.safeParse(e);return n.success||n.error.issues.forEach(r.addIssue,r),n.success}if(e.startsWith("https://")){const n=t.httpsUriSchema.safeParse(e);return n.success||n.error.issues.forEach(r.addIssue,r),n.success}return r.addIssue({code:n.ZodIssueCode.custom,message:'URL must use the "http:" or "https:" protocol'}),!1})),t.privateUseUriSchema=t.dangerousUriSchema.superRefine(((e,t)=>{const r=e.indexOf("."),o=e.indexOf(":");if(-1===r||-1===o||r>o)return t.addIssue({code:n.ZodIssueCode.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const i=new URL(e);return i.protocol.includes(".")?!i.hostname||(t.addIssue({code:n.ZodIssueCode.custom,message:'Private-use URI schemes must not include a hostname (only one "/" is allowed after the protocol, as per RFC 8252)'}),!1):(t.addIssue({code:n.ZodIssueCode.custom,message:"Invalid private-use URI scheme"}),!1)}))},4639:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4688:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4730:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceClient=t.Client=void 0;const n=r(9559),o=r(7515),i=r(7955);t.Client=class{constructor(){Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:new n.Lexicons})}get fetch(){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}set fetch(e){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}async call(e,t,r,n,o){return this.service(e).call(t,r,n,o)}service(e){return new s(this,e)}addLexicon(e){this.lex.add(e)}addLexicons(e){for(const t of e)this.addLexicon(t)}removeLexicon(e){this.lex.remove(e)}};class s extends i.XrpcClient{constructor(e,t){super((async(e,t)=>{const r=(0,o.combineHeaders)(t.headers,Object.entries(this.headers));return fetch(new URL(e,this.uri),{...t,headers:r})}),e.lex),Object.defineProperty(this,"baseClient",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.uri="string"===typeof t?new URL(t):t}}t.ServiceClient=s},4790:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_ENDPOINT_NAMES=void 0,t.OAUTH_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"]},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildFetchHandler=function(e){if("function"===typeof e)return e;if("object"===typeof e&&"fetchHandler"in e)return e.fetchHandler.bind(e);const{service:t,headers:r,fetch:o=globalThis.fetch}="string"===typeof e||e instanceof URL?{service:e}:e;if("function"!==typeof o)throw new TypeError("XrpcDispatcher requires fetch() to be available in your environment.");const i=null!=r?Object.entries(r):void 0;return async function(e,r){const s="function"===typeof t?t():t,a=new URL(e,s),c=(0,n.combineHeaders)(r.headers,i);return o(a,{...r,headers:c})}};const n=r(7515)},4797:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthSession=void 0;const n=r(6211),o=r(7619),i=r(2646),s=r(7259),a=globalThis.ReadableStream;function c(e){if(401!==e.status)return!1;const t=e.headers.get("WWW-Authenticate");return null!=t&&(t.startsWith("Bearer ")||t.startsWith("DPoP "))&&t.includes('error="invalid_token"')}t.OAuthSession=class{constructor(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:globalThis.fetch;Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"sessionGetter",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"dpopFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dpopFetch=(0,s.dpopFetchWrapper)({fetch:(0,n.bindFetch)(o),iss:e.clientMetadata.client_id,key:e.dpopKey,supportedAlgs:e.serverMetadata.dpop_signing_alg_values_supported,sha256:async t=>e.runtime.sha256(t),nonces:e.dpopNonces,isAuthServer:!1})}get did(){return this.sub}get serverMetadata(){return this.server.serverMetadata}async getTokenSet(e){const{tokenSet:t}=await this.sessionGetter.get(this.sub,{noCache:!0===e,allowStale:!1===e});return t}async getTokenInfo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";const t=await this.getTokenSet(e),r=null==t.expires_at?void 0:new Date(t.expires_at);return{expiresAt:r,get expired(){return null==r?void 0:r.getTime(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jwtPayloadSchema=t.jwtHeaderSchema=t.isUnsignedJwt=t.unsignedJwtSchema=t.isSignedJwt=t.signedJwtSchema=void 0;const n=r(1085),o=r(5574),i=r(8404);t.signedJwtSchema=n.z.string().superRefine(i.jwtCharsRefinement).superRefine((0,i.segmentedStringRefinementFactory)(3));t.isSignedJwt=e=>t.signedJwtSchema.safeParse(e).success,t.unsignedJwtSchema=n.z.string().superRefine(i.jwtCharsRefinement).superRefine((0,i.segmentedStringRefinementFactory)(2));t.isUnsignedJwt=e=>t.unsignedJwtSchema.safeParse(e).success,t.jwtHeaderSchema=n.z.object({alg:n.z.string(),jku:n.z.string().url().optional(),jwk:n.z.object({kty:n.z.string(),crv:n.z.string().optional(),x:n.z.string().optional(),y:n.z.string().optional(),e:n.z.string().optional(),n:n.z.string().optional()}).optional(),kid:n.z.string().optional(),x5u:n.z.string().optional(),x5c:n.z.array(n.z.string()).optional(),x5t:n.z.string().optional(),"x5t#S256":n.z.string().optional(),typ:n.z.string().optional(),cty:n.z.string().optional(),crit:n.z.array(n.z.string()).optional()}).passthrough(),t.jwtPayloadSchema=n.z.object({iss:n.z.string().optional(),aud:n.z.union([n.z.string(),n.z.array(n.z.string()).nonempty()]).optional(),sub:n.z.string().optional(),exp:n.z.number().int().optional(),nbf:n.z.number().int().optional(),iat:n.z.number().int().optional(),jti:n.z.string().optional(),htm:n.z.string().optional(),htu:n.z.string().optional(),ath:n.z.string().optional(),acr:n.z.string().optional(),azp:n.z.string().optional(),amr:n.z.array(n.z.string()).optional(),cnf:n.z.object({kid:n.z.string().optional(),jwk:o.jwkPubSchema.optional(),jwe:n.z.string().optional(),jku:n.z.string().url().optional(),jkt:n.z.string().optional(),"x5t#S256":n.z.string().optional(),osc:n.z.string().optional()}).optional(),client_id:n.z.string().optional(),scope:n.z.string().optional(),nonce:n.z.string().optional(),at_hash:n.z.string().optional(),c_hash:n.z.string().optional(),s_hash:n.z.string().optional(),auth_time:n.z.number().int().optional(),name:n.z.string().optional(),family_name:n.z.string().optional(),given_name:n.z.string().optional(),middle_name:n.z.string().optional(),nickname:n.z.string().optional(),preferred_username:n.z.string().optional(),gender:n.z.string().optional(),picture:n.z.string().url().optional(),profile:n.z.string().url().optional(),website:n.z.string().url().optional(),birthdate:n.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:n.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:n.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:n.z.number().int().optional(),email:n.z.string().optional(),email_verified:n.z.boolean().optional(),phone_number:n.z.string().optional(),phone_number_verified:n.z.boolean().optional(),address:n.z.object({formatted:n.z.string().optional(),street_address:n.z.string().optional(),locality:n.z.string().optional(),region:n.z.string().optional(),postal_code:n.z.string().optional(),country:n.z.string().optional()}).optional(),authorization_details:n.z.array(n.z.object({type:n.z.string(),locations:n.z.array(n.z.string()).optional(),actions:n.z.array(n.z.string()).optional(),datatypes:n.z.array(n.z.string()).optional(),identifier:n.z.string().optional(),privileges:n.z.array(n.z.string()).optional()}).passthrough()).optional()}).passthrough()},4857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BadQueryStringError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"BadQueryString"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BadQueryStringError=o},4885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncBufferFullError=t.AsyncBuffer=t.allComplete=t.createDeferrables=t.createDeferrable=t.readFromGenerator=void 0,t.allFulfilled=function(e){return Promise.allSettled(e).then(i)},t.handleAllSettledErrors=i,t.isRejectedResult=s,t.isFulfilledResult=function(e){return"fulfilled"===e.status};const n=r(4997);t.readFromGenerator=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Promise.resolve(),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.MAX_SAFE_INTEGER;const i=[];let s,a=!1;const c=async()=>{if(await t(i.at(-1)))return!0;const e=(0,n.bailableWait)(20);return await e.wait(),s=e.bail,!a&&await c()},l=new Promise((e=>{r.then((()=>{c().then((()=>e()))}))}));try{for(;i.length{let e;const t=new Promise((t=>{e=()=>t()}));return{resolve:e,complete:t}};t.createDeferrables=e=>{const r=[];for(let n=0;n{await Promise.all(e.map((e=>e.complete)))};t.AsyncBuffer=class{constructor(e){Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"buffer",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"toThrow",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.promise=Promise.resolve(),this.resolve=()=>null,this.resetPromise()}get curr(){return this.buffer}get size(){return this.buffer.length}get isClosed(){return this.closed}resetPromise(){this.promise=new Promise((e=>this.resolve=e))}push(e){this.buffer.push(e),this.resolve()}pushMany(e){e.forEach((e=>this.buffer.push(e))),this.resolve()}async*events(){for(;;){if(this.closed&&0===this.buffer.length){if(this.toThrow)throw this.toThrow;return}if(await this.promise,this.toThrow)throw this.toThrow;if(this.maxSize&&this.size>this.maxSize)throw new o(this.maxSize);const[e,...t]=this.buffer;e?(this.buffer=t,yield e):this.resetPromise()}}throw(e){this.toThrow=e,this.closed=!0,this.resolve()}close(){this.closed=!0,this.resolve()}};class o extends Error{constructor(e){super(`ReachedMaxBufferSize: ${e}`)}}function i(e){const t=e.filter(s).map(a);if(0===t.length)return e.map(c);if(1===t.length)throw t[0];throw new AggregateError(t,`Multiple errors: ${t.map(l).join("\n")}`)}function s(e){return"rejected"===e.status}function a(e){return e.reason}function c(e){return e.value}function l(e){return e instanceof Error?e.message:String(e)}t.AsyncBufferFullError=o},4920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4921:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4933:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.feed.threadgate#main"===e.$type||"app.bsky.feed.threadgate"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.feed.threadgate#main",e)},t.isMentionRule=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.threadgate#mentionRule"===e.$type},t.validateMentionRule=function(e){return o.lexicons.validate("app.bsky.feed.threadgate#mentionRule",e)},t.isFollowerRule=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.threadgate#followerRule"===e.$type},t.validateFollowerRule=function(e){return o.lexicons.validate("app.bsky.feed.threadgate#followerRule",e)},t.isFollowingRule=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.threadgate#followingRule"===e.$type},t.validateFollowingRule=function(e){return o.lexicons.validate("app.bsky.feed.threadgate#followingRule",e)},t.isListRule=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.threadgate#listRule"===e.$type},t.validateListRule=function(e){return o.lexicons.validate("app.bsky.feed.threadgate#listRule",e)};const n=r(2127),o=r(554)},4961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},4977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStatusAttr=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.admin.defs#statusAttr"===e.$type},t.validateStatusAttr=function(e){return o.lexicons.validate("com.atproto.admin.defs#statusAttr",e)},t.isAccountView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.admin.defs#accountView"===e.$type},t.validateAccountView=function(e){return o.lexicons.validate("com.atproto.admin.defs#accountView",e)},t.isRepoRef=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.admin.defs#repoRef"===e.$type},t.validateRepoRef=function(e){return o.lexicons.validate("com.atproto.admin.defs#repoRef",e)},t.isRepoBlobRef=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.admin.defs#repoBlobRef"===e.$type},t.validateRepoBlobRef=function(e){return o.lexicons.validate("com.atproto.admin.defs#repoBlobRef",e)},t.isThreatSignature=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.admin.defs#threatSignature"===e.$type},t.validateThreatSignature=function(e){return o.lexicons.validate("com.atproto.admin.defs#threatSignature",e)};const n=r(2127),o=r(554)},4995:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecordNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"RecordNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RecordNotFoundError=o},4997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntWithFallback=t.dedupeStrs=t.range=t.chunkArray=t.errHasMsg=t.isErrnoException=t.asyncFilter=t.s32decode=t.s32encode=t.streamToBuffer=t.flattenUint8Arrays=t.bailableWait=t.wait=t.jitter=t.noUndefinedVals=void 0,t.omit=function(e,t){if(!e)return e;const r={},n=Object.keys(e);for(let o=0;o(Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]})),e);t.jitter=e=>Math.round((Math.random()-.5)*e*2);t.wait=e=>new Promise((t=>setTimeout(t,e)));t.bailableWait=e=>{let t;const r=new Promise((r=>{const n=setTimeout(r,e);t=()=>{clearTimeout(n),r()}}));return{bail:t,wait:()=>r}};t.flattenUint8Arrays=e=>{const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r};t.streamToBuffer=async e=>{const r=[];for await(const t of e)r.push(t);return(0,t.flattenUint8Arrays)(r)};const r="234567abcdefghijklmnopqrstuvwxyz";t.s32encode=e=>{let t="";for(;e;){const n=e%32;e=Math.floor(e/32),t=r.charAt(n)+t}return t};t.s32decode=e=>{let t=0;for(const n of e)t=32*t+r.indexOf(n);return t};t.asyncFilter=async(e,t)=>{const r=await Promise.all(e.map((e=>t(e))));return e.filter(((e,t)=>r[t]))};t.isErrnoException=e=>!!e&&e.code;t.errHasMsg=(e,t)=>!!e&&"object"===typeof e&&e.message===t;t.chunkArray=(e,t)=>e.reduce(((e,r,n)=>{const o=Math.floor(n/t);return e[o]||(e[o]=[]),e[o].push(r),e}),[]);t.range=e=>{const t=[];for(let r=0;r[...new Set(e)];t.parseIntWithFallback=(e,t)=>{const r=parseInt(e||"",10);return isNaN(r)?t:r}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5011:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5012:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.didDocumentValidator=t.didDocumentSchema=void 0;const n=r(1085),o=r(9776),i=n.z.string().refine((e=>{try{return new URL(e),!0}catch{return!1}}),"RFC3968 compliant URI"),s=n.z.union([o.didSchema,n.z.array(o.didSchema)]),a=n.z.union([i,n.z.string().regex(/^#[^#]+$/)]),c=n.z.object({id:a,type:n.z.string().min(1),controller:s,publicKeyJwk:n.z.record(n.z.string(),n.z.unknown()).optional(),publicKeyMultibase:n.z.string().optional()}),l=a,d=n.z.union([n.z.string(),n.z.array(n.z.string())]),u=n.z.union([i,n.z.record(n.z.string(),i),n.z.array(n.z.union([i,n.z.record(n.z.string(),i)])).nonempty()]),p=n.z.object({id:l,type:d,serviceEndpoint:u}),f=n.z.union([a,c]);t.didDocumentSchema=n.z.object({"@context":n.z.union([n.z.literal("https://www.w3.org/ns/did/v1"),n.z.array(n.z.string().url()).nonempty().refine((e=>"https://www.w3.org/ns/did/v1"===e[0]),{message:"First @context must be https://www.w3.org/ns/did/v1"})]),id:o.didSchema,controller:s.optional(),alsoKnownAs:n.z.array(i).optional(),service:n.z.array(p).optional(),authentication:n.z.array(f).optional(),verificationMethod:n.z.array(n.z.union([c,a])).optional()}),t.didDocumentValidator=t.didDocumentSchema.superRefine(((e,t)=>{let{id:r,service:o}=e;if(o){const e=new Set;for(let i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthClientIdLoopbackSchema=void 0,t.isOAuthClientIdLoopback=function(e){try{return l(e),!0}catch{return!1}},t.assertOAuthLoopbackClientId=c,t.parseOAuthLoopbackClientId=l;const n=r(1085),o=r(4522),i=r(2098),s=r(9497),a="http://localhost";function c(e){l(e)}function l(e){if(!e.startsWith(a))throw new TypeError(`Loopback ClientID must start with "${a}"`);if(e.includes("#",a.length))throw new TypeError("Loopback ClientID must not contain a hash component");const t=e.length>a.length&&"/"===e[a.length]?a.length+1:a.length;if(e.length===t)return{};if("?"!==e[t])throw new TypeError("Loopback ClientID must not contain a path component");const r=new URLSearchParams(e.slice(t+1));for(const o of r.keys())if("redirect_uri"!==o&&"scope"!==o)throw new TypeError(`Invalid query parameter "${o}" in client ID`);const n=r.get("scope")??void 0;if(null!=n){if(r.getAll("scope").length>1)throw new TypeError("Loopback ClientID must contain at most one scope query parameter");if(!s.oauthScopeSchema.safeParse(n).success)throw new TypeError("Invalid scope query parameter in client ID")}return{scope:n,redirect_uris:r.has("redirect_uri")?r.getAll("redirect_uri").map((e=>i.oauthLoopbackRedirectURISchema.parse(e))):void 0}}t.oauthClientIdLoopbackSchema=o.oauthClientIdSchema.superRefine(((e,t)=>{try{return c(e),!0}catch(r){return t.addIssue({code:n.ZodIssueCode.custom,message:r instanceof TypeError?r.message:"Invalid loopback client ID"}),!1}}))},5043:(e,t,r)=>{"use strict";e.exports=r(4202)},5123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ROLETRIAGE=t.ROLEMODERATOR=t.ROLEADMIN=void 0,t.isMember=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"tools.ozone.team.defs#member"===e.$type},t.validateMember=function(e){return o.lexicons.validate("tools.ozone.team.defs#member",e)};const n=r(2127),o=r(554);t.ROLEADMIN="tools.ozone.team.defs#roleAdmin",t.ROLEMODERATOR="tools.ozone.team.defs#roleModerator",t.ROLETRIAGE="tools.ozone.team.defs#roleTriage"},5168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e},t.isRepo=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"com.atproto.sync.listRepos#repo"===e.$type},t.validateRepo=function(e){return o.lexicons.validate("com.atproto.sync.listRepos#repo",e)};const n=r(2127),o=r(554)},5229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DnsHandleResolver=void 0;const n=r(1871),o="did=";t.DnsHandleResolver=class{constructor(e){Object.defineProperty(this,"resolveTxt",{enumerable:!0,configurable:!0,writable:!0,value:e})}async resolve(e){const t=await this.resolveTxt.call(null,`_atproto.${e}`);if(!t)return null;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTidError=t.isValidTid=t.ensureValidTid=void 0;const r=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/;t.ensureValidTid=e=>{if(13!==e.length)throw new n("TID must be 13 characters");if(!r.test(e))throw new n("TID syntax not valid (regex)")};t.isValidTid=e=>13===e.length&&r.test(e);class n extends Error{}t.InvalidTidError=n},5290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oauthRefreshTokenSchema=void 0;const n=r(1085);t.oauthRefreshTokenSchema=n.z.string().min(1)},5305:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeString=void 0;const n=r(8021),o=new TextEncoder,i=new TextDecoder;t.UnicodeString=class{constructor(e){Object.defineProperty(this,"utf16",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"utf8",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_graphemeLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.utf16=e,this.utf8=o.encode(e)}get length(){return this.utf8.byteLength}get graphemeLength(){return this._graphemeLen||(this._graphemeLen=(0,n.graphemeLen)(this.utf16)),this._graphemeLen}slice(e,t){return i.decode(this.utf8.slice(e,t))}utf16IndexToUtf8Index(e){return o.encode(this.utf16.slice(0,e)).byteLength}toString(){return this.utf16}}},5350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoDeactivatedError=t.RepoSuspendedError=t.RepoTakendownError=t.RepoNotFoundError=t.BlobNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("BlobNotFound"===e.error)return new o(e);if("RepoNotFound"===e.error)return new i(e);if("RepoTakendown"===e.error)return new s(e);if("RepoSuspended"===e.error)return new a(e);if("RepoDeactivated"===e.error)return new c(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlobNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoTakendownError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoSuspendedError=a;class c extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoDeactivatedError=c},5383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5407:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base64:()=>o,base64pad:()=>i,base64url:()=>s,base64urlpad:()=>a});var n=r(5555);const o=(0,n.yE)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),i=(0,n.yE)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),s=(0,n.yE)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=(0,n.yE)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})},5416:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureValidAtUriRegex=t.ensureValidAtUri=void 0;const n=r(9849),o=r(976),i=r(2440);t.ensureValidAtUri=e=>{const t=e.split("#");if(t.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const r=t[1]||null;if(e=t[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(e))throw new Error("Disallowed characters in ATURI (ASCII)");const s=e.split("/");if(s.length>=3&&("at:"!==s[0]||0!==s[1].length))throw new Error('ATURI must start with "at://"');if(s.length<3)throw new Error("ATURI requires at least method and authority sections");try{s[2].startsWith("did:")?(0,n.ensureValidDid)(s[2]):(0,o.ensureValidHandle)(s[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(s.length>=4){if(0===s[3].length)throw new Error("ATURI can not have a slash after authority without a path segment");try{(0,i.ensureValidNsid)(s[3])}catch{throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}}if(s.length>=5&&0===s[4].length)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(s.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(t.length>=2&&null==r)throw new Error("ATURI fragment must be non-empty and start with slash");if(null!=r){if(0===r.length||"/"!==r[0])throw new Error("ATURI fragment must be non-empty and start with slash");if(!/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/.test(r))throw new Error("Disallowed characters in ATURI fragment (ASCII)")}if(e.length>8192)throw new Error("ATURI is far too long")};t.ensureValidAtUriRegex=e=>{const t=e.match(/^at:\/\/(?[a-zA-Z0-9._:%-]+)(\/(?[a-zA-Z0-9-.]+)(\/(?[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/);if(!t||!t.groups)throw new Error("ATURI didn't validate via regex");const r=t.groups;try{(0,o.ensureValidHandleRegex)(r.authority)}catch{try{(0,n.ensureValidDidRegex)(r.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(r.collection)try{(0,i.ensureValidNsidRegex)(r.collection)}catch{throw new Error("ATURI collection path segment must be a valid NSID")}if(e.length>8192)throw new Error("ATURI is far too long")}},5466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decideFeedGenerator=function(e,t){const r=new n.ModerationDecision;if(r.setDid(e.creator.did),r.setIsMe(e.creator.did===t.userDid),e.labels?.length)for(const n of e.labels)r.addLabel("content",n,t);return n.ModerationDecision.merge(r,(0,o.decideAccount)(e.creator,t),(0,i.decideProfile)(e.creator,t))};const n=r(9092),o=r(2875),i=r(1185)},5555:(e,t,r)=>{"use strict";r.d(t,{_Q:()=>u,HT:()=>d,yE:()=>p});const n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,s=new Uint8Array(i);e[t];){var d=r[e.charCodeAt(t)];if(255===d)return;for(var u=0,p=i-1;(0!==d||u>>0,s[p]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=u,t++}if(" "!==e[t]){for(var f=i-o;f!==i&&0===s[f];)f++;for(var h=new Uint8Array(n+(i-f)),y=n;f!==i;)h[y++]=s[f++];return h}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,o=0,i=t.length;o!==i&&0===t[o];)o++,r++;for(var s=(i-o)*d+1>>>0,l=new Uint8Array(s);o!==i;){for(var u=t[o],p=0,f=s-1;(0!==u||p>>0,l[f]=u%a>>>0,u=u/a>>>0;if(0!==u)throw new Error("Non-zero carry");n=p,o++}for(var h=s-n;h!==s&&0===l[h];)h++;for(var y=c.repeat(r);hnew a({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class l{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new i(e,t,r),this.decoder=new s(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const d=e=>{let{name:t,prefix:r,encode:n,decode:o}=e;return new l(t,r,n,o)},u=e=>{let{prefix:t,name:r,alphabet:i}=e;const{encode:s,decode:a}=n(i,r);return d({prefix:t,name:r,encode:s,decode:e=>(0,o.au)(a(e))})},p=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:o}=e;return d({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],o=(1<r;)s-=r,i+=t[o&a>>s];if(s&&(i+=t[o&a<((e,t,r,n)=>{const o={};for(let d=0;d=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,o,n,t)})}},5574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jwkPubSchema=t.jwkValidator=t.jwkSchema=t.jwkUnknownKeySchema=t.jwkSymKeySchema=t.jwkOkpKeySchema=t.jwkEcSecp256k1KeySchema=t.jwkEcKeySchema=t.jwkRsaKeySchema=t.jwkBaseSchema=t.keyUsageSchema=void 0;const n=r(1085);t.keyUsageSchema=n.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]),t.jwkBaseSchema=n.z.object({kty:n.z.string().min(1),alg:n.z.string().min(1).optional(),kid:n.z.string().min(1).optional(),ext:n.z.boolean().optional(),use:n.z.enum(["sig","enc"]).optional(),key_ops:n.z.array(t.keyUsageSchema).optional(),x5c:n.z.array(n.z.string()).optional(),x5t:n.z.string().min(1).optional(),"x5t#S256":n.z.string().min(1).optional(),x5u:n.z.string().url().optional()}),t.jwkRsaKeySchema=t.jwkBaseSchema.extend({kty:n.z.literal("RSA"),alg:n.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:n.z.string().min(1),e:n.z.string().min(1),d:n.z.string().min(1).optional(),p:n.z.string().min(1).optional(),q:n.z.string().min(1).optional(),dp:n.z.string().min(1).optional(),dq:n.z.string().min(1).optional(),qi:n.z.string().min(1).optional(),oth:n.z.array(n.z.object({r:n.z.string().optional(),d:n.z.string().optional(),t:n.z.string().optional()})).nonempty().optional()}),t.jwkEcKeySchema=t.jwkBaseSchema.extend({kty:n.z.literal("EC"),alg:n.z.enum(["ES256","ES384","ES512"]).optional(),crv:n.z.enum(["P-256","P-384","P-521"]),x:n.z.string().min(1),y:n.z.string().min(1),d:n.z.string().min(1).optional()}),t.jwkEcSecp256k1KeySchema=t.jwkBaseSchema.extend({kty:n.z.literal("EC"),alg:n.z.enum(["ES256K"]).optional(),crv:n.z.enum(["secp256k1"]),x:n.z.string().min(1),y:n.z.string().min(1),d:n.z.string().min(1).optional()}),t.jwkOkpKeySchema=t.jwkBaseSchema.extend({kty:n.z.literal("OKP"),alg:n.z.enum(["EdDSA"]).optional(),crv:n.z.enum(["Ed25519","Ed448"]),x:n.z.string().min(1),d:n.z.string().min(1).optional()}),t.jwkSymKeySchema=t.jwkBaseSchema.extend({kty:n.z.literal("oct"),alg:n.z.enum(["HS256","HS384","HS512"]).optional(),k:n.z.string()}),t.jwkUnknownKeySchema=t.jwkBaseSchema.extend({kty:n.z.string().refine((e=>"RSA"!==e&&"EC"!==e&&"OKP"!==e&&"oct"!==e))}),t.jwkSchema=n.z.union([t.jwkUnknownKeySchema,t.jwkRsaKeySchema,t.jwkEcKeySchema,t.jwkEcSecp256k1KeySchema,t.jwkOkpKeySchema,t.jwkSymKeySchema]),t.jwkValidator=t.jwkSchema.refine((e=>null!=e.use||null!=e.key_ops),"use or key_ops required").refine((e=>!e.use||!e.key_ops||e.key_ops.every((t=>"sig"===e.use?"sign"===t||"verify"===t:"encrypt"===t||"decrypt"===t))),"use and key_ops must be consistent"),t.jwkPubSchema=t.jwkValidator.refine((e=>null!=e.kid),"kid is required").refine((e=>!("k"in e)&&!("d"in e)),"private key not allowed")},5582:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6354),t),o(r(3004),t),o(r(3739),t),o(r(2559),t),o(r(7988),t),o(r(1308),t)},5589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidEmailError=t.InvalidTokenError=t.ExpiredTokenError=t.AccountNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("AccountNotFound"===e.error)return new o(e);if("ExpiredToken"===e.error)return new i(e);if("InvalidToken"===e.error)return new s(e);if("InvalidEmail"===e.error)return new a(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.AccountNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.ExpiredTokenError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidTokenError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.InvalidEmailError=a},5596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4295);t.default=class{static isSurrogate(e,t){return 55296<=e.charCodeAt(t)&&e.charCodeAt(t)<=56319&&56320<=e.charCodeAt(t+1)&&e.charCodeAt(t+1)<=57343}static codePointAt(e,t){void 0===t&&(t=0);const r=e.charCodeAt(t);if(55296<=r&&r<=56319&&t=1){const n=e.charCodeAt(t-1);return 55296<=n&&n<=56319?1024*(n-55296)+(r-56320)+65536:r}return r}static shouldBreak(e,t,r,o,i,s){const a=[e].concat(t).concat([r]),c=[o].concat(i).concat([s]),l=a[a.length-2],d=r,u=s,p=a.lastIndexOf(n.CLUSTER_BREAK.REGIONAL_INDICATOR);if(p>0&&a.slice(1,p).every((function(e){return e===n.CLUSTER_BREAK.REGIONAL_INDICATOR}))&&-1===[n.CLUSTER_BREAK.PREPEND,n.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(l))return a.filter((function(e){return e===n.CLUSTER_BREAK.REGIONAL_INDICATOR})).length%2===1?3:4;if(l===n.CLUSTER_BREAK.CR&&d===n.CLUSTER_BREAK.LF)return 0;if(l===n.CLUSTER_BREAK.CONTROL||l===n.CLUSTER_BREAK.CR||l===n.CLUSTER_BREAK.LF)return 1;if(d===n.CLUSTER_BREAK.CONTROL||d===n.CLUSTER_BREAK.CR||d===n.CLUSTER_BREAK.LF)return 1;if(l===n.CLUSTER_BREAK.L&&(d===n.CLUSTER_BREAK.L||d===n.CLUSTER_BREAK.V||d===n.CLUSTER_BREAK.LV||d===n.CLUSTER_BREAK.LVT))return 0;if(!(l!==n.CLUSTER_BREAK.LV&&l!==n.CLUSTER_BREAK.V||d!==n.CLUSTER_BREAK.V&&d!==n.CLUSTER_BREAK.T))return 0;if((l===n.CLUSTER_BREAK.LVT||l===n.CLUSTER_BREAK.T)&&d===n.CLUSTER_BREAK.T)return 0;if(d===n.CLUSTER_BREAK.EXTEND||d===n.CLUSTER_BREAK.ZWJ)return 0;if(d===n.CLUSTER_BREAK.SPACINGMARK)return 0;if(l===n.CLUSTER_BREAK.PREPEND)return 0;const f=c.slice(0,-1).lastIndexOf(n.EXTENDED_PICTOGRAPHIC);return-1!==f&&c[f]===n.EXTENDED_PICTOGRAPHIC&&a.slice(f+1,-2).every((function(e){return e===n.CLUSTER_BREAK.EXTEND}))&&l===n.CLUSTER_BREAK.ZWJ&&u===n.EXTENDED_PICTOGRAPHIC?0:-1!==t.indexOf(n.CLUSTER_BREAK.REGIONAL_INDICATOR)?2:l===n.CLUSTER_BREAK.REGIONAL_INDICATOR&&d===n.CLUSTER_BREAK.REGIONAL_INDICATOR?0:1}}},5598:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.either=function(e,t){if(null!=e&&null!=t&&e!==t)throw new TypeError(`Expected "${t}", got "${e}"`);return e??t??void 0}},5623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RepoDeactivatedError=t.RepoSuspendedError=t.RepoTakendownError=t.RepoNotFoundError=t.BlockNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError){if("BlockNotFound"===e.error)return new o(e);if("RepoNotFound"===e.error)return new i(e);if("RepoTakendown"===e.error)return new s(e);if("RepoSuspended"===e.error)return new a(e);if("RepoDeactivated"===e.error)return new c(e)}return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.BlockNotFoundError=o;class i extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoNotFoundError=i;class s extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoTakendownError=s;class a extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoSuspendedError=a;class c extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.RepoDeactivatedError=c},5628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMain=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.embed.video#main"===e.$type||"app.bsky.embed.video"===e.$type)},t.validateMain=function(e){return o.lexicons.validate("app.bsky.embed.video#main",e)},t.isCaption=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.video#caption"===e.$type},t.validateCaption=function(e){return o.lexicons.validate("app.bsky.embed.video#caption",e)},t.isView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.video#view"===e.$type},t.validateView=function(e){return o.lexicons.validate("app.bsky.embed.video#view",e)};const n=r(2127),o=r(554)},5668:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>Et,CompactSign:()=>At,EmbeddedJWK:()=>jt,EncryptJWT:()=>Lt,FlattenedEncrypt:()=>nt,FlattenedSign:()=>Rt,GeneralEncrypt:()=>it,GeneralSign:()=>_t,SignJWT:()=>Ct,UnsecuredJWT:()=>qt,base64url:()=>o,calculateJwkThumbprint:()=>Pt,calculateJwkThumbprintUri:()=>Bt,compactDecrypt:()=>Xe,compactVerify:()=>dt,createLocalJWKSet:()=>Kt,createRemoteJWKSet:()=>$t,cryptoRuntime:()=>Yt,decodeJwt:()=>Xt,decodeProtectedHeader:()=>Wt,errors:()=>n,experimental_jwksCache:()=>Ft,exportJWK:()=>tt,exportPKCS8:()=>et,exportSPKI:()=>Ye,flattenedDecrypt:()=>We,flattenedVerify:()=>lt,generalDecrypt:()=>Ze,generalVerify:()=>ut,generateKeyPair:()=>Jt,generateSecret:()=>Qt,importJWK:()=>Oe,importPKCS8:()=>Ie,importSPKI:()=>De,importX509:()=>Ue,jwksCache:()=>Nt,jwtDecrypt:()=>vt,jwtVerify:()=>bt});var n={};r.r(n),r.d(n,{JOSEAlgNotAllowed:()=>A,JOSEError:()=>E,JOSENotSupported:()=>S,JWEDecryptionFailed:()=>_,JWEInvalid:()=>k,JWKInvalid:()=>L,JWKSInvalid:()=>x,JWKSMultipleMatchingKeys:()=>B,JWKSNoMatchingKey:()=>P,JWKSTimeout:()=>j,JWSInvalid:()=>T,JWSSignatureVerificationFailed:()=>D,JWTClaimValidationFailed:()=>w,JWTExpired:()=>R,JWTInvalid:()=>C});var o={};r.r(o),r.d(o,{decode:()=>Ht,encode:()=>Gt});const i=crypto,s=e=>e instanceof CryptoKey,a=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await i.subtle.digest(r,t))},c=new TextEncoder,l=new TextDecoder,d=2**32;function u(){for(var e=arguments.length,t=new Array(e),r=0;r{let{length:r}=t;return e+r}),0),o=new Uint8Array(n);let i=0;for(const s of t)o.set(s,i),i+=s.length;return o}function p(e,t,r){if(t<0||t>=d)throw new RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function f(e){const t=Math.floor(e/d),r=e%d,n=new Uint8Array(8);return p(n,t,0),p(n,r,4),n}function h(e){const t=new Uint8Array(4);return p(t,e),t}function y(e){return u(h(e.length),e)}const m=e=>{let t=e;"string"===typeof t&&(t=c.encode(t));const r=[];for(let n=0;nm(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),b=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n{let t=e;t instanceof Uint8Array&&(t=l.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return b(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class E extends Error{constructor(e,t){super(e,t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}E.code="ERR_JOSE_GENERIC";class w extends E{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:r,reason:n,payload:t}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=n,this.payload=t}}w.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class R extends E{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:r,reason:n,payload:t}}),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=n,this.payload=t}}R.code="ERR_JWT_EXPIRED";class A extends E{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}A.code="ERR_JOSE_ALG_NOT_ALLOWED";class S extends E{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}S.code="ERR_JOSE_NOT_SUPPORTED";class _ extends E{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),this.code="ERR_JWE_DECRYPTION_FAILED"}}_.code="ERR_JWE_DECRYPTION_FAILED";class k extends E{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}k.code="ERR_JWE_INVALID";class T extends E{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}T.code="ERR_JWS_INVALID";class C extends E{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}C.code="ERR_JWT_INVALID";class L extends E{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}L.code="ERR_JWK_INVALID";class x extends E{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}x.code="ERR_JWKS_INVALID";class P extends E{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),this.code="ERR_JWKS_NO_MATCHING_KEY"}}P.code="ERR_JWKS_NO_MATCHING_KEY";class B extends E{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}Symbol.asyncIterator,B.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class j extends E{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),this.code="ERR_JWKS_TIMEOUT"}}j.code="ERR_JWKS_TIMEOUT";class D extends E{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}D.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const U=i.getRandomValues.bind(i);function I(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new S(`Unsupported JWE Algorithm: ${e}`)}}const O=(e,t)=>{if(t.length<<3!==I(e))throw new k("Invalid Initialization Vector length")},K=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new k(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)},M=(e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let n=0,o=-1;for(;++o1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"} must be ${e}`)}function N(e,t){return e.name===t}function z(e){return parseInt(e.name.slice(4),10)}function $(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function F(e,t){switch(t){case"HS256":case"HS384":case"HS512":{if(!N(e.algorithm,"HMAC"))throw V("HMAC");const r=parseInt(t.slice(2),10);if(z(e.algorithm.hash)!==r)throw V(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!N(e.algorithm,"RSASSA-PKCS1-v1_5"))throw V("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(z(e.algorithm.hash)!==r)throw V(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!N(e.algorithm,"RSA-PSS"))throw V("RSA-PSS");const r=parseInt(t.slice(2),10);if(z(e.algorithm.hash)!==r)throw V(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw V("Ed25519 or Ed448");break;case"Ed25519":if(!N(e.algorithm,"Ed25519"))throw V("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!N(e.algorithm,"ECDSA"))throw V("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw V(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;o2){const t=n.pop();e+=`one of type ${n.join(", ")}, or ${t}.`}else 2===n.length?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return null==t?e+=` Received ${t}`:"function"===typeof t&&t.name?e+=` Received function ${t.name}`:"object"===typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const H=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n2?r-2:0),o=2;o!!s(e)||"KeyObject"===e?.[Symbol.toStringTag],Z=["CryptoKey"];const J=async(e,t,r,n,o,a)=>{if(!s(t)&&!(t instanceof Uint8Array))throw new TypeError(H(t,...Z,"Uint8Array"));if(!n)throw new k("JWE Initialization Vector missing");if(!o)throw new k("JWE Authentication Tag missing");switch(O(e,n),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&K(t,parseInt(e.slice(-3),10)),async function(e,t,r,n,o,s){if(!(t instanceof Uint8Array))throw new TypeError(H(t,"Uint8Array"));const a=parseInt(e.slice(1,4),10),c=await i.subtle.importKey("raw",t.subarray(a>>3),"AES-CBC",!1,["decrypt"]),l=await i.subtle.importKey("raw",t.subarray(0,a>>3),{hash:"SHA-"+(a<<1),name:"HMAC"},!1,["sign"]),d=u(s,n,r,f(s.length<<3)),p=new Uint8Array((await i.subtle.sign("HMAC",l,d)).slice(0,a>>3));let h,y;try{h=M(o,p)}catch{}if(!h)throw new _;try{y=new Uint8Array(await i.subtle.decrypt({iv:n,name:"AES-CBC"},c,r))}catch{}if(!y)throw new _;return y}(e,t,r,n,o,a);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&K(t,parseInt(e.slice(1,4),10)),async function(e,t,r,n,o,s){let a;t instanceof Uint8Array?a=await i.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(q(t,e,"decrypt"),a=t);try{return new Uint8Array(await i.subtle.decrypt({additionalData:s,iv:n,name:"AES-GCM",tagLength:128},a,u(r,o)))}catch{throw new _}}(e,t,r,n,o,a);default:throw new S("Unsupported JWE Content Encryption Algorithm")}},Q=function(){for(var e=arguments.length,t=new Array(e),r=0;r{const n=await re(t,e,"wrapKey");te(n,e);const o=await i.subtle.importKey("raw",r,...ee);return new Uint8Array(await i.subtle.wrapKey("raw",o,n,"AES-KW"))},oe=async(e,t,r)=>{const n=await re(t,e,"unwrapKey");te(n,e);const o=await i.subtle.unwrapKey("raw",r,n,"AES-KW",...ee);return new Uint8Array(await i.subtle.exportKey("raw",o))};async function ie(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Uint8Array(0),l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new Uint8Array(0);if(!s(e))throw new TypeError(H(e,...Z));if(q(e,"ECDH"),!s(t))throw new TypeError(H(t,...Z));q(t,"ECDH","deriveBits");const d=u(y(c.encode(r)),y(o),y(l),h(n));let p;p="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3;return async function(e,t,r){const n=Math.ceil((t>>3)/32),o=new Uint8Array(32*n);for(let i=0;i>3)}(new Uint8Array(await i.subtle.deriveBits({name:e.algorithm.name,public:e},t,p)),n,d)}function se(e){if(!s(e))throw new TypeError(H(e,...Z));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function ae(e,t,r,n){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new k("PBES2 Salt Input must be 8 or more octets")}(e);const o=function(e,t){return u(c.encode(e),new Uint8Array([0]),t)}(t,e),a=parseInt(t.slice(13,16),10),l={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},d={length:a,name:"AES-KW"},p=await function(e,t){if(e instanceof Uint8Array)return i.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(s(e))return q(e,t,"deriveBits","deriveKey"),e;throw new TypeError(H(e,...Z,"Uint8Array"))}(n,t);if(p.usages.includes("deriveBits"))return new Uint8Array(await i.subtle.deriveBits(l,p,a));if(p.usages.includes("deriveKey"))return i.subtle.deriveKey(l,p,d,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}function ce(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new S(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const le=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!==typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function de(e){return Y(e)&&"string"===typeof e.kty}const ue=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:t,keyUsages:r}=function(e){let t,r;switch(e.kty){case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new S('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new S('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"OKP":switch(e.alg){case"Ed25519":t={name:"Ed25519"},r=e.d?["sign"]:["verify"];break;case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new S('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new S('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),n=[t,e.ext??!1,e.key_ops??r],o={...e};return delete o.alg,delete o.use,i.subtle.importKey("jwk",o,...n)},pe=e=>v(e);let fe,he;const ye=e=>"KeyObject"===e?.[Symbol.toStringTag],me=async function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=e.get(t);if(i?.[n])return i[n];const s=await ue({...r,alg:n});return o&&Object.freeze(t),i?i[n]=s:e.set(t,{[n]:s}),s},ge=(e,t)=>{if(ye(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?pe(r.k):(he||(he=new WeakMap),me(he,e,r,t))}if(de(e)){if(e.k)return v(e.k);he||(he=new WeakMap);return me(he,e,e,t,!0)}return e},be=(e,t)=>{if(ye(e)){let r=e.export({format:"jwk"});return r.k?pe(r.k):(fe||(fe=new WeakMap),me(fe,e,r,t))}if(de(e)){if(e.k)return v(e.k);fe||(fe=new WeakMap);return me(fe,e,e,t,!0)}return e};function ve(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new S(`Unsupported JWE Algorithm: ${e}`)}}const Ee=e=>U(new Uint8Array(ve(e)>>3)),we=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join("\n")}\n-----END ${t}-----`,Re=async(e,t,r)=>{if(!s(r))throw new TypeError(H(r,...Z));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==e)throw new TypeError(`key is not a ${e} key`);return we(m(new Uint8Array(await i.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},Ae=e=>Re("public","spki",e),Se=e=>Re("private","pkcs8",e),_e=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;0===r&&(t.unshift(t.length),t.unshift(6));const n=e.indexOf(t[0],r);if(-1===n)return!1;const o=e.subarray(n,n+t.length);return o.length===t.length&&(o.every(((e,r)=>e===t[r]))||_e(e,t,n+1))},ke=e=>{switch(!0){case _e(e,[42,134,72,206,61,3,1,7]):return"P-256";case _e(e,[43,129,4,0,34]):return"P-384";case _e(e,[43,129,4,0,35]):return"P-521";case _e(e,[43,101,110]):return"X25519";case _e(e,[43,101,111]):return"X448";case _e(e,[43,101,112]):return"Ed25519";case _e(e,[43,101,113]):return"Ed448";default:throw new S("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},Te=async(e,t,r,n,o)=>{let s,a;const c=new Uint8Array(atob(r.replace(e,"")).split("").map((e=>e.charCodeAt(0)))),l="spki"===t;switch(n){case"PS256":case"PS384":case"PS512":s={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},a=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":s={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},a=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":s={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},a=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":s={name:"ECDSA",namedCurve:"P-256"},a=l?["verify"]:["sign"];break;case"ES384":s={name:"ECDSA",namedCurve:"P-384"},a=l?["verify"]:["sign"];break;case"ES512":s={name:"ECDSA",namedCurve:"P-521"},a=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const e=ke(c);s=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},a=l?[]:["deriveBits"];break}case"Ed25519":s={name:"Ed25519"},a=l?["verify"]:["sign"];break;case"EdDSA":s={name:ke(c)},a=l?["verify"]:["sign"];break;default:throw new S('Invalid or unsupported "alg" (Algorithm) value')}return i.subtle.importKey(t,c,s,o?.extractable??!1,a)},Ce=(e,t,r)=>Te(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r),Le=(e,t,r)=>Te(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r);function xe(e){const t=[];let r=0;for(;r=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let n=0;if(e[t]<128)n=e[t],t++;else{if(128===n){for(n=0;0!==e[t+n]||0!==e[t+n+1];){if(n>e.byteLength)throw new TypeError("invalid indefinite form length");n++}const r=t+n+2;return{byteLength:r,contents:e.subarray(t,t+n),raw:e.subarray(0,r)}}{const r=127&e[t];t++,n=0;for(let o=0;o{let n;try{n=Be(e)}catch(o){throw new TypeError("Failed to parse the X.509 certificate",{cause:o})}return Le(n,t,r)};async function De(e,t,r){if("string"!==typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw new TypeError('"spki" must be SPKI formatted string');return Le(e,t,r)}async function Ue(e,t,r){if("string"!==typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw new TypeError('"x509" must be X.509 formatted string');return je(e,t,r)}async function Ie(e,t,r){if("string"!==typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return Ce(e,t,r)}async function Oe(e,t){if(!Y(e))throw new TypeError("JWK must be an object");switch(t||(t=e.alg),e.kty){case"oct":if("string"!==typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return v(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new S('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return ue({...e,alg:t});default:throw new S('Unsupported "kty" (Key Type) Parameter value')}}const Ke=e=>e?.[Symbol.toStringTag],Me=(e,t,r)=>{if(void 0!==t.use&&"sig"!==t.use)throw new TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&!0!==t.key_ops.includes?.(r))throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(void 0!==t.alg&&t.alg!==e)throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},Ve=(e,t,r,n)=>{if(!(t instanceof Uint8Array)){if(n&&de(t)){if(function(e){return de(e)&&"oct"===e.kty&&"string"===typeof e.k}(t)&&Me(e,t,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!X(t))throw new TypeError(W(e,t,...Z,"Uint8Array",n?"JSON Web Key":null));if("secret"!==t.type)throw new TypeError(`${Ke(t)} instances for symmetric algorithms must be of type "secret"`)}};function Ne(e,t,r,n){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?Ve(t,r,n,e):((e,t,r,n)=>{if(n&&de(t))switch(r){case"sign":if(function(e){return"oct"!==e.kty&&"string"===typeof e.d}(t)&&Me(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(function(e){return"oct"!==e.kty&&"undefined"===typeof e.d}(t)&&Me(e,t,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!X(t))throw new TypeError(W(e,t,...Z,n?"JSON Web Key":null));if("secret"===t.type)throw new TypeError(`${Ke(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${Ke(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${Ke(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${Ke(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${Ke(t)} instances for asymmetric algorithm encryption must be of type "public"`)})(t,r,n,e)}const ze=Ne.bind(void 0,!1),$e=Ne.bind(void 0,!0);const Fe=async(e,t,r,n,o)=>{if(!s(r)&&!(r instanceof Uint8Array))throw new TypeError(H(r,...Z,"Uint8Array"));switch(n?O(e,n):n=U(new Uint8Array(I(e)>>3)),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&K(r,parseInt(e.slice(-3),10)),async function(e,t,r,n,o){if(!(r instanceof Uint8Array))throw new TypeError(H(r,"Uint8Array"));const s=parseInt(e.slice(1,4),10),a=await i.subtle.importKey("raw",r.subarray(s>>3),"AES-CBC",!1,["encrypt"]),c=await i.subtle.importKey("raw",r.subarray(0,s>>3),{hash:"SHA-"+(s<<1),name:"HMAC"},!1,["sign"]),l=new Uint8Array(await i.subtle.encrypt({iv:n,name:"AES-CBC"},a,t)),d=u(o,n,l,f(o.length<<3));return{ciphertext:l,tag:new Uint8Array((await i.subtle.sign("HMAC",c,d)).slice(0,s>>3)),iv:n}}(e,t,r,n,o);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&K(r,parseInt(e.slice(1,4),10)),async function(e,t,r,n,o){let s;r instanceof Uint8Array?s=await i.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(q(r,e,"encrypt"),s=r);const a=new Uint8Array(await i.subtle.encrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,t)),c=a.slice(-16);return{ciphertext:a.slice(0,-16),tag:c,iv:n}}(e,t,r,n,o);default:throw new S("Unsupported JWE Content Encryption Algorithm")}};const qe=async function(e,t,r,n,o){switch(ze(e,t,"decrypt"),t=await(be?.(t,e))||t,e){case"dir":if(void 0!==r)throw new k("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new k("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!Y(n.epk))throw new k('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!se(t))throw new S("ECDH with the provided key is not allowed or not supported by your javascript runtime");const o=await Oe(n.epk,e);let i,s;if(void 0!==n.apu){if("string"!==typeof n.apu)throw new k('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{i=v(n.apu)}catch{throw new k("Failed to base64url decode the apu")}}if(void 0!==n.apv){if("string"!==typeof n.apv)throw new k('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{s=v(n.apv)}catch{throw new k("Failed to base64url decode the apv")}}const a=await ie(o,t,"ECDH-ES"===e?n.enc:e,"ECDH-ES"===e?ve(n.enc):parseInt(e.slice(-5,-2),10),i,s);if("ECDH-ES"===e)return a;if(void 0===r)throw new k("JWE Encrypted Key missing");return oe(e.slice(-6),a,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new k("JWE Encrypted Key missing");return(async(e,t,r)=>{if(!s(t))throw new TypeError(H(t,...Z));if(q(t,e,"decrypt","unwrapKey"),le(e,t),t.usages.includes("decrypt"))return new Uint8Array(await i.subtle.decrypt(ce(e),t,r));if(t.usages.includes("unwrapKey")){const n=await i.subtle.unwrapKey("raw",r,t,ce(e),...ee);return new Uint8Array(await i.subtle.exportKey("raw",n))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')})(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new k("JWE Encrypted Key missing");if("number"!==typeof n.p2c)throw new k('JOSE Header "p2c" (PBES2 Count) missing or invalid');const i=o?.maxPBES2Count||1e4;if(n.p2c>i)throw new k('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!==typeof n.p2s)throw new k('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let s;try{s=v(n.p2s)}catch{throw new k("Failed to base64url decode the p2s")}return(async(e,t,r,n,o)=>{const i=await ae(o,e,n,t);return oe(e.slice(-6),i,r)})(e,t,r,n.p2c,s)}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new k("JWE Encrypted Key missing");return oe(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(void 0===r)throw new k("JWE Encrypted Key missing");if("string"!==typeof n.iv)throw new k('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!==typeof n.tag)throw new k('JOSE Header "tag" (Authentication Tag) missing or invalid');let o,i;try{o=v(n.iv)}catch{throw new k("Failed to base64url decode the iv")}try{i=v(n.tag)}catch{throw new k("Failed to base64url decode the tag")}return async function(e,t,r,n,o){const i=e.slice(0,7);return J(i,t,r,n,o,new Uint8Array(0))}(e,t,r,o,i)}default:throw new S('Invalid or unsupported "alg" (JWE Algorithm) header value')}};const Ge=function(e,t,r,n,o){if(void 0!==o.crit&&void 0===n?.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return new Set;if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some((e=>"string"!==typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;i=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const s of n.crit){if(!i.has(s))throw new S(`Extension Header Parameter "${s}" is not recognized`);if(void 0===o[s])throw new e(`Extension Header Parameter "${s}" is missing`);if(i.get(s)&&void 0===n[s])throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`)}return new Set(n.crit)},He=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!==typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function We(e,t,r){if(!Y(e))throw new k("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new k("JOSE Header missing");if(void 0!==e.iv&&"string"!==typeof e.iv)throw new k("JWE Initialization Vector incorrect type");if("string"!==typeof e.ciphertext)throw new k("JWE Ciphertext missing or incorrect type");if(void 0!==e.tag&&"string"!==typeof e.tag)throw new k("JWE Authentication Tag incorrect type");if(void 0!==e.protected&&"string"!==typeof e.protected)throw new k("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!==typeof e.encrypted_key)throw new k("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!==typeof e.aad)throw new k("JWE AAD incorrect type");if(void 0!==e.header&&!Y(e.header))throw new k("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!Y(e.unprotected))throw new k("JWE Per-Recipient Unprotected Header incorrect type");let n;if(e.protected)try{const t=v(e.protected);n=JSON.parse(l.decode(t))}catch{throw new k("JWE Protected Header is invalid")}if(!Q(n,e.header,e.unprotected))throw new k("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const o={...n,...e.header,...e.unprotected};if(Ge(k,new Map,r?.crit,n,o),void 0!==o.zip)throw new S('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:i,enc:s}=o;if("string"!==typeof i||!i)throw new k("missing JWE Algorithm (alg) in JWE Header");if("string"!==typeof s||!s)throw new k("missing JWE Encryption Algorithm (enc) in JWE Header");const a=r&&He("keyManagementAlgorithms",r.keyManagementAlgorithms),d=r&&He("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(a&&!a.has(i)||!a&&i.startsWith("PBES2"))throw new A('"alg" (Algorithm) Header Parameter value not allowed');if(d&&!d.has(s))throw new A('"enc" (Encryption Algorithm) Header Parameter value not allowed');let p;if(void 0!==e.encrypted_key)try{p=v(e.encrypted_key)}catch{throw new k("Failed to base64url decode the encrypted_key")}let f,h,y,m=!1;"function"===typeof t&&(t=await t(n,e),m=!0);try{f=await qe(i,t,p,o,r)}catch(R){if(R instanceof TypeError||R instanceof k||R instanceof S)throw R;f=Ee(s)}if(void 0!==e.iv)try{h=v(e.iv)}catch{throw new k("Failed to base64url decode the iv")}if(void 0!==e.tag)try{y=v(e.tag)}catch{throw new k("Failed to base64url decode the tag")}const g=c.encode(e.protected??"");let b,E;b=void 0!==e.aad?u(g,c.encode("."),c.encode(e.aad)):g;try{E=v(e.ciphertext)}catch{throw new k("Failed to base64url decode the ciphertext")}const w={plaintext:await J(s,f,E,h,y,b)};if(void 0!==e.protected&&(w.protectedHeader=n),void 0!==e.aad)try{w.additionalAuthenticatedData=v(e.aad)}catch{throw new k("Failed to base64url decode the aad")}return void 0!==e.unprotected&&(w.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(w.unprotectedHeader=e.header),m?{...w,key:t}:w}async function Xe(e,t,r){if(e instanceof Uint8Array&&(e=l.decode(e)),"string"!==typeof e)throw new k("Compact JWE must be a string or Uint8Array");const{0:n,1:o,2:i,3:s,4:a,length:c}=e.split(".");if(5!==c)throw new k("Invalid Compact JWE");const d=await We({ciphertext:s,iv:i||void 0,protected:n,tag:a||void 0,encrypted_key:o||void 0},t,r),u={plaintext:d.plaintext,protectedHeader:d.protectedHeader};return"function"===typeof t?{...u,key:d.key}:u}async function Ze(e,t,r){if(!Y(e))throw new k("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(Y))throw new k("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new k("JWE Recipients has no members");for(const n of e.recipients)try{return await We({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch{}throw new _}const Je=Symbol(),Qe=async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:g(e)};if(!s(e))throw new TypeError(H(e,...Z,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:n,use:o,...a}=await i.subtle.exportKey("jwk",e);return a};async function Ye(e){return Ae(e)}async function et(e){return Se(e)}async function tt(e){return Qe(e)}const rt=async function(e,t,r,n){let o,a,c,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};switch(ze(e,r,"encrypt"),r=await(ge?.(r,e))||r,e){case"dir":c=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!se(r))throw new S("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:d,apv:u}=l;let{epk:p}=l;p||(p=(await async function(e){if(!s(e))throw new TypeError(H(e,...Z));return i.subtle.generateKey(e.algorithm,!0,["deriveBits"])}(r)).privateKey);const{x:f,y:h,crv:y,kty:m}=await tt(p),b=await ie(r,p,"ECDH-ES"===e?t:e,"ECDH-ES"===e?ve(t):parseInt(e.slice(-5,-2),10),d,u);if(a={epk:{x:f,crv:y,kty:m}},"EC"===m&&(a.epk.y=h),d&&(a.apu=g(d)),u&&(a.apv=g(u)),"ECDH-ES"===e){c=b;break}c=n||Ee(t);const v=e.slice(-6);o=await ne(v,b,c);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":c=n||Ee(t),o=await(async(e,t,r)=>{if(!s(t))throw new TypeError(H(t,...Z));if(q(t,e,"encrypt","wrapKey"),le(e,t),t.usages.includes("encrypt"))return new Uint8Array(await i.subtle.encrypt(ce(e),t,r));if(t.usages.includes("wrapKey")){const n=await i.subtle.importKey("raw",r,...ee);return new Uint8Array(await i.subtle.wrapKey("raw",n,t,ce(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')})(e,r,c);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{c=n||Ee(t);const{p2c:i,p2s:s}=l;({encryptedKey:o,...a}=await async function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2048,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:U(new Uint8Array(16));const i=await ae(o,e,n,t);return{encryptedKey:await ne(e.slice(-6),i,r),p2c:n,p2s:g(o)}}(e,r,c,i,s));break}case"A128KW":case"A192KW":case"A256KW":c=n||Ee(t),o=await ne(e,r,c);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{c=n||Ee(t);const{iv:i}=l;({encryptedKey:o,...a}=await async function(e,t,r,n){const o=e.slice(0,7),i=await Fe(o,r,t,n,new Uint8Array(0));return{encryptedKey:i.ciphertext,iv:g(i.iv),tag:g(i.tag)}}(e,r,c,i));break}default:throw new S('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:c,encryptedKey:o,parameters:a}};class nt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new k("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Q(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new k("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(Ge(k,new Map,t?.crit,this._protectedHeader,r),void 0!==r.zip)throw new S('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:n,enc:o}=r;if("string"!==typeof n||!n)throw new k('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!==typeof o||!o)throw new k('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let i,s,a,d,p;if(this._cek&&("dir"===n||"ECDH-ES"===n))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${n}`);{let r;({cek:s,encryptedKey:i,parameters:r}=await rt(n,o,e,this._cek,this._keyManagementParameters)),r&&(t&&Je in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...r}:this.setUnprotectedHeader(r):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...r}:this.setProtectedHeader(r))}d=this._protectedHeader?c.encode(g(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(p=g(this._aad),a=u(d,c.encode("."),c.encode(p))):a=d;const{ciphertext:f,tag:h,iv:y}=await Fe(o,this._plaintext,s,this._iv,a),m={ciphertext:g(f)};return y&&(m.iv=g(y)),h&&(m.tag=g(h)),i&&(m.encrypted_key=g(i)),p&&(m.aad=p),this._protectedHeader&&(m.protected=l.decode(d)),this._sharedUnprotectedHeader&&(m.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(m.header=this._unprotectedHeader),m}}class ot{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(){return this.parent.addRecipient(...arguments)}encrypt(){return this.parent.encrypt(...arguments)}done(){return this.parent}}class it{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){const r=new ot(this,e,{crit:t?.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(){if(!this._recipients.length)throw new k("at least one recipient must be added");if(1===this._recipients.length){const[e]=this._recipients,t=await new nt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(e.unprotectedHeader).encrypt(e.key,{...e.options}),r={ciphertext:t.ciphertext,iv:t.iv,recipients:[{}],tag:t.tag};return t.aad&&(r.aad=t.aad),t.protected&&(r.protected=t.protected),t.unprotected&&(r.unprotected=t.unprotected),t.encrypted_key&&(r.recipients[0].encrypted_key=t.encrypted_key),t.header&&(r.recipients[0].header=t.header),r}let e;for(let n=0;n>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:t.name};default:throw new S(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function at(e,t,r){if("sign"===r&&(t=await be(t,e)),"verify"===r&&(t=await ge(t,e)),s(t))return F(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(H(t,...Z));return i.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(H(t,...Z,"Uint8Array","JSON Web Key"))}const ct=async(e,t,r,n)=>{const o=await at(e,t,"verify");le(e,o);const s=st(e,o.algorithm);try{return await i.subtle.verify(s,o,r,n)}catch{return!1}};async function lt(e,t,r){if(!Y(e))throw new T("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new T('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!==typeof e.protected)throw new T("JWS Protected Header incorrect type");if(void 0===e.payload)throw new T("JWS Payload missing");if("string"!==typeof e.signature)throw new T("JWS Signature missing or incorrect type");if(void 0!==e.header&&!Y(e.header))throw new T("JWS Unprotected Header incorrect type");let n={};if(e.protected)try{const t=v(e.protected);n=JSON.parse(l.decode(t))}catch{throw new T("JWS Protected Header is invalid")}if(!Q(n,e.header))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...n,...e.header};let i=!0;if(Ge(T,new Map([["b64",!0]]),r?.crit,n,o).has("b64")&&(i=n.b64,"boolean"!==typeof i))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=o;if("string"!==typeof s||!s)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');const a=r&&He("algorithms",r.algorithms);if(a&&!a.has(s))throw new A('"alg" (Algorithm) Header Parameter value not allowed');if(i){if("string"!==typeof e.payload)throw new T("JWS Payload must be a string")}else if("string"!==typeof e.payload&&!(e.payload instanceof Uint8Array))throw new T("JWS Payload must be a string or an Uint8Array instance");let d=!1;"function"===typeof t?(t=await t(n,e),d=!0,$e(s,t,"verify"),de(t)&&(t=await Oe(t,s))):$e(s,t,"verify");const p=u(c.encode(e.protected??""),c.encode("."),"string"===typeof e.payload?c.encode(e.payload):e.payload);let f;try{f=v(e.signature)}catch{throw new T("Failed to base64url decode the signature")}if(!await ct(s,t,f,p))throw new D;let h;if(i)try{h=v(e.payload)}catch{throw new T("Failed to base64url decode the payload")}else h="string"===typeof e.payload?c.encode(e.payload):e.payload;const y={payload:h};return void 0!==e.protected&&(y.protectedHeader=n),void 0!==e.header&&(y.unprotectedHeader=e.header),d?{...y,key:t}:y}async function dt(e,t,r){if(e instanceof Uint8Array&&(e=l.decode(e)),"string"!==typeof e)throw new T("Compact JWS must be a string or Uint8Array");const{0:n,1:o,2:i,length:s}=e.split(".");if(3!==s)throw new T("Invalid Compact JWS");const a=await lt({payload:o,protected:n,signature:i},t,r),c={payload:a.payload,protectedHeader:a.protectedHeader};return"function"===typeof t?{...c,key:a.key}:c}async function ut(e,t,r){if(!Y(e))throw new T("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(Y))throw new T("JWS Signatures missing or incorrect type");for(const n of e.signatures)try{return await lt({header:n.header,payload:e.payload,protected:n.protected,signature:n.signature},t,r)}catch{}throw new D}const pt=e=>Math.floor(e.getTime()/1e3),ft=86400,ht=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,yt=e=>{const t=ht.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const r=parseFloat(t[2]);let n;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(60*r);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(3600*r);break;case"day":case"days":case"d":n=Math.round(r*ft);break;case"week":case"weeks":case"w":n=Math.round(604800*r);break;default:n=Math.round(31557600*r)}return"-"===t[1]||"ago"===t[4]?-n:n},mt=e=>e.toLowerCase().replace(/^application\//,""),gt=function(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{r=JSON.parse(l.decode(t))}catch{}if(!Y(r))throw new C("JWT Claims Set must be a top-level JSON object");const{typ:o}=n;if(o&&("string"!==typeof e.typ||mt(e.typ)!==mt(o)))throw new w('unexpected "typ" JWT header value',r,"typ","check_failed");const{requiredClaims:i=[],issuer:s,subject:a,audience:c,maxTokenAge:d}=n,u=[...i];void 0!==d&&u.push("iat"),void 0!==c&&u.push("aud"),void 0!==a&&u.push("sub"),void 0!==s&&u.push("iss");for(const l of new Set(u.reverse()))if(!(l in r))throw new w(`missing required "${l}" claim`,r,l,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(r.iss))throw new w('unexpected "iss" claim value',r,"iss","check_failed");if(a&&r.sub!==a)throw new w('unexpected "sub" claim value',r,"sub","check_failed");if(c&&(p=r.aud,f="string"===typeof c?[c]:c,!("string"===typeof p?f.includes(p):Array.isArray(p)&&f.some(Set.prototype.has.bind(new Set(p))))))throw new w('unexpected "aud" claim value',r,"aud","check_failed");var p,f;let h;switch(typeof n.clockTolerance){case"string":h=yt(n.clockTolerance);break;case"number":h=n.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:y}=n,m=pt(y||new Date);if((void 0!==r.iat||d)&&"number"!==typeof r.iat)throw new w('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!==typeof r.nbf)throw new w('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>m+h)throw new w('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!==typeof r.exp)throw new w('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=m-h)throw new R('"exp" claim timestamp check failed',r,"exp","check_failed")}if(d){const e=m-r.iat;if(e-h>("number"===typeof d?d:yt(d)))throw new R('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-h)throw new w('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};async function bt(e,t,r){const n=await dt(e,t,r);if(n.protectedHeader.crit?.includes("b64")&&!1===n.protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");const o={payload:gt(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return"function"===typeof t?{...o,key:n.key}:o}async function vt(e,t,r){const n=await Xe(e,t,r),o=gt(n.protectedHeader,n.plaintext,r),{protectedHeader:i}=n;if(void 0!==i.iss&&i.iss!==o.iss)throw new w('replicated "iss" claim header parameter mismatch',o,"iss","mismatch");if(void 0!==i.sub&&i.sub!==o.sub)throw new w('replicated "sub" claim header parameter mismatch',o,"sub","mismatch");if(void 0!==i.aud&&JSON.stringify(i.aud)!==JSON.stringify(o.aud))throw new w('replicated "aud" claim header parameter mismatch',o,"aud","mismatch");const s={payload:o,protectedHeader:i};return"function"===typeof t?{...s,key:n.key}:s}class Et{constructor(e){this._flattened=new nt(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){const r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}const wt=async(e,t,r)=>{const n=await at(e,t,"sign");le(e,n);const o=await i.subtle.sign(st(e,n.algorithm),n,r);return new Uint8Array(o)};class Rt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new T("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Q(this._protectedHeader,this._unprotectedHeader))throw new T("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader};let n=!0;if(Ge(T,new Map([["b64",!0]]),t?.crit,this._protectedHeader,r).has("b64")&&(n=this._protectedHeader.b64,"boolean"!==typeof n))throw new T('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:o}=r;if("string"!==typeof o||!o)throw new T('JWS "alg" (Algorithm) Header Parameter missing or invalid');$e(o,e,"sign");let i,s=this._payload;n&&(s=c.encode(g(s))),i=this._protectedHeader?c.encode(g(JSON.stringify(this._protectedHeader))):c.encode("");const a=u(i,c.encode("."),s),d=await wt(o,e,a),p={signature:g(d),payload:""};return n&&(p.payload=l.decode(s)),this._unprotectedHeader&&(p.header=this._unprotectedHeader),this._protectedHeader&&(p.protected=l.decode(i)),p}}class At{constructor(e){this._flattened=new Rt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const r=await this._flattened.sign(e,t);if(void 0===r.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class St{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(){return this.parent.addSignature(...arguments)}sign(){return this.parent.sign(...arguments)}done(){return this.parent}}class _t{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){const r=new St(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new T("at least one signature must be added");const e={signatures:[],payload:""};for(let t=0;t0&&void 0!==arguments[0]?arguments[0]:{};if(!Y(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"===typeof e?this._payload={...this._payload,nbf:kt("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:kt("setNotBefore",pt(e))}:this._payload={...this._payload,nbf:pt(new Date)+yt(e)},this}setExpirationTime(e){return"number"===typeof e?this._payload={...this._payload,exp:kt("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:kt("setExpirationTime",pt(e))}:this._payload={...this._payload,exp:pt(new Date)+yt(e)},this}setIssuedAt(e){return"undefined"===typeof e?this._payload={...this._payload,iat:pt(new Date)}:e instanceof Date?this._payload={...this._payload,iat:kt("setIssuedAt",pt(e))}:this._payload="string"===typeof e?{...this._payload,iat:kt("setIssuedAt",pt(new Date)+yt(e))}:{...this._payload,iat:kt("setIssuedAt",e)},this}}class Ct extends Tt{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){const r=new At(c.encode(JSON.stringify(this._payload)));if(r.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new C("JWTs MUST NOT use unencoded payload");return r.sign(e,t)}}class Lt extends Tt{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){const r=new Et(c.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}const xt=(e,t)=>{if("string"!==typeof e||!e)throw new L(`${t} missing or invalid`)};async function Pt(e,t){if(!Y(e))throw new TypeError("JWK must be an object");if(t??(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":xt(e.crv,'"crv" (Curve) Parameter'),xt(e.x,'"x" (X Coordinate) Parameter'),xt(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":xt(e.crv,'"crv" (Subtype of Key Pair) Parameter'),xt(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":xt(e.e,'"e" (Exponent) Parameter'),xt(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":xt(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new S('"kty" (Key Type) Parameter missing or unsupported')}const n=c.encode(JSON.stringify(r));return g(await a(t,n))}async function Bt(e,t){t??(t="sha256");const r=await Pt(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function jt(e,t){const r={...e,...t?.header};if(!Y(r.jwk))throw new T('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const n=await Oe({...r.jwk,ext:!0},r.alg);if(n instanceof Uint8Array||"public"!==n.type)throw new T('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function Dt(e){return Y(e)}function Ut(e){return"function"===typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}class It{constructor(e){if(this._cached=new WeakMap,!function(e){return e&&"object"===typeof e&&Array.isArray(e.keys)&&e.keys.every(Dt)}(e))throw new x("JSON Web Key Set malformed");this._jwks=Ut(e)}async getKey(e,t){const{alg:r,kid:n}={...e,...t?.header},o=function(e){switch("string"===typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new S('Unsupported "alg" value for a JSON Web Key Set')}}(r),i=this._jwks.keys.filter((e=>{let t=o===e.kty;if(t&&"string"===typeof n&&(t=n===e.kid),t&&"string"===typeof e.alg&&(t=r===e.alg),t&&"string"===typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":t="Ed25519"===e.crv;break;case"EdDSA":t="Ed25519"===e.crv||"Ed448"===e.crv}return t})),{0:s,length:a}=i;if(0===a)throw new P;if(1!==a){const e=new B,{_cached:t}=this;throw e[Symbol.asyncIterator]=async function*(){for(const e of i)try{yield await Ot(t,e,r)}catch{}},e}return Ot(this._cached,s,r)}}async function Ot(e,t,r){const n=e.get(t)||e.set(t,{}).get(t);if(void 0===n[r]){const e=await Oe({...t,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new x("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function Kt(e){const t=new It(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>Ut(t._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}const Mt=async(e,t,r)=>{let n,o,i=!1;"function"===typeof AbortController&&(n=new AbortController,o=setTimeout((()=>{i=!0,n.abort()}),t));const s=await fetch(e.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch((e=>{if(i)throw new j;throw e}));if(void 0!==o&&clearTimeout(o),200!==s.status)throw new E("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch{throw new E("Failed to parse the JSON Web Key Set HTTP response as JSON")}};let Vt;if("undefined"===typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 ")){Vt=`${"jose"}/${"v5.10.0"}`}const Nt=Symbol();class zt{constructor(e,t){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");var r,n;this._url=new URL(e.href),this._options={agent:t?.agent,headers:t?.headers},this._timeoutDuration="number"===typeof t?.timeoutDuration?t?.timeoutDuration:5e3,this._cooldownDuration="number"===typeof t?.cooldownDuration?t?.cooldownDuration:3e4,this._cacheMaxAge="number"===typeof t?.cacheMaxAge?t?.cacheMaxAge:6e5,void 0!==t?.[Nt]&&(this._cache=t?.[Nt],r=t?.[Nt],n=this._cacheMaxAge,"object"===typeof r&&null!==r&&"uat"in r&&"number"===typeof r.uat&&!(Date.now()-r.uat>=n)&&"jwks"in r&&Y(r.jwks)&&Array.isArray(r.jwks.keys)&&Array.prototype.every.call(r.jwks.keys,Y)&&(this._jwksTimestamp=this._cache.uat,this._local=Kt(this._cache.jwks)))}coolingDown(){return"number"===typeof this._jwksTimestamp&&Date.now(){this._local=Kt(e),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=e),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function $t(e,t){const r=new zt(e,t),n=async(e,t)=>r.getKey(e,t);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>r._local?.jwks(),enumerable:!0,configurable:!1,writable:!1}}),n}const Ft=Nt;class qt extends Tt{encode(){return`${g(JSON.stringify({alg:"none"}))}.${g(JSON.stringify(this._payload))}.`}static decode(e,t){if("string"!==typeof e)throw new C("Unsecured JWT must be a string");const{0:r,1:n,2:o,length:i}=e.split(".");if(3!==i||""!==o)throw new C("Invalid Unsecured JWT");let s;try{if(s=JSON.parse(l.decode(v(r))),"none"!==s.alg)throw new Error}catch{throw new C("Invalid Unsecured JWT")}return{payload:gt(s,v(n),t),header:s}}}const Gt=g,Ht=v;function Wt(e){let t;if("string"===typeof e){const r=e.split(".");3!==r.length&&5!==r.length||([t]=r)}else if("object"===typeof e&&e){if(!("protected"in e))throw new TypeError("Token does not contain a Protected Header");t=e.protected}try{if("string"!==typeof t||!t)throw new Error;const e=JSON.parse(l.decode(Ht(t)));if(!Y(e))throw new Error;return e}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}function Xt(e){if("string"!==typeof e)throw new C("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:r}=e.split(".");if(5===r)throw new C("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new C("Invalid JWT");if(!t)throw new C("JWTs must contain a payload");let n,o;try{n=Ht(t)}catch{throw new C("Failed to base64url decode the payload")}try{o=JSON.parse(l.decode(n))}catch{throw new C("Failed to parse the decoded payload as JSON")}if(!Y(o))throw new C("Invalid JWT Claims Set");return o}function Zt(e){const t=e?.modulusLength??2048;if("number"!==typeof t||t<2048)throw new S("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}async function Jt(e,t){return async function(e,t){let r,n;switch(e){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Zt(t)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Zt(t)},n=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Zt(t)},n=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":r={name:"ECDSA",namedCurve:"P-256"},n=["sign","verify"];break;case"ES384":r={name:"ECDSA",namedCurve:"P-384"},n=["sign","verify"];break;case"ES512":r={name:"ECDSA",namedCurve:"P-521"},n=["sign","verify"];break;case"Ed25519":r={name:"Ed25519"},n=["sign","verify"];break;case"EdDSA":{n=["sign","verify"];const e=t?.crv??"Ed25519";switch(e){case"Ed25519":case"Ed448":r={name:e};break;default:throw new S("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{n=["deriveKey","deriveBits"];const e=t?.crv??"P-256";switch(e){case"P-256":case"P-384":case"P-521":r={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":r={name:e};break;default:throw new S("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new S('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(r,t?.extractable??!1,n)}(e,t)}async function Qt(e,t){return async function(e,t){let r,n,o;switch(e){case"HS256":case"HS384":case"HS512":r=parseInt(e.slice(-3),10),n={name:"HMAC",hash:`SHA-${r}`,length:r},o=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r=parseInt(e.slice(-3),10),U(new Uint8Array(r>>3));case"A128KW":case"A192KW":case"A256KW":r=parseInt(e.slice(1,4),10),n={name:"AES-KW",length:r},o=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":r=parseInt(e.slice(1,4),10),n={name:"AES-GCM",length:r},o=["encrypt","decrypt"];break;default:throw new S('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(n,t?.extractable??!1,o)}(e,t)}const Yt="WebCryptoAPI"},5684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INTERACTIONSHARE=t.INTERACTIONQUOTE=t.INTERACTIONREPLY=t.INTERACTIONREPOST=t.INTERACTIONLIKE=t.INTERACTIONSEEN=t.CONTENTMODEVIDEO=t.CONTENTMODEUNSPECIFIED=t.CLICKTHROUGHEMBED=t.CLICKTHROUGHREPOSTER=t.CLICKTHROUGHAUTHOR=t.CLICKTHROUGHITEM=t.REQUESTMORE=t.REQUESTLESS=void 0,t.isPostView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#postView"===e.$type},t.validatePostView=function(e){return o.lexicons.validate("app.bsky.feed.defs#postView",e)},t.isViewerState=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#viewerState"===e.$type},t.validateViewerState=function(e){return o.lexicons.validate("app.bsky.feed.defs#viewerState",e)},t.isThreadContext=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#threadContext"===e.$type},t.validateThreadContext=function(e){return o.lexicons.validate("app.bsky.feed.defs#threadContext",e)},t.isFeedViewPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#feedViewPost"===e.$type},t.validateFeedViewPost=function(e){return o.lexicons.validate("app.bsky.feed.defs#feedViewPost",e)},t.isReplyRef=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#replyRef"===e.$type},t.validateReplyRef=function(e){return o.lexicons.validate("app.bsky.feed.defs#replyRef",e)},t.isReasonRepost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#reasonRepost"===e.$type},t.validateReasonRepost=function(e){return o.lexicons.validate("app.bsky.feed.defs#reasonRepost",e)},t.isReasonPin=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#reasonPin"===e.$type},t.validateReasonPin=function(e){return o.lexicons.validate("app.bsky.feed.defs#reasonPin",e)},t.isThreadViewPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#threadViewPost"===e.$type},t.validateThreadViewPost=function(e){return o.lexicons.validate("app.bsky.feed.defs#threadViewPost",e)},t.isNotFoundPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#notFoundPost"===e.$type},t.validateNotFoundPost=function(e){return o.lexicons.validate("app.bsky.feed.defs#notFoundPost",e)},t.isBlockedPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#blockedPost"===e.$type},t.validateBlockedPost=function(e){return o.lexicons.validate("app.bsky.feed.defs#blockedPost",e)},t.isBlockedAuthor=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#blockedAuthor"===e.$type},t.validateBlockedAuthor=function(e){return o.lexicons.validate("app.bsky.feed.defs#blockedAuthor",e)},t.isGeneratorView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#generatorView"===e.$type},t.validateGeneratorView=function(e){return o.lexicons.validate("app.bsky.feed.defs#generatorView",e)},t.isGeneratorViewerState=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#generatorViewerState"===e.$type},t.validateGeneratorViewerState=function(e){return o.lexicons.validate("app.bsky.feed.defs#generatorViewerState",e)},t.isSkeletonFeedPost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#skeletonFeedPost"===e.$type},t.validateSkeletonFeedPost=function(e){return o.lexicons.validate("app.bsky.feed.defs#skeletonFeedPost",e)},t.isSkeletonReasonRepost=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#skeletonReasonRepost"===e.$type},t.validateSkeletonReasonRepost=function(e){return o.lexicons.validate("app.bsky.feed.defs#skeletonReasonRepost",e)},t.isSkeletonReasonPin=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#skeletonReasonPin"===e.$type},t.validateSkeletonReasonPin=function(e){return o.lexicons.validate("app.bsky.feed.defs#skeletonReasonPin",e)},t.isThreadgateView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#threadgateView"===e.$type},t.validateThreadgateView=function(e){return o.lexicons.validate("app.bsky.feed.defs#threadgateView",e)},t.isInteraction=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.defs#interaction"===e.$type},t.validateInteraction=function(e){return o.lexicons.validate("app.bsky.feed.defs#interaction",e)};const n=r(2127),o=r(554);t.REQUESTLESS="app.bsky.feed.defs#requestLess",t.REQUESTMORE="app.bsky.feed.defs#requestMore",t.CLICKTHROUGHITEM="app.bsky.feed.defs#clickthroughItem",t.CLICKTHROUGHAUTHOR="app.bsky.feed.defs#clickthroughAuthor",t.CLICKTHROUGHREPOSTER="app.bsky.feed.defs#clickthroughReposter",t.CLICKTHROUGHEMBED="app.bsky.feed.defs#clickthroughEmbed",t.CONTENTMODEUNSPECIFIED="app.bsky.feed.defs#contentModeUnspecified",t.CONTENTMODEVIDEO="app.bsky.feed.defs#contentModeVideo",t.INTERACTIONSEEN="app.bsky.feed.defs#interactionSeen",t.INTERACTIONLIKE="app.bsky.feed.defs#interactionLike",t.INTERACTIONREPOST="app.bsky.feed.defs#interactionRepost",t.INTERACTIONREPLY="app.bsky.feed.defs#interactionReply",t.INTERACTIONQUOTE="app.bsky.feed.defs#interactionQuote",t.INTERACTIONSHARE="app.bsky.feed.defs#interactionShare"},5694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMain=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.embed.record#main"===e.$type||"app.bsky.embed.record"===e.$type)},t.validateMain=function(e){return o.lexicons.validate("app.bsky.embed.record#main",e)},t.isView=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.record#view"===e.$type},t.validateView=function(e){return o.lexicons.validate("app.bsky.embed.record#view",e)},t.isViewRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.record#viewRecord"===e.$type},t.validateViewRecord=function(e){return o.lexicons.validate("app.bsky.embed.record#viewRecord",e)},t.isViewNotFound=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.record#viewNotFound"===e.$type},t.validateViewNotFound=function(e){return o.lexicons.validate("app.bsky.embed.record#viewNotFound",e)},t.isViewBlocked=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.record#viewBlocked"===e.$type},t.validateViewBlocked=function(e){return o.lexicons.validate("app.bsky.embed.record#viewBlocked",e)},t.isViewDetached=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.embed.record#viewDetached"===e.$type},t.validateViewDetached=function(e){return o.lexicons.validate("app.bsky.embed.record#viewDetached",e)};const n=r(2127),o=r(554)},5733:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeRichText=function(e,t){t.cleanNewlines&&(e=function(e,t,r){e=e.clone();let o=e.unicodeText.utf16.match(t);for(;o&&"undefined"!==typeof o.index;){const i=e.unicodeText,s=e.unicodeText.utf16IndexToUtf8Index(o.index),a=s+new n.UnicodeString(o[0]).length;if(e.delete(s,a),e.unicodeText.utf16===i.utf16)break;e.insert(s,r),o=e.unicodeText.utf16.match(t)}return e}(e,o,i));return e};const n=r(5305),o=/[\r\n]([\u00AD\u2060\u200D\u200C\u200B\s]*[\r\n]){2,}/,i="\n\n"},5758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.actor.profile#main"===e.$type||"app.bsky.actor.profile"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.actor.profile#main",e)};const n=r(2127),o=r(554)},5781:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5812:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BSKY_LABELER_DID=void 0,t.BSKY_LABELER_DID="did:plc:ar7c4by46qjdydhdevvrndac"},5817:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRecord=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&("app.bsky.feed.post#main"===e.$type||"app.bsky.feed.post"===e.$type)},t.validateRecord=function(e){return o.lexicons.validate("app.bsky.feed.post#main",e)},t.isReplyRef=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.post#replyRef"===e.$type},t.validateReplyRef=function(e){return o.lexicons.validate("app.bsky.feed.post#replyRef",e)},t.isEntity=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.post#entity"===e.$type},t.validateEntity=function(e){return o.lexicons.validate("app.bsky.feed.post#entity",e)},t.isTextSlice=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.feed.post#textSlice"===e.$type},t.validateTextSlice=function(e){return o.lexicons.validate("app.bsky.feed.post#textSlice",e)};const n=r(2127),o=r(554)},5914:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DuplicateCreateError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"DuplicateCreate"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.DuplicateCreateError=o},5921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isJobStatus=function(e){return(0,n.isObj)(e)&&(0,n.hasProp)(e,"$type")&&"app.bsky.video.defs#jobStatus"===e.$type},t.validateJobStatus=function(e){return o.lexicons.validate("app.bsky.video.defs#jobStatus",e)};const n=r(2127),o=r(554)},5975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownFeedError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"UnknownFeed"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.UnknownFeedError=o},5985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},5999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetNotFoundError=void 0,t.toKnownErr=function(e){if(e instanceof n.XRPCError&&"SetNotFound"===e.error)return new o(e);return e};const n=r(1510);class o extends n.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}t.SetNotFoundError=o},6011:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"===typeof performance&&performance&&"function"===typeof performance.now?performance:Date,n=new Set,o="object"===typeof process&&process?process:{},i=(e,t,r,n)=>{"function"===typeof o.emitWarning?o.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let s=globalThis.AbortController,a=globalThis.AbortSignal;if("undefined"===typeof s){a=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},s=class{constructor(){t()}signal=(()=>new a)();abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==o.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?d:null:null;class d extends Array{constructor(e){super(e),this.fill(0)}}class u{heap;length;static#e=!1;static create(e){const t=l(e);if(!t)return[];u.#e=!0;const r=new u(e,t);return u.#e=!1,r}constructor(e,t){if(!u.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class p{#t;#r;#n;#o;#i;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#c;#l;#d;#u;#p;#f;#h;#y;#m;#g;#b;#v;#E;#w;#R;#A;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#E,sizes:e.#b,keyMap:e.#l,keyList:e.#d,valList:e.#u,next:e.#p,prev:e.#f,get head(){return e.#h},get tail(){return e.#y},free:e.#m,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,r,n,o)=>e.#_(t,r,n,o),moveToTail:t=>e.#k(t),indexes:t=>e.#T(t),rindexes:t=>e.#C(t),isStale:t=>e.#L(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#c}get size(){return this.#a}get fetchMethod(){return this.#i}get memoMethod(){return this.#s}get dispose(){return this.#n}get disposeAfter(){return this.#o}constructor(e){const{max:t=0,ttl:r,ttlResolution:o=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:d,allowStale:f,dispose:h,disposeAfter:y,noDisposeOnSet:m,noUpdateTTL:g,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:E,fetchMethod:w,memoMethod:R,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:k,ignoreFetchAbort:T}=e;if(0!==t&&!c(t))throw new TypeError("max option must be a nonnegative integer");const C=t?l(t):Array;if(!C)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=b,this.maxEntrySize=v||this.#r,this.sizeCalculation=E,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!==typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==R&&"function"!==typeof R)throw new TypeError("memoMethod must be a function if defined");if(this.#s=R,void 0!==w&&"function"!==typeof w)throw new TypeError("fetchMethod must be a function if specified");if(this.#i=w,this.#R=!!w,this.#l=new Map,this.#d=new Array(t).fill(void 0),this.#u=new Array(t).fill(void 0),this.#p=new C(t),this.#f=new C(t),this.#h=0,this.#y=0,this.#m=u.create(t),this.#a=0,this.#c=0,"function"===typeof h&&(this.#n=h),"function"===typeof y?(this.#o=y,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#n,this.#A=!!this.#o,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!_,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!T,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#x()}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!d,this.ttlResolution=c(o)||0===o?o:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){const e="LRU_CACHE_UNBOUNDED";if((e=>!n.has(e))(e)){n.add(e);i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,p)}}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#P(){var e=this;const t=new d(this.#t),n=new d(this.#t);this.#E=t,this.#v=n,this.#B=function(o,i){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.now();if(n[o]=0!==i?s:0,t[o]=i,0!==i&&e.ttlAutopurge){const t=setTimeout((()=>{e.#L(o)&&e.#j(e.#d[o],"expire")}),i+1);t.unref&&t.unref()}},this.#D=e=>{n[e]=0!==t[e]?r.now():0},this.#U=(e,r)=>{if(t[r]){const s=t[r],a=n[r];if(!s||!a)return;e.ttl=s,e.start=a,e.now=o||i();const c=e.now-a;e.remainingTTL=s-c}};let o=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){o=e;const t=setTimeout((()=>o=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=e=>{const r=this.#l.get(e);if(void 0===r)return 0;const s=t[r],a=n[r];if(!s||!a)return 1/0;return s-((o||i())-a)},this.#L=e=>{const r=n[e],s=t[e];return!!s&&!!r&&(o||i())-r>s}}#D=()=>{};#U=()=>{};#B=()=>{};#L=()=>!1;#x(){const e=new d(this.#t);this.#c=0,this.#b=e,this.#I=t=>{this.#c-=e[t],e[t]=0},this.#O=(e,t,r,n)=>{if(this.#S(t))return 0;if(!c(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!==typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!c(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#K=(t,r,n)=>{if(e[t]=r,this.#r){const r=this.#r-e[t];for(;this.#c>r;)this.#M(!0)}this.#c+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#c)}}#I=e=>{};#K=(e,t,r)=>{};#O=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};#T(){var e=this;let{allowStale:t=this.allowStale}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){if(e.#a)for(let r=e.#y;e.#V(r)&&(!t&&e.#L(r)||(yield r),r!==e.#h);)r=e.#f[r]}()}#C(){var e=this;let{allowStale:t=this.allowStale}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){if(e.#a)for(let r=e.#h;e.#V(r)&&(!t&&e.#L(r)||(yield r),r!==e.#y);)r=e.#p[r]}()}#V(e){return void 0!==e&&this.#l.get(this.#d[e])===e}*entries(){for(const e of this.#T())void 0===this.#u[e]||void 0===this.#d[e]||this.#S(this.#u[e])||(yield[this.#d[e],this.#u[e]])}*rentries(){for(const e of this.#C())void 0===this.#u[e]||void 0===this.#d[e]||this.#S(this.#u[e])||(yield[this.#d[e],this.#u[e]])}*keys(){for(const e of this.#T()){const t=this.#d[e];void 0===t||this.#S(this.#u[e])||(yield t)}}*rkeys(){for(const e of this.#C()){const t=this.#d[e];void 0===t||this.#S(this.#u[e])||(yield t)}}*values(){for(const e of this.#T()){void 0===this.#u[e]||this.#S(this.#u[e])||(yield this.#u[e])}}*rvalues(){for(const e of this.#C()){void 0===this.#u[e]||this.#S(this.#u[e])||(yield this.#u[e])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(const r of this.#T()){const n=this.#u[r],o=this.#S(n)?n.__staleWhileFetching:n;if(void 0!==o&&e(o,this.#d[r],this))return this.get(this.#d[r],t)}}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;for(const r of this.#T()){const n=this.#u[r],o=this.#S(n)?n.__staleWhileFetching:n;void 0!==o&&e.call(t,o,this.#d[r],this)}}rforEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;for(const r of this.#C()){const n=this.#u[r],o=this.#S(n)?n.__staleWhileFetching:n;void 0!==o&&e.call(t,o,this.#d[r],this)}}purgeStale(){let e=!1;for(const t of this.#C({allowStale:!0}))this.#L(t)&&(this.#j(this.#d[t],"expire"),e=!0);return e}info(e){const t=this.#l.get(e);if(void 0===t)return;const n=this.#u[t],o=this.#S(n)?n.__staleWhileFetching:n;if(void 0===o)return;const i={value:o};if(this.#E&&this.#v){const e=this.#E[t],n=this.#v[t];if(e&&n){const t=e-(r.now()-n);i.ttl=t,i.start=Date.now()}}return this.#b&&(i.size=this.#b[t]),i}dump(){const e=[];for(const t of this.#T({allowStale:!0})){const n=this.#d[t],o=this.#u[t],i=this.#S(o)?o.__staleWhileFetching:o;if(void 0===i||void 0===n)continue;const s={value:i};if(this.#E&&this.#v){s.ttl=this.#E[t];const e=r.now()-this.#v[t];s.start=Math.floor(Date.now()-e)}this.#b&&(s.size=this.#b[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:o,noDisposeOnSet:i=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const l=this.#O(e,t,r.size||0,s);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#j(e,"set"),this;let d=0===this.#a?void 0:this.#l.get(e);if(void 0===d)d=0===this.#a?this.#y:0!==this.#m.length?this.#m.pop():this.#a===this.#t?this.#M(!1):this.#a,this.#d[d]=e,this.#u[d]=t,this.#l.set(e,d),this.#p[this.#y]=d,this.#f[d]=this.#y,this.#y=d,this.#a++,this.#K(d,l,a),a&&(a.set="add"),c=!1;else{this.#k(d);const r=this.#u[d];if(t!==r){if(this.#R&&this.#S(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||i||(this.#w&&this.#n?.(t,e,"set"),this.#A&&this.#g?.push([t,e,"set"]))}else i||(this.#w&&this.#n?.(r,e,"set"),this.#A&&this.#g?.push([r,e,"set"]));if(this.#I(d),this.#K(d,l,a),this.#u[d]=t,a){a.set="replace";const e=r&&this.#S(r)?r.__staleWhileFetching:r;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update")}if(0===n||this.#E||this.#P(),this.#E&&(c||this.#B(d,n,o),a&&this.#U(a,d)),!i&&this.#A&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#o?.(...t)}return this}pop(){try{for(;this.#a;){const e=this.#u[this.#h];if(this.#M(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#A&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#o?.(...t)}}}#M(e){const t=this.#h,r=this.#d[t],n=this.#u[t];return this.#R&&this.#S(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#A)&&(this.#w&&this.#n?.(n,r,"evict"),this.#A&&this.#g?.push([n,r,"evict"])),this.#I(t),e&&(this.#d[t]=void 0,this.#u[t]=void 0,this.#m.push(t)),1===this.#a?(this.#h=this.#y=0,this.#m.length=0):this.#h=this.#p[t],this.#l.delete(r),this.#a--,t}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,o=this.#l.get(e);if(void 0!==o){const e=this.#u[o];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#L(o))return r&&this.#D(o),n&&(n.has="hit",this.#U(n,o)),!0;n&&(n.has="stale",this.#U(n,o))}else n&&(n.has="miss");return!1}peek(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{allowStale:r=this.allowStale}=t,n=this.#l.get(e);if(void 0===n||!r&&this.#L(n))return;const o=this.#u[n];return this.#S(o)?o.__staleWhileFetching:o}#_(e,t,r,n){var o=this;const i=void 0===t?void 0:this.#u[t];if(this.#S(i))return i;const a=new s,{signal:c}=r;c?.addEventListener("abort",(()=>a.abort(c.reason)),{signal:a.signal});const l={signal:a.signal,options:r,context:n},d=function(n){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{aborted:s}=a.signal,c=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(s&&!i?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,c&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!c&&!i)return u(a.signal.reason);const d=p;return o.#u[t]===p&&(void 0===n?d.__staleWhileFetching?o.#u[t]=d.__staleWhileFetching:o.#j(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),o.set(e,n,l.options))),n},u=n=>{const{aborted:o}=a.signal,i=o&&r.allowStaleOnFetchAbort,s=i||r.allowStaleOnFetchRejection,c=s||r.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p){!c||void 0===l.__staleWhileFetching?this.#j(e,"fetch"):i||(this.#u[t]=l.__staleWhileFetching)}if(s)return r.status&&void 0!==l.__staleWhileFetching&&(r.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw n};r.status&&(r.status.fetchDispatched=!0);const p=new Promise(((t,n)=>{const o=this.#i?.(e,i,l);o&&o instanceof Promise&&o.then((e=>t(void 0===e?void 0:e)),n),a.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>d(e,!0)))}))})).then(d,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),u(e)))),f=Object.assign(p,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,f,{...l.options,status:void 0}),t=this.#l.get(e)):this.#u[t]=f,f}#S(e){if(!this.#R)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof s}async fetch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:h,forceRefresh:y=!1,status:m,signal:g}=t;if(!this.#R)return m&&(m.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o,status:m});const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:o,ttl:i,noDisposeOnSet:s,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:f,ignoreFetchAbort:p,status:m,signal:g};let v=this.#l.get(e);if(void 0===v){m&&(m.fetch="miss");const t=this.#_(e,v,b,h);return t.__returned=t}{const t=this.#u[v];if(this.#S(t)){const e=r&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const o=this.#L(v);if(!y&&!o)return m&&(m.fetch="hit"),this.#k(v),n&&this.#D(v),m&&this.#U(m,v),t;const i=this.#_(e,v,b,h),s=void 0!==i.__staleWhileFetching&&r;return m&&(m.fetch=o?"stale":"refresh",s&&o&&(m.returnedStale=!0)),s?i.__staleWhileFetching:i.__returned=i}}async forceFetch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=await this.fetch(e,t);if(void 0===r)throw new Error("fetch() returned undefined");return r}memo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.#s;if(!r)throw new Error("no memoMethod provided to constructor");const{context:n,forceRefresh:o,...i}=t,s=this.get(e,i);if(!o&&void 0!==s)return s;const a=r(e,s,{options:i,context:n});return this.set(e,a,i),a}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:i}=t,s=this.#l.get(e);if(void 0!==s){const t=this.#u[s],a=this.#S(t);return i&&this.#U(i,s),this.#L(s)?(i&&(i.get="stale"),a?(i&&r&&void 0!==t.__staleWhileFetching&&(i.returnedStale=!0),r?t.__staleWhileFetching:void 0):(o||this.#j(e,"expire"),i&&r&&(i.returnedStale=!0),r?t:void 0)):(i&&(i.get="hit"),a?t.__staleWhileFetching:(this.#k(s),n&&this.#D(s),t))}i&&(i.get="miss")}#N(e,t){this.#f[t]=e,this.#p[e]=t}#k(e){e!==this.#y&&(e===this.#h?this.#h=this.#p[e]:this.#N(this.#f[e],this.#p[e]),this.#N(this.#y,e),this.#y=e)}delete(e){return this.#j(e,"delete")}#j(e,t){let r=!1;if(0!==this.#a){const n=this.#l.get(e);if(void 0!==n)if(r=!0,1===this.#a)this.#z(t);else{this.#I(n);const r=this.#u[n];if(this.#S(r)?r.__abortController.abort(new Error("deleted")):(this.#w||this.#A)&&(this.#w&&this.#n?.(r,e,t),this.#A&&this.#g?.push([r,e,t])),this.#l.delete(e),this.#d[n]=void 0,this.#u[n]=void 0,n===this.#y)this.#y=this.#f[n];else if(n===this.#h)this.#h=this.#p[n];else{const e=this.#f[n];this.#p[e]=this.#p[n];const t=this.#p[n];this.#f[t]=this.#f[n]}this.#a--,this.#m.push(n)}}if(this.#A&&this.#g?.length){const e=this.#g;let t;for(;t=e?.shift();)this.#o?.(...t)}return r}clear(){return this.#z("delete")}#z(e){for(const t of this.#C({allowStale:!0})){const r=this.#u[t];if(this.#S(r))r.__abortController.abort(new Error("deleted"));else{const n=this.#d[t];this.#w&&this.#n?.(r,n,e),this.#A&&this.#g?.push([r,n,e])}}if(this.#l.clear(),this.#u.fill(void 0),this.#d.fill(void 0),this.#E&&this.#v&&(this.#E.fill(0),this.#v.fill(0)),this.#b&&this.#b.fill(0),this.#h=0,this.#y=0,this.#m.length=0,this.#c=0,this.#a=0,this.#A&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#o?.(...t)}}}t.LRUCache=p},6016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},6078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LexiconDefNotFoundError=t.InvalidLexiconError=t.ValidationError=t.lexiconDoc=t.lexUserType=t.lexRecord=t.lexXrpcSubscription=t.lexXrpcProcedure=t.lexXrpcQuery=t.lexXrpcError=t.lexXrpcSubscriptionMessage=t.lexXrpcBody=t.lexXrpcParameters=t.lexObject=t.lexToken=t.lexPrimitiveArray=t.lexArray=t.lexBlob=t.lexRefVariant=t.lexRefUnion=t.lexRef=t.lexIpldType=t.lexCidLink=t.lexBytes=t.lexPrimitive=t.lexUnknown=t.lexString=t.lexStringFormat=t.lexInteger=t.lexBoolean=void 0,t.isValidLexiconDoc=function(e){return t.lexiconDoc.safeParse(e).success},t.isObj=s,t.isDiscriminatedObject=function(e){return s(e)&&"$type"in e&&"string"===typeof e.$type},t.parseLexiconDoc=function(e){return t.lexiconDoc.parse(e),e};const n=r(1085),o=r(7480),i=r(3591);function s(e){return null!=e&&"object"===typeof e}t.lexBoolean=n.z.object({type:n.z.literal("boolean"),description:n.z.string().optional(),default:n.z.boolean().optional(),const:n.z.boolean().optional()}).strict(),t.lexInteger=n.z.object({type:n.z.literal("integer"),description:n.z.string().optional(),default:n.z.number().int().optional(),minimum:n.z.number().int().optional(),maximum:n.z.number().int().optional(),enum:n.z.number().int().array().optional(),const:n.z.number().int().optional()}).strict(),t.lexStringFormat=n.z.enum(["datetime","uri","at-uri","did","handle","at-identifier","nsid","cid","language","tid","record-key"]),t.lexString=n.z.object({type:n.z.literal("string"),format:t.lexStringFormat.optional(),description:n.z.string().optional(),default:n.z.string().optional(),minLength:n.z.number().int().optional(),maxLength:n.z.number().int().optional(),minGraphemes:n.z.number().int().optional(),maxGraphemes:n.z.number().int().optional(),enum:n.z.string().array().optional(),const:n.z.string().optional(),knownValues:n.z.string().array().optional()}).strict(),t.lexUnknown=n.z.object({type:n.z.literal("unknown"),description:n.z.string().optional()}).strict(),t.lexPrimitive=n.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]),t.lexBytes=n.z.object({type:n.z.literal("bytes"),description:n.z.string().optional(),maxLength:n.z.number().optional(),minLength:n.z.number().optional()}).strict(),t.lexCidLink=n.z.object({type:n.z.literal("cid-link"),description:n.z.string().optional()}).strict(),t.lexIpldType=n.z.discriminatedUnion("type",[t.lexBytes,t.lexCidLink]),t.lexRef=n.z.object({type:n.z.literal("ref"),description:n.z.string().optional(),ref:n.z.string()}).strict(),t.lexRefUnion=n.z.object({type:n.z.literal("union"),description:n.z.string().optional(),refs:n.z.string().array(),closed:n.z.boolean().optional()}).strict(),t.lexRefVariant=n.z.discriminatedUnion("type",[t.lexRef,t.lexRefUnion]),t.lexBlob=n.z.object({type:n.z.literal("blob"),description:n.z.string().optional(),accept:n.z.string().array().optional(),maxSize:n.z.number().optional()}).strict(),t.lexArray=n.z.object({type:n.z.literal("array"),description:n.z.string().optional(),items:n.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown,t.lexBytes,t.lexCidLink,t.lexRef,t.lexRefUnion,t.lexBlob]),minLength:n.z.number().int().optional(),maxLength:n.z.number().int().optional()}).strict(),t.lexPrimitiveArray=t.lexArray.merge(n.z.object({items:t.lexPrimitive}).strict()),t.lexToken=n.z.object({type:n.z.literal("token"),description:n.z.string().optional()}).strict(),t.lexObject=n.z.object({type:n.z.literal("object"),description:n.z.string().optional(),required:n.z.string().array().optional(),nullable:n.z.string().array().optional(),properties:n.z.record(n.z.discriminatedUnion("type",[t.lexArray,t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown,t.lexBytes,t.lexCidLink,t.lexRef,t.lexRefUnion,t.lexBlob]))}).strict().superRefine(i.requiredPropertiesRefinement),t.lexXrpcParameters=n.z.object({type:n.z.literal("params"),description:n.z.string().optional(),required:n.z.string().array().optional(),properties:n.z.record(n.z.discriminatedUnion("type",[t.lexPrimitiveArray,t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]))}).strict().superRefine(i.requiredPropertiesRefinement),t.lexXrpcBody=n.z.object({description:n.z.string().optional(),encoding:n.z.string(),schema:n.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcSubscriptionMessage=n.z.object({description:n.z.string().optional(),schema:n.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcError=n.z.object({name:n.z.string(),description:n.z.string().optional()}).strict(),t.lexXrpcQuery=n.z.object({type:n.z.literal("query"),description:n.z.string().optional(),parameters:t.lexXrpcParameters.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcProcedure=n.z.object({type:n.z.literal("procedure"),description:n.z.string().optional(),parameters:t.lexXrpcParameters.optional(),input:t.lexXrpcBody.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcSubscription=n.z.object({type:n.z.literal("subscription"),description:n.z.string().optional(),parameters:t.lexXrpcParameters.optional(),message:t.lexXrpcSubscriptionMessage.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexRecord=n.z.object({type:n.z.literal("record"),description:n.z.string().optional(),key:n.z.string().optional(),record:t.lexObject}).strict(),t.lexUserType=n.z.custom((e=>{if(e&&"object"===typeof e&&void 0!==e.type)switch(e.type){case"record":return t.lexRecord.parse(e);case"query":return t.lexXrpcQuery.parse(e);case"procedure":return t.lexXrpcProcedure.parse(e);case"subscription":return t.lexXrpcSubscription.parse(e);case"blob":return t.lexBlob.parse(e);case"array":return t.lexArray.parse(e);case"token":return t.lexToken.parse(e);case"object":return t.lexObject.parse(e);case"boolean":return t.lexBoolean.parse(e);case"integer":return t.lexInteger.parse(e);case"string":return t.lexString.parse(e);case"bytes":return t.lexBytes.parse(e);case"cid-link":return t.lexCidLink.parse(e);case"unknown":return t.lexUnknown.parse(e)}}),(e=>e&&"object"===typeof e?void 0===e.type?{message:"Must have a type",fatal:!0}:"string"!==typeof e.type?{message:"Type property must be a string",fatal:!0}:{message:`Invalid type: ${e.type} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,fatal:!0}:{message:"Must be an object",fatal:!0})),t.lexiconDoc=n.z.object({lexicon:n.z.literal(1),id:n.z.string().refine((e=>o.NSID.isValid(e)),{message:"Must be a valid NSID"}),revision:n.z.number().optional(),description:n.z.string().optional(),defs:n.z.record(t.lexUserType)}).strict().superRefine(((e,t)=>{for(const r in e.defs){const o=e.defs[r];"main"===r||"record"!==o.type&&"procedure"!==o.type&&"query"!==o.type&&"subscription"!==o.type||t.addIssue({code:n.z.ZodIssueCode.custom,message:"Records, procedures, queries, and subscriptions must be the main definition."})}}));class a extends Error{}t.ValidationError=a;class c extends Error{}t.InvalidLexiconError=c;class l extends Error{}t.LexiconDefNotFoundError=l},6093:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},6138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clientMetadataSchema=void 0;const n=r(1085),o=r(8511);t.clientMetadataSchema=o.oauthClientMetadataSchema.extend({client_id:n.z.union([o.oauthClientIdDiscoverableSchema,o.oauthClientIdLoopbackSchema])})},6161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toKnownErr=function(e){return e}},6194:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSubtleAlgorithm=function(e,t,r){switch(e){case"PS256":case"PS384":case"PS512":return{name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,modulusLength:r?.modulusLength??2048,publicExponent:new Uint8Array([1,0,1])};case"RS256":case"RS384":case"RS512":return{name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,modulusLength:r?.modulusLength??2048,publicExponent:new Uint8Array([1,0,1])};case"ES256":case"ES384":return{name:"ECDSA",namedCurve:`P-${e.slice(-3)}`};case"ES512":return{name:"ECDSA",namedCurve:"P-521"};default:throw new TypeError(`Unsupported alg "${e}"`)}},t.fromSubtleAlgorithm=function(e){switch(e.name){case"RSA-PSS":case"RSASSA-PKCS1-v1_5":{const t=e.hash.name;switch(t){case"SHA-256":case"SHA-384":case"SHA-512":return`${"RSA-PSS"===e.name?"PS":"RS"}${t.slice(-3)}`;default:throw new TypeError("unsupported RsaHashedKeyAlgorithm hash")}}case"ECDSA":{const t=e.namedCurve;switch(t){case"P-256":case"P-384":case"P-512":return`ES${t.slice(-3)}`;case"P-521":return"ES512";default:throw new TypeError("unsupported EcKeyAlgorithm namedCurve")}}case"Ed448":case"Ed25519":return"EdDSA";default:throw new TypeError(`Unexpected algorithm "${e.name}"`)}},t.isCryptoKeyPair=function(e,t){return"object"===typeof e&&null!==e&&"privateKey"in e&&e.privateKey instanceof CryptoKey&&"private"===e.privateKey.type&&(null==t||e.privateKey.extractable===t)&&e.privateKey.usages.includes("sign")&&"publicKey"in e&&e.publicKey instanceof CryptoKey&&"public"===e.publicKey.type&&!0===e.publicKey.extractable&&e.publicKey.usages.includes("verify")}},6211:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(436),t),o(r(599),t),o(r(8755),t),o(r(9100),t),o(r(4007),t),o(r(2283),t)},6229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidResolverCommon=void 0;const n=r(4121),o=r(469),i=r(9318);class s extends n.DidResolverBase{constructor(e){super({plc:new o.DidPlcMethod(e),web:new i.DidWebMethod(e)})}}t.DidResolverCommon=s},6235:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateLanguage=t.parseLanguage=t.b64UrlToUtf8=t.utf8ToB64Url=t.graphemeLen=t.utf8Len=void 0;const a=s(r(9797)),c=i(r(412));t.utf8Len=e=>(new TextEncoder).encode(e).byteLength;t.graphemeLen=e=>(new a.default).countGraphemes(e);t.utf8ToB64Url=e=>c.toString(c.fromString(e,"utf8"),"base64url");t.b64UrlToUtf8=e=>c.toString(c.fromString(e,"base64url"),"utf8");t.parseLanguage=e=>{const t=e.match(l);if(!t?.groups)return null;const r=t.groups;return{grandfathered:r.grandfathered,language:r.language,extlang:r.extlang,script:r.script,region:r.region,variant:r.variant,extension:r.extension,privateUse:r.privateUseA||r.privateUseB}};t.validateLanguage=e=>l.test(e);const l=/^((?(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?([A-Za-z]{2,3}(-(?[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?