Files
log/my-blog/static/assets/comment-atproto-MOwlkOMr.js
2025-06-14 13:17:09 +09:00

123 lines
1.3 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var fF=Object.defineProperty;var kS=t=>{throw TypeError(t)};var pF=(t,e,r)=>e in t?fF(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Oe=(t,e,r)=>pF(t,typeof e!="symbol"?e+"":e,r),tv=(t,e,r)=>e.has(t)||kS("Cannot "+r);var S=(t,e,r)=>(tv(t,e,"read from private field"),r?r.call(t):e.get(t)),ke=(t,e,r)=>e.has(t)?kS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ie=(t,e,r,n)=>(tv(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),W=(t,e,r)=>(tv(t,e,"access private method"),r);var Hp=(t,e,r,n)=>({set _(i){ie(t,e,i,r)},get _(){return S(t,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var C=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hF(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vy(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Bk={exports:{}},Ey={},Ik={exports:{}},Ce={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var af=Symbol.for("react.element"),mF=Symbol.for("react.portal"),yF=Symbol.for("react.fragment"),gF=Symbol.for("react.strict_mode"),bF=Symbol.for("react.profiler"),vF=Symbol.for("react.provider"),EF=Symbol.for("react.context"),wF=Symbol.for("react.forward_ref"),xF=Symbol.for("react.suspense"),_F=Symbol.for("react.memo"),RF=Symbol.for("react.lazy"),PS=Symbol.iterator;function AF(t){return t===null||typeof t!="object"?null:(t=PS&&t[PS]||t["@@iterator"],typeof t=="function"?t:null)}var jk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ok=Object.assign,Uk={};function Zl(t,e,r){this.props=t,this.context=e,this.refs=Uk,this.updater=r||jk}Zl.prototype.isReactComponent={};Zl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)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,t,e,"setState")};Zl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function $k(){}$k.prototype=Zl.prototype;function uw(t,e,r){this.props=t,this.context=e,this.refs=Uk,this.updater=r||jk}var dw=uw.prototype=new $k;dw.constructor=uw;Ok(dw,Zl.prototype);dw.isPureReactComponent=!0;var LS=Array.isArray,Vk=Object.prototype.hasOwnProperty,fw={current:null},Kk={key:!0,ref:!0,__self:!0,__source:!0};function Mk(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)Vk.call(e,n)&&!Kk.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)i[n]===void 0&&(i[n]=a[n]);return{$$typeof:af,type:t,key:o,ref:s,props:i,_owner:fw.current}}function SF(t,e){return{$$typeof:af,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function pw(t){return typeof t=="object"&&t!==null&&t.$$typeof===af}function CF(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var DS=/\/+/g;function rv(t,e){return typeof t=="object"&&t!==null&&t.key!=null?CF(""+t.key):e.toString(36)}function Vh(t,e,r,n,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case af:case mF:s=!0}}if(s)return s=t,i=i(s),t=n===""?"."+rv(s,0):n,LS(i)?(r="",t!=null&&(r=t.replace(DS,"$&/")+"/"),Vh(i,e,r,"",function(u){return u})):i!=null&&(pw(i)&&(i=SF(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(DS,"$&/")+"/")+t)),e.push(i)),1;if(s=0,n=n===""?".":n+":",LS(t))for(var a=0;a<t.length;a++){o=t[a];var c=n+rv(o,a);s+=Vh(o,e,r,c,i)}else if(c=AF(t),typeof c=="function")for(t=c.call(t),a=0;!(o=t.next()).done;)o=o.value,c=n+rv(o,a++),s+=Vh(o,e,r,c,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function Wp(t,e,r){if(t==null)return t;var n=[],i=0;return Vh(t,n,"","",function(o){return e.call(r,o,i++)}),n}function TF(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Er={current:null},Kh={transition:null},kF={ReactCurrentDispatcher:Er,ReactCurrentBatchConfig:Kh,ReactCurrentOwner:fw};function Nk(){throw Error("act(...) is not supported in production builds of React.")}Ce.Children={map:Wp,forEach:function(t,e,r){Wp(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Wp(t,function(){e++}),e},toArray:function(t){return Wp(t,function(e){return e})||[]},only:function(t){if(!pw(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ce.Component=Zl;Ce.Fragment=yF;Ce.Profiler=bF;Ce.PureComponent=uw;Ce.StrictMode=gF;Ce.Suspense=xF;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kF;Ce.act=Nk;Ce.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Ok({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=fw.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(c in e)Vk.call(e,c)&&!Kk.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&a!==void 0?a[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:af,type:t.type,key:i,ref:o,props:n,_owner:s}};Ce.createContext=function(t){return t={$$typeof:EF,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:vF,_context:t},t.Consumer=t};Ce.createElement=Mk;Ce.createFactory=function(t){var e=Mk.bind(null,t);return e.type=t,e};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(t){return{$$typeof:wF,render:t}};Ce.isValidElement=pw;Ce.lazy=function(t){return{$$typeof:RF,_payload:{_status:-1,_result:t},_init:TF}};Ce.memo=function(t,e){return{$$typeof:_F,type:t,compare:e===void 0?null:e}};Ce.startTransition=function(t){var e=Kh.transition;Kh.transition={};try{t()}finally{Kh.transition=e}};Ce.unstable_act=Nk;Ce.useCallback=function(t,e){return Er.current.useCallback(t,e)};Ce.useContext=function(t){return Er.current.useContext(t)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(t){return Er.current.useDeferredValue(t)};Ce.useEffect=function(t,e){return Er.current.useEffect(t,e)};Ce.useId=function(){return Er.current.useId()};Ce.useImperativeHandle=function(t,e,r){return Er.current.useImperativeHandle(t,e,r)};Ce.useInsertionEffect=function(t,e){return Er.current.useInsertionEffect(t,e)};Ce.useLayoutEffect=function(t,e){return Er.current.useLayoutEffect(t,e)};Ce.useMemo=function(t,e){return Er.current.useMemo(t,e)};Ce.useReducer=function(t,e,r){return Er.current.useReducer(t,e,r)};Ce.useRef=function(t){return Er.current.useRef(t)};Ce.useState=function(t){return Er.current.useState(t)};Ce.useSyncExternalStore=function(t,e,r){return Er.current.useSyncExternalStore(t,e,r)};Ce.useTransition=function(){return Er.current.useTransition()};Ce.version="18.3.1";Ik.exports=Ce;var k=Ik.exports;const hw=hF(k);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var PF=k,LF=Symbol.for("react.element"),DF=Symbol.for("react.fragment"),BF=Object.prototype.hasOwnProperty,IF=PF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jF={key:!0,ref:!0,__self:!0,__source:!0};function zk(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)BF.call(e,n)&&!jF.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:LF,type:t,key:o,ref:s,props:i,_owner:IF.current}}Ey.Fragment=DF;Ey.jsx=zk;Ey.jsxs=zk;Bk.exports=Ey;var D=Bk.exports,_0={},Fk={exports:{}},rn={},qk={exports:{}},Gk={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function e(q,oe){var de=q.length;q.push(oe);e:for(;0<de;){var ue=de-1>>>1,Fe=q[ue];if(0<i(Fe,oe))q[ue]=oe,q[de]=Fe,de=ue;else break e}}function r(q){return q.length===0?null:q[0]}function n(q){if(q.length===0)return null;var oe=q[0],de=q.pop();if(de!==oe){q[0]=de;e:for(var ue=0,Fe=q.length,Bn=Fe>>>1;ue<Bn;){var qr=2*(ue+1)-1,Ni=q[qr],zt=qr+1,U=q[zt];if(0>i(Ni,de))zt<Fe&&0>i(U,Ni)?(q[ue]=U,q[zt]=de,ue=zt):(q[ue]=Ni,q[qr]=de,ue=qr);else if(zt<Fe&&0>i(U,de))q[ue]=U,q[zt]=de,ue=zt;else break e}}return oe}function i(q,oe){var de=q.sortIndex-oe.sortIndex;return de!==0?de:q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var c=[],u=[],d=1,f=null,h=3,m=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(q){for(var oe=r(u);oe!==null;){if(oe.callback===null)n(u);else if(oe.startTime<=q)n(u),oe.sortIndex=oe.expirationTime,e(c,oe);else break;oe=r(u)}}function _(q){if(v=!1,E(q),!g)if(r(c)!==null)g=!0,Ke(T);else{var oe=r(u);oe!==null&&Ar(_,oe.startTime-q)}}function T(q,oe){g=!1,v&&(v=!1,y(O),O=-1),m=!0;var de=h;try{for(E(oe),f=r(c);f!==null&&(!(f.expirationTime>oe)||q&&!ze());){var ue=f.callback;if(typeof ue=="function"){f.callback=null,h=f.priorityLevel;var Fe=ue(f.expirationTime<=oe);oe=t.unstable_now(),typeof Fe=="function"?f.callback=Fe:f===r(c)&&n(c),E(oe)}else n(c);f=r(c)}if(f!==null)var Bn=!0;else{var qr=r(u);qr!==null&&Ar(_,qr.startTime-oe),Bn=!1}return Bn}finally{f=null,h=de,m=!1}}var B=!1,I=null,O=-1,F=5,re=-1;function ze(){return!(t.unstable_now()-re<F)}function Rt(){if(I!==null){var q=t.unstable_now();re=q;var oe=!0;try{oe=I(!0,q)}finally{oe?Nt():(B=!1,I=null)}}else B=!1}var Nt;if(typeof b=="function")Nt=function(){b(Rt)};else if(typeof MessageChannel<"u"){var tt=new MessageChannel,sn=tt.port2;tt.port1.onmessage=Rt,Nt=function(){sn.postMessage(null)}}else Nt=function(){w(Rt,0)};function Ke(q){I=q,B||(B=!0,Nt())}function Ar(q,oe){O=w(function(){q(t.unstable_now())},oe)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(q){q.callback=null},t.unstable_continueExecution=function(){g||m||(g=!0,Ke(T))},t.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<q?Math.floor(1e3/q):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(q){switch(h){case 1:case 2:case 3:var oe=3;break;default:oe=h}var de=h;h=oe;try{return q()}finally{h=de}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(q,oe){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var de=h;h=q;try{return oe()}finally{h=de}},t.unstable_scheduleCallback=function(q,oe,de){var ue=t.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?ue+de:ue):de=ue,q){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=de+Fe,q={id:d++,callback:oe,priorityLevel:q,startTime:de,expirationTime:Fe,sortIndex:-1},de>ue?(q.sortIndex=de,e(u,q),r(c)===null&&q===r(u)&&(v?(y(O),O=-1):v=!0,Ar(_,de-ue))):(q.sortIndex=Fe,e(c,q),g||m||(g=!0,Ke(T))),q},t.unstable_shouldYield=ze,t.unstable_wrapCallback=function(q){var oe=h;return function(){var de=h;h=oe;try{return q.apply(this,arguments)}finally{h=de}}}})(Gk);qk.exports=Gk;var OF=qk.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var UF=k,en=OF;function $(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hk=new Set,Ed={};function Ua(t,e){jl(t,e),jl(t+"Capture",e)}function jl(t,e){for(Ed[t]=e,t=0;t<e.length;t++)Hk.add(e[t])}var ho=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R0=Object.prototype.hasOwnProperty,$F=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,BS={},IS={};function VF(t){return R0.call(IS,t)?!0:R0.call(BS,t)?!1:$F.test(t)?IS[t]=!0:(BS[t]=!0,!1)}function KF(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function MF(t,e,r,n){if(e===null||typeof e>"u"||KF(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function wr(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var Wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Wt[t]=new wr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Wt[e]=new wr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Wt[t]=new wr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Wt[t]=new wr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Wt[t]=new wr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Wt[t]=new wr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Wt[t]=new wr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Wt[t]=new wr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Wt[t]=new wr(t,5,!1,t.toLowerCase(),null,!1,!1)});var mw=/[\-:]([a-z])/g;function yw(t){return t[1].toUpperCase()}"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(t){var e=t.replace(mw,yw);Wt[e]=new wr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(mw,yw);Wt[e]=new wr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(mw,yw);Wt[e]=new wr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Wt[t]=new wr(t,1,!1,t.toLowerCase(),null,!1,!1)});Wt.xlinkHref=new wr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Wt[t]=new wr(t,1,!1,t.toLowerCase(),null,!0,!0)});function gw(t,e,r,n){var i=Wt.hasOwnProperty(e)?Wt[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(MF(e,r,i,n)&&(r=null),n||i===null?VF(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var wo=UF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xp=Symbol.for("react.element"),ll=Symbol.for("react.portal"),cl=Symbol.for("react.fragment"),bw=Symbol.for("react.strict_mode"),A0=Symbol.for("react.profiler"),Wk=Symbol.for("react.provider"),Xk=Symbol.for("react.context"),vw=Symbol.for("react.forward_ref"),S0=Symbol.for("react.suspense"),C0=Symbol.for("react.suspense_list"),Ew=Symbol.for("react.memo"),Mo=Symbol.for("react.lazy"),Jk=Symbol.for("react.offscreen"),jS=Symbol.iterator;function Ru(t){return t===null||typeof t!="object"?null:(t=jS&&t[jS]||t["@@iterator"],typeof t=="function"?t:null)}var lt=Object.assign,nv;function Xu(t){if(nv===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);nv=e&&e[1]||""}return`
`+nv+t}var iv=!1;function ov(t,e){if(!t||iv)return"";iv=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=n.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var c=`
`+i[s].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=s&&0<=a);break}}}finally{iv=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Xu(t):""}function NF(t){switch(t.tag){case 5:return Xu(t.type);case 16:return Xu("Lazy");case 13:return Xu("Suspense");case 19:return Xu("SuspenseList");case 0:case 2:case 15:return t=ov(t.type,!1),t;case 11:return t=ov(t.type.render,!1),t;case 1:return t=ov(t.type,!0),t;default:return""}}function T0(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case cl:return"Fragment";case ll:return"Portal";case A0:return"Profiler";case bw:return"StrictMode";case S0:return"Suspense";case C0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Xk:return(t.displayName||"Context")+".Consumer";case Wk:return(t._context.displayName||"Context")+".Provider";case vw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ew:return e=t.displayName||null,e!==null?e:T0(t.type)||"Memo";case Mo:e=t._payload,t=t._init;try{return T0(t(e))}catch{}}return null}function zF(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T0(e);case 8:return e===bw?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ls(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Zk(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function FF(t){var e=Zk(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Jp(t){t._valueTracker||(t._valueTracker=FF(t))}function Qk(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Zk(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function mm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function k0(t,e){var r=e.checked;return lt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function OS(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ls(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Yk(t,e){e=e.checked,e!=null&&gw(t,"checked",e,!1)}function P0(t,e){Yk(t,e);var r=ls(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?L0(t,e.type,r):e.hasOwnProperty("defaultValue")&&L0(t,e.type,ls(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function US(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function L0(t,e,r){(e!=="number"||mm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ju=Array.isArray;function Rl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+ls(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function D0(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error($(91));return lt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function $S(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error($(92));if(Ju(r)){if(1<r.length)throw Error($(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:ls(r)}}function eP(t,e){var r=ls(e.value),n=ls(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function VS(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function tP(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function B0(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?tP(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Zp,rP=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Zp=Zp||document.createElement("div"),Zp.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Zp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function wd(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var rd={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},qF=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(t){qF.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),rd[e]=rd[t]})});function nP(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||rd.hasOwnProperty(t)&&rd[t]?(""+e).trim():e+"px"}function iP(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=nP(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var GF=lt({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 I0(t,e){if(e){if(GF[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error($(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error($(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error($(61))}if(e.style!=null&&typeof e.style!="object")throw Error($(62))}}function j0(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 O0=null;function ww(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var U0=null,Al=null,Sl=null;function KS(t){if(t=uf(t)){if(typeof U0!="function")throw Error($(280));var e=t.stateNode;e&&(e=Ay(e),U0(t.stateNode,t.type,e))}}function oP(t){Al?Sl?Sl.push(t):Sl=[t]:Al=t}function sP(){if(Al){var t=Al,e=Sl;if(Sl=Al=null,KS(t),e)for(t=0;t<e.length;t++)KS(e[t])}}function aP(t,e){return t(e)}function lP(){}var sv=!1;function cP(t,e,r){if(sv)return t(e,r);sv=!0;try{return aP(t,e,r)}finally{sv=!1,(Al!==null||Sl!==null)&&(lP(),sP())}}function xd(t,e){var r=t.stateNode;if(r===null)return null;var n=Ay(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error($(231,e,typeof r));return r}var $0=!1;if(ho)try{var Au={};Object.defineProperty(Au,"passive",{get:function(){$0=!0}}),window.addEventListener("test",Au,Au),window.removeEventListener("test",Au,Au)}catch{$0=!1}function HF(t,e,r,n,i,o,s,a,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(d){this.onError(d)}}var nd=!1,ym=null,gm=!1,V0=null,WF={onError:function(t){nd=!0,ym=t}};function XF(t,e,r,n,i,o,s,a,c){nd=!1,ym=null,HF.apply(WF,arguments)}function JF(t,e,r,n,i,o,s,a,c){if(XF.apply(this,arguments),nd){if(nd){var u=ym;nd=!1,ym=null}else throw Error($(198));gm||(gm=!0,V0=u)}}function $a(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function uP(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function MS(t){if($a(t)!==t)throw Error($(188))}function ZF(t){var e=t.alternate;if(!e){if(e=$a(t),e===null)throw Error($(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return MS(i),t;if(o===n)return MS(i),e;o=o.sibling}throw Error($(188))}if(r.return!==n.return)r=i,n=o;else{for(var s=!1,a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s)throw Error($(189))}}if(r.alternate!==n)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?t:e}function dP(t){return t=ZF(t),t!==null?fP(t):null}function fP(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=fP(t);if(e!==null)return e;t=t.sibling}return null}var pP=en.unstable_scheduleCallback,NS=en.unstable_cancelCallback,QF=en.unstable_shouldYield,YF=en.unstable_requestPaint,ft=en.unstable_now,e4=en.unstable_getCurrentPriorityLevel,xw=en.unstable_ImmediatePriority,hP=en.unstable_UserBlockingPriority,bm=en.unstable_NormalPriority,t4=en.unstable_LowPriority,mP=en.unstable_IdlePriority,wy=null,pi=null;function r4(t){if(pi&&typeof pi.onCommitFiberRoot=="function")try{pi.onCommitFiberRoot(wy,t,void 0,(t.current.flags&128)===128)}catch{}}var Zn=Math.clz32?Math.clz32:o4,n4=Math.log,i4=Math.LN2;function o4(t){return t>>>=0,t===0?32:31-(n4(t)/i4|0)|0}var Qp=64,Yp=4194304;function Zu(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function vm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var a=s&~i;a!==0?n=Zu(a):(o&=s,o!==0&&(n=Zu(o)))}else s=r&~i,s!==0?n=Zu(s):o!==0&&(n=Zu(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Zn(e),i=1<<r,n|=t[r],e&=~i;return n}function s4(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function a4(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-Zn(o),a=1<<s,c=i[s];c===-1?(!(a&r)||a&n)&&(i[s]=s4(a,e)):c<=e&&(t.expiredLanes|=a),o&=~a}}function K0(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function yP(){var t=Qp;return Qp<<=1,!(Qp&4194240)&&(Qp=64),t}function av(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function lf(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Zn(e),t[e]=r}function l4(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-Zn(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}function _w(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Zn(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var Ue=0;function gP(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var bP,Rw,vP,EP,wP,M0=!1,eh=[],Zo=null,Qo=null,Yo=null,_d=new Map,Rd=new Map,qo=[],c4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function zS(t,e){switch(t){case"focusin":case"focusout":Zo=null;break;case"dragenter":case"dragleave":Qo=null;break;case"mouseover":case"mouseout":Yo=null;break;case"pointerover":case"pointerout":_d.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rd.delete(e.pointerId)}}function Su(t,e,r,n,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},e!==null&&(e=uf(e),e!==null&&Rw(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function u4(t,e,r,n,i){switch(e){case"focusin":return Zo=Su(Zo,t,e,r,n,i),!0;case"dragenter":return Qo=Su(Qo,t,e,r,n,i),!0;case"mouseover":return Yo=Su(Yo,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return _d.set(o,Su(_d.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Rd.set(o,Su(Rd.get(o)||null,t,e,r,n,i)),!0}return!1}function xP(t){var e=pa(t.target);if(e!==null){var r=$a(e);if(r!==null){if(e=r.tag,e===13){if(e=uP(r),e!==null){t.blockedOn=e,wP(t.priority,function(){vP(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Mh(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=N0(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);O0=n,r.target.dispatchEvent(n),O0=null}else return e=uf(r),e!==null&&Rw(e),t.blockedOn=r,!1;e.shift()}return!0}function FS(t,e,r){Mh(t)&&r.delete(e)}function d4(){M0=!1,Zo!==null&&Mh(Zo)&&(Zo=null),Qo!==null&&Mh(Qo)&&(Qo=null),Yo!==null&&Mh(Yo)&&(Yo=null),_d.forEach(FS),Rd.forEach(FS)}function Cu(t,e){t.blockedOn===e&&(t.blockedOn=null,M0||(M0=!0,en.unstable_scheduleCallback(en.unstable_NormalPriority,d4)))}function Ad(t){function e(i){return Cu(i,t)}if(0<eh.length){Cu(eh[0],t);for(var r=1;r<eh.length;r++){var n=eh[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Zo!==null&&Cu(Zo,t),Qo!==null&&Cu(Qo,t),Yo!==null&&Cu(Yo,t),_d.forEach(e),Rd.forEach(e),r=0;r<qo.length;r++)n=qo[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<qo.length&&(r=qo[0],r.blockedOn===null);)xP(r),r.blockedOn===null&&qo.shift()}var Cl=wo.ReactCurrentBatchConfig,Em=!0;function f4(t,e,r,n){var i=Ue,o=Cl.transition;Cl.transition=null;try{Ue=1,Aw(t,e,r,n)}finally{Ue=i,Cl.transition=o}}function p4(t,e,r,n){var i=Ue,o=Cl.transition;Cl.transition=null;try{Ue=4,Aw(t,e,r,n)}finally{Ue=i,Cl.transition=o}}function Aw(t,e,r,n){if(Em){var i=N0(t,e,r,n);if(i===null)gv(t,e,n,wm,r),zS(t,n);else if(u4(i,t,e,r,n))n.stopPropagation();else if(zS(t,n),e&4&&-1<c4.indexOf(t)){for(;i!==null;){var o=uf(i);if(o!==null&&bP(o),o=N0(t,e,r,n),o===null&&gv(t,e,n,wm,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else gv(t,e,n,null,r)}}var wm=null;function N0(t,e,r,n){if(wm=null,t=ww(n),t=pa(t),t!==null)if(e=$a(t),e===null)t=null;else if(r=e.tag,r===13){if(t=uP(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return wm=t,null}function _P(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e4()){case xw:return 1;case hP:return 4;case bm:case t4:return 16;case mP:return 536870912;default:return 16}default:return 16}}var Wo=null,Sw=null,Nh=null;function RP(){if(Nh)return Nh;var t,e=Sw,r=e.length,n,i="value"in Wo?Wo.value:Wo.textContent,o=i.length;for(t=0;t<r&&e[t]===i[t];t++);var s=r-t;for(n=1;n<=s&&e[r-n]===i[o-n];n++);return Nh=i.slice(t,1<n?1-n:void 0)}function zh(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function th(){return!0}function qS(){return!1}function nn(t){function e(r,n,i,o,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?th:qS,this.isPropagationStopped=qS,this}return lt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=th)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=th)},persist:function(){},isPersistent:th}),e}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cw=nn(Ql),cf=lt({},Ql,{view:0,detail:0}),h4=nn(cf),lv,cv,Tu,xy=lt({},cf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tw,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Tu&&(Tu&&t.type==="mousemove"?(lv=t.screenX-Tu.screenX,cv=t.screenY-Tu.screenY):cv=lv=0,Tu=t),lv)},movementY:function(t){return"movementY"in t?t.movementY:cv}}),GS=nn(xy),m4=lt({},xy,{dataTransfer:0}),y4=nn(m4),g4=lt({},cf,{relatedTarget:0}),uv=nn(g4),b4=lt({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),v4=nn(b4),E4=lt({},Ql,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),w4=nn(E4),x4=lt({},Ql,{data:0}),HS=nn(x4),_4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},A4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S4(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=A4[t])?!!e[t]:!1}function Tw(){return S4}var C4=lt({},cf,{key:function(t){if(t.key){var e=_4[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=zh(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?R4[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tw,charCode:function(t){return t.type==="keypress"?zh(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?zh(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),T4=nn(C4),k4=lt({},xy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),WS=nn(k4),P4=lt({},cf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tw}),L4=nn(P4),D4=lt({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),B4=nn(D4),I4=lt({},xy,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),j4=nn(I4),O4=[9,13,27,32],kw=ho&&"CompositionEvent"in window,id=null;ho&&"documentMode"in document&&(id=document.documentMode);var U4=ho&&"TextEvent"in window&&!id,AP=ho&&(!kw||id&&8<id&&11>=id),XS=" ",JS=!1;function SP(t,e){switch(t){case"keyup":return O4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CP(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ul=!1;function $4(t,e){switch(t){case"compositionend":return CP(e);case"keypress":return e.which!==32?null:(JS=!0,XS);case"textInput":return t=e.data,t===XS&&JS?null:t;default:return null}}function V4(t,e){if(ul)return t==="compositionend"||!kw&&SP(t,e)?(t=RP(),Nh=Sw=Wo=null,ul=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return AP&&e.locale!=="ko"?null:e.data;default:return null}}var K4={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 ZS(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!K4[t.type]:e==="textarea"}function TP(t,e,r,n){oP(n),e=xm(e,"onChange"),0<e.length&&(r=new Cw("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var od=null,Sd=null;function M4(t){VP(t,0)}function _y(t){var e=pl(t);if(Qk(e))return t}function N4(t,e){if(t==="change")return e}var kP=!1;if(ho){var dv;if(ho){var fv="oninput"in document;if(!fv){var QS=document.createElement("div");QS.setAttribute("oninput","return;"),fv=typeof QS.oninput=="function"}dv=fv}else dv=!1;kP=dv&&(!document.documentMode||9<document.documentMode)}function YS(){od&&(od.detachEvent("onpropertychange",PP),Sd=od=null)}function PP(t){if(t.propertyName==="value"&&_y(Sd)){var e=[];TP(e,Sd,t,ww(t)),cP(M4,e)}}function z4(t,e,r){t==="focusin"?(YS(),od=e,Sd=r,od.attachEvent("onpropertychange",PP)):t==="focusout"&&YS()}function F4(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _y(Sd)}function q4(t,e){if(t==="click")return _y(e)}function G4(t,e){if(t==="input"||t==="change")return _y(e)}function H4(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ei=typeof Object.is=="function"?Object.is:H4;function Cd(t,e){if(ei(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!R0.call(e,i)||!ei(t[i],e[i]))return!1}return!0}function e1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function t1(t,e){var r=e1(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=e1(r)}}function LP(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?LP(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function DP(){for(var t=window,e=mm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=mm(t.document)}return e}function Pw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function W4(t){var e=DP(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&LP(r.ownerDocument.documentElement,r)){if(n!==null&&Pw(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=t1(r,o);var s=t1(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var X4=ho&&"documentMode"in document&&11>=document.documentMode,dl=null,z0=null,sd=null,F0=!1;function r1(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;F0||dl==null||dl!==mm(n)||(n=dl,"selectionStart"in n&&Pw(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),sd&&Cd(sd,n)||(sd=n,n=xm(z0,"onSelect"),0<n.length&&(e=new Cw("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=dl)))}function rh(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var fl={animationend:rh("Animation","AnimationEnd"),animationiteration:rh("Animation","AnimationIteration"),animationstart:rh("Animation","AnimationStart"),transitionend:rh("Transition","TransitionEnd")},pv={},BP={};ho&&(BP=document.createElement("div").style,"AnimationEvent"in window||(delete fl.animationend.animation,delete fl.animationiteration.animation,delete fl.animationstart.animation),"TransitionEvent"in window||delete fl.transitionend.transition);function Ry(t){if(pv[t])return pv[t];if(!fl[t])return t;var e=fl[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in BP)return pv[t]=e[r];return t}var IP=Ry("animationend"),jP=Ry("animationiteration"),OP=Ry("animationstart"),UP=Ry("transitionend"),$P=new Map,n1="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 Ss(t,e){$P.set(t,e),Ua(e,[t])}for(var hv=0;hv<n1.length;hv++){var mv=n1[hv],J4=mv.toLowerCase(),Z4=mv[0].toUpperCase()+mv.slice(1);Ss(J4,"on"+Z4)}Ss(IP,"onAnimationEnd");Ss(jP,"onAnimationIteration");Ss(OP,"onAnimationStart");Ss("dblclick","onDoubleClick");Ss("focusin","onFocus");Ss("focusout","onBlur");Ss(UP,"onTransitionEnd");jl("onMouseEnter",["mouseout","mouseover"]);jl("onMouseLeave",["mouseout","mouseover"]);jl("onPointerEnter",["pointerout","pointerover"]);jl("onPointerLeave",["pointerout","pointerover"]);Ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ua("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Q4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qu));function i1(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,JF(n,e,void 0,t),t.currentTarget=null}function VP(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var o=void 0;if(e)for(var s=n.length-1;0<=s;s--){var a=n[s],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;i1(i,a,u),o=c}else for(s=0;s<n.length;s++){if(a=n[s],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;i1(i,a,u),o=c}}}if(gm)throw t=V0,gm=!1,V0=null,t}function He(t,e){var r=e[X0];r===void 0&&(r=e[X0]=new Set);var n=t+"__bubble";r.has(n)||(KP(e,t,2,!1),r.add(n))}function yv(t,e,r){var n=0;e&&(n|=4),KP(r,t,n,e)}var nh="_reactListening"+Math.random().toString(36).slice(2);function Td(t){if(!t[nh]){t[nh]=!0,Hk.forEach(function(r){r!=="selectionchange"&&(Q4.has(r)||yv(r,!1,t),yv(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[nh]||(e[nh]=!0,yv("selectionchange",!1,e))}}function KP(t,e,r,n){switch(_P(e)){case 1:var i=f4;break;case 4:i=p4;break;default:i=Aw}r=i.bind(null,e,r,t),i=void 0,!$0||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function gv(t,e,r,n,i){var o=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;a!==null;){if(s=pa(a),s===null)return;if(c=s.tag,c===5||c===6){n=o=s;continue e}a=a.parentNode}}n=n.return}cP(function(){var u=o,d=ww(r),f=[];e:{var h=$P.get(t);if(h!==void 0){var m=Cw,g=t;switch(t){case"keypress":if(zh(r)===0)break e;case"keydown":case"keyup":m=T4;break;case"focusin":g="focus",m=uv;break;case"focusout":g="blur",m=uv;break;case"beforeblur":case"afterblur":m=uv;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=GS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=y4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=L4;break;case IP:case jP:case OP:m=v4;break;case UP:m=B4;break;case"scroll":m=h4;break;case"wheel":m=j4;break;case"copy":case"cut":case"paste":m=w4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=WS}var v=(e&4)!==0,w=!v&&t==="scroll",y=v?h!==null?h+"Capture":null:h;v=[];for(var b=u,E;b!==null;){E=b;var _=E.stateNode;if(E.tag===5&&_!==null&&(E=_,y!==null&&(_=xd(b,y),_!=null&&v.push(kd(b,_,E)))),w)break;b=b.return}0<v.length&&(h=new m(h,g,null,r,d),f.push({event:h,listeners:v}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",h&&r!==O0&&(g=r.relatedTarget||r.fromElement)&&(pa(g)||g[mo]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(g=r.relatedTarget||r.toElement,m=u,g=g?pa(g):null,g!==null&&(w=$a(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(v=GS,_="onMouseLeave",y="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=WS,_="onPointerLeave",y="onPointerEnter",b="pointer"),w=m==null?h:pl(m),E=g==null?h:pl(g),h=new v(_,b+"leave",m,r,d),h.target=w,h.relatedTarget=E,_=null,pa(d)===u&&(v=new v(y,b+"enter",g,r,d),v.target=E,v.relatedTarget=w,_=v),w=_,m&&g)t:{for(v=m,y=g,b=0,E=v;E;E=Za(E))b++;for(E=0,_=y;_;_=Za(_))E++;for(;0<b-E;)v=Za(v),b--;for(;0<E-b;)y=Za(y),E--;for(;b--;){if(v===y||y!==null&&v===y.alternate)break t;v=Za(v),y=Za(y)}v=null}else v=null;m!==null&&o1(f,h,m,v,!1),g!==null&&w!==null&&o1(f,w,g,v,!0)}}e:{if(h=u?pl(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var T=N4;else if(ZS(h))if(kP)T=G4;else{T=F4;var B=z4}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=q4);if(T&&(T=T(t,u))){TP(f,T,r,d);break e}B&&B(t,h,u),t==="focusout"&&(B=h._wrapperState)&&B.controlled&&h.type==="number"&&L0(h,"number",h.value)}switch(B=u?pl(u):window,t){case"focusin":(ZS(B)||B.contentEditable==="true")&&(dl=B,z0=u,sd=null);break;case"focusout":sd=z0=dl=null;break;case"mousedown":F0=!0;break;case"contextmenu":case"mouseup":case"dragend":F0=!1,r1(f,r,d);break;case"selectionchange":if(X4)break;case"keydown":case"keyup":r1(f,r,d)}var I;if(kw)e:{switch(t){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else ul?SP(t,r)&&(O="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(AP&&r.locale!=="ko"&&(ul||O!=="onCompositionStart"?O==="onCompositionEnd"&&ul&&(I=RP()):(Wo=d,Sw="value"in Wo?Wo.value:Wo.textContent,ul=!0)),B=xm(u,O),0<B.length&&(O=new HS(O,t,null,r,d),f.push({event:O,listeners:B}),I?O.data=I:(I=CP(r),I!==null&&(O.data=I)))),(I=U4?$4(t,r):V4(t,r))&&(u=xm(u,"onBeforeInput"),0<u.length&&(d=new HS("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=I))}VP(f,e)})}function kd(t,e,r){return{instance:t,listener:e,currentTarget:r}}function xm(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=xd(t,r),o!=null&&n.unshift(kd(t,o,i)),o=xd(t,e),o!=null&&n.push(kd(t,o,i))),t=t.return}return n}function Za(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function o1(t,e,r,n,i){for(var o=e._reactName,s=[];r!==null&&r!==n;){var a=r,c=a.alternate,u=a.stateNode;if(c!==null&&c===n)break;a.tag===5&&u!==null&&(a=u,i?(c=xd(r,o),c!=null&&s.unshift(kd(r,c,a))):i||(c=xd(r,o),c!=null&&s.push(kd(r,c,a)))),r=r.return}s.length!==0&&t.push({event:e,listeners:s})}var Y4=/\r\n?/g,e8=/\u0000|\uFFFD/g;function s1(t){return(typeof t=="string"?t:""+t).replace(Y4,`
`).replace(e8,"")}function ih(t,e,r){if(e=s1(e),s1(t)!==e&&r)throw Error($(425))}function _m(){}var q0=null,G0=null;function H0(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var W0=typeof setTimeout=="function"?setTimeout:void 0,t8=typeof clearTimeout=="function"?clearTimeout:void 0,a1=typeof Promise=="function"?Promise:void 0,r8=typeof queueMicrotask=="function"?queueMicrotask:typeof a1<"u"?function(t){return a1.resolve(null).then(t).catch(n8)}:W0;function n8(t){setTimeout(function(){throw t})}function bv(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Ad(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ad(e)}function es(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function l1(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Yl=Math.random().toString(36).slice(2),di="__reactFiber$"+Yl,Pd="__reactProps$"+Yl,mo="__reactContainer$"+Yl,X0="__reactEvents$"+Yl,i8="__reactListeners$"+Yl,o8="__reactHandles$"+Yl;function pa(t){var e=t[di];if(e)return e;for(var r=t.parentNode;r;){if(e=r[mo]||r[di]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=l1(t);t!==null;){if(r=t[di])return r;t=l1(t)}return e}t=r,r=t.parentNode}return null}function uf(t){return t=t[di]||t[mo],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function pl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error($(33))}function Ay(t){return t[Pd]||null}var J0=[],hl=-1;function Cs(t){return{current:t}}function Ze(t){0>hl||(t.current=J0[hl],J0[hl]=null,hl--)}function Ge(t,e){hl++,J0[hl]=t.current,t.current=e}var cs={},ar=Cs(cs),Ir=Cs(!1),Ca=cs;function Ol(t,e){var r=t.type.contextTypes;if(!r)return cs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function jr(t){return t=t.childContextTypes,t!=null}function Rm(){Ze(Ir),Ze(ar)}function c1(t,e,r){if(ar.current!==cs)throw Error($(168));Ge(ar,e),Ge(Ir,r)}function MP(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error($(108,zF(t)||"Unknown",i));return lt({},r,n)}function Am(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cs,Ca=ar.current,Ge(ar,t),Ge(Ir,Ir.current),!0}function u1(t,e,r){var n=t.stateNode;if(!n)throw Error($(169));r?(t=MP(t,e,Ca),n.__reactInternalMemoizedMergedChildContext=t,Ze(Ir),Ze(ar),Ge(ar,t)):Ze(Ir),Ge(Ir,r)}var Zi=null,Sy=!1,vv=!1;function NP(t){Zi===null?Zi=[t]:Zi.push(t)}function s8(t){Sy=!0,NP(t)}function Ts(){if(!vv&&Zi!==null){vv=!0;var t=0,e=Ue;try{var r=Zi;for(Ue=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Zi=null,Sy=!1}catch(i){throw Zi!==null&&(Zi=Zi.slice(t+1)),pP(xw,Ts),i}finally{Ue=e,vv=!1}}return null}var ml=[],yl=0,Sm=null,Cm=0,dn=[],fn=0,Ta=null,ro=1,no="";function na(t,e){ml[yl++]=Cm,ml[yl++]=Sm,Sm=t,Cm=e}function zP(t,e,r){dn[fn++]=ro,dn[fn++]=no,dn[fn++]=Ta,Ta=t;var n=ro;t=no;var i=32-Zn(n)-1;n&=~(1<<i),r+=1;var o=32-Zn(e)+i;if(30<o){var s=i-i%5;o=(n&(1<<s)-1).toString(32),n>>=s,i-=s,ro=1<<32-Zn(e)+i|r<<i|n,no=o+t}else ro=1<<o|r<<i|n,no=t}function Lw(t){t.return!==null&&(na(t,1),zP(t,1,0))}function Dw(t){for(;t===Sm;)Sm=ml[--yl],ml[yl]=null,Cm=ml[--yl],ml[yl]=null;for(;t===Ta;)Ta=dn[--fn],dn[fn]=null,no=dn[--fn],dn[fn]=null,ro=dn[--fn],dn[fn]=null}var Yr=null,Qr=null,Ye=!1,Hn=null;function FP(t,e){var r=pn(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function d1(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Yr=t,Qr=es(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Yr=t,Qr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Ta!==null?{id:ro,overflow:no}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=pn(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Yr=t,Qr=null,!0):!1;default:return!1}}function Z0(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Q0(t){if(Ye){var e=Qr;if(e){var r=e;if(!d1(t,e)){if(Z0(t))throw Error($(418));e=es(r.nextSibling);var n=Yr;e&&d1(t,e)?FP(n,r):(t.flags=t.flags&-4097|2,Ye=!1,Yr=t)}}else{if(Z0(t))throw Error($(418));t.flags=t.flags&-4097|2,Ye=!1,Yr=t}}}function f1(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Yr=t}function oh(t){if(t!==Yr)return!1;if(!Ye)return f1(t),Ye=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!H0(t.type,t.memoizedProps)),e&&(e=Qr)){if(Z0(t))throw qP(),Error($(418));for(;e;)FP(t,e),e=es(e.nextSibling)}if(f1(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error($(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Qr=es(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Qr=null}}else Qr=Yr?es(t.stateNode.nextSibling):null;return!0}function qP(){for(var t=Qr;t;)t=es(t.nextSibling)}function Ul(){Qr=Yr=null,Ye=!1}function Bw(t){Hn===null?Hn=[t]:Hn.push(t)}var a8=wo.ReactCurrentBatchConfig;function ku(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error($(309));var n=r.stateNode}if(!n)throw Error($(147,t));var i=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var a=i.refs;s===null?delete a[o]:a[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error($(284));if(!r._owner)throw Error($(290,t))}return t}function sh(t,e){throw t=Object.prototype.toString.call(e),Error($(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function p1(t){var e=t._init;return e(t._payload)}function GP(t){function e(y,b){if(t){var E=y.deletions;E===null?(y.deletions=[b],y.flags|=16):E.push(b)}}function r(y,b){if(!t)return null;for(;b!==null;)e(y,b),b=b.sibling;return null}function n(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function i(y,b){return y=is(y,b),y.index=0,y.sibling=null,y}function o(y,b,E){return y.index=E,t?(E=y.alternate,E!==null?(E=E.index,E<b?(y.flags|=2,b):E):(y.flags|=2,b)):(y.flags|=1048576,b)}function s(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,b,E,_){return b===null||b.tag!==6?(b=Sv(E,y.mode,_),b.return=y,b):(b=i(b,E),b.return=y,b)}function c(y,b,E,_){var T=E.type;return T===cl?d(y,b,E.props.children,_,E.key):b!==null&&(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Mo&&p1(T)===b.type)?(_=i(b,E.props),_.ref=ku(y,b,E),_.return=y,_):(_=Jh(E.type,E.key,E.props,null,y.mode,_),_.ref=ku(y,b,E),_.return=y,_)}function u(y,b,E,_){return b===null||b.tag!==4||b.stateNode.containerInfo!==E.containerInfo||b.stateNode.implementation!==E.implementation?(b=Cv(E,y.mode,_),b.return=y,b):(b=i(b,E.children||[]),b.return=y,b)}function d(y,b,E,_,T){return b===null||b.tag!==7?(b=xa(E,y.mode,_,T),b.return=y,b):(b=i(b,E),b.return=y,b)}function f(y,b,E){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Sv(""+b,y.mode,E),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Xp:return E=Jh(b.type,b.key,b.props,null,y.mode,E),E.ref=ku(y,null,b),E.return=y,E;case ll:return b=Cv(b,y.mode,E),b.return=y,b;case Mo:var _=b._init;return f(y,_(b._payload),E)}if(Ju(b)||Ru(b))return b=xa(b,y.mode,E,null),b.return=y,b;sh(y,b)}return null}function h(y,b,E,_){var T=b!==null?b.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return T!==null?null:a(y,b,""+E,_);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Xp:return E.key===T?c(y,b,E,_):null;case ll:return E.key===T?u(y,b,E,_):null;case Mo:return T=E._init,h(y,b,T(E._payload),_)}if(Ju(E)||Ru(E))return T!==null?null:d(y,b,E,_,null);sh(y,E)}return null}function m(y,b,E,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(E)||null,a(b,y,""+_,T);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Xp:return y=y.get(_.key===null?E:_.key)||null,c(b,y,_,T);case ll:return y=y.get(_.key===null?E:_.key)||null,u(b,y,_,T);case Mo:var B=_._init;return m(y,b,E,B(_._payload),T)}if(Ju(_)||Ru(_))return y=y.get(E)||null,d(b,y,_,T,null);sh(b,_)}return null}function g(y,b,E,_){for(var T=null,B=null,I=b,O=b=0,F=null;I!==null&&O<E.length;O++){I.index>O?(F=I,I=null):F=I.sibling;var re=h(y,I,E[O],_);if(re===null){I===null&&(I=F);break}t&&I&&re.alternate===null&&e(y,I),b=o(re,b,O),B===null?T=re:B.sibling=re,B=re,I=F}if(O===E.length)return r(y,I),Ye&&na(y,O),T;if(I===null){for(;O<E.length;O++)I=f(y,E[O],_),I!==null&&(b=o(I,b,O),B===null?T=I:B.sibling=I,B=I);return Ye&&na(y,O),T}for(I=n(y,I);O<E.length;O++)F=m(I,y,O,E[O],_),F!==null&&(t&&F.alternate!==null&&I.delete(F.key===null?O:F.key),b=o(F,b,O),B===null?T=F:B.sibling=F,B=F);return t&&I.forEach(function(ze){return e(y,ze)}),Ye&&na(y,O),T}function v(y,b,E,_){var T=Ru(E);if(typeof T!="function")throw Error($(150));if(E=T.call(E),E==null)throw Error($(151));for(var B=T=null,I=b,O=b=0,F=null,re=E.next();I!==null&&!re.done;O++,re=E.next()){I.index>O?(F=I,I=null):F=I.sibling;var ze=h(y,I,re.value,_);if(ze===null){I===null&&(I=F);break}t&&I&&ze.alternate===null&&e(y,I),b=o(ze,b,O),B===null?T=ze:B.sibling=ze,B=ze,I=F}if(re.done)return r(y,I),Ye&&na(y,O),T;if(I===null){for(;!re.done;O++,re=E.next())re=f(y,re.value,_),re!==null&&(b=o(re,b,O),B===null?T=re:B.sibling=re,B=re);return Ye&&na(y,O),T}for(I=n(y,I);!re.done;O++,re=E.next())re=m(I,y,O,re.value,_),re!==null&&(t&&re.alternate!==null&&I.delete(re.key===null?O:re.key),b=o(re,b,O),B===null?T=re:B.sibling=re,B=re);return t&&I.forEach(function(Rt){return e(y,Rt)}),Ye&&na(y,O),T}function w(y,b,E,_){if(typeof E=="object"&&E!==null&&E.type===cl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Xp:e:{for(var T=E.key,B=b;B!==null;){if(B.key===T){if(T=E.type,T===cl){if(B.tag===7){r(y,B.sibling),b=i(B,E.props.children),b.return=y,y=b;break e}}else if(B.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Mo&&p1(T)===B.type){r(y,B.sibling),b=i(B,E.props),b.ref=ku(y,B,E),b.return=y,y=b;break e}r(y,B);break}else e(y,B);B=B.sibling}E.type===cl?(b=xa(E.props.children,y.mode,_,E.key),b.return=y,y=b):(_=Jh(E.type,E.key,E.props,null,y.mode,_),_.ref=ku(y,b,E),_.return=y,y=_)}return s(y);case ll:e:{for(B=E.key;b!==null;){if(b.key===B)if(b.tag===4&&b.stateNode.containerInfo===E.containerInfo&&b.stateNode.implementation===E.implementation){r(y,b.sibling),b=i(b,E.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else e(y,b);b=b.sibling}b=Cv(E,y.mode,_),b.return=y,y=b}return s(y);case Mo:return B=E._init,w(y,b,B(E._payload),_)}if(Ju(E))return g(y,b,E,_);if(Ru(E))return v(y,b,E,_);sh(y,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,E),b.return=y,y=b):(r(y,b),b=Sv(E,y.mode,_),b.return=y,y=b),s(y)):r(y,b)}return w}var $l=GP(!0),HP=GP(!1),Tm=Cs(null),km=null,gl=null,Iw=null;function jw(){Iw=gl=km=null}function Ow(t){var e=Tm.current;Ze(Tm),t._currentValue=e}function Y0(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Tl(t,e){km=t,Iw=gl=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Br=!0),t.firstContext=null)}function En(t){var e=t._currentValue;if(Iw!==t)if(t={context:t,memoizedValue:e,next:null},gl===null){if(km===null)throw Error($(308));gl=t,km.dependencies={lanes:0,firstContext:t}}else gl=gl.next=t;return e}var ha=null;function Uw(t){ha===null?ha=[t]:ha.push(t)}function WP(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,Uw(e)):(r.next=i.next,i.next=r),e.interleaved=r,yo(t,n)}function yo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var No=!1;function $w(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function XP(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function oo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ts(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,De&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,yo(t,r)}return i=n.interleaved,i===null?(e.next=e,Uw(n)):(e.next=i.next,i.next=e),n.interleaved=e,yo(t,r)}function Fh(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,_w(t,r)}}function h1(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=s:o=o.next=s,r=r.next}while(r!==null);o===null?i=o=e:o=o.next=e}else i=o=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Pm(t,e,r,n){var i=t.updateQueue;No=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,s===null?o=u:s.next=u,s=c;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=i.baseState;s=0,d=u=c=null,a=o;do{var h=a.lane,m=a.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,v=a;switch(h=e,m=r,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(m,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,h=typeof g=="function"?g.call(m,f,h):g,h==null)break e;f=lt({},f,h);break e;case 2:No=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,s|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);Pa|=s,t.lanes=s,t.memoizedState=f}}function m1(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error($(191,i));i.call(n)}}}var df={},hi=Cs(df),Ld=Cs(df),Dd=Cs(df);function ma(t){if(t===df)throw Error($(174));return t}function Vw(t,e){switch(Ge(Dd,e),Ge(Ld,t),Ge(hi,df),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:B0(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=B0(e,t)}Ze(hi),Ge(hi,e)}function Vl(){Ze(hi),Ze(Ld),Ze(Dd)}function JP(t){ma(Dd.current);var e=ma(hi.current),r=B0(e,t.type);e!==r&&(Ge(Ld,t),Ge(hi,r))}function Kw(t){Ld.current===t&&(Ze(hi),Ze(Ld))}var it=Cs(0);function Lm(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ev=[];function Mw(){for(var t=0;t<Ev.length;t++)Ev[t]._workInProgressVersionPrimary=null;Ev.length=0}var qh=wo.ReactCurrentDispatcher,wv=wo.ReactCurrentBatchConfig,ka=0,st=null,St=null,It=null,Dm=!1,ad=!1,Bd=0,l8=0;function Jt(){throw Error($(321))}function Nw(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!ei(t[r],e[r]))return!1;return!0}function zw(t,e,r,n,i,o){if(ka=o,st=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,qh.current=t===null||t.memoizedState===null?f8:p8,t=r(n,i),ad){o=0;do{if(ad=!1,Bd=0,25<=o)throw Error($(301));o+=1,It=St=null,e.updateQueue=null,qh.current=h8,t=r(n,i)}while(ad)}if(qh.current=Bm,e=St!==null&&St.next!==null,ka=0,It=St=st=null,Dm=!1,e)throw Error($(300));return t}function Fw(){var t=Bd!==0;return Bd=0,t}function ci(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?st.memoizedState=It=t:It=It.next=t,It}function wn(){if(St===null){var t=st.alternate;t=t!==null?t.memoizedState:null}else t=St.next;var e=It===null?st.memoizedState:It.next;if(e!==null)It=e,St=t;else{if(t===null)throw Error($(310));St=t,t={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},It===null?st.memoizedState=It=t:It=It.next=t}return It}function Id(t,e){return typeof e=="function"?e(t):e}function xv(t){var e=wn(),r=e.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=t;var n=St,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var a=s=null,c=null,u=o;do{var d=u.lane;if((ka&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,s=n):c=c.next=f,st.lanes|=d,Pa|=d}u=u.next}while(u!==null&&u!==o);c===null?s=n:c.next=a,ei(n,e.memoizedState)||(Br=!0),e.memoizedState=n,e.baseState=s,e.baseQueue=c,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do o=i.lane,st.lanes|=o,Pa|=o,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function _v(t){var e=wn(),r=e.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,o=e.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);ei(o,e.memoizedState)||(Br=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function ZP(){}function QP(t,e){var r=st,n=wn(),i=e(),o=!ei(n.memoizedState,i);if(o&&(n.memoizedState=i,Br=!0),n=n.queue,qw(tL.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||It!==null&&It.memoizedState.tag&1){if(r.flags|=2048,jd(9,eL.bind(null,r,n,i,e),void 0,null),Ut===null)throw Error($(349));ka&30||YP(r,e,i)}return i}function YP(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=st.updateQueue,e===null?(e={lastEffect:null,stores:null},st.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function eL(t,e,r,n){e.value=r,e.getSnapshot=n,rL(e)&&nL(t)}function tL(t,e,r){return r(function(){rL(e)&&nL(t)})}function rL(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!ei(t,r)}catch{return!0}}function nL(t){var e=yo(t,1);e!==null&&Qn(e,t,1,-1)}function y1(t){var e=ci();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Id,lastRenderedState:t},e.queue=t,t=t.dispatch=d8.bind(null,st,t),[e.memoizedState,t]}function jd(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=st.updateQueue,e===null?(e={lastEffect:null,stores:null},st.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function iL(){return wn().memoizedState}function Gh(t,e,r,n){var i=ci();st.flags|=t,i.memoizedState=jd(1|e,r,void 0,n===void 0?null:n)}function Cy(t,e,r,n){var i=wn();n=n===void 0?null:n;var o=void 0;if(St!==null){var s=St.memoizedState;if(o=s.destroy,n!==null&&Nw(n,s.deps)){i.memoizedState=jd(e,r,o,n);return}}st.flags|=t,i.memoizedState=jd(1|e,r,o,n)}function g1(t,e){return Gh(8390656,8,t,e)}function qw(t,e){return Cy(2048,8,t,e)}function oL(t,e){return Cy(4,2,t,e)}function sL(t,e){return Cy(4,4,t,e)}function aL(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function lL(t,e,r){return r=r!=null?r.concat([t]):null,Cy(4,4,aL.bind(null,e,t),r)}function Gw(){}function cL(t,e){var r=wn();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Nw(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function uL(t,e){var r=wn();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Nw(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function dL(t,e,r){return ka&21?(ei(r,e)||(r=yP(),st.lanes|=r,Pa|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Br=!0),t.memoizedState=r)}function c8(t,e){var r=Ue;Ue=r!==0&&4>r?r:4,t(!0);var n=wv.transition;wv.transition={};try{t(!1),e()}finally{Ue=r,wv.transition=n}}function fL(){return wn().memoizedState}function u8(t,e,r){var n=ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},pL(t))hL(e,r);else if(r=WP(t,e,r,n),r!==null){var i=vr();Qn(r,t,n,i),mL(r,e,n)}}function d8(t,e,r){var n=ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(pL(t))hL(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,r);if(i.hasEagerState=!0,i.eagerState=a,ei(a,s)){var c=e.interleaved;c===null?(i.next=i,Uw(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=WP(t,e,i,n),r!==null&&(i=vr(),Qn(r,t,n,i),mL(r,e,n))}}function pL(t){var e=t.alternate;return t===st||e!==null&&e===st}function hL(t,e){ad=Dm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function mL(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,_w(t,r)}}var Bm={readContext:En,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},f8={readContext:En,useCallback:function(t,e){return ci().memoizedState=[t,e===void 0?null:e],t},useContext:En,useEffect:g1,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Gh(4194308,4,aL.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Gh(4194308,4,t,e)},useInsertionEffect:function(t,e){return Gh(4,2,t,e)},useMemo:function(t,e){var r=ci();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ci();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=u8.bind(null,st,t),[n.memoizedState,t]},useRef:function(t){var e=ci();return t={current:t},e.memoizedState=t},useState:y1,useDebugValue:Gw,useDeferredValue:function(t){return ci().memoizedState=t},useTransition:function(){var t=y1(!1),e=t[0];return t=c8.bind(null,t[1]),ci().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=st,i=ci();if(Ye){if(r===void 0)throw Error($(407));r=r()}else{if(r=e(),Ut===null)throw Error($(349));ka&30||YP(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,g1(tL.bind(null,n,o,t),[t]),n.flags|=2048,jd(9,eL.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=ci(),e=Ut.identifierPrefix;if(Ye){var r=no,n=ro;r=(n&~(1<<32-Zn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bd++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=l8++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},p8={readContext:En,useCallback:cL,useContext:En,useEffect:qw,useImperativeHandle:lL,useInsertionEffect:oL,useLayoutEffect:sL,useMemo:uL,useReducer:xv,useRef:iL,useState:function(){return xv(Id)},useDebugValue:Gw,useDeferredValue:function(t){var e=wn();return dL(e,St.memoizedState,t)},useTransition:function(){var t=xv(Id)[0],e=wn().memoizedState;return[t,e]},useMutableSource:ZP,useSyncExternalStore:QP,useId:fL,unstable_isNewReconciler:!1},h8={readContext:En,useCallback:cL,useContext:En,useEffect:qw,useImperativeHandle:lL,useInsertionEffect:oL,useLayoutEffect:sL,useMemo:uL,useReducer:_v,useRef:iL,useState:function(){return _v(Id)},useDebugValue:Gw,useDeferredValue:function(t){var e=wn();return St===null?e.memoizedState=t:dL(e,St.memoizedState,t)},useTransition:function(){var t=_v(Id)[0],e=wn().memoizedState;return[t,e]},useMutableSource:ZP,useSyncExternalStore:QP,useId:fL,unstable_isNewReconciler:!1};function Un(t,e){if(t&&t.defaultProps){e=lt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function eE(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:lt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Ty={isMounted:function(t){return(t=t._reactInternals)?$a(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=vr(),i=ns(t),o=oo(n,i);o.payload=e,r!=null&&(o.callback=r),e=ts(t,o,i),e!==null&&(Qn(e,t,i,n),Fh(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=vr(),i=ns(t),o=oo(n,i);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=ts(t,o,i),e!==null&&(Qn(e,t,i,n),Fh(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=vr(),n=ns(t),i=oo(r,n);i.tag=2,e!=null&&(i.callback=e),e=ts(t,i,n),e!==null&&(Qn(e,t,n,r),Fh(e,t,n))}};function b1(t,e,r,n,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,s):e.prototype&&e.prototype.isPureReactComponent?!Cd(r,n)||!Cd(i,o):!0}function yL(t,e,r){var n=!1,i=cs,o=e.contextType;return typeof o=="object"&&o!==null?o=En(o):(i=jr(e)?Ca:ar.current,n=e.contextTypes,o=(n=n!=null)?Ol(t,i):cs),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Ty,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function v1(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Ty.enqueueReplaceState(e,e.state,null)}function tE(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},$w(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=En(o):(o=jr(e)?Ca:ar.current,i.context=Ol(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(eE(t,e,o,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Ty.enqueueReplaceState(i,i.state,null),Pm(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Kl(t,e){try{var r="",n=e;do r+=NF(n),n=n.return;while(n);var i=r}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Rv(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function rE(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var m8=typeof WeakMap=="function"?WeakMap:Map;function gL(t,e,r){r=oo(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){jm||(jm=!0,fE=n),rE(t,e)},r}function bL(t,e,r){r=oo(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){rE(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){rE(t,e),typeof n!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}function E1(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new m8;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=k8.bind(null,t,e,r),e.then(t,t))}function w1(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function x1(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=oo(-1,1),e.tag=2,ts(r,e,1))),r.lanes|=1),t)}var y8=wo.ReactCurrentOwner,Br=!1;function yr(t,e,r,n){e.child=t===null?HP(e,null,r,n):$l(e,t.child,r,n)}function _1(t,e,r,n,i){r=r.render;var o=e.ref;return Tl(e,i),n=zw(t,e,r,n,o,i),r=Fw(),t!==null&&!Br?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,go(t,e,i)):(Ye&&r&&Lw(e),e.flags|=1,yr(t,e,n,i),e.child)}function R1(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!ex(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,vL(t,e,o,n,i)):(t=Jh(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:Cd,r(s,n)&&t.ref===e.ref)return go(t,e,i)}return e.flags|=1,t=is(o,n),t.ref=e.ref,t.return=e,e.child=t}function vL(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(Cd(o,n)&&t.ref===e.ref)if(Br=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(Br=!0);else return e.lanes=t.lanes,go(t,e,i)}return nE(t,e,r,n,i)}function EL(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(vl,Jr),Jr|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Ge(vl,Jr),Jr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Ge(vl,Jr),Jr|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,Ge(vl,Jr),Jr|=n;return yr(t,e,i,r),e.child}function wL(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function nE(t,e,r,n,i){var o=jr(r)?Ca:ar.current;return o=Ol(e,o),Tl(e,i),r=zw(t,e,r,n,o,i),n=Fw(),t!==null&&!Br?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,go(t,e,i)):(Ye&&n&&Lw(e),e.flags|=1,yr(t,e,r,i),e.child)}function A1(t,e,r,n,i){if(jr(r)){var o=!0;Am(e)}else o=!1;if(Tl(e,i),e.stateNode===null)Hh(t,e),yL(e,r,n),tE(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var c=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=En(u):(u=jr(r)?Ca:ar.current,u=Ol(e,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||c!==u)&&v1(e,s,n,u),No=!1;var h=e.memoizedState;s.state=h,Pm(e,n,s,i),c=e.memoizedState,a!==n||h!==c||Ir.current||No?(typeof d=="function"&&(eE(e,r,d,n),c=e.memoizedState),(a=No||b1(e,r,a,n,h,c,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),s.props=n,s.state=c,s.context=u,n=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,XP(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Un(e.type,a),s.props=u,f=e.pendingProps,h=s.context,c=r.contextType,typeof c=="object"&&c!==null?c=En(c):(c=jr(r)?Ca:ar.current,c=Ol(e,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||h!==c)&&v1(e,s,n,c),No=!1,h=e.memoizedState,s.state=h,Pm(e,n,s,i);var g=e.memoizedState;a!==f||h!==g||Ir.current||No?(typeof m=="function"&&(eE(e,r,m,n),g=e.memoizedState),(u=No||b1(e,r,u,n,h,g,c)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,g,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,g,c)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=g),s.props=n,s.state=g,s.context=c,n=u):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return iE(t,e,r,n,o,i)}function iE(t,e,r,n,i,o){wL(t,e);var s=(e.flags&128)!==0;if(!n&&!s)return i&&u1(e,r,!1),go(t,e,o);n=e.stateNode,y8.current=e;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=$l(e,t.child,null,o),e.child=$l(e,null,a,o)):yr(t,e,a,o),e.memoizedState=n.state,i&&u1(e,r,!0),e.child}function xL(t){var e=t.stateNode;e.pendingContext?c1(t,e.pendingContext,e.pendingContext!==e.context):e.context&&c1(t,e.context,!1),Vw(t,e.containerInfo)}function S1(t,e,r,n,i){return Ul(),Bw(i),e.flags|=256,yr(t,e,r,n),e.child}var oE={dehydrated:null,treeContext:null,retryLane:0};function sE(t){return{baseLanes:t,cachePool:null,transitions:null}}function _L(t,e,r){var n=e.pendingProps,i=it.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Ge(it,i&1),t===null)return Q0(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,t=n.fallback,o?(n=e.mode,o=e.child,s={mode:"hidden",children:s},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ly(s,n,0,null),t=xa(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=sE(r),e.memoizedState=oE,t):Hw(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return g8(t,e,s,n,a,i,r);if(o){o=n.fallback,s=e.mode,i=t.child,a=i.sibling;var c={mode:"hidden",children:n.children};return!(s&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=is(i,c),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=is(a,o):(o=xa(o,s,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,s=t.child.memoizedState,s=s===null?sE(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~r,e.memoizedState=oE,n}return o=t.child,t=o.sibling,n=is(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Hw(t,e){return e=Ly({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ah(t,e,r,n){return n!==null&&Bw(n),$l(e,t.child,null,r),t=Hw(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function g8(t,e,r,n,i,o,s){if(r)return e.flags&256?(e.flags&=-257,n=Rv(Error($(422))),ah(t,e,s,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=Ly({mode:"visible",children:n.children},i,0,null),o=xa(o,i,s,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&$l(e,t.child,null,s),e.child.memoizedState=sE(s),e.memoizedState=oE,o);if(!(e.mode&1))return ah(t,e,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error($(419)),n=Rv(o,n,void 0),ah(t,e,s,n)}if(a=(s&t.childLanes)!==0,Br||a){if(n=Ut,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,yo(t,i),Qn(n,t,i,-1))}return Yw(),n=Rv(Error($(421))),ah(t,e,s,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=P8.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,Qr=es(i.nextSibling),Yr=e,Ye=!0,Hn=null,t!==null&&(dn[fn++]=ro,dn[fn++]=no,dn[fn++]=Ta,ro=t.id,no=t.overflow,Ta=e),e=Hw(e,n.children),e.flags|=4096,e)}function C1(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Y0(t.return,e,r)}function Av(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function RL(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(yr(t,e,n.children,r),n=it.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&C1(t,r,e);else if(t.tag===19)C1(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Ge(it,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Lm(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Av(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Lm(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Av(e,!0,r,null,o);break;case"together":Av(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Hh(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function go(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Pa|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error($(153));if(e.child!==null){for(t=e.child,r=is(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=is(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function b8(t,e,r){switch(e.tag){case 3:xL(e),Ul();break;case 5:JP(e);break;case 1:jr(e.type)&&Am(e);break;case 4:Vw(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Ge(Tm,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Ge(it,it.current&1),e.flags|=128,null):r&e.child.childLanes?_L(t,e,r):(Ge(it,it.current&1),t=go(t,e,r),t!==null?t.sibling:null);Ge(it,it.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return RL(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(it,it.current),n)break;return null;case 22:case 23:return e.lanes=0,EL(t,e,r)}return go(t,e,r)}var AL,aE,SL,CL;AL=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};aE=function(){};SL=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ma(hi.current);var o=null;switch(r){case"input":i=k0(t,i),n=k0(t,n),o=[];break;case"select":i=lt({},i,{value:void 0}),n=lt({},n,{value:void 0}),o=[];break;case"textarea":i=D0(t,i),n=D0(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=_m)}I0(r,n);var s;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ed.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var c=n[u];if(a=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(r||(r={}),r[s]=c[s])}else r||(o||(o=[]),o.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ed.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&He("scroll",t),o||a===c||(o=[])):(o=o||[]).push(u,c))}r&&(o=o||[]).push("style",r);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};CL=function(t,e,r,n){r!==n&&(e.flags|=4)};function Pu(t,e){if(!Ye)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Zt(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function v8(t,e,r){var n=e.pendingProps;switch(Dw(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(e),null;case 1:return jr(e.type)&&Rm(),Zt(e),null;case 3:return n=e.stateNode,Vl(),Ze(Ir),Ze(ar),Mw(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(oh(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Hn!==null&&(mE(Hn),Hn=null))),aE(t,e),Zt(e),null;case 5:Kw(e);var i=ma(Dd.current);if(r=e.type,t!==null&&e.stateNode!=null)SL(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error($(166));return Zt(e),null}if(t=ma(hi.current),oh(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[di]=e,n[Pd]=o,t=(e.mode&1)!==0,r){case"dialog":He("cancel",n),He("close",n);break;case"iframe":case"object":case"embed":He("load",n);break;case"video":case"audio":for(i=0;i<Qu.length;i++)He(Qu[i],n);break;case"source":He("error",n);break;case"img":case"image":case"link":He("error",n),He("load",n);break;case"details":He("toggle",n);break;case"input":OS(n,o),He("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},He("invalid",n);break;case"textarea":$S(n,o),He("invalid",n)}I0(r,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&ih(n.textContent,a,t),i=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ih(n.textContent,a,t),i=["children",""+a]):Ed.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&He("scroll",n)}switch(r){case"input":Jp(n),US(n,o,!0);break;case"textarea":Jp(n),VS(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=_m)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=tP(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[di]=e,t[Pd]=n,AL(t,e,!1,!1),e.stateNode=t;e:{switch(s=j0(r,n),r){case"dialog":He("cancel",t),He("close",t),i=n;break;case"iframe":case"object":case"embed":He("load",t),i=n;break;case"video":case"audio":for(i=0;i<Qu.length;i++)He(Qu[i],t);i=n;break;case"source":He("error",t),i=n;break;case"img":case"image":case"link":He("error",t),He("load",t),i=n;break;case"details":He("toggle",t),i=n;break;case"input":OS(t,n),i=k0(t,n),He("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=lt({},n,{value:void 0}),He("invalid",t);break;case"textarea":$S(t,n),i=D0(t,n),He("invalid",t);break;default:i=n}I0(r,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?iP(t,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&rP(t,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&wd(t,c):typeof c=="number"&&wd(t,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ed.hasOwnProperty(o)?c!=null&&o==="onScroll"&&He("scroll",t):c!=null&&gw(t,o,c,s))}switch(r){case"input":Jp(t),US(t,n,!1);break;case"textarea":Jp(t),VS(t);break;case"option":n.value!=null&&t.setAttribute("value",""+ls(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?Rl(t,!!n.multiple,o,!1):n.defaultValue!=null&&Rl(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=_m)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Zt(e),null;case 6:if(t&&e.stateNode!=null)CL(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error($(166));if(r=ma(Dd.current),ma(hi.current),oh(e)){if(n=e.stateNode,r=e.memoizedProps,n[di]=e,(o=n.nodeValue!==r)&&(t=Yr,t!==null))switch(t.tag){case 3:ih(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ih(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[di]=e,e.stateNode=n}return Zt(e),null;case 13:if(Ze(it),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ye&&Qr!==null&&e.mode&1&&!(e.flags&128))qP(),Ul(),e.flags|=98560,o=!1;else if(o=oh(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error($(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error($(317));o[di]=e}else Ul(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Zt(e),o=!1}else Hn!==null&&(mE(Hn),Hn=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||it.current&1?Ct===0&&(Ct=3):Yw())),e.updateQueue!==null&&(e.flags|=4),Zt(e),null);case 4:return Vl(),aE(t,e),t===null&&Td(e.stateNode.containerInfo),Zt(e),null;case 10:return Ow(e.type._context),Zt(e),null;case 17:return jr(e.type)&&Rm(),Zt(e),null;case 19:if(Ze(it),o=e.memoizedState,o===null)return Zt(e),null;if(n=(e.flags&128)!==0,s=o.rendering,s===null)if(n)Pu(o,!1);else{if(Ct!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=Lm(t),s!==null){for(e.flags|=128,Pu(o,!1),n=s.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return Ge(it,it.current&1|2),e.child}t=t.sibling}o.tail!==null&&ft()>Ml&&(e.flags|=128,n=!0,Pu(o,!1),e.lanes=4194304)}else{if(!n)if(t=Lm(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Pu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ye)return Zt(e),null}else 2*ft()-o.renderingStartTime>Ml&&r!==1073741824&&(e.flags|=128,n=!0,Pu(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ft(),e.sibling=null,r=it.current,Ge(it,n?r&1|2:r&1),e):(Zt(e),null);case 22:case 23:return Qw(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Jr&1073741824&&(Zt(e),e.subtreeFlags&6&&(e.flags|=8192)):Zt(e),null;case 24:return null;case 25:return null}throw Error($(156,e.tag))}function E8(t,e){switch(Dw(e),e.tag){case 1:return jr(e.type)&&Rm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vl(),Ze(Ir),Ze(ar),Mw(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Kw(e),null;case 13:if(Ze(it),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error($(340));Ul()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ze(it),null;case 4:return Vl(),null;case 10:return Ow(e.type._context),null;case 22:case 23:return Qw(),null;case 24:return null;default:return null}}var lh=!1,ir=!1,w8=typeof WeakSet=="function"?WeakSet:Set,G=null;function bl(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ut(t,e,n)}else r.current=null}function lE(t,e,r){try{r()}catch(n){ut(t,e,n)}}var T1=!1;function x8(t,e){if(q0=Em,t=DP(),Pw(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,a=-1,c=-1,u=0,d=0,f=t,h=null;t:for(;;){for(var m;f!==r||i!==0&&f.nodeType!==3||(a=s+i),f!==o||n!==0&&f.nodeType!==3||(c=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===t)break t;if(h===r&&++u===i&&(a=s),h===o&&++d===n&&(c=s),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(G0={focusedElem:t,selectionRange:r},Em=!1,G=e;G!==null;)if(e=G,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,G=t;else for(;G!==null;){e=G;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?v:Un(e.type,v),w);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(_){ut(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,G=t;break}G=e.return}return g=T1,T1=!1,g}function ld(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&lE(e,r,o)}i=i.next}while(i!==n)}}function ky(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function cE(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function TL(t){var e=t.alternate;e!==null&&(t.alternate=null,TL(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[di],delete e[Pd],delete e[X0],delete e[i8],delete e[o8])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function kL(t){return t.tag===5||t.tag===3||t.tag===4}function k1(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||kL(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function uE(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=_m));else if(n!==4&&(t=t.child,t!==null))for(uE(t,e,r),t=t.sibling;t!==null;)uE(t,e,r),t=t.sibling}function dE(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(dE(t,e,r),t=t.sibling;t!==null;)dE(t,e,r),t=t.sibling}var Gt=null,Gn=!1;function Co(t,e,r){for(r=r.child;r!==null;)PL(t,e,r),r=r.sibling}function PL(t,e,r){if(pi&&typeof pi.onCommitFiberUnmount=="function")try{pi.onCommitFiberUnmount(wy,r)}catch{}switch(r.tag){case 5:ir||bl(r,e);case 6:var n=Gt,i=Gn;Gt=null,Co(t,e,r),Gt=n,Gn=i,Gt!==null&&(Gn?(t=Gt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Gt.removeChild(r.stateNode));break;case 18:Gt!==null&&(Gn?(t=Gt,r=r.stateNode,t.nodeType===8?bv(t.parentNode,r):t.nodeType===1&&bv(t,r),Ad(t)):bv(Gt,r.stateNode));break;case 4:n=Gt,i=Gn,Gt=r.stateNode.containerInfo,Gn=!0,Co(t,e,r),Gt=n,Gn=i;break;case 0:case 11:case 14:case 15:if(!ir&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&lE(r,e,s),i=i.next}while(i!==n)}Co(t,e,r);break;case 1:if(!ir&&(bl(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ut(r,e,a)}Co(t,e,r);break;case 21:Co(t,e,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,Co(t,e,r),ir=n):Co(t,e,r);break;default:Co(t,e,r)}}function P1(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new w8),e.forEach(function(n){var i=L8.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function In(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,s=e,a=s;e:for(;a!==null;){switch(a.tag){case 5:Gt=a.stateNode,Gn=!1;break e;case 3:Gt=a.stateNode.containerInfo,Gn=!0;break e;case 4:Gt=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(Gt===null)throw Error($(160));PL(o,s,i),Gt=null,Gn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){ut(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)LL(e,t),e=e.sibling}function LL(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(In(e,t),oi(t),n&4){try{ld(3,t,t.return),ky(3,t)}catch(v){ut(t,t.return,v)}try{ld(5,t,t.return)}catch(v){ut(t,t.return,v)}}break;case 1:In(e,t),oi(t),n&512&&r!==null&&bl(r,r.return);break;case 5:if(In(e,t),oi(t),n&512&&r!==null&&bl(r,r.return),t.flags&32){var i=t.stateNode;try{wd(i,"")}catch(v){ut(t,t.return,v)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=r!==null?r.memoizedProps:o,a=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Yk(i,o),j0(a,s);var u=j0(a,o);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];d==="style"?iP(i,f):d==="dangerouslySetInnerHTML"?rP(i,f):d==="children"?wd(i,f):gw(i,d,f,u)}switch(a){case"input":P0(i,o);break;case"textarea":eP(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?Rl(i,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?Rl(i,!!o.multiple,o.defaultValue,!0):Rl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Pd]=o}catch(v){ut(t,t.return,v)}}break;case 6:if(In(e,t),oi(t),n&4){if(t.stateNode===null)throw Error($(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(v){ut(t,t.return,v)}}break;case 3:if(In(e,t),oi(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ad(e.containerInfo)}catch(v){ut(t,t.return,v)}break;case 4:In(e,t),oi(t);break;case 13:In(e,t),oi(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Jw=ft())),n&4&&P1(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(ir=(u=ir)||d,In(e,t),ir=u):In(e,t),oi(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(G=t,d=t.child;d!==null;){for(f=G=d;G!==null;){switch(h=G,m=h.child,h.tag){case 0:case 11:case 14:case 15:ld(4,h,h.return);break;case 1:bl(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{e=n,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(v){ut(n,r,v)}}break;case 5:bl(h,h.return);break;case 22:if(h.memoizedState!==null){D1(f);continue}}m!==null?(m.return=h,G=m):D1(f)}d=d.sibling}e:for(d=null,f=t;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=nP("display",s))}catch(v){ut(t,t.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){ut(t,t.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:In(e,t),oi(t),n&4&&P1(t);break;case 21:break;default:In(e,t),oi(t)}}function oi(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(kL(r)){var n=r;break e}r=r.return}throw Error($(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(wd(i,""),n.flags&=-33);var o=k1(t);dE(t,o,i);break;case 3:case 4:var s=n.stateNode.containerInfo,a=k1(t);uE(t,a,s);break;default:throw Error($(161))}}catch(c){ut(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function _8(t,e,r){G=t,DL(t)}function DL(t,e,r){for(var n=(t.mode&1)!==0;G!==null;){var i=G,o=i.child;if(i.tag===22&&n){var s=i.memoizedState!==null||lh;if(!s){var a=i.alternate,c=a!==null&&a.memoizedState!==null||ir;a=lh;var u=ir;if(lh=s,(ir=c)&&!u)for(G=i;G!==null;)s=G,c=s.child,s.tag===22&&s.memoizedState!==null?B1(i):c!==null?(c.return=s,G=c):B1(i);for(;o!==null;)G=o,DL(o),o=o.sibling;G=i,lh=a,ir=u}L1(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,G=o):L1(t)}}function L1(t){for(;G!==null;){var e=G;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ir||ky(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!ir)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Un(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&m1(e,o,n);break;case 3:var s=e.updateQueue;if(s!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}m1(e,s,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ad(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}ir||e.flags&512&&cE(e)}catch(h){ut(e,e.return,h)}}if(e===t){G=null;break}if(r=e.sibling,r!==null){r.return=e.return,G=r;break}G=e.return}}function D1(t){for(;G!==null;){var e=G;if(e===t){G=null;break}var r=e.sibling;if(r!==null){r.return=e.return,G=r;break}G=e.return}}function B1(t){for(;G!==null;){var e=G;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{ky(4,e)}catch(c){ut(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(c){ut(e,i,c)}}var o=e.return;try{cE(e)}catch(c){ut(e,o,c)}break;case 5:var s=e.return;try{cE(e)}catch(c){ut(e,s,c)}}}catch(c){ut(e,e.return,c)}if(e===t){G=null;break}var a=e.sibling;if(a!==null){a.return=e.return,G=a;break}G=e.return}}var R8=Math.ceil,Im=wo.ReactCurrentDispatcher,Ww=wo.ReactCurrentOwner,vn=wo.ReactCurrentBatchConfig,De=0,Ut=null,wt=null,Ht=0,Jr=0,vl=Cs(0),Ct=0,Od=null,Pa=0,Py=0,Xw=0,cd=null,Tr=null,Jw=0,Ml=1/0,Xi=null,jm=!1,fE=null,rs=null,ch=!1,Xo=null,Om=0,ud=0,pE=null,Wh=-1,Xh=0;function vr(){return De&6?ft():Wh!==-1?Wh:Wh=ft()}function ns(t){return t.mode&1?De&2&&Ht!==0?Ht&-Ht:a8.transition!==null?(Xh===0&&(Xh=yP()),Xh):(t=Ue,t!==0||(t=window.event,t=t===void 0?16:_P(t.type)),t):1}function Qn(t,e,r,n){if(50<ud)throw ud=0,pE=null,Error($(185));lf(t,r,n),(!(De&2)||t!==Ut)&&(t===Ut&&(!(De&2)&&(Py|=r),Ct===4&&Go(t,Ht)),Or(t,n),r===1&&De===0&&!(e.mode&1)&&(Ml=ft()+500,Sy&&Ts()))}function Or(t,e){var r=t.callbackNode;a4(t,e);var n=vm(t,t===Ut?Ht:0);if(n===0)r!==null&&NS(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&NS(r),e===1)t.tag===0?s8(I1.bind(null,t)):NP(I1.bind(null,t)),r8(function(){!(De&6)&&Ts()}),r=null;else{switch(gP(n)){case 1:r=xw;break;case 4:r=hP;break;case 16:r=bm;break;case 536870912:r=mP;break;default:r=bm}r=KL(r,BL.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function BL(t,e){if(Wh=-1,Xh=0,De&6)throw Error($(327));var r=t.callbackNode;if(kl()&&t.callbackNode!==r)return null;var n=vm(t,t===Ut?Ht:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Um(t,n);else{e=n;var i=De;De|=2;var o=jL();(Ut!==t||Ht!==e)&&(Xi=null,Ml=ft()+500,wa(t,e));do try{C8();break}catch(a){IL(t,a)}while(!0);jw(),Im.current=o,De=i,wt!==null?e=0:(Ut=null,Ht=0,e=Ct)}if(e!==0){if(e===2&&(i=K0(t),i!==0&&(n=i,e=hE(t,i))),e===1)throw r=Od,wa(t,0),Go(t,n),Or(t,ft()),r;if(e===6)Go(t,n);else{if(i=t.current.alternate,!(n&30)&&!A8(i)&&(e=Um(t,n),e===2&&(o=K0(t),o!==0&&(n=o,e=hE(t,o))),e===1))throw r=Od,wa(t,0),Go(t,n),Or(t,ft()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error($(345));case 2:ia(t,Tr,Xi);break;case 3:if(Go(t,n),(n&130023424)===n&&(e=Jw+500-ft(),10<e)){if(vm(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){vr(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=W0(ia.bind(null,t,Tr,Xi),e);break}ia(t,Tr,Xi);break;case 4:if(Go(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var s=31-Zn(n);o=1<<s,s=e[s],s>i&&(i=s),n&=~o}if(n=i,n=ft()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*R8(n/1960))-n,10<n){t.timeoutHandle=W0(ia.bind(null,t,Tr,Xi),n);break}ia(t,Tr,Xi);break;case 5:ia(t,Tr,Xi);break;default:throw Error($(329))}}}return Or(t,ft()),t.callbackNode===r?BL.bind(null,t):null}function hE(t,e){var r=cd;return t.current.memoizedState.isDehydrated&&(wa(t,e).flags|=256),t=Um(t,e),t!==2&&(e=Tr,Tr=r,e!==null&&mE(e)),t}function mE(t){Tr===null?Tr=t:Tr.push.apply(Tr,t)}function A8(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!ei(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Go(t,e){for(e&=~Xw,e&=~Py,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Zn(e),n=1<<r;t[r]=-1,e&=~n}}function I1(t){if(De&6)throw Error($(327));kl();var e=vm(t,0);if(!(e&1))return Or(t,ft()),null;var r=Um(t,e);if(t.tag!==0&&r===2){var n=K0(t);n!==0&&(e=n,r=hE(t,n))}if(r===1)throw r=Od,wa(t,0),Go(t,e),Or(t,ft()),r;if(r===6)throw Error($(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ia(t,Tr,Xi),Or(t,ft()),null}function Zw(t,e){var r=De;De|=1;try{return t(e)}finally{De=r,De===0&&(Ml=ft()+500,Sy&&Ts())}}function La(t){Xo!==null&&Xo.tag===0&&!(De&6)&&kl();var e=De;De|=1;var r=vn.transition,n=Ue;try{if(vn.transition=null,Ue=1,t)return t()}finally{Ue=n,vn.transition=r,De=e,!(De&6)&&Ts()}}function Qw(){Jr=vl.current,Ze(vl)}function wa(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,t8(r)),wt!==null)for(r=wt.return;r!==null;){var n=r;switch(Dw(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Rm();break;case 3:Vl(),Ze(Ir),Ze(ar),Mw();break;case 5:Kw(n);break;case 4:Vl();break;case 13:Ze(it);break;case 19:Ze(it);break;case 10:Ow(n.type._context);break;case 22:case 23:Qw()}r=r.return}if(Ut=t,wt=t=is(t.current,null),Ht=Jr=e,Ct=0,Od=null,Xw=Py=Pa=0,Tr=cd=null,ha!==null){for(e=0;e<ha.length;e++)if(r=ha[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var s=o.next;o.next=i,n.next=s}r.pending=n}ha=null}return t}function IL(t,e){do{var r=wt;try{if(jw(),qh.current=Bm,Dm){for(var n=st.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Dm=!1}if(ka=0,It=St=st=null,ad=!1,Bd=0,Ww.current=null,r===null||r.return===null){Ct=1,Od=e,wt=null;break}e:{var o=t,s=r.return,a=r,c=e;if(e=Ht,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=w1(s);if(m!==null){m.flags&=-257,x1(m,s,a,o,e),m.mode&1&&E1(o,u,e),e=m,c=u;var g=e.updateQueue;if(g===null){var v=new Set;v.add(c),e.updateQueue=v}else g.add(c);break e}else{if(!(e&1)){E1(o,u,e),Yw();break e}c=Error($(426))}}else if(Ye&&a.mode&1){var w=w1(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),x1(w,s,a,o,e),Bw(Kl(c,a));break e}}o=c=Kl(c,a),Ct!==4&&(Ct=2),cd===null?cd=[o]:cd.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var y=gL(o,c,e);h1(o,y);break e;case 1:a=c;var b=o.type,E=o.stateNode;if(!(o.flags&128)&&(typeof b.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(rs===null||!rs.has(E)))){o.flags|=65536,e&=-e,o.lanes|=e;var _=bL(o,a,e);h1(o,_);break e}}o=o.return}while(o!==null)}UL(r)}catch(T){e=T,wt===r&&r!==null&&(wt=r=r.return);continue}break}while(!0)}function jL(){var t=Im.current;return Im.current=Bm,t===null?Bm:t}function Yw(){(Ct===0||Ct===3||Ct===2)&&(Ct=4),Ut===null||!(Pa&268435455)&&!(Py&268435455)||Go(Ut,Ht)}function Um(t,e){var r=De;De|=2;var n=jL();(Ut!==t||Ht!==e)&&(Xi=null,wa(t,e));do try{S8();break}catch(i){IL(t,i)}while(!0);if(jw(),De=r,Im.current=n,wt!==null)throw Error($(261));return Ut=null,Ht=0,Ct}function S8(){for(;wt!==null;)OL(wt)}function C8(){for(;wt!==null&&!QF();)OL(wt)}function OL(t){var e=VL(t.alternate,t,Jr);t.memoizedProps=t.pendingProps,e===null?UL(t):wt=e,Ww.current=null}function UL(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=E8(r,e),r!==null){r.flags&=32767,wt=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ct=6,wt=null;return}}else if(r=v8(r,e,Jr),r!==null){wt=r;return}if(e=e.sibling,e!==null){wt=e;return}wt=e=t}while(e!==null);Ct===0&&(Ct=5)}function ia(t,e,r){var n=Ue,i=vn.transition;try{vn.transition=null,Ue=1,T8(t,e,r,n)}finally{vn.transition=i,Ue=n}return null}function T8(t,e,r,n){do kl();while(Xo!==null);if(De&6)throw Error($(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error($(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(l4(t,o),t===Ut&&(wt=Ut=null,Ht=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ch||(ch=!0,KL(bm,function(){return kl(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=vn.transition,vn.transition=null;var s=Ue;Ue=1;var a=De;De|=4,Ww.current=null,x8(t,r),LL(r,t),W4(G0),Em=!!q0,G0=q0=null,t.current=r,_8(r),YF(),De=a,Ue=s,vn.transition=o}else t.current=r;if(ch&&(ch=!1,Xo=t,Om=i),o=t.pendingLanes,o===0&&(rs=null),r4(r.stateNode),Or(t,ft()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(jm)throw jm=!1,t=fE,fE=null,t;return Om&1&&t.tag!==0&&kl(),o=t.pendingLanes,o&1?t===pE?ud++:(ud=0,pE=t):ud=0,Ts(),null}function kl(){if(Xo!==null){var t=gP(Om),e=vn.transition,r=Ue;try{if(vn.transition=null,Ue=16>t?16:t,Xo===null)var n=!1;else{if(t=Xo,Xo=null,Om=0,De&6)throw Error($(331));var i=De;for(De|=4,G=t.current;G!==null;){var o=G,s=o.child;if(G.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(G=u;G!==null;){var d=G;switch(d.tag){case 0:case 11:case 15:ld(8,d,o)}var f=d.child;if(f!==null)f.return=d,G=f;else for(;G!==null;){d=G;var h=d.sibling,m=d.return;if(TL(d),d===u){G=null;break}if(h!==null){h.return=m,G=h;break}G=m}}}var g=o.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}G=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,G=s;else e:for(;G!==null;){if(o=G,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ld(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,G=y;break e}G=o.return}}var b=t.current;for(G=b;G!==null;){s=G;var E=s.child;if(s.subtreeFlags&2064&&E!==null)E.return=s,G=E;else e:for(s=b;G!==null;){if(a=G,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ky(9,a)}}catch(T){ut(a,a.return,T)}if(a===s){G=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,G=_;break e}G=a.return}}if(De=i,Ts(),pi&&typeof pi.onPostCommitFiberRoot=="function")try{pi.onPostCommitFiberRoot(wy,t)}catch{}n=!0}return n}finally{Ue=r,vn.transition=e}}return!1}function j1(t,e,r){e=Kl(r,e),e=gL(t,e,1),t=ts(t,e,1),e=vr(),t!==null&&(lf(t,1,e),Or(t,e))}function ut(t,e,r){if(t.tag===3)j1(t,t,r);else for(;e!==null;){if(e.tag===3){j1(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(rs===null||!rs.has(n))){t=Kl(r,t),t=bL(e,t,1),e=ts(e,t,1),t=vr(),e!==null&&(lf(e,1,t),Or(e,t));break}}e=e.return}}function k8(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=vr(),t.pingedLanes|=t.suspendedLanes&r,Ut===t&&(Ht&r)===r&&(Ct===4||Ct===3&&(Ht&130023424)===Ht&&500>ft()-Jw?wa(t,0):Xw|=r),Or(t,e)}function $L(t,e){e===0&&(t.mode&1?(e=Yp,Yp<<=1,!(Yp&130023424)&&(Yp=4194304)):e=1);var r=vr();t=yo(t,e),t!==null&&(lf(t,e,r),Or(t,r))}function P8(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),$L(t,r)}function L8(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error($(314))}n!==null&&n.delete(e),$L(t,r)}var VL;VL=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ir.current)Br=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Br=!1,b8(t,e,r);Br=!!(t.flags&131072)}else Br=!1,Ye&&e.flags&1048576&&zP(e,Cm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Hh(t,e),t=e.pendingProps;var i=Ol(e,ar.current);Tl(e,r),i=zw(null,e,n,t,i,r);var o=Fw();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,jr(n)?(o=!0,Am(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$w(e),i.updater=Ty,e.stateNode=i,i._reactInternals=e,tE(e,n,t,r),e=iE(null,e,n,!0,o,r)):(e.tag=0,Ye&&o&&Lw(e),yr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Hh(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=B8(n),t=Un(n,t),i){case 0:e=nE(null,e,n,t,r);break e;case 1:e=A1(null,e,n,t,r);break e;case 11:e=_1(null,e,n,t,r);break e;case 14:e=R1(null,e,n,Un(n.type,t),r);break e}throw Error($(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),nE(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),A1(t,e,n,i,r);case 3:e:{if(xL(e),t===null)throw Error($(387));n=e.pendingProps,o=e.memoizedState,i=o.element,XP(t,e),Pm(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Kl(Error($(423)),e),e=S1(t,e,n,r,i);break e}else if(n!==i){i=Kl(Error($(424)),e),e=S1(t,e,n,r,i);break e}else for(Qr=es(e.stateNode.containerInfo.firstChild),Yr=e,Ye=!0,Hn=null,r=HP(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ul(),n===i){e=go(t,e,r);break e}yr(t,e,n,r)}e=e.child}return e;case 5:return JP(e),t===null&&Q0(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,H0(n,i)?s=null:o!==null&&H0(n,o)&&(e.flags|=32),wL(t,e),yr(t,e,s,r),e.child;case 6:return t===null&&Q0(e),null;case 13:return _L(t,e,r);case 4:return Vw(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=$l(e,null,n,r):yr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),_1(t,e,n,i,r);case 7:return yr(t,e,e.pendingProps,r),e.child;case 8:return yr(t,e,e.pendingProps.children,r),e.child;case 12:return yr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Ge(Tm,n._currentValue),n._currentValue=s,o!==null)if(ei(o.value,s)){if(o.children===i.children&&!Ir.current){e=go(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=oo(-1,r&-r),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),Y0(o.return,r,e),a.lanes|=r;break}c=c.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error($(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Y0(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}yr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Tl(e,r),i=En(i),n=n(i),e.flags|=1,yr(t,e,n,r),e.child;case 14:return n=e.type,i=Un(n,e.pendingProps),i=Un(n.type,i),R1(t,e,n,i,r);case 15:return vL(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Un(n,i),Hh(t,e),e.tag=1,jr(n)?(t=!0,Am(e)):t=!1,Tl(e,r),yL(e,n,i),tE(e,n,i,r),iE(null,e,n,!0,t,r);case 19:return RL(t,e,r);case 22:return EL(t,e,r)}throw Error($(156,e.tag))};function KL(t,e){return pP(t,e)}function D8(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 pn(t,e,r,n){return new D8(t,e,r,n)}function ex(t){return t=t.prototype,!(!t||!t.isReactComponent)}function B8(t){if(typeof t=="function")return ex(t)?1:0;if(t!=null){if(t=t.$$typeof,t===vw)return 11;if(t===Ew)return 14}return 2}function is(t,e){var r=t.alternate;return r===null?(r=pn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Jh(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")ex(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case cl:return xa(r.children,i,o,e);case bw:s=8,i|=8;break;case A0:return t=pn(12,r,e,i|2),t.elementType=A0,t.lanes=o,t;case S0:return t=pn(13,r,e,i),t.elementType=S0,t.lanes=o,t;case C0:return t=pn(19,r,e,i),t.elementType=C0,t.lanes=o,t;case Jk:return Ly(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Wk:s=10;break e;case Xk:s=9;break e;case vw:s=11;break e;case Ew:s=14;break e;case Mo:s=16,n=null;break e}throw Error($(130,t==null?t:typeof t,""))}return e=pn(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function xa(t,e,r,n){return t=pn(7,t,n,e),t.lanes=r,t}function Ly(t,e,r,n){return t=pn(22,t,n,e),t.elementType=Jk,t.lanes=r,t.stateNode={isHidden:!1},t}function Sv(t,e,r){return t=pn(6,t,null,e),t.lanes=r,t}function Cv(t,e,r){return e=pn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function I8(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=av(0),this.expirationTimes=av(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=av(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tx(t,e,r,n,i,o,s,a,c){return t=new I8(t,e,r,a,c),e===1?(e=1,o===!0&&(e|=8)):e=0,o=pn(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$w(o),t}function j8(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ll,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function ML(t){if(!t)return cs;t=t._reactInternals;e:{if($a(t)!==t||t.tag!==1)throw Error($(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(jr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error($(171))}if(t.tag===1){var r=t.type;if(jr(r))return MP(t,r,e)}return e}function NL(t,e,r,n,i,o,s,a,c){return t=tx(r,n,!0,t,i,o,s,a,c),t.context=ML(null),r=t.current,n=vr(),i=ns(r),o=oo(n,i),o.callback=e??null,ts(r,o,i),t.current.lanes=i,lf(t,i,n),Or(t,n),t}function Dy(t,e,r,n){var i=e.current,o=vr(),s=ns(i);return r=ML(r),e.context===null?e.context=r:e.pendingContext=r,e=oo(o,s),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=ts(i,e,s),t!==null&&(Qn(t,i,s,o),Fh(t,i,s)),s}function $m(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function O1(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function rx(t,e){O1(t,e),(t=t.alternate)&&O1(t,e)}function O8(){return null}var zL=typeof reportError=="function"?reportError:function(t){console.error(t)};function nx(t){this._internalRoot=t}By.prototype.render=nx.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error($(409));Dy(t,e,null,null)};By.prototype.unmount=nx.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;La(function(){Dy(null,t,null,null)}),e[mo]=null}};function By(t){this._internalRoot=t}By.prototype.unstable_scheduleHydration=function(t){if(t){var e=EP();t={blockedOn:null,target:t,priority:e};for(var r=0;r<qo.length&&e!==0&&e<qo[r].priority;r++);qo.splice(r,0,t),r===0&&xP(t)}};function ix(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Iy(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function U1(){}function U8(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var u=$m(s);o.call(u)}}var s=NL(e,n,t,0,null,!1,!1,"",U1);return t._reactRootContainer=s,t[mo]=s.current,Td(t.nodeType===8?t.parentNode:t),La(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var a=n;n=function(){var u=$m(c);a.call(u)}}var c=tx(t,0,!1,null,null,!1,!1,"",U1);return t._reactRootContainer=c,t[mo]=c.current,Td(t.nodeType===8?t.parentNode:t),La(function(){Dy(e,c,r,n)}),c}function jy(t,e,r,n,i){var o=r._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var c=$m(s);a.call(c)}}Dy(e,s,t,i)}else s=U8(r,e,t,i,n);return $m(s)}bP=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=Zu(e.pendingLanes);r!==0&&(_w(e,r|1),Or(e,ft()),!(De&6)&&(Ml=ft()+500,Ts()))}break;case 13:La(function(){var n=yo(t,1);if(n!==null){var i=vr();Qn(n,t,1,i)}}),rx(t,1)}};Rw=function(t){if(t.tag===13){var e=yo(t,134217728);if(e!==null){var r=vr();Qn(e,t,134217728,r)}rx(t,134217728)}};vP=function(t){if(t.tag===13){var e=ns(t),r=yo(t,e);if(r!==null){var n=vr();Qn(r,t,e,n)}rx(t,e)}};EP=function(){return Ue};wP=function(t,e){var r=Ue;try{return Ue=t,e()}finally{Ue=r}};U0=function(t,e,r){switch(e){case"input":if(P0(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=Ay(n);if(!i)throw Error($(90));Qk(n),P0(n,i)}}}break;case"textarea":eP(t,r);break;case"select":e=r.value,e!=null&&Rl(t,!!r.multiple,e,!1)}};aP=Zw;lP=La;var $8={usingClientEntryPoint:!1,Events:[uf,pl,Ay,oP,sP,Zw]},Lu={findFiberByHostInstance:pa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},V8={bundleType:Lu.bundleType,version:Lu.version,rendererPackageName:Lu.rendererPackageName,rendererConfig:Lu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wo.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=dP(t),t===null?null:t.stateNode},findFiberByHostInstance:Lu.findFiberByHostInstance||O8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uh.isDisabled&&uh.supportsFiber)try{wy=uh.inject(V8),pi=uh}catch{}}rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$8;rn.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ix(e))throw Error($(200));return j8(t,e,null,r)};rn.createRoot=function(t,e){if(!ix(t))throw Error($(299));var r=!1,n="",i=zL;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=tx(t,1,!1,null,null,r,!1,n,i),t[mo]=e.current,Td(t.nodeType===8?t.parentNode:t),new nx(e)};rn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error($(188)):(t=Object.keys(t).join(","),Error($(268,t)));return t=dP(e),t=t===null?null:t.stateNode,t};rn.flushSync=function(t){return La(t)};rn.hydrate=function(t,e,r){if(!Iy(e))throw Error($(200));return jy(null,t,e,!0,r)};rn.hydrateRoot=function(t,e,r){if(!ix(t))throw Error($(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",s=zL;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),e=NL(e,null,t,1,r??null,i,!1,o,s),t[mo]=e.current,Td(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new By(e)};rn.render=function(t,e,r){if(!Iy(e))throw Error($(200));return jy(null,t,e,!1,r)};rn.unmountComponentAtNode=function(t){if(!Iy(t))throw Error($(40));return t._reactRootContainer?(La(function(){jy(null,null,t,!1,function(){t._reactRootContainer=null,t[mo]=null})}),!0):!1};rn.unstable_batchedUpdates=Zw;rn.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Iy(r))throw Error($(200));if(t==null||t._reactInternals===void 0)throw Error($(38));return jy(t,e,r,!1,n)};rn.version="18.3.1-next-f1338f8080-20240426";function FL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FL)}catch(t){console.error(t)}}FL(),Fk.exports=rn;var K8=Fk.exports,$1=K8;_0.createRoot=$1.createRoot,_0.hydrateRoot=$1.hydrateRoot;var ox={};Object.defineProperty(ox,"__esModule",{value:!0});ox.parse=H8;ox.serialize=W8;const M8=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,N8=/^[\u0021-\u003A\u003C-\u007E]*$/,z8=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,F8=/^[\u0020-\u003A\u003D-\u007E]*$/,q8=Object.prototype.toString,G8=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function H8(t,e){const r=new G8,n=t.length;if(n<2)return r;const i=(e==null?void 0:e.decode)||X8;let o=0;do{const s=t.indexOf("=",o);if(s===-1)break;const a=t.indexOf(";",o),c=a===-1?n:a;if(s>c){o=t.lastIndexOf(";",s-1)+1;continue}const u=V1(t,o,s),d=K1(t,s,u),f=t.slice(u,d);if(r[f]===void 0){let h=V1(t,s+1,c),m=K1(t,c,h);const g=i(t.slice(h,m));r[f]=g}o=c+1}while(o<n);return r}function V1(t,e,r){do{const n=t.charCodeAt(e);if(n!==32&&n!==9)return e}while(++e<r);return r}function K1(t,e,r){for(;e>r;){const n=t.charCodeAt(--e);if(n!==32&&n!==9)return e+1}return r}function W8(t,e,r){const n=(r==null?void 0:r.encode)||encodeURIComponent;if(!M8.test(t))throw new TypeError(`argument name is invalid: ${t}`);const i=n(e);if(!N8.test(i))throw new TypeError(`argument val is invalid: ${e}`);let o=t+"="+i;if(!r)return o;if(r.maxAge!==void 0){if(!Number.isInteger(r.maxAge))throw new TypeError(`option maxAge is invalid: ${r.maxAge}`);o+="; Max-Age="+r.maxAge}if(r.domain){if(!z8.test(r.domain))throw new TypeError(`option domain is invalid: ${r.domain}`);o+="; Domain="+r.domain}if(r.path){if(!F8.test(r.path))throw new TypeError(`option path is invalid: ${r.path}`);o+="; Path="+r.path}if(r.expires){if(!J8(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.partitioned&&(o+="; Partitioned"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}return o}function X8(t){if(t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function J8(t){return q8.call(t)==="[object Date]"}var M1="popstate";function Z8(t={}){function e(n,i){let{pathname:o,search:s,hash:a}=n.location;return yE("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Ud(i)}return Y8(e,r,null,t)}function at(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function xi(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Q8(){return Math.random().toString(36).substring(2,10)}function N1(t,e){return{usr:t.state,key:t.key,idx:e}}function yE(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?ec(e):e,state:r,key:e&&e.key||n||Q8()}}function Ud({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ec(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function Y8(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,a="POP",c=null,u=d();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function d(){return(s.state||{idx:null}).idx}function f(){a="POP";let w=d(),y=w==null?null:w-u;u=w,c&&c({action:a,location:v.location,delta:y})}function h(w,y){a="PUSH";let b=yE(v.location,w,y);u=d()+1;let E=N1(b,u),_=v.createHref(b);try{s.pushState(E,"",_)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(_)}o&&c&&c({action:a,location:v.location,delta:1})}function m(w,y){a="REPLACE";let b=yE(v.location,w,y);u=d();let E=N1(b,u),_=v.createHref(b);s.replaceState(E,"",_),o&&c&&c({action:a,location:v.location,delta:0})}function g(w){return e5(w)}let v={get action(){return a},get location(){return t(i,s)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(M1,f),c=w,()=>{i.removeEventListener(M1,f),c=null}},createHref(w){return e(i,w)},createURL:g,encodeLocation(w){let y=g(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(w){return s.go(w)}};return v}function e5(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),at(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Ud(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function qL(t,e,r="/"){return t5(t,e,r,!1)}function t5(t,e,r,n){let i=typeof e=="string"?ec(e):e,o=bo(i.pathname||"/",r);if(o==null)return null;let s=GL(t);r5(s);let a=null;for(let c=0;a==null&&c<s.length;++c){let u=p5(o);a=d5(s[c],u,n)}return a}function GL(t,e=[],r=[],n=""){let i=(o,s,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(at(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length));let u=so([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(at(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),GL(o.children,e,d,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:c5(u,o.index),routesMeta:d})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let c of HL(o.path))i(o,s,c)}),e}function HL(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=HL(n.join("/")),a=[];return a.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&a.push(...s),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function r5(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:u5(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var n5=/^:[\w-]+$/,i5=3,o5=2,s5=1,a5=10,l5=-2,z1=t=>t==="*";function c5(t,e){let r=t.split("/"),n=r.length;return r.some(z1)&&(n+=l5),e&&(n+=o5),r.filter(i=>!z1(i)).reduce((i,o)=>i+(n5.test(o)?i5:o===""?s5:a5),n)}function u5(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function d5(t,e,r=!1){let{routesMeta:n}=t,i={},o="/",s=[];for(let a=0;a<n.length;++a){let c=n[a],u=a===n.length-1,d=o==="/"?e:e.slice(o.length)||"/",f=Vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Vm({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(i,f.params),s.push({params:i,pathname:so([o,f.pathname]),pathnameBase:g5(so([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=so([o,f.pathnameBase]))}return s}function Vm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=f5(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:n.reduce((u,{paramName:d,isOptional:f},h)=>{if(d==="*"){let g=a[h]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:t}}function f5(t,e=!1,r=!0){xi(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,c)=>(n.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function p5(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return xi(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function bo(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function h5(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?ec(t):t;return{pathname:r?r.startsWith("/")?r:m5(r,e):e,search:b5(n),hash:v5(i)}}function m5(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Tv(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function y5(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function WL(t){let e=y5(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function XL(t,e,r,n=!1){let i;typeof t=="string"?i=ec(t):(i={...t},at(!i.pathname||!i.pathname.includes("?"),Tv("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),Tv("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),Tv("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=r;else{let f=e.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?e[f]:"/"}let c=h5(i,a),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var so=t=>t.join("/").replace(/\/\/+/g,"/"),g5=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),b5=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,v5=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function E5(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var JL=["POST","PUT","PATCH","DELETE"];new Set(JL);var w5=["GET",...JL];new Set(w5);var tc=k.createContext(null);tc.displayName="DataRouter";var Oy=k.createContext(null);Oy.displayName="DataRouterState";var ZL=k.createContext({isTransitioning:!1});ZL.displayName="ViewTransition";var x5=k.createContext(new Map);x5.displayName="Fetchers";var _5=k.createContext(null);_5.displayName="Await";var Ci=k.createContext(null);Ci.displayName="Navigation";var ff=k.createContext(null);ff.displayName="Location";var xo=k.createContext({outlet:null,matches:[],isDataRoute:!1});xo.displayName="Route";var sx=k.createContext(null);sx.displayName="RouteError";function R5(t,{relative:e}={}){at(pf(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=k.useContext(Ci),{hash:i,pathname:o,search:s}=hf(t,{relative:e}),a=o;return r!=="/"&&(a=o==="/"?r:so([r,o])),n.createHref({pathname:a,search:s,hash:i})}function pf(){return k.useContext(ff)!=null}function Va(){return at(pf(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(ff).location}var QL="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function YL(t){k.useContext(Ci).static||k.useLayoutEffect(t)}function eD(){let{isDataRoute:t}=k.useContext(xo);return t?U5():A5()}function A5(){at(pf(),"useNavigate() may be used only in the context of a <Router> component.");let t=k.useContext(tc),{basename:e,navigator:r}=k.useContext(Ci),{matches:n}=k.useContext(xo),{pathname:i}=Va(),o=JSON.stringify(WL(n)),s=k.useRef(!1);return YL(()=>{s.current=!0}),k.useCallback((c,u={})=>{if(xi(s.current,QL),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=XL(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:so([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,o,i,t])}k.createContext(null);function hf(t,{relative:e}={}){let{matches:r}=k.useContext(xo),{pathname:n}=Va(),i=JSON.stringify(WL(r));return k.useMemo(()=>XL(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function S5(t,e){return tD(t,e)}function tD(t,e,r,n){var y;at(pf(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=k.useContext(Ci),{matches:o}=k.useContext(xo),s=o[o.length-1],a=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let b=d&&d.path||"";rD(c,!d||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=Va(),h;if(e){let b=typeof e=="string"?ec(e):e;at(u==="/"||((y=b.pathname)==null?void 0:y.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),h=b}else h=f;let m=h.pathname||"/",g=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=qL(t,{pathname:g});xi(d||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),xi(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=L5(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:so([u,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:so([u,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,r,n);return e&&w?k.createElement(ff.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},w):w}function C5(){let t=O5(),e=E5(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},e),r?k.createElement("pre",{style:i},r):null,s)}var T5=k.createElement(C5,null),k5=class extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?k.createElement(xo.Provider,{value:this.props.routeContext},k.createElement(sx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function P5({routeContext:t,match:e,children:r}){let n=k.useContext(tc);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),k.createElement(xo.Provider,{value:t},r)}function L5(t,e=[],r=null,n=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let i=t,o=r==null?void 0:r.errors;if(o!=null){let c=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);at(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let s=!1,a=-1;if(r)for(let c=0;c<i.length;c++){let u=i[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=c),u.route.id){let{loaderData:d,errors:f}=r,h=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||h){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((c,u,d)=>{let f,h=!1,m=null,g=null;r&&(f=o&&u.route.id?o[u.route.id]:void 0,m=u.route.errorElement||T5,s&&(a<0&&d===0?(rD("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,g=null):a===d&&(h=!0,g=u.route.hydrateFallbackElement||null)));let v=e.concat(i.slice(0,d+1)),w=()=>{let y;return f?y=m:h?y=g:u.route.Component?y=k.createElement(u.route.Component,null):u.route.element?y=u.route.element:y=c,k.createElement(P5,{match:u,routeContext:{outlet:c,matches:v,isDataRoute:r!=null},children:y})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?k.createElement(k5,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:w(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):w()},null)}function ax(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function D5(t){let e=k.useContext(tc);return at(e,ax(t)),e}function B5(t){let e=k.useContext(Oy);return at(e,ax(t)),e}function I5(t){let e=k.useContext(xo);return at(e,ax(t)),e}function lx(t){let e=I5(t),r=e.matches[e.matches.length-1];return at(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function j5(){return lx("useRouteId")}function O5(){var n;let t=k.useContext(sx),e=B5("useRouteError"),r=lx("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function U5(){let{router:t}=D5("useNavigate"),e=lx("useNavigate"),r=k.useRef(!1);return YL(()=>{r.current=!0}),k.useCallback(async(i,o={})=>{xi(r.current,QL),r.current&&(typeof i=="number"?t.navigate(i):await t.navigate(i,{fromRouteId:e,...o}))},[t,e])}var F1={};function rD(t,e,r){!e&&!F1[t]&&(F1[t]=!0,xi(!1,r))}k.memo($5);function $5({routes:t,future:e,state:r}){return tD(t,void 0,r,e)}function Zh(t){at(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function V5({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){at(!pf(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),a=k.useMemo(()=>({basename:s,navigator:i,static:o,future:{}}),[s,i,o]);typeof r=="string"&&(r=ec(r));let{pathname:c="/",search:u="",hash:d="",state:f=null,key:h="default"}=r,m=k.useMemo(()=>{let g=bo(c,s);return g==null?null:{location:{pathname:g,search:u,hash:d,state:f,key:h},navigationType:n}},[s,c,u,d,f,h,n]);return xi(m!=null,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:k.createElement(Ci.Provider,{value:a},k.createElement(ff.Provider,{children:e,value:m}))}function K5({children:t,location:e}){return S5(gE(t),e)}function gE(t,e=[]){let r=[];return k.Children.forEach(t,(n,i)=>{if(!k.isValidElement(n))return;let o=[...e,i];if(n.type===k.Fragment){r.push.apply(r,gE(n.props.children,o));return}at(n.type===Zh,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=gE(n.props.children,o)),r.push(s)}),r}var Qh="get",Yh="application/x-www-form-urlencoded";function Uy(t){return t!=null&&typeof t.tagName=="string"}function M5(t){return Uy(t)&&t.tagName.toLowerCase()==="button"}function N5(t){return Uy(t)&&t.tagName.toLowerCase()==="form"}function z5(t){return Uy(t)&&t.tagName.toLowerCase()==="input"}function F5(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function q5(t,e){return t.button===0&&(!e||e==="_self")&&!F5(t)}var dh=null;function G5(){if(dh===null)try{new FormData(document.createElement("form"),0),dh=!1}catch{dh=!0}return dh}var H5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kv(t){return t!=null&&!H5.has(t)?(xi(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yh}"`),null):t}function W5(t,e){let r,n,i,o,s;if(N5(t)){let a=t.getAttribute("action");n=a?bo(a,e):null,r=t.getAttribute("method")||Qh,i=kv(t.getAttribute("enctype"))||Yh,o=new FormData(t)}else if(M5(t)||z5(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||a.getAttribute("action");if(n=c?bo(c,e):null,r=t.getAttribute("formmethod")||a.getAttribute("method")||Qh,i=kv(t.getAttribute("formenctype"))||kv(a.getAttribute("enctype"))||Yh,o=new FormData(a,t),!G5()){let{name:u,type:d,value:f}=t;if(d==="image"){let h=u?`${u}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else u&&o.append(u,f)}}else{if(Uy(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Qh,n=null,i=Yh,s=t}return o&&i==="text/plain"&&(s=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:s}}function cx(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}async function X5(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J5(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Z5(t,e,r){let n=await Promise.all(t.map(async i=>{let o=e.routes[i.route.id];if(o){let s=await X5(o,r);return s.links?s.links():[]}return[]}));return tq(n.flat(1).filter(J5).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function q1(t,e,r,n,i,o){let s=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,a=(c,u)=>{var d;return r[u].pathname!==c.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==c.params["*"]};return o==="assets"?e.filter((c,u)=>s(c,u)||a(c,u)):o==="data"?e.filter((c,u)=>{var f;let d=n.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(s(c,u)||a(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Q5(t,e,{includeHydrateFallback:r}={}){return Y5(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function Y5(t){return[...new Set(t)]}function eq(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function tq(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let o=JSON.stringify(eq(i));return r.has(o)||(r.add(o),n.push({key:o,link:i})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var rq=new Set([100,101,204,205]);function nq(t,e){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname="_root.data":e&&bo(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function nD(){let t=k.useContext(tc);return cx(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function iq(){let t=k.useContext(Oy);return cx(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var ux=k.createContext(void 0);ux.displayName="FrameworkContext";function iD(){let t=k.useContext(ux);return cx(t,"You must render this element inside a <HydratedRouter> element"),t}function oq(t,e){let r=k.useContext(ux),[n,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:a,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=e,h=k.useRef(null);k.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let v=y=>{y.forEach(b=>{s(b.isIntersecting)})},w=new IntersectionObserver(v,{threshold:.5});return h.current&&w.observe(h.current),()=>{w.disconnect()}}},[t]),k.useEffect(()=>{if(n){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[n]);let m=()=>{i(!0)},g=()=>{i(!1),s(!1)};return r?t!=="intent"?[o,h,{}]:[o,h,{onFocus:Du(a,m),onBlur:Du(c,g),onMouseEnter:Du(u,m),onMouseLeave:Du(d,g),onTouchStart:Du(f,m)}]:[!1,h,{}]}function Du(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function sq({page:t,...e}){let{router:r}=nD(),n=k.useMemo(()=>qL(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?k.createElement(lq,{page:t,matches:n,...e}):null}function aq(t){let{manifest:e,routeModules:r}=iD(),[n,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return Z5(t,e,r).then(s=>{o||i(s)}),()=>{o=!0}},[t,e,r]),n}function lq({page:t,matches:e,...r}){let n=Va(),{manifest:i,routeModules:o}=iD(),{basename:s}=nD(),{loaderData:a,matches:c}=iq(),u=k.useMemo(()=>q1(t,e,c,i,n,"data"),[t,e,c,i,n]),d=k.useMemo(()=>q1(t,e,c,i,n,"assets"),[t,e,c,i,n]),f=k.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let g=new Set,v=!1;if(e.forEach(y=>{var E;let b=i.routes[y.route.id];!b||!b.hasLoader||(!u.some(_=>_.route.id===y.route.id)&&y.route.id in a&&((E=o[y.route.id])!=null&&E.shouldRevalidate)||b.hasClientLoader?v=!0:g.add(y.route.id))}),g.size===0)return[];let w=nq(t,s);return v&&g.size>0&&w.searchParams.set("_routes",e.filter(y=>g.has(y.route.id)).map(y=>y.route.id).join(",")),[w.pathname+w.search]},[s,a,n,i,u,e,t,o]),h=k.useMemo(()=>Q5(d,i),[d,i]),m=aq(d);return k.createElement(k.Fragment,null,f.map(g=>k.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),h.map(g=>k.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),m.map(({key:g,link:v})=>k.createElement("link",{key:g,...v})))}function cq(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var oD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oD&&(window.__reactRouterVersion="7.6.2")}catch{}function uq({basename:t,children:e,window:r}){let n=k.useRef();n.current==null&&(n.current=Z8({window:r,v5Compat:!0}));let i=n.current,[o,s]=k.useState({action:i.action,location:i.location}),a=k.useCallback(c=>{k.startTransition(()=>s(c))},[s]);return k.useLayoutEffect(()=>i.listen(a),[i,a]),k.createElement(V5,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:i})}var sD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aD=k.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:o,replace:s,state:a,target:c,to:u,preventScrollReset:d,viewTransition:f,...h},m){let{basename:g}=k.useContext(Ci),v=typeof u=="string"&&sD.test(u),w,y=!1;if(typeof u=="string"&&v&&(w=u,oD))try{let F=new URL(window.location.href),re=u.startsWith("//")?new URL(F.protocol+u):new URL(u),ze=bo(re.pathname,g);re.origin===F.origin&&ze!=null?u=ze+re.search+re.hash:y=!0}catch{xi(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=R5(u,{relative:i}),[E,_,T]=oq(n,h),B=hq(u,{replace:s,state:a,target:c,preventScrollReset:d,relative:i,viewTransition:f});function I(F){e&&e(F),F.defaultPrevented||B(F)}let O=k.createElement("a",{...h,...T,href:w||b,onClick:y||o?e:I,ref:cq(m,_),target:c,"data-discover":!v&&r==="render"?"true":void 0});return E&&!v?k.createElement(k.Fragment,null,O,k.createElement(sq,{page:b})):O});aD.displayName="Link";var dq=k.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:o,to:s,viewTransition:a,children:c,...u},d){let f=hf(s,{relative:u.relative}),h=Va(),m=k.useContext(Oy),{navigator:g,basename:v}=k.useContext(Ci),w=m!=null&&vq(f)&&a===!0,y=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,b=h.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(b=b.toLowerCase(),E=E?E.toLowerCase():null,y=y.toLowerCase()),E&&v&&(E=bo(E,v)||E);const _=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let T=b===y||!i&&b.startsWith(y)&&b.charAt(_)==="/",B=E!=null&&(E===y||!i&&E.startsWith(y)&&E.charAt(y.length)==="/"),I={isActive:T,isPending:B,isTransitioning:w},O=T?e:void 0,F;typeof n=="function"?F=n(I):F=[n,T?"active":null,B?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let re=typeof o=="function"?o(I):o;return k.createElement(aD,{...u,"aria-current":O,className:F,ref:d,style:re,to:s,viewTransition:a},typeof c=="function"?c(I):c)});dq.displayName="NavLink";var fq=k.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:o,method:s=Qh,action:a,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,...h},m)=>{let g=gq(),v=bq(a,{relative:u}),w=s.toLowerCase()==="get"?"get":"post",y=typeof a=="string"&&sD.test(a),b=E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let _=E.nativeEvent.submitter,T=(_==null?void 0:_.getAttribute("formmethod"))||s;g(_||E.currentTarget,{fetcherKey:e,method:T,navigate:r,replace:i,state:o,relative:u,preventScrollReset:d,viewTransition:f})};return k.createElement("form",{ref:m,method:w,action:v,onSubmit:n?c:b,...h,"data-discover":!y&&t==="render"?"true":void 0})});fq.displayName="Form";function pq(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lD(t){let e=k.useContext(tc);return at(e,pq(t)),e}function hq(t,{target:e,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:s}={}){let a=eD(),c=Va(),u=hf(t,{relative:o});return k.useCallback(d=>{if(q5(d,e)){d.preventDefault();let f=r!==void 0?r:Ud(c)===Ud(u);a(t,{replace:f,state:n,preventScrollReset:i,relative:o,viewTransition:s})}},[c,a,u,r,n,e,t,i,o,s])}var mq=0,yq=()=>`__${String(++mq)}__`;function gq(){let{router:t}=lD("useSubmit"),{basename:e}=k.useContext(Ci),r=j5();return k.useCallback(async(n,i={})=>{let{action:o,method:s,encType:a,formData:c,body:u}=W5(n,e);if(i.navigate===!1){let d=i.fetcherKey||yq();await t.fetch(d,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||s,formEncType:i.encType||a,flushSync:i.flushSync})}else await t.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||s,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[t,e,r])}function bq(t,{relative:e}={}){let{basename:r}=k.useContext(Ci),n=k.useContext(xo);at(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...hf(t||".",{relative:e})},s=Va();if(t==null){o.search=s.search;let a=new URLSearchParams(o.search),c=a.getAll("index");if(c.some(d=>d==="")){a.delete("index"),c.filter(f=>f).forEach(f=>a.append("index",f));let d=a.toString();o.search=d?`?${d}`:""}}return(!t||t===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:so([r,o.pathname])),Ud(o)}function vq(t,e={}){let r=k.useContext(ZL);at(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=lD("useViewTransitionState"),i=hf(t,{relative:e.relative});if(!r.isTransitioning)return!1;let o=bo(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=bo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Vm(i.pathname,s)!=null||Vm(i.pathname,o)!=null}[...rq];var bE={};Symbol.dispose??(Symbol.dispose=Symbol("@@dispose"));Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("@@asyncDispose"));var $y={},cD={},Z={},vE={},EE={},ks={},Vy={},mi={},mf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0;var e;(function(i){i.assertEqual=c=>{};function o(c){}i.assertIs=o;function s(c){throw new Error}i.assertNever=s,i.arrayToEnum=c=>{const u={};for(const d of c)u[d]=d;return u},i.getValidEnumValues=c=>{const u=i.objectKeys(c).filter(f=>typeof c[c[f]]!="number"),d={};for(const f of u)d[f]=c[f];return i.objectValues(d)},i.objectValues=c=>i.objectKeys(c).map(function(u){return c[u]}),i.objectKeys=typeof Object.keys=="function"?c=>Object.keys(c):c=>{const u=[];for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&u.push(d);return u},i.find=(c,u)=>{for(const d of c)if(u(d))return d},i.isInteger=typeof Number.isInteger=="function"?c=>Number.isInteger(c):c=>typeof c=="number"&&Number.isFinite(c)&&Math.floor(c)===c;function a(c,u=" | "){return c.map(d=>typeof d=="string"?`'${d}'`:d).join(u)}i.joinValues=a,i.jsonStringifyReplacer=(c,u)=>typeof u=="bigint"?u.toString():u})(e||(t.util=e={}));var r;(function(i){i.mergeShapes=(o,s)=>({...o,...s})})(r||(t.objectUtil=r={})),t.ZodParsedType=e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const n=i=>{switch(typeof i){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return Number.isNaN(i)?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(i)?t.ZodParsedType.array:i===null?t.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?t.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?t.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?t.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=n})(mf);Object.defineProperty(mi,"__esModule",{value:!0});mi.ZodError=mi.quotelessJson=mi.ZodIssueCode=void 0;const uD=mf;mi.ZodIssueCode=uD.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"]);const Eq=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");mi.quotelessJson=Eq;class $d extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return i(this),n}static assert(e){if(!(e instanceof $d))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,uD.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}mi.ZodError=$d;$d.create=t=>new $d(t);Object.defineProperty(Vy,"__esModule",{value:!0});const Qt=mi,Xs=mf,wq=(t,e)=>{let r;switch(t.code){case Qt.ZodIssueCode.invalid_type:t.received===Xs.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Qt.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Xs.util.jsonStringifyReplacer)}`;break;case Qt.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Xs.util.joinValues(t.keys,", ")}`;break;case Qt.ZodIssueCode.invalid_union:r="Invalid input";break;case Qt.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Xs.util.joinValues(t.options)}`;break;case Qt.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Xs.util.joinValues(t.options)}, received '${t.received}'`;break;case Qt.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Qt.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Qt.ZodIssueCode.invalid_date:r="Invalid date";break;case Qt.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Xs.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Qt.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Qt.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Qt.ZodIssueCode.custom:r="Invalid input";break;case Qt.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Qt.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Qt.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,Xs.util.assertNever(t)}return{message:r}};Vy.default=wq;var xq=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ks,"__esModule",{value:!0});ks.defaultErrorMap=void 0;ks.setErrorMap=_q;ks.getErrorMap=Rq;const dD=xq(Vy);ks.defaultErrorMap=dD.default;let fD=dD.default;function _q(t){fD=t}function Rq(){return fD}var dx={};(function(t){var e=C&&C.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.EMPTY_PATH=t.makeIssue=void 0,t.addIssueToContext=o;const r=ks,n=e(Vy),i=m=>{const{data:g,path:v,errorMaps:w,issueData:y}=m,b=[...v,...y.path||[]],E={...y,path:b};if(y.message!==void 0)return{...y,path:b,message:y.message};let _="";const T=w.filter(B=>!!B).slice().reverse();for(const B of T)_=B(E,{data:g,defaultError:_}).message;return{...y,path:b,message:_}};t.makeIssue=i,t.EMPTY_PATH=[];function o(m,g){const v=(0,r.getErrorMap)(),w=(0,t.makeIssue)({issueData:g,data:m.data,path:m.path,errorMaps:[m.common.contextualErrorMap,m.schemaErrorMap,v,v===n.default?void 0:n.default].filter(y=>!!y)});m.common.issues.push(w)}class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(g,v){const w=[];for(const y of v){if(y.status==="aborted")return t.INVALID;y.status==="dirty"&&g.dirty(),w.push(y.value)}return{status:g.value,value:w}}static async mergeObjectAsync(g,v){const w=[];for(const y of v){const b=await y.key,E=await y.value;w.push({key:b,value:E})}return s.mergeObjectSync(g,w)}static mergeObjectSync(g,v){const w={};for(const y of v){const{key:b,value:E}=y;if(b.status==="aborted"||E.status==="aborted")return t.INVALID;b.status==="dirty"&&g.dirty(),E.status==="dirty"&&g.dirty(),b.value!=="__proto__"&&(typeof E.value<"u"||y.alwaysSet)&&(w[b.value]=E.value)}return{status:g.value,value:w}}}t.ParseStatus=s,t.INVALID=Object.freeze({status:"aborted"});const a=m=>({status:"dirty",value:m});t.DIRTY=a;const c=m=>({status:"valid",value:m});t.OK=c;const u=m=>m.status==="aborted";t.isAborted=u;const d=m=>m.status==="dirty";t.isDirty=d;const f=m=>m.status==="valid";t.isValid=f;const h=m=>typeof Promise<"u"&&m instanceof Promise;t.isAsync=h})(dx);var pD={};Object.defineProperty(pD,"__esModule",{value:!0});var P={},Ky={};Object.defineProperty(Ky,"__esModule",{value:!0});Ky.errorUtil=void 0;var G1;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(G1||(Ky.errorUtil=G1={}));Object.defineProperty(P,"__esModule",{value:!0});P.discriminatedUnion=P.date=P.boolean=P.bigint=P.array=P.any=P.coerce=P.ZodFirstPartyTypeKind=P.late=P.ZodSchema=P.Schema=P.ZodReadonly=P.ZodPipeline=P.ZodBranded=P.BRAND=P.ZodNaN=P.ZodCatch=P.ZodDefault=P.ZodNullable=P.ZodOptional=P.ZodTransformer=P.ZodEffects=P.ZodPromise=P.ZodNativeEnum=P.ZodEnum=P.ZodLiteral=P.ZodLazy=P.ZodFunction=P.ZodSet=P.ZodMap=P.ZodRecord=P.ZodTuple=P.ZodIntersection=P.ZodDiscriminatedUnion=P.ZodUnion=P.ZodObject=P.ZodArray=P.ZodVoid=P.ZodNever=P.ZodUnknown=P.ZodAny=P.ZodNull=P.ZodUndefined=P.ZodSymbol=P.ZodDate=P.ZodBoolean=P.ZodBigInt=P.ZodNumber=P.ZodString=P.ZodType=void 0;P.NEVER=P.void=P.unknown=P.union=P.undefined=P.tuple=P.transformer=P.symbol=P.string=P.strictObject=P.set=P.record=P.promise=P.preprocess=P.pipeline=P.ostring=P.optional=P.onumber=P.oboolean=P.object=P.number=P.nullable=P.null=P.never=P.nativeEnum=P.nan=P.map=P.literal=P.lazy=P.intersection=P.instanceof=P.function=P.enum=P.effect=void 0;P.datetimeRegex=yD;P.custom=bD;const K=mi,fh=ks,Y=Ky,L=dx,N=mf;class _i{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const H1=(t,e)=>{if((0,L.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new K.ZodError(t.common.issues);return this._error=r,this._error}}};function me(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{const{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:i}}class be{get description(){return this._def.description}_getType(e){return(0,N.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,N.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new L.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,N.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if((0,L.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,N.getParsedType)(e)},i=this._parseSync({data:e,path:n.path,parent:n});return H1(n,i)}"~validate"(e){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,N.getParsedType)(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:r});return(0,L.isValid)(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(i=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(o=>(0,L.isValid)(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,N.getParsedType)(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await((0,L.isAsync)(i)?i:Promise.resolve(i));return H1(n,o)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{const s=e(i),a=()=>o.addIssue({code:K.ZodIssueCode.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new ti({schema:this,typeName:ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return yi.create(this,this._def)}nullable(){return ps.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this)}promise(){return zl.create(this,this._def)}or(e){return Nd.create([this,e],this._def)}and(e){return zd.create(this,e,this._def)}transform(e){return new ti({...me(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Wd({...me(this._def),innerType:this,defaultValue:r,typeName:ce.ZodDefault})}brand(){return new fx({typeName:ce.ZodBranded,type:this,...me(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Xd({...me(this._def),innerType:this,catchValue:r,typeName:ce.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return yf.create(this,e)}readonly(){return Jd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}P.ZodType=be;P.Schema=be;P.ZodSchema=be;const Aq=/^c[^\s-]{8,}$/i,Sq=/^[0-9a-z]+$/,Cq=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Tq=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kq=/^[a-z0-9_-]{21}$/i,Pq=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Lq=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Dq=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Pv;const Iq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Oq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Uq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$q=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Vq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hD="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Kq=new RegExp(`^${hD}$`);function mD(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Mq(t){return new RegExp(`^${mD(t)}$`)}function yD(t){let e=`${hD}T${mD(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Nq(t,e){return!!((e==="v4"||!e)&&Iq.test(t)||(e==="v6"||!e)&&Oq.test(t))}function zq(t,e){if(!Pq.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function Fq(t,e){return!!((e==="v4"||!e)&&jq.test(t)||(e==="v6"||!e)&&Uq.test(t))}class Xn extends be{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==N.ZodParsedType.string){const o=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(o,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.string,received:o.parsedType}),L.INVALID}const n=new L.ParseStatus;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,a=e.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")Dq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"email",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Pv||(Pv=new RegExp(Bq,"u")),Pv.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"emoji",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Tq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"uuid",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")kq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"nanoid",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Aq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"cuid",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Sq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"cuid2",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Cq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"ulid",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"url",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"regex",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?yD(o).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?Kq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?Mq(o).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Lq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"duration",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?Nq(e.data,o.version)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"ip",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?zq(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"jwt",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?Fq(e.data,o.version)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"cidr",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?$q.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"base64",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?Vq.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{validation:"base64url",code:K.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):N.util.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:K.ZodIssueCode.invalid_string,...Y.errorUtil.errToObj(n)})}_addCheck(e){return new Xn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Y.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Y.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Y.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Y.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Y.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Y.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Y.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Y.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Y.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Y.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Y.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Y.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Y.errorUtil.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...Y.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...Y.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Y.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Y.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...Y.errorUtil.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Y.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Y.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Y.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Y.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Y.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,Y.errorUtil.errToObj(e))}trim(){return new Xn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}P.ZodString=Xn;Xn.create=t=>new Xn({checks:[],typeName:ce.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...me(t)});function qq(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}class us extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==N.ZodParsedType.number){const o=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(o,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.number,received:o.parsedType}),L.INVALID}let n;const i=new L.ParseStatus;for(const o of this._def.checks)o.kind==="int"?N.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?qq(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.not_finite,message:o.message}),i.dirty()):N.util.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Y.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Y.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Y.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Y.errorUtil.toString(r))}setLimit(e,r,n,i){return new us({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Y.errorUtil.toString(i)}]})}_addCheck(e){return new us({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Y.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Y.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Y.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.errorUtil.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&N.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}P.ZodNumber=us;us.create=t=>new us({checks:[],typeName:ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...me(t)});class ds extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.ZodParsedType.bigint)return this._getInvalidInput(e);let n;const i=new L.ParseStatus;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):N.util.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.bigint,received:r.parsedType}),L.INVALID}gte(e,r){return this.setLimit("min",e,!0,Y.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Y.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Y.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Y.errorUtil.toString(r))}setLimit(e,r,n,i){return new ds({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Y.errorUtil.toString(i)}]})}_addCheck(e){return new ds({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Y.errorUtil.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}P.ZodBigInt=ds;ds.create=t=>new ds({checks:[],typeName:ce.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...me(t)});class Vd extends be{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==N.ZodParsedType.boolean){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.boolean,received:n.parsedType}),L.INVALID}return(0,L.OK)(e.data)}}P.ZodBoolean=Vd;Vd.create=t=>new Vd({typeName:ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...me(t)});class Da extends be{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==N.ZodParsedType.date){const o=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(o,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.date,received:o.parsedType}),L.INVALID}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(o,{code:K.ZodIssueCode.invalid_date}),L.INVALID}const n=new L.ParseStatus;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),(0,L.addIssueToContext)(i,{code:K.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):N.util.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Da({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Y.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Y.errorUtil.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}P.ZodDate=Da;Da.create=t=>new Da({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ce.ZodDate,...me(t)});class Km extends be{_parse(e){if(this._getType(e)!==N.ZodParsedType.symbol){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.symbol,received:n.parsedType}),L.INVALID}return(0,L.OK)(e.data)}}P.ZodSymbol=Km;Km.create=t=>new Km({typeName:ce.ZodSymbol,...me(t)});class Kd extends be{_parse(e){if(this._getType(e)!==N.ZodParsedType.undefined){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.undefined,received:n.parsedType}),L.INVALID}return(0,L.OK)(e.data)}}P.ZodUndefined=Kd;Kd.create=t=>new Kd({typeName:ce.ZodUndefined,...me(t)});class Md extends be{_parse(e){if(this._getType(e)!==N.ZodParsedType.null){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.null,received:n.parsedType}),L.INVALID}return(0,L.OK)(e.data)}}P.ZodNull=Md;Md.create=t=>new Md({typeName:ce.ZodNull,...me(t)});class Nl extends be{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,L.OK)(e.data)}}P.ZodAny=Nl;Nl.create=t=>new Nl({typeName:ce.ZodAny,...me(t)});class _a extends be{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,L.OK)(e.data)}}P.ZodUnknown=_a;_a.create=t=>new _a({typeName:ce.ZodUnknown,...me(t)});class vo extends be{_parse(e){const r=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.never,received:r.parsedType}),L.INVALID}}P.ZodNever=vo;vo.create=t=>new vo({typeName:ce.ZodNever,...me(t)});class Mm extends be{_parse(e){if(this._getType(e)!==N.ZodParsedType.undefined){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.void,received:n.parsedType}),L.INVALID}return(0,L.OK)(e.data)}}P.ZodVoid=Mm;Mm.create=t=>new Mm({typeName:ce.ZodVoid,...me(t)});class Yn extends be{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==N.ZodParsedType.array)return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.array,received:r.parsedType}),L.INVALID;if(i.exactLength!==null){const s=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(s||a)&&((0,L.addIssueToContext)(r,{code:s?K.ZodIssueCode.too_big:K.ZodIssueCode.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&((0,L.addIssueToContext)(r,{code:K.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&((0,L.addIssueToContext)(r,{code:K.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>i.type._parseAsync(new _i(r,s,r.path,a)))).then(s=>L.ParseStatus.mergeArray(n,s));const o=[...r.data].map((s,a)=>i.type._parseSync(new _i(r,s,r.path,a)));return L.ParseStatus.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new Yn({...this._def,minLength:{value:e,message:Y.errorUtil.toString(r)}})}max(e,r){return new Yn({...this._def,maxLength:{value:e,message:Y.errorUtil.toString(r)}})}length(e,r){return new Yn({...this._def,exactLength:{value:e,message:Y.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}}P.ZodArray=Yn;Yn.create=(t,e)=>new Yn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...me(e)});function il(t){if(t instanceof nt){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=yi.create(il(n))}return new nt({...t._def,shape:()=>e})}else return t instanceof Yn?new Yn({...t._def,type:il(t.element)}):t instanceof yi?yi.create(il(t.unwrap())):t instanceof ps?ps.create(il(t.unwrap())):t instanceof Ri?Ri.create(t.items.map(e=>il(e))):t}class nt extends be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=N.util.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==N.ZodParsedType.object){const u=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(u,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.object,received:u.parsedType}),L.INVALID}const{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof vo&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||a.push(u);const c=[];for(const u of s){const d=o[u],f=i.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new _i(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof vo){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")a.length>0&&((0,L.addIssueToContext)(i,{code:K.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=i.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new _i(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>L.ParseStatus.mergeObjectSync(n,u)):L.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return Y.errorUtil.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,s;const i=((s=(o=this._def).errorMap)==null?void 0:s.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Y.errorUtil.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ce.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const r={};for(const n of N.util.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new nt({...this._def,shape:()=>r})}omit(e){const r={};for(const n of N.util.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new nt({...this._def,shape:()=>r})}deepPartial(){return il(this)}partial(e){const r={};for(const n of N.util.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new nt({...this._def,shape:()=>r})}required(e){const r={};for(const n of N.util.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof yi;)o=o._def.innerType;r[n]=o}return new nt({...this._def,shape:()=>r})}keyof(){return gD(N.util.objectKeys(this.shape))}}P.ZodObject=nt;nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:vo.create(),typeName:ce.ZodObject,...me(e)});nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:vo.create(),typeName:ce.ZodObject,...me(e)});nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:vo.create(),typeName:ce.ZodObject,...me(e)});class Nd extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new K.ZodError(a.ctx.common.issues));return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_union,unionErrors:s}),L.INVALID}if(r.common.async)return Promise.all(n.map(async o=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(c=>new K.ZodError(c));return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_union,unionErrors:a}),L.INVALID}}get options(){return this._def.options}}P.ZodUnion=Nd;Nd.create=(t,e)=>new Nd({options:t,typeName:ce.ZodUnion,...me(e)});const Gi=t=>t instanceof qd?Gi(t.schema):t instanceof ti?Gi(t.innerType()):t instanceof Gd?[t.value]:t instanceof fs?t.options:t instanceof Hd?N.util.objectValues(t.enum):t instanceof Wd?Gi(t._def.innerType):t instanceof Kd?[void 0]:t instanceof Md?[null]:t instanceof yi?[void 0,...Gi(t.unwrap())]:t instanceof ps?[null,...Gi(t.unwrap())]:t instanceof fx||t instanceof Jd?Gi(t.unwrap()):t instanceof Xd?Gi(t._def.innerType):[];class My extends be{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.ZodParsedType.object)return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.object,received:r.parsedType}),L.INVALID;const n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):((0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const o of r){const s=Gi(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,o)}}return new My({typeName:ce.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...me(n)})}}P.ZodDiscriminatedUnion=My;function wE(t,e){const r=(0,N.getParsedType)(t),n=(0,N.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===N.ZodParsedType.object&&n===N.ZodParsedType.object){const i=N.util.objectKeys(e),o=N.util.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(const a of o){const c=wE(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===N.ZodParsedType.array&&n===N.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<t.length;o++){const s=t[o],a=e[o],c=wE(s,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===N.ZodParsedType.date&&n===N.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class zd extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if((0,L.isAborted)(o)||(0,L.isAborted)(s))return L.INVALID;const a=wE(o.value,s.value);return a.valid?(((0,L.isDirty)(o)||(0,L.isDirty)(s))&&r.dirty(),{status:r.value,value:a.data}):((0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_intersection_types}),L.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}P.ZodIntersection=zd;zd.create=(t,e,r)=>new zd({left:t,right:e,typeName:ce.ZodIntersection,...me(r)});class Ri extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.ZodParsedType.array)return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.array,received:n.parsedType}),L.INVALID;if(n.data.length<this._def.items.length)return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((s,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new _i(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>L.ParseStatus.mergeArray(r,s)):L.ParseStatus.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new Ri({...this._def,rest:e})}}P.ZodTuple=Ri;Ri.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ri({items:t,typeName:ce.ZodTuple,rest:null,...me(e)})};class Fd extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.ZodParsedType.object)return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.object,received:n.parsedType}),L.INVALID;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in n.data)i.push({key:o._parse(new _i(n,a,n.path,a)),value:s._parse(new _i(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?L.ParseStatus.mergeObjectAsync(r,i):L.ParseStatus.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof be?new Fd({keyType:e,valueType:r,typeName:ce.ZodRecord,...me(n)}):new Fd({keyType:Xn.create(),valueType:e,typeName:ce.ZodRecord,...me(r)})}}P.ZodRecord=Fd;class Nm extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.ZodParsedType.map)return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.map,received:n.parsedType}),L.INVALID;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:i._parse(new _i(n,a,n.path,[u,"key"])),value:o._parse(new _i(n,c,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return L.INVALID;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const c of s){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return L.INVALID;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}}P.ZodMap=Nm;Nm.create=(t,e,r)=>new Nm({valueType:e,keyType:t,typeName:ce.ZodMap,...me(r)});class Ba extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==N.ZodParsedType.set)return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.set,received:n.parsedType}),L.INVALID;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&((0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&((0,L.addIssueToContext)(n,{code:K.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const o=this._def.valueType;function s(c){const u=new Set;for(const d of c){if(d.status==="aborted")return L.INVALID;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((c,u)=>o._parse(new _i(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,r){return new Ba({...this._def,minSize:{value:e,message:Y.errorUtil.toString(r)}})}max(e,r){return new Ba({...this._def,maxSize:{value:e,message:Y.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}P.ZodSet=Ba;Ba.create=(t,e)=>new Ba({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...me(e)});class Pl extends be{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.ZodParsedType.function)return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.function,received:r.parsedType}),L.INVALID;function n(a,c){return(0,L.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,fh.getErrorMap)(),fh.defaultErrorMap].filter(u=>!!u),issueData:{code:K.ZodIssueCode.invalid_arguments,argumentsError:c}})}function i(a,c){return(0,L.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,fh.getErrorMap)(),fh.defaultErrorMap].filter(u=>!!u),issueData:{code:K.ZodIssueCode.invalid_return_type,returnTypeError:c}})}const o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof zl){const a=this;return(0,L.OK)(async function(...c){const u=new K.ZodError([]),d=await a._def.args.parseAsync(c,o).catch(m=>{throw u.addIssue(n(c,m)),u}),f=await Reflect.apply(s,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(m=>{throw u.addIssue(i(f,m)),u})})}else{const a=this;return(0,L.OK)(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new K.ZodError([n(c,u.error)]);const d=Reflect.apply(s,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new K.ZodError([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pl({...this._def,args:Ri.create(e).rest(_a.create())})}returns(e){return new Pl({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new Pl({args:e||Ri.create([]).rest(_a.create()),returns:r||_a.create(),typeName:ce.ZodFunction,...me(n)})}}P.ZodFunction=Pl;class qd extends be{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}P.ZodLazy=qd;qd.create=(t,e)=>new qd({getter:t,typeName:ce.ZodLazy,...me(e)});class Gd extends be{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(r,{received:r.data,code:K.ZodIssueCode.invalid_literal,expected:this._def.value}),L.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}P.ZodLiteral=Gd;Gd.create=(t,e)=>new Gd({value:t,typeName:ce.ZodLiteral,...me(e)});function gD(t,e){return new fs({values:t,typeName:ce.ZodEnum,...me(e)})}class fs extends be{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return(0,L.addIssueToContext)(r,{expected:N.util.joinValues(n),received:r.parsedType,code:K.ZodIssueCode.invalid_type}),L.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return(0,L.addIssueToContext)(r,{received:r.data,code:K.ZodIssueCode.invalid_enum_value,options:n}),L.INVALID}return(0,L.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return fs.create(e,{...this._def,...r})}exclude(e,r=this._def){return fs.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}P.ZodEnum=fs;fs.create=gD;class Hd extends be{_parse(e){const r=N.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==N.ZodParsedType.string&&n.parsedType!==N.ZodParsedType.number){const i=N.util.objectValues(r);return(0,L.addIssueToContext)(n,{expected:N.util.joinValues(i),received:n.parsedType,code:K.ZodIssueCode.invalid_type}),L.INVALID}if(this._cache||(this._cache=new Set(N.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=N.util.objectValues(r);return(0,L.addIssueToContext)(n,{received:n.data,code:K.ZodIssueCode.invalid_enum_value,options:i}),L.INVALID}return(0,L.OK)(e.data)}get enum(){return this._def.values}}P.ZodNativeEnum=Hd;Hd.create=(t,e)=>new Hd({values:t,typeName:ce.ZodNativeEnum,...me(e)});class zl extends be{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==N.ZodParsedType.promise&&r.common.async===!1)return(0,L.addIssueToContext)(r,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.promise,received:r.parsedType}),L.INVALID;const n=r.parsedType===N.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,L.OK)(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}P.ZodPromise=zl;zl.create=(t,e)=>new zl({type:t,typeName:ce.ZodPromise,...me(e)});class ti extends be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{(0,L.addIssueToContext)(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return L.INVALID;const c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?L.INVALID:c.status==="dirty"||r.value==="dirty"?(0,L.DIRTY)(c.value):c});{if(r.value==="aborted")return L.INVALID;const a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?L.INVALID:a.status==="dirty"||r.value==="dirty"?(0,L.DIRTY)(a.value):a}}if(i.type==="refinement"){const s=a=>{const c=i.refinement(a,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?L.INVALID:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?L.INVALID:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,L.isValid)(s))return L.INVALID;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>(0,L.isValid)(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:r.value,value:a})):L.INVALID);N.util.assertNever(i)}}P.ZodEffects=ti;P.ZodTransformer=ti;ti.create=(t,e,r)=>new ti({schema:t,typeName:ce.ZodEffects,effect:e,...me(r)});ti.createWithPreprocess=(t,e,r)=>new ti({schema:e,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...me(r)});class yi extends be{_parse(e){return this._getType(e)===N.ZodParsedType.undefined?(0,L.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.ZodOptional=yi;yi.create=(t,e)=>new yi({innerType:t,typeName:ce.ZodOptional,...me(e)});class ps extends be{_parse(e){return this._getType(e)===N.ZodParsedType.null?(0,L.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.ZodNullable=ps;ps.create=(t,e)=>new ps({innerType:t,typeName:ce.ZodNullable,...me(e)});class Wd extends be{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===N.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}P.ZodDefault=Wd;Wd.create=(t,e)=>new Wd({innerType:t,typeName:ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...me(e)});class Xd extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,L.isAsync)(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new K.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new K.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}P.ZodCatch=Xd;Xd.create=(t,e)=>new Xd({innerType:t,typeName:ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...me(e)});class zm extends be{_parse(e){if(this._getType(e)!==N.ZodParsedType.nan){const n=this._getOrReturnCtx(e);return(0,L.addIssueToContext)(n,{code:K.ZodIssueCode.invalid_type,expected:N.ZodParsedType.nan,received:n.parsedType}),L.INVALID}return{status:"valid",value:e.data}}}P.ZodNaN=zm;zm.create=t=>new zm({typeName:ce.ZodNaN,...me(t)});P.BRAND=Symbol("zod_brand");class fx extends be{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}P.ZodBranded=fx;class yf extends be{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?L.INVALID:o.status==="dirty"?(r.dirty(),(0,L.DIRTY)(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?L.INVALID:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new yf({in:e,out:r,typeName:ce.ZodPipeline})}}P.ZodPipeline=yf;class Jd extends be{_parse(e){const r=this._def.innerType._parse(e),n=i=>((0,L.isValid)(i)&&(i.value=Object.freeze(i.value)),i);return(0,L.isAsync)(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}P.ZodReadonly=Jd;Jd.create=(t,e)=>new Jd({innerType:t,typeName:ce.ZodReadonly,...me(e)});function W1(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function bD(t,e={},r){return t?Nl.create().superRefine((n,i)=>{const o=t(n);if(o instanceof Promise)return o.then(s=>{if(!s){const a=W1(e,n),c=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:c})}});if(!o){const s=W1(e,n),a=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:a})}}):Nl.create()}P.late={object:nt.lazycreate};var ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ce||(P.ZodFirstPartyTypeKind=ce={}));const Gq=(t,e={message:`Input not instance of ${t.name}`})=>bD(r=>r instanceof t,e);P.instanceof=Gq;const vD=Xn.create;P.string=vD;const ED=us.create;P.number=ED;const Hq=zm.create;P.nan=Hq;const Wq=ds.create;P.bigint=Wq;const wD=Vd.create;P.boolean=wD;const Xq=Da.create;P.date=Xq;const Jq=Km.create;P.symbol=Jq;const Zq=Kd.create;P.undefined=Zq;const Qq=Md.create;P.null=Qq;const Yq=Nl.create;P.any=Yq;const eG=_a.create;P.unknown=eG;const tG=vo.create;P.never=tG;const rG=Mm.create;P.void=rG;const nG=Yn.create;P.array=nG;const iG=nt.create;P.object=iG;const oG=nt.strictCreate;P.strictObject=oG;const sG=Nd.create;P.union=sG;const aG=My.create;P.discriminatedUnion=aG;const lG=zd.create;P.intersection=lG;const cG=Ri.create;P.tuple=cG;const uG=Fd.create;P.record=uG;const dG=Nm.create;P.map=dG;const fG=Ba.create;P.set=fG;const pG=Pl.create;P.function=pG;const hG=qd.create;P.lazy=hG;const mG=Gd.create;P.literal=mG;const yG=fs.create;P.enum=yG;const gG=Hd.create;P.nativeEnum=gG;const bG=zl.create;P.promise=bG;const xD=ti.create;P.effect=xD;P.transformer=xD;const vG=yi.create;P.optional=vG;const EG=ps.create;P.nullable=EG;const wG=ti.createWithPreprocess;P.preprocess=wG;const xG=yf.create;P.pipeline=xG;const _G=()=>vD().optional();P.ostring=_G;const RG=()=>ED().optional();P.onumber=RG;const AG=()=>wD().optional();P.oboolean=AG;P.coerce={string:t=>Xn.create({...t,coerce:!0}),number:t=>us.create({...t,coerce:!0}),boolean:t=>Vd.create({...t,coerce:!0}),bigint:t=>ds.create({...t,coerce:!0}),date:t=>Da.create({...t,coerce:!0})};P.NEVER=L.INVALID;(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(ks,t),r(dx,t),r(pD,t),r(mf,t),r(P,t),r(mi,t)})(EE);(function(t){var e=C&&C.__createBinding||(Object.create?function(s,a,c,u){u===void 0&&(u=c);var d=Object.getOwnPropertyDescriptor(a,c);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,u,d)}:function(s,a,c,u){u===void 0&&(u=c),s[u]=a[c]}),r=C&&C.__setModuleDefault||(Object.create?function(s,a){Object.defineProperty(s,"default",{enumerable:!0,value:a})}:function(s,a){s.default=a}),n=C&&C.__importStar||function(s){if(s&&s.__esModule)return s;var a={};if(s!=null)for(var c in s)c!=="default"&&Object.prototype.hasOwnProperty.call(s,c)&&e(a,s,c);return r(a,s),a},i=C&&C.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&e(a,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=n(EE);t.z=o,i(EE,t),t.default=o})(vE);(function(t){var e=C&&C.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a);var u=Object.getOwnPropertyDescriptor(s,a);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(o,c,u)}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),r=C&&C.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&e(s,o,a)},n=C&&C.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(vE);r(vE,t),t.default=i.default})(Z);var _o={},Ny={},rc={};(function(t){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 e extends TypeError{constructor(o="JWK error",s=t.ERR_JWK_INVALID,a){super(o,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}}t.JwkError=e;class r extends Error{constructor(o="Unable to create JWT",s=t.ERR_JWT_CREATE,a){super(o,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}static from(o,s,a){return o instanceof r?o:o instanceof e?new r(a,o.code,{cause:o}):new r(a,s,{cause:o})}}t.JwtCreateError=r;class n extends Error{constructor(o="Invalid JWT",s=t.ERR_JWT_VERIFY,a){super(o,a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}static from(o,s,a){return o instanceof n?o:o instanceof e?new n(a,o.code,{cause:o}):new n(a,s,{cause:o})}}t.JwtVerifyError=n})(rc);Object.defineProperty(Ny,"__esModule",{value:!0});Ny.jwkAlgorithms=SG;const Lv=rc,{process:ph}=globalThis;var Sk;const X1=typeof ph<"u"&&typeof((Sk=ph==null?void 0:ph.versions)==null?void 0:Sk.node)=="string";function*SG(t){if(t.alg){yield t.alg;return}switch(t.kty){case"EC":{if((t.use==="enc"||t.use===void 0)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),t.use==="sig"||t.use===void 0){const e="crv"in t?t.crv:void 0;switch(e){case"P-256":case"P-384":yield`ES${e.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":X1&&(yield"ES256K");break;default:throw new Lv.JwkError(`Unsupported crv "${e}"`)}}return}case"OKP":{if(!t.use)throw new Lv.JwkError('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{(t.use==="enc"||t.use===void 0)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",X1&&(yield"RSA1_5")),(t.use==="sig"||t.use===void 0)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{(t.use==="enc"||t.use===void 0)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),(t.use==="sig"||t.use===void 0)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new Lv.JwkError(`Unsupported kty "${t.kty}"`)}}var gf={};(function(t){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 e=Z;t.keyUsageSchema=e.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]),t.jwkBaseSchema=e.z.object({kty:e.z.string().min(1),alg:e.z.string().min(1).optional(),kid:e.z.string().min(1).optional(),ext:e.z.boolean().optional(),use:e.z.enum(["sig","enc"]).optional(),key_ops:e.z.array(t.keyUsageSchema).optional(),x5c:e.z.array(e.z.string()).optional(),x5t:e.z.string().min(1).optional(),"x5t#S256":e.z.string().min(1).optional(),x5u:e.z.string().url().optional()}),t.jwkRsaKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("RSA"),alg:e.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:e.z.string().min(1),e:e.z.string().min(1),d:e.z.string().min(1).optional(),p:e.z.string().min(1).optional(),q:e.z.string().min(1).optional(),dp:e.z.string().min(1).optional(),dq:e.z.string().min(1).optional(),qi:e.z.string().min(1).optional(),oth:e.z.array(e.z.object({r:e.z.string().optional(),d:e.z.string().optional(),t:e.z.string().optional()})).nonempty().optional()}),t.jwkEcKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("EC"),alg:e.z.enum(["ES256","ES384","ES512"]).optional(),crv:e.z.enum(["P-256","P-384","P-521"]),x:e.z.string().min(1),y:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkEcSecp256k1KeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("EC"),alg:e.z.enum(["ES256K"]).optional(),crv:e.z.enum(["secp256k1"]),x:e.z.string().min(1),y:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkOkpKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("OKP"),alg:e.z.enum(["EdDSA"]).optional(),crv:e.z.enum(["Ed25519","Ed448"]),x:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkSymKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("oct"),alg:e.z.enum(["HS256","HS384","HS512"]).optional(),k:e.z.string()}),t.jwkUnknownKeySchema=t.jwkBaseSchema.extend({kty:e.z.string().refine(r=>r!=="RSA"&&r!=="EC"&&r!=="OKP"&&r!=="oct")}),t.jwkSchema=e.z.union([t.jwkUnknownKeySchema,t.jwkRsaKeySchema,t.jwkEcKeySchema,t.jwkEcSecp256k1KeySchema,t.jwkOkpKeySchema,t.jwkSymKeySchema]),t.jwkValidator=t.jwkSchema.refine(r=>r.use!=null||r.key_ops!=null,"use or key_ops required").refine(r=>!r.use||!r.key_ops||r.key_ops.every(n=>r.use==="sig"?n==="sign"||n==="verify":n==="encrypt"||n==="decrypt"),"use and key_ops must be consistent"),t.jwkPubSchema=t.jwkValidator.refine(r=>r.kid!=null,"kid is required").refine(r=>!("k"in r)&&!("d"in r),"private key not allowed")})(gf);var Fl={};Object.defineProperty(Fl,"__esModule",{value:!0});Fl.jwksPubSchema=Fl.jwksSchema=void 0;const Fm=Z,_D=gf;Fl.jwksSchema=Fm.z.object({keys:Fm.z.array(_D.jwkSchema)});Fl.jwksPubSchema=Fm.z.object({keys:Fm.z.array(_D.jwkPubSchema)});var zy={},px={},Ot={};function CG(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(r[s]!==255)throw new TypeError(o+" is ambiguous");r[s]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var v=0,w=0,y=0,b=g.length;y!==b&&g[y]===0;)y++,v++;for(var E=(b-y)*d+1>>>0,_=new Uint8Array(E);y!==b;){for(var T=g[y],B=0,I=E-1;(T!==0||B<w)&&I!==-1;I--,B++)T+=256*_[I]>>>0,_[I]=T%a>>>0,T=T/a>>>0;if(T!==0)throw new Error("Non-zero carry");w=B,y++}for(var O=E-w;O!==E&&_[O]===0;)O++;for(var F=c.repeat(v);O<E;++O)F+=t.charAt(_[O]);return F}function h(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var v=0;if(g[v]!==" "){for(var w=0,y=0;g[v]===c;)w++,v++;for(var b=(g.length-v)*u+1>>>0,E=new Uint8Array(b);g[v];){var _=r[g.charCodeAt(v)];if(_===255)return;for(var T=0,B=b-1;(_!==0||T<y)&&B!==-1;B--,T++)_+=a*E[B]>>>0,E[B]=_%256>>>0,_=_/256>>>0;if(_!==0)throw new Error("Non-zero carry");y=T,v++}if(g[v]!==" "){for(var I=b-y;I!==b&&E[I]===0;)I++;for(var O=new Uint8Array(w+(b-I)),F=w;I!==b;)O[F++]=E[I++];return O}}}function m(g){var v=h(g);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:h,decode:m}}var TG=CG,kG=TG;const PG=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},hx=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},LG=t=>new TextEncoder().encode(t),DG=t=>new TextDecoder().decode(t);class BG{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class IG{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return RD(this,e)}}class jG{constructor(e){this.decoders=e}or(e){return RD(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const RD=(t,e)=>new jG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class OG{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new BG(e,r,n),this.decoder=new IG(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Fy=({name:t,prefix:e,encode:r,decode:n})=>new OG(t,e,r,n),bf=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=kG(r,e);return Fy({prefix:t,name:e,encode:n,decode:o=>hx(i(o))})},UG=(t,e,r,n)=>{const i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let o=t.length;for(;t[o-1]==="=";)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,u=0;for(let d=0;d<o;++d){const f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s},$G=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",s=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],s+=8;s>r;)s-=r,o+=e[i&a>>s];if(s&&(o+=e[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o},Xt=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Fy({prefix:e,name:t,encode(i){return $G(i,n,r)},decode(i){return UG(i,n,r,t)}}),VG=Xt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),KG=Xt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),MG=Xt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),NG=Xt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),AD=Object.freeze(Object.defineProperty({__proto__:null,base64:VG,base64pad:KG,base64url:MG,base64urlpad:NG},Symbol.toStringTag,{value:"Module"})),mx=vy(AD);Object.defineProperty(Ot,"__esModule",{value:!0});Ot.segmentedStringRefinementFactory=Ot.jwtCharsRefinement=Ot.cachedGetter=Ot.preferredOrderCmp=Ot.isDefined=void 0;Ot.matchesAny=GG;Ot.parseB64uJson=XG;const zG=mx,ol=Z,FG=t=>t!==void 0;Ot.isDefined=FG;const qG=t=>(e,r)=>{const n=t.indexOf(e),i=t.indexOf(r);return n===i?0:n===-1?1:i===-1?-1:n-i};Ot.preferredOrderCmp=qG;function GG(t){return t==null?e=>!0:Array.isArray(t)?e=>t.includes(e):e=>e===t}const HG=(t,e)=>function(){const r=t.call(this);return Object.defineProperty(this,t.name,{get:()=>r,enumerable:!0,configurable:!0}),r};Ot.cachedGetter=HG;const WG=new TextDecoder;function XG(t){const e=zG.base64url.baseDecode(t),r=WG.decode(e);return JSON.parse(r)}const JG=(t,e)=>{let r;for(let n=0;n<t.length;n++)if(r=t.charCodeAt(n),!(65<=r&&r<=90||97<=r&&r<=122||48<=r&&r<=57||r===45||r===95||r===46)){const i=String.fromCodePoint(t.codePointAt(n));return e.addIssue({code:ol.ZodIssueCode.custom,message:`Invalid character "${i}" in JWT at position ${n}`})}};Ot.jwtCharsRefinement=JG;const ZG=(t,e=2)=>{if(!Number.isFinite(t)||t<1||(t|0)!==t)throw new TypeError(`Count must be a natural number (got ${t})`);const r=t*e+(t-1),n="Invalid JWT format";return(i,o)=>{if(i.length<r)return o.addIssue({code:ol.ZodIssueCode.custom,message:`${n}: too short`}),!1;let s=0;for(let a=0;a<t-1;a++){const c=i.indexOf(".",s);if(c===-1)return o.addIssue({code:ol.ZodIssueCode.custom,message:`${n}: expected ${t} segments, got ${a+1}`}),!1;if(c-s<e)return o.addIssue({code:ol.ZodIssueCode.custom,message:`${n}: segment ${a+1} is too short`}),!1;s=c+1}return i.indexOf(".",s)!==-1?(o.addIssue({code:ol.ZodIssueCode.custom,message:`${n}: too many segments`}),!1):i.length-s<e?(o.addIssue({code:ol.ZodIssueCode.custom,message:`${n}: last segment is too short`}),!1):!0}};Ot.segmentedStringRefinementFactory=ZG;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.jwtPayloadSchema=t.htuSchema=t.jwtHeaderSchema=t.isUnsignedJwt=t.unsignedJwtSchema=t.isSignedJwt=t.signedJwtSchema=void 0;const e=Z,r=gf,n=Ot;t.signedJwtSchema=e.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(3));const i=s=>t.signedJwtSchema.safeParse(s).success;t.isSignedJwt=i,t.unsignedJwtSchema=e.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(2));const o=s=>t.unsignedJwtSchema.safeParse(s).success;t.isUnsignedJwt=o,t.jwtHeaderSchema=e.z.object({alg:e.z.string(),jku:e.z.string().url().optional(),jwk:e.z.object({kty:e.z.string(),crv:e.z.string().optional(),x:e.z.string().optional(),y:e.z.string().optional(),e:e.z.string().optional(),n:e.z.string().optional()}).optional(),kid:e.z.string().optional(),x5u:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),x5t:e.z.string().optional(),"x5t#S256":e.z.string().optional(),typ:e.z.string().optional(),cty:e.z.string().optional(),crit:e.z.array(e.z.string()).optional()}).passthrough(),t.htuSchema=e.z.string().superRefine((s,a)=>{try{const c=new URL(s);c.protocol!=="http:"&&c.protocol!=="https:"&&a.addIssue({code:e.z.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(c.username||c.password)&&a.addIssue({code:e.z.ZodIssueCode.custom,message:"Credentials not allowed"}),c.search&&a.addIssue({code:e.z.ZodIssueCode.custom,message:"Query string not allowed"}),c.hash&&a.addIssue({code:e.z.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{a.addIssue({code:e.z.ZodIssueCode.invalid_string,validation:"url"})}return s}),t.jwtPayloadSchema=e.z.object({iss:e.z.string().optional(),aud:e.z.union([e.z.string(),e.z.array(e.z.string()).nonempty()]).optional(),sub:e.z.string().optional(),exp:e.z.number().int().optional(),nbf:e.z.number().int().optional(),iat:e.z.number().int().optional(),jti:e.z.string().optional(),htm:e.z.string().optional(),htu:t.htuSchema.optional(),ath:e.z.string().optional(),acr:e.z.string().optional(),azp:e.z.string().optional(),amr:e.z.array(e.z.string()).optional(),cnf:e.z.object({kid:e.z.string().optional(),jwk:r.jwkPubSchema.optional(),jwe:e.z.string().optional(),jku:e.z.string().url().optional(),jkt:e.z.string().optional(),"x5t#S256":e.z.string().optional(),osc:e.z.string().optional()}).optional(),client_id:e.z.string().optional(),scope:e.z.string().optional(),nonce:e.z.string().optional(),at_hash:e.z.string().optional(),c_hash:e.z.string().optional(),s_hash:e.z.string().optional(),auth_time:e.z.number().int().optional(),name:e.z.string().optional(),family_name:e.z.string().optional(),given_name:e.z.string().optional(),middle_name:e.z.string().optional(),nickname:e.z.string().optional(),preferred_username:e.z.string().optional(),gender:e.z.string().optional(),picture:e.z.string().url().optional(),profile:e.z.string().url().optional(),website:e.z.string().url().optional(),birthdate:e.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:e.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:e.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:e.z.number().int().optional(),email:e.z.string().optional(),email_verified:e.z.boolean().optional(),phone_number:e.z.string().optional(),phone_number_verified:e.z.boolean().optional(),address:e.z.object({formatted:e.z.string().optional(),street_address:e.z.string().optional(),locality:e.z.string().optional(),region:e.z.string().optional(),postal_code:e.z.string().optional(),country:e.z.string().optional()}).optional(),authorization_details:e.z.array(e.z.object({type:e.z.string(),locations:e.z.array(e.z.string()).optional(),actions:e.z.array(e.z.string()).optional(),datatypes:e.z.array(e.z.string()).optional(),identifier:e.z.string().optional(),privileges:e.z.array(e.z.string()).optional()}).passthrough()).optional()}).passthrough()})(px);Object.defineProperty(zy,"__esModule",{value:!0});zy.unsafeDecodeJwt=QG;const hh=rc,J1=px,Z1=Ot;function QG(t){const{0:e,1:r,length:n}=t.split(".");if(n>3||n<2)throw new hh.JwtVerifyError(void 0,hh.ERR_JWT_INVALID);const i=J1.jwtHeaderSchema.parse((0,Z1.parseB64uJson)(e));if(n===2&&(i==null?void 0:i.alg)!=="none")throw new hh.JwtVerifyError(void 0,hh.ERR_JWT_INVALID);const o=J1.jwtPayloadSchema.parse((0,Z1.parseB64uJson)(r));return{header:i,payload:o}}var SD={};Object.defineProperty(SD,"__esModule",{value:!0});var qy={},YG=C&&C.__runInitializers||function(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0},Dv=C&&C.__esDecorate||function(t,e,r,n,i,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,d=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,h=!1,m=r.length-1;m>=0;m--){var g={};for(var v in n)g[v]=v==="access"?{}:n[v];for(var v in n.access)g.access[v]=n.access[v];g.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var w=(0,r[m])(a==="accessor"?{get:d.get,set:d.set}:d[c],g);if(a==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(f=s(w.get))&&(d.get=f),(f=s(w.set))&&(d.set=f),(f=s(w.init))&&i.unshift(f)}else(f=s(w))&&(a==="field"?i.unshift(f):d[c]=f)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(qy,"__esModule",{value:!0});qy.Key=void 0;const e6=Ny,t6=rc,r6=gf,Bv=Ot,Q1=r6.jwkSchema.readonly();let n6=(()=>{var t;let e=[],r,n,i;return t=class{constructor(s){if(Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(YG(this,e),s)}),!s.use)throw new t6.JwkError('Missing "use" Parameter value')}get isPrivate(){const{jwk:s}=this;return"d"in s&&s.d!==void 0||"k"in s&&s.k!==void 0}get isSymetric(){const{jwk:s}=this;return"k"in s&&s.k!==void 0}get privateJwk(){return this.isPrivate?this.jwk:void 0}get publicJwk(){if(!this.isSymetric)return Q1.parse({...this.jwk,d:void 0,k:void 0})}get bareJwk(){if(this.isSymetric)return;const{kty:s,crv:a,e:c,n:u,x:d,y:f}=this.jwk;return Q1.parse({crv:a,e:c,kty:s,n:u,x:d,y:f})}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,e6.jwkAlgorithms)(this.jwk)))}},(()=>{const o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[Bv.cachedGetter],n=[Bv.cachedGetter],i=[Bv.cachedGetter],Dv(t,null,r,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:s=>"publicJwk"in s,get:s=>s.publicJwk},metadata:o},null,e),Dv(t,null,n,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:s=>"bareJwk"in s,get:s=>s.bareJwk},metadata:o},null,e),Dv(t,null,i,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:s=>"algorithms"in s,get:s=>s.algorithms},metadata:o},null,e),o&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),t})();qy.Key=n6;var Gy={},i6=C&&C.__runInitializers||function(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0},Iv=C&&C.__esDecorate||function(t,e,r,n,i,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,d=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,h=!1,m=r.length-1;m>=0;m--){var g={};for(var v in n)g[v]=v==="access"?{}:n[v];for(var v in n.access)g.access[v]=n.access[v];g.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var w=(0,r[m])(a==="accessor"?{get:d.get,set:d.set}:d[c],g);if(a==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(f=s(w.get))&&(d.get=f),(f=s(w.set))&&(d.set=f),(f=s(w.init))&&i.unshift(f)}else(f=s(w))&&(a==="field"?i.unshift(f):d[c]=f)}u&&Object.defineProperty(u,n.name,d),h=!0};Object.defineProperty(Gy,"__esModule",{value:!0});Gy.Keyset=void 0;const an=rc,o6=zy,Js=Ot,s6=t=>t.privateJwk,a6=t=>t.publicJwk;let l6=(()=>{var t;let e=[],r,n,i;return t=class{constructor(s,a=s instanceof t?[...s.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){Object.defineProperty(this,"preferredSigningAlgorithms",{enumerable:!0,configurable:!0,writable:!0,value:(i6(this,e),a)}),Object.defineProperty(this,"keys",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const c=[],u=new Set;for(const d of s)if(d&&(c.push(d),d.kid)){if(u.has(d.kid))throw new an.JwkError(`Duplicate key: ${d.kid}`);u.add(d.kid)}this.keys=Object.freeze(c)}get size(){return this.keys.length}get signAlgorithms(){const s=new Set;for(const a of this)if(a.use==="sig")for(const c of a.algorithms)s.add(c);return Object.freeze([...s].sort((0,Js.preferredOrderCmp)(this.preferredSigningAlgorithms)))}get publicJwks(){return{keys:Array.from(this,a6).filter(Js.isDefined)}}get privateJwks(){return{keys:Array.from(this,s6).filter(Js.isDefined)}}has(s){return this.keys.some(a=>a.kid===s)}get(s){for(const a of this.list(s))return a;throw new an.JwkError(`Key not found ${s.kid||s.alg||"<unknown>"}`,an.ERR_JWK_NOT_FOUND)}*list(s){var a,c;if(((a=s.kid)==null?void 0:a.length)!==0&&((c=s.alg)==null?void 0:c.length)!==0){for(const u of this)if(!(s.use&&u.use!==s.use)){if(Array.isArray(s.kid)){if(!u.kid||!s.kid.includes(u.kid))continue}else if(s.kid&&u.kid!==s.kid)continue;if(Array.isArray(s.alg)){if(!s.alg.some(d=>u.algorithms.includes(d)))continue}else if(typeof s.alg=="string"&&!u.algorithms.includes(s.alg))continue;yield u}}}findKey({kid:s,alg:a,use:c}){const u=[];for(const h of this.list({kid:s,alg:a,use:c}))if(h.isPrivate){if(typeof a=="string")return[h,a];u.push(h)}const d=(0,Js.matchesAny)(a),f=u.map(h=>[h,h.algorithms.filter(d)]);for(const h of this.preferredSigningAlgorithms)for(const[m,g]of f)if(g.includes(h))return[m,h];for(const[h,m]of f)for(const g of m)return[h,g];throw new an.JwkError(`No signing key found for ${s||a||c||"<unknown>"}`,an.ERR_JWK_NOT_FOUND)}[(r=[Js.cachedGetter],n=[Js.cachedGetter],i=[Js.cachedGetter],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:s,kid:a,...c},u){try{const[d,f]=this.findKey({alg:s,kid:a,use:"sig"}),h={...c,alg:f,kid:d.kid};return typeof u=="function"&&(u=await u(h,d)),await d.createJwt(h,u)}catch(d){throw an.JwtCreateError.from(d)}}async verifyJwt(s,a){const{header:c}=(0,o6.unsafeDecodeJwt)(s),{kid:u,alg:d}=c,f=[];for(const h of this.list({kid:u,alg:d}))try{return{...await h.verifyJwt(s,a),key:h}}catch(m){f.push(m)}switch(f.length){case 0:throw new an.JwtVerifyError("No key matched",an.ERR_JWKS_NO_MATCHING_KEY);case 1:throw an.JwtVerifyError.from(f[0],an.ERR_JWT_INVALID);default:throw an.JwtVerifyError.from(f,an.ERR_JWT_INVALID)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;Iv(t,null,r,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:s=>"signAlgorithms"in s,get:s=>s.signAlgorithms},metadata:o},null,e),Iv(t,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:s=>"publicJwks"in s,get:s=>s.publicJwks},metadata:o},null,e),Iv(t,null,i,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:s=>"privateJwks"in s,get:s=>s.privateJwks},metadata:o},null,e),o&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),t})();Gy.Keyset=l6;(function(t){var e=C&&C.__createBinding||(Object.create?function(i,o,s,a){a===void 0&&(a=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,a,c)}:function(i,o,s,a){a===void 0&&(a=s),i[a]=o[s]}),r=C&&C.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;var n=Z;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return n.ZodError}}),r(Ny,t),r(rc,t),r(gf,t),r(Fl,t),r(zy,t),r(SD,t),r(px,t),r(qy,t),r(Gy,t),r(Ot,t)})(_o);var CD={},Hy={};const ge=crypto,Vr=t=>t instanceof CryptoKey,TD=async(t,e)=>{const r=`SHA-${t.slice(-3)}`;return new Uint8Array(await ge.subtle.digest(r,e))},mt=new TextEncoder,xn=new TextDecoder,qm=2**32;function Ti(...t){const e=t.reduce((i,{length:o})=>i+o,0),r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function c6(t,e){return Ti(mt.encode(t),new Uint8Array([0]),e)}function xE(t,e,r){if(e<0||e>=qm)throw new RangeError(`value must be >= 0 and <= ${qm-1}. Received ${e}`);t.set([e>>>24,e>>>16,e>>>8,e&255],r)}function kD(t){const e=Math.floor(t/qm),r=t%qm,n=new Uint8Array(8);return xE(n,e,0),xE(n,r,4),n}function yx(t){const e=new Uint8Array(4);return xE(e,t),e}function jv(t){return Ti(yx(t.length),t)}async function u6(t,e,r){const n=Math.ceil((e>>3)/32),i=new Uint8Array(n*32);for(let o=0;o<n;o++){const s=new Uint8Array(4+t.length+r.length);s.set(yx(o+1)),s.set(t,4),s.set(r,4+t.length),i.set(await TD("sha256",s),o*32)}return i.slice(0,e>>3)}const gx=t=>{let e=t;typeof e=="string"&&(e=mt.encode(e));const r=32768,n=[];for(let i=0;i<e.length;i+=r)n.push(String.fromCharCode.apply(null,e.subarray(i,i+r)));return btoa(n.join(""))},Et=t=>gx(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),PD=t=>{const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r},pt=t=>{let e=t;e instanceof Uint8Array&&(e=xn.decode(e)),e=e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return PD(e)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};let $t=class extends Error{constructor(e,r){var n;super(e,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)==null||n.call(Error,this,this.constructor)}};$t.code="ERR_JOSE_GENERIC";class hr extends $t{constructor(e,r,n="unspecified",i="unspecified"){super(e,{cause:{claim:n,reason:i,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=i,this.payload=r}}hr.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class Gm extends $t{constructor(e,r,n="unspecified",i="unspecified"){super(e,{cause:{claim:n,reason:i,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=i,this.payload=r}}Gm.code="ERR_JWT_EXPIRED";class Zd extends $t{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}Zd.code="ERR_JOSE_ALG_NOT_ALLOWED";class Ie extends $t{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}Ie.code="ERR_JOSE_NOT_SUPPORTED";class ql extends $t{constructor(e="decryption operation failed",r){super(e,r),this.code="ERR_JWE_DECRYPTION_FAILED"}}ql.code="ERR_JWE_DECRYPTION_FAILED";class X extends $t{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}X.code="ERR_JWE_INVALID";class je extends $t{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}je.code="ERR_JWS_INVALID";class gr extends $t{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}gr.code="ERR_JWT_INVALID";class bx extends $t{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}bx.code="ERR_JWK_INVALID";class Wy extends $t{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}Wy.code="ERR_JWKS_INVALID";class Xy extends $t{constructor(e="no applicable key found in the JSON Web Key Set",r){super(e,r),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Xy.code="ERR_JWKS_NO_MATCHING_KEY";class vx extends $t{constructor(e="multiple matching keys found in the JSON Web Key Set",r){super(e,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}vx.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class Ex extends $t{constructor(e="request timed out",r){super(e,r),this.code="ERR_JWKS_TIMEOUT"}}Ex.code="ERR_JWKS_TIMEOUT";class Jy extends $t{constructor(e="signature verification failed",r){super(e,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}Jy.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const d6=Object.freeze(Object.defineProperty({__proto__:null,JOSEAlgNotAllowed:Zd,JOSEError:$t,JOSENotSupported:Ie,JWEDecryptionFailed:ql,JWEInvalid:X,JWKInvalid:bx,JWKSInvalid:Wy,JWKSMultipleMatchingKeys:vx,JWKSNoMatchingKey:Xy,JWKSTimeout:Ex,JWSInvalid:je,JWSSignatureVerificationFailed:Jy,JWTClaimValidationFailed:hr,JWTExpired:Gm,JWTInvalid:gr},Symbol.toStringTag,{value:"Module"})),Zy=ge.getRandomValues.bind(ge);function LD(t){switch(t){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 Ie(`Unsupported JWE Algorithm: ${t}`)}}const f6=t=>Zy(new Uint8Array(LD(t)>>3)),DD=(t,e)=>{if(e.length<<3!==LD(t))throw new X("Invalid Initialization Vector length")},Hm=(t,e)=>{const r=t.byteLength<<3;if(r!==e)throw new X(`Invalid Content Encryption Key length. Expected ${e} bits, got ${r} bits`)},p6=(t,e)=>{if(!(t instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(e instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(t.length!==e.length)throw new TypeError("Input buffers must have the same length");const r=t.length;let n=0,i=-1;for(;++i<r;)n|=t[i]^e[i];return n===0};function Bt(t,e="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${t}`)}function to(t,e){return t.name===e}function em(t){return parseInt(t.name.slice(4),10)}function h6(t){switch(t){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function BD(t,e){if(e.length&&!e.some(r=>t.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(e.length>2){const n=e.pop();r+=`one of ${e.join(", ")}, or ${n}.`}else e.length===2?r+=`one of ${e[0]} or ${e[1]}.`:r+=`${e[0]}.`;throw new TypeError(r)}}function m6(t,e,...r){switch(e){case"HS256":case"HS384":case"HS512":{if(!to(t.algorithm,"HMAC"))throw Bt("HMAC");const n=parseInt(e.slice(2),10);if(em(t.algorithm.hash)!==n)throw Bt(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!to(t.algorithm,"RSASSA-PKCS1-v1_5"))throw Bt("RSASSA-PKCS1-v1_5");const n=parseInt(e.slice(2),10);if(em(t.algorithm.hash)!==n)throw Bt(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!to(t.algorithm,"RSA-PSS"))throw Bt("RSA-PSS");const n=parseInt(e.slice(2),10);if(em(t.algorithm.hash)!==n)throw Bt(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(t.algorithm.name!=="Ed25519"&&t.algorithm.name!=="Ed448")throw Bt("Ed25519 or Ed448");break}case"Ed25519":{if(!to(t.algorithm,"Ed25519"))throw Bt("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!to(t.algorithm,"ECDSA"))throw Bt("ECDSA");const n=h6(e);if(t.algorithm.namedCurve!==n)throw Bt(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}BD(t,r)}function hs(t,e,...r){switch(e){case"A128GCM":case"A192GCM":case"A256GCM":{if(!to(t.algorithm,"AES-GCM"))throw Bt("AES-GCM");const n=parseInt(e.slice(1,4),10);if(t.algorithm.length!==n)throw Bt(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!to(t.algorithm,"AES-KW"))throw Bt("AES-KW");const n=parseInt(e.slice(1,4),10);if(t.algorithm.length!==n)throw Bt(n,"algorithm.length");break}case"ECDH":{switch(t.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw Bt("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!to(t.algorithm,"PBKDF2"))throw Bt("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!to(t.algorithm,"RSA-OAEP"))throw Bt("RSA-OAEP");const n=parseInt(e.slice(9),10)||1;if(em(t.algorithm.hash)!==n)throw Bt(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}BD(t,r)}function ID(t,e,...r){var n;if(r=r.filter(Boolean),r.length>2){const i=r.pop();t+=`one of type ${r.join(", ")}, or ${i}.`}else r.length===2?t+=`one of type ${r[0]} or ${r[1]}.`:t+=`of type ${r[0]}.`;return e==null?t+=` Received ${e}`:typeof e=="function"&&e.name?t+=` Received function ${e.name}`:typeof e=="object"&&e!=null&&(n=e.constructor)!=null&&n.name&&(t+=` Received an instance of ${e.constructor.name}`),t}const lr=(t,...e)=>ID("Key must be ",t,...e);function jD(t,e,...r){return ID(`Key for the ${t} algorithm must be `,e,...r)}const OD=t=>Vr(t)?!0:(t==null?void 0:t[Symbol.toStringTag])==="KeyObject",cr=["CryptoKey"];async function y6(t,e,r,n,i,o){if(!(e instanceof Uint8Array))throw new TypeError(lr(e,"Uint8Array"));const s=parseInt(t.slice(1,4),10),a=await ge.subtle.importKey("raw",e.subarray(s>>3),"AES-CBC",!1,["decrypt"]),c=await ge.subtle.importKey("raw",e.subarray(0,s>>3),{hash:`SHA-${s<<1}`,name:"HMAC"},!1,["sign"]),u=Ti(o,n,r,kD(o.length<<3)),d=new Uint8Array((await ge.subtle.sign("HMAC",c,u)).slice(0,s>>3));let f;try{f=p6(i,d)}catch{}if(!f)throw new ql;let h;try{h=new Uint8Array(await ge.subtle.decrypt({iv:n,name:"AES-CBC"},a,r))}catch{}if(!h)throw new ql;return h}async function g6(t,e,r,n,i,o){let s;e instanceof Uint8Array?s=await ge.subtle.importKey("raw",e,"AES-GCM",!1,["decrypt"]):(hs(e,t,"decrypt"),s=e);try{return new Uint8Array(await ge.subtle.decrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,Ti(r,i)))}catch{throw new ql}}const UD=async(t,e,r,n,i,o)=>{if(!Vr(e)&&!(e instanceof Uint8Array))throw new TypeError(lr(e,...cr,"Uint8Array"));if(!n)throw new X("JWE Initialization Vector missing");if(!i)throw new X("JWE Authentication Tag missing");switch(DD(t,n),t){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return e instanceof Uint8Array&&Hm(e,parseInt(t.slice(-3),10)),y6(t,e,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return e instanceof Uint8Array&&Hm(e,parseInt(t.slice(1,4),10)),g6(t,e,r,n,i,o);default:throw new Ie("Unsupported JWE Content Encryption Algorithm")}},vf=(...t)=>{const e=t.filter(Boolean);if(e.length===0||e.length===1)return!0;let r;for(const n of e){const i=Object.keys(n);if(!r||r.size===0){r=new Set(i);continue}for(const o of i){if(r.has(o))return!1;r.add(o)}}return!0};function b6(t){return typeof t=="object"&&t!==null}function yt(t){if(!b6(t)||Object.prototype.toString.call(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}const Qy=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function $D(t,e){if(t.algorithm.length!==parseInt(e.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${e}`)}function VD(t,e,r){if(Vr(t))return hs(t,e,r),t;if(t instanceof Uint8Array)return ge.subtle.importKey("raw",t,"AES-KW",!0,[r]);throw new TypeError(lr(t,...cr,"Uint8Array"))}const _E=async(t,e,r)=>{const n=await VD(e,t,"wrapKey");$D(n,t);const i=await ge.subtle.importKey("raw",r,...Qy);return new Uint8Array(await ge.subtle.wrapKey("raw",i,n,"AES-KW"))},RE=async(t,e,r)=>{const n=await VD(e,t,"unwrapKey");$D(n,t);const i=await ge.subtle.unwrapKey("raw",r,n,"AES-KW",...Qy);return new Uint8Array(await ge.subtle.exportKey("raw",i))};async function KD(t,e,r,n,i=new Uint8Array(0),o=new Uint8Array(0)){if(!Vr(t))throw new TypeError(lr(t,...cr));if(hs(t,"ECDH"),!Vr(e))throw new TypeError(lr(e,...cr));hs(e,"ECDH","deriveBits");const s=Ti(jv(mt.encode(r)),jv(i),jv(o),yx(n));let a;t.algorithm.name==="X25519"?a=256:t.algorithm.name==="X448"?a=448:a=Math.ceil(parseInt(t.algorithm.namedCurve.substr(-3),10)/8)<<3;const c=new Uint8Array(await ge.subtle.deriveBits({name:t.algorithm.name,public:t},e,a));return u6(c,n,s)}async function v6(t){if(!Vr(t))throw new TypeError(lr(t,...cr));return ge.subtle.generateKey(t.algorithm,!0,["deriveBits"])}function MD(t){if(!Vr(t))throw new TypeError(lr(t,...cr));return["P-256","P-384","P-521"].includes(t.algorithm.namedCurve)||t.algorithm.name==="X25519"||t.algorithm.name==="X448"}function E6(t){if(!(t instanceof Uint8Array)||t.length<8)throw new X("PBES2 Salt Input must be 8 or more octets")}function w6(t,e){if(t instanceof Uint8Array)return ge.subtle.importKey("raw",t,"PBKDF2",!1,["deriveBits"]);if(Vr(t))return hs(t,e,"deriveBits","deriveKey"),t;throw new TypeError(lr(t,...cr,"Uint8Array"))}async function ND(t,e,r,n){E6(t);const i=c6(e,t),o=parseInt(e.slice(13,16),10),s={hash:`SHA-${e.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},a={length:o,name:"AES-KW"},c=await w6(n,e);if(c.usages.includes("deriveBits"))return new Uint8Array(await ge.subtle.deriveBits(s,c,o));if(c.usages.includes("deriveKey"))return ge.subtle.deriveKey(s,c,a,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}const x6=async(t,e,r,n=2048,i=Zy(new Uint8Array(16)))=>{const o=await ND(i,t,n,e);return{encryptedKey:await _E(t.slice(-6),o,r),p2c:n,p2s:Et(i)}},_6=async(t,e,r,n,i)=>{const o=await ND(i,t,n,e);return RE(t.slice(-6),o,r)};function Wm(t){switch(t){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new Ie(`alg ${t} is not supported either by JOSE or your javascript runtime`)}}const Yy=(t,e)=>{if(t.startsWith("RS")||t.startsWith("PS")){const{modulusLength:r}=e.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}},R6=async(t,e,r)=>{if(!Vr(e))throw new TypeError(lr(e,...cr));if(hs(e,t,"encrypt","wrapKey"),Yy(t,e),e.usages.includes("encrypt"))return new Uint8Array(await ge.subtle.encrypt(Wm(t),e,r));if(e.usages.includes("wrapKey")){const n=await ge.subtle.importKey("raw",r,...Qy);return new Uint8Array(await ge.subtle.wrapKey("raw",n,e,Wm(t)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},A6=async(t,e,r)=>{if(!Vr(e))throw new TypeError(lr(e,...cr));if(hs(e,t,"decrypt","unwrapKey"),Yy(t,e),e.usages.includes("decrypt"))return new Uint8Array(await ge.subtle.decrypt(Wm(t),e,r));if(e.usages.includes("unwrapKey")){const n=await ge.subtle.unwrapKey("raw",r,e,Wm(t),...Qy);return new Uint8Array(await ge.subtle.exportKey("raw",n))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function nc(t){return yt(t)&&typeof t.kty=="string"}function S6(t){return t.kty!=="oct"&&typeof t.d=="string"}function C6(t){return t.kty!=="oct"&&typeof t.d>"u"}function T6(t){return nc(t)&&t.kty==="oct"&&typeof t.k=="string"}function k6(t){let e,r;switch(t.kty){case"RSA":{switch(t.alg){case"PS256":case"PS384":case"PS512":e={name:"RSA-PSS",hash:`SHA-${t.alg.slice(-3)}`},r=t.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":e={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.alg.slice(-3)}`},r=t.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":e={name:"RSA-OAEP",hash:`SHA-${parseInt(t.alg.slice(-3),10)||1}`},r=t.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new Ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(t.alg){case"ES256":e={name:"ECDSA",namedCurve:"P-256"},r=t.d?["sign"]:["verify"];break;case"ES384":e={name:"ECDSA",namedCurve:"P-384"},r=t.d?["sign"]:["verify"];break;case"ES512":e={name:"ECDSA",namedCurve:"P-521"},r=t.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:"ECDH",namedCurve:t.crv},r=t.d?["deriveBits"]:[];break;default:throw new Ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(t.alg){case"Ed25519":e={name:"Ed25519"},r=t.d?["sign"]:["verify"];break;case"EdDSA":e={name:t.crv},r=t.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:t.crv},r=t.d?["deriveBits"]:[];break;default:throw new Ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new Ie('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:e,keyUsages:r}}const zD=async t=>{if(!t.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:e,keyUsages:r}=k6(t),n=[e,t.ext??!1,t.key_ops??r],i={...t};return delete i.alg,delete i.use,ge.subtle.importKey("jwk",i,...n)},FD=t=>pt(t);let Qa,Ya;const qD=t=>(t==null?void 0:t[Symbol.toStringTag])==="KeyObject",Xm=async(t,e,r,n,i=!1)=>{let o=t.get(e);if(o!=null&&o[n])return o[n];const s=await zD({...r,alg:n});return i&&Object.freeze(e),o?o[n]=s:t.set(e,{[n]:s}),s},P6=(t,e)=>{if(qD(t)){let r=t.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?FD(r.k):(Ya||(Ya=new WeakMap),Xm(Ya,t,r,e))}return nc(t)?t.k?pt(t.k):(Ya||(Ya=new WeakMap),Xm(Ya,t,t,e,!0)):t},L6=(t,e)=>{if(qD(t)){let r=t.export({format:"jwk"});return r.k?FD(r.k):(Qa||(Qa=new WeakMap),Xm(Qa,t,r,e))}return nc(t)?t.k?pt(t.k):(Qa||(Qa=new WeakMap),Xm(Qa,t,t,e,!0)):t},os={normalizePublicKey:P6,normalizePrivateKey:L6};function wx(t){switch(t){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 Ie(`Unsupported JWE Algorithm: ${t}`)}}const da=t=>Zy(new Uint8Array(wx(t)>>3)),GD=(t,e)=>{const r=(t.match(/.{1,64}/g)||[]).join(`
`);return`-----BEGIN ${e}-----
${r}
-----END ${e}-----`},HD=async(t,e,r)=>{if(!Vr(r))throw new TypeError(lr(r,...cr));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==t)throw new TypeError(`key is not a ${t} key`);return GD(gx(new Uint8Array(await ge.subtle.exportKey(e,r))),`${t.toUpperCase()} KEY`)},D6=t=>HD("public","spki",t),B6=t=>HD("private","pkcs8",t),Bo=(t,e,r=0)=>{r===0&&(e.unshift(e.length),e.unshift(6));const n=t.indexOf(e[0],r);if(n===-1)return!1;const i=t.subarray(n,n+e.length);return i.length!==e.length?!1:i.every((o,s)=>o===e[s])||Bo(t,e,n+1)},Y1=t=>{switch(!0){case Bo(t,[42,134,72,206,61,3,1,7]):return"P-256";case Bo(t,[43,129,4,0,34]):return"P-384";case Bo(t,[43,129,4,0,35]):return"P-521";case Bo(t,[43,101,110]):return"X25519";case Bo(t,[43,101,111]):return"X448";case Bo(t,[43,101,112]):return"Ed25519";case Bo(t,[43,101,113]):return"Ed448";default:throw new Ie("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},WD=async(t,e,r,n,i)=>{let o,s;const a=new Uint8Array(atob(r.replace(t,"")).split("").map(u=>u.charCodeAt(0))),c=e==="spki";switch(n){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},s=c?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},s=c?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},s=c?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},s=c?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},s=c?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},s=c?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const u=Y1(a);o=u.startsWith("P-")?{name:"ECDH",namedCurve:u}:{name:u},s=c?[]:["deriveBits"];break}case"Ed25519":o={name:"Ed25519"},s=c?["verify"]:["sign"];break;case"EdDSA":o={name:Y1(a)},s=c?["verify"]:["sign"];break;default:throw new Ie('Invalid or unsupported "alg" (Algorithm) value')}return ge.subtle.importKey(e,a,o,(i==null?void 0:i.extractable)??!1,s)},I6=(t,e,r)=>WD(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",t,e,r),XD=(t,e,r)=>WD(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",t,e,r);function eC(t){const e=[];let r=0;for(;r<t.length;){const n=JD(t.subarray(r));e.push(n),r+=n.byteLength}return e}function JD(t){let e=0,r=t[0]&31;if(e++,r===31){for(r=0;t[e]>=128;)r=r*128+t[e]-128,e++;r=r*128+t[e]-128,e++}let n=0;if(t[e]<128)n=t[e],e++;else if(n===128){for(n=0;t[e+n]!==0||t[e+n+1]!==0;){if(n>t.byteLength)throw new TypeError("invalid indefinite form length");n++}const o=e+n+2;return{byteLength:o,contents:t.subarray(e,e+n),raw:t.subarray(0,o)}}else{const o=t[e]&127;e++,n=0;for(let s=0;s<o;s++)n=n*256+t[e],e++}const i=e+n;return{byteLength:i,contents:t.subarray(e,i),raw:t.subarray(0,i)}}function j6(t){const e=eC(eC(JD(t).contents)[0].contents);return gx(e[e[0].raw[0]===160?6:5].raw)}function O6(t){const e=t.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=PD(e);return GD(j6(r),"PUBLIC KEY")}const U6=(t,e,r)=>{let n;try{n=O6(t)}catch(i){throw new TypeError("Failed to parse the X.509 certificate",{cause:i})}return XD(n,e,r)};async function $6(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return XD(t,e,r)}async function V6(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN CERTIFICATE-----")!==0)throw new TypeError('"x509" must be X.509 formatted string');return U6(t,e,r)}async function K6(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return I6(t,e,r)}async function Ef(t,e){if(!yt(t))throw new TypeError("JWK must be an object");switch(e||(e=t.alg),t.kty){case"oct":if(typeof t.k!="string"||!t.k)throw new TypeError('missing "k" (Key Value) Parameter value');return pt(t.k);case"RSA":if("oth"in t&&t.oth!==void 0)throw new Ie('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return zD({...t,alg:e});default:throw new Ie('Unsupported "kty" (Key Type) Parameter value')}}const sl=t=>t==null?void 0:t[Symbol.toStringTag],AE=(t,e,r)=>{var n,i;if(e.use!==void 0&&e.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(e.key_ops!==void 0&&((i=(n=e.key_ops).includes)==null?void 0:i.call(n,r))!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(e.alg!==void 0&&e.alg!==t)throw new TypeError(`Invalid key for this operation, when present its alg must be ${t}`);return!0},M6=(t,e,r,n)=>{if(!(e instanceof Uint8Array)){if(n&&nc(e)){if(T6(e)&&AE(t,e,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(!OD(e))throw new TypeError(jD(t,e,...cr,"Uint8Array",n?"JSON Web Key":null));if(e.type!=="secret")throw new TypeError(`${sl(e)} instances for symmetric algorithms must be of type "secret"`)}},N6=(t,e,r,n)=>{if(n&&nc(e))switch(r){case"sign":if(S6(e)&&AE(t,e,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(C6(e)&&AE(t,e,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!OD(e))throw new TypeError(jD(t,e,...cr,n?"JSON Web Key":null));if(e.type==="secret")throw new TypeError(`${sl(e)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&e.type==="public")throw new TypeError(`${sl(e)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&e.type==="public")throw new TypeError(`${sl(e)} instances for asymmetric algorithm decryption must be of type "private"`);if(e.algorithm&&r==="verify"&&e.type==="private")throw new TypeError(`${sl(e)} instances for asymmetric algorithm verifying must be of type "public"`);if(e.algorithm&&r==="encrypt"&&e.type==="private")throw new TypeError(`${sl(e)} instances for asymmetric algorithm encryption must be of type "public"`)};function ZD(t,e,r,n){e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?M6(e,r,n,t):N6(e,r,n,t)}const QD=ZD.bind(void 0,!1),SE=ZD.bind(void 0,!0);async function z6(t,e,r,n,i){if(!(r instanceof Uint8Array))throw new TypeError(lr(r,"Uint8Array"));const o=parseInt(t.slice(1,4),10),s=await ge.subtle.importKey("raw",r.subarray(o>>3),"AES-CBC",!1,["encrypt"]),a=await ge.subtle.importKey("raw",r.subarray(0,o>>3),{hash:`SHA-${o<<1}`,name:"HMAC"},!1,["sign"]),c=new Uint8Array(await ge.subtle.encrypt({iv:n,name:"AES-CBC"},s,e)),u=Ti(i,n,c,kD(i.length<<3)),d=new Uint8Array((await ge.subtle.sign("HMAC",a,u)).slice(0,o>>3));return{ciphertext:c,tag:d,iv:n}}async function F6(t,e,r,n,i){let o;r instanceof Uint8Array?o=await ge.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(hs(r,t,"encrypt"),o=r);const s=new Uint8Array(await ge.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,e)),a=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:a,iv:n}}const YD=async(t,e,r,n,i)=>{if(!Vr(r)&&!(r instanceof Uint8Array))throw new TypeError(lr(r,...cr,"Uint8Array"));switch(n?DD(t,n):n=f6(t),t){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&Hm(r,parseInt(t.slice(-3),10)),z6(t,e,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&Hm(r,parseInt(t.slice(1,4),10)),F6(t,e,r,n,i);default:throw new Ie("Unsupported JWE Content Encryption Algorithm")}};async function q6(t,e,r,n){const i=t.slice(0,7),o=await YD(i,r,e,n,new Uint8Array(0));return{encryptedKey:o.ciphertext,iv:Et(o.iv),tag:Et(o.tag)}}async function G6(t,e,r,n,i){const o=t.slice(0,7);return UD(o,e,r,n,i,new Uint8Array(0))}async function H6(t,e,r,n,i){var o;switch(QD(t,e,"decrypt"),e=await((o=os.normalizePrivateKey)==null?void 0:o.call(os,e,t))||e,t){case"dir":{if(r!==void 0)throw new X("Encountered unexpected JWE Encrypted Key");return e}case"ECDH-ES":if(r!==void 0)throw new X("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!yt(n.epk))throw new X('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!MD(e))throw new Ie("ECDH with the provided key is not allowed or not supported by your javascript runtime");const s=await Ef(n.epk,t);let a,c;if(n.apu!==void 0){if(typeof n.apu!="string")throw new X('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{a=pt(n.apu)}catch{throw new X("Failed to base64url decode the apu")}}if(n.apv!==void 0){if(typeof n.apv!="string")throw new X('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{c=pt(n.apv)}catch{throw new X("Failed to base64url decode the apv")}}const u=await KD(s,e,t==="ECDH-ES"?n.enc:t,t==="ECDH-ES"?wx(n.enc):parseInt(t.slice(-5,-2),10),a,c);if(t==="ECDH-ES")return u;if(r===void 0)throw new X("JWE Encrypted Key missing");return RE(t.slice(-6),u,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(r===void 0)throw new X("JWE Encrypted Key missing");return A6(t,e,r)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(r===void 0)throw new X("JWE Encrypted Key missing");if(typeof n.p2c!="number")throw new X('JOSE Header "p2c" (PBES2 Count) missing or invalid');const s=(i==null?void 0:i.maxPBES2Count)||1e4;if(n.p2c>s)throw new X('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if(typeof n.p2s!="string")throw new X('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let a;try{a=pt(n.p2s)}catch{throw new X("Failed to base64url decode the p2s")}return _6(t,e,r,n.p2c,a)}case"A128KW":case"A192KW":case"A256KW":{if(r===void 0)throw new X("JWE Encrypted Key missing");return RE(t,e,r)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(r===void 0)throw new X("JWE Encrypted Key missing");if(typeof n.iv!="string")throw new X('JOSE Header "iv" (Initialization Vector) missing or invalid');if(typeof n.tag!="string")throw new X('JOSE Header "tag" (Authentication Tag) missing or invalid');let s;try{s=pt(n.iv)}catch{throw new X("Failed to base64url decode the iv")}let a;try{a=pt(n.tag)}catch{throw new X("Failed to base64url decode the tag")}return G6(t,e,r,s,a)}default:throw new Ie('Invalid or unsupported "alg" (JWE Algorithm) header value')}}function wf(t,e,r,n,i){if(i.crit!==void 0&&(n==null?void 0:n.crit)===void 0)throw new t('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||n.crit===void 0)return new Set;if(!Array.isArray(n.crit)||n.crit.length===0||n.crit.some(s=>typeof s!="string"||s.length===0))throw new t('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;r!==void 0?o=new Map([...Object.entries(r),...e.entries()]):o=e;for(const s of n.crit){if(!o.has(s))throw new Ie(`Extension Header Parameter "${s}" is not recognized`);if(i[s]===void 0)throw new t(`Extension Header Parameter "${s}" is missing`);if(o.get(s)&&n[s]===void 0)throw new t(`Extension Header Parameter "${s}" MUST be integrity protected`)}return new Set(n.crit)}const CE=(t,e)=>{if(e!==void 0&&(!Array.isArray(e)||e.some(r=>typeof r!="string")))throw new TypeError(`"${t}" option must be an array of strings`);if(e)return new Set(e)};async function xx(t,e,r){if(!yt(t))throw new X("Flattened JWE must be an object");if(t.protected===void 0&&t.header===void 0&&t.unprotected===void 0)throw new X("JOSE Header missing");if(t.iv!==void 0&&typeof t.iv!="string")throw new X("JWE Initialization Vector incorrect type");if(typeof t.ciphertext!="string")throw new X("JWE Ciphertext missing or incorrect type");if(t.tag!==void 0&&typeof t.tag!="string")throw new X("JWE Authentication Tag incorrect type");if(t.protected!==void 0&&typeof t.protected!="string")throw new X("JWE Protected Header incorrect type");if(t.encrypted_key!==void 0&&typeof t.encrypted_key!="string")throw new X("JWE Encrypted Key incorrect type");if(t.aad!==void 0&&typeof t.aad!="string")throw new X("JWE AAD incorrect type");if(t.header!==void 0&&!yt(t.header))throw new X("JWE Shared Unprotected Header incorrect type");if(t.unprotected!==void 0&&!yt(t.unprotected))throw new X("JWE Per-Recipient Unprotected Header incorrect type");let n;if(t.protected)try{const E=pt(t.protected);n=JSON.parse(xn.decode(E))}catch{throw new X("JWE Protected Header is invalid")}if(!vf(n,t.header,t.unprotected))throw new X("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const i={...n,...t.header,...t.unprotected};if(wf(X,new Map,r==null?void 0:r.crit,n,i),i.zip!==void 0)throw new Ie('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:s}=i;if(typeof o!="string"||!o)throw new X("missing JWE Algorithm (alg) in JWE Header");if(typeof s!="string"||!s)throw new X("missing JWE Encryption Algorithm (enc) in JWE Header");const a=r&&CE("keyManagementAlgorithms",r.keyManagementAlgorithms),c=r&&CE("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(a&&!a.has(o)||!a&&o.startsWith("PBES2"))throw new Zd('"alg" (Algorithm) Header Parameter value not allowed');if(c&&!c.has(s))throw new Zd('"enc" (Encryption Algorithm) Header Parameter value not allowed');let u;if(t.encrypted_key!==void 0)try{u=pt(t.encrypted_key)}catch{throw new X("Failed to base64url decode the encrypted_key")}let d=!1;typeof e=="function"&&(e=await e(n,t),d=!0);let f;try{f=await H6(o,e,u,i,r)}catch(E){if(E instanceof TypeError||E instanceof X||E instanceof Ie)throw E;f=da(s)}let h,m;if(t.iv!==void 0)try{h=pt(t.iv)}catch{throw new X("Failed to base64url decode the iv")}if(t.tag!==void 0)try{m=pt(t.tag)}catch{throw new X("Failed to base64url decode the tag")}const g=mt.encode(t.protected??"");let v;t.aad!==void 0?v=Ti(g,mt.encode("."),mt.encode(t.aad)):v=g;let w;try{w=pt(t.ciphertext)}catch{throw new X("Failed to base64url decode the ciphertext")}const b={plaintext:await UD(s,f,w,h,m,v)};if(t.protected!==void 0&&(b.protectedHeader=n),t.aad!==void 0)try{b.additionalAuthenticatedData=pt(t.aad)}catch{throw new X("Failed to base64url decode the aad")}return t.unprotected!==void 0&&(b.sharedUnprotectedHeader=t.unprotected),t.header!==void 0&&(b.unprotectedHeader=t.header),d?{...b,key:e}:b}async function eB(t,e,r){if(t instanceof Uint8Array&&(t=xn.decode(t)),typeof t!="string")throw new X("Compact JWE must be a string or Uint8Array");const{0:n,1:i,2:o,3:s,4:a,length:c}=t.split(".");if(c!==5)throw new X("Invalid Compact JWE");const u=await xx({ciphertext:s,iv:o||void 0,protected:n,tag:a||void 0,encrypted_key:i||void 0},e,r),d={plaintext:u.plaintext,protectedHeader:u.protectedHeader};return typeof e=="function"?{...d,key:u.key}:d}async function W6(t,e,r){if(!yt(t))throw new X("General JWE must be an object");if(!Array.isArray(t.recipients)||!t.recipients.every(yt))throw new X("JWE Recipients missing or incorrect type");if(!t.recipients.length)throw new X("JWE Recipients has no members");for(const n of t.recipients)try{return await xx({aad:t.aad,ciphertext:t.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:t.iv,protected:t.protected,tag:t.tag,unprotected:t.unprotected},e,r)}catch{}throw new ql}const tB=Symbol(),X6=async t=>{if(t instanceof Uint8Array)return{kty:"oct",k:Et(t)};if(!Vr(t))throw new TypeError(lr(t,...cr,"Uint8Array"));if(!t.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:e,key_ops:r,alg:n,use:i,...o}=await ge.subtle.exportKey("jwk",t);return o};async function J6(t){return D6(t)}async function Z6(t){return B6(t)}async function rB(t){return X6(t)}async function nB(t,e,r,n,i={}){var c;let o,s,a;switch(QD(t,r,"encrypt"),r=await((c=os.normalizePublicKey)==null?void 0:c.call(os,r,t))||r,t){case"dir":{a=r;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!MD(r))throw new Ie("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:u,apv:d}=i;let{epk:f}=i;f||(f=(await v6(r)).privateKey);const{x:h,y:m,crv:g,kty:v}=await rB(f),w=await KD(r,f,t==="ECDH-ES"?e:t,t==="ECDH-ES"?wx(e):parseInt(t.slice(-5,-2),10),u,d);if(s={epk:{x:h,crv:g,kty:v}},v==="EC"&&(s.epk.y=m),u&&(s.apu=Et(u)),d&&(s.apv=Et(d)),t==="ECDH-ES"){a=w;break}a=n||da(e);const y=t.slice(-6);o=await _E(y,w,a);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{a=n||da(e),o=await R6(t,r,a);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{a=n||da(e);const{p2c:u,p2s:d}=i;({encryptedKey:o,...s}=await x6(t,r,a,u,d));break}case"A128KW":case"A192KW":case"A256KW":{a=n||da(e),o=await _E(t,r,a);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{a=n||da(e);const{iv:u}=i;({encryptedKey:o,...s}=await q6(t,r,a,u));break}default:throw new Ie('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:a,encryptedKey:o,parameters:s}}class Jm{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,r){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new X("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!vf(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new X("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(wf(X,new Map,r==null?void 0:r.crit,this._protectedHeader,n),n.zip!==void 0)throw new Ie('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:i,enc:o}=n;if(typeof i!="string"||!i)throw new X('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(typeof o!="string"||!o)throw new X('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let s;if(this._cek&&(i==="dir"||i==="ECDH-ES"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${i}`);let a;{let v;({cek:a,encryptedKey:s,parameters:v}=await nB(i,o,e,this._cek,this._keyManagementParameters)),v&&(r&&tB in r?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...v}:this.setUnprotectedHeader(v):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...v}:this.setProtectedHeader(v))}let c,u,d;this._protectedHeader?u=mt.encode(Et(JSON.stringify(this._protectedHeader))):u=mt.encode(""),this._aad?(d=Et(this._aad),c=Ti(u,mt.encode("."),mt.encode(d))):c=u;const{ciphertext:f,tag:h,iv:m}=await YD(o,this._plaintext,a,this._iv,c),g={ciphertext:Et(f)};return m&&(g.iv=Et(m)),h&&(g.tag=Et(h)),s&&(g.encrypted_key=Et(s)),d&&(g.aad=d),this._protectedHeader&&(g.protected=xn.decode(u)),this._sharedUnprotectedHeader&&(g.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(g.header=this._unprotectedHeader),g}}class Q6{constructor(e,r,n){this.parent=e,this.key=r,this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class Y6{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,r){const n=new Q6(this,e,{crit:r==null?void 0:r.crit});return this._recipients.push(n),n}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(){var i,o,s;if(!this._recipients.length)throw new X("at least one recipient must be added");if(this._recipients.length===1){const[a]=this._recipients,c=await new Jm(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(a.unprotectedHeader).encrypt(a.key,{...a.options}),u={ciphertext:c.ciphertext,iv:c.iv,recipients:[{}],tag:c.tag};return c.aad&&(u.aad=c.aad),c.protected&&(u.protected=c.protected),c.unprotected&&(u.unprotected=c.unprotected),c.encrypted_key&&(u.recipients[0].encrypted_key=c.encrypted_key),c.header&&(u.recipients[0].header=c.header),u}let e;for(let a=0;a<this._recipients.length;a++){const c=this._recipients[a];if(!vf(this._protectedHeader,this._unprotectedHeader,c.unprotectedHeader))throw new X("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const u={...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader},{alg:d}=u;if(typeof d!="string"||!d)throw new X('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(d==="dir"||d==="ECDH-ES")throw new X('"dir" and "ECDH-ES" alg may only be used with a single recipient');if(typeof u.enc!="string"||!u.enc)throw new X('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(!e)e=u.enc;else if(e!==u.enc)throw new X('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients');if(wf(X,new Map,c.options.crit,this._protectedHeader,u),u.zip!==void 0)throw new Ie('JWE "zip" (Compression Algorithm) Header Parameter is not supported.')}const r=da(e),n={ciphertext:"",iv:"",recipients:[],tag:""};for(let a=0;a<this._recipients.length;a++){const c=this._recipients[a],u={};n.recipients.push(u);const f={...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}.alg.startsWith("PBES2")?2048+a:void 0;if(a===0){const g=await new Jm(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(r).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:f}).encrypt(c.key,{...c.options,[tB]:!0});n.ciphertext=g.ciphertext,n.iv=g.iv,n.tag=g.tag,g.aad&&(n.aad=g.aad),g.protected&&(n.protected=g.protected),g.unprotected&&(n.unprotected=g.unprotected),u.encrypted_key=g.encrypted_key,g.header&&(u.header=g.header);continue}const{encryptedKey:h,parameters:m}=await nB(((i=c.unprotectedHeader)==null?void 0:i.alg)||((o=this._protectedHeader)==null?void 0:o.alg)||((s=this._unprotectedHeader)==null?void 0:s.alg),e,c.key,r,{p2c:f});u.encrypted_key=Et(h),(c.unprotectedHeader||m)&&(u.header={...c.unprotectedHeader,...m})}return n}}function iB(t,e){const r=`SHA-${t.slice(-3)}`;switch(t){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:t.slice(-3)>>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:e.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:e.name};default:throw new Ie(`alg ${t} is not supported either by JOSE or your javascript runtime`)}}async function oB(t,e,r){if(r==="sign"&&(e=await os.normalizePrivateKey(e,t)),r==="verify"&&(e=await os.normalizePublicKey(e,t)),Vr(e))return m6(e,t,r),e;if(e instanceof Uint8Array){if(!t.startsWith("HS"))throw new TypeError(lr(e,...cr));return ge.subtle.importKey("raw",e,{hash:`SHA-${t.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(lr(e,...cr,"Uint8Array","JSON Web Key"))}const e9=async(t,e,r,n)=>{const i=await oB(t,e,"verify");Yy(t,i);const o=iB(t,i.algorithm);try{return await ge.subtle.verify(o,i,r,n)}catch{return!1}};async function _x(t,e,r){if(!yt(t))throw new je("Flattened JWS must be an object");if(t.protected===void 0&&t.header===void 0)throw new je('Flattened JWS must have either of the "protected" or "header" members');if(t.protected!==void 0&&typeof t.protected!="string")throw new je("JWS Protected Header incorrect type");if(t.payload===void 0)throw new je("JWS Payload missing");if(typeof t.signature!="string")throw new je("JWS Signature missing or incorrect type");if(t.header!==void 0&&!yt(t.header))throw new je("JWS Unprotected Header incorrect type");let n={};if(t.protected)try{const v=pt(t.protected);n=JSON.parse(xn.decode(v))}catch{throw new je("JWS Protected Header is invalid")}if(!vf(n,t.header))throw new je("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...n,...t.header},o=wf(je,new Map([["b64",!0]]),r==null?void 0:r.crit,n,i);let s=!0;if(o.has("b64")&&(s=n.b64,typeof s!="boolean"))throw new je('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:a}=i;if(typeof a!="string"||!a)throw new je('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&CE("algorithms",r.algorithms);if(c&&!c.has(a))throw new Zd('"alg" (Algorithm) Header Parameter value not allowed');if(s){if(typeof t.payload!="string")throw new je("JWS Payload must be a string")}else if(typeof t.payload!="string"&&!(t.payload instanceof Uint8Array))throw new je("JWS Payload must be a string or an Uint8Array instance");let u=!1;typeof e=="function"?(e=await e(n,t),u=!0,SE(a,e,"verify"),nc(e)&&(e=await Ef(e,a))):SE(a,e,"verify");const d=Ti(mt.encode(t.protected??""),mt.encode("."),typeof t.payload=="string"?mt.encode(t.payload):t.payload);let f;try{f=pt(t.signature)}catch{throw new je("Failed to base64url decode the signature")}if(!await e9(a,e,f,d))throw new Jy;let m;if(s)try{m=pt(t.payload)}catch{throw new je("Failed to base64url decode the payload")}else typeof t.payload=="string"?m=mt.encode(t.payload):m=t.payload;const g={payload:m};return t.protected!==void 0&&(g.protectedHeader=n),t.header!==void 0&&(g.unprotectedHeader=t.header),u?{...g,key:e}:g}async function sB(t,e,r){if(t instanceof Uint8Array&&(t=xn.decode(t)),typeof t!="string")throw new je("Compact JWS must be a string or Uint8Array");const{0:n,1:i,2:o,length:s}=t.split(".");if(s!==3)throw new je("Invalid Compact JWS");const a=await _x({payload:i,protected:n,signature:o},e,r),c={payload:a.payload,protectedHeader:a.protectedHeader};return typeof e=="function"?{...c,key:a.key}:c}async function t9(t,e,r){if(!yt(t))throw new je("General JWS must be an object");if(!Array.isArray(t.signatures)||!t.signatures.every(yt))throw new je("JWS Signatures missing or incorrect type");for(const n of t.signatures)try{return await _x({header:n.header,payload:t.payload,protected:n.protected,signature:n.signature},e,r)}catch{}throw new Jy}const Io=t=>Math.floor(t.getTime()/1e3),aB=60,lB=aB*60,Rx=lB*24,r9=Rx*7,n9=Rx*365.25,i9=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,dd=t=>{const e=i9.exec(t);if(!e||e[4]&&e[1])throw new TypeError("Invalid time period format");const r=parseFloat(e[2]),n=e[3].toLowerCase();let i;switch(n){case"sec":case"secs":case"second":case"seconds":case"s":i=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":i=Math.round(r*aB);break;case"hour":case"hours":case"hr":case"hrs":case"h":i=Math.round(r*lB);break;case"day":case"days":case"d":i=Math.round(r*Rx);break;case"week":case"weeks":case"w":i=Math.round(r*r9);break;default:i=Math.round(r*n9);break}return e[1]==="-"||e[4]==="ago"?-i:i},tC=t=>t.toLowerCase().replace(/^application\//,""),o9=(t,e)=>typeof t=="string"?e.includes(t):Array.isArray(t)?e.some(Set.prototype.has.bind(new Set(t))):!1,Ax=(t,e,r={})=>{let n;try{n=JSON.parse(xn.decode(e))}catch{}if(!yt(n))throw new gr("JWT Claims Set must be a top-level JSON object");const{typ:i}=r;if(i&&(typeof t.typ!="string"||tC(t.typ)!==tC(i)))throw new hr('unexpected "typ" JWT header value',n,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:a,audience:c,maxTokenAge:u}=r,d=[...o];u!==void 0&&d.push("iat"),c!==void 0&&d.push("aud"),a!==void 0&&d.push("sub"),s!==void 0&&d.push("iss");for(const g of new Set(d.reverse()))if(!(g in n))throw new hr(`missing required "${g}" claim`,n,g,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new hr('unexpected "iss" claim value',n,"iss","check_failed");if(a&&n.sub!==a)throw new hr('unexpected "sub" claim value',n,"sub","check_failed");if(c&&!o9(n.aud,typeof c=="string"?[c]:c))throw new hr('unexpected "aud" claim value',n,"aud","check_failed");let f;switch(typeof r.clockTolerance){case"string":f=dd(r.clockTolerance);break;case"number":f=r.clockTolerance;break;case"undefined":f=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=r,m=Io(h||new Date);if((n.iat!==void 0||u)&&typeof n.iat!="number")throw new hr('"iat" claim must be a number',n,"iat","invalid");if(n.nbf!==void 0){if(typeof n.nbf!="number")throw new hr('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>m+f)throw new hr('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(n.exp!==void 0){if(typeof n.exp!="number")throw new hr('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=m-f)throw new Gm('"exp" claim timestamp check failed',n,"exp","check_failed")}if(u){const g=m-n.iat,v=typeof u=="number"?u:dd(u);if(g-f>v)throw new Gm('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(g<0-f)throw new hr('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function s9(t,e,r){var s;const n=await sB(t,e,r);if((s=n.protectedHeader.crit)!=null&&s.includes("b64")&&n.protectedHeader.b64===!1)throw new gr("JWTs MUST NOT use unencoded payload");const o={payload:Ax(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return typeof e=="function"?{...o,key:n.key}:o}async function a9(t,e,r){const n=await eB(t,e,r),i=Ax(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(o.iss!==void 0&&o.iss!==i.iss)throw new hr('replicated "iss" claim header parameter mismatch',i,"iss","mismatch");if(o.sub!==void 0&&o.sub!==i.sub)throw new hr('replicated "sub" claim header parameter mismatch',i,"sub","mismatch");if(o.aud!==void 0&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new hr('replicated "aud" claim header parameter mismatch',i,"aud","mismatch");const s={payload:i,protectedHeader:o};return typeof e=="function"?{...s,key:n.key}:s}class cB{constructor(e){this._flattened=new Jm(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,r){const n=await this._flattened.encrypt(e,r);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}const l9=async(t,e,r)=>{const n=await oB(t,e,"sign");Yy(t,n);const i=await ge.subtle.sign(iB(t,n.algorithm),n,r);return new Uint8Array(i)};class Sx{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,r){if(!this._protectedHeader&&!this._unprotectedHeader)throw new je("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!vf(this._protectedHeader,this._unprotectedHeader))throw new je("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader},i=wf(je,new Map([["b64",!0]]),r==null?void 0:r.crit,this._protectedHeader,n);let o=!0;if(i.has("b64")&&(o=this._protectedHeader.b64,typeof o!="boolean"))throw new je('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=n;if(typeof s!="string"||!s)throw new je('JWS "alg" (Algorithm) Header Parameter missing or invalid');SE(s,e,"sign");let a=this._payload;o&&(a=mt.encode(Et(a)));let c;this._protectedHeader?c=mt.encode(Et(JSON.stringify(this._protectedHeader))):c=mt.encode("");const u=Ti(c,mt.encode("."),a),d=await l9(s,e,u),f={signature:Et(d),payload:""};return o&&(f.payload=xn.decode(a)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=xn.decode(c)),f}}class uB{constructor(e){this._flattened=new Sx(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,r){const n=await this._flattened.sign(e,r);if(n.payload===void 0)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}class c9{constructor(e,r,n){this.parent=e,this.key=r,this.options=n}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(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class u9{constructor(e){this._signatures=[],this._payload=e}addSignature(e,r){const n=new c9(this,e,r);return this._signatures.push(n),n}async sign(){if(!this._signatures.length)throw new je("at least one signature must be added");const e={signatures:[],payload:""};for(let r=0;r<this._signatures.length;r++){const n=this._signatures[r],i=new Sx(this._payload);i.setProtectedHeader(n.protectedHeader),i.setUnprotectedHeader(n.unprotectedHeader);const{payload:o,...s}=await i.sign(n.key,n.options);if(r===0)e.payload=o;else if(e.payload!==o)throw new je("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(s)}return e}}function Zs(t,e){if(!Number.isFinite(e))throw new TypeError(`Invalid ${t} input`);return e}class Cx{constructor(e={}){if(!yt(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 typeof e=="number"?this._payload={...this._payload,nbf:Zs("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:Zs("setNotBefore",Io(e))}:this._payload={...this._payload,nbf:Io(new Date)+dd(e)},this}setExpirationTime(e){return typeof e=="number"?this._payload={...this._payload,exp:Zs("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:Zs("setExpirationTime",Io(e))}:this._payload={...this._payload,exp:Io(new Date)+dd(e)},this}setIssuedAt(e){return typeof e>"u"?this._payload={...this._payload,iat:Io(new Date)}:e instanceof Date?this._payload={...this._payload,iat:Zs("setIssuedAt",Io(e))}:typeof e=="string"?this._payload={...this._payload,iat:Zs("setIssuedAt",Io(new Date)+dd(e))}:this._payload={...this._payload,iat:Zs("setIssuedAt",e)},this}}class d9 extends Cx{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,r){var i;const n=new uB(mt.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray((i=this._protectedHeader)==null?void 0:i.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===!1)throw new gr("JWTs MUST NOT use unencoded payload");return n.sign(e,r)}}class f9 extends Cx{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,r){const n=new cB(mt.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}),n.setProtectedHeader(this._protectedHeader),this._iv&&n.setInitializationVector(this._iv),this._cek&&n.setContentEncryptionKey(this._cek),this._keyManagementParameters&&n.setKeyManagementParameters(this._keyManagementParameters),n.encrypt(e,r)}}const To=(t,e)=>{if(typeof t!="string"||!t)throw new bx(`${e} missing or invalid`)};async function dB(t,e){if(!yt(t))throw new TypeError("JWK must be an object");if(e??(e="sha256"),e!=="sha256"&&e!=="sha384"&&e!=="sha512")throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(t.kty){case"EC":To(t.crv,'"crv" (Curve) Parameter'),To(t.x,'"x" (X Coordinate) Parameter'),To(t.y,'"y" (Y Coordinate) Parameter'),r={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":To(t.crv,'"crv" (Subtype of Key Pair) Parameter'),To(t.x,'"x" (Public Key) Parameter'),r={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":To(t.e,'"e" (Exponent) Parameter'),To(t.n,'"n" (Modulus) Parameter'),r={e:t.e,kty:t.kty,n:t.n};break;case"oct":To(t.k,'"k" (Key Value) Parameter'),r={k:t.k,kty:t.kty};break;default:throw new Ie('"kty" (Key Type) Parameter missing or unsupported')}const n=mt.encode(JSON.stringify(r));return Et(await TD(e,n))}async function p9(t,e){e??(e="sha256");const r=await dB(t,e);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${e.slice(-3)}:${r}`}async function h9(t,e){const r={...t,...e==null?void 0:e.header};if(!yt(r.jwk))throw new je('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const n=await Ef({...r.jwk,ext:!0},r.alg);if(n instanceof Uint8Array||n.type!=="public")throw new je('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function m9(t){switch(typeof t=="string"&&t.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new Ie('Unsupported "alg" value for a JSON Web Key Set')}}function y9(t){return t&&typeof t=="object"&&Array.isArray(t.keys)&&t.keys.every(g9)}function g9(t){return yt(t)}function fB(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}class b9{constructor(e){if(this._cached=new WeakMap,!y9(e))throw new Wy("JSON Web Key Set malformed");this._jwks=fB(e)}async getKey(e,r){const{alg:n,kid:i}={...e,...r==null?void 0:r.header},o=m9(n),s=this._jwks.keys.filter(u=>{let d=o===u.kty;if(d&&typeof i=="string"&&(d=i===u.kid),d&&typeof u.alg=="string"&&(d=n===u.alg),d&&typeof u.use=="string"&&(d=u.use==="sig"),d&&Array.isArray(u.key_ops)&&(d=u.key_ops.includes("verify")),d)switch(n){case"ES256":d=u.crv==="P-256";break;case"ES256K":d=u.crv==="secp256k1";break;case"ES384":d=u.crv==="P-384";break;case"ES512":d=u.crv==="P-521";break;case"Ed25519":d=u.crv==="Ed25519";break;case"EdDSA":d=u.crv==="Ed25519"||u.crv==="Ed448";break}return d}),{0:a,length:c}=s;if(c===0)throw new Xy;if(c!==1){const u=new vx,{_cached:d}=this;throw u[Symbol.asyncIterator]=async function*(){for(const f of s)try{yield await rC(d,f,n)}catch{}},u}return rC(this._cached,a,n)}}async function rC(t,e,r){const n=t.get(e)||t.set(e,{}).get(e);if(n[r]===void 0){const i=await Ef({...e,ext:!0},r);if(i instanceof Uint8Array||i.type!=="public")throw new Wy("JSON Web Key Set members must be public keys");n[r]=i}return n[r]}function TE(t){const e=new b9(t),r=async(n,i)=>e.getKey(n,i);return Object.defineProperties(r,{jwks:{value:()=>fB(e._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}const v9=async(t,e,r)=>{let n,i,o=!1;typeof AbortController=="function"&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},e));const s=await fetch(t.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(a=>{throw o?new Ex:a});if(i!==void 0&&clearTimeout(i),s.status!==200)throw new $t("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch{throw new $t("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function E9(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let kE;var $h,Ck;(typeof navigator>"u"||!((Ck=($h=navigator.userAgent)==null?void 0:$h.startsWith)!=null&&Ck.call($h,"Mozilla/5.0 ")))&&(kE="jose/v5.10.0");const fd=Symbol();function w9(t,e){return!(typeof t!="object"||t===null||!("uat"in t)||typeof t.uat!="number"||Date.now()-t.uat>=e||!("jwks"in t)||!yt(t.jwks)||!Array.isArray(t.jwks.keys)||!Array.prototype.every.call(t.jwks.keys,yt))}class x9{constructor(e,r){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:r==null?void 0:r.agent,headers:r==null?void 0:r.headers},this._timeoutDuration=typeof(r==null?void 0:r.timeoutDuration)=="number"?r==null?void 0:r.timeoutDuration:5e3,this._cooldownDuration=typeof(r==null?void 0:r.cooldownDuration)=="number"?r==null?void 0:r.cooldownDuration:3e4,this._cacheMaxAge=typeof(r==null?void 0:r.cacheMaxAge)=="number"?r==null?void 0:r.cacheMaxAge:6e5,(r==null?void 0:r[fd])!==void 0&&(this._cache=r==null?void 0:r[fd],w9(r==null?void 0:r[fd],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=TE(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(e,r){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(e,r)}catch(n){if(n instanceof Xy&&this.coolingDown()===!1)return await this.reload(),this._local(e,r);throw n}}async reload(){this._pendingFetch&&E9()&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);kE&&!e.has("User-Agent")&&(e.set("User-Agent",kE),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=v9(this._url,this._timeoutDuration,this._options).then(r=>{this._local=TE(r),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=r),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(r=>{throw this._pendingFetch=void 0,r})),await this._pendingFetch}}function _9(t,e){const r=new x9(t,e),n=async(i,o)=>r.getKey(i,o);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:()=>{var i;return(i=r._local)==null?void 0:i.jwks()},enumerable:!0,configurable:!1,writable:!1}}),n}const R9=fd;class A9 extends Cx{encode(){const e=Et(JSON.stringify({alg:"none"})),r=Et(JSON.stringify(this._payload));return`${e}.${r}.`}static decode(e,r){if(typeof e!="string")throw new gr("Unsecured JWT must be a string");const{0:n,1:i,2:o,length:s}=e.split(".");if(s!==3||o!=="")throw new gr("Invalid Unsecured JWT");let a;try{if(a=JSON.parse(xn.decode(pt(n))),a.alg!=="none")throw new Error}catch{throw new gr("Invalid Unsecured JWT")}return{payload:Ax(a,pt(i),r),header:a}}}const S9=Et,Tx=pt,C9=Object.freeze(Object.defineProperty({__proto__:null,decode:Tx,encode:S9},Symbol.toStringTag,{value:"Module"}));function T9(t){let e;if(typeof t=="string"){const r=t.split(".");(r.length===3||r.length===5)&&([e]=r)}else if(typeof t=="object"&&t)if("protected"in t)e=t.protected;else throw new TypeError("Token does not contain a Protected Header");try{if(typeof e!="string"||!e)throw new Error;const r=JSON.parse(xn.decode(Tx(e)));if(!yt(r))throw new Error;return r}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}function k9(t){if(typeof t!="string")throw new gr("JWTs must use Compact JWS serialization, JWT must be a string");const{1:e,length:r}=t.split(".");if(r===5)throw new gr("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new gr("Invalid JWT");if(!e)throw new gr("JWTs must contain a payload");let n;try{n=Tx(e)}catch{throw new gr("Failed to base64url decode the payload")}let i;try{i=JSON.parse(xn.decode(n))}catch{throw new gr("Failed to parse the decoded payload as JSON")}if(!yt(i))throw new gr("Invalid JWT Claims Set");return i}async function P9(t,e){let r,n,i;switch(t){case"HS256":case"HS384":case"HS512":r=parseInt(t.slice(-3),10),n={name:"HMAC",hash:`SHA-${r}`,length:r},i=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r=parseInt(t.slice(-3),10),Zy(new Uint8Array(r>>3));case"A128KW":case"A192KW":case"A256KW":r=parseInt(t.slice(1,4),10),n={name:"AES-KW",length:r},i=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":r=parseInt(t.slice(1,4),10),n={name:"AES-GCM",length:r},i=["encrypt","decrypt"];break;default:throw new Ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ge.subtle.generateKey(n,(e==null?void 0:e.extractable)??!1,i)}function Ov(t){const e=(t==null?void 0:t.modulusLength)??2048;if(typeof e!="number"||e<2048)throw new Ie("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}async function L9(t,e){let r,n;switch(t){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${t.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Ov(e)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Ov(e)},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(t.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:Ov(e)},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 i=(e==null?void 0:e.crv)??"Ed25519";switch(i){case"Ed25519":case"Ed448":r={name:i};break;default:throw new Ie("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 i=(e==null?void 0:e.crv)??"P-256";switch(i){case"P-256":case"P-384":case"P-521":{r={name:"ECDH",namedCurve:i};break}case"X25519":case"X448":r={name:i};break;default:throw new Ie("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new Ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ge.subtle.generateKey(r,(e==null?void 0:e.extractable)??!1,n)}async function D9(t,e){return L9(t,e)}async function B9(t,e){return P9(t,e)}const I9="WebCryptoAPI",j9=Object.freeze(Object.defineProperty({__proto__:null,CompactEncrypt:cB,CompactSign:uB,EmbeddedJWK:h9,EncryptJWT:f9,FlattenedEncrypt:Jm,FlattenedSign:Sx,GeneralEncrypt:Y6,GeneralSign:u9,SignJWT:d9,UnsecuredJWT:A9,base64url:C9,calculateJwkThumbprint:dB,calculateJwkThumbprintUri:p9,compactDecrypt:eB,compactVerify:sB,createLocalJWKSet:TE,createRemoteJWKSet:_9,cryptoRuntime:I9,decodeJwt:k9,decodeProtectedHeader:T9,errors:d6,experimental_jwksCache:R9,exportJWK:rB,exportPKCS8:Z6,exportSPKI:J6,flattenedDecrypt:xx,flattenedVerify:_x,generalDecrypt:W6,generalVerify:t9,generateKeyPair:D9,generateSecret:B9,importJWK:Ef,importPKCS8:K6,importSPKI:$6,importX509:V6,jwksCache:fd,jwtDecrypt:a9,jwtVerify:s9},Symbol.toStringTag,{value:"Module"})),O9=vy(j9);var kx={};Object.defineProperty(kx,"__esModule",{value:!0});kx.either=U9;function U9(t,e){if(t!=null&&e!=null&&t!==e)throw new TypeError(`Expected "${e}", got "${t}"`);return t??e??void 0}Object.defineProperty(Hy,"__esModule",{value:!0});Hy.JoseKey=void 0;const oa=O9,gt=_o,$9=kx,{JOSEError:nC}=oa.errors;class Px extends gt.Key{async getKeyObj(e){if(!this.algorithms.includes(e))throw new gt.JwkError(`Key cannot be used with algorithm "${e}"`);try{return await(0,oa.importJWK)(this.jwk,e)}catch(r){throw new gt.JwkError("Failed to import JWK",void 0,{cause:r})}}async createJwt(e,r){try{const{kid:n}=e;if(n&&n!==this.kid)throw new gt.JwtCreateError(`Invalid "kid" (${n}) used to sign with key "${this.kid}"`);const{alg:i}=e;if(!i)throw new gt.JwtCreateError('Missing "alg" in JWT header');const o=await this.getKeyObj(i);return await new oa.SignJWT(r).setProtectedHeader({...e,alg:i,kid:this.kid}).sign(o)}catch(n){throw n instanceof nC?new gt.JwtCreateError(n.message,n.code,{cause:n}):gt.JwtCreateError.from(n)}}async verifyJwt(e,r){try{const n=await(0,oa.jwtVerify)(e,async({alg:s})=>this.getKeyObj(s),{...r,algorithms:this.algorithms}),i=gt.jwtHeaderSchema.safeParse(n.protectedHeader);if(!i.success)throw new gt.JwtVerifyError("Invalid JWT header",void 0,{cause:i.error});const o=gt.jwtPayloadSchema.safeParse(n.payload);if(!o.success)throw new gt.JwtVerifyError("Invalid JWT payload",void 0,{cause:o.error});return{protectedHeader:i.data,payload:o.data}}catch(n){throw n instanceof nC?new gt.JwtVerifyError(n.message,n.code,{cause:n}):gt.JwtVerifyError.from(n)}}static async generateKeyPair(e=["ES256"],r){if(!e.length)throw new gt.JwkError("No algorithms provided for key generation");const n=[];for(const i of e)try{return await(0,oa.generateKeyPair)(i,r)}catch(o){n.push(o)}throw new gt.JwkError("Failed to generate key pair",void 0,{cause:new AggregateError(n,"None of the algorithms worked")})}static async generate(e=["ES256"],r,n){const i=await this.generateKeyPair(e,{...n,extractable:!0});return this.fromImportable(i.privateKey,r)}static async fromImportable(e,r){if(typeof e=="string"){if(e.startsWith("-----"))return this.fromPKCS8(e,"",r);if(e.startsWith("{"))return this.fromJWK(e,r);throw new gt.JwkError("Invalid input")}if(typeof e=="object")return"kty"in e||"alg"in e?this.fromJWK(e,r):this.fromKeyLike(e,r);throw new gt.JwkError("Invalid input")}static async fromKeyLike(e,r,n){const i=await(0,oa.exportJWK)(e);if(n){if(!i.alg)i.alg=n;else if(i.alg!==n)throw new gt.JwkError('Invalid "alg" in JWK')}return this.fromJWK(i,r)}static async fromPKCS8(e,r,n){const i=await(0,oa.importPKCS8)(e,r,{extractable:!0});return this.fromKeyLike(i,n)}static async fromJWK(e,r){const n=typeof e=="string"?JSON.parse(e):e;if(!n||typeof n!="object")throw new gt.JwkError("Invalid JWK");const i=(0,$9.either)(n.kid,r),o=n.use||"sig";return new Px(gt.jwkValidator.parse({...n,kid:i,use:o}))}}Hy.JoseKey=Px;(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hy,t)})(CD);var xf={};Object.defineProperty(xf,"__esModule",{value:!0});xf.toSubtleAlgorithm=V9;xf.fromSubtleAlgorithm=K9;xf.isCryptoKeyPair=M9;function V9(t,e,r){switch(t){case"PS256":case"PS384":case"PS512":return{name:"RSA-PSS",hash:`SHA-${t.slice(-3)}`,modulusLength:(r==null?void 0:r.modulusLength)??2048,publicExponent:new Uint8Array([1,0,1])};case"RS256":case"RS384":case"RS512":return{name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.slice(-3)}`,modulusLength:(r==null?void 0:r.modulusLength)??2048,publicExponent:new Uint8Array([1,0,1])};case"ES256":case"ES384":return{name:"ECDSA",namedCurve:`P-${t.slice(-3)}`};case"ES512":return{name:"ECDSA",namedCurve:"P-521"};default:throw new TypeError(`Unsupported alg "${t}"`)}}function K9(t){switch(t.name){case"RSA-PSS":case"RSASSA-PKCS1-v1_5":{const e=t.hash.name;switch(e){case"SHA-256":case"SHA-384":case"SHA-512":return`${t.name==="RSA-PSS"?"PS":"RS"}${e.slice(-3)}`;default:throw new TypeError("unsupported RsaHashedKeyAlgorithm hash")}}case"ECDSA":{const e=t.namedCurve;switch(e){case"P-256":case"P-384":case"P-512":return`ES${e.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 "${t.name}"`)}}function M9(t,e){return typeof t=="object"&&t!==null&&"privateKey"in t&&t.privateKey instanceof CryptoKey&&t.privateKey.type==="private"&&(e==null||t.privateKey.extractable===e)&&t.privateKey.usages.includes("sign")&&"publicKey"in t&&t.publicKey instanceof CryptoKey&&t.publicKey.type==="public"&&t.publicKey.extractable===!0&&t.publicKey.usages.includes("verify")}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WebcryptoKey=t.jwkWithAlgSchema=void 0;const e=Z,r=_o,n=CD,i=xf;t.jwkWithAlgSchema=e.z.intersection(r.jwkSchema,e.z.object({alg:e.z.string()}));class o extends n.JoseKey{static async generate(a=["ES256"],c=crypto.randomUUID(),u){const d=await this.generateKeyPair(a,u);if(!(0,i.isCryptoKeyPair)(d))throw new TypeError("Invalid CryptoKeyPair");return this.fromKeypair(d,c)}static async fromKeypair(a,c){const{key_ops:u,use:d,alg:f=(0,i.fromSubtleAlgorithm)(a.privateKey.algorithm),...h}=await crypto.subtle.exportKey("jwk",a.privateKey.extractable?a.privateKey:a.publicKey);if(d&&d!=="sig")throw new TypeError(`Unsupported JWK use "${d}"`);if(u&&!u.some(m=>m==="sign"||m==="verify"))throw new TypeError(`Invalid key_ops "${u}" for "sig" use`);return new o(t.jwkWithAlgSchema.parse({...h,kid:c,alg:f,use:"sig"}),a)}constructor(a,c){super(a),Object.defineProperty(this,"cryptoKeyPair",{enumerable:!0,configurable:!0,writable:!0,value:c})}get isPrivate(){return!0}get privateJwk(){if(super.isPrivate)return this.jwk;throw new Error("Private Webcrypto Key not exportable")}async getKeyObj(a){if(this.jwk.alg!==a)throw new r.JwkError(`Key cannot be used with algorithm "${a}"`);return this.cryptoKeyPair.privateKey}}t.WebcryptoKey=o})(cD);(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(cD,t)})($y);var Lx={},Dx={},Ps={},Ro={},Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.InvalidDidError=Ai.DidError=void 0;class Qd extends Error{constructor(e,r,n,i=400,o){super(r,{cause:o}),Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:i})}get statusCode(){return this.status}toString(){return`${this.constructor.name} ${this.code} (${this.did}): ${this.message}`}static from(e,r){if(e instanceof Qd)return e;const n=e instanceof Error?e.message:typeof e=="string"?e:"An unknown error occurred",i=(typeof(e==null?void 0:e.statusCode)=="number"?e.statusCode:void 0)??(typeof(e==null?void 0:e.status)=="number"?e.status:void 0);return new Qd(r,n,"did-unknown-error",i,e)}}Ai.DidError=Qd;let N9=class extends Qd{constructor(e,r,n){super(e,r,"did-invalid",400,n)}};Ai.InvalidDidError=N9;var Bx={},Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});Ka.DID_PLC_PREFIX=void 0;Ka.isDidPlc=z9;Ka.asDidPlc=F9;Ka.assertDidPlc=hB;const mh=Ai,eg="did:plc:";Ka.DID_PLC_PREFIX=eg;const pB=eg.length,pd=32;function z9(t){if(typeof t!="string"||t.length!==pd||!t.startsWith(eg))return!1;for(let e=pB;e<pd;e++)if(!mB(t.charCodeAt(e)))return!1;return!0}function F9(t){return hB(t),t}function hB(t){if(typeof t!="string")throw new mh.InvalidDidError(typeof t,"DID must be a string");if(!t.startsWith(eg))throw new mh.InvalidDidError(t,"Invalid did:plc prefix");if(t.length!==pd)throw new mh.InvalidDidError(t,`did:plc must be ${pd} characters long`);for(let e=pB;e<pd;e++)if(!mB(t.charCodeAt(e)))throw new mh.InvalidDidError(t,`Invalid character at position ${e}`)}const mB=t=>t>=97&&t<=122||t>=50&&t<=55;var yB={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.didSchema=Kr.DID_PREFIX=void 0;Kr.assertDidMethod=gB;Kr.extractDidMethod=q9;Kr.assertDidMsid=bB;Kr.assertDid=tg;Kr.isDid=G9;Kr.asDid=H9;const iC=Z,Zr=Ai,Zm="did:";Kr.DID_PREFIX=Zm;const Qm=Zm.length;function gB(t,e=0,r=t.length){if(!Number.isFinite(r)||!Number.isFinite(e)||r<e||r>t.length)throw new TypeError("Invalid start or end position");if(r===e)throw new Zr.InvalidDidError(t,"Empty method name");let n;for(let i=e;i<r;i++)if(n=t.charCodeAt(i),(n<97||n>122)&&(n<48||n>57))throw new Zr.InvalidDidError(t,`Invalid character at position ${i} in DID method name`)}function q9(t){const e=t.indexOf(":",Qm);return t.slice(Qm,e)}function bB(t,e=0,r=t.length){if(!Number.isFinite(r)||!Number.isFinite(e)||r<e||r>t.length)throw new TypeError("Invalid start or end position");if(r===e)throw new Zr.InvalidDidError(t,"DID method-specific id must not be empty");let n;for(let i=e;i<r;i++)if(n=t.charCodeAt(i),(n<97||n>122)&&(n<65||n>90)&&(n<48||n>57)&&n!==46&&n!==45&&n!==95){if(n===58){if(i===r-1)throw new Zr.InvalidDidError(t,'DID cannot end with ":"');continue}if(n===37){if(n=t.charCodeAt(++i),(n<48||n>57)&&(n<65||n>70))throw new Zr.InvalidDidError(t,`Invalid pct-encoded character at position ${i}`);if(n=t.charCodeAt(++i),(n<48||n>57)&&(n<65||n>70))throw new Zr.InvalidDidError(t,`Invalid pct-encoded character at position ${i}`);if(i>=r)throw new Zr.InvalidDidError(t,`Incomplete pct-encoded character at position ${i-2}`);continue}throw new Zr.InvalidDidError(t,`Disallowed character in DID at position ${i}`)}}function tg(t){if(typeof t!="string")throw new Zr.InvalidDidError(typeof t,"DID must be a string");const{length:e}=t;if(e>2048)throw new Zr.InvalidDidError(t,"DID is too long (2048 chars max)");if(!t.startsWith(Zm))throw new Zr.InvalidDidError(t,`DID requires "${Zm}" prefix`);const r=t.indexOf(":",Qm);if(r===-1)throw new Zr.InvalidDidError(t,"Missing colon after method name");gB(t,Qm,r),bB(t,r+1,e)}function G9(t){try{return tg(t),!0}catch(e){if(e instanceof Zr.DidError)return!1;throw e}}function H9(t){return tg(t),t}Kr.didSchema=iC.z.string().superRefine((t,e)=>{try{return tg(t),!0}catch(r){return e.addIssue({code:iC.z.ZodIssueCode.custom,message:r instanceof Error?r.message:"Unexpected error"}),!1}});(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DID_WEB_PREFIX=void 0,t.isDidWeb=n,t.asDidWeb=i,t.assertDidWeb=o,t.didWebToUrl=s,t.urlToDidWeb=a;const e=Ai,r=Kr;t.DID_WEB_PREFIX="did:web:";function n(c){if(typeof c!="string"||!c.startsWith(t.DID_WEB_PREFIX)||c.charAt(t.DID_WEB_PREFIX.length)===":")return!1;try{return s(c),!0}catch{return!1}}function i(c){return o(c),c}function o(c){if(typeof c!="string")throw new e.InvalidDidError(typeof c,"DID must be a string");if(!c.startsWith(t.DID_WEB_PREFIX))throw new e.InvalidDidError(c,"Invalid did:web prefix");if(c.charAt(t.DID_WEB_PREFIX.length)===":")throw new e.InvalidDidError(c,"did:web MSID must not start with a colon");s(c)}function s(c){(0,r.assertDidMsid)(c,t.DID_WEB_PREFIX.length);const u=t.DID_WEB_PREFIX.length,d=c.indexOf(":",u),f=d===-1?c.slice(u):c.slice(u,d),h=d===-1?"":c.slice(d);try{const m=new URL(`https://${f.replaceAll("%3A",":")}${h.replaceAll(":","/")}`);return m.hostname==="localhost"&&(m.protocol="http:"),m}catch(m){throw new e.InvalidDidError(c,"Invalid Web DID",m)}}function a(c){const u=c.port?`%3A${c.port}`:"",d=c.pathname==="/"?"":c.pathname.replaceAll("/",":");return`did:web:${c.hostname}${u}${d}`}})(yB);(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ka,t),r(yB,t)})(Bx);Object.defineProperty(Ro,"__esModule",{value:!0});Ro.atprotoDidSchema=void 0;Ro.isAtprotoDid=vB;Ro.asAtprotoDid=X9;Ro.assertAtprotoDid=EB;Ro.assertAtprotoDidWeb=Ix;Ro.isAtprotoDidWeb=wB;const W9=Z,Ym=Ai,ao=Bx;Ro.atprotoDidSchema=W9.z.string().refine(vB,'Atproto only allows "plc" and "web" DID methods');function vB(t){return typeof t!="string"?!1:t.startsWith(ao.DID_PLC_PREFIX)?(0,ao.isDidPlc)(t):t.startsWith(ao.DID_WEB_PREFIX)?wB(t):!1}function X9(t){return EB(t),t}function EB(t){if(typeof t!="string")throw new Ym.InvalidDidError(typeof t,"DID must be a string");if(t.startsWith(ao.DID_PLC_PREFIX))(0,ao.assertDidPlc)(t);else if(t.startsWith(ao.DID_WEB_PREFIX))Ix(t);else throw new Ym.InvalidDidError(t,'Atproto only allows "plc" and "web" DID methods')}function Ix(t){if((0,ao.assertDidWeb)(t),t.includes(":",ao.DID_WEB_PREFIX.length))throw new Ym.InvalidDidError(t,"Atproto does not allow path components in Web DIDs");if(t.includes("%3A",ao.DID_WEB_PREFIX.length)&&!t.startsWith("did:web:localhost%3A"))throw new Ym.InvalidDidError(t,"Atproto does not allow port numbers in Web DIDs, except for localhost")}function wB(t){try{return Ix(t),!0}catch{return!1}}var xB={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.didDocumentValidator=t.didDocumentSchema=void 0;const e=Z,r=Kr,n=e.z.string().refine(h=>{try{return new URL(h),!0}catch{return!1}},"RFC3968 compliant URI"),i=e.z.union([r.didSchema,e.z.array(r.didSchema)]),o=e.z.union([n,e.z.string().regex(/^#[^#]+$/)]),s=e.z.object({id:o,type:e.z.string().min(1),controller:i,publicKeyJwk:e.z.record(e.z.string(),e.z.unknown()).optional(),publicKeyMultibase:e.z.string().optional()}),a=o,c=e.z.union([e.z.string(),e.z.array(e.z.string())]),u=e.z.union([n,e.z.record(e.z.string(),n),e.z.array(e.z.union([n,e.z.record(e.z.string(),n)])).nonempty()]),d=e.z.object({id:a,type:c,serviceEndpoint:u}),f=e.z.union([o,s]);t.didDocumentSchema=e.z.object({"@context":e.z.union([e.z.literal("https://www.w3.org/ns/did/v1"),e.z.array(e.z.string().url()).nonempty().refine(h=>h[0]==="https://www.w3.org/ns/did/v1",{message:"First @context must be https://www.w3.org/ns/did/v1"})]),id:r.didSchema,controller:i.optional(),alsoKnownAs:e.z.array(n).optional(),service:e.z.array(d).optional(),authentication:e.z.array(f).optional(),verificationMethod:e.z.array(e.z.union([s,o])).optional()}),t.didDocumentValidator=t.didDocumentSchema.superRefine(({id:h,service:m},g)=>{if(m){const v=new Set;for(let w=0;w<m.length;w++){const y=m[w],b=y.id.startsWith("#")?`${h}${y.id}`:y.id;v.has(b)?g.addIssue({code:e.z.ZodIssueCode.custom,message:`Duplicate service id (${y.id}) found in the document`,path:["service",w,"id"]}):v.add(b)}}})})(xB);(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ro,t),r(xB,t),r(Ai,t),r(Kr,t),r(Bx,t)})(Ps);var _f={},ic={},rg={};Object.defineProperty(rg,"__esModule",{value:!0});rg.LRUCache=void 0;const el=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,_B=new Set,PE=typeof process=="object"&&process?process:{},RB=(t,e,r,n)=>{typeof PE.emitWarning=="function"?PE.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)};let ey=globalThis.AbortController,oC=globalThis.AbortSignal;var Tk;if(typeof ey>"u"){oC=class{constructor(){Oe(this,"onabort");Oe(this,"_onabort",[]);Oe(this,"reason");Oe(this,"aborted",!1)}addEventListener(n,i){this._onabort.push(i)}},ey=class{constructor(){Oe(this,"signal",new oC);e()}abort(n){var i,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const s of this.signal._onabort)s(n);(o=(i=this.signal).onabort)==null||o.call(i,n)}}};let t=((Tk=PE.env)==null?void 0:Tk.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,RB("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",e))}}const J9=t=>!_B.has(t),jo=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),AB=t=>jo(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tm:null:null;class tm extends Array{constructor(e){super(e),this.fill(0)}}var Ll;const fa=class fa{constructor(e,r){Oe(this,"heap");Oe(this,"length");if(!S(fa,Ll))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=AB(e);if(!r)return[];ie(fa,Ll,!0);const n=new fa(e,r);return ie(fa,Ll,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Ll=new WeakMap,ke(fa,Ll,!1);let LE=fa;var kk,Pk,$n,Gr,Vn,Kn,Dl,Bl,At,Mn,bt,Xe,fe,fr,Hr,tr,Lt,Nn,Dt,zn,Fn,Wr,qn,Ho,pr,z,BE,va,eo,of,Xr,SB,Ea,Il,sf,Oo,Uo,IE,rm,nm,We,jE,Yu,$o,OE;const TS=class TS{constructor(e){ke(this,z);ke(this,$n);ke(this,Gr);ke(this,Vn);ke(this,Kn);ke(this,Dl);ke(this,Bl);Oe(this,"ttl");Oe(this,"ttlResolution");Oe(this,"ttlAutopurge");Oe(this,"updateAgeOnGet");Oe(this,"updateAgeOnHas");Oe(this,"allowStale");Oe(this,"noDisposeOnSet");Oe(this,"noUpdateTTL");Oe(this,"maxEntrySize");Oe(this,"sizeCalculation");Oe(this,"noDeleteOnFetchRejection");Oe(this,"noDeleteOnStaleGet");Oe(this,"allowStaleOnFetchAbort");Oe(this,"allowStaleOnFetchRejection");Oe(this,"ignoreFetchAbort");ke(this,At);ke(this,Mn);ke(this,bt);ke(this,Xe);ke(this,fe);ke(this,fr);ke(this,Hr);ke(this,tr);ke(this,Lt);ke(this,Nn);ke(this,Dt);ke(this,zn);ke(this,Fn);ke(this,Wr);ke(this,qn);ke(this,Ho);ke(this,pr);ke(this,va,()=>{});ke(this,eo,()=>{});ke(this,of,()=>{});ke(this,Xr,()=>!1);ke(this,Ea,e=>{});ke(this,Il,(e,r,n)=>{});ke(this,sf,(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Oe(this,kk,"LRUCache");const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:c,dispose:u,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:h,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:v,fetchMethod:w,memoMethod:y,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:T,ignoreFetchAbort:B}=e;if(r!==0&&!jo(r))throw new TypeError("max option must be a nonnegative integer");const I=r?AB(r):Array;if(!I)throw new Error("invalid max value: "+r);if(ie(this,$n,r),ie(this,Gr,m),this.maxEntrySize=g||S(this,Gr),this.sizeCalculation=v,this.sizeCalculation){if(!S(this,Gr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(ie(this,Bl,y),w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(ie(this,Dl,w),ie(this,Ho,!!w),ie(this,bt,new Map),ie(this,Xe,new Array(r).fill(void 0)),ie(this,fe,new Array(r).fill(void 0)),ie(this,fr,new I(r)),ie(this,Hr,new I(r)),ie(this,tr,0),ie(this,Lt,0),ie(this,Nn,LE.create(r)),ie(this,At,0),ie(this,Mn,0),typeof u=="function"&&ie(this,Vn,u),typeof d=="function"?(ie(this,Kn,d),ie(this,Dt,[])):(ie(this,Kn,void 0),ie(this,Dt,void 0)),ie(this,qn,!!S(this,Vn)),ie(this,pr,!!S(this,Kn)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!_,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!B,this.maxEntrySize!==0){if(S(this,Gr)!==0&&!jo(S(this,Gr)))throw new TypeError("maxSize must be a positive integer if specified");if(!jo(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");W(this,z,SB).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=jo(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!jo(this.ttl))throw new TypeError("ttl must be a positive integer if specified");W(this,z,BE).call(this)}if(S(this,$n)===0&&this.ttl===0&&S(this,Gr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!S(this,$n)&&!S(this,Gr)){const O="LRU_CACHE_UNBOUNDED";J9(O)&&(_B.add(O),RB("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,TS))}}static unsafeExposeInternals(e){return{starts:S(e,Fn),ttls:S(e,Wr),sizes:S(e,zn),keyMap:S(e,bt),keyList:S(e,Xe),valList:S(e,fe),next:S(e,fr),prev:S(e,Hr),get head(){return S(e,tr)},get tail(){return S(e,Lt)},free:S(e,Nn),isBackgroundFetch:r=>{var n;return W(n=e,z,We).call(n,r)},backgroundFetch:(r,n,i,o)=>{var s;return W(s=e,z,nm).call(s,r,n,i,o)},moveToTail:r=>{var n;return W(n=e,z,Yu).call(n,r)},indexes:r=>{var n;return W(n=e,z,Oo).call(n,r)},rindexes:r=>{var n;return W(n=e,z,Uo).call(n,r)},isStale:r=>{var n;return S(n=e,Xr).call(n,r)}}}get max(){return S(this,$n)}get maxSize(){return S(this,Gr)}get calculatedSize(){return S(this,Mn)}get size(){return S(this,At)}get fetchMethod(){return S(this,Dl)}get memoMethod(){return S(this,Bl)}get dispose(){return S(this,Vn)}get disposeAfter(){return S(this,Kn)}getRemainingTTL(e){return S(this,bt).has(e)?1/0:0}*entries(){for(const e of W(this,z,Oo).call(this))S(this,fe)[e]!==void 0&&S(this,Xe)[e]!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield[S(this,Xe)[e],S(this,fe)[e]])}*rentries(){for(const e of W(this,z,Uo).call(this))S(this,fe)[e]!==void 0&&S(this,Xe)[e]!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield[S(this,Xe)[e],S(this,fe)[e]])}*keys(){for(const e of W(this,z,Oo).call(this)){const r=S(this,Xe)[e];r!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield r)}}*rkeys(){for(const e of W(this,z,Uo).call(this)){const r=S(this,Xe)[e];r!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield r)}}*values(){for(const e of W(this,z,Oo).call(this))S(this,fe)[e]!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield S(this,fe)[e])}*rvalues(){for(const e of W(this,z,Uo).call(this))S(this,fe)[e]!==void 0&&!W(this,z,We).call(this,S(this,fe)[e])&&(yield S(this,fe)[e])}[(Pk=Symbol.iterator,kk=Symbol.toStringTag,Pk)](){return this.entries()}find(e,r={}){for(const n of W(this,z,Oo).call(this)){const i=S(this,fe)[n],o=W(this,z,We).call(this,i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,S(this,Xe)[n],this))return this.get(S(this,Xe)[n],r)}}forEach(e,r=this){for(const n of W(this,z,Oo).call(this)){const i=S(this,fe)[n],o=W(this,z,We).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,S(this,Xe)[n],this)}}rforEach(e,r=this){for(const n of W(this,z,Uo).call(this)){const i=S(this,fe)[n],o=W(this,z,We).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,S(this,Xe)[n],this)}}purgeStale(){let e=!1;for(const r of W(this,z,Uo).call(this,{allowStale:!0}))S(this,Xr).call(this,r)&&(W(this,z,$o).call(this,S(this,Xe)[r],"expire"),e=!0);return e}info(e){const r=S(this,bt).get(e);if(r===void 0)return;const n=S(this,fe)[r],i=W(this,z,We).call(this,n)?n.__staleWhileFetching:n;if(i===void 0)return;const o={value:i};if(S(this,Wr)&&S(this,Fn)){const s=S(this,Wr)[r],a=S(this,Fn)[r];if(s&&a){const c=s-(el.now()-a);o.ttl=c,o.start=Date.now()}}return S(this,zn)&&(o.size=S(this,zn)[r]),o}dump(){const e=[];for(const r of W(this,z,Oo).call(this,{allowStale:!0})){const n=S(this,Xe)[r],i=S(this,fe)[r],o=W(this,z,We).call(this,i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;const s={value:o};if(S(this,Wr)&&S(this,Fn)){s.ttl=S(this,Wr)[r];const a=el.now()-S(this,Fn)[r];s.start=Math.floor(Date.now()-a)}S(this,zn)&&(s.size=S(this,zn)[r]),e.unshift([n,s])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const i=Date.now()-n.start;n.start=el.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){var h,m,g,v,w;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=n;let{noUpdateTTL:u=this.noUpdateTTL}=n;const d=S(this,sf).call(this,e,r,n.size||0,a);if(this.maxEntrySize&&d>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),W(this,z,$o).call(this,e,"set"),this;let f=S(this,At)===0?void 0:S(this,bt).get(e);if(f===void 0)f=S(this,At)===0?S(this,Lt):S(this,Nn).length!==0?S(this,Nn).pop():S(this,At)===S(this,$n)?W(this,z,rm).call(this,!1):S(this,At),S(this,Xe)[f]=e,S(this,fe)[f]=r,S(this,bt).set(e,f),S(this,fr)[S(this,Lt)]=f,S(this,Hr)[f]=S(this,Lt),ie(this,Lt,f),Hp(this,At)._++,S(this,Il).call(this,f,d,c),c&&(c.set="add"),u=!1;else{W(this,z,Yu).call(this,f);const y=S(this,fe)[f];if(r!==y){if(S(this,Ho)&&W(this,z,We).call(this,y)){y.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:b}=y;b!==void 0&&!s&&(S(this,qn)&&((h=S(this,Vn))==null||h.call(this,b,e,"set")),S(this,pr)&&((m=S(this,Dt))==null||m.push([b,e,"set"])))}else s||(S(this,qn)&&((g=S(this,Vn))==null||g.call(this,y,e,"set")),S(this,pr)&&((v=S(this,Dt))==null||v.push([y,e,"set"])));if(S(this,Ea).call(this,f),S(this,Il).call(this,f,d,c),S(this,fe)[f]=r,c){c.set="replace";const b=y&&W(this,z,We).call(this,y)?y.__staleWhileFetching:y;b!==void 0&&(c.oldValue=b)}}else c&&(c.set="update")}if(i!==0&&!S(this,Wr)&&W(this,z,BE).call(this),S(this,Wr)&&(u||S(this,of).call(this,f,i,o),c&&S(this,eo).call(this,c,f)),!s&&S(this,pr)&&S(this,Dt)){const y=S(this,Dt);let b;for(;b=y==null?void 0:y.shift();)(w=S(this,Kn))==null||w.call(this,...b)}return this}pop(){var e;try{for(;S(this,At);){const r=S(this,fe)[S(this,tr)];if(W(this,z,rm).call(this,!0),W(this,z,We).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(S(this,pr)&&S(this,Dt)){const r=S(this,Dt);let n;for(;n=r==null?void 0:r.shift();)(e=S(this,Kn))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=S(this,bt).get(e);if(o!==void 0){const s=S(this,fe)[o];if(W(this,z,We).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(S(this,Xr).call(this,o))i&&(i.has="stale",S(this,eo).call(this,i,o));else return n&&S(this,va).call(this,o),i&&(i.has="hit",S(this,eo).call(this,i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,i=S(this,bt).get(e);if(i===void 0||!n&&S(this,Xr).call(this,i))return;const o=S(this,fe)[i];return W(this,z,We).call(this,o)?o.__staleWhileFetching:o}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:v,forceRefresh:w=!1,status:y,signal:b}=r;if(!S(this,Ho))return y&&(y.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:y});const E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:a,size:c,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:y,signal:b};let _=S(this,bt).get(e);if(_===void 0){y&&(y.fetch="miss");const T=W(this,z,nm).call(this,e,_,E,v);return T.__returned=T}else{const T=S(this,fe)[_];if(W(this,z,We).call(this,T)){const re=n&&T.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",re&&(y.returnedStale=!0)),re?T.__staleWhileFetching:T.__returned=T}const B=S(this,Xr).call(this,_);if(!w&&!B)return y&&(y.fetch="hit"),W(this,z,Yu).call(this,_),i&&S(this,va).call(this,_),y&&S(this,eo).call(this,y,_),T;const I=W(this,z,nm).call(this,e,_,E,v),F=I.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=B?"stale":"refresh",F&&B&&(y.returnedStale=!0)),F?I.__staleWhileFetching:I.__returned=I}}async forceFetch(e,r={}){const n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){const n=S(this,Bl);if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:o,...s}=r,a=this.get(e,s);if(!o&&a!==void 0)return a;const c=n(e,a,{options:s,context:i});return this.set(e,c,s),c}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,a=S(this,bt).get(e);if(a!==void 0){const c=S(this,fe)[a],u=W(this,z,We).call(this,c);return s&&S(this,eo).call(this,s,a),S(this,Xr).call(this,a)?(s&&(s.get="stale"),u?(s&&n&&c.__staleWhileFetching!==void 0&&(s.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||W(this,z,$o).call(this,e,"expire"),s&&n&&(s.returnedStale=!0),n?c:void 0)):(s&&(s.get="hit"),u?c.__staleWhileFetching:(W(this,z,Yu).call(this,a),i&&S(this,va).call(this,a),c))}else s&&(s.get="miss")}delete(e){return W(this,z,$o).call(this,e,"delete")}clear(){return W(this,z,OE).call(this,"delete")}};$n=new WeakMap,Gr=new WeakMap,Vn=new WeakMap,Kn=new WeakMap,Dl=new WeakMap,Bl=new WeakMap,At=new WeakMap,Mn=new WeakMap,bt=new WeakMap,Xe=new WeakMap,fe=new WeakMap,fr=new WeakMap,Hr=new WeakMap,tr=new WeakMap,Lt=new WeakMap,Nn=new WeakMap,Dt=new WeakMap,zn=new WeakMap,Fn=new WeakMap,Wr=new WeakMap,qn=new WeakMap,Ho=new WeakMap,pr=new WeakMap,z=new WeakSet,BE=function(){const e=new tm(S(this,$n)),r=new tm(S(this,$n));ie(this,Wr,e),ie(this,Fn,r),ie(this,of,(o,s,a=el.now())=>{if(r[o]=s!==0?a:0,e[o]=s,s!==0&&this.ttlAutopurge){const c=setTimeout(()=>{S(this,Xr).call(this,o)&&W(this,z,$o).call(this,S(this,Xe)[o],"expire")},s+1);c.unref&&c.unref()}}),ie(this,va,o=>{r[o]=e[o]!==0?el.now():0}),ie(this,eo,(o,s)=>{if(e[s]){const a=e[s],c=r[s];if(!a||!c)return;o.ttl=a,o.start=c,o.now=n||i();const u=o.now-c;o.remainingTTL=a-u}});let n=0;const i=()=>{const o=el.now();if(this.ttlResolution>0){n=o;const s=setTimeout(()=>n=0,this.ttlResolution);s.unref&&s.unref()}return o};this.getRemainingTTL=o=>{const s=S(this,bt).get(o);if(s===void 0)return 0;const a=e[s],c=r[s];if(!a||!c)return 1/0;const u=(n||i())-c;return a-u},ie(this,Xr,o=>{const s=r[o],a=e[o];return!!a&&!!s&&(n||i())-s>a})},va=new WeakMap,eo=new WeakMap,of=new WeakMap,Xr=new WeakMap,SB=function(){const e=new tm(S(this,$n));ie(this,Mn,0),ie(this,zn,e),ie(this,Ea,r=>{ie(this,Mn,S(this,Mn)-e[r]),e[r]=0}),ie(this,sf,(r,n,i,o)=>{if(W(this,z,We).call(this,n))return 0;if(!jo(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!jo(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ie(this,Il,(r,n,i)=>{if(e[r]=n,S(this,Gr)){const o=S(this,Gr)-e[r];for(;S(this,Mn)>o;)W(this,z,rm).call(this,!0)}ie(this,Mn,S(this,Mn)+e[r]),i&&(i.entrySize=n,i.totalCalculatedSize=S(this,Mn))})},Ea=new WeakMap,Il=new WeakMap,sf=new WeakMap,Oo=function*({allowStale:e=this.allowStale}={}){if(S(this,At))for(let r=S(this,Lt);!(!W(this,z,IE).call(this,r)||((e||!S(this,Xr).call(this,r))&&(yield r),r===S(this,tr)));)r=S(this,Hr)[r]},Uo=function*({allowStale:e=this.allowStale}={}){if(S(this,At))for(let r=S(this,tr);!(!W(this,z,IE).call(this,r)||((e||!S(this,Xr).call(this,r))&&(yield r),r===S(this,Lt)));)r=S(this,fr)[r]},IE=function(e){return e!==void 0&&S(this,bt).get(S(this,Xe)[e])===e},rm=function(e){var o,s;const r=S(this,tr),n=S(this,Xe)[r],i=S(this,fe)[r];return S(this,Ho)&&W(this,z,We).call(this,i)?i.__abortController.abort(new Error("evicted")):(S(this,qn)||S(this,pr))&&(S(this,qn)&&((o=S(this,Vn))==null||o.call(this,i,n,"evict")),S(this,pr)&&((s=S(this,Dt))==null||s.push([i,n,"evict"]))),S(this,Ea).call(this,r),e&&(S(this,Xe)[r]=void 0,S(this,fe)[r]=void 0,S(this,Nn).push(r)),S(this,At)===1?(ie(this,tr,ie(this,Lt,0)),S(this,Nn).length=0):ie(this,tr,S(this,fr)[r]),S(this,bt).delete(n),Hp(this,At)._--,r},nm=function(e,r,n,i){const o=r===void 0?void 0:S(this,fe)[r];if(W(this,z,We).call(this,o))return o;const s=new ey,{signal:a}=n;a==null||a.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});const c={signal:s.signal,options:n,context:i},u=(v,w=!1)=>{const{aborted:y}=s.signal,b=n.ignoreFetchAbort&&v!==void 0;if(n.status&&(y&&!w?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,b&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!b&&!w)return f(s.signal.reason);const E=m;return S(this,fe)[r]===m&&(v===void 0?E.__staleWhileFetching?S(this,fe)[r]=E.__staleWhileFetching:W(this,z,$o).call(this,e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,v,c.options))),v},d=v=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=v),f(v)),f=v=>{const{aborted:w}=s.signal,y=w&&n.allowStaleOnFetchAbort,b=y||n.allowStaleOnFetchRejection,E=b||n.noDeleteOnFetchRejection,_=m;if(S(this,fe)[r]===m&&(!E||_.__staleWhileFetching===void 0?W(this,z,$o).call(this,e,"fetch"):y||(S(this,fe)[r]=_.__staleWhileFetching)),b)return n.status&&_.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),_.__staleWhileFetching;if(_.__returned===_)throw v},h=(v,w)=>{var b;const y=(b=S(this,Dl))==null?void 0:b.call(this,e,o,c);y&&y instanceof Promise&&y.then(E=>v(E===void 0?void 0:E),w),s.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(v(void 0),n.allowStaleOnFetchAbort&&(v=E=>u(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);const m=new Promise(h).then(u,d),g=Object.assign(m,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,g,{...c.options,status:void 0}),r=S(this,bt).get(e)):S(this,fe)[r]=g,g},We=function(e){if(!S(this,Ho))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof ey},jE=function(e,r){S(this,Hr)[r]=e,S(this,fr)[e]=r},Yu=function(e){e!==S(this,Lt)&&(e===S(this,tr)?ie(this,tr,S(this,fr)[e]):W(this,z,jE).call(this,S(this,Hr)[e],S(this,fr)[e]),W(this,z,jE).call(this,S(this,Lt),e),ie(this,Lt,e))},$o=function(e,r){var i,o,s,a;let n=!1;if(S(this,At)!==0){const c=S(this,bt).get(e);if(c!==void 0)if(n=!0,S(this,At)===1)W(this,z,OE).call(this,r);else{S(this,Ea).call(this,c);const u=S(this,fe)[c];if(W(this,z,We).call(this,u)?u.__abortController.abort(new Error("deleted")):(S(this,qn)||S(this,pr))&&(S(this,qn)&&((i=S(this,Vn))==null||i.call(this,u,e,r)),S(this,pr)&&((o=S(this,Dt))==null||o.push([u,e,r]))),S(this,bt).delete(e),S(this,Xe)[c]=void 0,S(this,fe)[c]=void 0,c===S(this,Lt))ie(this,Lt,S(this,Hr)[c]);else if(c===S(this,tr))ie(this,tr,S(this,fr)[c]);else{const d=S(this,Hr)[c];S(this,fr)[d]=S(this,fr)[c];const f=S(this,fr)[c];S(this,Hr)[f]=S(this,Hr)[c]}Hp(this,At)._--,S(this,Nn).push(c)}}if(S(this,pr)&&((s=S(this,Dt))!=null&&s.length)){const c=S(this,Dt);let u;for(;u=c==null?void 0:c.shift();)(a=S(this,Kn))==null||a.call(this,...u)}return n},OE=function(e){var r,n,i;for(const o of W(this,z,Uo).call(this,{allowStale:!0})){const s=S(this,fe)[o];if(W(this,z,We).call(this,s))s.__abortController.abort(new Error("deleted"));else{const a=S(this,Xe)[o];S(this,qn)&&((r=S(this,Vn))==null||r.call(this,s,a,e)),S(this,pr)&&((n=S(this,Dt))==null||n.push([s,a,e]))}}if(S(this,bt).clear(),S(this,fe).fill(void 0),S(this,Xe).fill(void 0),S(this,Wr)&&S(this,Fn)&&(S(this,Wr).fill(0),S(this,Fn).fill(0)),S(this,zn)&&S(this,zn).fill(0),ie(this,tr,0),ie(this,Lt,0),S(this,Nn).length=0,ie(this,Mn,0),ie(this,At,0),S(this,pr)&&S(this,Dt)){const o=S(this,Dt);let s;for(;s=o==null?void 0:o.shift();)(i=S(this,Kn))==null||i.call(this,...s)}};let DE=TS;rg.LRUCache=DE;var jx={};Object.defineProperty(jx,"__esModule",{value:!0});jx.roughSizeOfObject=Z9;const Uv=new WeakMap;function Z9(t){const e=new Set,r=[t];let n=0;for(;r.length;){const i=r.pop();switch(typeof i){case"string":n+=12+4*Math.ceil(i.length/4);break;case"number":n+=12;break;case"boolean":n+=4;break;case"object":if(n+=4,i===null)break;if(Uv.has(i)){n+=Uv.get(i);break}if(e.has(i))continue;if(e.add(i),Array.isArray(i))n+=4,r.push(...i);else{n+=8;const o=Object.getOwnPropertyNames(i);for(let s=0;s<o.length;s++){n+=4;const a=o[s],c=i[a];c!==void 0&&r.push(c),r.push(a)}}break;case"function":n+=8;break;case"symbol":n+=8;break;case"bigint":n+=16;break}}return typeof t=="object"&&t!==null&&Uv.set(t,n),n}var Q9=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yh=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},sa;Object.defineProperty(ic,"__esModule",{value:!0});ic.SimpleStoreMemory=void 0;const Y9=rg,eH=jx,CB=Symbol("nullItem"),tH=t=>t===null?CB:t,sC=t=>t===CB?null:t;class rH{constructor({sizeCalculation:e,...r}){sa.set(this,void 0),Q9(this,sa,new Y9.LRUCache({...r,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,sizeCalculation:e?(n,i)=>e(sC(n),i):r.maxEntrySize!=null||r.maxSize!=null?eH.roughSizeOfObject:void 0}),"f")}get(e){const r=yh(this,sa,"f").get(e);if(r!==void 0)return sC(r)}set(e,r){yh(this,sa,"f").set(e,tH(r))}del(e){yh(this,sa,"f").delete(e)}clear(){yh(this,sa,"f").clear()}}ic.SimpleStoreMemory=rH;sa=new WeakMap;Object.defineProperty(_f,"__esModule",{value:!0});_f.DidCacheMemory=void 0;const nH=ic,aC=3600*1e3,iH=50*1024*1024;class oH extends nH.SimpleStoreMemory{constructor(e){super((e==null?void 0:e.max)==null?{ttl:aC,maxSize:iH,...e}:{ttl:aC,...e})}}_f.DidCacheMemory=oH;var ng={},oc={},ig={};Object.defineProperty(ig,"__esModule",{value:!0});ig.CachedGetter=void 0;const sH=()=>!0,aH=()=>!1;class lH{constructor(e,r,n){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"pending",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}async get(e,r={}){var c,u,d;(c=r.signal)==null||c.throwIfAborted();const n=(u=this.options)==null?void 0:u.isStale,i=r.noCache?aH:r.allowStale||n==null?sH:async f=>!await n(e,f);let o;for(;o=this.pending.get(e);){try{const{isFresh:f,value:h}=await o;if(f||await i(h))return h}catch{}(d=r.signal)==null||d.throwIfAborted()}const s=Promise.resolve().then(async()=>{const f=await this.getStored(e,r);return f!==void 0&&await i(f)?{isFresh:!1,value:f}:Promise.resolve().then(async()=>(0,this.getter)(e,r,f)).catch(async h=>{var m;if(f!==void 0)try{const g=(m=this.options)==null?void 0:m.deleteOnError;await(g==null?void 0:g(h,e,f))&&await this.delStored(e,h)}catch(g){throw new AggregateError([h,g],"Error while deleting stored value")}throw h}).then(async h=>(await this.setStored(e,h),{isFresh:!0,value:h}))}).finally(()=>{this.pending.delete(e)});if(this.pending.has(e))throw new Error("Concurrent request for the same key");this.pending.set(e,s);const{value:a}=await s;return a}async getStored(e,r){try{return await this.store.get(e,r)}catch{return}}async setStored(e,r){var n;try{await this.store.set(e,r)}catch(i){const o=(n=this.options)==null?void 0:n.onStoreError;await(o==null?void 0:o(i,e,r))}}async delStored(e,r){await this.store.del(e)}}ig.CachedGetter=lH;var TB={};Object.defineProperty(TB,"__esModule",{value:!0});(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(ig,t),r(TB,t)})(oc);Object.defineProperty(ng,"__esModule",{value:!0});ng.DidResolverCached=void 0;const cH=oc,uH=_f;class dH{constructor(e,r=new uH.DidCacheMemory){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.getter=new cH.CachedGetter((n,i)=>e.resolve(n,i),r)}async resolve(e,r){return this.getter.get(e,r)}}ng.DidResolverCached=dH;var kB={};Object.defineProperty(kB,"__esModule",{value:!0});var og={},sg={},ki={},sc={};Object.defineProperty(sc,"__esModule",{value:!0});sc.FetchError=void 0;class fH extends Error{constructor(e,r,n){super(r,n),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:e})}get expose(){return!0}}sc.FetchError=fH;var Ox={},ac={};Object.defineProperty(ac,"__esModule",{value:!0});ac.toRequestTransformer=pH;ac.asRequest=PB;function pH(t){return function(e,r){return t.call(this,PB(e,r))}}function PB(t,e){return!e&&t instanceof Request?t:new Request(t,e)}var sr={};Object.defineProperty(sr,"__esModule",{value:!0});sr.extractUrl=sr.MaxBytesTransformStream=sr.ifString=void 0;sr.isIp=hH;sr.padLines=bH;sr.cancelBody=LB;sr.logCancellationError=DB;sr.stringifyMessage=vH;function hH(t){return!!(t.match(/^\d+\.\d+\.\d+\.\d+$/)||t.startsWith("[")&&t.endsWith("]"))}const mH=t=>typeof t=="string"?t:void 0;sr.ifString=mH;class yH extends TransformStream{constructor(e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");let r=0;super({transform:(n,i)=>{(r+=n.length)<=e?i.enqueue(n):i.error(new Error("Response too large"))}})}}sr.MaxBytesTransformStream=yH;const gH=/\r?\n/g;function bH(t,e){return t&&e+t.replace(gH,`$&${e}`)}async function LB(t,e){t.body&&!t.bodyUsed&&!t.body.locked&&typeof t.body.cancel=="function"&&(typeof e=="function"?t.body.cancel().catch(e):e==="log"?t.body.cancel().catch(DB):await t.body.cancel())}function DB(t){console.warn("Failed to cancel response body",t)}async function vH(t){try{const e=EH(t.headers),r=await wH(t);return e&&r?`${e}
${r}`:e||r}finally{LB(t,"log")}}function EH(t){return Array.from(t).map(([e,r])=>`${e}: ${r}`).join(`
`)}async function wH(t){var e;try{const r=await t.blob();if((e=r.type)!=null&&e.startsWith("text/")){const n=await r.text();return JSON.stringify(n)}if(/application\/(?:\w+\+)?json/.test(r.type)){const n=await r.text();return n.includes(`
`)?JSON.stringify(JSON.parse(n)):n}return`[Body size: ${r.size}, type: ${JSON.stringify(r.type)} ]`}catch{return"[Body could not be read]"}}const xH=t=>typeof t=="string"?new URL(t):t instanceof URL?t:new URL(t.url);sr.extractUrl=xH;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=t.FetchRequestError=void 0,t.protocolCheckRequestTransform=a,t.explicitRedirectCheckRequestTransform=c,t.requireHostHeaderTransform=u,t.forbiddenDomainNameRequestTransform=d;const e=sc,r=ac,n=sr;class i extends e.FetchError{constructor(h,m,g,v){if(m==null||!g){const w=s(o(v==null?void 0:v.cause));m??(m=w[0]),g||(g=w[1])}super(m,g,v),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:h})}get expose(){return this.statusCode!==500}static from(h,m){return m instanceof i?m:new i(h,void 0,void 0,{cause:m})}}t.FetchRequestError=i;function o(f){return f instanceof TypeError&&f.message==="fetch failed"&&f.cause!==void 0?f.cause:f}function s(f){if(typeof f=="string"&&f.length>0)return[500,f];if(!(f instanceof Error))return[500,"Failed to fetch"];switch(f.message){case"failed to fetch the data URL":return[400,f.message];case"unexpected redirect":case"cors failure":case"blocked":case"proxy authentication required":return[502,f.message]}const h=f.code;if(typeof h=="string")switch(!0){case h==="ENOTFOUND":return[400,"Invalid hostname"];case h==="ECONNREFUSED":return[502,"Connection refused"];case h==="DEPTH_ZERO_SELF_SIGNED_CERT":return[502,"Self-signed certificate"];case h.startsWith("ERR_TLS"):return[502,"TLS error"];case h.startsWith("ECONN"):return[502,"Connection error"];default:return[500,`${h} error`]}return[500,f.message]}function a(f){return(h,m)=>{const{protocol:g,port:v}=(0,n.extractUrl)(h),w=(0,r.asRequest)(h,m),y=Object.hasOwn(f,g)?f[g]:void 0;if(y){if(y!==!0){if(!y.allowCustomPort&&v!=="")throw new i(w,400,`Custom ${g} ports not allowed`)}}else throw new i(w,400,`Forbidden protocol "${g}"`);return w}}function c(){return(f,h)=>{const m=(0,r.asRequest)(f,h);if((h==null?void 0:h.redirect)!=null)return m;if(m.redirect==="follow")throw new i(m,500,'Request redirect must be "error" or "manual"');return m}}function u(){return(f,h)=>{const{protocol:m,hostname:g}=(0,n.extractUrl)(f),v=(0,r.asRequest)(f,h);if(m!=="http:"&&m!=="https:")throw new i(v,400,`"${m}" requests are not allowed`);if(!g||(0,n.isIp)(g))throw new i(v,400,"Invalid hostname");return v}}t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=["example.com","*.example.com","example.org","*.example.org","example.net","*.example.net","googleusercontent.com","*.googleusercontent.com"];function d(f=t.DEFAULT_FORBIDDEN_DOMAIN_NAMES){const h=new Set(f);return h.size===0?r.asRequest:async(m,g)=>{const{hostname:v}=(0,n.extractUrl)(m),w=(0,r.asRequest)(m,g);if(h.has(v))throw new i(w,403,"Forbidden hostname");let y=v.indexOf(".");for(;y!==-1;){const b=v.slice(y+1);if(h.has(`*.${b}`))throw new i(w,403,"Forbidden hostname");y=v.indexOf(".",y+1)}return w}}})(Ox);var xt={},ag={},lg={};Object.defineProperty(lg,"__esModule",{value:!0});lg.pipe=_H;lg.pipeTwo=BB;function _H(...t){return t.reduce(BB)}function BB(t,e){return async(...r)=>e(await t(...r))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pipeTwo=t.pipe=void 0;var e=lg;Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return e.pipe}}),Object.defineProperty(t,"pipeTwo",{enumerable:!0,get:function(){return e.pipeTwo}})})(ag);var Rf={},RH=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},gh=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},aa;Object.defineProperty(Rf,"__esModule",{value:!0});Rf.TransformedResponse=void 0;class AH extends Response{constructor(e,r){if(!e.body)throw new TypeError("Response body is not available");if(e.bodyUsed)throw new TypeError("Response body is already used");super(e.body.pipeThrough(r),{status:e.status,statusText:e.statusText,headers:e.headers}),aa.set(this,void 0),RH(this,aa,e,"f")}get url(){return gh(this,aa,"f").url}get redirected(){return gh(this,aa,"f").redirected}get type(){return gh(this,aa,"f").type}get statusText(){return gh(this,aa,"f").statusText}}Rf.TransformedResponse=AH;aa=new WeakMap;Object.defineProperty(xt,"__esModule",{value:!0});xt.fetchJsonZodProcessor=xt.FetchResponseError=void 0;xt.peekJson=kH;xt.checkLength=Ux;xt.extractLength=OB;xt.extractMime=cg;xt.cancelBodyOnError=Af;xt.fetchOkProcessor=PH;xt.fetchOkTransformer=UB;xt.fetchMaxSizeProcessor=LH;xt.fetchResponseMaxSizeChecker=$B;xt.fetchTypeProcessor=VB;xt.fetchResponseTypeChecker=KB;xt.fetchResponseJsonTransformer=MB;xt.fetchJsonProcessor=DH;xt.fetchJsonValidatorProcessor=NB;const SH=ag,CH=sc,IB=Rf,Ra=sr,jB=/^application\/(?:[^()<>@,;:/[\]\\?={} \t]+\+)?json$/i;class Si extends CH.FetchError{constructor(e,r=e.status,n=e.statusText,i){super(r,n,i),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e})}static async from(e,r=TH,n=e.status,i){const o=typeof r=="string"?r:typeof r=="function"?await r(e):void 0;return new Si(e,n,o,i)}}xt.FetchResponseError=Si;const TH=async t=>{const e=cg(t);if(e)try{if(e==="text/plain")return await t.text();if(jB.test(e)){const r=await t.json();if(typeof r=="string")return r;if(typeof r=="object"&&r!=null){const n=(0,Ra.ifString)(r.error_description);if(n)return n;const i=(0,Ra.ifString)(r.error);if(i)return i;const o=(0,Ra.ifString)(r.message);if(o)return o}}}catch{}};async function kH(t,e=1/0){if(cg(t)!=="application/json")return;Ux(t,e);const n=t.clone();return(t.body&&e<1/0?new IB.TransformedResponse(n,new Ra.MaxBytesTransformStream(e)):n).json()}function Ux(t,e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");const r=OB(t);if(r!=null&&r>e)throw new Si(t,502,"Response too large");return r}function OB(t){const e=t.headers.get("Content-Length");if(e==null)return;if(!/^\d+$/.test(e))throw new Si(t,502,"Invalid Content-Length");const r=Number(e);if(!Number.isSafeInteger(r))throw new Si(t,502,"Content-Length too large");return r}function cg(t){const e=t.headers.get("Content-Type");if(e!=null)return e.split(";",1)[0].trim()}function Af(t,e=Ra.logCancellationError){return async r=>{try{return await t(r)}catch(n){throw await(0,Ra.cancelBody)(r,e??void 0),n}}}function PH(t){return Af(e=>UB(e,t))}async function UB(t,e){if(t.ok)return t;throw await Si.from(t,e)}function LH(t){if(t===1/0)return e=>e;if(!Number.isFinite(t)||t<0)throw new TypeError("maxBytes must be a 0, Infinity or a positive number");return Af(e=>$B(e,t))}function $B(t,e){if(e===1/0||(Ux(t,e),!t.body))return t;const r=new Ra.MaxBytesTransformStream(e);return new IB.TransformedResponse(t,r)}function VB(t,e=!0){const r=typeof t=="string"?n=>n===t:t instanceof RegExp?n=>t.test(n):t;return Af(n=>KB(n,r,e))}async function KB(t,e,r=!0){const n=cg(t);if(n){if(!e(n.toLowerCase()))throw await Si.from(t,`Unexpected response Content-Type (${n})`,502)}else if(r)throw await Si.from(t,"Missing response Content-Type header",502);return t}async function MB(t){try{const e=await t.json();return{response:t,json:e}}catch(e){throw new Si(t,502,"Unable to parse response as JSON",{cause:e})}}function DH(t=jB,e=!0){return(0,SH.pipe)(VB(t,e),Af(MB))}function NB(t,e){if("parseAsync"in t&&typeof t.parseAsync=="function")return async r=>t.parseAsync(r.json,e);if("parse"in t&&typeof t.parse=="function")return async r=>t.parse(r.json,e);throw new TypeError("Invalid schema")}xt.fetchJsonZodProcessor=NB;var lc={};Object.defineProperty(lc,"__esModule",{value:!0});lc.timedFetch=void 0;lc.loggedFetch=jH;lc.bindFetch=UH;const BH=Ox,$x=ac,IH=Rf,bh=sr;function jH({fetch:t=globalThis.fetch,logRequest:e=!0,logResponse:r=!0,logError:n=!0}){const i=e===!0?async a=>{const c=await(0,bh.stringifyMessage)(a);console.info(`> ${a.method} ${a.url}
${(0,bh.padLines)(c," ")}`)}:e||void 0,o=r===!0?async a=>{const c=await(0,bh.stringifyMessage)(a.clone());console.info(`< HTTP/1.1 ${a.status} ${a.statusText}
${(0,bh.padLines)(c," ")}`)}:r||void 0,s=n===!0?async a=>{console.error("< Error:",a)}:n||void 0;return!i&&!o&&!s?t:(0,$x.toRequestTransformer)(async function(a){i&&await i(a);try{const c=await t.call(this,a);return o&&await o(c,a),c}catch(c){throw s&&await s(c,a),c}})}const OH=(t=6e4,e=globalThis.fetch)=>{if(t===1/0)return e;if(!Number.isFinite(t)||t<=0)throw new TypeError("Timeout must be positive");return(0,$x.toRequestTransformer)(async function(r){var u,d;const n=new AbortController,i=n.signal,o=()=>{n.abort()},s=()=>{var f;clearTimeout(a),(f=r.signal)==null||f.removeEventListener("abort",o)},a=setTimeout(o,t);typeof a=="object"&&((u=a.unref)==null||u.call(a)),(d=r.signal)==null||d.addEventListener("abort",o),i.addEventListener("abort",s);const c=await e.call(this,r,{signal:i});if(c.body){const f=new TransformStream({flush:s});return new IH.TransformedResponse(c,f)}else return s(),c})};lc.timedFetch=OH;function UH(t=globalThis.fetch,e=globalThis){return(0,$x.toRequestTransformer)(async r=>{try{return await t.call(e,r)}catch(n){throw BH.FetchRequestError.from(r,n)}})}(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(sc,t),r(Ox,t),r(xt,t),r(lc,t),r(ac,t),r(sr,t)})(ki);Object.defineProperty(sg,"__esModule",{value:!0});sg.DidResolverBase=void 0;const $H=Z,Qs=Ps,lC=ki;class VH{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,r){var o;(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const n=(0,Qs.extractDidMethod)(e),i=this.methods.get(n);if(!i)throw new Qs.DidError(e,"Unsupported DID method","did-method-invalid",400);try{const s=await i.resolve(e,r);if(s.id!==e)throw new Qs.DidError(e,`DID document id (${s.id}) does not match DID`,"did-document-id-mismatch",400);return s}catch(s){if(s instanceof lC.FetchResponseError){const a=s.response.status>=500?502:s.response.status;throw new Qs.DidError(e,s.message,"did-fetch-error",a,s)}throw s instanceof lC.FetchError?new Qs.DidError(e,s.message,"did-fetch-error",400,s):s instanceof $H.ZodError?new Qs.DidError(e,s.message,"did-document-format-error",503,s):Qs.DidError.from(s,e)}}}sg.DidResolverBase=VH;var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});Sf.DidPlcMethod=void 0;const zB=Ps,im=ki,KH=ag,MH=(0,KH.pipe)((0,im.fetchOkProcessor)(),(0,im.fetchJsonProcessor)(/^application\/(did\+ld\+)?json$/),(0,im.fetchJsonZodProcessor)(zB.didDocumentValidator));class NH{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==null?void 0:e.plcDirectoryUrl)||"https://plc.directory/"),this.fetch=(0,im.bindFetch)(e==null?void 0:e.fetch)}async resolve(e,r){(0,zB.assertDidPlc)(e);const n=new URL(`/${encodeURIComponent(e)}`,this.plcDirectoryUrl);return this.fetch(n,{redirect:"error",headers:{accept:"application/did+ld+json,application/json"},signal:r==null?void 0:r.signal}).then(MH)}}Sf.DidPlcMethod=NH;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});cc.DidWebMethod=void 0;cc.buildDidWebDocumentUrl=FB;const Vx=Ps,om=ki,zH=ag,FH=(0,zH.pipe)((0,om.fetchOkProcessor)(),(0,om.fetchJsonProcessor)(/^application\/(did\+ld\+)?json$/),(0,om.fetchJsonZodProcessor)(Vx.didDocumentValidator));class qH{constructor({fetch:e=globalThis.fetch,allowHttp:r=!0}={}){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,om.bindFetch)(e),this.allowHttp=r}async resolve(e,r){const n=FB(e);if(!this.allowHttp&&n.protocol==="http:")throw new Vx.DidError(e,'Resolution of "http" did:web is not allowed',"did-web-http-not-allowed");return this.fetch(n,{redirect:"error",headers:{accept:"application/did+ld+json,application/json"},signal:r==null?void 0:r.signal}).then(FH)}}cc.DidWebMethod=qH;function FB(t){const e=(0,Vx.didWebToUrl)(t);return e.pathname==="/"?new URL("/.well-known/did.json",e):new URL(`${e.pathname}/did.json`,e)}Object.defineProperty(og,"__esModule",{value:!0});og.DidResolverCommon=void 0;const GH=sg,HH=Sf,WH=cc;class XH extends GH.DidResolverBase{constructor(e){super({plc:new HH.DidPlcMethod(e),web:new WH.DidWebMethod(e)})}}og.DidResolverCommon=XH;var qB={};Object.defineProperty(qB,"__esModule",{value:!0});var GB={};(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sf,t),r(cc,t)})(GB);var HB={};Object.defineProperty(HB,"__esModule",{value:!0});(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ps,t),r(_f,t),r(ng,t),r(kB,t),r(og,t),r(qB,t),r(GB,t),r(HB,t)})(Dx);var ug={},uc={};Object.defineProperty(uc,"__esModule",{value:!0});uc.isResolvedHandle=ZH;const JH=Ps;function ZH(t){return t===null||(0,JH.isAtprotoDid)(t)}var WB={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AppViewHandleResolver=t.xrpcErrorSchema=void 0;const e=Z,r=uc;t.xrpcErrorSchema=e.z.object({error:e.z.string(),message:e.z.string().optional()});class n{static from(o,s){return typeof o=="string"||o instanceof URL?new n(o,s):o}constructor(o,s){Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serviceUrl=new URL(o),this.fetch=(s==null?void 0:s.fetch)??globalThis.fetch}async resolve(o,s){const a=new URL("/xrpc/com.atproto.identity.resolveHandle",this.serviceUrl);a.searchParams.set("handle",o);const c=await this.fetch.call(null,a,{cache:s!=null&&s.noCache?"no-cache":void 0,signal:s==null?void 0:s.signal,redirect:"error"}),u=await c.json();if(c.status===400){const f=t.xrpcErrorSchema.parse(u);if(f.error==="InvalidRequest"&&f.message==="Unable to resolve handle")return null}if(!c.ok)throw new TypeError("Invalid response from resolveHandle method");const d=u==null?void 0:u.did;if(!(0,r.isResolvedHandle)(d))throw new TypeError("Invalid DID returned from resolveHandle method");return d}}t.AppViewHandleResolver=n})(WB);var dg={},Cf={},fg={};Object.defineProperty(fg,"__esModule",{value:!0});fg.DnsHandleResolver=void 0;const QH=uc,YH="_atproto",$v="did=";class e7{constructor(e){Object.defineProperty(this,"resolveTxt",{enumerable:!0,configurable:!0,writable:!0,value:e})}async resolve(e){const r=await this.resolveTxt.call(null,`${YH}.${e}`);if(!r)return null;for(let n=0;n<r.length;n++){if(!r[n].startsWith($v))continue;for(let o=n+1;o<r.length;o++)if(r[o].startsWith($v))return null;const i=r[n].slice($v.length);return(0,QH.isResolvedHandle)(i)?i:null}return null}}fg.DnsHandleResolver=e7;var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.WellKnownHandleResolver=void 0;const t7=uc;class r7{constructor(e){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(e==null?void 0:e.fetch)??globalThis.fetch}async resolve(e,r){var i;const n=new URL("/.well-known/atproto-did",`https://${e}`);try{const a=(await(await this.fetch.call(null,n,{cache:r!=null&&r.noCache?"no-cache":void 0,signal:r==null?void 0:r.signal,redirect:"error"})).text()).split(`
`)[0].trim();return(0,t7.isResolvedHandle)(a)?a:null}catch{return(i=r==null?void 0:r.signal)==null||i.throwIfAborted(),null}}}pg.WellKnownHandleResolver=r7;Object.defineProperty(Cf,"__esModule",{value:!0});Cf.AtprotoHandleResolver=void 0;const cC=fg,n7=pg,i7=()=>{};class o7{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 n7.WellKnownHandleResolver(e),this.dnsResolver=new cC.DnsHandleResolver(e.resolveTxt),this.dnsResolverFallback=e.resolveTxtFallback?new cC.DnsHandleResolver(e.resolveTxtFallback):void 0}async resolve(e,r){var s,a,c;(s=r==null?void 0:r.signal)==null||s.throwIfAborted();const n=new AbortController,{signal:i}=n;(a=r==null?void 0:r.signal)==null||a.addEventListener("abort",()=>n.abort(),{signal:i});const o={...r,signal:i};try{const u=this.dnsResolver.resolve(e,o),d=this.httpResolver.resolve(e,o);d.catch(i7);const f=await u;if(f)return f;i.throwIfAborted();const h=await d;return h||(i.throwIfAborted(),((c=this.dnsResolverFallback)==null?void 0:c.resolve(e,o))??null)}finally{n.abort()}}}Cf.AtprotoHandleResolver=o7;Object.defineProperty(dg,"__esModule",{value:!0});dg.AtprotoDohHandleResolver=void 0;const s7=Cf;class a7 extends s7.AtprotoHandleResolver{constructor(e){super({...e,resolveTxt:l7(e),resolveTxtFallback:void 0})}}dg.AtprotoDohHandleResolver=a7;function l7({dohEndpoint:t,fetch:e=globalThis.fetch}){return async r=>{var o,s,a;const n=new URL(t);n.searchParams.set("type","TXT"),n.searchParams.set("name",r);const i=await e(n,{method:"GET",headers:{accept:"application/dns-json"},redirect:"follow"});try{const c=(o=i.headers.get("content-type"))==null?void 0:o.trim();if(i.ok){if((c==null?void 0:c.match(/application\/(dns-)?json/i))==null)throw new TypeError("Unexpected response from DoH server")}else{const d=c!=null&&c.startsWith("text/plain")?await i.text():`Failed to resolve ${r}`;throw new TypeError(d)}return((s=d7(await i.json()).Answer)==null?void 0:s.filter(h7).map(m7))??null}finally{i.bodyUsed===!1&&((a=i.body)==null||a.cancel().catch(c7))}}}function c7(t){(!(t instanceof DOMException)||t.name!=="AbortError")&&console.error("An error occurred while cancelling the response body:",t)}function u7(t){return!(typeof t!="object"||t===null||!("Status"in t)||typeof t.Status!="number"||"Answer"in t&&!f7(t.Answer,p7))}function d7(t){if(u7(t))return t;throw new TypeError("Invalid DoH response")}function f7(t,e){return Array.isArray(t)&&t.every(e)}function p7(t){return typeof t=="object"&&t!==null&&"name"in t&&typeof t.name=="string"&&"type"in t&&typeof t.type=="number"&&"data"in t&&typeof t.data=="string"&&"TTL"in t&&typeof t.TTL=="number"}function h7(t){return t.type===16}function m7(t){return t.data.replace(/^"|"$/g,"").replace(/\\"/g,'"')}var hg={};Object.defineProperty(hg,"__esModule",{value:!0});hg.CachedHandleResolver=void 0;const y7=oc,g7=ic;class b7{constructor(e,r=new g7.SimpleStoreMemory({max:1e3,ttl:10*6e4})){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.getter=new y7.CachedGetter((n,i)=>e.resolve(n,i),r)}async resolve(e,r){return this.getter.get(e,r)}}hg.CachedHandleResolver=b7;(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(uc,t),r(WB,t),r(dg,t),r(Cf,t),r(hg,t)})(ug);var _n={},Tf={};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.CLIENT_ASSERTION_TYPE_JWT_BEARER=void 0;Tf.CLIENT_ASSERTION_TYPE_JWT_BEARER="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var Ao={},Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.numberPreprocess=Mr.jsonObjectPreprocess=void 0;Mr.isHostnameIP=v7;Mr.isLoopbackHost=XB;Mr.isLoopbackUrl=E7;Mr.safeUrl=w7;Mr.extractUrlPath=x7;function v7(t){return!!(t.match(/^\d+\.\d+\.\d+\.\d+$/)||t.startsWith("[")&&t.endsWith("]"))}function XB(t){return t==="localhost"||t==="127.0.0.1"||t==="[::1]"}function E7(t){const e=typeof t=="string"?new URL(t):t;return XB(e.hostname)}function w7(t){try{return new URL(t)}catch{return null}}function x7(t){const e=t.startsWith("https://")?8:t.startsWith("http://")?7:-1;if(e===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const r=t.indexOf("#",e),n=t.indexOf("?",e),i=n!==-1&&(r===-1||n<r)?n:-1,o=r===-1?i===-1?t.length:i:i===-1?r:Math.min(r,i),s=t.indexOf("/",e),a=s===-1||s>o?o:s;if(e===a)throw new TypeError("URL must contain a host");return t.substring(a,o)}const _7=t=>{if(typeof t=="string"&&t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t};Mr.jsonObjectPreprocess=_7;const R7=t=>{if(typeof t=="string"){const e=Number(t);if(!Number.isNaN(e))return e}return t};Mr.numberPreprocess=R7;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.privateUseUriSchema=t.webUriSchema=t.httpsUriSchema=t.loopbackUriSchema=t.dangerousUriSchema=void 0;const e=Z,r=Mr,n=URL.canParse??(i=>{try{return new URL(i),!0}catch{return!1}});t.dangerousUriSchema=e.z.string().refine(i=>i.includes(":")&&n(i),{message:"Invalid URL"}),t.loopbackUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{if(!i.startsWith("http://"))return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "http:" protocol'}),!1;const s=new URL(i);return(0,r.isLoopbackHost)(s.hostname)?!0:(o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),t.httpsUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{if(!i.startsWith("https://"))return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "https:" protocol'}),!1;const s=new URL(i);if((0,r.isLoopbackHost)(s.hostname))return o.addIssue({code:e.ZodIssueCode.custom,message:"https: URL must not use a loopback host"}),!1;if(!(0,r.isHostnameIP)(s.hostname)){if(!s.hostname.includes("."))return o.addIssue({code:e.ZodIssueCode.custom,message:"Domain name must contain at least two segments"}),!1;if(s.hostname.endsWith(".local"))return o.addIssue({code:e.ZodIssueCode.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),t.webUriSchema=e.z.string().superRefine((i,o)=>{if(i.startsWith("http://")){const s=t.loopbackUriSchema.safeParse(i);return s.success||s.error.issues.forEach(o.addIssue,o),s.success}if(i.startsWith("https://")){const s=t.httpsUriSchema.safeParse(i);return s.success||s.error.issues.forEach(o.addIssue,o),s.success}return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),t.privateUseUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{const s=i.indexOf("."),a=i.indexOf(":");if(s===-1||a===-1||s>a)return o.addIssue({code:e.ZodIssueCode.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const c=new URL(i);return c.protocol.includes(".")?c.hostname?(o.addIssue({code:e.ZodIssueCode.custom,message:'Private-use URI schemes must not include a hostname (only one "/" is allowed after the protocol, as per RFC 8252)'}),!1):!0:(o.addIssue({code:e.ZodIssueCode.custom,message:"Invalid private-use URI scheme"}),!1)})})(Ao);var Kx={},Ls={},So={};Object.defineProperty(So,"__esModule",{value:!0});So.oauthClientIdSchema=void 0;const A7=Z;So.oauthClientIdSchema=A7.z.string().min(1);var dc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthRedirectUriSchema=t.oauthPrivateUseRedirectURISchema=t.oauthHttpsRedirectURISchema=t.oauthLoopbackRedirectURISchema=void 0;const e=Z,r=Ao;t.oauthLoopbackRedirectURISchema=r.loopbackUriSchema.superRefine((n,i)=>n.startsWith("http://localhost")?(i.addIssue({code:e.ZodIssueCode.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),t.oauthHttpsRedirectURISchema=r.httpsUriSchema,t.oauthPrivateUseRedirectURISchema=r.privateUseUriSchema,t.oauthRedirectUriSchema=e.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)'})})(dc);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});Ma.oauthScopeSchema=void 0;const S7=Z;Ma.oauthScopeSchema=S7.z.string().regex(/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/);Object.defineProperty(Ls,"__esModule",{value:!0});Ls.oauthClientIdLoopbackSchema=void 0;Ls.isOAuthClientIdLoopback=L7;Ls.assertOAuthLoopbackClientId=JB;Ls.parseOAuthLoopbackClientId=Mx;const C7=Z,T7=So,k7=dc,P7=Ma,Ys="http://localhost";Ls.oauthClientIdLoopbackSchema=T7.oauthClientIdSchema.superRefine((t,e)=>{try{return JB(t),!0}catch(r){return e.addIssue({code:C7.ZodIssueCode.custom,message:r instanceof TypeError?r.message:"Invalid loopback client ID"}),!1}});function L7(t){try{return Mx(t),!0}catch{return!1}}function JB(t){Mx(t)}function Mx(t){if(t.startsWith(Ys)){if(t.includes("#",Ys.length))throw new TypeError("Loopback ClientID must not contain a hash component")}else throw new TypeError(`Loopback ClientID must start with "${Ys}"`);const e=t.length>Ys.length&&t[Ys.length]==="/"?Ys.length+1:Ys.length;if(t.length===e)return{};if(t[e]!=="?")throw new TypeError("Loopback ClientID must not contain a path component");const r=new URLSearchParams(t.slice(e+1));for(const o of r.keys())if(o!=="redirect_uri"&&o!=="scope")throw new TypeError(`Invalid query parameter "${o}" in client ID`);const n=r.get("scope")??void 0;if(n!=null){if(r.getAll("scope").length>1)throw new TypeError("Loopback ClientID must contain at most one scope query parameter");if(!P7.oauthScopeSchema.safeParse(n).success)throw new TypeError("Invalid scope query parameter in client ID")}const i=r.has("redirect_uri")?r.getAll("redirect_uri").map(o=>k7.oauthLoopbackRedirectURISchema.parse(o)):void 0;return{scope:n,redirect_uris:i}}Object.defineProperty(Kx,"__esModule",{value:!0});Kx.atprotoLoopbackClientMetadata=B7;const D7=Ls;function B7(t){const{scope:e="atproto",redirect_uris:r=["http://127.0.0.1/","http://[::1]/"]}=(0,D7.parseOAuthLoopbackClientId)(t);return{client_id:t,scope:e,redirect_uris:r,response_types:["code"],grant_types:["authorization_code","refresh_token"],token_endpoint_auth_method:"none",application_type:"native",dpop_bound_access_tokens:!0}}var kf={};Object.defineProperty(kf,"__esModule",{value:!0});kf.oauthAccessTokenSchema=void 0;const I7=Z;kf.oauthAccessTokenSchema=I7.z.string().min(1);var mg={};Object.defineProperty(mg,"__esModule",{value:!0});mg.oauthAuthenticationErrorResponseSchema=void 0;const j7=Z;mg.oauthAuthenticationErrorResponseSchema=j7.z.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0});Pf.oauthAuthorizationCodeGrantTokenRequestSchema=void 0;const vh=Z,O7=dc;Pf.oauthAuthorizationCodeGrantTokenRequestSchema=vh.z.object({grant_type:vh.z.literal("authorization_code"),code:vh.z.string().min(1),redirect_uri:O7.oauthRedirectUriSchema,code_verifier:vh.z.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()});var yg={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationDetailsSchema=t.oauthAuthorizationDetailSchema=void 0;const e=Z,r=Ao;t.oauthAuthorizationDetailSchema=e.z.object({type:e.z.string(),locations:e.z.array(r.dangerousUriSchema).optional(),actions:e.z.array(e.z.string()).optional(),datatypes:e.z.array(e.z.string()).optional(),identifier:e.z.string().optional(),privileges:e.z.array(e.z.string()).optional()}),t.oauthAuthorizationDetailsSchema=e.z.array(t.oauthAuthorizationDetailSchema)})(yg);var fc={};Object.defineProperty(fc,"__esModule",{value:!0});fc.oauthAuthorizationRequestJarSchema=void 0;const uC=Z,dC=_o;fc.oauthAuthorizationRequestJarSchema=uC.z.object({request:uC.z.union([dC.signedJwtSchema,dC.unsignedJwtSchema])});var gg={},pc={},Lf={};Object.defineProperty(Lf,"__esModule",{value:!0});Lf.oauthCodeChallengeMethodSchema=void 0;const U7=Z;Lf.oauthCodeChallengeMethodSchema=U7.z.enum(["S256","plain"]);var Df={};Object.defineProperty(Df,"__esModule",{value:!0});Df.oauthResponseModeSchema=void 0;const $7=Z;Df.oauthResponseModeSchema=$7.z.enum(["query","fragment","form_post"]);var hc={};Object.defineProperty(hc,"__esModule",{value:!0});hc.oauthResponseTypeSchema=void 0;const V7=Z;hc.oauthResponseTypeSchema=V7.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]);var Bf={};Object.defineProperty(Bf,"__esModule",{value:!0});Bf.oidcClaimsParameterSchema=void 0;const K7=Z;Bf.oidcClaimsParameterSchema=K7.z.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]);var If={};Object.defineProperty(If,"__esModule",{value:!0});If.oidcClaimsPropertiesSchema=void 0;const ya=Z,fC=ya.z.union([ya.z.string(),ya.z.number(),ya.z.boolean()]);If.oidcClaimsPropertiesSchema=ya.z.object({essential:ya.z.boolean().optional(),value:fC.optional(),values:ya.z.array(fC).optional()});var jf={};Object.defineProperty(jf,"__esModule",{value:!0});jf.oidcEntityTypeSchema=void 0;const M7=Z;jf.oidcEntityTypeSchema=M7.z.enum(["userinfo","id_token"]);Object.defineProperty(pc,"__esModule",{value:!0});pc.oauthAuthorizationRequestParametersSchema=void 0;const qt=Z,N7=_o,z7=yg,F7=So,q7=Lf,G7=dc,H7=Df,W7=hc,X7=Ma,J7=Bf,Z7=If,Q7=jf,Vv=Mr;pc.oauthAuthorizationRequestParametersSchema=qt.z.object({client_id:F7.oauthClientIdSchema,state:qt.z.string().optional(),redirect_uri:G7.oauthRedirectUriSchema.optional(),scope:X7.oauthScopeSchema.optional(),response_type:W7.oauthResponseTypeSchema,code_challenge:qt.z.string().optional(),code_challenge_method:q7.oauthCodeChallengeMethodSchema.default("S256").optional(),dpop_jkt:qt.z.string().optional(),response_mode:H7.oauthResponseModeSchema.optional(),nonce:qt.z.string().optional(),max_age:qt.z.preprocess(Vv.numberPreprocess,qt.z.number().int().min(0)).optional(),claims:qt.z.preprocess(Vv.jsonObjectPreprocess,qt.z.record(Q7.oidcEntityTypeSchema,qt.z.record(J7.oidcClaimsParameterSchema,qt.z.union([qt.z.literal(null),Z7.oidcClaimsPropertiesSchema])))).optional(),login_hint:qt.z.string().min(1).optional(),ui_locales:qt.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:N7.signedJwtSchema.optional(),display:qt.z.enum(["page","popup","touch","wap"]).optional(),prompt:qt.z.enum(["none","login","consent","select_account"]).optional(),authorization_details:qt.z.preprocess(Vv.jsonObjectPreprocess,z7.oauthAuthorizationDetailsSchema).optional()});Object.defineProperty(gg,"__esModule",{value:!0});gg.oauthAuthorizationRequestParSchema=void 0;const Y7=Z,eW=fc,tW=pc;gg.oauthAuthorizationRequestParSchema=Y7.z.union([tW.oauthAuthorizationRequestParametersSchema,eW.oauthAuthorizationRequestJarSchema]);var bg={},Of={},Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});Uf.oauthRequestUriSchema=void 0;const rW=Z;Uf.oauthRequestUriSchema=rW.z.string();Object.defineProperty(Of,"__esModule",{value:!0});Of.oauthAuthorizationRequestUriSchema=void 0;const nW=Z,iW=Uf;Of.oauthAuthorizationRequestUriSchema=nW.z.object({request_uri:iW.oauthRequestUriSchema});Object.defineProperty(bg,"__esModule",{value:!0});bg.oauthAuthorizationRequestQuerySchema=void 0;const oW=Z,sW=fc,aW=pc,lW=Of;bg.oauthAuthorizationRequestQuerySchema=oW.z.union([aW.oauthAuthorizationRequestParametersSchema,sW.oauthAuthorizationRequestJarSchema,lW.oauthAuthorizationRequestUriSchema]);var ZB={},mc={};Object.defineProperty(mc,"__esModule",{value:!0});mc.oauthIssuerIdentifierSchema=void 0;const Eh=Z,cW=Ao;mc.oauthIssuerIdentifierSchema=cW.webUriSchema.superRefine((t,e)=>{if(t.endsWith("/"))return e.addIssue({code:Eh.z.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const r=new URL(t);if(r.username||r.password)return e.addIssue({code:Eh.z.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(r.hash||r.search)return e.addIssue({code:Eh.z.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const n=r.pathname==="/"?r.origin:r.href;return t!==n?(e.addIssue({code:Eh.z.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0});(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema=void 0;const e=Z,r=Lf,n=mc,i=Ao;t.oauthAuthorizationServerMetadataSchema=e.z.object({issuer:n.oauthIssuerIdentifierSchema,claims_supported:e.z.array(e.z.string()).optional(),claims_locales_supported:e.z.array(e.z.string()).optional(),claims_parameter_supported:e.z.boolean().optional(),request_parameter_supported:e.z.boolean().optional(),request_uri_parameter_supported:e.z.boolean().optional(),require_request_uri_registration:e.z.boolean().optional(),scopes_supported:e.z.array(e.z.string()).optional(),subject_types_supported:e.z.array(e.z.string()).optional(),response_types_supported:e.z.array(e.z.string()).optional(),response_modes_supported:e.z.array(e.z.string()).optional(),grant_types_supported:e.z.array(e.z.string()).optional(),code_challenge_methods_supported:e.z.array(r.oauthCodeChallengeMethodSchema).min(1).optional(),ui_locales_supported:e.z.array(e.z.string()).optional(),id_token_signing_alg_values_supported:e.z.array(e.z.string()).optional(),display_values_supported:e.z.array(e.z.string()).optional(),request_object_signing_alg_values_supported:e.z.array(e.z.string()).optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional(),authorization_details_types_supported:e.z.array(e.z.string()).optional(),request_object_encryption_alg_values_supported:e.z.array(e.z.string()).optional(),request_object_encryption_enc_values_supported:e.z.array(e.z.string()).optional(),jwks_uri:i.webUriSchema.optional(),authorization_endpoint:i.webUriSchema,token_endpoint:i.webUriSchema,token_endpoint_auth_methods_supported:e.z.array(e.z.string()).optional(),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string()).optional(),revocation_endpoint:i.webUriSchema.optional(),introspection_endpoint:i.webUriSchema.optional(),pushed_authorization_request_endpoint:i.webUriSchema.optional(),require_pushed_authorization_requests:e.z.boolean().optional(),userinfo_endpoint:i.webUriSchema.optional(),end_session_endpoint:i.webUriSchema.optional(),registration_endpoint:i.webUriSchema.optional(),dpop_signing_alg_values_supported:e.z.array(e.z.string()).optional(),protected_resources:e.z.array(i.webUriSchema).optional(),client_id_metadata_document_supported:e.z.boolean().optional()}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema.superRefine((o,s)=>{o.require_pushed_authorization_requests&&!o.pushed_authorization_request_endpoint&&s.addIssue({code:e.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})}).superRefine((o,s)=>{o.response_types_supported&&(o.response_types_supported.includes("code")||s.addIssue({code:e.z.ZodIssueCode.custom,message:'Response type "code" is required'}))})})(ZB);var $f={};Object.defineProperty($f,"__esModule",{value:!0});$f.oauthClientCredentialsGrantTokenRequestSchema=void 0;const pC=Z;$f.oauthClientCredentialsGrantTokenRequestSchema=pC.z.object({grant_type:pC.z.literal("client_credentials")});var QB={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthClientCredentialsSchema=t.oauthClientCredentialsNoneSchema=t.oauthClientCredentialsSecretPostSchema=t.oauthClientCredentialsJwtBearerSchema=void 0;const e=Z,r=_o,n=Tf,i=So;t.oauthClientCredentialsJwtBearerSchema=e.z.object({client_id:i.oauthClientIdSchema,client_assertion_type:e.z.literal(n.CLIENT_ASSERTION_TYPE_JWT_BEARER),client_assertion:r.signedJwtSchema}),t.oauthClientCredentialsSecretPostSchema=e.z.object({client_id:i.oauthClientIdSchema,client_secret:e.z.string()}),t.oauthClientCredentialsNoneSchema=e.z.object({client_id:i.oauthClientIdSchema}),t.oauthClientCredentialsSchema=e.z.union([t.oauthClientCredentialsJwtBearerSchema,t.oauthClientCredentialsSecretPostSchema,t.oauthClientCredentialsNoneSchema])})(QB);var YB={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema=void 0,t.isOAuthClientIdDiscoverable=o,t.isConventionalOAuthClientId=s,t.assertOAuthDiscoverableClientId=a,t.parseOAuthDiscoverableClientId=c;const e=Z,r=So,n=Ao,i=Mr;t.oauthClientIdDiscoverableSchema=e.z.intersection(r.oauthClientIdSchema,n.httpsUriSchema).superRefine((u,d)=>{const f=new URL(u);return f.username||f.password?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):f.hash?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):f.pathname==="/"?(d.addIssue({code:e.z.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):f.pathname.endsWith("/")?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):(0,i.isHostnameIP)(f.hostname)?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):(0,i.extractUrlPath)(u)!==f.pathname?(d.addIssue({code:e.z.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${f.href}", got "${u}")`}),!1):!0});function o(u){return t.oauthClientIdDiscoverableSchema.safeParse(u).success}t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema.superRefine((u,d)=>{const f=new URL(u);return f.port?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):f.search?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):f.pathname!=="/oauth-client-metadata.json"?(d.addIssue({code:e.z.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function s(u){return t.conventionalOAuthClientIdSchema.safeParse(u).success}function a(u){t.oauthClientIdDiscoverableSchema.parse(u)}function c(u){return new URL(t.oauthClientIdDiscoverableSchema.parse(u))}})(YB);var vg={},Vf={};Object.defineProperty(Vf,"__esModule",{value:!0});Vf.oauthEndpointAuthMethod=void 0;const uW=Z;Vf.oauthEndpointAuthMethod=uW.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]);var Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});Kf.oauthGrantTypeSchema=void 0;const dW=Z;Kf.oauthGrantTypeSchema=dW.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"]);Object.defineProperty(vg,"__esModule",{value:!0});vg.oauthClientMetadataSchema=void 0;const rt=Z,fW=_o,pW=So,hW=Vf,mW=Kf,yW=dc,gW=hc,bW=Ma,Bu=Ao;vg.oauthClientMetadataSchema=rt.z.object({redirect_uris:rt.z.array(yW.oauthRedirectUriSchema).nonempty(),response_types:rt.z.array(gW.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:rt.z.array(mW.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:bW.oauthScopeSchema.optional(),token_endpoint_auth_method:hW.oauthEndpointAuthMethod.default("none").optional(),token_endpoint_auth_signing_alg:rt.z.string().optional(),userinfo_signed_response_alg:rt.z.string().optional(),userinfo_encrypted_response_alg:rt.z.string().optional(),jwks_uri:Bu.webUriSchema.optional(),jwks:fW.jwksPubSchema.optional(),application_type:rt.z.enum(["web","native"]).default("web").optional(),subject_type:rt.z.enum(["public","pairwise"]).default("public").optional(),request_object_signing_alg:rt.z.string().optional(),id_token_signed_response_alg:rt.z.string().optional(),authorization_signed_response_alg:rt.z.string().default("RS256").optional(),authorization_encrypted_response_enc:rt.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:rt.z.string().optional(),client_id:pW.oauthClientIdSchema.optional(),client_name:rt.z.string().optional(),client_uri:Bu.webUriSchema.optional(),policy_uri:Bu.webUriSchema.optional(),tos_uri:Bu.webUriSchema.optional(),logo_uri:Bu.webUriSchema.optional(),default_max_age:rt.z.number().optional(),require_auth_time:rt.z.boolean().optional(),contacts:rt.z.array(rt.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:rt.z.boolean().optional(),dpop_bound_access_tokens:rt.z.boolean().optional(),authorization_details_types:rt.z.array(rt.z.string()).optional()});var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0});Eg.OAUTH_ENDPOINT_NAMES=void 0;Eg.OAUTH_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"];var eI={};Object.defineProperty(eI,"__esModule",{value:!0});var wg={};Object.defineProperty(wg,"__esModule",{value:!0});wg.oauthParResponseSchema=void 0;const Kv=Z;wg.oauthParResponseSchema=Kv.z.object({request_uri:Kv.z.string(),expires_in:Kv.z.number().int().positive()});var Mf={};Object.defineProperty(Mf,"__esModule",{value:!0});Mf.oauthPasswordGrantTokenRequestSchema=void 0;const wh=Z;Mf.oauthPasswordGrantTokenRequestSchema=wh.z.object({grant_type:wh.z.literal("password"),username:wh.z.string(),password:wh.z.string()});var xg={};Object.defineProperty(xg,"__esModule",{value:!0});xg.oauthProtectedResourceMetadataSchema=void 0;const ko=Z,vW=mc,Iu=Ao;xg.oauthProtectedResourceMetadataSchema=ko.z.object({resource:Iu.webUriSchema.refine(t=>!t.includes("?"),{message:"Resource URL must not contain query parameters"}).refine(t=>!t.includes("#"),{message:"Resource URL must not contain a fragment"}),authorization_servers:ko.z.array(vW.oauthIssuerIdentifierSchema).optional(),jwks_uri:Iu.webUriSchema.optional(),scopes_supported:ko.z.array(ko.z.string()).optional(),bearer_methods_supported:ko.z.array(ko.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:ko.z.array(ko.z.string()).optional(),resource_documentation:Iu.webUriSchema.optional(),resource_policy_uri:Iu.webUriSchema.optional(),resource_tos_uri:Iu.webUriSchema.optional()});var Nf={},yc={};Object.defineProperty(yc,"__esModule",{value:!0});yc.oauthRefreshTokenSchema=void 0;const EW=Z;yc.oauthRefreshTokenSchema=EW.z.string().min(1);Object.defineProperty(Nf,"__esModule",{value:!0});Nf.oauthRefreshTokenGrantTokenRequestSchema=void 0;const hC=Z,wW=yc;Nf.oauthRefreshTokenGrantTokenRequestSchema=hC.z.object({grant_type:hC.z.literal("refresh_token"),refresh_token:wW.oauthRefreshTokenSchema});var _g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.oauthTokenIdentificationSchema=void 0;const Mv=Z,xW=kf,_W=yc;_g.oauthTokenIdentificationSchema=Mv.z.object({token:Mv.z.union([xW.oauthAccessTokenSchema,_W.oauthRefreshTokenSchema]),token_type_hint:Mv.z.enum(["access_token","refresh_token"]).optional()});var Rg={};Object.defineProperty(Rg,"__esModule",{value:!0});Rg.oauthTokenRequestSchema=void 0;const RW=Z,AW=Pf,SW=$f,CW=Mf,TW=Nf;Rg.oauthTokenRequestSchema=RW.z.discriminatedUnion("grant_type",[AW.oauthAuthorizationCodeGrantTokenRequestSchema,TW.oauthRefreshTokenGrantTokenRequestSchema,CW.oauthPasswordGrantTokenRequestSchema,SW.oauthClientCredentialsGrantTokenRequestSchema]);var Ag={},zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.oauthTokenTypeSchema=void 0;const Nv=Z;zf.oauthTokenTypeSchema=Nv.z.union([Nv.z.string().regex(/^DPoP$/i).transform(()=>"DPoP"),Nv.z.string().regex(/^Bearer$/i).transform(()=>"Bearer")]);Object.defineProperty(Ag,"__esModule",{value:!0});Ag.oauthTokenResponseSchema=void 0;const ju=Z,kW=_o,PW=yg,LW=zf;Ag.oauthTokenResponseSchema=ju.z.object({access_token:ju.z.string(),token_type:LW.oauthTokenTypeSchema,scope:ju.z.string().optional(),refresh_token:ju.z.string().optional(),expires_in:ju.z.number().optional(),id_token:kW.signedJwtSchema.optional(),authorization_details:PW.oauthAuthorizationDetailsSchema.optional()}).passthrough();var Sg={};Object.defineProperty(Sg,"__esModule",{value:!0});Sg.oidcAuthenticationErrorResponseSchema=void 0;const DW=Z;Sg.oidcAuthenticationErrorResponseSchema=DW.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"]);var Cg={};Object.defineProperty(Cg,"__esModule",{value:!0});Cg.oidcUserinfoSchema=void 0;const ln=Z;Cg.oidcUserinfoSchema=ln.z.object({sub:ln.z.string(),iss:ln.z.string().url().optional(),aud:ln.z.union([ln.z.string(),ln.z.array(ln.z.string()).min(1)]).optional(),email:ln.z.string().email().optional(),email_verified:ln.z.boolean().optional(),name:ln.z.string().optional(),preferred_username:ln.z.string().optional(),picture:ln.z.string().url().optional()});(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tf,t),r(Ao,t),r(Mr,t),r(Kx,t),r(kf,t),r(mg,t),r(Pf,t),r(yg,t),r(fc,t),r(gg,t),r(pc,t),r(bg,t),r(Of,t),r(ZB,t),r($f,t),r(QB,t),r(YB,t),r(Ls,t),r(So,t),r(vg,t),r(Vf,t),r(Eg,t),r(Kf,t),r(eI,t),r(mc,t),r(wg,t),r(Mf,t),r(xg,t),r(dc,t),r(Nf,t),r(yc,t),r(Uf,t),r(Df,t),r(hc,t),r(Ma,t),r(_g,t),r(Rg,t),r(Ag,t),r(zf,t),r(Sg,t),r(Bf,t),r(If,t),r(jf,t),r(Cg,t)})(_n);var Ff={},Ds={};(function(t){var e=C&&C.__classPrivateFieldSet||function(u,d,f,h,m){if(h==="m")throw new TypeError("Private method is not writable");if(h==="a"&&!m)throw new TypeError("Private accessor was defined without a setter");if(typeof d=="function"?u!==d||!m:!d.has(u))throw new TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?m.call(u,f):m?m.value=f:d.set(u,f),f},r=C&&C.__classPrivateFieldGet||function(u,d,f,h){if(f==="a"&&!h)throw new TypeError("Private accessor was defined without a getter");if(typeof d=="function"?u!==d||!h:!d.has(u))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?h:f==="a"?h.call(u):h?h.value:d.get(u)};Object.defineProperty(t,"__esModule",{value:!0}),t.includesSpaceSeparatedValue=t.CustomEventTarget=t.CustomEvent=t.timeoutSignal=t.ifString=void 0,t.contentMime=o,t.combineSignals=c,Symbol.dispose??(Symbol.dispose=Symbol("@@dispose"));const n=u=>typeof u=="string"?u:void 0;t.ifString=n;const i=(u,d)=>{var g,v,w;if(!Number.isInteger(u)||u<0)throw new TypeError("Expected a positive integer");(g=d==null?void 0:d.signal)==null||g.throwIfAborted();const f=new AbortController,{signal:h}=f;(v=d==null?void 0:d.signal)==null||v.addEventListener("abort",y=>f.abort(y),{once:!0,signal:h});const m=setTimeout(y=>f.abort(y),u,new Error("Timeout"));return(w=m==null?void 0:m.unref)==null||w.call(m),h.addEventListener("abort",()=>clearTimeout(m),{once:!0,signal:h}),Object.defineProperty(h,Symbol.dispose,{value:()=>f.abort()}),h};t.timeoutSignal=i;function o(u){var d;return(d=u.get("content-type"))==null?void 0:d.split(";")[0].trim()}t.CustomEvent=globalThis.CustomEvent??(()=>{var u;class d extends Event{constructor(h,m){if(!arguments.length)throw new TypeError("type argument is required");super(h,m),u.set(this,void 0),e(this,u,(m==null?void 0:m.detail)??null,"f")}get detail(){return r(this,u,"f")}}return u=new WeakMap,Object.defineProperties(d.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:"CustomEvent"},detail:{enumerable:!0}}),d})();class s{constructor(){Object.defineProperty(this,"eventTarget",{enumerable:!0,configurable:!0,writable:!0,value:new EventTarget})}addEventListener(d,f,h){this.eventTarget.addEventListener(d,f,h)}removeEventListener(d,f,h){this.eventTarget.removeEventListener(d,f,h)}dispatchCustomEvent(d,f,h){return this.eventTarget.dispatchEvent(new t.CustomEvent(d,{...h,detail:f}))}}t.CustomEventTarget=s;const a=(u,d)=>{if(d.length===0)throw new TypeError("Value cannot be empty");if(d.includes(" "))throw new TypeError("Value cannot contain spaces");const f=u.length,h=d.length;if(f<h)return!1;let m=u.indexOf(d),g;for(;m!==-1;){if(g=m+h,(m===0||u[m-1]===" ")&&(g===f||u[g]===" "))return!0;m=u.indexOf(d,g+1)}return!1};t.includesSpaceSeparatedValue=a;function c(u){const d=new AbortController,f=function(h){const m=new Error("This operation was aborted",{cause:this.reason});d.abort(m)};for(const h of u)if(h){if(h.aborted)throw d.abort(),new Error("One of the signals is already aborted",{cause:h.reason});h.addEventListener("abort",f,{signal:d.signal})}return d[Symbol.dispose]=()=>{const h=new Error("AbortController was disposed");d.abort(h)},d}})(Ds);Object.defineProperty(Ff,"__esModule",{value:!0});Ff.OAuthAuthorizationServerMetadataResolver=void 0;const mC=_n,Ou=ki,BW=oc,IW=Ds;class jW extends BW.CachedGetter{constructor(e,r,n){super(async(i,o)=>this.fetchMetadata(i,o),e),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttpIssuer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,Ou.bindFetch)(r),this.allowHttpIssuer=(n==null?void 0:n.allowHttpIssuer)===!0}async get(e,r){const n=mC.oauthIssuerIdentifierSchema.parse(e);if(!this.allowHttpIssuer&&n.startsWith("http:"))throw new TypeError("Unsecure issuer URL protocol only allowed in development and test environments");return super.get(n,r)}async fetchMetadata(e,r){const n=new URL("/.well-known/oauth-authorization-server",e),i=new Request(n,{headers:{accept:"application/json"},cache:r!=null&&r.noCache?"no-cache":void 0,signal:r==null?void 0:r.signal,redirect:"manual"}),o=await this.fetch(i);if(o.status!==200)throw await(0,Ou.cancelBody)(o,"log"),await Ou.FetchResponseError.from(o,`Unexpected status code ${o.status} for "${n}"`,void 0,{cause:i});if((0,IW.contentMime)(o.headers)!=="application/json")throw await(0,Ou.cancelBody)(o,"log"),await Ou.FetchResponseError.from(o,`Unexpected content type for "${n}"`,void 0,{cause:i});const s=mC.oauthAuthorizationServerMetadataValidator.parse(await o.json());if(s.issuer!==e)throw new TypeError(`Invalid issuer ${s.issuer}`);if(s.client_id_metadata_document_supported!==!0)throw new TypeError(`Authorization server "${e}" does not support client_id_metadata_document`);return s}}Ff.OAuthAuthorizationServerMetadataResolver=jW;var qf={};Object.defineProperty(qf,"__esModule",{value:!0});qf.OAuthCallbackError=void 0;class ty extends Error{static from(e,r,n){if(e instanceof ty)return e;const i=e instanceof Error?e.message:void 0;return new ty(r,i,n,e)}constructor(e,r=e.get("error_description")||"OAuth callback error",n,i){super(r,{cause:i}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:n})}}qf.OAuthCallbackError=ty;var Tg={},tI={},kg={},Bs={},Nx={};(function(t){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"];const e=f=>{if(!/^[a-zA-Z0-9.-]*$/.test(f))throw new a("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(f.length>253)throw new a("Handle is too long (253 chars max)");const h=f.split(".");if(h.length<2)throw new a("Handle domain needs at least two parts");for(let m=0;m<h.length;m++){const g=h[m];if(g.length<1)throw new a("Handle parts can not be empty");if(g.length>63)throw new a("Handle part too long (max 63 chars)");if(g.endsWith("-")||g.startsWith("-"))throw new a("Handle parts can not start or end with hyphens");if(m+1===h.length&&!/^[a-zA-Z]/.test(g))throw new a("Handle final component (TLD) must start with ASCII letter")}};t.ensureValidHandle=e;const r=f=>{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(f))throw new a("Handle didn't validate via regex");if(f.length>253)throw new a("Handle is too long (253 chars max)")};t.ensureValidHandleRegex=r;const n=f=>f.toLowerCase();t.normalizeHandle=n;const i=f=>{const h=(0,t.normalizeHandle)(f);return(0,t.ensureValidHandle)(h),h};t.normalizeAndEnsureValidHandle=i;const o=f=>{try{(0,t.ensureValidHandle)(f)}catch(h){if(h instanceof a)return!1;throw h}return!0};t.isValidHandle=o;const s=f=>!t.DISALLOWED_TLDS.some(h=>f.endsWith(h));t.isValidTld=s;class a extends Error{}t.InvalidHandleError=a;class c extends Error{}t.ReservedHandleError=c;class u extends Error{}t.UnsupportedDomainError=u;class d extends Error{}t.DisallowedDomainError=d})(Nx);var lo={};Object.defineProperty(lo,"__esModule",{value:!0});lo.InvalidDidError=lo.ensureValidDidRegex=lo.ensureValidDid=void 0;const OW=t=>{if(!t.startsWith("did:"))throw new Qi('DID requires "did:" prefix');if(!/^[a-zA-Z0-9._:%-]*$/.test(t))throw new Qi("Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)");const{length:e,1:r}=t.split(":");if(e<3)throw new Qi("DID requires prefix, method, and method-specific content");if(!/^[a-z]+$/.test(r))throw new Qi("DID method must be lower-case letters");if(t.endsWith(":")||t.endsWith("%"))throw new Qi('DID can not end with ":" or "%"');if(t.length>2*1024)throw new Qi("DID is too long (2048 chars max)")};lo.ensureValidDid=OW;const UW=t=>{if(!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(t))throw new Qi("DID didn't validate via regex");if(t.length>2*1024)throw new Qi("DID is too long (2048 chars max)")};lo.ensureValidDidRegex=UW;class Qi extends Error{}lo.InvalidDidError=Qi;var zx={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNsidError=t.ensureValidNsidRegex=t.ensureValidNsid=t.NSID=void 0;class e{static parse(s){return new e(s)}static create(s,a){const c=[...s.split(".").reverse(),a].join(".");return new e(c)}static isValid(s){try{return e.parse(s),!0}catch{return!1}}constructor(s){Object.defineProperty(this,"segments",{enumerable:!0,configurable:!0,writable:!0,value:[]}),(0,t.ensureValidNsid)(s),this.segments=s.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=e;const r=o=>{const s=o;if(!/^[a-zA-Z0-9.-]*$/.test(s))throw new i("Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)");if(s.length>317)throw new i("NSID is too long (317 chars max)");const a=s.split(".");if(a.length<3)throw new i("NSID needs at least three parts");for(let c=0;c<a.length;c++){const u=a[c];if(u.length<1)throw new i("NSID parts can not be empty");if(u.length>63)throw new i("NSID part too long (max 63 chars)");if(u.endsWith("-")||u.startsWith("-"))throw new i("NSID parts can not start or end with hyphen");if(/^[0-9]/.test(u)&&c===0)throw new i("NSID first part may not start with a digit");if(!/^[a-zA-Z][a-zA-Z0-9]*$/.test(u)&&c+1===a.length)throw new i("NSID name part must be only letters and digits (and no leading digit)")}};t.ensureValidNsid=r;const n=o=>{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(o))throw new i("NSID didn't validate via regex");if(o.length>317)throw new i("NSID is too long (317 chars max)")};t.ensureValidNsidRegex=n;class i extends Error{}t.InvalidNsidError=i})(zx);var rI={},Gl={};Object.defineProperty(Gl,"__esModule",{value:!0});Gl.ensureValidAtUriRegex=Gl.ensureValidAtUri=void 0;const nI=lo,iI=Nx,oI=zx,$W=t=>{const e=t.split("#");if(e.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const r=e[1]||null;if(t=e[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(t))throw new Error("Disallowed characters in ATURI (ASCII)");const n=t.split("/");if(n.length>=3&&(n[0]!=="at:"||n[1].length!==0))throw new Error('ATURI must start with "at://"');if(n.length<3)throw new Error("ATURI requires at least method and authority sections");try{n[2].startsWith("did:")?(0,nI.ensureValidDid)(n[2]):(0,iI.ensureValidHandle)(n[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(n.length>=4){if(n[3].length===0)throw new Error("ATURI can not have a slash after authority without a path segment");try{(0,oI.ensureValidNsid)(n[3])}catch{throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}}if(n.length>=5&&n[4].length===0)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(n.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(e.length>=2&&r==null)throw new Error("ATURI fragment must be non-empty and start with slash");if(r!=null){if(r.length===0||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(t.length>8*1024)throw new Error("ATURI is far too long")};Gl.ensureValidAtUri=$W;const VW=t=>{const e=/^at:\/\/(?<authority>[a-zA-Z0-9._:%-]+)(\/(?<collection>[a-zA-Z0-9-.]+)(\/(?<rkey>[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?<fragment>\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/,r=t.match(e);if(!r||!r.groups)throw new Error("ATURI didn't validate via regex");const n=r.groups;try{(0,iI.ensureValidHandleRegex)(n.authority)}catch{try{(0,nI.ensureValidDidRegex)(n.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(n.collection)try{(0,oI.ensureValidNsidRegex)(n.collection)}catch{throw new Error("ATURI collection path segment must be a valid NSID")}if(t.length>8*1024)throw new Error("ATURI is far too long")};Gl.ensureValidAtUriRegex=VW;(function(t){var e=C&&C.__createBinding||(Object.create?function(a,c,u,d){d===void 0&&(d=u);var f=Object.getOwnPropertyDescriptor(c,u);(!f||("get"in f?!c.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(a,d,f)}:function(a,c,u,d){d===void 0&&(d=u),a[d]=c[u]}),r=C&&C.__exportStar||function(a,c){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&e(c,a,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.AtUri=t.ATP_URI_REGEX=void 0,r(Gl,t),t.ATP_URI_REGEX=/^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;const n=/^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;class i{constructor(c,u){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});let d;if(u){if(d=o(u),!d)throw new Error(`Invalid at uri: ${u}`);const f=s(c);if(!f)throw new Error(`Invalid path: ${c}`);Object.assign(d,f)}else if(d=o(c),!d)throw new Error(`Invalid at uri: ${c}`);this.hash=d.hash,this.host=d.host,this.pathname=d.pathname,this.searchParams=d.searchParams}static make(c,u,d){let f=c;return u&&(f+="/"+u),d&&(f+="/"+d),new i(f)}get protocol(){return"at:"}get origin(){return`at://${this.host}`}get hostname(){return this.host}set hostname(c){this.host=c}get search(){return this.searchParams.toString()}set search(c){this.searchParams=new URLSearchParams(c)}get collection(){return this.pathname.split("/").filter(Boolean)[0]||""}set collection(c){const u=this.pathname.split("/").filter(Boolean);u[0]=c,this.pathname=u.join("/")}get rkey(){return this.pathname.split("/").filter(Boolean)[1]||""}set rkey(c){const u=this.pathname.split("/").filter(Boolean);u[0]||(u[0]="undefined"),u[1]=c,this.pathname=u.join("/")}get href(){return this.toString()}toString(){let c=this.pathname||"/";c.startsWith("/")||(c=`/${c}`);let u=this.searchParams.toString();u&&!u.startsWith("?")&&(u=`?${u}`);let d=this.hash;return d&&!d.startsWith("#")&&(d=`#${d}`),`at://${this.host}${c}${u}${d}`}}t.AtUri=i;function o(a){const c=t.ATP_URI_REGEX.exec(a);if(c)return{hash:c[5]||"",host:c[2]||"",pathname:c[3]||"",searchParams:new URLSearchParams(c[4]||"")}}function s(a){const c=n.exec(a);if(c)return{hash:c[3]||"",pathname:c[1]||"",searchParams:new URLSearchParams(c[2]||"")}}})(rI);var ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.InvalidTidError=ss.isValidTid=ss.ensureValidTid=void 0;const UE=13,sI=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/,KW=t=>{if(t.length!==UE)throw new $E(`TID must be ${UE} characters`);if(!sI.test(t))throw new $E("TID syntax not valid (regex)")};ss.ensureValidTid=KW;const MW=t=>t.length===UE&&sI.test(t);ss.isValidTid=MW;class $E extends Error{}ss.InvalidTidError=$E;var aI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidRecordKeyError=t.isValidRecordKey=t.ensureValidRecordKey=void 0;const e=i=>{if(i.length>512||i.length<1)throw new n("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(i))throw new n("record key syntax not valid (regex)");if(i==="."||i==="..")throw new n('record key can not be "." or ".."')};t.ensureValidRecordKey=e;const r=i=>{try{(0,t.ensureValidRecordKey)(i)}catch(o){if(o instanceof n)return!1;throw o}return!0};t.isValidRecordKey=r;class n extends Error{}t.InvalidRecordKeyError=n})(aI);var lI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDatetimeError=t.normalizeDatetimeAlways=t.normalizeDatetime=t.isValidDatetime=t.ensureValidDatetime=void 0;const e=s=>{const a=new Date(s);if(isNaN(a.getTime()))throw new o("datetime did not parse as ISO 8601");if(a.toISOString().startsWith("-"))throw new o("datetime normalized to a negative time");if(!/^[0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](.[0-9]{1,20})?(Z|([+-][0-2][0-9]:[0-5][0-9]))$/.test(s))throw new o("datetime didn't validate via regex");if(s.length>64)throw new o("datetime is too long (64 chars max)");if(s.endsWith("-00:00"))throw new o('datetime can not use "-00:00" for UTC timezone');if(s.startsWith("000"))throw new o("datetime so close to year zero not allowed")};t.ensureValidDatetime=e;const r=s=>{try{(0,t.ensureValidDatetime)(s)}catch(a){if(a instanceof o)return!1;throw a}return!0};t.isValidDatetime=r;const n=s=>{if((0,t.isValidDatetime)(s)){const u=new Date(s).toISOString();if((0,t.isValidDatetime)(u))return u}if(!/.*(([+-]\d\d:?\d\d)|[a-zA-Z])$/.test(s)){const u=new Date(s+"Z");if(!isNaN(u.getTime())){const d=u.toISOString();if((0,t.isValidDatetime)(d))return d}}const a=new Date(s);if(isNaN(a.getTime()))throw new o("datetime did not parse as any timestamp format");const c=a.toISOString();if((0,t.isValidDatetime)(c))return c;throw new o("datetime normalized to invalid timestamp string")};t.normalizeDatetime=n;const i=s=>{try{return(0,t.normalizeDatetime)(s)}catch(a){if(a instanceof o)return new Date(0).toISOString();throw a}};t.normalizeDatetimeAlways=i;class o extends Error{}t.InvalidDatetimeError=o})(lI);(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Nx,t),r(lo,t),r(zx,t),r(rI,t),r(ss,t),r(aI,t),r(lI,t)})(Bs);Object.defineProperty(kg,"__esModule",{value:!0});kg.IdentityResolver=void 0;const NW=Bs,zW=ug;class FW{constructor(e,r){Object.defineProperty(this,"didResolver",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"handleResolver",{enumerable:!0,configurable:!0,writable:!0,value:r})}async resolve(e,r){var o;const n=(0,zW.isResolvedHandle)(e)?await this.getDocumentFromDid(e,r):await this.getDocumentFromHandle(e,r),i=(o=n.service)==null?void 0:o.find(qW,n);if(!i)throw new TypeError(`No valid "AtprotoPersonalDataServer" service found in "${n.id}" DID document`);return{did:n.id,pds:new URL(i.serviceEndpoint)}}async getDocumentFromDid(e,r){return this.didResolver.resolve(e,r)}async getDocumentFromHandle(e,r){var s,a;const n=(0,NW.normalizeAndEnsureValidHandle)(e),i=await this.handleResolver.resolve(n,r);if(!i)throw new TypeError(`Handle "${n}" does not resolve to a DID`);(s=r==null?void 0:r.signal)==null||s.throwIfAborted();const o=await this.didResolver.resolve(i,r);if(!((a=o.alsoKnownAs)!=null&&a.includes(`at://${n}`)))throw new TypeError(`Did document for "${i}" does not include the handle "${n}"`);return o}}kg.IdentityResolver=FW;function qW(t){return typeof t.serviceEndpoint=="string"&&t.type==="AtprotoPersonalDataServer"&&(t.id.startsWith("#")?t.id==="#atproto_pds":t.id===`${this.id}#atproto_pds`)}(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(kg,t)})(tI);var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.FALLBACK_ALG=void 0;Gf.FALLBACK_ALG="ES256";var Na={};Object.defineProperty(Na,"__esModule",{value:!0});Na.TokenRevokedError=void 0;class GW extends Error{constructor(e,r=`The session for "${e}" was successfully revoked`,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Na.TokenRevokedError=GW;var Hf={};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.OAuthProtectedResourceMetadataResolver=void 0;const HW=_n,Uu=ki,WW=oc,XW=Ds;class JW extends WW.CachedGetter{constructor(e,r=globalThis.fetch,n){super(async(i,o)=>this.fetchMetadata(i,o),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,Uu.bindFetch)(r),this.allowHttpResource=(n==null?void 0:n.allowHttpResource)===!0}async get(e,r){const{protocol:n,origin:i}=new URL(e);if(n!=="https:"&&n!=="http:")throw new TypeError(`Invalid protected resource metadata URL protocol: ${n}`);if(n==="http:"&&!this.allowHttpResource)throw new TypeError(`Unsecure resource metadata URL (${n}) only allowed in development and test environments`);return super.get(i,r)}async fetchMetadata(e,r){const n=new URL("/.well-known/oauth-protected-resource",e),i=new Request(n,{signal:r==null?void 0:r.signal,headers:{accept:"application/json"},cache:r!=null&&r.noCache?"no-cache":void 0,redirect:"manual"}),o=await this.fetch(i);if(o.status!==200)throw await(0,Uu.cancelBody)(o,"log"),await Uu.FetchResponseError.from(o,`Unexpected status code ${o.status} for "${n}"`,void 0,{cause:i});if((0,XW.contentMime)(o.headers)!=="application/json")throw await(0,Uu.cancelBody)(o,"log"),await Uu.FetchResponseError.from(o,`Unexpected content type for "${n}"`,void 0,{cause:i});const s=HW.oauthProtectedResourceMetadataSchema.parse(await o.json());if(s.resource!==e)throw new TypeError(`Invalid issuer ${s.resource}`);return s}}Hf.OAuthProtectedResourceMetadataResolver=JW;var Pg={},Wf={};Object.defineProperty(Wf,"__esModule",{value:!0});Wf.OAuthResolverError=void 0;const ZW=Z;class ry extends Error{constructor(e,r){super(e,r)}static from(e,r){if(e instanceof ry)return e;const n=e instanceof ZW.ZodError?`${e.errors[0].path} ${e.errors[0].message}`:null,i=(r??"Unable to resolve identity")+(n?` (${n})`:"");return new ry(i,{cause:e})}}Wf.OAuthResolverError=ry;Object.defineProperty(Pg,"__esModule",{value:!0});Pg.OAuthResolver=void 0;const QW=_n,tl=Wf;class YW{constructor(e,r,n){Object.defineProperty(this,"identityResolver",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"protectedResourceMetadataResolver",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"authorizationServerMetadataResolver",{enumerable:!0,configurable:!0,writable:!0,value:n})}async resolve(e,r){return/^https?:\/\//.test(e)?this.resolveFromService(e,r):this.resolveFromIdentity(e,r)}async resolveFromService(e,r){var n;try{return{metadata:await this.getResourceServerMetadata(e,r)}}catch(i){if(!((n=r==null?void 0:r.signal)!=null&&n.aborted)&&i instanceof tl.OAuthResolverError)try{const o=QW.oauthIssuerIdentifierSchema.safeParse(e);if(o.success)return{metadata:await this.getAuthorizationServerMetadata(o.data,r)}}catch{}throw i}}async resolveFromIdentity(e,r){var o;const n=await this.resolveIdentity(e,r);(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const i=await this.getResourceServerMetadata(n.pds,r);return{identity:n,metadata:i}}async resolveIdentity(e,r){try{return await this.identityResolver.resolve(e,r)}catch(n){throw tl.OAuthResolverError.from(n,`Failed to resolve identity: ${e}`)}}async getAuthorizationServerMetadata(e,r){try{return await this.authorizationServerMetadataResolver.get(e,r)}catch(n){throw tl.OAuthResolverError.from(n,`Failed to resolve OAuth server metadata for issuer: ${e}`)}}async getResourceServerMetadata(e,r){var n,i,o;try{const s=await this.protectedResourceMetadataResolver.get(e,r);if(((n=s.authorization_servers)==null?void 0:n.length)!==1)throw new tl.OAuthResolverError((i=s.authorization_servers)!=null&&i.length?`Unable to determine authorization server for PDS: ${e}`:`No authorization servers found for PDS: ${e}`);const a=s.authorization_servers[0];(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const c=await this.getAuthorizationServerMetadata(a,r);if(c.protected_resources&&!c.protected_resources.includes(s.resource))throw new tl.OAuthResolverError(`PDS "${e}" not protected by issuer "${a}"`);return c}catch(s){throw tl.OAuthResolverError.from(s,`Failed to resolve OAuth server metadata for resource: ${e}`)}}}Pg.OAuthResolver=YW;var Xf={},Jf={},cI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.atprotoTokenResponseSchema=t.atprotoScopeSchema=t.isAtprotoScope=void 0;const e=Z,r=Ps,n=_n,i=Ds,o=s=>(0,i.includesSpaceSeparatedValue)(s,"atproto");t.isAtprotoScope=o,t.atprotoScopeSchema=e.z.string().refine(t.isAtprotoScope,'The "atproto" scope is required'),t.atprotoTokenResponseSchema=n.oauthTokenResponseSchema.extend({token_type:e.z.literal("DPoP"),sub:r.atprotoDidSchema,scope:t.atprotoScopeSchema,id_token:e.z.never().optional()})})(cI);var gc={};Object.defineProperty(gc,"__esModule",{value:!0});gc.TokenRefreshError=void 0;class eX extends Error{constructor(e,r,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}gc.TokenRefreshError=eX;var Lg={};Object.defineProperty(Lg,"__esModule",{value:!0});Lg.dpopFetchWrapper=rX;const tX=mx,uI=ki;var Lk;const VE=(Lk=globalThis.crypto)==null?void 0:Lk.subtle,yC=globalThis.ReadableStream;function rX({key:t,iss:e,supportedAlgs:r,nonces:n,sha256:i=typeof VE<"u"?sX:void 0,isAuthServer:o,fetch:s=globalThis.fetch}){if(!i)throw new TypeError("crypto.subtle is not available in this environment. Please provide a sha256 function.");const a=oX(t,r);return async function(c,u){const d=u==null&&c instanceof Request?c:new Request(c,u),f=d.headers.get("Authorization"),h=f!=null&&f.startsWith("DPoP ")?await i(f.slice(5)):void 0,{origin:m}=new URL(d.url),g=d.method,v=nX(d.url);let w;try{w=await n.get(m)}catch{}const y=await gC(t,a,e,g,v,w,h);d.headers.set("DPoP",y);const b=await s.call(this,d),E=b.headers.get("DPoP-Nonce");if(!E||E===w)return b;try{await n.set(m,E)}catch{}if(!await iX(b,o)||c===d||yC&&(u==null?void 0:u.body)instanceof yC)return b;await(0,uI.cancelBody)(b,"log");const T=await gC(t,a,e,g,v,E,h),B=new Request(c,u);B.headers.set("DPoP",T);const I=await s.call(this,B),O=I.headers.get("DPoP-Nonce");if(!O||O===w)return I;try{await n.set(m,O)}catch{}return I}}function nX(t){const e=t.indexOf("#"),r=t.indexOf("?"),n=e===-1?r:r===-1?e:Math.min(e,r);return n===-1?t:t.slice(0,n)}async function gC(t,e,r,n,i,o,s){const a=t.bareJwk;if(!a)throw new Error("Only asymmetric keys can be used as DPoP proofs");const c=Math.floor(Date.now()/1e3);return t.createJwt({alg:e,typ:"dpop+jwt",jwk:a},{iss:r,iat:c,jti:Math.random().toString(36).slice(2),htm:n,htu:i,nonce:o,ath:s})}async function iX(t,e){if((e===void 0||e===!1)&&t.status===401){const r=t.headers.get("WWW-Authenticate");if(r!=null&&r.startsWith("DPoP"))return r.includes('error="use_dpop_nonce"')}if((e===void 0||e===!0)&&t.status===400)try{const r=await(0,uI.peekJson)(t,10240);return typeof r=="object"&&(r==null?void 0:r.error)==="use_dpop_nonce"}catch{return!1}return!1}function oX(t,e){if(e){const r=e.find(n=>t.algorithms.includes(n));if(r)return r}else{const[r]=t.algorithms;if(r)return r}throw new Error("Key does not match any alg supported by the server")}async function sX(t){if(VE==null)throw new Error("crypto.subtle is not available in this environment. Please provide a sha256 function.");const e=new TextEncoder().encode(t),r=await VE.digest("SHA-256",e),n=new Uint8Array(r);return tX.base64url.baseEncode(n)}var bc={};Object.defineProperty(bc,"__esModule",{value:!0});bc.OAuthResponseError=void 0;const bC=Ds;class aX extends Error{constructor(e,r){const n=typeof r=="object"?r:void 0,i=(0,bC.ifString)(n==null?void 0:n.error),o=(0,bC.ifString)(n==null?void 0:n.error_description),s=i?`"${i}"`:"unknown",a=o?`: ${o}`:"",c=`OAuth ${s} error${a}`;super(c),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"errorDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.error=i,this.errorDescription=o}get status(){return this.response.status}get headers(){return this.response.headers}}bc.OAuthResponseError=aX;var lX=C&&C.__addDisposableResource||function(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e},cX=C&&C.__disposeResources||function(t){return function(e){function r(s){e.error=e.hasError?new t(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,i=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(o,function(a){return r(a),o()})}else i|=1}catch(a){r(a)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}}(typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});Object.defineProperty(Jf,"__esModule",{value:!0});Jf.OAuthServerAgent=void 0;const vC=_n,EC=ki,uX=cI,dX=Gf,fX=gc,pX=Lg,hX=bc,mX=Ds;class yX{constructor(e,r,n,i,o,s,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:r}),Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"dpopNonces",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"oauthResolver",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:s}),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,pX.dpopFetchWrapper)({fetch:(0,EC.bindFetch)(c),iss:n.client_id,key:e,supportedAlgs:r.dpop_signing_alg_values_supported,sha256:async u=>s.sha256(u),nonces:i,isAuthServer:!0})}get issuer(){return this.serverMetadata.issuer}async revoke(e){try{await this.request("revocation",{token:e})}catch{}}async exchangeCode(e,r){const n=Date.now(),i=await this.request("token",{grant_type:"authorization_code",redirect_uri:this.clientMetadata.redirect_uris[0],code:e,code_verifier:r});try{return{aud:await this.verifyIssuer(i.sub),sub:i.sub,iss:this.issuer,scope:i.scope,refresh_token:i.refresh_token,access_token:i.access_token,token_type:i.token_type,expires_at:typeof i.expires_in=="number"?new Date(n+i.expires_in*1e3).toISOString():void 0}}catch(o){throw await this.revoke(i.access_token),o}}async refresh(e){if(!e.refresh_token)throw new fX.TokenRefreshError(e.sub,"No refresh token available");const r=await this.verifyIssuer(e.sub),n=Date.now(),i=await this.request("token",{grant_type:"refresh_token",refresh_token:e.refresh_token});return{aud:r,sub:e.sub,iss:this.issuer,scope:i.scope,refresh_token:i.refresh_token,access_token:i.access_token,token_type:i.token_type,expires_at:typeof i.expires_in=="number"?new Date(n+i.expires_in*1e3).toISOString():void 0}}async verifyIssuer(e){const r={stack:[],error:void 0,hasError:!1};try{const n=lX(r,(0,mX.timeoutSignal)(1e4),!1),i=await this.oauthResolver.resolveFromIdentity(e,{noCache:!0,allowStale:!1,signal:n});if(this.issuer!==i.metadata.issuer)throw new TypeError("Issuer mismatch");return i.identity.pds.href}catch(n){r.error=n,r.hasError=!0}finally{cX(r)}}async request(e,r){const n=this.serverMetadata[`${e}_endpoint`];if(!n)throw new Error(`No ${e} endpoint available`);const i=await this.buildClientAuth(e),{response:o,json:s}=await this.dpopFetch(n,{method:"POST",headers:{...i.headers,"Content-Type":"application/x-www-form-urlencoded"},body:gX({...r,...i.payload})}).then((0,EC.fetchJsonProcessor)());if(o.ok)switch(e){case"token":return uX.atprotoTokenResponseSchema.parse(s);case"pushed_authorization_request":return vC.oauthParResponseSchema.parse(s);default:return s}else throw new hX.OAuthResponseError(o,s)}async buildClientAuth(e){var i;const r=this.serverMetadata.token_endpoint_auth_methods_supported,n=this.clientMetadata.token_endpoint_auth_method;if(n==="private_key_jwt"||this.keyset&&!n&&((r==null?void 0:r.includes("private_key_jwt"))??!1)){if(!this.keyset)throw new Error("No keyset available");try{const o=this.serverMetadata.token_endpoint_auth_signing_alg_values_supported??dX.FALLBACK_ALG,s=(i=this.clientMetadata.jwks)==null?void 0:i.keys.map(({kid:a})=>a).filter(a=>typeof a=="string");return{payload:{client_id:this.clientMetadata.client_id,client_assertion_type:vC.CLIENT_ASSERTION_TYPE_JWT_BEARER,client_assertion:await this.keyset.createJwt({alg:o,kid:s},{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(o){if(n==="private_key_jwt")throw o}}if(n==="none"||!n&&((r==null?void 0:r.includes("none"))??!0))return{payload:{client_id:this.clientMetadata.client_id}};throw new Error(`Unsupported ${e} authentication method`)}}Jf.OAuthServerAgent=yX;function gX(t){return new URLSearchParams(Object.entries(t).filter(bX).map(vX)).toString()}function bX(t){return t[1]!==void 0}function vX(t){const e=t[0],r=t[1];switch(typeof r){case"string":return[e,r];case"number":case"boolean":return[e,String(r)];default:{const n=JSON.stringify(r);if(n===void 0)throw new Error(`Unsupported value type for ${e}: ${String(r)}`);return[e,n]}}}Object.defineProperty(Xf,"__esModule",{value:!0});Xf.OAuthServerFactory=void 0;const EX=Jf;class wX{constructor(e,r,n,i,o,s){Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"resolver",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"dpopNonceCache",{enumerable:!0,configurable:!0,writable:!0,value:s})}async fromIssuer(e,r,n){const i=await this.resolver.getAuthorizationServerMetadata(e,n);return this.fromMetadata(i,r)}async fromMetadata(e,r){return new EX.OAuthServerAgent(r,e,this.clientMetadata,this.dpopNonceCache,this.resolver,this.runtime,this.keyset,this.fetch)}}Xf.OAuthServerFactory=wX;var Zf={},vc={};Object.defineProperty(vc,"__esModule",{value:!0});vc.TokenInvalidError=void 0;class xX extends Error{constructor(e,r=`The session for "${e}" is invalid`,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}vc.TokenInvalidError=xX;Object.defineProperty(Zf,"__esModule",{value:!0});Zf.OAuthSession=void 0;const _X=ki,RX=vc,AX=Na,SX=Lg,wC=globalThis.ReadableStream;class CX{constructor(e,r,n,i=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:r}),Object.defineProperty(this,"sessionGetter",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"dpopFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dpopFetch=(0,SX.dpopFetchWrapper)({fetch:(0,_X.bindFetch)(i),iss:e.clientMetadata.client_id,key:e.dpopKey,supportedAlgs:e.serverMetadata.dpop_signing_alg_values_supported,sha256:async o=>e.runtime.sha256(o),nonces:e.dpopNonces,isAuthServer:!1})}get did(){return this.sub}get serverMetadata(){return this.server.serverMetadata}async getTokenSet(e){const{tokenSet:r}=await this.sessionGetter.get(this.sub,{noCache:e===!0,allowStale:e===!1});return r}async getTokenInfo(e="auto"){const r=await this.getTokenSet(e),n=r.expires_at==null?void 0:new Date(r.expires_at);return{expiresAt:n,get expired(){return n==null?void 0:n.getTime()<Date.now()-5e3},scope:r.scope,iss:r.iss,aud:r.aud,sub:r.sub}}async signOut(){try{const e=await this.getTokenSet(!1);await this.server.revoke(e.access_token)}finally{await this.sessionGetter.delStored(this.sub,new AX.TokenRevokedError(this.sub))}}async fetchHandler(e,r){const n=await this.getTokenSet("auto"),i=new URL(e,n.aud),o=`${n.token_type} ${n.access_token}`,s=new Headers(r==null?void 0:r.headers);s.set("Authorization",o);const a=await this.dpopFetch(i,{...r,headers:s});if(!xC(a))return a;let c;try{c=await this.getTokenSet(!0)}catch{return a}if(wC&&(r==null?void 0:r.body)instanceof wC)return a;const u=`${c.token_type} ${c.access_token}`,d=new URL(e,c.aud);s.set("Authorization",u);const f=await this.dpopFetch(d,{...r,headers:s});return xC(f)&&await this.sessionGetter.delStored(this.sub,new RX.TokenInvalidError(this.sub)),f}}Zf.OAuthSession=CX;function xC(t){if(t.status!==401)return!1;const e=t.headers.get("WWW-Authenticate");return e!=null&&(e.startsWith("Bearer ")||e.startsWith("DPoP "))&&e.includes('error="invalid_token"')}var Dg={},Bg={};Object.defineProperty(Bg,"__esModule",{value:!0});Bg.requestLocalLock=void 0;const xh=new Map;function TX(t){return new Promise(e=>{const n=(xh.get(t)??Promise.resolve()).then(()=>new Promise(i=>{e(()=>{xh.get(t)===n&&xh.delete(t),i()})}));xh.set(t,n)})}const kX=(t,e)=>TX(t).then(async r=>{try{return await e()}finally{r()}});Bg.requestLocalLock=kX;Object.defineProperty(Dg,"__esModule",{value:!0});Dg.Runtime=void 0;const zv=mx,PX=Bg;class LX{constructor(e){Object.defineProperty(this,"implementation",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"hasImplementationLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"usingLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const{requestLock:r}=e;this.hasImplementationLock=r!=null,this.usingLock=(r==null?void 0:r.bind(e))||PX.requestLocalLock}async generateKey(e){const r=Array.from(e).sort(BX);return this.implementation.createKey(r)}async sha256(e){const r=new TextEncoder().encode(e),n=await this.implementation.digest(r,{name:"sha256"});return zv.base64url.baseEncode(n)}async generateNonce(e=16){const r=await this.implementation.getRandomValues(e);return zv.base64url.baseEncode(r)}async generatePKCE(e){const r=await this.generateVerifier(e);return{verifier:r,challenge:await this.sha256(r),method:"S256"}}async calculateJwkThumbprint(e){const r=DX(e),n=JSON.stringify(r);return this.sha256(n)}async generateVerifier(e=32){if(e<32||e>96)throw new TypeError("Invalid code_verifier length");const r=await this.implementation.getRandomValues(e);return zv.base64url.baseEncode(r)}}Dg.Runtime=LX;function DX(t){const e=r=>{const n=t[r];if(typeof n!="string"||!n)throw new TypeError(`"${r}" Parameter missing or invalid`);return n};switch(t.kty){case"EC":return{crv:e("crv"),kty:e("kty"),x:e("x"),y:e("y")};case"OKP":return{crv:e("crv"),kty:e("kty"),x:e("x")};case"RSA":return{e:e("e"),kty:e("kty"),n:e("n")};case"oct":return{k:e("k"),kty:e("kty")};default:throw new TypeError('"kty" (Key Type) Parameter missing or unsupported')}}function BX(t,e){if(t==="ES256K")return-1;if(e==="ES256K")return 1;for(const r of["ES","PS","RS"])if(t.startsWith(r)){if(e.startsWith(r)){const n=parseInt(t.slice(2,5)),i=parseInt(e.slice(2,5));return n-i}return-1}else if(e.startsWith(r))return 1;return 0}var Qf={},_C=C&&C.__addDisposableResource||function(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e},IX=C&&C.__disposeResources||function(t){return function(e){function r(s){e.error=e.hasError?new t(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,i=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(o,function(a){return r(a),o()})}else i|=1}catch(a){r(a)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}}(typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});Object.defineProperty(Qf,"__esModule",{value:!0});Qf.SessionGetter=void 0;const jX=oc,OX=vc,ea=gc,UX=Na,$X=bc,Fv=Ds;class VX extends jX.CachedGetter{constructor(e,r,n){super(async(i,o,s)=>{var d;if(s===void 0){const f="The session was deleted by another process",h=new ea.TokenRefreshError(i,f);throw this.dispatchEvent("deleted",{sub:i,cause:h}),h}const{dpopKey:a,tokenSet:c}=s;if(i!==c.sub)throw new ea.TokenRefreshError(i,"Stored session sub mismatch");if(!c.refresh_token)throw new ea.TokenRefreshError(i,"No refresh token available");const u=await r.fromIssuer(c.iss,a);(d=o==null?void 0:o.signal)==null||d.throwIfAborted();try{const f=await u.refresh(c);if(i!==f.sub)throw new ea.TokenRefreshError(i,"Token set sub mismatch");return{dpopKey:a,tokenSet:f}}catch(f){if(f instanceof $X.OAuthResponseError&&f.status===400&&f.error==="invalid_grant"){if(!n.hasImplementationLock){await new Promise(g=>setTimeout(g,1e3));const m=await this.getStored(i);if(m===void 0){const g="The session was deleted by another process";throw new ea.TokenRefreshError(i,g,{cause:f})}else if(m.tokenSet.access_token!==c.access_token||m.tokenSet.refresh_token!==c.refresh_token)return m}const h=f.errorDescription??"The session was revoked";throw new ea.TokenRefreshError(i,h,{cause:f})}throw f}},e,{isStale:(i,{tokenSet:o})=>o.expires_at!=null&&new Date(o.expires_at).getTime()<Date.now()+1e4+3e4*Math.random(),onStoreError:async(i,o,{tokenSet:s,dpopKey:a})=>{throw await(await r.fromIssuer(s.iss,a)).revoke(s.refresh_token??s.access_token),i},deleteOnError:async i=>i instanceof ea.TokenRefreshError||i instanceof UX.TokenRevokedError||i instanceof OX.TokenInvalidError}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"eventTarget",{enumerable:!0,configurable:!0,writable:!0,value:new Fv.CustomEventTarget})}addEventListener(e,r,n){this.eventTarget.addEventListener(e,r,n)}removeEventListener(e,r,n){this.eventTarget.removeEventListener(e,r,n)}dispatchEvent(e,r){return this.eventTarget.dispatchCustomEvent(e,r)}async setStored(e,r){if(e!==r.tokenSet.sub)throw new TypeError("Token set does not match the expected sub");await super.setStored(e,r),this.dispatchEvent("updated",{sub:e,...r})}async delStored(e,r){await super.delStored(e,r),this.dispatchEvent("deleted",{sub:e,cause:r})}async getSession(e,r){return this.get(e,{noCache:r===!0,allowStale:r===!1})}async get(e,r){const n=await this.runtime.usingLock(`@atproto-oauth-client-${e}`,async()=>{const i={stack:[],error:void 0,hasError:!1};try{const o=_C(i,(0,Fv.timeoutSignal)(3e4,r),!1),s=_C(i,(0,Fv.combineSignals)([r==null?void 0:r.signal,o]),!1);return await super.get(e,{...r,signal:s.signal})}catch(o){i.error=o,i.hasError=!0}finally{IX(i)}});if(e!==n.tokenSet.sub)throw new Error("Token set does not match the expected sub");return n}}Qf.SessionGetter=VX;var Fx={},Yf={};Object.defineProperty(Yf,"__esModule",{value:!0});Yf.clientMetadataSchema=void 0;const KX=Z,qv=_n;Yf.clientMetadataSchema=qv.oauthClientMetadataSchema.extend({client_id:KX.z.union([qv.oauthClientIdDiscoverableSchema,qv.oauthClientIdLoopbackSchema])});Object.defineProperty(Fx,"__esModule",{value:!0});Fx.validateClientMetadata=NX;const RC=_n,MX=Yf,$u="token_endpoint_auth_method",_h="token_endpoint_auth_signing_alg";function NX(t,e){var o;if(t.jwks){if(!e)throw new TypeError("Keyset must not be provided when jwks is provided");for(const s of t.jwks.keys)if(s.kid){if(!e.has(s.kid))throw new TypeError(`Key with kid "${s.kid}" not found in keyset`)}else throw new TypeError('Key must have a "kid" property')}!t.jwks&&!t.jwks_uri&&(e!=null&&e.size)&&(t={...t,jwks:e.toJSON()});const r=MX.clientMetadataSchema.parse(t);r.client_id.startsWith("http:")?(0,RC.assertOAuthLoopbackClientId)(r.client_id):(0,RC.assertOAuthDiscoverableClientId)(r.client_id);const n=(o=r.scope)==null?void 0:o.split(" ");if(!(n!=null&&n.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 i=r[$u];switch(i){case void 0:throw new TypeError(`${$u} must be provided`);case"none":if(r[_h])throw new TypeError(`${_h} must not be provided when ${$u} is "${i}"`);break;case"private_key_jwt":if(!(e!=null&&e.size))throw new TypeError(`A non-empty keyset must be provided when ${$u} is "${i}"`);if(!r[_h])throw new TypeError(`${_h} must be provided when ${$u} is "${i}"`);break;default:throw new TypeError(`Invalid "token_endpoint_auth_method" value: ${i}`)}return r}Object.defineProperty(Tg,"__esModule",{value:!0});Tg.OAuthClient=void 0;const AC=_o,zX=_n,Rh=Dx,SC=ug,FX=tI,Gv=ic,qX=Gf,GX=Na,HX=Ff,zi=qf,WX=Hf,XX=Pg,JX=Xf,ZX=Zf,QX=Dg,YX=Qf,eJ=Ds,tJ=Fx;class rJ extends eJ.CustomEventTarget{static async fetchMetadata({clientId:e,fetch:r=globalThis.fetch,signal:n}){var c,u,d,f,h;n==null||n.throwIfAborted();const i=new Request(e,{redirect:"error",signal:n}),o=await r(i);if(o.status!==200)throw(u=(c=o.body)==null?void 0:c.cancel)==null||u.call(c),new TypeError(`Failed to fetch client metadata: ${o.status}`);const s=(d=o.headers.get("content-type"))==null?void 0:d.split(";")[0].trim();if(s!=="application/json")throw(h=(f=o.body)==null?void 0:f.cancel)==null||h.call(f),new TypeError(`Invalid client metadata content type: ${s}`);const a=await o.json();return n==null||n.throwIfAborted(),zX.oauthClientMetadataSchema.parse(a)}constructor({fetch:e=globalThis.fetch,allowHttp:r=!1,stateStore:n,sessionStore:i,didCache:o=void 0,dpopNonceCache:s=new Gv.SimpleStoreMemory({ttl:6e4,max:100}),handleCache:a=void 0,authorizationServerMetadataCache:c=new Gv.SimpleStoreMemory({ttl:6e4,max:100}),protectedResourceMetadataCache:u=new Gv.SimpleStoreMemory({ttl:6e4,max:100}),responseMode:d,clientMetadata:f,handleResolver:h,plcDirectoryUrl:m,runtimeImplementation:g,keyset:v}){super(),Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"responseMode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oauthResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"serverFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sessionGetter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stateStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.keyset=v?v instanceof AC.Keyset?v:new AC.Keyset(v):void 0,this.clientMetadata=(0,tJ.validateClientMetadata)(f,this.keyset),this.responseMode=d,this.runtime=new QX.Runtime(g),this.fetch=e,this.oauthResolver=new XX.OAuthResolver(new FX.IdentityResolver(new Rh.DidResolverCached(new Rh.DidResolverCommon({fetch:e,plcDirectoryUrl:m,allowHttp:r}),o),new SC.CachedHandleResolver(SC.AppViewHandleResolver.from(h,{fetch:e}),a)),new WX.OAuthProtectedResourceMetadataResolver(u,e,{allowHttpResource:r}),new HX.OAuthAuthorizationServerMetadataResolver(c,e,{allowHttpIssuer:r})),this.serverFactory=new JX.OAuthServerFactory(this.clientMetadata,this.runtime,this.oauthResolver,this.fetch,this.keyset,s),this.sessionGetter=new YX.SessionGetter(i,this.serverFactory,this.runtime),this.stateStore=n;for(const w of["deleted","updated"])this.sessionGetter.addEventListener(w,y=>{this.dispatchCustomEvent(w,y.detail)||y.preventDefault()})}get identityResolver(){return this.oauthResolver.identityResolver}get didResolver(){return this.identityResolver.didResolver}get handleResolver(){return this.identityResolver.handleResolver}get jwks(){var e;return((e=this.keyset)==null?void 0:e.publicJwks)??{keys:[]}}async authorize(e,{signal:r,...n}={}){const i=(n==null?void 0:n.redirect_uri)??this.clientMetadata.redirect_uris[0];if(!this.clientMetadata.redirect_uris.includes(i))throw new TypeError("Invalid redirect_uri");const{identity:o,metadata:s}=await this.oauthResolver.resolve(e,{signal:r}),a=await this.runtime.generatePKCE(),c=await this.runtime.generateKey(s.dpop_signing_alg_values_supported||[qX.FALLBACK_ALG]),u=await this.runtime.generateNonce();await this.stateStore.set(u,{iss:s.issuer,dpopKey:c,verifier:a.verifier,appState:n==null?void 0:n.state});const d={...n,client_id:this.clientMetadata.client_id,redirect_uri:i,code_challenge:a.challenge,code_challenge_method:a.method,state:u,login_hint:o?e:void 0,response_mode:this.responseMode,response_type:"code",scope:(n==null?void 0:n.scope)??this.clientMetadata.scope},f=new URL(s.authorization_endpoint);if(f.protocol!=="https:"&&f.protocol!=="http:")throw new TypeError(`Invalid authorization endpoint protocol: ${f.protocol}`);if(s.pushed_authorization_request_endpoint){const m=await(await this.serverFactory.fromMetadata(s,c)).request("pushed_authorization_request",d);return f.searchParams.set("client_id",this.clientMetadata.client_id),f.searchParams.set("request_uri",m.request_uri),f}else{if(s.require_pushed_authorization_requests)throw new Error("Server requires pushed authorization requests (PAR) but no PAR endpoint is available");for(const[m,g]of Object.entries(d))g&&f.searchParams.set(m,String(g));if(f.pathname.length+f.search.length<2048)return f;if(!s.pushed_authorization_request_endpoint)throw new Error("Login URL too long")}throw new Error("Server does not support pushed authorization requests (PAR)")}async abortRequest(e){e.searchParams.get("request_uri")}async callback(e){if(e.get("response")!=null)throw new zi.OAuthCallbackError(e,"JARM not supported");const n=e.get("iss"),i=e.get("state"),o=e.get("error"),s=e.get("code");if(!i)throw new zi.OAuthCallbackError(e,'Missing "state" parameter');const a=await this.stateStore.get(i);if(a)await this.stateStore.del(i);else throw new zi.OAuthCallbackError(e,`Unknown authorization session "${i}"`);try{if(o!=null)throw new zi.OAuthCallbackError(e,void 0,a.appState);if(!s)throw new zi.OAuthCallbackError(e,'Missing "code" query param',a.appState);const c=await this.serverFactory.fromIssuer(a.iss,a.dpopKey);if(n!=null){if(!c.issuer)throw new zi.OAuthCallbackError(e,"Issuer not found in metadata",a.appState);if(c.issuer!==n)throw new zi.OAuthCallbackError(e,"Issuer mismatch",a.appState)}else if(c.serverMetadata.authorization_response_iss_parameter_supported)throw new zi.OAuthCallbackError(e,"iss missing from the response",a.appState);const u=await c.exchangeCode(s,a.verifier);try{return await this.sessionGetter.setStored(u.sub,{dpopKey:a.dpopKey,tokenSet:u}),{session:this.createSession(c,u.sub),state:a.appState??null}}catch(d){throw await c.revoke(u.refresh_token||u.access_token),d}}catch(c){throw zi.OAuthCallbackError.from(c,e,a.appState)}}async restore(e,r="auto"){(0,Rh.assertAtprotoDid)(e);const{dpopKey:n,tokenSet:i}=await this.sessionGetter.get(e,{noCache:r===!0,allowStale:r===!1}),o=await this.serverFactory.fromIssuer(i.iss,n,{noCache:r===!0,allowStale:r===!1});return this.createSession(o,e)}async revoke(e){(0,Rh.assertAtprotoDid)(e);const{dpopKey:r,tokenSet:n}=await this.sessionGetter.get(e,{allowStale:!0});try{await(await this.serverFactory.fromIssuer(n.iss,r)).revoke(n.access_token)}finally{await this.sessionGetter.delStored(e,new GX.TokenRevokedError(e))}}createSession(e,r){return new ZX.OAuthSession(e,r,this.sessionGetter,this.fetch)}}Tg.OAuthClient=rJ;var dI={};Object.defineProperty(dI,"__esModule",{value:!0});var fI={};Object.defineProperty(fI,"__esModule",{value:!0});(function(t){var e=C&&C.__createBinding||(Object.create?function(i,o,s,a){a===void 0&&(a=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,a,c)}:function(i,o,s,a){a===void 0&&(a=s),i[a]=o[s]}),r=C&&C.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponseError=t.FetchRequestError=t.FetchError=void 0,r(Dx,t);var n=ki;Object.defineProperty(t,"FetchError",{enumerable:!0,get:function(){return n.FetchError}}),Object.defineProperty(t,"FetchRequestError",{enumerable:!0,get:function(){return n.FetchRequestError}}),Object.defineProperty(t,"FetchResponseError",{enumerable:!0,get:function(){return n.FetchResponseError}}),r(ug,t),r(Ps,t),r(_n,t),r(Ff,t),r(qf,t),r(Tg,t),r(Hf,t),r(Wf,t),r(bc,t),r(Jf,t),r(Xf,t),r(Zf,t),r(dI,t),r(Qf,t),r(fI,t),r(Yf,t),r(vc,t),r(gc,t),r(Na,t)})(Lx);var Ig={},jg={},pI={},Og={},ep={},tp={},rp={},np={};Object.defineProperty(np,"__esModule",{value:!0});np.handleRequest=hI;np.promisify=nJ;function hI(t,e,r){const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{e(t.result),n()},o=()=>{r(t.error||new Error("Unknown error")),n()};t.addEventListener("success",i),t.addEventListener("error",o)}function nJ(t){return new Promise((e,r)=>{hI(t,e,r)})}Object.defineProperty(rp,"__esModule",{value:!0});rp.DBIndex=void 0;const Vu=np;class iJ{constructor(e){Object.defineProperty(this,"idbIndex",{enumerable:!0,configurable:!0,writable:!0,value:e})}count(e){return(0,Vu.promisify)(this.idbIndex.count(e))}get(e){return(0,Vu.promisify)(this.idbIndex.get(e))}getKey(e){return(0,Vu.promisify)(this.idbIndex.getKey(e))}getAll(e,r){return(0,Vu.promisify)(this.idbIndex.getAll(e,r))}getAllKeys(e,r){return(0,Vu.promisify)(this.idbIndex.getAllKeys(e,r))}deleteAll(e){return new Promise((r,n)=>{const i=this.idbIndex.openCursor(e);i.onsuccess=function(o){const s=o.target.result;s?(s.delete(),s.continue()):r()},i.onerror=function(o){var s;n(((s=o.target)==null?void 0:s.error)||new Error("Unexpected error"))}})}}rp.DBIndex=iJ;Object.defineProperty(tp,"__esModule",{value:!0});tp.DBObjectStore=void 0;const oJ=rp,Po=np;class sJ{constructor(e){Object.defineProperty(this,"idbObjStore",{enumerable:!0,configurable:!0,writable:!0,value:e})}get name(){return this.idbObjStore.name}index(e){return new oJ.DBIndex(this.idbObjStore.index(e))}get(e){return(0,Po.promisify)(this.idbObjStore.get(e))}getKey(e){return(0,Po.promisify)(this.idbObjStore.getKey(e))}getAll(e,r){return(0,Po.promisify)(this.idbObjStore.getAll(e,r))}getAllKeys(e,r){return(0,Po.promisify)(this.idbObjStore.getAllKeys(e,r))}add(e,r){return(0,Po.promisify)(this.idbObjStore.add(e,r))}put(e,r){return(0,Po.promisify)(this.idbObjStore.put(e,r))}delete(e){return(0,Po.promisify)(this.idbObjStore.delete(e))}clear(){return(0,Po.promisify)(this.idbObjStore.clear())}}tp.DBObjectStore=sJ;var Ah=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hv=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fi;Object.defineProperty(ep,"__esModule",{value:!0});ep.DBTransaction=void 0;const aJ=tp;class lJ{constructor(e){Fi.set(this,void 0),Ah(this,Fi,e,"f");const r=()=>{i()},n=()=>{i()},i=()=>{Ah(this,Fi,null,"f"),e.removeEventListener("abort",r),e.removeEventListener("complete",n)};e.addEventListener("abort",r),e.addEventListener("complete",n)}get tx(){if(!Hv(this,Fi,"f"))throw new Error("Transaction already ended");return Hv(this,Fi,"f")}async abort(){const{tx:e}=this;Ah(this,Fi,null,"f"),e.abort()}async commit(){var r;const{tx:e}=this;Ah(this,Fi,null,"f"),(r=e.commit)==null||r.call(e)}objectStore(e){const r=this.tx.objectStore(e);return new aJ.DBObjectStore(r)}[(Fi=new WeakMap,Symbol.dispose)](){Hv(this,Fi,"f")&&this.commit()}}ep.DBTransaction=lJ;var Wv=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Xv=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lo;Object.defineProperty(Og,"__esModule",{value:!0});Og.DB=void 0;const cJ=ep;class qx{static async open(e,r,n){const i=await new Promise((o,s)=>{const a=indexedDB.open(e,r.length);a.onerror=()=>s(a.error),a.onsuccess=()=>o(a.result),a.onupgradeneeded=({oldVersion:c,newVersion:u})=>{const d=a.result;try{for(let f=c;f<(u??r.length);++f){const h=r[f];if(h)h(d);else throw new Error(`Missing migration for version ${f}`)}}catch(f){d.close(),s(f)}}});return new qx(i,n)}constructor(e,r){Object.defineProperty(this,"txOptions",{enumerable:!0,configurable:!0,writable:!0,value:r}),Lo.set(this,void 0),Wv(this,Lo,e,"f");const n=()=>{Wv(this,Lo,null,"f"),e.removeEventListener("versionchange",n),e.removeEventListener("close",n),e.close()};e.addEventListener("versionchange",n),e.addEventListener("close",n)}get db(){if(!Xv(this,Lo,"f"))throw new Error("Database closed");return Xv(this,Lo,"f")}get name(){return this.db.name}get objectStoreNames(){return this.db.objectStoreNames}get version(){return this.db.version}async transaction(e,r,n){return new Promise(async(i,o)=>{try{const s=this.db.transaction(e,r,this.txOptions);let a={done:!1};s.oncomplete=()=>{a.done?i(a.value):o(new Error("Transaction completed without result"))},s.onerror=()=>o(s.error),s.onabort=()=>o(s.error||new Error("Transaction aborted"));try{a={done:!0,value:await n(new cJ.DBTransaction(s))},s.commit()}catch(c){throw s.abort(),c}}catch(s){o(s)}})}close(){const{db:e}=this;Wv(this,Lo,null,"f"),e.close()}[(Lo=new WeakMap,Symbol.dispose)](){if(Xv(this,Lo,"f"))return this.close()}}Og.DB=qx;(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Og,t),r(rp,t),r(tp,t),r(ep,t)})(pI);var Sh=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ku=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Do,Mu;Object.defineProperty(jg,"__esModule",{value:!0});jg.BrowserOAuthDatabase=void 0;const mI=$y,uJ=pI;function CC(t){if(!(t instanceof mI.WebcryptoKey)||!t.kid)throw new Error("Invalid key object");return{keyId:t.kid,keyPair:t.cryptoKeyPair}}async function TC(t){return mI.WebcryptoKey.fromKeypair(t.keyPair,t.keyId)}const kC=["state","session","didCache","dpopNonceCache","handleCache","authorizationServerMetadataCache","protectedResourceMetadataCache"];class dJ{constructor(e){Do.set(this,void 0),Mu.set(this,void 0),Sh(this,Do,uJ.DB.open((e==null?void 0:e.name)??"@atproto-oauth-client",[r=>{for(const n of kC)r.createObjectStore(n,{autoIncrement:!0}).createIndex("expiresAt","expiresAt",{unique:!1})}],{durability:(e==null?void 0:e.durability)??"strict"}),"f"),Sh(this,Mu,setInterval(()=>{this.cleanup()},(e==null?void 0:e.cleanupInterval)??3e4),"f")}async run(e,r,n){return await(await Ku(this,Do,"f")).transaction([e],r,o=>n(o.objectStore(e)))}createStore(e,{encode:r,decode:n,expiresAt:i}){return{get:async o=>{const s=await this.run(e,"readonly",a=>a.get(o));if(s!==void 0){if(s.expiresAt!=null&&new Date(s.expiresAt)<new Date){await this.run(e,"readwrite",a=>a.delete(o));return}return n(s.value)}},set:async(o,s)=>{var c;const a={value:await r(s),expiresAt:(c=i(s))==null?void 0:c.toISOString()};await this.run(e,"readwrite",u=>u.put(a,o))},del:async o=>{await this.run(e,"readwrite",s=>s.delete(o))}}}getSessionStore(){return this.createStore("session",{expiresAt:({tokenSet:e})=>e.refresh_token||e.expires_at==null?null:new Date(e.expires_at),encode:({dpopKey:e,...r})=>({...r,dpopKey:CC(e)}),decode:async({dpopKey:e,...r})=>({...r,dpopKey:await TC(e)})})}getStateStore(){return this.createStore("state",{expiresAt:e=>new Date(Date.now()+10*6e4),encode:({dpopKey:e,...r})=>({...r,dpopKey:CC(e)}),decode:async({dpopKey:e,...r})=>({...r,dpopKey:await TC(e)})})}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 Ku(this,Do,"f");for(const r of kC)await e.transaction([r],"readwrite",n=>n.objectStore(r).index("expiresAt").deleteAll(IDBKeyRange.upperBound(Date.now())))}async[(Do=new WeakMap,Mu=new WeakMap,Symbol.asyncDispose)](){clearInterval(Ku(this,Mu,"f")),Sh(this,Mu,void 0,"f");const e=Ku(this,Do,"f");Sh(this,Do,Promise.reject(new Error("Database has been disposed")),"f"),Ku(this,Do,"f").catch(()=>null);const r=await e.catch(()=>null);r&&await(r[Symbol.asyncDispose]||r[Symbol.dispose]).call(r)}}jg.BrowserOAuthDatabase=dJ;var Ug={};Object.defineProperty(Ug,"__esModule",{value:!0});Ug.BrowserRuntimeImplementation=void 0;const fJ=$y;var Dk;const pJ=(Dk=navigator.locks)!=null&&Dk.request?(t,e)=>navigator.locks.request(t,{mode:"exclusive"},async()=>e()):void 0;class hJ{constructor(){if(Object.defineProperty(this,"requestLock",{enumerable:!0,configurable:!0,writable:!0,value:pJ}),typeof crypto!="object"||!(crypto!=null&&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 fJ.WebcryptoKey.generate(e)}getRandomValues(e){return crypto.getRandomValues(new Uint8Array(e))}async digest(e,{name:r}){switch(r){case"sha256":case"sha384":case"sha512":{const n=await crypto.subtle.digest(`SHA-${r.slice(3)}`,e);return new Uint8Array(n)}default:throw new Error(`Unsupported digest algorithm: ${r}`)}}}Ug.BrowserRuntimeImplementation=hJ;var ip={};Object.defineProperty(ip,"__esModule",{value:!0});ip.LoginContinuedInParentWindowError=void 0;class mJ extends Error{constructor(){super("Login complete, please close the popup window."),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:"LOGIN_CONTINUED_IN_PARENT_WINDOW"})}}ip.LoginContinuedInParentWindowError=mJ;var $g={};Object.defineProperty($g,"__esModule",{value:!0});$g.buildLoopbackClientId=gJ;const yJ=_n;function gJ(t,e="127.0.0.1"){if(!(0,yJ.isLoopbackHost)(t.hostname))throw new TypeError(`Expected a loopback host, got ${t.hostname}`);const r=`http://${t.hostname==="localhost"?e:t.hostname}${t.port&&!t.port.startsWith(":")?`:${t.port}`:t.port}${t.pathname}`;return`http://localhost${t.pathname==="/"?"":t.pathname}?redirect_uri=${encodeURIComponent(r)}`}var yI;Object.defineProperty(Ig,"__esModule",{value:!0});Ig.BrowserOAuthClient=void 0;const Ch=Lx,sm=_n,bJ=jg,vJ=Ug,Jv=ip,EJ=$g,ui="@@atproto/oauth-client-browser",PC=`${ui}(popup-channel)`,Nu=`${ui}(popup-state):`,LC=new BroadcastChannel(`${ui}(synchronization-channel)`);class ny extends Ch.OAuthClient{static async load({clientId:e,...r}){if(e.startsWith("http:")){const n=(0,sm.atprotoLoopbackClientMetadata)(e);return new ny({clientMetadata:n,...r})}else if(e.startsWith("https:")){(0,sm.assertOAuthDiscoverableClientId)(e);const n=await Ch.OAuthClient.fetchMetadata({clientId:e,...r});return new ny({clientMetadata:n,...r})}else throw new TypeError(`Invalid client id: ${e}`)}constructor({clientMetadata:e=(0,sm.atprotoLoopbackClientMetadata)((0,EJ.buildLoopbackClientId)(window.location)),responseMode:r="fragment",...n}){var a;if(!((a=globalThis.crypto)!=null&&a.subtle))throw new Error("WebCrypto API is required");if(!["query","fragment"].includes(r))throw new TypeError(`Invalid response mode: ${r}`);const i=new bJ.BrowserOAuthDatabase;super({...n,clientMetadata:e,responseMode:r,keyset:void 0,runtimeImplementation:new vJ.BrowserRuntimeImplementation,sessionStore:i.getSessionStore(),stateStore:i.getStateStore(),didCache:i.getDidCache(),handleCache:i.getHandleCache(),dpopNonceCache:i.getDpopNonceCache(),authorizationServerMetadataCache:i.getAuthorizationServerMetadataCache(),protectedResourceMetadataCache:i.getProtectedResourceMetadataCache()}),Object.defineProperty(this,yI,{enumerable:!0,configurable:!0,writable:!0,value:void 0});const o=new AbortController,{signal:s}=o;this[Symbol.dispose]=()=>o.abort(),s.addEventListener("abort",()=>i[Symbol.asyncDispose](),{once:!0}),this.addEventListener("deleted",({detail:{sub:c}})=>{localStorage.getItem(`${ui}(sub)`)===c&&localStorage.removeItem(`${ui}(sub)`)});for(const c of["deleted","updated"])this.sessionGetter.addEventListener(c,({detail:u})=>{LC.postMessage([c,u])});LC.addEventListener("message",c=>{if(c.source!==window){const[u,d]=c.data;this.dispatchCustomEvent(u,d)}},{signal:s})}async init(e){await wJ(this.clientMetadata);const r=await this.signInCallback();if(r)return localStorage.setItem(`${ui}(sub)`,r.session.sub),r;const n=localStorage.getItem(`${ui}(sub)`);if(n)try{return{session:await this.restore(n,e)}}catch(i){throw localStorage.removeItem(`${ui}(sub)`),i}}async restore(e,r){const n=await super.restore(e,r);return localStorage.setItem(`${ui}(sub)`,n.sub),n}async revoke(e){return localStorage.removeItem(`${ui}(sub)`),super.revoke(e)}async signIn(e,r){return(r==null?void 0:r.display)==="popup"?this.signInPopup(e,r):this.signInRedirect(e,r)}async signInRedirect(e,r){const n=await this.authorize(e,r);return window.location.href=n.href,new Promise((i,o)=>{setTimeout(s=>{this.abortRequest(n).then(()=>o(s),a=>o(new AggregateError([s,a])))},5e3,new Error("User navigated back"))})}async signInPopup(e,r){var a;const n="width=600,height=600,menubar=no,toolbar=no";let i=window.open("about:blank","_blank",n);const o=`${Math.random().toString(36).slice(2)}`,s=await this.authorize(e,{...r,state:`${Nu}${o}`,display:(r==null?void 0:r.display)??"popup"});return(a=r==null?void 0:r.signal)==null||a.throwIfAborted(),i?i.window.location.href=s.href:i=window.open(s.href,"_blank",n),i==null||i.focus(),new Promise((c,u)=>{var v;const d=new BroadcastChannel(PC),f=()=>{var w;clearTimeout(m),d.removeEventListener("message",g),d.close(),(w=r==null?void 0:r.signal)==null||w.removeEventListener("abort",h),i==null||i.close()},h=()=>{var w;u(new Error((w=r==null?void 0:r.signal)!=null&&w.aborted?"Aborted":"Timeout")),f()};(v=r==null?void 0:r.signal)==null||v.addEventListener("abort",h);const m=setTimeout(h,5*6e4),g=async({data:w})=>{var b;if(w.key!==o||!("result"in w))return;d.postMessage({key:o,ack:!0}),f();const{result:y}=w;if(y.status==="fulfilled"){const E=y.value;try{(b=r==null?void 0:r.signal)==null||b.throwIfAborted(),c(await this.restore(E,!1))}catch(_){u(_),this.revoke(E)}}else{const{message:E,params:_}=y.reason;u(new Ch.OAuthCallbackError(new URLSearchParams(_),E))}};d.addEventListener("message",g)})}readCallbackParams(){const e=this.responseMode==="fragment"?new URLSearchParams(location.hash.slice(1)):new URLSearchParams(location.search);if(!e.has("state")||!(e.has("code")||e.has("error")))return null;const r=i=>location.origin===i.origin&&location.pathname===i.pathname;return this.clientMetadata.redirect_uris.map(i=>new URL(i)).some(r)?e:null}async signInCallback(){const e=this.readCallbackParams();if(!e)return null;this.responseMode==="fragment"?history.replaceState(null,"",location.pathname+location.search):this.responseMode==="query"&&history.replaceState(null,"",location.pathname);const r=n=>{const i=new BroadcastChannel(PC);return new Promise(o=>{const s=u=>{clearTimeout(c),i.removeEventListener("message",a),i.close(),o(u)},a=({data:u})=>{"ack"in u&&n.key===u.key&&s(!0)};i.addEventListener("message",a),i.postMessage(n);const c=setTimeout(s,500,!1)})};return this.callback(e).then(async n=>{var i;if((i=n.state)!=null&&i.startsWith(Nu))throw await r({key:n.state.slice(Nu.length),result:{status:"fulfilled",value:n.session.sub}})||await n.session.signOut(),new Jv.LoginContinuedInParentWindowError;return n}).catch(async n=>{var i;throw n instanceof Ch.OAuthCallbackError&&((i=n.state)!=null&&i.startsWith(Nu))?(await r({key:n.state.slice(Nu.length),result:{status:"rejected",reason:{message:n.message,params:Array.from(n.params.entries())}}}),new Jv.LoginContinuedInParentWindowError):n}).catch(n=>{throw n instanceof Jv.LoginContinuedInParentWindowError&&window.close(),n})}dispose(){this[Symbol.dispose]()}}Ig.BrowserOAuthClient=ny;yI=Symbol.dispose;function wJ(t){if(!(0,sm.isOAuthClientIdLoopback)(t.client_id)||window.location.hostname!=="localhost")return;const e=new URL(window.location.href);for(const r of t.redirect_uris){const n=new URL(r);if((n.hostname==="127.0.0.1"||n.hostname==="[::1]")&&(!n.port||n.port===e.port)&&n.protocol===e.protocol&&n.pathname===e.pathname)throw n.port=e.port,window.location.href=n.href,new Error("Redirecting to loopback IP...")}throw new Error(`Please use the loopback IP address instead of ${e}`)}(function(t){var e=C&&C.__createBinding||(Object.create?function(i,o,s,a){a===void 0&&(a=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,a,c)}:function(i,o,s,a){a===void 0&&(a=s),i[a]=o[s]}),r=C&&C.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.buildLoopbackClientId=void 0,r($y,t),r(Lx,t),r(Ig,t),r(ip,t);var n=$g;Object.defineProperty(t,"buildLoopbackClientId",{enumerable:!0,get:function(){return n.buildLoopbackClientId}})})(bE);var KE={},Ia={},Is={},Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.toLexUri=xJ;Ec.requiredPropertiesRefinement=_J;const Zv=Z;function xJ(t,e){if(t.split("#").length>2)throw new Error("Uri can only have one hash segment");if(t.startsWith("lex:"))return t;if(t.startsWith("#")){if(!e)throw new Error(`Unable to resolve uri without anchor: ${t}`);return`${e}${t}`}return`lex:${t}`}function _J(t,e){if(t.required!==void 0){if(!Array.isArray(t.required)){e.addIssue({code:Zv.z.ZodIssueCode.invalid_type,received:typeof t.required,expected:"array"});return}if(t.properties===void 0){t.required.length>0&&e.addIssue({code:Zv.z.ZodIssueCode.custom,message:"Required fields defined but no properties defined"});return}for(const r of t.required)t.properties[r]===void 0&&e.addIssue({code:Zv.z.ZodIssueCode.custom,message:`Required field "${r}" not defined`})}}(function(t){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=i,t.isObj=o,t.isDiscriminatedObject=s,t.parseLexiconDoc=a;const e=Z,r=Bs,n=Ec;t.lexBoolean=e.z.object({type:e.z.literal("boolean"),description:e.z.string().optional(),default:e.z.boolean().optional(),const:e.z.boolean().optional()}).strict(),t.lexInteger=e.z.object({type:e.z.literal("integer"),description:e.z.string().optional(),default:e.z.number().int().optional(),minimum:e.z.number().int().optional(),maximum:e.z.number().int().optional(),enum:e.z.number().int().array().optional(),const:e.z.number().int().optional()}).strict(),t.lexStringFormat=e.z.enum(["datetime","uri","at-uri","did","handle","at-identifier","nsid","cid","language","tid","record-key"]),t.lexString=e.z.object({type:e.z.literal("string"),format:t.lexStringFormat.optional(),description:e.z.string().optional(),default:e.z.string().optional(),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional(),minGraphemes:e.z.number().int().optional(),maxGraphemes:e.z.number().int().optional(),enum:e.z.string().array().optional(),const:e.z.string().optional(),knownValues:e.z.string().array().optional()}).strict(),t.lexUnknown=e.z.object({type:e.z.literal("unknown"),description:e.z.string().optional()}).strict(),t.lexPrimitive=e.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]),t.lexBytes=e.z.object({type:e.z.literal("bytes"),description:e.z.string().optional(),maxLength:e.z.number().optional(),minLength:e.z.number().optional()}).strict(),t.lexCidLink=e.z.object({type:e.z.literal("cid-link"),description:e.z.string().optional()}).strict(),t.lexIpldType=e.z.discriminatedUnion("type",[t.lexBytes,t.lexCidLink]),t.lexRef=e.z.object({type:e.z.literal("ref"),description:e.z.string().optional(),ref:e.z.string()}).strict(),t.lexRefUnion=e.z.object({type:e.z.literal("union"),description:e.z.string().optional(),refs:e.z.string().array(),closed:e.z.boolean().optional()}).strict(),t.lexRefVariant=e.z.discriminatedUnion("type",[t.lexRef,t.lexRefUnion]),t.lexBlob=e.z.object({type:e.z.literal("blob"),description:e.z.string().optional(),accept:e.z.string().array().optional(),maxSize:e.z.number().optional()}).strict(),t.lexArray=e.z.object({type:e.z.literal("array"),description:e.z.string().optional(),items:e.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown,t.lexBytes,t.lexCidLink,t.lexRef,t.lexRefUnion,t.lexBlob]),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional()}).strict(),t.lexPrimitiveArray=t.lexArray.merge(e.z.object({items:t.lexPrimitive}).strict()),t.lexToken=e.z.object({type:e.z.literal("token"),description:e.z.string().optional()}).strict(),t.lexObject=e.z.object({type:e.z.literal("object"),description:e.z.string().optional(),required:e.z.string().array().optional(),nullable:e.z.string().array().optional(),properties:e.z.record(e.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(n.requiredPropertiesRefinement),t.lexXrpcParameters=e.z.object({type:e.z.literal("params"),description:e.z.string().optional(),required:e.z.string().array().optional(),properties:e.z.record(e.z.discriminatedUnion("type",[t.lexPrimitiveArray,t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]))}).strict().superRefine(n.requiredPropertiesRefinement),t.lexXrpcBody=e.z.object({description:e.z.string().optional(),encoding:e.z.string(),schema:e.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcSubscriptionMessage=e.z.object({description:e.z.string().optional(),schema:e.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcError=e.z.object({name:e.z.string(),description:e.z.string().optional()}).strict(),t.lexXrpcQuery=e.z.object({type:e.z.literal("query"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcProcedure=e.z.object({type:e.z.literal("procedure"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),input:t.lexXrpcBody.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcSubscription=e.z.object({type:e.z.literal("subscription"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),message:t.lexXrpcSubscriptionMessage.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexRecord=e.z.object({type:e.z.literal("record"),description:e.z.string().optional(),key:e.z.string().optional(),record:t.lexObject}).strict(),t.lexUserType=e.z.custom(f=>{if(!(!f||typeof f!="object")&&f.type!==void 0)switch(f.type){case"record":return t.lexRecord.parse(f);case"query":return t.lexXrpcQuery.parse(f);case"procedure":return t.lexXrpcProcedure.parse(f);case"subscription":return t.lexXrpcSubscription.parse(f);case"blob":return t.lexBlob.parse(f);case"array":return t.lexArray.parse(f);case"token":return t.lexToken.parse(f);case"object":return t.lexObject.parse(f);case"boolean":return t.lexBoolean.parse(f);case"integer":return t.lexInteger.parse(f);case"string":return t.lexString.parse(f);case"bytes":return t.lexBytes.parse(f);case"cid-link":return t.lexCidLink.parse(f);case"unknown":return t.lexUnknown.parse(f)}},f=>!f||typeof f!="object"?{message:"Must be an object",fatal:!0}:f.type===void 0?{message:"Must have a type",fatal:!0}:typeof f.type!="string"?{message:"Type property must be a string",fatal:!0}:{message:`Invalid type: ${f.type} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,fatal:!0}),t.lexiconDoc=e.z.object({lexicon:e.z.literal(1),id:e.z.string().refine(f=>r.NSID.isValid(f),{message:"Must be a valid NSID"}),revision:e.z.number().optional(),description:e.z.string().optional(),defs:e.z.record(t.lexUserType)}).strict().superRefine((f,h)=>{for(const m in f.defs){const g=f.defs[m];m!=="main"&&(g.type==="record"||g.type==="procedure"||g.type==="query"||g.type==="subscription")&&h.addIssue({code:e.z.ZodIssueCode.custom,message:"Records, procedures, queries, and subscriptions must be the main definition."})}});function i(f){return t.lexiconDoc.safeParse(f).success}function o(f){return f!=null&&typeof f=="object"}function s(f){return o(f)&&"$type"in f&&typeof f.$type=="string"}function a(f){return t.lexiconDoc.parse(f),f}class c extends Error{}t.ValidationError=c;class u extends Error{}t.InvalidLexiconError=u;class d extends Error{}t.LexiconDefNotFoundError=d})(Is);var Vg={},za={},js={},Gx={},Kg={},RJ=gI,DC=128,AJ=-128,SJ=Math.pow(2,31);function gI(t,e,r){e=e||[],r=r||0;for(var n=r;t>=SJ;)e[r++]=t&255|DC,t/=128;for(;t&AJ;)e[r++]=t&255|DC,t>>>=7;return e[r]=t|0,gI.bytes=r-n+1,e}var CJ=ME,TJ=128,BC=127;function ME(t,n){var r=0,n=n||0,i=0,o=n,s,a=t.length;do{if(o>=a)throw ME.bytes=0,new RangeError("Could not decode varint");s=t[o++],r+=i<28?(s&BC)<<i:(s&BC)*Math.pow(2,i),i+=7}while(s>=TJ);return ME.bytes=o-n,r}var kJ=Math.pow(2,7),PJ=Math.pow(2,14),LJ=Math.pow(2,21),DJ=Math.pow(2,28),BJ=Math.pow(2,35),IJ=Math.pow(2,42),jJ=Math.pow(2,49),OJ=Math.pow(2,56),UJ=Math.pow(2,63),$J=function(t){return t<kJ?1:t<PJ?2:t<LJ?3:t<DJ?4:t<BJ?5:t<IJ?6:t<jJ?7:t<OJ?8:t<UJ?9:10},VJ={encode:RJ,decode:CJ,encodingLength:$J},iy=VJ;const NE=(t,e=0)=>[iy.decode(t,e),iy.decode.bytes],oy=(t,e,r=0)=>(iy.encode(t,e,r),e),sy=t=>iy.encodingLength(t),KJ=(t,e)=>{const r=e.byteLength,n=sy(t),i=n+sy(r),o=new Uint8Array(i+r);return oy(t,o,0),oy(r,o,n),o.set(e,i),new Hx(t,r,e,o)},MJ=t=>{const e=hx(t),[r,n]=NE(e),[i,o]=NE(e.subarray(n)),s=e.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new Hx(r,i,s,e)},NJ=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&PG(t.bytes,e.bytes);class Hx{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const Yi=bf({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),zJ=bf({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),FJ=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Yi,base58flickr:zJ},Symbol.toStringTag,{value:"Module"})),hd=Xt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),qJ=Xt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),GJ=Xt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),HJ=Xt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),WJ=Xt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),XJ=Xt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),JJ=Xt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ZJ=Xt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),QJ=Xt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),YJ=Object.freeze(Object.defineProperty({__proto__:null,base32:hd,base32hex:WJ,base32hexpad:JJ,base32hexpadupper:ZJ,base32hexupper:XJ,base32pad:GJ,base32padupper:HJ,base32upper:qJ,base32z:QJ},Symbol.toStringTag,{value:"Module"}));class Yt{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:kh,byteLength:kh,code:Th,version:Th,multihash:Th,bytes:Th,_baseCache:kh,asCID:kh})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:r}=this;if(e!==zu)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==nZ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Yt.createV0(r)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,n=KJ(e,r);return Yt.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&NJ(this.multihash,e.multihash)}toString(e){const{bytes:r,version:n,_baseCache:i}=this;switch(n){case 0:return tZ(r,i,e||Yi.encoder);default:return rZ(r,i,e||hd.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return oZ(/^0\.0/,sZ),!!(e&&(e[jC]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Yt)return e;if(e!=null&&e.asCID===e){const{version:r,code:n,multihash:i,bytes:o}=e;return new Yt(r,n,i,o||IC(r,n,i.bytes))}else if(e!=null&&e[jC]===!0){const{version:r,multihash:n,code:i}=e,o=MJ(n);return Yt.create(r,i,o)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==zu)throw new Error(`Version 0 CID must use dag-pb (code: ${zu}) block encoding`);return new Yt(e,r,n,n.bytes)}case 1:{const i=IC(e,r,n.bytes);return new Yt(e,r,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return Yt.create(0,zu,e)}static createV1(e,r){return Yt.create(1,e,r)}static decode(e){const[r,n]=Yt.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=Yt.inspectBytes(e),n=r.size-r.multihashSize,i=hx(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");const o=i.subarray(r.multihashSize-r.digestSize),s=new Hx(r.multihashCode,r.digestSize,o,i);return[r.version===0?Yt.createV0(s):Yt.createV1(r.codec,s),e.subarray(r.size)]}static inspectBytes(e){let r=0;const n=()=>{const[f,h]=NE(e.subarray(r));return r+=h,f};let i=n(),o=zu;if(i===18?(i=0,r=0):i===1&&(o=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);const s=r,a=n(),c=n(),u=r+c,d=u-s;return{version:i,codec:o,multihashCode:a,digestSize:c,multihashSize:d,size:u}}static parse(e,r){const[n,i]=eZ(e,r),o=Yt.decode(i);return o._baseCache.set(n,e),o}}const eZ=(t,e)=>{switch(t[0]){case"Q":{const r=e||Yi;return[Yi.prefix,r.decode(`${Yi.prefix}${t}`)]}case Yi.prefix:{const r=e||Yi;return[Yi.prefix,r.decode(t)]}case hd.prefix:{const r=e||hd;return[hd.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},tZ=(t,e,r)=>{const{prefix:n}=r;if(n!==Yi.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(i==null){const o=r.encode(t).slice(1);return e.set(n,o),o}else return i},rZ=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(i==null){const o=r.encode(t);return e.set(n,o),o}else return i},zu=112,nZ=18,IC=(t,e,r)=>{const n=sy(t),i=n+sy(e),o=new Uint8Array(i+r.byteLength);return oy(t,o,0),oy(e,o,n),o.set(r,i),o},jC=Symbol.for("@ipld/js-cid/CID"),Th={writable:!1,configurable:!1,enumerable:!0},kh={writable:!1,enumerable:!1,configurable:!1},iZ="0.0.0-dev",oZ=(t,e)=>{if(t.test(iZ))console.warn(e);else throw new Error(e)},sZ=`CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:
if (CID.isCID(value)) {
doSomethingWithCID(value)
}
Is replaced with:
const cid = CID.asCID(value)
if (cid) {
// Make sure to use cid instead of value
doSomethingWithCID(cid)
}
`,aZ=Object.freeze(Object.defineProperty({__proto__:null,CID:Yt},Symbol.toStringTag,{value:"Module"})),wc=vy(aZ);var Pi={},fi={};Object.defineProperty(fi,"__esModule",{value:!0});fi.isObject=fi.assure=fi.create=fi.is=void 0;const lZ=(t,e)=>e.safeParse(t).success;fi.is=lZ;const cZ=t=>e=>t.safeParse(e).success;fi.create=cZ;const uZ=(t,e)=>t.parse(e);fi.assure=uZ;const dZ=t=>typeof t=="object"&&t!==null;fi.isObject=dZ;var Hl={};(function(t){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=r;const e=b=>(Object.keys(b).forEach(E=>{b[E]===void 0&&delete b[E]}),b);t.noUndefinedVals=e;function r(b,E){if(!b)return b;const _={},T=Object.keys(b);for(let B=0;B<T.length;B++){const I=T[B];E.includes(I)||(_[I]=b[I])}return _}const n=b=>Math.round((Math.random()-.5)*b*2);t.jitter=n;const i=b=>new Promise(E=>setTimeout(E,b));t.wait=i;const o=b=>{let E;const _=new Promise(T=>{const B=setTimeout(T,b);E=()=>{clearTimeout(B),T()}});return{bail:E,wait:()=>_}};t.bailableWait=o;const s=b=>{const E=b.reduce((B,I)=>B+I.length,0),_=new Uint8Array(E);let T=0;return b.forEach(B=>{_.set(B,T),T+=B.length}),_};t.flattenUint8Arrays=s;const a=async b=>{const E=[];for await(const _ of b)E.push(_);return(0,t.flattenUint8Arrays)(E)};t.streamToBuffer=a;const c="234567abcdefghijklmnopqrstuvwxyz",u=b=>{let E="";for(;b;){const _=b%32;b=Math.floor(b/32),E=c.charAt(_)+E}return E};t.s32encode=u;const d=b=>{let E=0;for(const _ of b)E=E*32+c.indexOf(_);return E};t.s32decode=d;const f=async(b,E)=>{const _=await Promise.all(b.map(T=>E(T)));return b.filter((T,B)=>_[B])};t.asyncFilter=f;const h=b=>!!b&&b.code;t.isErrnoException=h;const m=(b,E)=>!!b&&typeof b=="object"&&b.message===E;t.errHasMsg=m;const g=(b,E)=>b.reduce((_,T,B)=>{const I=Math.floor(B/E);return _[I]||(_[I]=[]),_[I].push(T),_},[]);t.chunkArray=g;const v=b=>{const E=[];for(let _=0;_<b;_++)E.push(_);return E};t.range=v;const w=b=>[...new Set(b)];t.dedupeStrs=w;const y=(b,E)=>{const _=parseInt(b||"",10);return isNaN(_)?E:_};t.parseIntWithFallback=y})(Hl);var op={};Object.defineProperty(op,"__esModule",{value:!0});op.mapDefined=void 0;op.keyBy=fZ;function fZ(t,e){return t.reduce((r,n)=>(r.set(n[e],n),r),new Map)}const pZ=(t,e)=>{const r=[];for(const n of t){const i=e(n);i!==void 0&&r.push(i)}return r};op.mapDefined=pZ;var bI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncBufferFullError=t.AsyncBuffer=t.allComplete=t.createDeferrables=t.createDeferrable=t.readFromGenerator=void 0,t.allFulfilled=c,t.handleAllSettledErrors=u,t.isRejectedResult=d,t.isFulfilledResult=h;const e=Hl,r=async(v,w,y=Promise.resolve(),b=Number.MAX_SAFE_INTEGER)=>{const E=[];let _,T=!1;const B=async()=>{if(await w(E.at(-1)))return!0;const O=(0,e.bailableWait)(20);return await O.wait(),_=O.bail,T?!1:await B()},I=new Promise(O=>{y.then(()=>{B().then(()=>O())})});try{for(;E.length<b;){const O=await Promise.race([v.next(),I]);if(!O)break;const F=O;if(F.done)break;E.push(F.value)}}finally{T=!0,_&&_()}return E};t.readFromGenerator=r;const n=()=>{let v;const w=new Promise(y=>{v=()=>y()});return{resolve:v,complete:w}};t.createDeferrable=n;const i=v=>{const w=[];for(let y=0;y<v;y++)w.push((0,t.createDeferrable)());return w};t.createDeferrables=i;const o=async v=>{await Promise.all(v.map(w=>w.complete))};t.allComplete=o;class s{constructor(w){Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:w}),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(w=>this.resolve=w)}push(w){this.buffer.push(w),this.resolve()}pushMany(w){w.forEach(y=>this.buffer.push(y)),this.resolve()}async*events(){for(;;){if(this.closed&&this.buffer.length===0){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 a(this.maxSize);const[w,...y]=this.buffer;w?(this.buffer=y,yield w):this.resetPromise()}}throw(w){this.toThrow=w,this.closed=!0,this.resolve()}close(){this.closed=!0,this.resolve()}}t.AsyncBuffer=s;class a extends Error{constructor(w){super(`ReachedMaxBufferSize: ${w}`)}}t.AsyncBufferFullError=a;function c(v){return Promise.allSettled(v).then(u)}function u(v){const w=v.filter(d).map(f);if(w.length===0)return v.map(m);throw w.length===1?w[0]:new AggregateError(w,`Multiple errors: ${w.map(g).join(`
`)}`)}function d(v){return v.status==="rejected"}function f(v){return v.reason}function h(v){return v.status==="fulfilled"}function m(v){return v.value}function g(v){return v instanceof Error?v.message:String(v)}})(bI);var Mg={};Object.defineProperty(Mg,"__esModule",{value:!0});Mg.TID=void 0;const Ph=Hl,OC=13;let Qv=0,UC=0,Lh=null;function $C(t){return t.replaceAll("-","")}class zo{constructor(e){Object.defineProperty(this,"str",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=$C(e);if(r.length!==OC)throw new Error(`Poorly formatted TID: ${r.length} length`);this.str=r}static next(e){const r=Math.max(Date.now(),Qv);r===Qv&&UC++,Qv=r;const n=r*1e3+UC;Lh===null&&(Lh=Math.floor(Math.random()*32));const i=zo.fromTime(n,Lh);return!e||i.newerThan(e)?i:zo.fromTime(e.timestamp()+1,Lh)}static nextStr(e){return zo.next(e?new zo(e):void 0).toString()}static fromTime(e,r){const n=`${(0,Ph.s32encode)(e)}${(0,Ph.s32encode)(r).padStart(2,"2")}`;return new zo(n)}static fromStr(e){return new zo(e)}static oldestFirst(e,r){return e.compareTo(r)}static newestFirst(e,r){return r.compareTo(e)}static is(e){return $C(e).length===OC}timestamp(){return(0,Ph.s32decode)(this.str.slice(0,11))}clockid(){return(0,Ph.s32decode)(this.str.slice(11,13))}formatted(){const e=this.toString();return`${e.slice(0,4)}-${e.slice(4,7)}-${e.slice(7,11)}-${e.slice(11,13)}`}toString(){return this.str}compareTo(e){return this.str>e.str?1:this.str<e.str?-1:0}equals(e){return this.str===e.str}newerThan(e){return this.compareTo(e)>0}olderThan(e){return this.compareTo(e)<0}}Mg.TID=zo;var vI={};function hZ(t,e){for(let r=0;r<t.byteLength;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return t.byteLength>e.byteLength?1:t.byteLength<e.byteLength?-1:0}function mZ(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function yZ(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}const gZ=Fy({prefix:"\0",name:"identity",encode:t=>DG(t),decode:t=>LG(t)}),bZ=Object.freeze(Object.defineProperty({__proto__:null,identity:gZ},Symbol.toStringTag,{value:"Module"})),vZ=Xt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),EZ=Object.freeze(Object.defineProperty({__proto__:null,base2:vZ},Symbol.toStringTag,{value:"Module"})),wZ=Xt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),xZ=Object.freeze(Object.defineProperty({__proto__:null,base8:wZ},Symbol.toStringTag,{value:"Module"})),_Z=bf({prefix:"9",name:"base10",alphabet:"0123456789"}),RZ=Object.freeze(Object.defineProperty({__proto__:null,base10:_Z},Symbol.toStringTag,{value:"Module"})),AZ=Xt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),SZ=Xt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),CZ=Object.freeze(Object.defineProperty({__proto__:null,base16:AZ,base16upper:SZ},Symbol.toStringTag,{value:"Module"})),TZ=bf({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),kZ=bf({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),PZ=Object.freeze(Object.defineProperty({__proto__:null,base36:TZ,base36upper:kZ},Symbol.toStringTag,{value:"Module"})),EI=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),LZ=EI.reduce((t,e,r)=>(t[r]=e,t),[]),DZ=EI.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function BZ(t){return t.reduce((e,r)=>(e+=LZ[r],e),"")}function IZ(t){const e=[];for(const r of t){const n=DZ[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const jZ=Fy({prefix:"🚀",name:"base256emoji",encode:BZ,decode:IZ}),OZ=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:jZ},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const VC={...bZ,...EZ,...xZ,...RZ,...CZ,...YJ,...PZ,...FJ,...AD,...OZ};function wI(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const KC=wI("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Yv=wI("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),xI={utf8:KC,"utf-8":KC,hex:VC.base16,latin1:Yv,ascii:Yv,binary:Yv,...VC};function UZ(t,e="utf8"){const r=xI[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}function $Z(t,e="utf8"){const r=xI[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.encoder.encode(t).substring(1)}function VZ(t,e){if(t.length!==e.length)throw new Error("Inputs should have the same length");const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}const KZ=Object.freeze(Object.defineProperty({__proto__:null,compare:hZ,concat:mZ,equals:yZ,fromString:UZ,toString:$Z,xor:VZ},Symbol.toStringTag,{value:"Module"})),_I=vy(KZ);(function(t){var e=C&&C.__createBinding||(Object.create?function(u,d,f,h){h===void 0&&(h=f);var m=Object.getOwnPropertyDescriptor(d,f);(!m||("get"in m?!d.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(u,h,m)}:function(u,d,f,h){h===void 0&&(h=f),u[h]=d[f]}),r=C&&C.__setModuleDefault||(Object.create?function(u,d){Object.defineProperty(u,"default",{enumerable:!0,value:d})}:function(u,d){u.default=d}),n=C&&C.__importStar||function(){var u=function(d){return u=Object.getOwnPropertyNames||function(f){var h=[];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(h[h.length]=m);return h},u(d)};return function(d){if(d&&d.__esModule)return d;var f={};if(d!=null)for(var h=u(d),m=0;m<h.length;m++)h[m]!=="default"&&e(f,d,h[m]);return r(f,d),f}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ipldEquals=t.ipldToJson=t.jsonToIpld=void 0;const i=wc,o=n(_I),s=u=>{if(Array.isArray(u))return u.map(d=>(0,t.jsonToIpld)(d));if(u&&typeof u=="object"){if(typeof u.$link=="string"&&Object.keys(u).length===1)return i.CID.parse(u.$link);if(typeof u.$bytes=="string"&&Object.keys(u).length===1)return o.fromString(u.$bytes,"base64");const d={};for(const f of Object.keys(u))d[f]=(0,t.jsonToIpld)(u[f]);return d}return u};t.jsonToIpld=s;const a=u=>{if(Array.isArray(u))return u.map(d=>(0,t.ipldToJson)(d));if(u&&typeof u=="object"){if(u instanceof Uint8Array)return{$bytes:o.toString(u,"base64")};if(i.CID.asCID(u))return{$link:u.toString()};const d={};for(const f of Object.keys(u))d[f]=(0,t.ipldToJson)(u[f]);return d}return u};t.ipldToJson=a;const c=(u,d)=>{var f;if(Array.isArray(u)&&Array.isArray(d)){if(u.length!==d.length)return!1;for(let h=0;h<u.length;h++)if(!(0,t.ipldEquals)(u[h],d[h]))return!1;return!0}if(u&&d&&typeof u=="object"&&typeof d=="object"){if(u instanceof Uint8Array&&d instanceof Uint8Array)return o.equals(u,d);if(i.CID.asCID(u)&&i.CID.asCID(d))return(f=i.CID.asCID(u))==null?void 0:f.equals(i.CID.asCID(d));if(Object.keys(u).length!==Object.keys(d).length)return!1;for(const h of Object.keys(u))if(!(0,t.ipldEquals)(u[h],d[h]))return!1;return!0}return u===d};t.ipldEquals=c})(vI);var sp={};Object.defineProperty(sp,"__esModule",{value:!0});sp.retry=RI;sp.createRetryable=NZ;sp.backoffMs=AI;const MZ=Hl;async function RI(t,e={}){const{maxRetries:r=3,retryable:n=()=>!0,getWaitMs:i=AI}=e;let o=0,s;for(;!s;)try{return await t()}catch(a){const c=i(o);o<r&&c!==null&&n(a)?(o+=1,c!==0&&await(0,MZ.wait)(c)):s=a}throw s}function NZ(t){return async(e,r)=>RI(e,{...r,retryable:t})}function AI(t,e=100,r=1e3){const n=Math.pow(2,t)*e,i=Math.min(n,r);return zZ(i)}function zZ(t){const e=t*.15;return t+FZ(-e,e)}function FZ(t,e){return Math.random()*(e-t)+t}var SI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.def=t.schema=void 0;const e=wc,r=Z,n=r.z.unknown().transform((o,s)=>{const a=e.CID.asCID(o);return a??(s.addIssue({code:r.z.ZodIssueCode.custom,message:"Not a valid CID"}),r.z.NEVER)}),i=r.z.object({version:r.z.literal(1),roots:r.z.array(n)});t.schema={cid:n,carHeader:i,bytes:r.z.instanceof(Uint8Array),string:r.z.string(),array:r.z.array(r.z.unknown()),map:r.z.record(r.z.string(),r.z.unknown()),unknown:r.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}}})(SI);var CI={};(function(t){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=t.SECOND*60,t.HOUR=t.MINUTE*60,t.DAY=t.HOUR*24;const e=(n,i)=>Date.now()<n.getTime()+i;t.lessThanAgoMs=e;const r=(n,i)=>{const o=i?new Date(i):new Date;return o.setHours(o.getHours()+n),o};t.addHoursToDate=r})(CI);var kr={},Wx={},Xx={},Jx={};(function(t){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})(Jx);var Zx={};Object.defineProperty(Zx,"__esModule",{value:!0});const Se=Jx,qi=0,e0=1,qZ=2,GZ=3,HZ=4;class WZ{static isSurrogate(e,r){return 55296<=e.charCodeAt(r)&&e.charCodeAt(r)<=56319&&56320<=e.charCodeAt(r+1)&&e.charCodeAt(r+1)<=57343}static codePointAt(e,r){r===void 0&&(r=0);const n=e.charCodeAt(r);if(55296<=n&&n<=56319&&r<e.length-1){const i=n,o=e.charCodeAt(r+1);return 56320<=o&&o<=57343?(i-55296)*1024+(o-56320)+65536:i}if(56320<=n&&n<=57343&&r>=1){const i=e.charCodeAt(r-1),o=n;return 55296<=i&&i<=56319?(i-55296)*1024+(o-56320)+65536:o}return n}static shouldBreak(e,r,n,i,o,s){const a=[e].concat(r).concat([n]),c=[i].concat(o).concat([s]),u=a[a.length-2],d=n,f=s,h=a.lastIndexOf(Se.CLUSTER_BREAK.REGIONAL_INDICATOR);if(h>0&&a.slice(1,h).every(function(g){return g===Se.CLUSTER_BREAK.REGIONAL_INDICATOR})&&[Se.CLUSTER_BREAK.PREPEND,Se.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(u)===-1)return a.filter(function(g){return g===Se.CLUSTER_BREAK.REGIONAL_INDICATOR}).length%2===1?GZ:HZ;if(u===Se.CLUSTER_BREAK.CR&&d===Se.CLUSTER_BREAK.LF)return qi;if(u===Se.CLUSTER_BREAK.CONTROL||u===Se.CLUSTER_BREAK.CR||u===Se.CLUSTER_BREAK.LF)return e0;if(d===Se.CLUSTER_BREAK.CONTROL||d===Se.CLUSTER_BREAK.CR||d===Se.CLUSTER_BREAK.LF)return e0;if(u===Se.CLUSTER_BREAK.L&&(d===Se.CLUSTER_BREAK.L||d===Se.CLUSTER_BREAK.V||d===Se.CLUSTER_BREAK.LV||d===Se.CLUSTER_BREAK.LVT))return qi;if((u===Se.CLUSTER_BREAK.LV||u===Se.CLUSTER_BREAK.V)&&(d===Se.CLUSTER_BREAK.V||d===Se.CLUSTER_BREAK.T))return qi;if((u===Se.CLUSTER_BREAK.LVT||u===Se.CLUSTER_BREAK.T)&&d===Se.CLUSTER_BREAK.T)return qi;if(d===Se.CLUSTER_BREAK.EXTEND||d===Se.CLUSTER_BREAK.ZWJ)return qi;if(d===Se.CLUSTER_BREAK.SPACINGMARK)return qi;if(u===Se.CLUSTER_BREAK.PREPEND)return qi;const m=c.slice(0,-1).lastIndexOf(Se.EXTENDED_PICTOGRAPHIC);return m!==-1&&c[m]===Se.EXTENDED_PICTOGRAPHIC&&a.slice(m+1,-2).every(function(g){return g===Se.CLUSTER_BREAK.EXTEND})&&u===Se.CLUSTER_BREAK.ZWJ&&f===Se.EXTENDED_PICTOGRAPHIC?qi:r.indexOf(Se.CLUSTER_BREAK.REGIONAL_INDICATOR)!==-1?qZ:u===Se.CLUSTER_BREAK.REGIONAL_INDICATOR&&d===Se.CLUSTER_BREAK.REGIONAL_INDICATOR?qi:e0}}Zx.default=WZ;var Qx={};Object.defineProperty(Qx,"__esModule",{value:!0});class XZ{constructor(e,r){this._index=0,this._str=e,this._nextBreak=r}[Symbol.iterator](){return this}next(){let e;if((e=this._nextBreak(this._str,this._index))<this._str.length){const r=this._str.slice(this._index,e);return this._index=e,{value:r,done:!1}}if(this._index<this._str.length){const r=this._str.slice(this._index);return this._index=this._str.length,{value:r,done:!1}}return{value:void 0,done:!0}}}Qx.default=XZ;var TI=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xx,"__esModule",{value:!0});const l=Jx,Dh=TI(Zx),JZ=TI(Qx);class Ji{static nextBreak(e,r){if(r===void 0&&(r=0),r<0)return 0;if(r>=e.length-1)return e.length;const n=Dh.default.codePointAt(e,r),i=Ji.getGraphemeBreakProperty(n),o=Ji.getEmojiProperty(n),s=[],a=[];for(let c=r+1;c<e.length;c++){if(Dh.default.isSurrogate(e,c-1))continue;const u=Dh.default.codePointAt(e,c),d=Ji.getGraphemeBreakProperty(u),f=Ji.getEmojiProperty(u);if(Dh.default.shouldBreak(i,s,d,o,a,f))return c;s.push(d),a.push(f)}return e.length}splitGraphemes(e){const r=[];let n=0,i;for(;(i=Ji.nextBreak(e,n))<e.length;)r.push(e.slice(n,i)),n=i;return n<e.length&&r.push(e.slice(n)),r}iterateGraphemes(e){return new JZ.default(e,Ji.nextBreak)}countGraphemes(e){let r=0,n=0,i;for(;(i=Ji.nextBreak(e,n))<e.length;)n=i,r++;return n<e.length&&r++,r}static getGraphemeBreakProperty(e){if(e<48905){if(e<44116){if(e<4141){if(e<2818){if(e<2363)if(e<1759){if(e<1471){if(e<127){if(e<11){if(e<10){if(0<=e&&e<=9)return l.CLUSTER_BREAK.CONTROL}else if(e===10)return l.CLUSTER_BREAK.LF}else if(e<13){if(11<=e&&e<=12)return l.CLUSTER_BREAK.CONTROL}else if(e<14){if(e===13)return l.CLUSTER_BREAK.CR}else if(14<=e&&e<=31)return l.CLUSTER_BREAK.CONTROL}else if(e<768){if(e<173){if(127<=e&&e<=159)return l.CLUSTER_BREAK.CONTROL}else if(e===173)return l.CLUSTER_BREAK.CONTROL}else if(e<1155){if(768<=e&&e<=879)return l.CLUSTER_BREAK.EXTEND}else if(e<1425){if(1155<=e&&e<=1161)return l.CLUSTER_BREAK.EXTEND}else if(1425<=e&&e<=1469)return l.CLUSTER_BREAK.EXTEND}else if(e<1552){if(e<1476){if(e<1473){if(e===1471)return l.CLUSTER_BREAK.EXTEND}else if(1473<=e&&e<=1474)return l.CLUSTER_BREAK.EXTEND}else if(e<1479){if(1476<=e&&e<=1477)return l.CLUSTER_BREAK.EXTEND}else if(e<1536){if(e===1479)return l.CLUSTER_BREAK.EXTEND}else if(1536<=e&&e<=1541)return l.CLUSTER_BREAK.PREPEND}else if(e<1648){if(e<1564){if(1552<=e&&e<=1562)return l.CLUSTER_BREAK.EXTEND}else if(e<1611){if(e===1564)return l.CLUSTER_BREAK.CONTROL}else if(1611<=e&&e<=1631)return l.CLUSTER_BREAK.EXTEND}else if(e<1750){if(e===1648)return l.CLUSTER_BREAK.EXTEND}else if(e<1757){if(1750<=e&&e<=1756)return l.CLUSTER_BREAK.EXTEND}else if(e===1757)return l.CLUSTER_BREAK.PREPEND}else if(e<2075){if(e<1840)if(e<1770){if(e<1767){if(1759<=e&&e<=1764)return l.CLUSTER_BREAK.EXTEND}else if(1767<=e&&e<=1768)return l.CLUSTER_BREAK.EXTEND}else if(e<1807){if(1770<=e&&e<=1773)return l.CLUSTER_BREAK.EXTEND}else{if(e===1807)return l.CLUSTER_BREAK.PREPEND;if(e===1809)return l.CLUSTER_BREAK.EXTEND}else if(e<2027){if(e<1958){if(1840<=e&&e<=1866)return l.CLUSTER_BREAK.EXTEND}else if(1958<=e&&e<=1968)return l.CLUSTER_BREAK.EXTEND}else if(e<2045){if(2027<=e&&e<=2035)return l.CLUSTER_BREAK.EXTEND}else if(e<2070){if(e===2045)return l.CLUSTER_BREAK.EXTEND}else if(2070<=e&&e<=2073)return l.CLUSTER_BREAK.EXTEND}else if(e<2200){if(e<2089){if(e<2085){if(2075<=e&&e<=2083)return l.CLUSTER_BREAK.EXTEND}else if(2085<=e&&e<=2087)return l.CLUSTER_BREAK.EXTEND}else if(e<2137){if(2089<=e&&e<=2093)return l.CLUSTER_BREAK.EXTEND}else if(e<2192){if(2137<=e&&e<=2139)return l.CLUSTER_BREAK.EXTEND}else if(2192<=e&&e<=2193)return l.CLUSTER_BREAK.PREPEND}else if(e<2275){if(e<2250){if(2200<=e&&e<=2207)return l.CLUSTER_BREAK.EXTEND}else if(e<2274){if(2250<=e&&e<=2273)return l.CLUSTER_BREAK.EXTEND}else if(e===2274)return l.CLUSTER_BREAK.PREPEND}else if(e<2307){if(2275<=e&&e<=2306)return l.CLUSTER_BREAK.EXTEND}else{if(e===2307)return l.CLUSTER_BREAK.SPACINGMARK;if(e===2362)return l.CLUSTER_BREAK.EXTEND}else if(e<2561){if(e<2434){if(e<2381){if(e<2366){if(e===2363)return l.CLUSTER_BREAK.SPACINGMARK;if(e===2364)return l.CLUSTER_BREAK.EXTEND}else if(e<2369){if(2366<=e&&e<=2368)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2377){if(2369<=e&&e<=2376)return l.CLUSTER_BREAK.EXTEND}else if(2377<=e&&e<=2380)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2385){if(e<2382){if(e===2381)return l.CLUSTER_BREAK.EXTEND}else if(2382<=e&&e<=2383)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2402){if(2385<=e&&e<=2391)return l.CLUSTER_BREAK.EXTEND}else if(e<2433){if(2402<=e&&e<=2403)return l.CLUSTER_BREAK.EXTEND}else if(e===2433)return l.CLUSTER_BREAK.EXTEND}else if(e<2503){if(e<2494){if(e<2492){if(2434<=e&&e<=2435)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===2492)return l.CLUSTER_BREAK.EXTEND}else if(e<2495){if(e===2494)return l.CLUSTER_BREAK.EXTEND}else if(e<2497){if(2495<=e&&e<=2496)return l.CLUSTER_BREAK.SPACINGMARK}else if(2497<=e&&e<=2500)return l.CLUSTER_BREAK.EXTEND}else if(e<2519){if(e<2507){if(2503<=e&&e<=2504)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2509){if(2507<=e&&e<=2508)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===2509)return l.CLUSTER_BREAK.EXTEND}else if(e<2530){if(e===2519)return l.CLUSTER_BREAK.EXTEND}else if(e<2558){if(2530<=e&&e<=2531)return l.CLUSTER_BREAK.EXTEND}else if(e===2558)return l.CLUSTER_BREAK.EXTEND}else if(e<2691){if(e<2631){if(e<2620){if(e<2563){if(2561<=e&&e<=2562)return l.CLUSTER_BREAK.EXTEND}else if(e===2563)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2622){if(e===2620)return l.CLUSTER_BREAK.EXTEND}else if(e<2625){if(2622<=e&&e<=2624)return l.CLUSTER_BREAK.SPACINGMARK}else if(2625<=e&&e<=2626)return l.CLUSTER_BREAK.EXTEND}else if(e<2672){if(e<2635){if(2631<=e&&e<=2632)return l.CLUSTER_BREAK.EXTEND}else if(e<2641){if(2635<=e&&e<=2637)return l.CLUSTER_BREAK.EXTEND}else if(e===2641)return l.CLUSTER_BREAK.EXTEND}else if(e<2677){if(2672<=e&&e<=2673)return l.CLUSTER_BREAK.EXTEND}else if(e<2689){if(e===2677)return l.CLUSTER_BREAK.EXTEND}else if(2689<=e&&e<=2690)return l.CLUSTER_BREAK.EXTEND}else if(e<2761){if(e<2750){if(e===2691)return l.CLUSTER_BREAK.SPACINGMARK;if(e===2748)return l.CLUSTER_BREAK.EXTEND}else if(e<2753){if(2750<=e&&e<=2752)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2759){if(2753<=e&&e<=2757)return l.CLUSTER_BREAK.EXTEND}else if(2759<=e&&e<=2760)return l.CLUSTER_BREAK.EXTEND}else if(e<2786){if(e<2763){if(e===2761)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2765){if(2763<=e&&e<=2764)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===2765)return l.CLUSTER_BREAK.EXTEND}else if(e<2810){if(2786<=e&&e<=2787)return l.CLUSTER_BREAK.EXTEND}else if(e<2817){if(2810<=e&&e<=2815)return l.CLUSTER_BREAK.EXTEND}else if(e===2817)return l.CLUSTER_BREAK.EXTEND}else if(e<3315){if(e<3076){if(e<2946){if(e<2887){if(e<2878){if(e<2876){if(2818<=e&&e<=2819)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===2876)return l.CLUSTER_BREAK.EXTEND}else if(e<2880){if(2878<=e&&e<=2879)return l.CLUSTER_BREAK.EXTEND}else if(e<2881){if(e===2880)return l.CLUSTER_BREAK.SPACINGMARK}else if(2881<=e&&e<=2884)return l.CLUSTER_BREAK.EXTEND}else if(e<2893){if(e<2891){if(2887<=e&&e<=2888)return l.CLUSTER_BREAK.SPACINGMARK}else if(2891<=e&&e<=2892)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<2901){if(e===2893)return l.CLUSTER_BREAK.EXTEND}else if(e<2914){if(2901<=e&&e<=2903)return l.CLUSTER_BREAK.EXTEND}else if(2914<=e&&e<=2915)return l.CLUSTER_BREAK.EXTEND}else if(e<3014){if(e<3007){if(e===2946||e===3006)return l.CLUSTER_BREAK.EXTEND}else if(e<3008){if(e===3007)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3009){if(e===3008)return l.CLUSTER_BREAK.EXTEND}else if(3009<=e&&e<=3010)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3031){if(e<3018){if(3014<=e&&e<=3016)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3021){if(3018<=e&&e<=3020)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===3021)return l.CLUSTER_BREAK.EXTEND}else if(e<3072){if(e===3031)return l.CLUSTER_BREAK.EXTEND}else if(e<3073){if(e===3072)return l.CLUSTER_BREAK.EXTEND}else if(3073<=e&&e<=3075)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3262){if(e<3146){if(e<3134){if(e===3076||e===3132)return l.CLUSTER_BREAK.EXTEND}else if(e<3137){if(3134<=e&&e<=3136)return l.CLUSTER_BREAK.EXTEND}else if(e<3142){if(3137<=e&&e<=3140)return l.CLUSTER_BREAK.SPACINGMARK}else if(3142<=e&&e<=3144)return l.CLUSTER_BREAK.EXTEND}else if(e<3201){if(e<3157){if(3146<=e&&e<=3149)return l.CLUSTER_BREAK.EXTEND}else if(e<3170){if(3157<=e&&e<=3158)return l.CLUSTER_BREAK.EXTEND}else if(3170<=e&&e<=3171)return l.CLUSTER_BREAK.EXTEND}else if(e<3202){if(e===3201)return l.CLUSTER_BREAK.EXTEND}else if(e<3260){if(3202<=e&&e<=3203)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===3260)return l.CLUSTER_BREAK.EXTEND}else if(e<3270){if(e<3264){if(e===3262)return l.CLUSTER_BREAK.SPACINGMARK;if(e===3263)return l.CLUSTER_BREAK.EXTEND}else if(e<3266){if(3264<=e&&e<=3265)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3267){if(e===3266)return l.CLUSTER_BREAK.EXTEND}else if(3267<=e&&e<=3268)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3276){if(e<3271){if(e===3270)return l.CLUSTER_BREAK.EXTEND}else if(e<3274){if(3271<=e&&e<=3272)return l.CLUSTER_BREAK.SPACINGMARK}else if(3274<=e&&e<=3275)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3285){if(3276<=e&&e<=3277)return l.CLUSTER_BREAK.EXTEND}else if(e<3298){if(3285<=e&&e<=3286)return l.CLUSTER_BREAK.EXTEND}else if(3298<=e&&e<=3299)return l.CLUSTER_BREAK.EXTEND}else if(e<3551){if(e<3406){if(e<3391){if(e<3330){if(e<3328){if(e===3315)return l.CLUSTER_BREAK.SPACINGMARK}else if(3328<=e&&e<=3329)return l.CLUSTER_BREAK.EXTEND}else if(e<3387){if(3330<=e&&e<=3331)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3390){if(3387<=e&&e<=3388)return l.CLUSTER_BREAK.EXTEND}else if(e===3390)return l.CLUSTER_BREAK.EXTEND}else if(e<3398){if(e<3393){if(3391<=e&&e<=3392)return l.CLUSTER_BREAK.SPACINGMARK}else if(3393<=e&&e<=3396)return l.CLUSTER_BREAK.EXTEND}else if(e<3402){if(3398<=e&&e<=3400)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3405){if(3402<=e&&e<=3404)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===3405)return l.CLUSTER_BREAK.EXTEND}else if(e<3530){if(e<3426){if(e===3406)return l.CLUSTER_BREAK.PREPEND;if(e===3415)return l.CLUSTER_BREAK.EXTEND}else if(e<3457){if(3426<=e&&e<=3427)return l.CLUSTER_BREAK.EXTEND}else if(e<3458){if(e===3457)return l.CLUSTER_BREAK.EXTEND}else if(3458<=e&&e<=3459)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3538){if(e<3535){if(e===3530)return l.CLUSTER_BREAK.EXTEND}else if(e<3536){if(e===3535)return l.CLUSTER_BREAK.EXTEND}else if(3536<=e&&e<=3537)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3542){if(3538<=e&&e<=3540)return l.CLUSTER_BREAK.EXTEND}else if(e<3544){if(e===3542)return l.CLUSTER_BREAK.EXTEND}else if(3544<=e&&e<=3550)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3893){if(e<3655){if(e<3633){if(e<3570){if(e===3551)return l.CLUSTER_BREAK.EXTEND}else if(3570<=e&&e<=3571)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3635){if(e===3633)return l.CLUSTER_BREAK.EXTEND}else if(e<3636){if(e===3635)return l.CLUSTER_BREAK.SPACINGMARK}else if(3636<=e&&e<=3642)return l.CLUSTER_BREAK.EXTEND}else if(e<3764)if(e<3761){if(3655<=e&&e<=3662)return l.CLUSTER_BREAK.EXTEND}else{if(e===3761)return l.CLUSTER_BREAK.EXTEND;if(e===3763)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3784){if(3764<=e&&e<=3772)return l.CLUSTER_BREAK.EXTEND}else if(e<3864){if(3784<=e&&e<=3790)return l.CLUSTER_BREAK.EXTEND}else if(3864<=e&&e<=3865)return l.CLUSTER_BREAK.EXTEND}else if(e<3967){if(e<3897){if(e===3893||e===3895)return l.CLUSTER_BREAK.EXTEND}else if(e<3902){if(e===3897)return l.CLUSTER_BREAK.EXTEND}else if(e<3953){if(3902<=e&&e<=3903)return l.CLUSTER_BREAK.SPACINGMARK}else if(3953<=e&&e<=3966)return l.CLUSTER_BREAK.EXTEND}else if(e<3981){if(e<3968){if(e===3967)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<3974){if(3968<=e&&e<=3972)return l.CLUSTER_BREAK.EXTEND}else if(3974<=e&&e<=3975)return l.CLUSTER_BREAK.EXTEND}else if(e<3993){if(3981<=e&&e<=3991)return l.CLUSTER_BREAK.EXTEND}else if(e<4038){if(3993<=e&&e<=4028)return l.CLUSTER_BREAK.EXTEND}else if(e===4038)return l.CLUSTER_BREAK.EXTEND}else if(e<7204){if(e<6448){if(e<5938){if(e<4226){if(e<4157){if(e<4146){if(e<4145){if(4141<=e&&e<=4144)return l.CLUSTER_BREAK.EXTEND}else if(e===4145)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<4153){if(4146<=e&&e<=4151)return l.CLUSTER_BREAK.EXTEND}else if(e<4155){if(4153<=e&&e<=4154)return l.CLUSTER_BREAK.EXTEND}else if(4155<=e&&e<=4156)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<4184){if(e<4182){if(4157<=e&&e<=4158)return l.CLUSTER_BREAK.EXTEND}else if(4182<=e&&e<=4183)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<4190){if(4184<=e&&e<=4185)return l.CLUSTER_BREAK.EXTEND}else if(e<4209){if(4190<=e&&e<=4192)return l.CLUSTER_BREAK.EXTEND}else if(4209<=e&&e<=4212)return l.CLUSTER_BREAK.EXTEND}else if(e<4352){if(e<4229){if(e===4226)return l.CLUSTER_BREAK.EXTEND;if(e===4228)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<4237){if(4229<=e&&e<=4230)return l.CLUSTER_BREAK.EXTEND}else if(e===4237||e===4253)return l.CLUSTER_BREAK.EXTEND}else if(e<4957){if(e<4448){if(4352<=e&&e<=4447)return l.CLUSTER_BREAK.L}else if(e<4520){if(4448<=e&&e<=4519)return l.CLUSTER_BREAK.V}else if(4520<=e&&e<=4607)return l.CLUSTER_BREAK.T}else if(e<5906){if(4957<=e&&e<=4959)return l.CLUSTER_BREAK.EXTEND}else if(e<5909){if(5906<=e&&e<=5908)return l.CLUSTER_BREAK.EXTEND}else if(e===5909)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6089){if(e<6070){if(e<5970){if(e<5940){if(5938<=e&&e<=5939)return l.CLUSTER_BREAK.EXTEND}else if(e===5940)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6002){if(5970<=e&&e<=5971)return l.CLUSTER_BREAK.EXTEND}else if(e<6068){if(6002<=e&&e<=6003)return l.CLUSTER_BREAK.EXTEND}else if(6068<=e&&e<=6069)return l.CLUSTER_BREAK.EXTEND}else if(e<6078){if(e<6071){if(e===6070)return l.CLUSTER_BREAK.SPACINGMARK}else if(6071<=e&&e<=6077)return l.CLUSTER_BREAK.EXTEND}else if(e<6086){if(6078<=e&&e<=6085)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6087){if(e===6086)return l.CLUSTER_BREAK.EXTEND}else if(6087<=e&&e<=6088)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6277)if(e<6155){if(e<6109){if(6089<=e&&e<=6099)return l.CLUSTER_BREAK.EXTEND}else if(e===6109)return l.CLUSTER_BREAK.EXTEND}else if(e<6158){if(6155<=e&&e<=6157)return l.CLUSTER_BREAK.EXTEND}else{if(e===6158)return l.CLUSTER_BREAK.CONTROL;if(e===6159)return l.CLUSTER_BREAK.EXTEND}else if(e<6435){if(e<6313){if(6277<=e&&e<=6278)return l.CLUSTER_BREAK.EXTEND}else if(e<6432){if(e===6313)return l.CLUSTER_BREAK.EXTEND}else if(6432<=e&&e<=6434)return l.CLUSTER_BREAK.EXTEND}else if(e<6439){if(6435<=e&&e<=6438)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6441){if(6439<=e&&e<=6440)return l.CLUSTER_BREAK.EXTEND}else if(6441<=e&&e<=6443)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6971){if(e<6744)if(e<6681){if(e<6451){if(e<6450){if(6448<=e&&e<=6449)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===6450)return l.CLUSTER_BREAK.EXTEND}else if(e<6457){if(6451<=e&&e<=6456)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6679){if(6457<=e&&e<=6459)return l.CLUSTER_BREAK.EXTEND}else if(6679<=e&&e<=6680)return l.CLUSTER_BREAK.EXTEND}else if(e<6741){if(e<6683){if(6681<=e&&e<=6682)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===6683)return l.CLUSTER_BREAK.EXTEND}else if(e<6742){if(e===6741)return l.CLUSTER_BREAK.SPACINGMARK}else{if(e===6742)return l.CLUSTER_BREAK.EXTEND;if(e===6743)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6771){if(e<6754){if(e<6752){if(6744<=e&&e<=6750)return l.CLUSTER_BREAK.EXTEND}else if(e===6752)return l.CLUSTER_BREAK.EXTEND}else if(e<6757){if(e===6754)return l.CLUSTER_BREAK.EXTEND}else if(e<6765){if(6757<=e&&e<=6764)return l.CLUSTER_BREAK.EXTEND}else if(6765<=e&&e<=6770)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6912){if(e<6783){if(6771<=e&&e<=6780)return l.CLUSTER_BREAK.EXTEND}else if(e<6832){if(e===6783)return l.CLUSTER_BREAK.EXTEND}else if(6832<=e&&e<=6862)return l.CLUSTER_BREAK.EXTEND}else if(e<6916){if(6912<=e&&e<=6915)return l.CLUSTER_BREAK.EXTEND}else if(e<6964){if(e===6916)return l.CLUSTER_BREAK.SPACINGMARK}else if(6964<=e&&e<=6970)return l.CLUSTER_BREAK.EXTEND}else if(e<7080){if(e<7019){if(e<6973){if(e===6971)return l.CLUSTER_BREAK.SPACINGMARK;if(e===6972)return l.CLUSTER_BREAK.EXTEND}else if(e<6978){if(6973<=e&&e<=6977)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<6979){if(e===6978)return l.CLUSTER_BREAK.EXTEND}else if(6979<=e&&e<=6980)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7073){if(e<7040){if(7019<=e&&e<=7027)return l.CLUSTER_BREAK.EXTEND}else if(e<7042){if(7040<=e&&e<=7041)return l.CLUSTER_BREAK.EXTEND}else if(e===7042)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7074){if(e===7073)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7078){if(7074<=e&&e<=7077)return l.CLUSTER_BREAK.EXTEND}else if(7078<=e&&e<=7079)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7144)if(e<7083){if(e<7082){if(7080<=e&&e<=7081)return l.CLUSTER_BREAK.EXTEND}else if(e===7082)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7142){if(7083<=e&&e<=7085)return l.CLUSTER_BREAK.EXTEND}else{if(e===7142)return l.CLUSTER_BREAK.EXTEND;if(e===7143)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7150){if(e<7146){if(7144<=e&&e<=7145)return l.CLUSTER_BREAK.EXTEND}else if(e<7149){if(7146<=e&&e<=7148)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===7149)return l.CLUSTER_BREAK.EXTEND}else if(e<7151){if(e===7150)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7154){if(7151<=e&&e<=7153)return l.CLUSTER_BREAK.EXTEND}else if(7154<=e&&e<=7155)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43346){if(e<11647){if(e<7415){if(e<7380){if(e<7220){if(e<7212){if(7204<=e&&e<=7211)return l.CLUSTER_BREAK.SPACINGMARK}else if(7212<=e&&e<=7219)return l.CLUSTER_BREAK.EXTEND}else if(e<7222){if(7220<=e&&e<=7221)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7376){if(7222<=e&&e<=7223)return l.CLUSTER_BREAK.EXTEND}else if(7376<=e&&e<=7378)return l.CLUSTER_BREAK.EXTEND}else if(e<7394){if(e<7393){if(7380<=e&&e<=7392)return l.CLUSTER_BREAK.EXTEND}else if(e===7393)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<7405){if(7394<=e&&e<=7400)return l.CLUSTER_BREAK.EXTEND}else if(e===7405||e===7412)return l.CLUSTER_BREAK.EXTEND}else if(e<8205)if(e<7616){if(e<7416){if(e===7415)return l.CLUSTER_BREAK.SPACINGMARK}else if(7416<=e&&e<=7417)return l.CLUSTER_BREAK.EXTEND}else if(e<8203){if(7616<=e&&e<=7679)return l.CLUSTER_BREAK.EXTEND}else{if(e===8203)return l.CLUSTER_BREAK.CONTROL;if(e===8204)return l.CLUSTER_BREAK.EXTEND}else if(e<8288){if(e<8206){if(e===8205)return l.CLUSTER_BREAK.ZWJ}else if(e<8232){if(8206<=e&&e<=8207)return l.CLUSTER_BREAK.CONTROL}else if(8232<=e&&e<=8238)return l.CLUSTER_BREAK.CONTROL}else if(e<8400){if(8288<=e&&e<=8303)return l.CLUSTER_BREAK.CONTROL}else if(e<11503){if(8400<=e&&e<=8432)return l.CLUSTER_BREAK.EXTEND}else if(11503<=e&&e<=11505)return l.CLUSTER_BREAK.EXTEND}else if(e<43043){if(e<42612){if(e<12330){if(e<11744){if(e===11647)return l.CLUSTER_BREAK.EXTEND}else if(11744<=e&&e<=11775)return l.CLUSTER_BREAK.EXTEND}else if(e<12441){if(12330<=e&&e<=12335)return l.CLUSTER_BREAK.EXTEND}else if(e<42607){if(12441<=e&&e<=12442)return l.CLUSTER_BREAK.EXTEND}else if(42607<=e&&e<=42610)return l.CLUSTER_BREAK.EXTEND}else if(e<43010){if(e<42654){if(42612<=e&&e<=42621)return l.CLUSTER_BREAK.EXTEND}else if(e<42736){if(42654<=e&&e<=42655)return l.CLUSTER_BREAK.EXTEND}else if(42736<=e&&e<=42737)return l.CLUSTER_BREAK.EXTEND}else if(e<43014){if(e===43010)return l.CLUSTER_BREAK.EXTEND}else if(e===43014||e===43019)return l.CLUSTER_BREAK.EXTEND}else if(e<43188){if(e<43047){if(e<43045){if(43043<=e&&e<=43044)return l.CLUSTER_BREAK.SPACINGMARK}else if(43045<=e&&e<=43046)return l.CLUSTER_BREAK.EXTEND}else if(e<43052){if(e===43047)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43136){if(e===43052)return l.CLUSTER_BREAK.EXTEND}else if(43136<=e&&e<=43137)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43263){if(e<43204){if(43188<=e&&e<=43203)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43232){if(43204<=e&&e<=43205)return l.CLUSTER_BREAK.EXTEND}else if(43232<=e&&e<=43249)return l.CLUSTER_BREAK.EXTEND}else if(e<43302){if(e===43263)return l.CLUSTER_BREAK.EXTEND}else if(e<43335){if(43302<=e&&e<=43309)return l.CLUSTER_BREAK.EXTEND}else if(43335<=e&&e<=43345)return l.CLUSTER_BREAK.EXTEND}else if(e<43698){if(e<43493){if(e<43444)if(e<43392){if(e<43360){if(43346<=e&&e<=43347)return l.CLUSTER_BREAK.SPACINGMARK}else if(43360<=e&&e<=43388)return l.CLUSTER_BREAK.L}else if(e<43395){if(43392<=e&&e<=43394)return l.CLUSTER_BREAK.EXTEND}else{if(e===43395)return l.CLUSTER_BREAK.SPACINGMARK;if(e===43443)return l.CLUSTER_BREAK.EXTEND}else if(e<43450){if(e<43446){if(43444<=e&&e<=43445)return l.CLUSTER_BREAK.SPACINGMARK}else if(43446<=e&&e<=43449)return l.CLUSTER_BREAK.EXTEND}else if(e<43452){if(43450<=e&&e<=43451)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43454){if(43452<=e&&e<=43453)return l.CLUSTER_BREAK.EXTEND}else if(43454<=e&&e<=43456)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43573){if(e<43567){if(e<43561){if(e===43493)return l.CLUSTER_BREAK.EXTEND}else if(43561<=e&&e<=43566)return l.CLUSTER_BREAK.EXTEND}else if(e<43569){if(43567<=e&&e<=43568)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43571){if(43569<=e&&e<=43570)return l.CLUSTER_BREAK.EXTEND}else if(43571<=e&&e<=43572)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43597){if(e<43587){if(43573<=e&&e<=43574)return l.CLUSTER_BREAK.EXTEND}else if(e===43587||e===43596)return l.CLUSTER_BREAK.EXTEND}else if(e<43644){if(e===43597)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===43644||e===43696)return l.CLUSTER_BREAK.EXTEND}else if(e<44006){if(e<43756)if(e<43710){if(e<43703){if(43698<=e&&e<=43700)return l.CLUSTER_BREAK.EXTEND}else if(43703<=e&&e<=43704)return l.CLUSTER_BREAK.EXTEND}else if(e<43713){if(43710<=e&&e<=43711)return l.CLUSTER_BREAK.EXTEND}else{if(e===43713)return l.CLUSTER_BREAK.EXTEND;if(e===43755)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<43766){if(e<43758){if(43756<=e&&e<=43757)return l.CLUSTER_BREAK.EXTEND}else if(e<43765){if(43758<=e&&e<=43759)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===43765)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<44003){if(e===43766)return l.CLUSTER_BREAK.EXTEND}else if(e<44005){if(44003<=e&&e<=44004)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===44005)return l.CLUSTER_BREAK.EXTEND}else if(e<44032)if(e<44009){if(e<44008){if(44006<=e&&e<=44007)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===44008)return l.CLUSTER_BREAK.EXTEND}else if(e<44012){if(44009<=e&&e<=44010)return l.CLUSTER_BREAK.SPACINGMARK}else{if(e===44012)return l.CLUSTER_BREAK.SPACINGMARK;if(e===44013)return l.CLUSTER_BREAK.EXTEND}else if(e<44061){if(e<44033){if(e===44032)return l.CLUSTER_BREAK.LV}else if(e<44060){if(44033<=e&&e<=44059)return l.CLUSTER_BREAK.LVT}else if(e===44060)return l.CLUSTER_BREAK.LV}else if(e<44088){if(44061<=e&&e<=44087)return l.CLUSTER_BREAK.LVT}else if(e<44089){if(e===44088)return l.CLUSTER_BREAK.LV}else if(44089<=e&&e<=44115)return l.CLUSTER_BREAK.LVT}else if(e<46497){if(e<45293){if(e<44704){if(e<44397){if(e<44256){if(e<44173){if(e<44144){if(e<44117){if(e===44116)return l.CLUSTER_BREAK.LV}else if(44117<=e&&e<=44143)return l.CLUSTER_BREAK.LVT}else if(e<44145){if(e===44144)return l.CLUSTER_BREAK.LV}else if(e<44172){if(44145<=e&&e<=44171)return l.CLUSTER_BREAK.LVT}else if(e===44172)return l.CLUSTER_BREAK.LV}else if(e<44201){if(e<44200){if(44173<=e&&e<=44199)return l.CLUSTER_BREAK.LVT}else if(e===44200)return l.CLUSTER_BREAK.LV}else if(e<44228){if(44201<=e&&e<=44227)return l.CLUSTER_BREAK.LVT}else if(e<44229){if(e===44228)return l.CLUSTER_BREAK.LV}else if(44229<=e&&e<=44255)return l.CLUSTER_BREAK.LVT}else if(e<44313){if(e<44284){if(e<44257){if(e===44256)return l.CLUSTER_BREAK.LV}else if(44257<=e&&e<=44283)return l.CLUSTER_BREAK.LVT}else if(e<44285){if(e===44284)return l.CLUSTER_BREAK.LV}else if(e<44312){if(44285<=e&&e<=44311)return l.CLUSTER_BREAK.LVT}else if(e===44312)return l.CLUSTER_BREAK.LV}else if(e<44368){if(e<44340){if(44313<=e&&e<=44339)return l.CLUSTER_BREAK.LVT}else if(e<44341){if(e===44340)return l.CLUSTER_BREAK.LV}else if(44341<=e&&e<=44367)return l.CLUSTER_BREAK.LVT}else if(e<44369){if(e===44368)return l.CLUSTER_BREAK.LV}else if(e<44396){if(44369<=e&&e<=44395)return l.CLUSTER_BREAK.LVT}else if(e===44396)return l.CLUSTER_BREAK.LV}else if(e<44537){if(e<44480){if(e<44425){if(e<44424){if(44397<=e&&e<=44423)return l.CLUSTER_BREAK.LVT}else if(e===44424)return l.CLUSTER_BREAK.LV}else if(e<44452){if(44425<=e&&e<=44451)return l.CLUSTER_BREAK.LVT}else if(e<44453){if(e===44452)return l.CLUSTER_BREAK.LV}else if(44453<=e&&e<=44479)return l.CLUSTER_BREAK.LVT}else if(e<44508){if(e<44481){if(e===44480)return l.CLUSTER_BREAK.LV}else if(44481<=e&&e<=44507)return l.CLUSTER_BREAK.LVT}else if(e<44509){if(e===44508)return l.CLUSTER_BREAK.LV}else if(e<44536){if(44509<=e&&e<=44535)return l.CLUSTER_BREAK.LVT}else if(e===44536)return l.CLUSTER_BREAK.LV}else if(e<44620){if(e<44565){if(e<44564){if(44537<=e&&e<=44563)return l.CLUSTER_BREAK.LVT}else if(e===44564)return l.CLUSTER_BREAK.LV}else if(e<44592){if(44565<=e&&e<=44591)return l.CLUSTER_BREAK.LVT}else if(e<44593){if(e===44592)return l.CLUSTER_BREAK.LV}else if(44593<=e&&e<=44619)return l.CLUSTER_BREAK.LVT}else if(e<44649){if(e<44621){if(e===44620)return l.CLUSTER_BREAK.LV}else if(e<44648){if(44621<=e&&e<=44647)return l.CLUSTER_BREAK.LVT}else if(e===44648)return l.CLUSTER_BREAK.LV}else if(e<44676){if(44649<=e&&e<=44675)return l.CLUSTER_BREAK.LVT}else if(e<44677){if(e===44676)return l.CLUSTER_BREAK.LV}else if(44677<=e&&e<=44703)return l.CLUSTER_BREAK.LVT}else if(e<44985){if(e<44844){if(e<44761){if(e<44732){if(e<44705){if(e===44704)return l.CLUSTER_BREAK.LV}else if(44705<=e&&e<=44731)return l.CLUSTER_BREAK.LVT}else if(e<44733){if(e===44732)return l.CLUSTER_BREAK.LV}else if(e<44760){if(44733<=e&&e<=44759)return l.CLUSTER_BREAK.LVT}else if(e===44760)return l.CLUSTER_BREAK.LV}else if(e<44789){if(e<44788){if(44761<=e&&e<=44787)return l.CLUSTER_BREAK.LVT}else if(e===44788)return l.CLUSTER_BREAK.LV}else if(e<44816){if(44789<=e&&e<=44815)return l.CLUSTER_BREAK.LVT}else if(e<44817){if(e===44816)return l.CLUSTER_BREAK.LV}else if(44817<=e&&e<=44843)return l.CLUSTER_BREAK.LVT}else if(e<44901){if(e<44872){if(e<44845){if(e===44844)return l.CLUSTER_BREAK.LV}else if(44845<=e&&e<=44871)return l.CLUSTER_BREAK.LVT}else if(e<44873){if(e===44872)return l.CLUSTER_BREAK.LV}else if(e<44900){if(44873<=e&&e<=44899)return l.CLUSTER_BREAK.LVT}else if(e===44900)return l.CLUSTER_BREAK.LV}else if(e<44956){if(e<44928){if(44901<=e&&e<=44927)return l.CLUSTER_BREAK.LVT}else if(e<44929){if(e===44928)return l.CLUSTER_BREAK.LV}else if(44929<=e&&e<=44955)return l.CLUSTER_BREAK.LVT}else if(e<44957){if(e===44956)return l.CLUSTER_BREAK.LV}else if(e<44984){if(44957<=e&&e<=44983)return l.CLUSTER_BREAK.LVT}else if(e===44984)return l.CLUSTER_BREAK.LV}else if(e<45152){if(e<45068){if(e<45013){if(e<45012){if(44985<=e&&e<=45011)return l.CLUSTER_BREAK.LVT}else if(e===45012)return l.CLUSTER_BREAK.LV}else if(e<45040){if(45013<=e&&e<=45039)return l.CLUSTER_BREAK.LVT}else if(e<45041){if(e===45040)return l.CLUSTER_BREAK.LV}else if(45041<=e&&e<=45067)return l.CLUSTER_BREAK.LVT}else if(e<45097){if(e<45069){if(e===45068)return l.CLUSTER_BREAK.LV}else if(e<45096){if(45069<=e&&e<=45095)return l.CLUSTER_BREAK.LVT}else if(e===45096)return l.CLUSTER_BREAK.LV}else if(e<45124){if(45097<=e&&e<=45123)return l.CLUSTER_BREAK.LVT}else if(e<45125){if(e===45124)return l.CLUSTER_BREAK.LV}else if(45125<=e&&e<=45151)return l.CLUSTER_BREAK.LVT}else if(e<45209){if(e<45180){if(e<45153){if(e===45152)return l.CLUSTER_BREAK.LV}else if(45153<=e&&e<=45179)return l.CLUSTER_BREAK.LVT}else if(e<45181){if(e===45180)return l.CLUSTER_BREAK.LV}else if(e<45208){if(45181<=e&&e<=45207)return l.CLUSTER_BREAK.LVT}else if(e===45208)return l.CLUSTER_BREAK.LV}else if(e<45264){if(e<45236){if(45209<=e&&e<=45235)return l.CLUSTER_BREAK.LVT}else if(e<45237){if(e===45236)return l.CLUSTER_BREAK.LV}else if(45237<=e&&e<=45263)return l.CLUSTER_BREAK.LVT}else if(e<45265){if(e===45264)return l.CLUSTER_BREAK.LV}else if(e<45292){if(45265<=e&&e<=45291)return l.CLUSTER_BREAK.LVT}else if(e===45292)return l.CLUSTER_BREAK.LV}else if(e<45908){if(e<45600){if(e<45433){if(e<45376){if(e<45321){if(e<45320){if(45293<=e&&e<=45319)return l.CLUSTER_BREAK.LVT}else if(e===45320)return l.CLUSTER_BREAK.LV}else if(e<45348){if(45321<=e&&e<=45347)return l.CLUSTER_BREAK.LVT}else if(e<45349){if(e===45348)return l.CLUSTER_BREAK.LV}else if(45349<=e&&e<=45375)return l.CLUSTER_BREAK.LVT}else if(e<45404){if(e<45377){if(e===45376)return l.CLUSTER_BREAK.LV}else if(45377<=e&&e<=45403)return l.CLUSTER_BREAK.LVT}else if(e<45405){if(e===45404)return l.CLUSTER_BREAK.LV}else if(e<45432){if(45405<=e&&e<=45431)return l.CLUSTER_BREAK.LVT}else if(e===45432)return l.CLUSTER_BREAK.LV}else if(e<45516){if(e<45461){if(e<45460){if(45433<=e&&e<=45459)return l.CLUSTER_BREAK.LVT}else if(e===45460)return l.CLUSTER_BREAK.LV}else if(e<45488){if(45461<=e&&e<=45487)return l.CLUSTER_BREAK.LVT}else if(e<45489){if(e===45488)return l.CLUSTER_BREAK.LV}else if(45489<=e&&e<=45515)return l.CLUSTER_BREAK.LVT}else if(e<45545){if(e<45517){if(e===45516)return l.CLUSTER_BREAK.LV}else if(e<45544){if(45517<=e&&e<=45543)return l.CLUSTER_BREAK.LVT}else if(e===45544)return l.CLUSTER_BREAK.LV}else if(e<45572){if(45545<=e&&e<=45571)return l.CLUSTER_BREAK.LVT}else if(e<45573){if(e===45572)return l.CLUSTER_BREAK.LV}else if(45573<=e&&e<=45599)return l.CLUSTER_BREAK.LVT}else if(e<45741){if(e<45657){if(e<45628){if(e<45601){if(e===45600)return l.CLUSTER_BREAK.LV}else if(45601<=e&&e<=45627)return l.CLUSTER_BREAK.LVT}else if(e<45629){if(e===45628)return l.CLUSTER_BREAK.LV}else if(e<45656){if(45629<=e&&e<=45655)return l.CLUSTER_BREAK.LVT}else if(e===45656)return l.CLUSTER_BREAK.LV}else if(e<45712){if(e<45684){if(45657<=e&&e<=45683)return l.CLUSTER_BREAK.LVT}else if(e<45685){if(e===45684)return l.CLUSTER_BREAK.LV}else if(45685<=e&&e<=45711)return l.CLUSTER_BREAK.LVT}else if(e<45713){if(e===45712)return l.CLUSTER_BREAK.LV}else if(e<45740){if(45713<=e&&e<=45739)return l.CLUSTER_BREAK.LVT}else if(e===45740)return l.CLUSTER_BREAK.LV}else if(e<45824){if(e<45769){if(e<45768){if(45741<=e&&e<=45767)return l.CLUSTER_BREAK.LVT}else if(e===45768)return l.CLUSTER_BREAK.LV}else if(e<45796){if(45769<=e&&e<=45795)return l.CLUSTER_BREAK.LVT}else if(e<45797){if(e===45796)return l.CLUSTER_BREAK.LV}else if(45797<=e&&e<=45823)return l.CLUSTER_BREAK.LVT}else if(e<45853){if(e<45825){if(e===45824)return l.CLUSTER_BREAK.LV}else if(e<45852){if(45825<=e&&e<=45851)return l.CLUSTER_BREAK.LVT}else if(e===45852)return l.CLUSTER_BREAK.LV}else if(e<45880){if(45853<=e&&e<=45879)return l.CLUSTER_BREAK.LVT}else if(e<45881){if(e===45880)return l.CLUSTER_BREAK.LV}else if(45881<=e&&e<=45907)return l.CLUSTER_BREAK.LVT}else if(e<46189){if(e<46048){if(e<45965){if(e<45936){if(e<45909){if(e===45908)return l.CLUSTER_BREAK.LV}else if(45909<=e&&e<=45935)return l.CLUSTER_BREAK.LVT}else if(e<45937){if(e===45936)return l.CLUSTER_BREAK.LV}else if(e<45964){if(45937<=e&&e<=45963)return l.CLUSTER_BREAK.LVT}else if(e===45964)return l.CLUSTER_BREAK.LV}else if(e<45993){if(e<45992){if(45965<=e&&e<=45991)return l.CLUSTER_BREAK.LVT}else if(e===45992)return l.CLUSTER_BREAK.LV}else if(e<46020){if(45993<=e&&e<=46019)return l.CLUSTER_BREAK.LVT}else if(e<46021){if(e===46020)return l.CLUSTER_BREAK.LV}else if(46021<=e&&e<=46047)return l.CLUSTER_BREAK.LVT}else if(e<46105){if(e<46076){if(e<46049){if(e===46048)return l.CLUSTER_BREAK.LV}else if(46049<=e&&e<=46075)return l.CLUSTER_BREAK.LVT}else if(e<46077){if(e===46076)return l.CLUSTER_BREAK.LV}else if(e<46104){if(46077<=e&&e<=46103)return l.CLUSTER_BREAK.LVT}else if(e===46104)return l.CLUSTER_BREAK.LV}else if(e<46160){if(e<46132){if(46105<=e&&e<=46131)return l.CLUSTER_BREAK.LVT}else if(e<46133){if(e===46132)return l.CLUSTER_BREAK.LV}else if(46133<=e&&e<=46159)return l.CLUSTER_BREAK.LVT}else if(e<46161){if(e===46160)return l.CLUSTER_BREAK.LV}else if(e<46188){if(46161<=e&&e<=46187)return l.CLUSTER_BREAK.LVT}else if(e===46188)return l.CLUSTER_BREAK.LV}else if(e<46356){if(e<46272){if(e<46217){if(e<46216){if(46189<=e&&e<=46215)return l.CLUSTER_BREAK.LVT}else if(e===46216)return l.CLUSTER_BREAK.LV}else if(e<46244){if(46217<=e&&e<=46243)return l.CLUSTER_BREAK.LVT}else if(e<46245){if(e===46244)return l.CLUSTER_BREAK.LV}else if(46245<=e&&e<=46271)return l.CLUSTER_BREAK.LVT}else if(e<46301){if(e<46273){if(e===46272)return l.CLUSTER_BREAK.LV}else if(e<46300){if(46273<=e&&e<=46299)return l.CLUSTER_BREAK.LVT}else if(e===46300)return l.CLUSTER_BREAK.LV}else if(e<46328){if(46301<=e&&e<=46327)return l.CLUSTER_BREAK.LVT}else if(e<46329){if(e===46328)return l.CLUSTER_BREAK.LV}else if(46329<=e&&e<=46355)return l.CLUSTER_BREAK.LVT}else if(e<46413){if(e<46384){if(e<46357){if(e===46356)return l.CLUSTER_BREAK.LV}else if(46357<=e&&e<=46383)return l.CLUSTER_BREAK.LVT}else if(e<46385){if(e===46384)return l.CLUSTER_BREAK.LV}else if(e<46412){if(46385<=e&&e<=46411)return l.CLUSTER_BREAK.LVT}else if(e===46412)return l.CLUSTER_BREAK.LV}else if(e<46468){if(e<46440){if(46413<=e&&e<=46439)return l.CLUSTER_BREAK.LVT}else if(e<46441){if(e===46440)return l.CLUSTER_BREAK.LV}else if(46441<=e&&e<=46467)return l.CLUSTER_BREAK.LVT}else if(e<46469){if(e===46468)return l.CLUSTER_BREAK.LV}else if(e<46496){if(46469<=e&&e<=46495)return l.CLUSTER_BREAK.LVT}else if(e===46496)return l.CLUSTER_BREAK.LV}else if(e<47701){if(e<47112){if(e<46804){if(e<46637){if(e<46580){if(e<46525){if(e<46524){if(46497<=e&&e<=46523)return l.CLUSTER_BREAK.LVT}else if(e===46524)return l.CLUSTER_BREAK.LV}else if(e<46552){if(46525<=e&&e<=46551)return l.CLUSTER_BREAK.LVT}else if(e<46553){if(e===46552)return l.CLUSTER_BREAK.LV}else if(46553<=e&&e<=46579)return l.CLUSTER_BREAK.LVT}else if(e<46608){if(e<46581){if(e===46580)return l.CLUSTER_BREAK.LV}else if(46581<=e&&e<=46607)return l.CLUSTER_BREAK.LVT}else if(e<46609){if(e===46608)return l.CLUSTER_BREAK.LV}else if(e<46636){if(46609<=e&&e<=46635)return l.CLUSTER_BREAK.LVT}else if(e===46636)return l.CLUSTER_BREAK.LV}else if(e<46720){if(e<46665){if(e<46664){if(46637<=e&&e<=46663)return l.CLUSTER_BREAK.LVT}else if(e===46664)return l.CLUSTER_BREAK.LV}else if(e<46692){if(46665<=e&&e<=46691)return l.CLUSTER_BREAK.LVT}else if(e<46693){if(e===46692)return l.CLUSTER_BREAK.LV}else if(46693<=e&&e<=46719)return l.CLUSTER_BREAK.LVT}else if(e<46749){if(e<46721){if(e===46720)return l.CLUSTER_BREAK.LV}else if(e<46748){if(46721<=e&&e<=46747)return l.CLUSTER_BREAK.LVT}else if(e===46748)return l.CLUSTER_BREAK.LV}else if(e<46776){if(46749<=e&&e<=46775)return l.CLUSTER_BREAK.LVT}else if(e<46777){if(e===46776)return l.CLUSTER_BREAK.LV}else if(46777<=e&&e<=46803)return l.CLUSTER_BREAK.LVT}else if(e<46945){if(e<46861){if(e<46832){if(e<46805){if(e===46804)return l.CLUSTER_BREAK.LV}else if(46805<=e&&e<=46831)return l.CLUSTER_BREAK.LVT}else if(e<46833){if(e===46832)return l.CLUSTER_BREAK.LV}else if(e<46860){if(46833<=e&&e<=46859)return l.CLUSTER_BREAK.LVT}else if(e===46860)return l.CLUSTER_BREAK.LV}else if(e<46916){if(e<46888){if(46861<=e&&e<=46887)return l.CLUSTER_BREAK.LVT}else if(e<46889){if(e===46888)return l.CLUSTER_BREAK.LV}else if(46889<=e&&e<=46915)return l.CLUSTER_BREAK.LVT}else if(e<46917){if(e===46916)return l.CLUSTER_BREAK.LV}else if(e<46944){if(46917<=e&&e<=46943)return l.CLUSTER_BREAK.LVT}else if(e===46944)return l.CLUSTER_BREAK.LV}else if(e<47028){if(e<46973){if(e<46972){if(46945<=e&&e<=46971)return l.CLUSTER_BREAK.LVT}else if(e===46972)return l.CLUSTER_BREAK.LV}else if(e<47e3){if(46973<=e&&e<=46999)return l.CLUSTER_BREAK.LVT}else if(e<47001){if(e===47e3)return l.CLUSTER_BREAK.LV}else if(47001<=e&&e<=47027)return l.CLUSTER_BREAK.LVT}else if(e<47057){if(e<47029){if(e===47028)return l.CLUSTER_BREAK.LV}else if(e<47056){if(47029<=e&&e<=47055)return l.CLUSTER_BREAK.LVT}else if(e===47056)return l.CLUSTER_BREAK.LV}else if(e<47084){if(47057<=e&&e<=47083)return l.CLUSTER_BREAK.LVT}else if(e<47085){if(e===47084)return l.CLUSTER_BREAK.LV}else if(47085<=e&&e<=47111)return l.CLUSTER_BREAK.LVT}else if(e<47393){if(e<47252){if(e<47169){if(e<47140){if(e<47113){if(e===47112)return l.CLUSTER_BREAK.LV}else if(47113<=e&&e<=47139)return l.CLUSTER_BREAK.LVT}else if(e<47141){if(e===47140)return l.CLUSTER_BREAK.LV}else if(e<47168){if(47141<=e&&e<=47167)return l.CLUSTER_BREAK.LVT}else if(e===47168)return l.CLUSTER_BREAK.LV}else if(e<47197){if(e<47196){if(47169<=e&&e<=47195)return l.CLUSTER_BREAK.LVT}else if(e===47196)return l.CLUSTER_BREAK.LV}else if(e<47224){if(47197<=e&&e<=47223)return l.CLUSTER_BREAK.LVT}else if(e<47225){if(e===47224)return l.CLUSTER_BREAK.LV}else if(47225<=e&&e<=47251)return l.CLUSTER_BREAK.LVT}else if(e<47309){if(e<47280){if(e<47253){if(e===47252)return l.CLUSTER_BREAK.LV}else if(47253<=e&&e<=47279)return l.CLUSTER_BREAK.LVT}else if(e<47281){if(e===47280)return l.CLUSTER_BREAK.LV}else if(e<47308){if(47281<=e&&e<=47307)return l.CLUSTER_BREAK.LVT}else if(e===47308)return l.CLUSTER_BREAK.LV}else if(e<47364){if(e<47336){if(47309<=e&&e<=47335)return l.CLUSTER_BREAK.LVT}else if(e<47337){if(e===47336)return l.CLUSTER_BREAK.LV}else if(47337<=e&&e<=47363)return l.CLUSTER_BREAK.LVT}else if(e<47365){if(e===47364)return l.CLUSTER_BREAK.LV}else if(e<47392){if(47365<=e&&e<=47391)return l.CLUSTER_BREAK.LVT}else if(e===47392)return l.CLUSTER_BREAK.LV}else if(e<47560){if(e<47476){if(e<47421){if(e<47420){if(47393<=e&&e<=47419)return l.CLUSTER_BREAK.LVT}else if(e===47420)return l.CLUSTER_BREAK.LV}else if(e<47448){if(47421<=e&&e<=47447)return l.CLUSTER_BREAK.LVT}else if(e<47449){if(e===47448)return l.CLUSTER_BREAK.LV}else if(47449<=e&&e<=47475)return l.CLUSTER_BREAK.LVT}else if(e<47505){if(e<47477){if(e===47476)return l.CLUSTER_BREAK.LV}else if(e<47504){if(47477<=e&&e<=47503)return l.CLUSTER_BREAK.LVT}else if(e===47504)return l.CLUSTER_BREAK.LV}else if(e<47532){if(47505<=e&&e<=47531)return l.CLUSTER_BREAK.LVT}else if(e<47533){if(e===47532)return l.CLUSTER_BREAK.LV}else if(47533<=e&&e<=47559)return l.CLUSTER_BREAK.LVT}else if(e<47617){if(e<47588){if(e<47561){if(e===47560)return l.CLUSTER_BREAK.LV}else if(47561<=e&&e<=47587)return l.CLUSTER_BREAK.LVT}else if(e<47589){if(e===47588)return l.CLUSTER_BREAK.LV}else if(e<47616){if(47589<=e&&e<=47615)return l.CLUSTER_BREAK.LVT}else if(e===47616)return l.CLUSTER_BREAK.LV}else if(e<47672){if(e<47644){if(47617<=e&&e<=47643)return l.CLUSTER_BREAK.LVT}else if(e<47645){if(e===47644)return l.CLUSTER_BREAK.LV}else if(47645<=e&&e<=47671)return l.CLUSTER_BREAK.LVT}else if(e<47673){if(e===47672)return l.CLUSTER_BREAK.LV}else if(e<47700){if(47673<=e&&e<=47699)return l.CLUSTER_BREAK.LVT}else if(e===47700)return l.CLUSTER_BREAK.LV}else if(e<48316){if(e<48008){if(e<47841){if(e<47784){if(e<47729){if(e<47728){if(47701<=e&&e<=47727)return l.CLUSTER_BREAK.LVT}else if(e===47728)return l.CLUSTER_BREAK.LV}else if(e<47756){if(47729<=e&&e<=47755)return l.CLUSTER_BREAK.LVT}else if(e<47757){if(e===47756)return l.CLUSTER_BREAK.LV}else if(47757<=e&&e<=47783)return l.CLUSTER_BREAK.LVT}else if(e<47812){if(e<47785){if(e===47784)return l.CLUSTER_BREAK.LV}else if(47785<=e&&e<=47811)return l.CLUSTER_BREAK.LVT}else if(e<47813){if(e===47812)return l.CLUSTER_BREAK.LV}else if(e<47840){if(47813<=e&&e<=47839)return l.CLUSTER_BREAK.LVT}else if(e===47840)return l.CLUSTER_BREAK.LV}else if(e<47924){if(e<47869){if(e<47868){if(47841<=e&&e<=47867)return l.CLUSTER_BREAK.LVT}else if(e===47868)return l.CLUSTER_BREAK.LV}else if(e<47896){if(47869<=e&&e<=47895)return l.CLUSTER_BREAK.LVT}else if(e<47897){if(e===47896)return l.CLUSTER_BREAK.LV}else if(47897<=e&&e<=47923)return l.CLUSTER_BREAK.LVT}else if(e<47953){if(e<47925){if(e===47924)return l.CLUSTER_BREAK.LV}else if(e<47952){if(47925<=e&&e<=47951)return l.CLUSTER_BREAK.LVT}else if(e===47952)return l.CLUSTER_BREAK.LV}else if(e<47980){if(47953<=e&&e<=47979)return l.CLUSTER_BREAK.LVT}else if(e<47981){if(e===47980)return l.CLUSTER_BREAK.LV}else if(47981<=e&&e<=48007)return l.CLUSTER_BREAK.LVT}else if(e<48149){if(e<48065){if(e<48036){if(e<48009){if(e===48008)return l.CLUSTER_BREAK.LV}else if(48009<=e&&e<=48035)return l.CLUSTER_BREAK.LVT}else if(e<48037){if(e===48036)return l.CLUSTER_BREAK.LV}else if(e<48064){if(48037<=e&&e<=48063)return l.CLUSTER_BREAK.LVT}else if(e===48064)return l.CLUSTER_BREAK.LV}else if(e<48120){if(e<48092){if(48065<=e&&e<=48091)return l.CLUSTER_BREAK.LVT}else if(e<48093){if(e===48092)return l.CLUSTER_BREAK.LV}else if(48093<=e&&e<=48119)return l.CLUSTER_BREAK.LVT}else if(e<48121){if(e===48120)return l.CLUSTER_BREAK.LV}else if(e<48148){if(48121<=e&&e<=48147)return l.CLUSTER_BREAK.LVT}else if(e===48148)return l.CLUSTER_BREAK.LV}else if(e<48232){if(e<48177){if(e<48176){if(48149<=e&&e<=48175)return l.CLUSTER_BREAK.LVT}else if(e===48176)return l.CLUSTER_BREAK.LV}else if(e<48204){if(48177<=e&&e<=48203)return l.CLUSTER_BREAK.LVT}else if(e<48205){if(e===48204)return l.CLUSTER_BREAK.LV}else if(48205<=e&&e<=48231)return l.CLUSTER_BREAK.LVT}else if(e<48261){if(e<48233){if(e===48232)return l.CLUSTER_BREAK.LV}else if(e<48260){if(48233<=e&&e<=48259)return l.CLUSTER_BREAK.LVT}else if(e===48260)return l.CLUSTER_BREAK.LV}else if(e<48288){if(48261<=e&&e<=48287)return l.CLUSTER_BREAK.LVT}else if(e<48289){if(e===48288)return l.CLUSTER_BREAK.LV}else if(48289<=e&&e<=48315)return l.CLUSTER_BREAK.LVT}else if(e<48597){if(e<48456){if(e<48373){if(e<48344){if(e<48317){if(e===48316)return l.CLUSTER_BREAK.LV}else if(48317<=e&&e<=48343)return l.CLUSTER_BREAK.LVT}else if(e<48345){if(e===48344)return l.CLUSTER_BREAK.LV}else if(e<48372){if(48345<=e&&e<=48371)return l.CLUSTER_BREAK.LVT}else if(e===48372)return l.CLUSTER_BREAK.LV}else if(e<48401){if(e<48400){if(48373<=e&&e<=48399)return l.CLUSTER_BREAK.LVT}else if(e===48400)return l.CLUSTER_BREAK.LV}else if(e<48428){if(48401<=e&&e<=48427)return l.CLUSTER_BREAK.LVT}else if(e<48429){if(e===48428)return l.CLUSTER_BREAK.LV}else if(48429<=e&&e<=48455)return l.CLUSTER_BREAK.LVT}else if(e<48513){if(e<48484){if(e<48457){if(e===48456)return l.CLUSTER_BREAK.LV}else if(48457<=e&&e<=48483)return l.CLUSTER_BREAK.LVT}else if(e<48485){if(e===48484)return l.CLUSTER_BREAK.LV}else if(e<48512){if(48485<=e&&e<=48511)return l.CLUSTER_BREAK.LVT}else if(e===48512)return l.CLUSTER_BREAK.LV}else if(e<48568){if(e<48540){if(48513<=e&&e<=48539)return l.CLUSTER_BREAK.LVT}else if(e<48541){if(e===48540)return l.CLUSTER_BREAK.LV}else if(48541<=e&&e<=48567)return l.CLUSTER_BREAK.LVT}else if(e<48569){if(e===48568)return l.CLUSTER_BREAK.LV}else if(e<48596){if(48569<=e&&e<=48595)return l.CLUSTER_BREAK.LVT}else if(e===48596)return l.CLUSTER_BREAK.LV}else if(e<48764){if(e<48680){if(e<48625){if(e<48624){if(48597<=e&&e<=48623)return l.CLUSTER_BREAK.LVT}else if(e===48624)return l.CLUSTER_BREAK.LV}else if(e<48652){if(48625<=e&&e<=48651)return l.CLUSTER_BREAK.LVT}else if(e<48653){if(e===48652)return l.CLUSTER_BREAK.LV}else if(48653<=e&&e<=48679)return l.CLUSTER_BREAK.LVT}else if(e<48709){if(e<48681){if(e===48680)return l.CLUSTER_BREAK.LV}else if(e<48708){if(48681<=e&&e<=48707)return l.CLUSTER_BREAK.LVT}else if(e===48708)return l.CLUSTER_BREAK.LV}else if(e<48736){if(48709<=e&&e<=48735)return l.CLUSTER_BREAK.LVT}else if(e<48737){if(e===48736)return l.CLUSTER_BREAK.LV}else if(48737<=e&&e<=48763)return l.CLUSTER_BREAK.LVT}else if(e<48821){if(e<48792){if(e<48765){if(e===48764)return l.CLUSTER_BREAK.LV}else if(48765<=e&&e<=48791)return l.CLUSTER_BREAK.LVT}else if(e<48793){if(e===48792)return l.CLUSTER_BREAK.LV}else if(e<48820){if(48793<=e&&e<=48819)return l.CLUSTER_BREAK.LVT}else if(e===48820)return l.CLUSTER_BREAK.LV}else if(e<48876){if(e<48848){if(48821<=e&&e<=48847)return l.CLUSTER_BREAK.LVT}else if(e<48849){if(e===48848)return l.CLUSTER_BREAK.LV}else if(48849<=e&&e<=48875)return l.CLUSTER_BREAK.LVT}else if(e<48877){if(e===48876)return l.CLUSTER_BREAK.LV}else if(e<48904){if(48877<=e&&e<=48903)return l.CLUSTER_BREAK.LVT}else if(e===48904)return l.CLUSTER_BREAK.LV}else if(e<53720){if(e<51312){if(e<50108){if(e<49493){if(e<49212){if(e<49045){if(e<48988){if(e<48933){if(e<48932){if(48905<=e&&e<=48931)return l.CLUSTER_BREAK.LVT}else if(e===48932)return l.CLUSTER_BREAK.LV}else if(e<48960){if(48933<=e&&e<=48959)return l.CLUSTER_BREAK.LVT}else if(e<48961){if(e===48960)return l.CLUSTER_BREAK.LV}else if(48961<=e&&e<=48987)return l.CLUSTER_BREAK.LVT}else if(e<49016){if(e<48989){if(e===48988)return l.CLUSTER_BREAK.LV}else if(48989<=e&&e<=49015)return l.CLUSTER_BREAK.LVT}else if(e<49017){if(e===49016)return l.CLUSTER_BREAK.LV}else if(e<49044){if(49017<=e&&e<=49043)return l.CLUSTER_BREAK.LVT}else if(e===49044)return l.CLUSTER_BREAK.LV}else if(e<49128){if(e<49073){if(e<49072){if(49045<=e&&e<=49071)return l.CLUSTER_BREAK.LVT}else if(e===49072)return l.CLUSTER_BREAK.LV}else if(e<49100){if(49073<=e&&e<=49099)return l.CLUSTER_BREAK.LVT}else if(e<49101){if(e===49100)return l.CLUSTER_BREAK.LV}else if(49101<=e&&e<=49127)return l.CLUSTER_BREAK.LVT}else if(e<49157){if(e<49129){if(e===49128)return l.CLUSTER_BREAK.LV}else if(e<49156){if(49129<=e&&e<=49155)return l.CLUSTER_BREAK.LVT}else if(e===49156)return l.CLUSTER_BREAK.LV}else if(e<49184){if(49157<=e&&e<=49183)return l.CLUSTER_BREAK.LVT}else if(e<49185){if(e===49184)return l.CLUSTER_BREAK.LV}else if(49185<=e&&e<=49211)return l.CLUSTER_BREAK.LVT}else if(e<49352){if(e<49269){if(e<49240){if(e<49213){if(e===49212)return l.CLUSTER_BREAK.LV}else if(49213<=e&&e<=49239)return l.CLUSTER_BREAK.LVT}else if(e<49241){if(e===49240)return l.CLUSTER_BREAK.LV}else if(e<49268){if(49241<=e&&e<=49267)return l.CLUSTER_BREAK.LVT}else if(e===49268)return l.CLUSTER_BREAK.LV}else if(e<49297){if(e<49296){if(49269<=e&&e<=49295)return l.CLUSTER_BREAK.LVT}else if(e===49296)return l.CLUSTER_BREAK.LV}else if(e<49324){if(49297<=e&&e<=49323)return l.CLUSTER_BREAK.LVT}else if(e<49325){if(e===49324)return l.CLUSTER_BREAK.LV}else if(49325<=e&&e<=49351)return l.CLUSTER_BREAK.LVT}else if(e<49409){if(e<49380){if(e<49353){if(e===49352)return l.CLUSTER_BREAK.LV}else if(49353<=e&&e<=49379)return l.CLUSTER_BREAK.LVT}else if(e<49381){if(e===49380)return l.CLUSTER_BREAK.LV}else if(e<49408){if(49381<=e&&e<=49407)return l.CLUSTER_BREAK.LVT}else if(e===49408)return l.CLUSTER_BREAK.LV}else if(e<49464){if(e<49436){if(49409<=e&&e<=49435)return l.CLUSTER_BREAK.LVT}else if(e<49437){if(e===49436)return l.CLUSTER_BREAK.LV}else if(49437<=e&&e<=49463)return l.CLUSTER_BREAK.LVT}else if(e<49465){if(e===49464)return l.CLUSTER_BREAK.LV}else if(e<49492){if(49465<=e&&e<=49491)return l.CLUSTER_BREAK.LVT}else if(e===49492)return l.CLUSTER_BREAK.LV}else if(e<49800){if(e<49633){if(e<49576){if(e<49521){if(e<49520){if(49493<=e&&e<=49519)return l.CLUSTER_BREAK.LVT}else if(e===49520)return l.CLUSTER_BREAK.LV}else if(e<49548){if(49521<=e&&e<=49547)return l.CLUSTER_BREAK.LVT}else if(e<49549){if(e===49548)return l.CLUSTER_BREAK.LV}else if(49549<=e&&e<=49575)return l.CLUSTER_BREAK.LVT}else if(e<49604){if(e<49577){if(e===49576)return l.CLUSTER_BREAK.LV}else if(49577<=e&&e<=49603)return l.CLUSTER_BREAK.LVT}else if(e<49605){if(e===49604)return l.CLUSTER_BREAK.LV}else if(e<49632){if(49605<=e&&e<=49631)return l.CLUSTER_BREAK.LVT}else if(e===49632)return l.CLUSTER_BREAK.LV}else if(e<49716){if(e<49661){if(e<49660){if(49633<=e&&e<=49659)return l.CLUSTER_BREAK.LVT}else if(e===49660)return l.CLUSTER_BREAK.LV}else if(e<49688){if(49661<=e&&e<=49687)return l.CLUSTER_BREAK.LVT}else if(e<49689){if(e===49688)return l.CLUSTER_BREAK.LV}else if(49689<=e&&e<=49715)return l.CLUSTER_BREAK.LVT}else if(e<49745){if(e<49717){if(e===49716)return l.CLUSTER_BREAK.LV}else if(e<49744){if(49717<=e&&e<=49743)return l.CLUSTER_BREAK.LVT}else if(e===49744)return l.CLUSTER_BREAK.LV}else if(e<49772){if(49745<=e&&e<=49771)return l.CLUSTER_BREAK.LVT}else if(e<49773){if(e===49772)return l.CLUSTER_BREAK.LV}else if(49773<=e&&e<=49799)return l.CLUSTER_BREAK.LVT}else if(e<49941){if(e<49857){if(e<49828){if(e<49801){if(e===49800)return l.CLUSTER_BREAK.LV}else if(49801<=e&&e<=49827)return l.CLUSTER_BREAK.LVT}else if(e<49829){if(e===49828)return l.CLUSTER_BREAK.LV}else if(e<49856){if(49829<=e&&e<=49855)return l.CLUSTER_BREAK.LVT}else if(e===49856)return l.CLUSTER_BREAK.LV}else if(e<49912){if(e<49884){if(49857<=e&&e<=49883)return l.CLUSTER_BREAK.LVT}else if(e<49885){if(e===49884)return l.CLUSTER_BREAK.LV}else if(49885<=e&&e<=49911)return l.CLUSTER_BREAK.LVT}else if(e<49913){if(e===49912)return l.CLUSTER_BREAK.LV}else if(e<49940){if(49913<=e&&e<=49939)return l.CLUSTER_BREAK.LVT}else if(e===49940)return l.CLUSTER_BREAK.LV}else if(e<50024){if(e<49969){if(e<49968){if(49941<=e&&e<=49967)return l.CLUSTER_BREAK.LVT}else if(e===49968)return l.CLUSTER_BREAK.LV}else if(e<49996){if(49969<=e&&e<=49995)return l.CLUSTER_BREAK.LVT}else if(e<49997){if(e===49996)return l.CLUSTER_BREAK.LV}else if(49997<=e&&e<=50023)return l.CLUSTER_BREAK.LVT}else if(e<50053){if(e<50025){if(e===50024)return l.CLUSTER_BREAK.LV}else if(e<50052){if(50025<=e&&e<=50051)return l.CLUSTER_BREAK.LVT}else if(e===50052)return l.CLUSTER_BREAK.LV}else if(e<50080){if(50053<=e&&e<=50079)return l.CLUSTER_BREAK.LVT}else if(e<50081){if(e===50080)return l.CLUSTER_BREAK.LV}else if(50081<=e&&e<=50107)return l.CLUSTER_BREAK.LVT}else if(e<50697){if(e<50389){if(e<50248){if(e<50165){if(e<50136){if(e<50109){if(e===50108)return l.CLUSTER_BREAK.LV}else if(50109<=e&&e<=50135)return l.CLUSTER_BREAK.LVT}else if(e<50137){if(e===50136)return l.CLUSTER_BREAK.LV}else if(e<50164){if(50137<=e&&e<=50163)return l.CLUSTER_BREAK.LVT}else if(e===50164)return l.CLUSTER_BREAK.LV}else if(e<50193){if(e<50192){if(50165<=e&&e<=50191)return l.CLUSTER_BREAK.LVT}else if(e===50192)return l.CLUSTER_BREAK.LV}else if(e<50220){if(50193<=e&&e<=50219)return l.CLUSTER_BREAK.LVT}else if(e<50221){if(e===50220)return l.CLUSTER_BREAK.LV}else if(50221<=e&&e<=50247)return l.CLUSTER_BREAK.LVT}else if(e<50305){if(e<50276){if(e<50249){if(e===50248)return l.CLUSTER_BREAK.LV}else if(50249<=e&&e<=50275)return l.CLUSTER_BREAK.LVT}else if(e<50277){if(e===50276)return l.CLUSTER_BREAK.LV}else if(e<50304){if(50277<=e&&e<=50303)return l.CLUSTER_BREAK.LVT}else if(e===50304)return l.CLUSTER_BREAK.LV}else if(e<50360){if(e<50332){if(50305<=e&&e<=50331)return l.CLUSTER_BREAK.LVT}else if(e<50333){if(e===50332)return l.CLUSTER_BREAK.LV}else if(50333<=e&&e<=50359)return l.CLUSTER_BREAK.LVT}else if(e<50361){if(e===50360)return l.CLUSTER_BREAK.LV}else if(e<50388){if(50361<=e&&e<=50387)return l.CLUSTER_BREAK.LVT}else if(e===50388)return l.CLUSTER_BREAK.LV}else if(e<50556){if(e<50472){if(e<50417){if(e<50416){if(50389<=e&&e<=50415)return l.CLUSTER_BREAK.LVT}else if(e===50416)return l.CLUSTER_BREAK.LV}else if(e<50444){if(50417<=e&&e<=50443)return l.CLUSTER_BREAK.LVT}else if(e<50445){if(e===50444)return l.CLUSTER_BREAK.LV}else if(50445<=e&&e<=50471)return l.CLUSTER_BREAK.LVT}else if(e<50501){if(e<50473){if(e===50472)return l.CLUSTER_BREAK.LV}else if(e<50500){if(50473<=e&&e<=50499)return l.CLUSTER_BREAK.LVT}else if(e===50500)return l.CLUSTER_BREAK.LV}else if(e<50528){if(50501<=e&&e<=50527)return l.CLUSTER_BREAK.LVT}else if(e<50529){if(e===50528)return l.CLUSTER_BREAK.LV}else if(50529<=e&&e<=50555)return l.CLUSTER_BREAK.LVT}else if(e<50613){if(e<50584){if(e<50557){if(e===50556)return l.CLUSTER_BREAK.LV}else if(50557<=e&&e<=50583)return l.CLUSTER_BREAK.LVT}else if(e<50585){if(e===50584)return l.CLUSTER_BREAK.LV}else if(e<50612){if(50585<=e&&e<=50611)return l.CLUSTER_BREAK.LVT}else if(e===50612)return l.CLUSTER_BREAK.LV}else if(e<50668){if(e<50640){if(50613<=e&&e<=50639)return l.CLUSTER_BREAK.LVT}else if(e<50641){if(e===50640)return l.CLUSTER_BREAK.LV}else if(50641<=e&&e<=50667)return l.CLUSTER_BREAK.LVT}else if(e<50669){if(e===50668)return l.CLUSTER_BREAK.LV}else if(e<50696){if(50669<=e&&e<=50695)return l.CLUSTER_BREAK.LVT}else if(e===50696)return l.CLUSTER_BREAK.LV}else if(e<51004){if(e<50837){if(e<50780){if(e<50725){if(e<50724){if(50697<=e&&e<=50723)return l.CLUSTER_BREAK.LVT}else if(e===50724)return l.CLUSTER_BREAK.LV}else if(e<50752){if(50725<=e&&e<=50751)return l.CLUSTER_BREAK.LVT}else if(e<50753){if(e===50752)return l.CLUSTER_BREAK.LV}else if(50753<=e&&e<=50779)return l.CLUSTER_BREAK.LVT}else if(e<50808){if(e<50781){if(e===50780)return l.CLUSTER_BREAK.LV}else if(50781<=e&&e<=50807)return l.CLUSTER_BREAK.LVT}else if(e<50809){if(e===50808)return l.CLUSTER_BREAK.LV}else if(e<50836){if(50809<=e&&e<=50835)return l.CLUSTER_BREAK.LVT}else if(e===50836)return l.CLUSTER_BREAK.LV}else if(e<50920){if(e<50865){if(e<50864){if(50837<=e&&e<=50863)return l.CLUSTER_BREAK.LVT}else if(e===50864)return l.CLUSTER_BREAK.LV}else if(e<50892){if(50865<=e&&e<=50891)return l.CLUSTER_BREAK.LVT}else if(e<50893){if(e===50892)return l.CLUSTER_BREAK.LV}else if(50893<=e&&e<=50919)return l.CLUSTER_BREAK.LVT}else if(e<50949){if(e<50921){if(e===50920)return l.CLUSTER_BREAK.LV}else if(e<50948){if(50921<=e&&e<=50947)return l.CLUSTER_BREAK.LVT}else if(e===50948)return l.CLUSTER_BREAK.LV}else if(e<50976){if(50949<=e&&e<=50975)return l.CLUSTER_BREAK.LVT}else if(e<50977){if(e===50976)return l.CLUSTER_BREAK.LV}else if(50977<=e&&e<=51003)return l.CLUSTER_BREAK.LVT}else if(e<51145){if(e<51061){if(e<51032){if(e<51005){if(e===51004)return l.CLUSTER_BREAK.LV}else if(51005<=e&&e<=51031)return l.CLUSTER_BREAK.LVT}else if(e<51033){if(e===51032)return l.CLUSTER_BREAK.LV}else if(e<51060){if(51033<=e&&e<=51059)return l.CLUSTER_BREAK.LVT}else if(e===51060)return l.CLUSTER_BREAK.LV}else if(e<51116){if(e<51088){if(51061<=e&&e<=51087)return l.CLUSTER_BREAK.LVT}else if(e<51089){if(e===51088)return l.CLUSTER_BREAK.LV}else if(51089<=e&&e<=51115)return l.CLUSTER_BREAK.LVT}else if(e<51117){if(e===51116)return l.CLUSTER_BREAK.LV}else if(e<51144){if(51117<=e&&e<=51143)return l.CLUSTER_BREAK.LVT}else if(e===51144)return l.CLUSTER_BREAK.LV}else if(e<51228){if(e<51173){if(e<51172){if(51145<=e&&e<=51171)return l.CLUSTER_BREAK.LVT}else if(e===51172)return l.CLUSTER_BREAK.LV}else if(e<51200){if(51173<=e&&e<=51199)return l.CLUSTER_BREAK.LVT}else if(e<51201){if(e===51200)return l.CLUSTER_BREAK.LV}else if(51201<=e&&e<=51227)return l.CLUSTER_BREAK.LVT}else if(e<51257){if(e<51229){if(e===51228)return l.CLUSTER_BREAK.LV}else if(e<51256){if(51229<=e&&e<=51255)return l.CLUSTER_BREAK.LVT}else if(e===51256)return l.CLUSTER_BREAK.LV}else if(e<51284){if(51257<=e&&e<=51283)return l.CLUSTER_BREAK.LVT}else if(e<51285){if(e===51284)return l.CLUSTER_BREAK.LV}else if(51285<=e&&e<=51311)return l.CLUSTER_BREAK.LVT}else if(e<52516){if(e<51901){if(e<51593){if(e<51452){if(e<51369){if(e<51340){if(e<51313){if(e===51312)return l.CLUSTER_BREAK.LV}else if(51313<=e&&e<=51339)return l.CLUSTER_BREAK.LVT}else if(e<51341){if(e===51340)return l.CLUSTER_BREAK.LV}else if(e<51368){if(51341<=e&&e<=51367)return l.CLUSTER_BREAK.LVT}else if(e===51368)return l.CLUSTER_BREAK.LV}else if(e<51397){if(e<51396){if(51369<=e&&e<=51395)return l.CLUSTER_BREAK.LVT}else if(e===51396)return l.CLUSTER_BREAK.LV}else if(e<51424){if(51397<=e&&e<=51423)return l.CLUSTER_BREAK.LVT}else if(e<51425){if(e===51424)return l.CLUSTER_BREAK.LV}else if(51425<=e&&e<=51451)return l.CLUSTER_BREAK.LVT}else if(e<51509){if(e<51480){if(e<51453){if(e===51452)return l.CLUSTER_BREAK.LV}else if(51453<=e&&e<=51479)return l.CLUSTER_BREAK.LVT}else if(e<51481){if(e===51480)return l.CLUSTER_BREAK.LV}else if(e<51508){if(51481<=e&&e<=51507)return l.CLUSTER_BREAK.LVT}else if(e===51508)return l.CLUSTER_BREAK.LV}else if(e<51564){if(e<51536){if(51509<=e&&e<=51535)return l.CLUSTER_BREAK.LVT}else if(e<51537){if(e===51536)return l.CLUSTER_BREAK.LV}else if(51537<=e&&e<=51563)return l.CLUSTER_BREAK.LVT}else if(e<51565){if(e===51564)return l.CLUSTER_BREAK.LV}else if(e<51592){if(51565<=e&&e<=51591)return l.CLUSTER_BREAK.LVT}else if(e===51592)return l.CLUSTER_BREAK.LV}else if(e<51760){if(e<51676){if(e<51621){if(e<51620){if(51593<=e&&e<=51619)return l.CLUSTER_BREAK.LVT}else if(e===51620)return l.CLUSTER_BREAK.LV}else if(e<51648){if(51621<=e&&e<=51647)return l.CLUSTER_BREAK.LVT}else if(e<51649){if(e===51648)return l.CLUSTER_BREAK.LV}else if(51649<=e&&e<=51675)return l.CLUSTER_BREAK.LVT}else if(e<51705){if(e<51677){if(e===51676)return l.CLUSTER_BREAK.LV}else if(e<51704){if(51677<=e&&e<=51703)return l.CLUSTER_BREAK.LVT}else if(e===51704)return l.CLUSTER_BREAK.LV}else if(e<51732){if(51705<=e&&e<=51731)return l.CLUSTER_BREAK.LVT}else if(e<51733){if(e===51732)return l.CLUSTER_BREAK.LV}else if(51733<=e&&e<=51759)return l.CLUSTER_BREAK.LVT}else if(e<51817){if(e<51788){if(e<51761){if(e===51760)return l.CLUSTER_BREAK.LV}else if(51761<=e&&e<=51787)return l.CLUSTER_BREAK.LVT}else if(e<51789){if(e===51788)return l.CLUSTER_BREAK.LV}else if(e<51816){if(51789<=e&&e<=51815)return l.CLUSTER_BREAK.LVT}else if(e===51816)return l.CLUSTER_BREAK.LV}else if(e<51872){if(e<51844){if(51817<=e&&e<=51843)return l.CLUSTER_BREAK.LVT}else if(e<51845){if(e===51844)return l.CLUSTER_BREAK.LV}else if(51845<=e&&e<=51871)return l.CLUSTER_BREAK.LVT}else if(e<51873){if(e===51872)return l.CLUSTER_BREAK.LV}else if(e<51900){if(51873<=e&&e<=51899)return l.CLUSTER_BREAK.LVT}else if(e===51900)return l.CLUSTER_BREAK.LV}else if(e<52208){if(e<52041){if(e<51984){if(e<51929){if(e<51928){if(51901<=e&&e<=51927)return l.CLUSTER_BREAK.LVT}else if(e===51928)return l.CLUSTER_BREAK.LV}else if(e<51956){if(51929<=e&&e<=51955)return l.CLUSTER_BREAK.LVT}else if(e<51957){if(e===51956)return l.CLUSTER_BREAK.LV}else if(51957<=e&&e<=51983)return l.CLUSTER_BREAK.LVT}else if(e<52012){if(e<51985){if(e===51984)return l.CLUSTER_BREAK.LV}else if(51985<=e&&e<=52011)return l.CLUSTER_BREAK.LVT}else if(e<52013){if(e===52012)return l.CLUSTER_BREAK.LV}else if(e<52040){if(52013<=e&&e<=52039)return l.CLUSTER_BREAK.LVT}else if(e===52040)return l.CLUSTER_BREAK.LV}else if(e<52124){if(e<52069){if(e<52068){if(52041<=e&&e<=52067)return l.CLUSTER_BREAK.LVT}else if(e===52068)return l.CLUSTER_BREAK.LV}else if(e<52096){if(52069<=e&&e<=52095)return l.CLUSTER_BREAK.LVT}else if(e<52097){if(e===52096)return l.CLUSTER_BREAK.LV}else if(52097<=e&&e<=52123)return l.CLUSTER_BREAK.LVT}else if(e<52153){if(e<52125){if(e===52124)return l.CLUSTER_BREAK.LV}else if(e<52152){if(52125<=e&&e<=52151)return l.CLUSTER_BREAK.LVT}else if(e===52152)return l.CLUSTER_BREAK.LV}else if(e<52180){if(52153<=e&&e<=52179)return l.CLUSTER_BREAK.LVT}else if(e<52181){if(e===52180)return l.CLUSTER_BREAK.LV}else if(52181<=e&&e<=52207)return l.CLUSTER_BREAK.LVT}else if(e<52349){if(e<52265){if(e<52236){if(e<52209){if(e===52208)return l.CLUSTER_BREAK.LV}else if(52209<=e&&e<=52235)return l.CLUSTER_BREAK.LVT}else if(e<52237){if(e===52236)return l.CLUSTER_BREAK.LV}else if(e<52264){if(52237<=e&&e<=52263)return l.CLUSTER_BREAK.LVT}else if(e===52264)return l.CLUSTER_BREAK.LV}else if(e<52320){if(e<52292){if(52265<=e&&e<=52291)return l.CLUSTER_BREAK.LVT}else if(e<52293){if(e===52292)return l.CLUSTER_BREAK.LV}else if(52293<=e&&e<=52319)return l.CLUSTER_BREAK.LVT}else if(e<52321){if(e===52320)return l.CLUSTER_BREAK.LV}else if(e<52348){if(52321<=e&&e<=52347)return l.CLUSTER_BREAK.LVT}else if(e===52348)return l.CLUSTER_BREAK.LV}else if(e<52432){if(e<52377){if(e<52376){if(52349<=e&&e<=52375)return l.CLUSTER_BREAK.LVT}else if(e===52376)return l.CLUSTER_BREAK.LV}else if(e<52404){if(52377<=e&&e<=52403)return l.CLUSTER_BREAK.LVT}else if(e<52405){if(e===52404)return l.CLUSTER_BREAK.LV}else if(52405<=e&&e<=52431)return l.CLUSTER_BREAK.LVT}else if(e<52461){if(e<52433){if(e===52432)return l.CLUSTER_BREAK.LV}else if(e<52460){if(52433<=e&&e<=52459)return l.CLUSTER_BREAK.LVT}else if(e===52460)return l.CLUSTER_BREAK.LV}else if(e<52488){if(52461<=e&&e<=52487)return l.CLUSTER_BREAK.LVT}else if(e<52489){if(e===52488)return l.CLUSTER_BREAK.LV}else if(52489<=e&&e<=52515)return l.CLUSTER_BREAK.LVT}else if(e<53105){if(e<52797){if(e<52656){if(e<52573){if(e<52544){if(e<52517){if(e===52516)return l.CLUSTER_BREAK.LV}else if(52517<=e&&e<=52543)return l.CLUSTER_BREAK.LVT}else if(e<52545){if(e===52544)return l.CLUSTER_BREAK.LV}else if(e<52572){if(52545<=e&&e<=52571)return l.CLUSTER_BREAK.LVT}else if(e===52572)return l.CLUSTER_BREAK.LV}else if(e<52601){if(e<52600){if(52573<=e&&e<=52599)return l.CLUSTER_BREAK.LVT}else if(e===52600)return l.CLUSTER_BREAK.LV}else if(e<52628){if(52601<=e&&e<=52627)return l.CLUSTER_BREAK.LVT}else if(e<52629){if(e===52628)return l.CLUSTER_BREAK.LV}else if(52629<=e&&e<=52655)return l.CLUSTER_BREAK.LVT}else if(e<52713){if(e<52684){if(e<52657){if(e===52656)return l.CLUSTER_BREAK.LV}else if(52657<=e&&e<=52683)return l.CLUSTER_BREAK.LVT}else if(e<52685){if(e===52684)return l.CLUSTER_BREAK.LV}else if(e<52712){if(52685<=e&&e<=52711)return l.CLUSTER_BREAK.LVT}else if(e===52712)return l.CLUSTER_BREAK.LV}else if(e<52768){if(e<52740){if(52713<=e&&e<=52739)return l.CLUSTER_BREAK.LVT}else if(e<52741){if(e===52740)return l.CLUSTER_BREAK.LV}else if(52741<=e&&e<=52767)return l.CLUSTER_BREAK.LVT}else if(e<52769){if(e===52768)return l.CLUSTER_BREAK.LV}else if(e<52796){if(52769<=e&&e<=52795)return l.CLUSTER_BREAK.LVT}else if(e===52796)return l.CLUSTER_BREAK.LV}else if(e<52964){if(e<52880){if(e<52825){if(e<52824){if(52797<=e&&e<=52823)return l.CLUSTER_BREAK.LVT}else if(e===52824)return l.CLUSTER_BREAK.LV}else if(e<52852){if(52825<=e&&e<=52851)return l.CLUSTER_BREAK.LVT}else if(e<52853){if(e===52852)return l.CLUSTER_BREAK.LV}else if(52853<=e&&e<=52879)return l.CLUSTER_BREAK.LVT}else if(e<52909){if(e<52881){if(e===52880)return l.CLUSTER_BREAK.LV}else if(e<52908){if(52881<=e&&e<=52907)return l.CLUSTER_BREAK.LVT}else if(e===52908)return l.CLUSTER_BREAK.LV}else if(e<52936){if(52909<=e&&e<=52935)return l.CLUSTER_BREAK.LVT}else if(e<52937){if(e===52936)return l.CLUSTER_BREAK.LV}else if(52937<=e&&e<=52963)return l.CLUSTER_BREAK.LVT}else if(e<53021){if(e<52992){if(e<52965){if(e===52964)return l.CLUSTER_BREAK.LV}else if(52965<=e&&e<=52991)return l.CLUSTER_BREAK.LVT}else if(e<52993){if(e===52992)return l.CLUSTER_BREAK.LV}else if(e<53020){if(52993<=e&&e<=53019)return l.CLUSTER_BREAK.LVT}else if(e===53020)return l.CLUSTER_BREAK.LV}else if(e<53076){if(e<53048){if(53021<=e&&e<=53047)return l.CLUSTER_BREAK.LVT}else if(e<53049){if(e===53048)return l.CLUSTER_BREAK.LV}else if(53049<=e&&e<=53075)return l.CLUSTER_BREAK.LVT}else if(e<53077){if(e===53076)return l.CLUSTER_BREAK.LV}else if(e<53104){if(53077<=e&&e<=53103)return l.CLUSTER_BREAK.LVT}else if(e===53104)return l.CLUSTER_BREAK.LV}else if(e<53412){if(e<53245){if(e<53188){if(e<53133){if(e<53132){if(53105<=e&&e<=53131)return l.CLUSTER_BREAK.LVT}else if(e===53132)return l.CLUSTER_BREAK.LV}else if(e<53160){if(53133<=e&&e<=53159)return l.CLUSTER_BREAK.LVT}else if(e<53161){if(e===53160)return l.CLUSTER_BREAK.LV}else if(53161<=e&&e<=53187)return l.CLUSTER_BREAK.LVT}else if(e<53216){if(e<53189){if(e===53188)return l.CLUSTER_BREAK.LV}else if(53189<=e&&e<=53215)return l.CLUSTER_BREAK.LVT}else if(e<53217){if(e===53216)return l.CLUSTER_BREAK.LV}else if(e<53244){if(53217<=e&&e<=53243)return l.CLUSTER_BREAK.LVT}else if(e===53244)return l.CLUSTER_BREAK.LV}else if(e<53328){if(e<53273){if(e<53272){if(53245<=e&&e<=53271)return l.CLUSTER_BREAK.LVT}else if(e===53272)return l.CLUSTER_BREAK.LV}else if(e<53300){if(53273<=e&&e<=53299)return l.CLUSTER_BREAK.LVT}else if(e<53301){if(e===53300)return l.CLUSTER_BREAK.LV}else if(53301<=e&&e<=53327)return l.CLUSTER_BREAK.LVT}else if(e<53357){if(e<53329){if(e===53328)return l.CLUSTER_BREAK.LV}else if(e<53356){if(53329<=e&&e<=53355)return l.CLUSTER_BREAK.LVT}else if(e===53356)return l.CLUSTER_BREAK.LV}else if(e<53384){if(53357<=e&&e<=53383)return l.CLUSTER_BREAK.LVT}else if(e<53385){if(e===53384)return l.CLUSTER_BREAK.LV}else if(53385<=e&&e<=53411)return l.CLUSTER_BREAK.LVT}else if(e<53553){if(e<53469){if(e<53440){if(e<53413){if(e===53412)return l.CLUSTER_BREAK.LV}else if(53413<=e&&e<=53439)return l.CLUSTER_BREAK.LVT}else if(e<53441){if(e===53440)return l.CLUSTER_BREAK.LV}else if(e<53468){if(53441<=e&&e<=53467)return l.CLUSTER_BREAK.LVT}else if(e===53468)return l.CLUSTER_BREAK.LV}else if(e<53524){if(e<53496){if(53469<=e&&e<=53495)return l.CLUSTER_BREAK.LVT}else if(e<53497){if(e===53496)return l.CLUSTER_BREAK.LV}else if(53497<=e&&e<=53523)return l.CLUSTER_BREAK.LVT}else if(e<53525){if(e===53524)return l.CLUSTER_BREAK.LV}else if(e<53552){if(53525<=e&&e<=53551)return l.CLUSTER_BREAK.LVT}else if(e===53552)return l.CLUSTER_BREAK.LV}else if(e<53636){if(e<53581){if(e<53580){if(53553<=e&&e<=53579)return l.CLUSTER_BREAK.LVT}else if(e===53580)return l.CLUSTER_BREAK.LV}else if(e<53608){if(53581<=e&&e<=53607)return l.CLUSTER_BREAK.LVT}else if(e<53609){if(e===53608)return l.CLUSTER_BREAK.LV}else if(53609<=e&&e<=53635)return l.CLUSTER_BREAK.LVT}else if(e<53665){if(e<53637){if(e===53636)return l.CLUSTER_BREAK.LV}else if(e<53664){if(53637<=e&&e<=53663)return l.CLUSTER_BREAK.LVT}else if(e===53664)return l.CLUSTER_BREAK.LV}else if(e<53692){if(53665<=e&&e<=53691)return l.CLUSTER_BREAK.LVT}else if(e<53693){if(e===53692)return l.CLUSTER_BREAK.LV}else if(53693<=e&&e<=53719)return l.CLUSTER_BREAK.LVT}else if(e<70459){if(e<54897){if(e<54308){if(e<54001){if(e<53860){if(e<53777){if(e<53748){if(e<53721){if(e===53720)return l.CLUSTER_BREAK.LV}else if(53721<=e&&e<=53747)return l.CLUSTER_BREAK.LVT}else if(e<53749){if(e===53748)return l.CLUSTER_BREAK.LV}else if(e<53776){if(53749<=e&&e<=53775)return l.CLUSTER_BREAK.LVT}else if(e===53776)return l.CLUSTER_BREAK.LV}else if(e<53805){if(e<53804){if(53777<=e&&e<=53803)return l.CLUSTER_BREAK.LVT}else if(e===53804)return l.CLUSTER_BREAK.LV}else if(e<53832){if(53805<=e&&e<=53831)return l.CLUSTER_BREAK.LVT}else if(e<53833){if(e===53832)return l.CLUSTER_BREAK.LV}else if(53833<=e&&e<=53859)return l.CLUSTER_BREAK.LVT}else if(e<53917){if(e<53888){if(e<53861){if(e===53860)return l.CLUSTER_BREAK.LV}else if(53861<=e&&e<=53887)return l.CLUSTER_BREAK.LVT}else if(e<53889){if(e===53888)return l.CLUSTER_BREAK.LV}else if(e<53916){if(53889<=e&&e<=53915)return l.CLUSTER_BREAK.LVT}else if(e===53916)return l.CLUSTER_BREAK.LV}else if(e<53972){if(e<53944){if(53917<=e&&e<=53943)return l.CLUSTER_BREAK.LVT}else if(e<53945){if(e===53944)return l.CLUSTER_BREAK.LV}else if(53945<=e&&e<=53971)return l.CLUSTER_BREAK.LVT}else if(e<53973){if(e===53972)return l.CLUSTER_BREAK.LV}else if(e<54e3){if(53973<=e&&e<=53999)return l.CLUSTER_BREAK.LVT}else if(e===54e3)return l.CLUSTER_BREAK.LV}else if(e<54141){if(e<54084){if(e<54029){if(e<54028){if(54001<=e&&e<=54027)return l.CLUSTER_BREAK.LVT}else if(e===54028)return l.CLUSTER_BREAK.LV}else if(e<54056){if(54029<=e&&e<=54055)return l.CLUSTER_BREAK.LVT}else if(e<54057){if(e===54056)return l.CLUSTER_BREAK.LV}else if(54057<=e&&e<=54083)return l.CLUSTER_BREAK.LVT}else if(e<54112){if(e<54085){if(e===54084)return l.CLUSTER_BREAK.LV}else if(54085<=e&&e<=54111)return l.CLUSTER_BREAK.LVT}else if(e<54113){if(e===54112)return l.CLUSTER_BREAK.LV}else if(e<54140){if(54113<=e&&e<=54139)return l.CLUSTER_BREAK.LVT}else if(e===54140)return l.CLUSTER_BREAK.LV}else if(e<54224){if(e<54169){if(e<54168){if(54141<=e&&e<=54167)return l.CLUSTER_BREAK.LVT}else if(e===54168)return l.CLUSTER_BREAK.LV}else if(e<54196){if(54169<=e&&e<=54195)return l.CLUSTER_BREAK.LVT}else if(e<54197){if(e===54196)return l.CLUSTER_BREAK.LV}else if(54197<=e&&e<=54223)return l.CLUSTER_BREAK.LVT}else if(e<54253){if(e<54225){if(e===54224)return l.CLUSTER_BREAK.LV}else if(e<54252){if(54225<=e&&e<=54251)return l.CLUSTER_BREAK.LVT}else if(e===54252)return l.CLUSTER_BREAK.LV}else if(e<54280){if(54253<=e&&e<=54279)return l.CLUSTER_BREAK.LVT}else if(e<54281){if(e===54280)return l.CLUSTER_BREAK.LV}else if(54281<=e&&e<=54307)return l.CLUSTER_BREAK.LVT}else if(e<54589){if(e<54448){if(e<54365){if(e<54336){if(e<54309){if(e===54308)return l.CLUSTER_BREAK.LV}else if(54309<=e&&e<=54335)return l.CLUSTER_BREAK.LVT}else if(e<54337){if(e===54336)return l.CLUSTER_BREAK.LV}else if(e<54364){if(54337<=e&&e<=54363)return l.CLUSTER_BREAK.LVT}else if(e===54364)return l.CLUSTER_BREAK.LV}else if(e<54393){if(e<54392){if(54365<=e&&e<=54391)return l.CLUSTER_BREAK.LVT}else if(e===54392)return l.CLUSTER_BREAK.LV}else if(e<54420){if(54393<=e&&e<=54419)return l.CLUSTER_BREAK.LVT}else if(e<54421){if(e===54420)return l.CLUSTER_BREAK.LV}else if(54421<=e&&e<=54447)return l.CLUSTER_BREAK.LVT}else if(e<54505){if(e<54476){if(e<54449){if(e===54448)return l.CLUSTER_BREAK.LV}else if(54449<=e&&e<=54475)return l.CLUSTER_BREAK.LVT}else if(e<54477){if(e===54476)return l.CLUSTER_BREAK.LV}else if(e<54504){if(54477<=e&&e<=54503)return l.CLUSTER_BREAK.LVT}else if(e===54504)return l.CLUSTER_BREAK.LV}else if(e<54560){if(e<54532){if(54505<=e&&e<=54531)return l.CLUSTER_BREAK.LVT}else if(e<54533){if(e===54532)return l.CLUSTER_BREAK.LV}else if(54533<=e&&e<=54559)return l.CLUSTER_BREAK.LVT}else if(e<54561){if(e===54560)return l.CLUSTER_BREAK.LV}else if(e<54588){if(54561<=e&&e<=54587)return l.CLUSTER_BREAK.LVT}else if(e===54588)return l.CLUSTER_BREAK.LV}else if(e<54756){if(e<54672){if(e<54617){if(e<54616){if(54589<=e&&e<=54615)return l.CLUSTER_BREAK.LVT}else if(e===54616)return l.CLUSTER_BREAK.LV}else if(e<54644){if(54617<=e&&e<=54643)return l.CLUSTER_BREAK.LVT}else if(e<54645){if(e===54644)return l.CLUSTER_BREAK.LV}else if(54645<=e&&e<=54671)return l.CLUSTER_BREAK.LVT}else if(e<54701){if(e<54673){if(e===54672)return l.CLUSTER_BREAK.LV}else if(e<54700){if(54673<=e&&e<=54699)return l.CLUSTER_BREAK.LVT}else if(e===54700)return l.CLUSTER_BREAK.LV}else if(e<54728){if(54701<=e&&e<=54727)return l.CLUSTER_BREAK.LVT}else if(e<54729){if(e===54728)return l.CLUSTER_BREAK.LV}else if(54729<=e&&e<=54755)return l.CLUSTER_BREAK.LVT}else if(e<54813){if(e<54784){if(e<54757){if(e===54756)return l.CLUSTER_BREAK.LV}else if(54757<=e&&e<=54783)return l.CLUSTER_BREAK.LVT}else if(e<54785){if(e===54784)return l.CLUSTER_BREAK.LV}else if(e<54812){if(54785<=e&&e<=54811)return l.CLUSTER_BREAK.LVT}else if(e===54812)return l.CLUSTER_BREAK.LV}else if(e<54868){if(e<54840){if(54813<=e&&e<=54839)return l.CLUSTER_BREAK.LVT}else if(e<54841){if(e===54840)return l.CLUSTER_BREAK.LV}else if(54841<=e&&e<=54867)return l.CLUSTER_BREAK.LVT}else if(e<54869){if(e===54868)return l.CLUSTER_BREAK.LV}else if(e<54896){if(54869<=e&&e<=54895)return l.CLUSTER_BREAK.LVT}else if(e===54896)return l.CLUSTER_BREAK.LV}else if(e<69632){if(e<55216){if(e<55037){if(e<54980){if(e<54925){if(e<54924){if(54897<=e&&e<=54923)return l.CLUSTER_BREAK.LVT}else if(e===54924)return l.CLUSTER_BREAK.LV}else if(e<54952){if(54925<=e&&e<=54951)return l.CLUSTER_BREAK.LVT}else if(e<54953){if(e===54952)return l.CLUSTER_BREAK.LV}else if(54953<=e&&e<=54979)return l.CLUSTER_BREAK.LVT}else if(e<55008){if(e<54981){if(e===54980)return l.CLUSTER_BREAK.LV}else if(54981<=e&&e<=55007)return l.CLUSTER_BREAK.LVT}else if(e<55009){if(e===55008)return l.CLUSTER_BREAK.LV}else if(e<55036){if(55009<=e&&e<=55035)return l.CLUSTER_BREAK.LVT}else if(e===55036)return l.CLUSTER_BREAK.LV}else if(e<55120){if(e<55065){if(e<55064){if(55037<=e&&e<=55063)return l.CLUSTER_BREAK.LVT}else if(e===55064)return l.CLUSTER_BREAK.LV}else if(e<55092){if(55065<=e&&e<=55091)return l.CLUSTER_BREAK.LVT}else if(e<55093){if(e===55092)return l.CLUSTER_BREAK.LV}else if(55093<=e&&e<=55119)return l.CLUSTER_BREAK.LVT}else if(e<55149){if(e<55121){if(e===55120)return l.CLUSTER_BREAK.LV}else if(e<55148){if(55121<=e&&e<=55147)return l.CLUSTER_BREAK.LVT}else if(e===55148)return l.CLUSTER_BREAK.LV}else if(e<55176){if(55149<=e&&e<=55175)return l.CLUSTER_BREAK.LVT}else if(e<55177){if(e===55176)return l.CLUSTER_BREAK.LV}else if(55177<=e&&e<=55203)return l.CLUSTER_BREAK.LVT}else if(e<68097){if(e<65279){if(e<64286){if(e<55243){if(55216<=e&&e<=55238)return l.CLUSTER_BREAK.V}else if(55243<=e&&e<=55291)return l.CLUSTER_BREAK.T}else if(e<65024){if(e===64286)return l.CLUSTER_BREAK.EXTEND}else if(e<65056){if(65024<=e&&e<=65039)return l.CLUSTER_BREAK.EXTEND}else if(65056<=e&&e<=65071)return l.CLUSTER_BREAK.EXTEND}else if(e<66045){if(e<65438){if(e===65279)return l.CLUSTER_BREAK.CONTROL}else if(e<65520){if(65438<=e&&e<=65439)return l.CLUSTER_BREAK.EXTEND}else if(65520<=e&&e<=65531)return l.CLUSTER_BREAK.CONTROL}else if(e<66272){if(e===66045)return l.CLUSTER_BREAK.EXTEND}else if(e<66422){if(e===66272)return l.CLUSTER_BREAK.EXTEND}else if(66422<=e&&e<=66426)return l.CLUSTER_BREAK.EXTEND}else if(e<68325){if(e<68108){if(e<68101){if(68097<=e&&e<=68099)return l.CLUSTER_BREAK.EXTEND}else if(68101<=e&&e<=68102)return l.CLUSTER_BREAK.EXTEND}else if(e<68152){if(68108<=e&&e<=68111)return l.CLUSTER_BREAK.EXTEND}else if(e<68159){if(68152<=e&&e<=68154)return l.CLUSTER_BREAK.EXTEND}else if(e===68159)return l.CLUSTER_BREAK.EXTEND}else if(e<69373){if(e<68900){if(68325<=e&&e<=68326)return l.CLUSTER_BREAK.EXTEND}else if(e<69291){if(68900<=e&&e<=68903)return l.CLUSTER_BREAK.EXTEND}else if(69291<=e&&e<=69292)return l.CLUSTER_BREAK.EXTEND}else if(e<69446){if(69373<=e&&e<=69375)return l.CLUSTER_BREAK.EXTEND}else if(e<69506){if(69446<=e&&e<=69456)return l.CLUSTER_BREAK.EXTEND}else if(69506<=e&&e<=69509)return l.CLUSTER_BREAK.EXTEND}else if(e<70016){if(e<69815){if(e<69747){if(e<69634){if(e===69632)return l.CLUSTER_BREAK.SPACINGMARK;if(e===69633)return l.CLUSTER_BREAK.EXTEND}else if(e<69688){if(e===69634)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<69744){if(69688<=e&&e<=69702)return l.CLUSTER_BREAK.EXTEND}else if(e===69744)return l.CLUSTER_BREAK.EXTEND}else if(e<69762){if(e<69759){if(69747<=e&&e<=69748)return l.CLUSTER_BREAK.EXTEND}else if(69759<=e&&e<=69761)return l.CLUSTER_BREAK.EXTEND}else if(e<69808){if(e===69762)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<69811){if(69808<=e&&e<=69810)return l.CLUSTER_BREAK.SPACINGMARK}else if(69811<=e&&e<=69814)return l.CLUSTER_BREAK.EXTEND}else if(e<69888)if(e<69821){if(e<69817){if(69815<=e&&e<=69816)return l.CLUSTER_BREAK.SPACINGMARK}else if(69817<=e&&e<=69818)return l.CLUSTER_BREAK.EXTEND}else if(e<69826){if(e===69821)return l.CLUSTER_BREAK.PREPEND}else{if(e===69826)return l.CLUSTER_BREAK.EXTEND;if(e===69837)return l.CLUSTER_BREAK.PREPEND}else if(e<69933){if(e<69927){if(69888<=e&&e<=69890)return l.CLUSTER_BREAK.EXTEND}else if(e<69932){if(69927<=e&&e<=69931)return l.CLUSTER_BREAK.EXTEND}else if(e===69932)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<69957){if(69933<=e&&e<=69940)return l.CLUSTER_BREAK.EXTEND}else if(e<70003){if(69957<=e&&e<=69958)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===70003)return l.CLUSTER_BREAK.EXTEND}else if(e<70194){if(e<70082){if(e<70067){if(e<70018){if(70016<=e&&e<=70017)return l.CLUSTER_BREAK.EXTEND}else if(e===70018)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70070){if(70067<=e&&e<=70069)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70079){if(70070<=e&&e<=70078)return l.CLUSTER_BREAK.EXTEND}else if(70079<=e&&e<=70080)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70095){if(e<70089){if(70082<=e&&e<=70083)return l.CLUSTER_BREAK.PREPEND}else if(e<70094){if(70089<=e&&e<=70092)return l.CLUSTER_BREAK.EXTEND}else if(e===70094)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70188){if(e===70095)return l.CLUSTER_BREAK.EXTEND}else if(e<70191){if(70188<=e&&e<=70190)return l.CLUSTER_BREAK.SPACINGMARK}else if(70191<=e&&e<=70193)return l.CLUSTER_BREAK.EXTEND}else if(e<70209){if(e<70197){if(e<70196){if(70194<=e&&e<=70195)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===70196)return l.CLUSTER_BREAK.EXTEND}else if(e<70198){if(e===70197)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70206){if(70198<=e&&e<=70199)return l.CLUSTER_BREAK.EXTEND}else if(e===70206)return l.CLUSTER_BREAK.EXTEND}else if(e<70371){if(e<70367){if(e===70209)return l.CLUSTER_BREAK.EXTEND}else if(e<70368){if(e===70367)return l.CLUSTER_BREAK.EXTEND}else if(70368<=e&&e<=70370)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70400){if(70371<=e&&e<=70378)return l.CLUSTER_BREAK.EXTEND}else if(e<70402){if(70400<=e&&e<=70401)return l.CLUSTER_BREAK.EXTEND}else if(70402<=e&&e<=70403)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72343){if(e<71339){if(e<70841){if(e<70512){if(e<70471){if(e<70463){if(e<70462){if(70459<=e&&e<=70460)return l.CLUSTER_BREAK.EXTEND}else if(e===70462)return l.CLUSTER_BREAK.EXTEND}else if(e<70464){if(e===70463)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70465){if(e===70464)return l.CLUSTER_BREAK.EXTEND}else if(70465<=e&&e<=70468)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70487){if(e<70475){if(70471<=e&&e<=70472)return l.CLUSTER_BREAK.SPACINGMARK}else if(70475<=e&&e<=70477)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70498){if(e===70487)return l.CLUSTER_BREAK.EXTEND}else if(e<70502){if(70498<=e&&e<=70499)return l.CLUSTER_BREAK.SPACINGMARK}else if(70502<=e&&e<=70508)return l.CLUSTER_BREAK.EXTEND}else if(e<70725){if(e<70712){if(e<70709){if(70512<=e&&e<=70516)return l.CLUSTER_BREAK.EXTEND}else if(70709<=e&&e<=70711)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<70720){if(70712<=e&&e<=70719)return l.CLUSTER_BREAK.EXTEND}else if(e<70722){if(70720<=e&&e<=70721)return l.CLUSTER_BREAK.SPACINGMARK}else if(70722<=e&&e<=70724)return l.CLUSTER_BREAK.EXTEND}else if(e<70832){if(e<70726){if(e===70725)return l.CLUSTER_BREAK.SPACINGMARK}else if(e===70726||e===70750)return l.CLUSTER_BREAK.EXTEND}else if(e<70833){if(e===70832)return l.CLUSTER_BREAK.EXTEND}else if(e<70835){if(70833<=e&&e<=70834)return l.CLUSTER_BREAK.SPACINGMARK}else if(70835<=e&&e<=70840)return l.CLUSTER_BREAK.EXTEND}else if(e<71096){if(e<70847)if(e<70843){if(e===70841)return l.CLUSTER_BREAK.SPACINGMARK;if(e===70842)return l.CLUSTER_BREAK.EXTEND}else if(e<70845){if(70843<=e&&e<=70844)return l.CLUSTER_BREAK.SPACINGMARK}else{if(e===70845)return l.CLUSTER_BREAK.EXTEND;if(e===70846)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71087){if(e<70849){if(70847<=e&&e<=70848)return l.CLUSTER_BREAK.EXTEND}else if(e<70850){if(e===70849)return l.CLUSTER_BREAK.SPACINGMARK}else if(70850<=e&&e<=70851)return l.CLUSTER_BREAK.EXTEND}else if(e<71088){if(e===71087)return l.CLUSTER_BREAK.EXTEND}else if(e<71090){if(71088<=e&&e<=71089)return l.CLUSTER_BREAK.SPACINGMARK}else if(71090<=e&&e<=71093)return l.CLUSTER_BREAK.EXTEND}else if(e<71216){if(e<71102){if(e<71100){if(71096<=e&&e<=71099)return l.CLUSTER_BREAK.SPACINGMARK}else if(71100<=e&&e<=71101)return l.CLUSTER_BREAK.EXTEND}else if(e<71103){if(e===71102)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71132){if(71103<=e&&e<=71104)return l.CLUSTER_BREAK.EXTEND}else if(71132<=e&&e<=71133)return l.CLUSTER_BREAK.EXTEND}else if(e<71229){if(e<71219){if(71216<=e&&e<=71218)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71227){if(71219<=e&&e<=71226)return l.CLUSTER_BREAK.EXTEND}else if(71227<=e&&e<=71228)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71230){if(e===71229)return l.CLUSTER_BREAK.EXTEND}else if(e<71231){if(e===71230)return l.CLUSTER_BREAK.SPACINGMARK}else if(71231<=e&&e<=71232)return l.CLUSTER_BREAK.EXTEND}else if(e<71999)if(e<71463){if(e<71350){if(e<71341){if(e===71339)return l.CLUSTER_BREAK.EXTEND;if(e===71340)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71342){if(e===71341)return l.CLUSTER_BREAK.EXTEND}else if(e<71344){if(71342<=e&&e<=71343)return l.CLUSTER_BREAK.SPACINGMARK}else if(71344<=e&&e<=71349)return l.CLUSTER_BREAK.EXTEND}else if(e<71453){if(e===71350)return l.CLUSTER_BREAK.SPACINGMARK;if(e===71351)return l.CLUSTER_BREAK.EXTEND}else if(e<71458){if(71453<=e&&e<=71455)return l.CLUSTER_BREAK.EXTEND}else if(e<71462){if(71458<=e&&e<=71461)return l.CLUSTER_BREAK.EXTEND}else if(e===71462)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71984){if(e<71727){if(e<71724){if(71463<=e&&e<=71467)return l.CLUSTER_BREAK.EXTEND}else if(71724<=e&&e<=71726)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71736){if(71727<=e&&e<=71735)return l.CLUSTER_BREAK.EXTEND}else if(e<71737){if(e===71736)return l.CLUSTER_BREAK.SPACINGMARK}else if(71737<=e&&e<=71738)return l.CLUSTER_BREAK.EXTEND}else if(e<71995){if(e<71985){if(e===71984)return l.CLUSTER_BREAK.EXTEND}else if(e<71991){if(71985<=e&&e<=71989)return l.CLUSTER_BREAK.SPACINGMARK}else if(71991<=e&&e<=71992)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<71997){if(71995<=e&&e<=71996)return l.CLUSTER_BREAK.EXTEND}else{if(e===71997)return l.CLUSTER_BREAK.SPACINGMARK;if(e===71998)return l.CLUSTER_BREAK.EXTEND}else if(e<72193)if(e<72145)if(e<72001){if(e===71999)return l.CLUSTER_BREAK.PREPEND;if(e===72e3)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72002){if(e===72001)return l.CLUSTER_BREAK.PREPEND}else{if(e===72002)return l.CLUSTER_BREAK.SPACINGMARK;if(e===72003)return l.CLUSTER_BREAK.EXTEND}else if(e<72156){if(e<72148){if(72145<=e&&e<=72147)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72154){if(72148<=e&&e<=72151)return l.CLUSTER_BREAK.EXTEND}else if(72154<=e&&e<=72155)return l.CLUSTER_BREAK.EXTEND}else if(e<72160){if(72156<=e&&e<=72159)return l.CLUSTER_BREAK.SPACINGMARK}else{if(e===72160)return l.CLUSTER_BREAK.EXTEND;if(e===72164)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72263){if(e<72249){if(e<72243){if(72193<=e&&e<=72202)return l.CLUSTER_BREAK.EXTEND}else if(72243<=e&&e<=72248)return l.CLUSTER_BREAK.EXTEND}else if(e<72250){if(e===72249)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72251){if(e===72250)return l.CLUSTER_BREAK.PREPEND}else if(72251<=e&&e<=72254)return l.CLUSTER_BREAK.EXTEND}else if(e<72281){if(e<72273){if(e===72263)return l.CLUSTER_BREAK.EXTEND}else if(e<72279){if(72273<=e&&e<=72278)return l.CLUSTER_BREAK.EXTEND}else if(72279<=e&&e<=72280)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72324){if(72281<=e&&e<=72283)return l.CLUSTER_BREAK.EXTEND}else if(e<72330){if(72324<=e&&e<=72329)return l.CLUSTER_BREAK.PREPEND}else if(72330<=e&&e<=72342)return l.CLUSTER_BREAK.EXTEND}else if(e<94033){if(e<73104){if(e<72881){if(e<72766){if(e<72751){if(e<72344){if(e===72343)return l.CLUSTER_BREAK.SPACINGMARK}else if(72344<=e&&e<=72345)return l.CLUSTER_BREAK.EXTEND}else if(e<72752){if(e===72751)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<72760){if(72752<=e&&e<=72758)return l.CLUSTER_BREAK.EXTEND}else if(72760<=e&&e<=72765)return l.CLUSTER_BREAK.EXTEND}else if(e<72850){if(e===72766)return l.CLUSTER_BREAK.SPACINGMARK;if(e===72767)return l.CLUSTER_BREAK.EXTEND}else if(e<72873){if(72850<=e&&e<=72871)return l.CLUSTER_BREAK.EXTEND}else if(e<72874){if(e===72873)return l.CLUSTER_BREAK.SPACINGMARK}else if(72874<=e&&e<=72880)return l.CLUSTER_BREAK.EXTEND}else if(e<73018){if(e<72884){if(e<72882){if(e===72881)return l.CLUSTER_BREAK.SPACINGMARK}else if(72882<=e&&e<=72883)return l.CLUSTER_BREAK.EXTEND}else if(e<72885){if(e===72884)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<73009){if(72885<=e&&e<=72886)return l.CLUSTER_BREAK.EXTEND}else if(73009<=e&&e<=73014)return l.CLUSTER_BREAK.EXTEND}else if(e<73030){if(e<73020){if(e===73018)return l.CLUSTER_BREAK.EXTEND}else if(e<73023){if(73020<=e&&e<=73021)return l.CLUSTER_BREAK.EXTEND}else if(73023<=e&&e<=73029)return l.CLUSTER_BREAK.EXTEND}else if(e<73031){if(e===73030)return l.CLUSTER_BREAK.PREPEND}else if(e<73098){if(e===73031)return l.CLUSTER_BREAK.EXTEND}else if(73098<=e&&e<=73102)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<73526){if(e<73459)if(e<73109){if(e<73107){if(73104<=e&&e<=73105)return l.CLUSTER_BREAK.EXTEND}else if(73107<=e&&e<=73108)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<73110){if(e===73109)return l.CLUSTER_BREAK.EXTEND}else{if(e===73110)return l.CLUSTER_BREAK.SPACINGMARK;if(e===73111)return l.CLUSTER_BREAK.EXTEND}else if(e<73474){if(e<73461){if(73459<=e&&e<=73460)return l.CLUSTER_BREAK.EXTEND}else if(e<73472){if(73461<=e&&e<=73462)return l.CLUSTER_BREAK.SPACINGMARK}else if(73472<=e&&e<=73473)return l.CLUSTER_BREAK.EXTEND}else if(e<73475){if(e===73474)return l.CLUSTER_BREAK.PREPEND}else if(e<73524){if(e===73475)return l.CLUSTER_BREAK.SPACINGMARK}else if(73524<=e&&e<=73525)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<78896)if(e<73536){if(e<73534){if(73526<=e&&e<=73530)return l.CLUSTER_BREAK.EXTEND}else if(73534<=e&&e<=73535)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<73537){if(e===73536)return l.CLUSTER_BREAK.EXTEND}else{if(e===73537)return l.CLUSTER_BREAK.SPACINGMARK;if(e===73538)return l.CLUSTER_BREAK.EXTEND}else if(e<92912){if(e<78912){if(78896<=e&&e<=78911)return l.CLUSTER_BREAK.CONTROL}else if(e<78919){if(e===78912)return l.CLUSTER_BREAK.EXTEND}else if(78919<=e&&e<=78933)return l.CLUSTER_BREAK.EXTEND}else if(e<92976){if(92912<=e&&e<=92916)return l.CLUSTER_BREAK.EXTEND}else if(e<94031){if(92976<=e&&e<=92982)return l.CLUSTER_BREAK.EXTEND}else if(e===94031)return l.CLUSTER_BREAK.EXTEND}else if(e<121476){if(e<119143)if(e<113824){if(e<94180){if(e<94095){if(94033<=e&&e<=94087)return l.CLUSTER_BREAK.SPACINGMARK}else if(94095<=e&&e<=94098)return l.CLUSTER_BREAK.EXTEND}else if(e<94192){if(e===94180)return l.CLUSTER_BREAK.EXTEND}else if(e<113821){if(94192<=e&&e<=94193)return l.CLUSTER_BREAK.SPACINGMARK}else if(113821<=e&&e<=113822)return l.CLUSTER_BREAK.EXTEND}else if(e<118576){if(e<118528){if(113824<=e&&e<=113827)return l.CLUSTER_BREAK.CONTROL}else if(118528<=e&&e<=118573)return l.CLUSTER_BREAK.EXTEND}else if(e<119141){if(118576<=e&&e<=118598)return l.CLUSTER_BREAK.EXTEND}else{if(e===119141)return l.CLUSTER_BREAK.EXTEND;if(e===119142)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<119173){if(e<119150){if(e<119149){if(119143<=e&&e<=119145)return l.CLUSTER_BREAK.EXTEND}else if(e===119149)return l.CLUSTER_BREAK.SPACINGMARK}else if(e<119155){if(119150<=e&&e<=119154)return l.CLUSTER_BREAK.EXTEND}else if(e<119163){if(119155<=e&&e<=119162)return l.CLUSTER_BREAK.CONTROL}else if(119163<=e&&e<=119170)return l.CLUSTER_BREAK.EXTEND}else if(e<121344){if(e<119210){if(119173<=e&&e<=119179)return l.CLUSTER_BREAK.EXTEND}else if(e<119362){if(119210<=e&&e<=119213)return l.CLUSTER_BREAK.EXTEND}else if(119362<=e&&e<=119364)return l.CLUSTER_BREAK.EXTEND}else if(e<121403){if(121344<=e&&e<=121398)return l.CLUSTER_BREAK.EXTEND}else if(e<121461){if(121403<=e&&e<=121452)return l.CLUSTER_BREAK.EXTEND}else if(e===121461)return l.CLUSTER_BREAK.EXTEND}else if(e<123628){if(e<122907){if(e<121505){if(e<121499){if(e===121476)return l.CLUSTER_BREAK.EXTEND}else if(121499<=e&&e<=121503)return l.CLUSTER_BREAK.EXTEND}else if(e<122880){if(121505<=e&&e<=121519)return l.CLUSTER_BREAK.EXTEND}else if(e<122888){if(122880<=e&&e<=122886)return l.CLUSTER_BREAK.EXTEND}else if(122888<=e&&e<=122904)return l.CLUSTER_BREAK.EXTEND}else if(e<123023){if(e<122915){if(122907<=e&&e<=122913)return l.CLUSTER_BREAK.EXTEND}else if(e<122918){if(122915<=e&&e<=122916)return l.CLUSTER_BREAK.EXTEND}else if(122918<=e&&e<=122922)return l.CLUSTER_BREAK.EXTEND}else if(e<123184){if(e===123023)return l.CLUSTER_BREAK.EXTEND}else if(e<123566){if(123184<=e&&e<=123190)return l.CLUSTER_BREAK.EXTEND}else if(e===123566)return l.CLUSTER_BREAK.EXTEND}else if(e<127995){if(e<125136){if(e<124140){if(123628<=e&&e<=123631)return l.CLUSTER_BREAK.EXTEND}else if(124140<=e&&e<=124143)return l.CLUSTER_BREAK.EXTEND}else if(e<125252){if(125136<=e&&e<=125142)return l.CLUSTER_BREAK.EXTEND}else if(e<127462){if(125252<=e&&e<=125258)return l.CLUSTER_BREAK.EXTEND}else if(127462<=e&&e<=127487)return l.CLUSTER_BREAK.REGIONAL_INDICATOR}else if(e<917632){if(e<917504){if(127995<=e&&e<=127999)return l.CLUSTER_BREAK.EXTEND}else if(e<917536){if(917504<=e&&e<=917535)return l.CLUSTER_BREAK.CONTROL}else if(917536<=e&&e<=917631)return l.CLUSTER_BREAK.EXTEND}else if(e<917760){if(917632<=e&&e<=917759)return l.CLUSTER_BREAK.CONTROL}else if(e<918e3){if(917760<=e&&e<=917999)return l.CLUSTER_BREAK.EXTEND}else if(918e3<=e&&e<=921599)return l.CLUSTER_BREAK.CONTROL;return l.CLUSTER_BREAK.OTHER}static getEmojiProperty(e){if(e<10160){if(e<9728){if(e<9e3){if(e<8482){if(e<8252){if(e===169||e===174)return l.EXTENDED_PICTOGRAPHIC}else if(e===8252||e===8265)return l.EXTENDED_PICTOGRAPHIC}else if(e<8596){if(e===8482||e===8505)return l.EXTENDED_PICTOGRAPHIC}else if(e<8617){if(8596<=e&&e<=8601)return l.EXTENDED_PICTOGRAPHIC}else if(e<8986){if(8617<=e&&e<=8618)return l.EXTENDED_PICTOGRAPHIC}else if(8986<=e&&e<=8987)return l.EXTENDED_PICTOGRAPHIC}else if(e<9410){if(e<9167){if(e===9e3||e===9096)return l.EXTENDED_PICTOGRAPHIC}else if(e<9193){if(e===9167)return l.EXTENDED_PICTOGRAPHIC}else if(e<9208){if(9193<=e&&e<=9203)return l.EXTENDED_PICTOGRAPHIC}else if(9208<=e&&e<=9210)return l.EXTENDED_PICTOGRAPHIC}else if(e<9654){if(e<9642){if(e===9410)return l.EXTENDED_PICTOGRAPHIC}else if(9642<=e&&e<=9643)return l.EXTENDED_PICTOGRAPHIC}else if(e<9664){if(e===9654)return l.EXTENDED_PICTOGRAPHIC}else if(e<9723){if(e===9664)return l.EXTENDED_PICTOGRAPHIC}else if(9723<=e&&e<=9726)return l.EXTENDED_PICTOGRAPHIC}else if(e<10035){if(e<10004){if(e<9748){if(e<9735){if(9728<=e&&e<=9733)return l.EXTENDED_PICTOGRAPHIC}else if(9735<=e&&e<=9746)return l.EXTENDED_PICTOGRAPHIC}else if(e<9872){if(9748<=e&&e<=9861)return l.EXTENDED_PICTOGRAPHIC}else if(e<9992){if(9872<=e&&e<=9989)return l.EXTENDED_PICTOGRAPHIC}else if(9992<=e&&e<=10002)return l.EXTENDED_PICTOGRAPHIC}else if(e<10013){if(e===10004||e===10006)return l.EXTENDED_PICTOGRAPHIC}else if(e<10017){if(e===10013)return l.EXTENDED_PICTOGRAPHIC}else if(e===10017||e===10024)return l.EXTENDED_PICTOGRAPHIC}else if(e<10067){if(e<10055){if(e<10052){if(10035<=e&&e<=10036)return l.EXTENDED_PICTOGRAPHIC}else if(e===10052)return l.EXTENDED_PICTOGRAPHIC}else if(e<10060){if(e===10055)return l.EXTENDED_PICTOGRAPHIC}else if(e===10060||e===10062)return l.EXTENDED_PICTOGRAPHIC}else if(e<10083){if(e<10071){if(10067<=e&&e<=10069)return l.EXTENDED_PICTOGRAPHIC}else if(e===10071)return l.EXTENDED_PICTOGRAPHIC}else if(e<10133){if(10083<=e&&e<=10087)return l.EXTENDED_PICTOGRAPHIC}else if(e<10145){if(10133<=e&&e<=10135)return l.EXTENDED_PICTOGRAPHIC}else if(e===10145)return l.EXTENDED_PICTOGRAPHIC}else if(e<127489){if(e<12951){if(e<11035){if(e<10548){if(e===10160||e===10175)return l.EXTENDED_PICTOGRAPHIC}else if(e<11013){if(10548<=e&&e<=10549)return l.EXTENDED_PICTOGRAPHIC}else if(11013<=e&&e<=11015)return l.EXTENDED_PICTOGRAPHIC}else if(e<11093){if(e<11088){if(11035<=e&&e<=11036)return l.EXTENDED_PICTOGRAPHIC}else if(e===11088)return l.EXTENDED_PICTOGRAPHIC}else if(e<12336){if(e===11093)return l.EXTENDED_PICTOGRAPHIC}else if(e===12336||e===12349)return l.EXTENDED_PICTOGRAPHIC}else if(e<127340){if(e<126976){if(e===12951||e===12953)return l.EXTENDED_PICTOGRAPHIC}else if(e<127245){if(126976<=e&&e<=127231)return l.EXTENDED_PICTOGRAPHIC}else if(e<127279){if(127245<=e&&e<=127247)return l.EXTENDED_PICTOGRAPHIC}else if(e===127279)return l.EXTENDED_PICTOGRAPHIC}else if(e<127374){if(e<127358){if(127340<=e&&e<=127345)return l.EXTENDED_PICTOGRAPHIC}else if(127358<=e&&e<=127359)return l.EXTENDED_PICTOGRAPHIC}else if(e<127377){if(e===127374)return l.EXTENDED_PICTOGRAPHIC}else if(e<127405){if(127377<=e&&e<=127386)return l.EXTENDED_PICTOGRAPHIC}else if(127405<=e&&e<=127461)return l.EXTENDED_PICTOGRAPHIC}else if(e<128981){if(e<127561){if(e<127535){if(e<127514){if(127489<=e&&e<=127503)return l.EXTENDED_PICTOGRAPHIC}else if(e===127514)return l.EXTENDED_PICTOGRAPHIC}else if(e<127538){if(e===127535)return l.EXTENDED_PICTOGRAPHIC}else if(e<127548){if(127538<=e&&e<=127546)return l.EXTENDED_PICTOGRAPHIC}else if(127548<=e&&e<=127551)return l.EXTENDED_PICTOGRAPHIC}else if(e<128326){if(e<128e3){if(127561<=e&&e<=127994)return l.EXTENDED_PICTOGRAPHIC}else if(128e3<=e&&e<=128317)return l.EXTENDED_PICTOGRAPHIC}else if(e<128640){if(128326<=e&&e<=128591)return l.EXTENDED_PICTOGRAPHIC}else if(e<128884){if(128640<=e&&e<=128767)return l.EXTENDED_PICTOGRAPHIC}else if(128884<=e&&e<=128895)return l.EXTENDED_PICTOGRAPHIC}else if(e<129198){if(e<129096){if(e<129036){if(128981<=e&&e<=129023)return l.EXTENDED_PICTOGRAPHIC}else if(129036<=e&&e<=129039)return l.EXTENDED_PICTOGRAPHIC}else if(e<129114){if(129096<=e&&e<=129103)return l.EXTENDED_PICTOGRAPHIC}else if(e<129160){if(129114<=e&&e<=129119)return l.EXTENDED_PICTOGRAPHIC}else if(129160<=e&&e<=129167)return l.EXTENDED_PICTOGRAPHIC}else if(e<129340){if(e<129292){if(129198<=e&&e<=129279)return l.EXTENDED_PICTOGRAPHIC}else if(129292<=e&&e<=129338)return l.EXTENDED_PICTOGRAPHIC}else if(e<129351){if(129340<=e&&e<=129349)return l.EXTENDED_PICTOGRAPHIC}else if(e<130048){if(129351<=e&&e<=129791)return l.EXTENDED_PICTOGRAPHIC}else if(130048<=e&&e<=131069)return l.EXTENDED_PICTOGRAPHIC;return l.CLUSTER_BREAK.OTHER}}Xx.default=Ji;var ZZ=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wx,"__esModule",{value:!0});const QZ=ZZ(Xx);Wx.default=QZ.default;var YZ=C&&C.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),eQ=C&&C.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tQ=C&&C.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&YZ(r,e,n[i]);return eQ(r,e),r}}(),rQ=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kr,"__esModule",{value:!0});kr.validateLanguage=kr.parseLanguage=kr.b64UrlToUtf8=kr.utf8ToB64Url=kr.graphemeLen=kr.utf8Len=void 0;const nQ=rQ(Wx),ay=tQ(_I),iQ=t=>new TextEncoder().encode(t).byteLength;kr.utf8Len=iQ;const oQ=t=>new nQ.default().countGraphemes(t);kr.graphemeLen=oQ;const sQ=t=>ay.toString(ay.fromString(t,"utf8"),"base64url");kr.utf8ToB64Url=sQ;const aQ=t=>ay.toString(ay.fromString(t,"base64url"),"utf8");kr.b64UrlToUtf8=aQ;const lQ=t=>{const e=t.match(kI);if(!(e!=null&&e.groups))return null;const r=e.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}};kr.parseLanguage=lQ;const cQ=t=>kI.test(t);kr.validateLanguage=cQ;const kI=/^((?<grandfathered>(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))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUseA>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUseB>x(-[A-Za-z0-9]{1,8})+))$/;var PI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.didDocument=t.getServiceEndpoint=t.getNotifEndpoint=t.getFeedGenEndpoint=t.getPdsEndpoint=t.getSigningDidKey=t.getVerificationMaterial=t.getSigningKey=t.getHandle=t.getDid=t.isValidDidDoc=void 0;const e=Z,r=y=>t.didDocument.safeParse(y).success;t.isValidDidDoc=r;const n=y=>{const b=y.id;if(typeof b!="string")throw new Error("No `id` on document");return b};t.getDid=n;const i=y=>{const b=y.alsoKnownAs;if(b)for(let E=0;E<b.length;E++){const _=b[E];if(_.startsWith("at://"))return _.slice(5)}};t.getHandle=i;const o=y=>(0,t.getVerificationMaterial)(y,"atproto");t.getSigningKey=o;const s=(y,b)=>{const E=h(y,"verificationMethod",`#${b}`);if(E&&E.publicKeyMultibase)return{type:E.type,publicKeyMultibase:E.publicKeyMultibase}};t.getVerificationMaterial=s;const a=y=>{const b=(0,t.getSigningKey)(y);if(b)return`did:key:${b.publicKeyMultibase}`};t.getSigningDidKey=a;const c=y=>(0,t.getServiceEndpoint)(y,{id:"#atproto_pds",type:"AtprotoPersonalDataServer"});t.getPdsEndpoint=c;const u=y=>(0,t.getServiceEndpoint)(y,{id:"#bsky_fg",type:"BskyFeedGenerator"});t.getFeedGenEndpoint=u;const d=y=>(0,t.getServiceEndpoint)(y,{id:"#bsky_notif",type:"BskyNotificationService"});t.getNotifEndpoint=d;const f=(y,b)=>{const E=h(y,"service",b.id);if(E&&!(b.type&&E.type!==b.type)&&typeof E.serviceEndpoint=="string")return m(E.serviceEndpoint)};t.getServiceEndpoint=f;function h(y,b,E){const _=y[b];if(_)for(let T=0;T<_.length;T++){const B=_[T],I=B.id;if(I[0]==="#"?I===E:I.length===y.id.length+E.length&&I[y.id.length]==="#"&&I.endsWith(E)&&I.startsWith(y.id))return B}}const m=y=>{if(!(!y.startsWith("http://")&&!y.startsWith("https://"))&&g(y))return y},g=URL.canParse??(y=>{try{return new URL(y),!0}catch{return!1}}),v=e.z.object({id:e.z.string(),type:e.z.string(),controller:e.z.string(),publicKeyMultibase:e.z.string().optional()}),w=e.z.object({id:e.z.string(),type:e.z.string(),serviceEndpoint:e.z.union([e.z.string(),e.z.record(e.z.unknown())])});t.didDocument=e.z.object({id:e.z.string(),alsoKnownAs:e.z.array(e.z.string()).optional(),verificationMethod:e.z.array(v).optional(),service:e.z.array(w).optional()})})(PI);(function(t){var e=C&&C.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a);var u=Object.getOwnPropertyDescriptor(s,a);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(o,c,u)}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),r=C&&C.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),n=C&&C.__importStar||function(){var o=function(s){return o=Object.getOwnPropertyNames||function(a){var c=[];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(c[c.length]=u);return c},o(s)};return function(s){if(s&&s.__esModule)return s;var a={};if(s!=null)for(var c=o(s),u=0;u<c.length;u++)c[u]!=="default"&&e(a,s,c[u]);return r(a,s),a}}(),i=C&&C.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&e(s,o,a)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.check=void 0,t.check=n(fi),t.util=n(Hl),i(op,t),i(bI,t),i(Hl,t),i(Mg,t),i(vI,t),i(sp,t),i(SI,t),i(CI,t),i(kr,t),i(PI,t)})(Pi);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BlobRef=t.jsonBlobRef=t.untypedJsonBlobRef=t.typedJsonBlobRef=void 0;const e=wc,r=Z,n=Pi;t.typedJsonBlobRef=r.z.object({$type:r.z.literal("blob"),ref:n.schema.cid,mimeType:r.z.string(),size:r.z.number()}).strict(),t.untypedJsonBlobRef=r.z.object({cid:r.z.string(),mimeType:r.z.string()}).strict(),t.jsonBlobRef=r.z.union([t.typedJsonBlobRef,t.untypedJsonBlobRef]);class i{constructor(s,a,c,u){Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"mimeType",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:c}),Object.defineProperty(this,"original",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.original=u??{$type:"blob",ref:s,mimeType:a,size:c}}static asBlobRef(s){return n.check.is(s,t.jsonBlobRef)?i.fromJsonRef(s):null}static fromJsonRef(s){return n.check.is(s,t.typedJsonBlobRef)?new i(s.ref,s.mimeType,s.size):new i(e.CID.parse(s.cid),s.mimeType,-1,s)}ipld(){return{$type:"blob",ref:this.ref,mimeType:this.mimeType,size:this.size}}toJSON(){return(0,n.ipldToJson)(this.ipld())}}t.BlobRef=i})(Kg);Object.defineProperty(Gx,"__esModule",{value:!0});Gx.blob=fQ;const uQ=Kg,dQ=Is;function fQ(t,e,r,n){return!n||!(n instanceof uQ.BlobRef)?{success:!1,error:new dQ.ValidationError(`${e} should be a blob ref`)}:{success:!0,value:n}}var Ng={},on={},LI={};(function(t){(()=>{var e={d:(d,f)=>{for(var h in f)e.o(f,h)&&!e.o(d,h)&&Object.defineProperty(d,h,{enumerable:!0,get:f[h]})},o:(d,f)=>Object.prototype.hasOwnProperty.call(d,f),r:d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},r={};function n(d,f){return f===void 0&&(f="-"),new RegExp("^(?!0{4}"+f+"0{2}"+f+"0{2})((?=[0-9]{4}"+f+"(((0[^2])|1[0-2])|02(?="+f+"(([0-1][0-9])|2[0-8])))"+f+"[0-9]{2})|(?=((([13579][26])|([2468][048])|(0[48]))0{2})|([0-9]{2}((((0|[2468])[48])|[2468][048])|([13579][26])))"+f+"02"+f+"29))([0-9]{4})"+f+"(?!((0[469])|11)"+f+"31)((0[1,3-9]|1[0-2])|(02(?!"+f+"3)))"+f+"(0[1-9]|[1-2][0-9]|3[0-1])$").test(d)}function i(d){var f=/\D/.exec(d);return f?f[0]:""}function o(d,f,h){f===void 0&&(f=":"),h===void 0&&(h=!1);var m=new RegExp("^([0-1]|2(?=([0-3])|4"+f+"00))[0-9]"+f+"[0-5][0-9]("+f+"([0-5]|6(?=0))[0-9])?(.[0-9]{1,9})?$");if(!h||!/[Z+\-]/.test(d))return m.test(d);if(/Z$/.test(d))return m.test(d.replace("Z",""));var g=d.includes("+"),v=d.split(/[+-]/),w=v[0],y=v[1];return m.test(w)&&function(b,E,_){return _===void 0&&(_=":"),new RegExp(E?"^(0(?!(2"+_+"4)|0"+_+"3)|1(?=([0-1]|2(?="+_+"[04])|[34](?="+_+"0))))([03469](?="+_+"[03])|[17](?="+_+"0)|2(?="+_+"[04])|5(?="+_+"[034])|8(?="+_+"[04]))"+_+"([03](?=0)|4(?=5))[05]$":"^(0(?=[^0])|1(?=[0-2]))([39](?="+_+"[03])|[0-24-8](?="+_+"00))"+_+"[03]0$").test(b)}(y,g,i(y))}function s(d){var f=d.split("T"),h=f[0],m=f[1],g=n(h,i(h));if(!m)return!1;var v,w=(v=m.match(/([^Z+\-\d])(?=\d+\1)/),Array.isArray(v)?v[0]:"");return g&&o(m,w,!0)}function a(d,f){return f===void 0&&(f="-"),new RegExp("^[0-9]{4}"+f+"(0(?=[^0])|1(?=[0-2]))[0-9]$").test(d)}e.r(r),e.d(r,{isValidDate:()=>n,isValidISODateString:()=>s,isValidTime:()=>o,isValidYearMonth:()=>a});var c=t;for(var u in r)c[u]=r[u];r.__esModule&&Object.defineProperty(c,"__esModule",{value:!0})})()})(LI);Object.defineProperty(on,"__esModule",{value:!0});on.datetime=yQ;on.uri=gQ;on.atUri=bQ;on.did=DI;on.handle=BI;on.atIdentifier=vQ;on.nsid=EQ;on.cid=wQ;on.language=xQ;on.tid=_Q;on.recordKey=RQ;const pQ=LI,hQ=wc,mQ=Pi,xc=Bs,ni=Is;function yQ(t,e){try{if(!(0,pQ.isValidISODateString)(e))throw new Error}catch{return{success:!1,error:new ni.ValidationError(`${t} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)}}return{success:!0,value:e}}function gQ(t,e){return e.match(/^\w+:(?:\/\/)?[^\s/][^\s]*$/)!==null?{success:!0,value:e}:{success:!1,error:new ni.ValidationError(`${t} must be a uri`)}}function bQ(t,e){try{(0,xc.ensureValidAtUri)(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a valid at-uri`)}}return{success:!0,value:e}}function DI(t,e){try{(0,xc.ensureValidDid)(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a valid did`)}}return{success:!0,value:e}}function BI(t,e){try{(0,xc.ensureValidHandle)(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a valid handle`)}}return{success:!0,value:e}}function vQ(t,e){if(e.startsWith("did:")){const r=DI(t,e);if(r.success)return r}else{const r=BI(t,e);if(r.success)return r}return{success:!1,error:new ni.ValidationError(`${t} must be a valid did or a handle`)}}function EQ(t,e){try{(0,xc.ensureValidNsid)(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a valid nsid`)}}return{success:!0,value:e}}function wQ(t,e){try{hQ.CID.parse(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a cid string`)}}return{success:!0,value:e}}function xQ(t,e){return(0,mQ.validateLanguage)(e)?{success:!0,value:e}:{success:!1,error:new ni.ValidationError(`${t} must be a well-formed BCP 47 language tag`)}}function _Q(t,e){return(0,xc.isValidTid)(e)?{success:!0,value:e}:{success:!1,error:new ni.ValidationError(`${t} must be a valid TID`)}}function RQ(t,e){try{(0,xc.ensureValidRecordKey)(e)}catch{return{success:!1,error:new ni.ValidationError(`${t} must be a valid Record Key`)}}return{success:!0,value:e}}var AQ=C&&C.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),SQ=C&&C.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CQ=C&&C.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&AQ(r,e,n[i]);return SQ(r,e),r}}();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.validate=kQ;const TQ=wc,MC=Pi,Je=Is,jn=CQ(on);function kQ(t,e,r,n){switch(r.type){case"boolean":return PQ(t,e,r,n);case"integer":return LQ(t,e,r,n);case"string":return DQ(t,e,r,n);case"bytes":return BQ(t,e,r,n);case"cid-link":return IQ(t,e,r,n);case"unknown":return jQ(t,e,r,n);default:return{success:!1,error:new Je.ValidationError(`Unexpected lexicon type: ${r.type}`)}}}function PQ(t,e,r,n){r=r;const i=typeof n;return i==="undefined"?typeof r.default=="boolean"?{success:!0,value:r.default}:{success:!1,error:new Je.ValidationError(`${e} must be a boolean`)}:i!=="boolean"?{success:!1,error:new Je.ValidationError(`${e} must be a boolean`)}:typeof r.const=="boolean"&&n!==r.const?{success:!1,error:new Je.ValidationError(`${e} must be ${r.const}`)}:{success:!0,value:n}}function LQ(t,e,r,n){return r=r,typeof n==="undefined"?typeof r.default=="number"?{success:!0,value:r.default}:{success:!1,error:new Je.ValidationError(`${e} must be an integer`)}:Number.isInteger(n)?typeof r.const=="number"&&n!==r.const?{success:!1,error:new Je.ValidationError(`${e} must be ${r.const}`)}:Array.isArray(r.enum)&&!r.enum.includes(n)?{success:!1,error:new Je.ValidationError(`${e} must be one of (${r.enum.join("|")})`)}:typeof r.maximum=="number"&&n>r.maximum?{success:!1,error:new Je.ValidationError(`${e} can not be greater than ${r.maximum}`)}:typeof r.minimum=="number"&&n<r.minimum?{success:!1,error:new Je.ValidationError(`${e} can not be less than ${r.minimum}`)}:{success:!0,value:n}:{success:!1,error:new Je.ValidationError(`${e} must be an integer`)}}function DQ(t,e,r,n){if(r=r,typeof n>"u")return typeof r.default=="string"?{success:!0,value:r.default}:{success:!1,error:new Je.ValidationError(`${e} must be a string`)};if(typeof n!="string")return{success:!1,error:new Je.ValidationError(`${e} must be a string`)};if(typeof r.const=="string"&&n!==r.const)return{success:!1,error:new Je.ValidationError(`${e} must be ${r.const}`)};if(Array.isArray(r.enum)&&!r.enum.includes(n))return{success:!1,error:new Je.ValidationError(`${e} must be one of (${r.enum.join("|")})`)};if(typeof r.minLength=="number"||typeof r.maxLength=="number"){if(typeof r.minLength=="number"&&n.length*3<r.minLength)return{success:!1,error:new Je.ValidationError(`${e} must not be shorter than ${r.minLength} characters`)};let i=!1;if(typeof r.minLength>"u"&&typeof r.maxLength=="number"&&n.length*3<=r.maxLength&&(i=!0),!i){const o=(0,MC.utf8Len)(n);if(typeof r.maxLength=="number"&&o>r.maxLength)return{success:!1,error:new Je.ValidationError(`${e} must not be longer than ${r.maxLength} characters`)};if(typeof r.minLength=="number"&&o<r.minLength)return{success:!1,error:new Je.ValidationError(`${e} must not be shorter than ${r.minLength} characters`)}}}if(typeof r.maxGraphemes=="number"||typeof r.minGraphemes=="number"){let i=!1,o=!1;if(typeof r.maxGraphemes=="number"&&(n.length<=r.maxGraphemes?i=!1:i=!0),typeof r.minGraphemes=="number"){if(n.length<r.minGraphemes)return{success:!1,error:new Je.ValidationError(`${e} must not be shorter than ${r.minGraphemes} graphemes`)};o=!0}if(i||o){const s=(0,MC.graphemeLen)(n);if(typeof r.maxGraphemes=="number"&&s>r.maxGraphemes)return{success:!1,error:new Je.ValidationError(`${e} must not be longer than ${r.maxGraphemes} graphemes`)};if(typeof r.minGraphemes=="number"&&s<r.minGraphemes)return{success:!1,error:new Je.ValidationError(`${e} must not be shorter than ${r.minGraphemes} graphemes`)}}}if(typeof r.format=="string")switch(r.format){case"datetime":return jn.datetime(e,n);case"uri":return jn.uri(e,n);case"at-uri":return jn.atUri(e,n);case"did":return jn.did(e,n);case"handle":return jn.handle(e,n);case"at-identifier":return jn.atIdentifier(e,n);case"nsid":return jn.nsid(e,n);case"cid":return jn.cid(e,n);case"language":return jn.language(e,n);case"tid":return jn.tid(e,n);case"record-key":return jn.recordKey(e,n)}return{success:!0,value:n}}function BQ(t,e,r,n){return r=r,!n||!(n instanceof Uint8Array)?{success:!1,error:new Je.ValidationError(`${e} must be a byte array`)}:typeof r.maxLength=="number"&&n.byteLength>r.maxLength?{success:!1,error:new Je.ValidationError(`${e} must not be larger than ${r.maxLength} bytes`)}:typeof r.minLength=="number"&&n.byteLength<r.minLength?{success:!1,error:new Je.ValidationError(`${e} must not be smaller than ${r.minLength} bytes`)}:{success:!0,value:n}}function IQ(t,e,r,n){return TQ.CID.asCID(n)===null?{success:!1,error:new Je.ValidationError(`${e} must be a CID`)}:{success:!0,value:n}}function jQ(t,e,r,n){return!n||typeof n!="object"?{success:!1,error:new Je.ValidationError(`${e} must be an object`)}:{success:!0,value:n}}Object.defineProperty(js,"__esModule",{value:!0});js.validate=II;js.array=jI;js.object=Yx;js.validateOneOf=e_;const co=Is,OQ=Ec,UQ=Gx,$Q=Ng;function II(t,e,r,n){switch(r.type){case"object":return Yx(t,e,r,n);case"array":return jI(t,e,r,n);case"blob":return(0,UQ.blob)(t,e,r,n);default:return(0,$Q.validate)(t,e,r,n)}}function jI(t,e,r,n){if(!Array.isArray(n))return{success:!1,error:new co.ValidationError(`${e} must be an array`)};if(typeof r.maxLength=="number"&&n.length>r.maxLength)return{success:!1,error:new co.ValidationError(`${e} must not have more than ${r.maxLength} elements`)};if(typeof r.minLength=="number"&&n.length<r.minLength)return{success:!1,error:new co.ValidationError(`${e} must not have fewer than ${r.minLength} elements`)};const i=r.items;for(let o=0;o<n.length;o++){const s=n[o],a=`${e}/${o}`,c=e_(t,a,i,s);if(!c.success)return c}return{success:!0,value:n}}function Yx(t,e,r,n){var o,s,a;if(!(0,co.isObj)(n))return{success:!1,error:new co.ValidationError(`${e} must be an object`)};let i=n;if("properties"in r&&r.properties!=null)for(const c in r.properties){const u=n[c];if(u===null&&((o=r.nullable)!=null&&o.includes(c)))continue;const d=r.properties[c];if(u===void 0&&!((s=r.required)!=null&&s.includes(c)))if(d.type==="integer"||d.type==="boolean"||d.type==="string"){if(d.default===void 0)continue}else continue;const f=`${e}/${c}`,h=e_(t,f,d,u),m=h.success?h.value:u;if(m===void 0){if((a=r.required)!=null&&a.includes(c))return{success:!1,error:new co.ValidationError(`${e} must have the property "${c}"`)}}else if(!h.success)return h;m!==u&&(i===n&&(i={...n}),i[c]=m)}return{success:!0,value:i}}function e_(t,e,r,n,i=!1){let o;if(r.type==="union"){if(!(0,co.isDiscriminatedObject)(n))return{success:!1,error:new co.ValidationError(`${e} must be an object which includes the "$type" property`)};if(VQ(r.refs,n.$type))o=t.getDefOrThrow(n.$type);else return r.closed?{success:!1,error:new co.ValidationError(`${e} $type must be one of ${r.refs.join(", ")}`)}:{success:!0,value:n}}else r.type==="ref"?o=t.getDefOrThrow(r.ref):o=r;return i?Yx(t,e,o,n):II(t,e,o,n)}const VQ=(t,e)=>{const r=(0,OQ.toLexUri)(e);return t.includes(r)?!0:r.endsWith("#main")?t.includes(r.slice(0,-5)):!r.includes("#")&&t.includes(`${r}#main`)};var t_={},KQ=C&&C.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),MQ=C&&C.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NQ=C&&C.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&KQ(r,e,n[i]);return MQ(r,e),r}}();Object.defineProperty(t_,"__esModule",{value:!0});t_.params=GQ;const zQ=Is,FQ=js,qQ=NQ(Ng);function GQ(t,e,r,n){const i=n&&typeof n=="object"?n:{},o=new Set(r.required??[]);let s=i;if(typeof r.properties=="object")for(const a in r.properties){const c=r.properties[a],u=c.type==="array"?(0,FQ.array)(t,a,c,i[a]):qQ.validate(t,a,c,i[a]),d=u.success?u.value:i[a],f=typeof d>"u";if(f&&o.has(a))return{success:!1,error:new zQ.ValidationError(`${e} must have the property "${a}"`)};if(!f&&!u.success)return u;d!==i[a]&&(s===i&&(s={...i}),s[a]=d)}return{success:!0,value:s}}Object.defineProperty(za,"__esModule",{value:!0});za.assertValidRecord=WQ;za.assertValidXrpcParams=XQ;za.assertValidXrpcInput=JQ;za.assertValidXrpcOutput=ZQ;za.assertValidXrpcMessage=QQ;const OI=js,HQ=t_;function WQ(t,e,r){const n=(0,OI.object)(t,"Record",e.record,r);if(!n.success)throw n.error;return n.value}function XQ(t,e,r){if(e.parameters){const n=(0,HQ.params)(t,"Params",e.parameters,r);if(!n.success)throw n.error;return n.value}}function JQ(t,e,r){var n;if((n=e.input)!=null&&n.schema)return r_(t,"Input",e.input.schema,r,!0)}function ZQ(t,e,r){var n;if((n=e.output)!=null&&n.schema)return r_(t,"Output",e.output.schema,r,!0)}function QQ(t,e,r){var n;if((n=e.message)!=null&&n.schema)return r_(t,"Message",e.message.schema,r,!0)}function r_(t,e,r,n,i=!1){const o=(0,OI.validateOneOf)(t,e,r,n,i);if(!o.success)throw o.error;return o.value}Object.defineProperty(Vg,"__esModule",{value:!0});Vg.Lexicons=void 0;const si=Is,er=Ec,Fu=za,NC=js;class YQ{constructor(e){if(Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"defs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),e)for(const r of e)this.add(r)}[Symbol.iterator](){return this.docs.values()}add(e){const r=(0,er.toLexUri)(e.id);if(this.docs.has(r))throw new Error(`${r} has already been registered`);zE(e,r),this.docs.set(r,e);for(const[n,i]of zC(e))this.defs.set(n,i)}remove(e){e=(0,er.toLexUri)(e);const r=this.docs.get(e);if(!r)throw new Error(`Unable to remove "${e}": does not exist`);for(const[n,i]of zC(r))this.defs.delete(n);this.docs.delete(e)}get(e){return e=(0,er.toLexUri)(e),this.docs.get(e)}getDef(e){return e=(0,er.toLexUri)(e),this.defs.get(e)}getDefOrThrow(e,r){const n=this.getDef(e);if(!n)throw new si.LexiconDefNotFoundError(`Lexicon not found: ${e}`);if(r&&!r.includes(n.type))throw new si.InvalidLexiconError(`Not a ${r.join(" or ")} lexicon: ${e}`);return n}validate(e,r){if(!(0,si.isObj)(r))throw new si.ValidationError("Value must be an object");const n=(0,er.toLexUri)(e),i=this.getDefOrThrow(n,["record","object"]);if(i.type==="record")return(0,NC.object)(this,"Record",i.record,r);if(i.type==="object")return(0,NC.object)(this,"Object",i,r);throw new si.InvalidLexiconError("Definition must be a record or object")}assertValidRecord(e,r){if(!(0,si.isObj)(r))throw new si.ValidationError("Record must be an object");if(!("$type"in r))throw new si.ValidationError("Record/$type must be a string");const{$type:n}=r;if(typeof n!="string")throw new si.ValidationError("Record/$type must be a string");const i=(0,er.toLexUri)(e);if((0,er.toLexUri)(n)!==i)throw new si.ValidationError(`Invalid $type: must be ${i}, got ${n}`);const o=this.getDefOrThrow(i,["record"]);return(0,Fu.assertValidRecord)(this,o,r)}assertValidXrpcParams(e,r){e=(0,er.toLexUri)(e);const n=this.getDefOrThrow(e,["query","procedure","subscription"]);return(0,Fu.assertValidXrpcParams)(this,n,r)}assertValidXrpcInput(e,r){e=(0,er.toLexUri)(e);const n=this.getDefOrThrow(e,["procedure"]);return(0,Fu.assertValidXrpcInput)(this,n,r)}assertValidXrpcOutput(e,r){e=(0,er.toLexUri)(e);const n=this.getDefOrThrow(e,["query","procedure"]);return(0,Fu.assertValidXrpcOutput)(this,n,r)}assertValidXrpcMessage(e,r){e=(0,er.toLexUri)(e);const n=this.getDefOrThrow(e,["subscription"]);return(0,Fu.assertValidXrpcMessage)(this,n,r)}resolveLexUri(e,r){return e=(0,er.toLexUri)(e),(0,er.toLexUri)(r,e)}}Vg.Lexicons=YQ;function*zC(t){for(const e in t.defs)yield[`lex:${t.id}#${e}`,t.defs[e]],e==="main"&&(yield[`lex:${t.id}`,t.defs[e]])}function zE(t,e){for(const r in t)t.type==="ref"?t.ref=(0,er.toLexUri)(t.ref,e):t.type==="union"?t.refs=t.refs.map(n=>(0,er.toLexUri)(n,e)):Array.isArray(t[r])?t[r]=t[r].map(n=>typeof n=="string"?n.startsWith("#")?(0,er.toLexUri)(n,e):n:n&&typeof n=="object"?zE(n,e):n):t[r]&&typeof t[r]=="object"&&(t[r]=zE(t[r],e));return t}var UI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.jsonStringToLex=t.jsonToLex=t.stringifyLex=t.lexToJson=t.ipldToLex=t.lexToIpld=void 0;const e=wc,r=Pi,n=Kg,i=d=>{if(Array.isArray(d))return d.map(f=>(0,t.lexToIpld)(f));if(d&&typeof d=="object"){if(d instanceof n.BlobRef)return d.original;if(e.CID.asCID(d)||d instanceof Uint8Array)return d;const f={};for(const h of Object.keys(d))f[h]=(0,t.lexToIpld)(d[h]);return f}return d};t.lexToIpld=i;const o=d=>{if(Array.isArray(d))return d.map(f=>(0,t.ipldToLex)(f));if(d&&typeof d=="object"){if((d.$type==="blob"||typeof d.cid=="string"&&typeof d.mimeType=="string")&&r.check.is(d,n.jsonBlobRef))return n.BlobRef.fromJsonRef(d);if(e.CID.asCID(d)||d instanceof Uint8Array)return d;const f={};for(const h of Object.keys(d))f[h]=(0,t.ipldToLex)(d[h]);return f}return d};t.ipldToLex=o;const s=d=>(0,r.ipldToJson)((0,t.lexToIpld)(d));t.lexToJson=s;const a=d=>JSON.stringify((0,t.lexToJson)(d));t.stringifyLex=a;const c=d=>(0,t.ipldToLex)((0,r.jsonToIpld)(d));t.jsonToLex=c;const u=d=>(0,t.jsonToLex)(JSON.parse(d));t.jsonStringToLex=u})(UI);(function(t){var e=C&&C.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,a)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=C&&C.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Is,t),r(Vg,t),r(Kg,t),r(UI,t)})(Ia);var A={},R={};Object.defineProperty(R,"__esModule",{value:!0});R.is$typed=eY;R.maybe$typed=tY;R.asPredicate=rY;function $I(t){return t!=null&&typeof t=="object"}function VI(t,e,r){return r==="main"?t===e:typeof t=="string"&&t.length===e.length+1+r.length&&t.charCodeAt(e.length)===35&&t.startsWith(e)&&t.endsWith(r)}function eY(t,e,r){return $I(t)&&"$type"in t&&VI(t.$type,e,r)}function tY(t,e,r){return $I(t)&&("$type"in t?t.$type===void 0||VI(t.$type,e,r):!0)}function rY(t){return function(e){return t(e).success}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ids=t.lexicons=t.schemas=t.schemaDict=void 0,t.validate=n;const e=Ia,r=R;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"}}}}}}},ComAtprotoAdminUpdateAccountSigningKey:{lexicon:1,id:"com.atproto.admin.updateAccountSigningKey",defs:{main:{type:"procedure",description:"Administrative action to update an account's signing key in their Did document.",input:{encoding:"application/json",schema:{type:"object",required:["did","signingKey"],properties:{did:{type:"string",format:"did"},signingKey:{type:"string",format:"did",description:"Did-key formatted public key"}}}}}}},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"}}}}}}},ComAtprotoIdentityDefs:{lexicon:1,id:"com.atproto.identity.defs",defs:{identityInfo:{type:"object",required:["did","handle","didDoc"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle",description:"The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."},didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}}},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"}}}}}}},ComAtprotoIdentityRefreshIdentity:{lexicon:1,id:"com.atproto.identity.refreshIdentity",defs:{main:{type:"procedure",description:"Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",input:{encoding:"application/json",schema:{type:"object",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},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."}}},ComAtprotoIdentityResolveDid:{lexicon:1,id:"com.atproto.identity.resolveDid",defs:{main:{type:"query",description:"Resolves DID to DID document. Does not bi-directionally verify handle.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"DID to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["didDoc"],properties:{didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}},errors:[{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityResolveHandle:{lexicon:1,id:"com.atproto.identity.resolveHandle",defs:{main:{type:"query",description:"Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",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"}}}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."}]}}},ComAtprotoIdentityResolveIdentity:{lexicon:1,id:"com.atproto.identity.resolveIdentity",defs:{main:{type:"query",description:"Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).",parameters:{type:"params",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier",description:"Handle or DID to resolve."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},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"},subjectType:{type:"string",description:"Tag describing a type of subject that might be reported.",knownValues:["account","record","chat"]}}},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,format:"record-key",description:"NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."},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",format:"record-key"},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",format:"record-key"}}},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",format:"record-key",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",format:"tid"}}}}},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",format:"record-key",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.",format:"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"},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",format:"record-key",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"}]}}},ComAtprotoSyncDefs:{lexicon:1,id:"com.atproto.sync.defs",defs:{hostStatus:{type:"string",knownValues:["active","idle","offline","throttled","banned"]}}},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"}]}}},ComAtprotoSyncGetHostStatus:{lexicon:1,id:"com.atproto.sync.getHostStatus",defs:{main:{type:"query",description:"Returns information about a specified upstream host, as consumed by the server. Implemented by relays.",parameters:{type:"params",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the host (eg, PDS or relay) being queried."}}},output:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer",description:"Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts."},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}},errors:[{name:"HostNotFound"}]}}},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",format:"tid"}}}},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",format:"record-key"}}},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",format:"tid",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","deleted","deactivated","desynchronized","throttled"]},rev:{type:"string",format:"tid",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",format:"tid",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"}]}}},ComAtprotoSyncListHosts:{lexicon:1,id:"com.atproto.sync.listHosts",defs:{main:{type:"query",description:"Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:200},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["hosts"],properties:{cursor:{type:"string"},hosts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listHosts#host"},description:"Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first."}}}}},host:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"hostname of server; not a URL (no scheme)"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer"},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}}},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",format:"tid"},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","deleted","deactivated","desynchronized","throttled"]}}}}},ComAtprotoSyncListReposByCollection:{lexicon:1,id:"com.atproto.sync.listReposByCollection",defs:{main:{type:"query",description:"Enumerates all the DIDs which have records with the given collection NSID.",parameters:{type:"params",required:["collection"],properties:{collection:{type:"string",format:"nsid"},limit:{type:"integer",description:"Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.",minimum:1,maximum:2e3,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.listReposByCollection#repo"}}}}}},repo:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}},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. DEPRECATED: just use com.atproto.sync.requestCrawl",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."}}}},errors:[{name:"HostBanned"}]}}},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#sync","lex:com.atproto.sync.subscribeRepos#identity","lex:com.atproto.sync.subscribeRepos#account","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:["since"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},rebase:{type:"boolean",description:"DEPRECATED -- unused"},tooBig:{type:"boolean",description:"DEPRECATED -- replaced by #sync event and data limits. 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. Note that all other message types name this field 'did'."},commit:{type:"cid-link",description:"Repo commit object CID."},rev:{type:"string",format:"tid",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",format:"tid",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. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.",maxLength:2e6},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:"DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."}},prevData:{type:"cid-link",description:"The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},sync:{type:"object",description:"Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.",required:["seq","did","blocks","rev","time"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},did:{type:"string",format:"did",description:"The account this repo event corresponds to. Must match that in the commit object."},blocks:{type:"bytes",description:"CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",maxLength:1e4},rev:{type:"string",description:"The rev of the commit. This value must match that in the commit object."},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","desynchronized","throttled"]}}},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."},prev:{type:"cid-link",description:"For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."}}}}},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"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},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"}},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},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"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},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"}}}},verificationState:{type:"object",description:"Represents the verification information about the user this object is attached to.",required:["verifications","verifiedStatus","trustedVerifierStatus"],properties:{verifications:{type:"array",description:"All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationView"}},verifiedStatus:{type:"string",description:"The user's status as a verified account.",knownValues:["valid","invalid","none"]},trustedVerifierStatus:{type:"string",description:"The user's status as a trusted verifier.",knownValues:["valid","invalid","none"]}}},verificationView:{type:"object",description:"An individual verification for an associated subject.",required:["issuer","uri","isValid","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},isValid:{type:"boolean",description:"True if the verification passes validation, otherwise false."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"}}},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","lex:app.bsky.actor.defs#verificationPrefs"]}},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."}}},verificationPrefs:{type:"object",description:"Preferences for how verified accounts appear in the app.",required:[],properties:{hideBadges:{description:"Hide the blue check badges for verified accounts and trusted verifiers.",type:"boolean",default:!1}}},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"]}}}},statusView:{type:"object",required:["status","record"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},record:{type:"unknown"},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external#view"]},expiresAt:{type:"string",description:"The date when this status will expire. The application might choose to no longer return the status after expiration.",format:"datetime"},isActive:{type:"boolean",description:"True if the status is not expired, false if it is expired. Only present if expiration was set."}}}}},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"}}}}}}}},AppBskyActorStatus:{lexicon:1,id:"app.bsky.actor.status",defs:{main:{type:"record",description:"A declaration of a Bluesky account status.",key:"literal:self",record:{type:"object",required:["status","createdAt"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external"]},durationMinutes:{type:"integer",description:"The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.",minimum:1},createdAt:{type:"string",format:"datetime"}}}},live:{type:"token",description:"Advertises an account as currently offering live content."}}},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",description:"The mp4 video file. May be up to 100mb, formerly limited to 50mb.",accept:["video/mp4"],maxSize:1e8},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},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},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"},uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},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},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},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"}},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}}},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"}]}}},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"}}}}}}}},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"}]}}},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"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},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"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedSearchPosts:{lexicon:1,id:"app.bsky.feed.searchPosts",defs:{main:{type:"query",description:"Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.",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"}}}}}}},AppBskyGraphVerification:{lexicon:1,id:"app.bsky.graph.verification",defs:{main:{type:"record",description:"Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.",key:"tid",record:{type:"object",required:["subject","handle","displayName","createdAt"],properties:{subject:{description:"DID of the subject the verification applies to.",type:"string",format:"did"},handle:{description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",type:"string",format:"handle"},displayName:{description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.",type:"string"},createdAt:{description:"Date of when the verification was created.",type:"string",format:"datetime"}}}}}},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"}},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}},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"},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}}}}},AppBskyNotificationDefs:{lexicon:1,id:"app.bsky.notification.defs",defs:{recordDeleted:{type:"object",properties:{}},chatPreference:{type:"object",required:["filter","push"],properties:{filter:{type:"string",knownValues:["all","accepted"]},push:{type:"boolean"}}},filterablePreference:{type:"object",required:["filter","list","push"],properties:{filter:{type:"string",knownValues:["all","follows"]},list:{type:"boolean"},push:{type:"boolean"}}},preference:{type:"object",required:["list","push"],properties:{list:{type:"boolean"},push:{type:"boolean"}}},preferences:{type:"object",required:["chat","follow","like","likeViaRepost","mention","quote","reply","repost","repostViaRepost","starterpackJoined","subscribedPost","unverified","verified"],properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}}},AppBskyNotificationGetPreferences:{lexicon:1,id:"app.bsky.notification.getPreferences",defs:{main:{type:"query",description:"Get notification-related preferences for an account. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},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:"The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",knownValues:["like","repost","follow","mention","reply","quote","starterpack-joined","verified","unverified","like-via-repost","repost-via-repost"]},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"}}}}}}},AppBskyNotificationPutPreferencesV2:{lexicon:1,id:"app.bsky.notification.putPreferencesV2",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},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"}}},skeletonTrend:{type:"object",required:["topic","displayName","link","startedAt","postCount","dids"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},dids:{type:"array",items:{type:"string",format:"did"}}}},trendView:{type:"object",required:["topic","displayName","link","startedAt","postCount","actors"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},threadItemPost:{type:"object",required:["post","moreParents","moreReplies","opThread","hiddenByThreadgate","mutedByViewer"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},moreParents:{type:"boolean",description:"This post has more parents that were not present in the response. This is just a boolean, without the number of parents."},moreReplies:{type:"integer",description:"This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate."},opThread:{type:"boolean",description:"This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread."},hiddenByThreadgate:{type:"boolean",description:"The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread."},mutedByViewer:{type:"boolean",description:"This is by an account muted by the viewer requesting it."}}},threadItemNoUnauthenticated:{type:"object",properties:{}},threadItemNotFound:{type:"object",properties:{}},threadItemBlocked:{type:"object",required:["author"],properties:{author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}}}},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"},liveNow:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getConfig#liveNowConfig"}}}}}},liveNowConfig:{type:"object",required:["did","domains"],properties:{did:{type:"string",format:"did"},domains:{type:"array",items:{type:"string"}}}}}},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"}}}}}}}},AppBskyUnspeccedGetPostThreadOtherV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadOtherV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post."},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"array",description:"A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem"}}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost"]}}}}},AppBskyUnspeccedGetPostThreadV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post."},above:{type:"boolean",description:"Whether to include parents above the anchor.",default:!0},below:{type:"integer",description:"How many levels of replies to include below the anchor.",default:6,minimum:0,maximum:20},branchingFactor:{type:"integer",description:"Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).",default:10,minimum:0,maximum:100},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1},sort:{type:"string",description:"Sorting for the thread replies.",knownValues:["newest","oldest","top"],default:"oldest"}}},output:{encoding:"application/json",schema:{type:"object",required:["thread","hasOtherReplies"],properties:{thread:{type:"array",description:"A flat list of thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadV2#threadItem"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"},hasOtherReplies:{type:"boolean",description:"Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them."}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost","lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated","lex:app.bsky.unspecced.defs#threadItemNotFound","lex:app.bsky.unspecced.defs#threadItemBlocked"]}}}}},AppBskyUnspeccedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetSuggestedFeedsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeedsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds",parameters:{type:"params",properties:{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:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks",parameters:{type:"params",properties:{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:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedUsers:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsers",defs:{main:{type:"query",description:"Get a list of suggested users",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyUnspeccedGetSuggestedUsersSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}}}}}},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"}}}}}}}},AppBskyUnspeccedGetTrends:{lexicon:1,id:"app.bsky.unspecced.getTrends",defs:{main:{type:"query",description:"Get the current trends on the network",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendView"}}}}}}}},AppBskyUnspeccedGetTrendsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getTrendsSkeleton",defs:{main:{type:"query",description:"Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends",parameters:{type:"params",properties:{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:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonTrend"}}}}}}}},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 conversations"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"}}}}},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"}}}},ChatBskyConvoAcceptConvo:{lexicon:1,id:"chat.bsky.convo.acceptConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{rev:{description:"Rev when the convo was accepted. If not present, the convo was already accepted.",type:"string"}}}}}}},ChatBskyConvoAddReaction:{lexicon:1,id:"chat.bsky.convo.addReaction",defs:{main:{type:"procedure",description:"Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionLimitReached",description:"Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},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"]},reactions:{type:"array",description:"Reactions to this message, in ascending order of creation time.",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}},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"}}},reactionView:{type:"object",required:["value","sender","createdAt"],properties:{value:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionViewSender"},createdAt:{type:"string",format:"datetime"}}},reactionViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},messageAndReactionView:{type:"object",required:["message","reaction"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},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"]},lastReaction:{type:"union",refs:["lex:chat.bsky.convo.defs#messageAndReactionView"]},muted:{type:"boolean"},status:{type:"string",knownValues:["request","accepted"]},unreadCount:{type:"integer"}}},logBeginConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logAcceptConvo:{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"}}},logMuteConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logUnmuteConvo:{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"]}}},logReadMessage:{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"]}}},logAddReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},logRemoveReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}}}},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"}}}}}}},ChatBskyConvoGetConvoAvailability:{lexicon:1,id:"chat.bsky.convo.getConvoAvailability",defs:{main:{type:"query",description:"Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.",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:["canChat"],properties:{canChat:{type:"boolean"},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#logAcceptConvo","lex:chat.bsky.convo.defs#logLeaveConvo","lex:chat.bsky.convo.defs#logMuteConvo","lex:chat.bsky.convo.defs#logUnmuteConvo","lex:chat.bsky.convo.defs#logCreateMessage","lex:chat.bsky.convo.defs#logDeleteMessage","lex:chat.bsky.convo.defs#logReadMessage","lex:chat.bsky.convo.defs#logAddReaction","lex:chat.bsky.convo.defs#logRemoveReaction"]}}}}}}}},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"},readState:{type:"string",knownValues:["unread"]},status:{type:"string",knownValues:["request","accepted"]}}},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"}}}}}}},ChatBskyConvoRemoveReaction:{lexicon:1,id:"chat.bsky.convo.removeReaction",defs:{main:{type:"procedure",description:"Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},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"}}}}}}},ChatBskyConvoUpdateAllRead:{lexicon:1,id:"chat.bsky.convo.updateAllRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",properties:{status:{type:"string",knownValues:["request","accepted"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["updatedCount"],properties:{updatedCount:{description:"The count of updated convos.",type:"integer"}}}}}}},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"}]}}},ToolsOzoneHostingGetAccountHistory:{lexicon:1,id:"tools.ozone.hosting.getAccountHistory",defs:{main:{type:"query",description:"Get account history, e.g. log of updated email addresses or other identity information.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},events:{type:"array",items:{type:"string",knownValues:["accountCreated","emailUpdated","emailConfirmed","passwordUpdated","handleUpdated"]}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.hosting.getAccountHistory#event"}}}}}},event:{type:"object",required:["details","createdBy","createdAt"],properties:{details:{type:"union",refs:["lex:tools.ozone.hosting.getAccountHistory#accountCreated","lex:tools.ozone.hosting.getAccountHistory#emailUpdated","lex:tools.ozone.hosting.getAccountHistory#emailConfirmed","lex:tools.ozone.hosting.getAccountHistory#passwordUpdated","lex:tools.ozone.hosting.getAccountHistory#handleUpdated"]},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"}}},accountCreated:{type:"object",required:[],properties:{email:{type:"string"},handle:{type:"string",format:"handle"}}},emailUpdated:{type:"object",required:["email"],properties:{email:{type:"string"}}},emailConfirmed:{type:"object",required:["email"],properties:{email:{type:"string"}}},passwordUpdated:{type:"object",required:[],properties:{}},handleUpdated:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle"}}}}},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","lex:chat.bsky.convo.defs#messageRef"]},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"}}},subjectView:{description:"Detailed view of a subject. For record subjects, the author's repo and profile will be returned.",type:"object",required:["type","subject"],properties:{type:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"},subject:{type:"string"},status:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"},profile:{type:"union",refs:[]},record:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}}},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. An empty comment will clear any previously set sticky 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"}}},reporterStats:{type:"object",required:["did","accountReportCount","recordReportCount","reportedAccountCount","reportedRecordCount","takendownAccountCount","takendownRecordCount","labeledAccountCount","labeledRecordCount"],properties:{did:{type:"string",format:"did"},accountReportCount:{type:"integer",description:"The total number of reports made by the user on accounts."},recordReportCount:{type:"integer",description:"The total number of reports made by the user on records."},reportedAccountCount:{type:"integer",description:"The total number of accounts reported by the user."},reportedRecordCount:{type:"integer",description:"The total number of records reported by the user."},takendownAccountCount:{type:"integer",description:"The total number of accounts taken down as a result of the user's reports."},takendownRecordCount:{type:"integer",description:"The total number of records taken down as a result of the user's reports."},labeledAccountCount:{type:"integer",description:"The total number of accounts labeled as a result of the user's reports."},labeledRecordCount:{type:"integer",description:"The total number of records labeled as a result of the user's reports."}}}}},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#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"]},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"}]}}},ToolsOzoneModerationGetReporterStats:{lexicon:1,id:"tools.ozone.moderation.getReporterStats",defs:{main:{type:"query",description:"Get reporter stats for a list of users.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#reporterStats"}}}}}}}},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"]}}}}}}}},ToolsOzoneModerationGetSubjects:{lexicon:1,id:"tools.ozone.moderation.getSubjects",defs:{main:{type:"query",description:"Get details about subjects.",parameters:{type:"params",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,minLength:1,items:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView"}}}}}}}},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<name>) 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"},verifierDid:{type:"string",format:"did",description:"The did of the verifier used for verification."}}}}},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","tools.ozone.team.defs#roleVerifier"]}}}}},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","tools.ozone.team.defs#roleVerifier"]},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#roleVerifier","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#roleVerifier","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","lex:tools.ozone.team.defs#roleVerifier"]}}},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."},roleVerifier:{type:"token",description:"Verifier role. Only allowed to issue verifications."}}},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:{q:{type:"string"},disabled:{type:"boolean"},roles:{type:"array",items:{type:"string"}},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#roleVerifier","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"}]}}},ToolsOzoneVerificationDefs:{lexicon:1,id:"tools.ozone.verification.defs",defs:{verificationView:{type:"object",description:"Verification data for the associated subject.",required:["issuer","uri","subject","handle","displayName","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},subject:{type:"string",format:"did",description:"The subject of the verification."},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"},revokeReason:{type:"string",description:"Describes the reason for revocation, also indicating that the verification is no longer valid."},revokedAt:{type:"string",description:"Timestamp when the verification was revoked.",format:"datetime"},revokedBy:{type:"string",description:"The user who revoked this verification.",format:"did"},subjectProfile:{type:"union",refs:[]},issuerProfile:{type:"union",refs:[]},subjectRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]},issuerRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}},ToolsOzoneVerificationGrantVerifications:{lexicon:1,id:"tools.ozone.verification.grantVerifications",defs:{main:{type:"procedure",description:"Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.",input:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{verifications:{type:"array",description:"Array of verification requests to process",maxLength:100,items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#verificationInput"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications","failedVerifications"],properties:{verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}},failedVerifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#grantError"}}}}}},verificationInput:{type:"object",required:["subject","handle","displayName"],properties:{subject:{type:"string",description:"The did of the subject being verified",format:"did"},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying."},createdAt:{type:"string",format:"datetime",description:"Timestamp for verification record. Defaults to current time when not specified."}}},grantError:{type:"object",description:"Error object for failed verifications.",required:["error","subject"],properties:{error:{type:"string",description:"Error message describing the reason for failure."},subject:{type:"string",description:"The did of the subject being verified",format:"did"}}}}},ToolsOzoneVerificationListVerifications:{lexicon:1,id:"tools.ozone.verification.listVerifications",defs:{main:{type:"query",description:"List verifications",parameters:{type:"params",properties:{cursor:{type:"string",description:"Pagination cursor"},limit:{type:"integer",description:"Maximum number of results to return",minimum:1,maximum:100,default:50},createdAfter:{type:"string",format:"datetime",description:"Filter to verifications created after this timestamp"},createdBefore:{type:"string",format:"datetime",description:"Filter to verifications created before this timestamp"},issuers:{type:"array",maxLength:100,description:"Filter to verifications from specific issuers",items:{type:"string",format:"did"}},subjects:{type:"array",description:"Filter to specific verified DIDs",maxLength:100,items:{type:"string",format:"did"}},sortDirection:{type:"string",description:"Sort direction for creation date",enum:["asc","desc"],default:"desc"},isRevoked:{type:"boolean",description:"Filter to verifications that are revoked or not. By default, includes both."}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{cursor:{type:"string"},verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}}}}}}}},ToolsOzoneVerificationRevokeVerifications:{lexicon:1,id:"tools.ozone.verification.revokeVerifications",defs:{main:{type:"procedure",description:"Revoke previously granted verifications in batches of up to 100.",input:{encoding:"application/json",schema:{type:"object",required:["uris"],properties:{uris:{type:"array",description:"Array of verification record uris to revoke",maxLength:100,items:{type:"string",description:"The AT-URI of the verification record to revoke.",format:"at-uri"}},revokeReason:{type:"string",description:"Reason for revoking the verification. This is optional and can be omitted if not needed.",maxLength:1e3}}}},output:{encoding:"application/json",schema:{type:"object",required:["revokedVerifications","failedRevocations"],properties:{revokedVerifications:{type:"array",description:"List of verification uris successfully revoked",items:{type:"string",format:"at-uri"}},failedRevocations:{type:"array",description:"List of verification uris that couldn't be revoked, including failure reasons",items:{type:"ref",ref:"lex:tools.ozone.verification.revokeVerifications#revokeError"}}}}}},revokeError:{type:"object",description:"Error object for failed revocations",required:["uri","error"],properties:{uri:{type:"string",description:"The AT-URI of the verification record that failed to revoke.",format:"at-uri"},error:{type:"string",description:"Description of the error that occurred during revocation."}}}}}},t.schemas=Object.values(t.schemaDict),t.lexicons=new e.Lexicons(t.schemas);function n(i,o,s,a){return(a?r.is$typed:r.maybe$typed)(i,o,s)?t.lexicons.validate(`${o}#${s}`,i):{success:!1,error:new e.ValidationError(`Must be an object with "${s==="main"?o:`${o}#${s}`}" $type property`)}}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",ComAtprotoAdminUpdateAccountSigningKey:"com.atproto.admin.updateAccountSigningKey",ComAtprotoAdminUpdateSubjectStatus:"com.atproto.admin.updateSubjectStatus",ComAtprotoIdentityDefs:"com.atproto.identity.defs",ComAtprotoIdentityGetRecommendedDidCredentials:"com.atproto.identity.getRecommendedDidCredentials",ComAtprotoIdentityRefreshIdentity:"com.atproto.identity.refreshIdentity",ComAtprotoIdentityRequestPlcOperationSignature:"com.atproto.identity.requestPlcOperationSignature",ComAtprotoIdentityResolveDid:"com.atproto.identity.resolveDid",ComAtprotoIdentityResolveHandle:"com.atproto.identity.resolveHandle",ComAtprotoIdentityResolveIdentity:"com.atproto.identity.resolveIdentity",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",ComAtprotoSyncDefs:"com.atproto.sync.defs",ComAtprotoSyncGetBlob:"com.atproto.sync.getBlob",ComAtprotoSyncGetBlocks:"com.atproto.sync.getBlocks",ComAtprotoSyncGetCheckout:"com.atproto.sync.getCheckout",ComAtprotoSyncGetHead:"com.atproto.sync.getHead",ComAtprotoSyncGetHostStatus:"com.atproto.sync.getHostStatus",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",ComAtprotoSyncListHosts:"com.atproto.sync.listHosts",ComAtprotoSyncListRepos:"com.atproto.sync.listRepos",ComAtprotoSyncListReposByCollection:"com.atproto.sync.listReposByCollection",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",AppBskyActorStatus:"app.bsky.actor.status",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",AppBskyFeedGetPosts:"app.bsky.feed.getPosts",AppBskyFeedGetPostThread:"app.bsky.feed.getPostThread",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",AppBskyGraphVerification:"app.bsky.graph.verification",AppBskyLabelerDefs:"app.bsky.labeler.defs",AppBskyLabelerGetServices:"app.bsky.labeler.getServices",AppBskyLabelerService:"app.bsky.labeler.service",AppBskyNotificationDefs:"app.bsky.notification.defs",AppBskyNotificationGetPreferences:"app.bsky.notification.getPreferences",AppBskyNotificationGetUnreadCount:"app.bsky.notification.getUnreadCount",AppBskyNotificationListNotifications:"app.bsky.notification.listNotifications",AppBskyNotificationPutPreferences:"app.bsky.notification.putPreferences",AppBskyNotificationPutPreferencesV2:"app.bsky.notification.putPreferencesV2",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",AppBskyUnspeccedGetPostThreadOtherV2:"app.bsky.unspecced.getPostThreadOtherV2",AppBskyUnspeccedGetPostThreadV2:"app.bsky.unspecced.getPostThreadV2",AppBskyUnspeccedGetSuggestedFeeds:"app.bsky.unspecced.getSuggestedFeeds",AppBskyUnspeccedGetSuggestedFeedsSkeleton:"app.bsky.unspecced.getSuggestedFeedsSkeleton",AppBskyUnspeccedGetSuggestedStarterPacks:"app.bsky.unspecced.getSuggestedStarterPacks",AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",AppBskyUnspeccedGetSuggestedUsers:"app.bsky.unspecced.getSuggestedUsers",AppBskyUnspeccedGetSuggestedUsersSkeleton:"app.bsky.unspecced.getSuggestedUsersSkeleton",AppBskyUnspeccedGetSuggestionsSkeleton:"app.bsky.unspecced.getSuggestionsSkeleton",AppBskyUnspeccedGetTaggedSuggestions:"app.bsky.unspecced.getTaggedSuggestions",AppBskyUnspeccedGetTrendingTopics:"app.bsky.unspecced.getTrendingTopics",AppBskyUnspeccedGetTrends:"app.bsky.unspecced.getTrends",AppBskyUnspeccedGetTrendsSkeleton:"app.bsky.unspecced.getTrendsSkeleton",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",ChatBskyConvoAcceptConvo:"chat.bsky.convo.acceptConvo",ChatBskyConvoAddReaction:"chat.bsky.convo.addReaction",ChatBskyConvoDefs:"chat.bsky.convo.defs",ChatBskyConvoDeleteMessageForSelf:"chat.bsky.convo.deleteMessageForSelf",ChatBskyConvoGetConvo:"chat.bsky.convo.getConvo",ChatBskyConvoGetConvoAvailability:"chat.bsky.convo.getConvoAvailability",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",ChatBskyConvoRemoveReaction:"chat.bsky.convo.removeReaction",ChatBskyConvoSendMessage:"chat.bsky.convo.sendMessage",ChatBskyConvoSendMessageBatch:"chat.bsky.convo.sendMessageBatch",ChatBskyConvoUnmuteConvo:"chat.bsky.convo.unmuteConvo",ChatBskyConvoUpdateAllRead:"chat.bsky.convo.updateAllRead",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",ToolsOzoneHostingGetAccountHistory:"tools.ozone.hosting.getAccountHistory",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",ToolsOzoneModerationGetReporterStats:"tools.ozone.moderation.getReporterStats",ToolsOzoneModerationGetRepos:"tools.ozone.moderation.getRepos",ToolsOzoneModerationGetSubjects:"tools.ozone.moderation.getSubjects",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",ToolsOzoneVerificationDefs:"tools.ozone.verification.defs",ToolsOzoneVerificationGrantVerifications:"tools.ozone.verification.grantVerifications",ToolsOzoneVerificationListVerifications:"tools.ozone.verification.listVerifications",ToolsOzoneVerificationRevokeVerifications:"tools.ozone.verification.revokeVerifications"}})(A);var KI={};Object.defineProperty(KI,"__esModule",{value:!0});var ap={};Object.defineProperty(ap,"__esModule",{value:!0});ap.BSKY_LABELER_DID=void 0;ap.BSKY_LABELER_DID="did:plc:ar7c4by46qjdydhdevvrndac";var n_={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.nuxSchema=t.asDid=t.isDid=void 0,t.sanitizeMutedWordValue=i,t.savedFeedsToUriArrays=o,t.getSavedFeedType=s,t.validateSavedFeed=a,t.validateNux=d;const e=Z,r=Pi,n=Bs;function i(f){return f.trim().replace(/^#(?!\ufe0f)/,"").replace(/[\r\n\u00AD\u2060\u200D\u200C\u200B]+/,"")}function o(f){const h=[],m=[];for(const g of f)g.pinned&&h.push(g.value),m.push(g.value);return{pinned:h,saved:m}}function s(f){switch(new n.AtUri(f).collection){case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";default:return"unknown"}}function a(f){if(new r.TID(f.id),["feed","list"].includes(f.type)){const h=new n.AtUri(f.value),m=h.collection==="app.bsky.feed.generator",g=h.collection==="app.bsky.graph.list";if(f.type==="feed"&&!m)throw new Error(`Saved feed of type 'feed' must be a feed, got ${h.collection}`);if(f.type==="list"&&!g)throw new Error(`Saved feed of type 'list' must be a list, got ${h.collection}`)}}const c=f=>typeof f=="string"&&f.startsWith("did:")&&f.includes(":",4)&&f.length>8&&f.length<=2048;t.isDid=c;const u=f=>{if((0,t.isDid)(f))return f;throw new TypeError(`Invalid DID: ${f}`)};t.asDid=u,t.nuxSchema=e.z.object({id:e.z.string().max(64),completed:e.z.boolean(),data:e.z.string().max(300).optional(),expiresAt:e.z.string().datetime().optional()}).strict();function d(f){t.nuxSchema.parse(f)}})(n_);var p={},ee={},ja={},ur={},zg={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.XRPCInvalidResponseError=t.XRPCError=t.XRPCResponse=t.ResponseTypeStrings=t.ResponseType=t.errorResponseBody=void 0,t.httpResponseCodeToEnum=n,t.httpResponseCodeToName=i,t.httpResponseCodeToString=o;const e=Z;t.errorResponseBody=e.z.object({error:e.z.string().optional(),message:e.z.string().optional()});var r;(function(u){u[u.Unknown=1]="Unknown",u[u.InvalidResponse=2]="InvalidResponse",u[u.Success=200]="Success",u[u.InvalidRequest=400]="InvalidRequest",u[u.AuthenticationRequired=401]="AuthenticationRequired",u[u.Forbidden=403]="Forbidden",u[u.XRPCNotSupported=404]="XRPCNotSupported",u[u.NotAcceptable=406]="NotAcceptable",u[u.PayloadTooLarge=413]="PayloadTooLarge",u[u.UnsupportedMediaType=415]="UnsupportedMediaType",u[u.RateLimitExceeded=429]="RateLimitExceeded",u[u.InternalServerError=500]="InternalServerError",u[u.MethodNotImplemented=501]="MethodNotImplemented",u[u.UpstreamFailure=502]="UpstreamFailure",u[u.NotEnoughResources=503]="NotEnoughResources",u[u.UpstreamTimeout=504]="UpstreamTimeout"})(r||(t.ResponseType=r={}));function n(u){return u in r?u:u>=100&&u<200?r.XRPCNotSupported:u>=200&&u<300?r.Success:u>=300&&u<400?r.XRPCNotSupported:u>=400&&u<500?r.InvalidRequest:r.InternalServerError}function i(u){return r[n(u)]}t.ResponseTypeStrings={[r.Unknown]:"Unknown",[r.InvalidResponse]:"Invalid Response",[r.Success]:"Success",[r.InvalidRequest]:"Invalid Request",[r.AuthenticationRequired]:"Authentication Required",[r.Forbidden]:"Forbidden",[r.XRPCNotSupported]:"XRPC Not Supported",[r.NotAcceptable]:"Not Acceptable",[r.PayloadTooLarge]:"Payload Too Large",[r.UnsupportedMediaType]:"Unsupported Media Type",[r.RateLimitExceeded]:"Rate Limit Exceeded",[r.InternalServerError]:"Internal Server Error",[r.MethodNotImplemented]:"Method Not Implemented",[r.UpstreamFailure]:"Upstream Failure",[r.NotEnoughResources]:"Not Enough Resources",[r.UpstreamTimeout]:"Upstream Timeout"};function o(u){return t.ResponseTypeStrings[n(u)]}class s{constructor(d,f){Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!0})}}t.XRPCResponse=s;class a extends Error{constructor(d,f=i(d),h,m,g){super(h||f||o(d),g),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:m}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=n(d);const v=g==null?void 0:g.cause;this.cause===void 0&&v!==void 0&&(this.cause=v)}static from(d,f){if(d instanceof a)return d;const h=d instanceof Error?d:void 0,m=d instanceof Response?d:(d==null?void 0:d.response)instanceof Response?d.response:void 0,g=(h==null?void 0:h.statusCode)??(h==null?void 0:h.status)??(m==null?void 0:m.status),v=typeof g=="number"?n(g):f??r.Unknown,w=(h==null?void 0:h.message)??String(d),y=m?Object.fromEntries(m.headers.entries()):void 0;return new a(v,void 0,w,y,{cause:d})}}t.XRPCError=a;class c extends a{constructor(d,f,h){super(r.InvalidResponse,t.ResponseTypeStrings[r.InvalidResponse],"The server gave an invalid response and may be out of date.",void 0,{cause:f}),Object.defineProperty(this,"lexiconNsid",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"validationError",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"responseBody",{enumerable:!0,configurable:!0,writable:!0,value:h})}}t.XRPCInvalidResponseError=c})(zg);Object.defineProperty(ur,"__esModule",{value:!0});ur.isErrorResponseBody=nY;ur.getMethodSchemaHTTPMethod=iY;ur.constructMethodCallUri=oY;ur.constructMethodCallUrl=NI;ur.encodeQueryParam=FE;ur.constructMethodCallHeaders=sY;ur.combineHeaders=aY;ur.isBodyInit=FI;ur.isIterable=i_;ur.encodeMethodCallBody=lY;ur.httpResponseBodyParse=uY;const MI=Ia,Wn=zg,md=globalThis.ReadableStream||class{constructor(){throw new Error("ReadableStream is not supported in this environment")}};function nY(t){return Wn.errorResponseBody.safeParse(t).success}function iY(t){return t.type==="procedure"?"post":"get"}function oY(t,e,r,n){return new URL(NI(t,e,n),r).toString()}function NI(t,e,r){var o,s;const n=`/xrpc/${encodeURIComponent(t)}`;if(!r)return n;const i=[];for(const[a,c]of Object.entries(r)){const u=(s=(o=e.parameters)==null?void 0:o.properties)==null?void 0:s[a];if(!u)throw new Error(`Invalid query parameter: ${a}`);if(c!==void 0)if(u.type==="array"){const d=Array.isArray(c)?c:[c];for(const f of d)i.push([a,FE(u.items.type,f)])}else i.push([a,FE(u.type,c)])}return i.length?`${n}?${new URLSearchParams(i).toString()}`:n}function FE(t,e){if(t==="string"||t==="unknown")return String(e);if(t==="float")return String(Number(e));if(t==="integer")return String(Number(e)|0);if(t==="boolean")return e?"true":"false";if(t==="datetime")return e instanceof Date?e.toISOString():String(e);throw new Error(`Unsupported query param type: ${t}`)}function sY(t,e,r){const n=new Headers;if(r!=null&&r.headers)for(const i in r.headers){if(n.has(i))throw new TypeError(`Duplicate header: ${i}`);const o=r.headers[i];o!=null&&n.set(i,o)}if(t.type==="procedure"){if(r!=null&&r.encoding)n.set("content-type",r.encoding);else if(!n.has("content-type")&&typeof e<"u")if(e instanceof ArrayBuffer||e instanceof md||ArrayBuffer.isView(e))n.set("content-type","application/octet-stream");else if(e instanceof FormData)n.set("content-type","multipart/form-data");else if(e instanceof URLSearchParams)n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8");else if(zI(e))n.set("content-type",e.type||"application/octet-stream");else if(typeof e=="string")n.set("content-type","text/plain;charset=UTF-8");else if(i_(e))n.set("content-type","application/octet-stream");else if(typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="object")n.set("content-type","application/json");else throw new Wn.XRPCError(Wn.ResponseType.InvalidRequest,`Unsupported data type: ${typeof e}`)}return n}function aY(t,e){if(!e)return t;let r;for(const[n,i]of e){if(i===void 0||(r??(r=new Headers(t)),r.has(n)))continue;const o=typeof i=="function"?i():i;if(typeof o=="string")r.set(n,o);else if(o===null)r.delete(n);else throw new TypeError(`Invalid "${n}" header value: ${typeof o}`)}return r??t}function zI(t){if(t==null||typeof t!="object")return!1;if(typeof Blob=="function"&&t instanceof Blob)return!0;const e=t[Symbol.toStringTag];return e==="Blob"||e==="File"?"stream"in t&&typeof t.stream=="function":!1}function FI(t){switch(typeof t){case"string":return!0;case"object":return t instanceof ArrayBuffer||t instanceof FormData||t instanceof URLSearchParams||t instanceof md||ArrayBuffer.isView(t)||zI(t);default:return!1}}function i_(t){return t!=null&&typeof t=="object"&&(Symbol.iterator in t||Symbol.asyncIterator in t)}function lY(t,e){var i;const r=t.get("content-type");if(!r)return;if(typeof e>"u")throw new Wn.XRPCError(Wn.ResponseType.InvalidRequest,"A request body is expected but none was provided");if(FI(e))return e instanceof FormData&&r==="multipart/form-data"&&t.delete("content-type"),e;if(i_(e))return cY(e);if(r.startsWith("text/"))return new TextEncoder().encode(String(e));if(r.startsWith("application/json")){const o=(0,MI.stringifyLex)(e);if(o===void 0)throw new Wn.XRPCError(Wn.ResponseType.InvalidRequest,"Failed to encode request body as JSON");return new TextEncoder().encode(o)}const n=!e||typeof e!="object"?typeof e:e.constructor!==Object&&typeof e.constructor=="function"&&typeof((i=e.constructor)==null?void 0:i.name)=="string"?e.constructor.name:"object";throw new Wn.XRPCError(Wn.ResponseType.InvalidRequest,`Unable to encode ${n} as ${r} data`)}function cY(t){if("from"in md&&typeof md.from=="function")return md.from(t);throw new TypeError("ReadableStream.from() is not supported in this environment. It is required to support using iterables as the request body. Consider using a polyfill or re-write your code to use a different body type.")}function uY(t,e){try{if(t){if(t.includes("application/json")){const r=new TextDecoder().decode(e);return(0,MI.jsonStringToLex)(r)}if(t.startsWith("text/"))return new TextDecoder().decode(e)}return e instanceof ArrayBuffer?new Uint8Array(e):e}catch(r){throw new Wn.XRPCError(Wn.ResponseType.InvalidResponse,void 0,`Failed to parse response body: ${String(r)}`,void 0,{cause:r})}}var lp={},Fg={};Object.defineProperty(Fg,"__esModule",{value:!0});Fg.buildFetchHandler=fY;const dY=ur;function fY(t){if(typeof t=="function")return t;if(typeof t=="object"&&"fetchHandler"in t)return t.fetchHandler.bind(t);const{service:e,headers:r=void 0,fetch:n=globalThis.fetch}=typeof t=="string"||t instanceof URL?{service:t}:t;if(typeof n!="function")throw new TypeError("XrpcDispatcher requires fetch() to be available in your environment.");const i=r!=null?Object.entries(r):void 0;return async function(o,s){const a=typeof e=="function"?e():e,c=new URL(o,a),u=(0,dY.combineHeaders)(s.headers,i);return n(c,{...s,headers:u})}}Object.defineProperty(lp,"__esModule",{value:!0});lp.XrpcClient=void 0;const t0=Ia,pY=Fg,rl=zg,ta=ur;class hY{constructor(e,r){Object.defineProperty(this,"fetchHandler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetchHandler=(0,pY.buildFetchHandler)(e),this.lex=r instanceof t0.Lexicons?r:new t0.Lexicons(r)}setHeader(e,r){this.headers.set(e.toLowerCase(),r)}unsetHeader(e){this.headers.delete(e.toLowerCase())}clearHeaders(){this.headers.clear()}async call(e,r,n,i){const o=this.lex.getDefOrThrow(e);if(!o||o.type!=="query"&&o.type!=="procedure")throw new TypeError(`Invalid lexicon: ${e}. Must be a query or procedure.`);const s=(0,ta.constructMethodCallUrl)(e,o,r),a=(0,ta.getMethodSchemaHTTPMethod)(o),c=(0,ta.constructMethodCallHeaders)(o,n,i),u=(0,ta.encodeMethodCallBody)(c,n),d={method:a,headers:(0,ta.combineHeaders)(c,this.headers),body:u,duplex:"half",signal:i==null?void 0:i.signal};try{const f=await this.fetchHandler.call(void 0,s,d),h=f.status,m=Object.fromEntries(f.headers.entries()),g=await f.arrayBuffer(),v=(0,ta.httpResponseBodyParse)(f.headers.get("content-type"),g),w=(0,rl.httpResponseCodeToEnum)(h);if(w!==rl.ResponseType.Success){const{error:y=void 0,message:b=void 0}=v&&(0,ta.isErrorResponseBody)(v)?v:{};throw new rl.XRPCError(w,y,b,m)}try{this.lex.assertValidXrpcOutput(e,v)}catch(y){throw y instanceof t0.ValidationError?new rl.XRPCInvalidResponseError(e,y,v):y}return new rl.XRPCResponse(v,m)}catch(f){throw rl.XRPCError.from(f)}}}lp.XrpcClient=hY;Object.defineProperty(ja,"__esModule",{value:!0});ja.ServiceClient=ja.Client=void 0;const mY=Ia,yY=ur,gY=lp;class bY{constructor(){Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:new mY.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,r,n,i,o){return this.service(e).call(r,n,i,o)}service(e){return new qI(this,e)}addLexicon(e){this.lex.add(e)}addLexicons(e){for(const r of e)this.addLexicon(r)}removeLexicon(e){this.lex.remove(e)}}ja.Client=bY;class qI extends gY.XrpcClient{constructor(e,r){super(async(n,i)=>{const o=(0,yY.combineHeaders)(i.headers,Object.entries(this.headers));return fetch(new URL(n,this.uri),{...i,headers:o})},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=typeof r=="string"?new URL(r):r}}ja.ServiceClient=qI;(function(t){var e=C&&C.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a);var u=Object.getOwnPropertyDescriptor(s,a);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(o,c,u)}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),r=C&&C.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&e(s,o,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(ja,t),r(Fg,t),r(zg,t),r(ur,t),r(lp,t);const n=ja,i=new n.Client;t.default=i})(ee);var gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.DidDeactivatedError=gi.DidNotFoundError=gi.HandleNotFoundError=void 0;gi.toKnownErr=wY;const qg=ee,vY=A,EY=R;EY.is$typed;vY.validate;let GI=class extends qg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gi.HandleNotFoundError=GI;let HI=class extends qg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gi.DidNotFoundError=HI;let WI=class extends qg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gi.DidDeactivatedError=WI;function wY(t){if(t instanceof qg.XRPCError){if(t.error==="HandleNotFound")return new GI(t);if(t.error==="DidNotFound")return new HI(t);if(t.error==="DidDeactivated")return new WI(t)}return t}var ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.DidDeactivatedError=ms.DidNotFoundError=void 0;ms.toKnownErr=RY;const o_=ee,xY=A,_Y=R;_Y.is$typed;xY.validate;let XI=class extends o_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};ms.DidNotFoundError=XI;let JI=class extends o_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};ms.DidDeactivatedError=JI;function RY(t){if(t instanceof o_.XRPCError){if(t.error==="DidNotFound")return new XI(t);if(t.error==="DidDeactivated")return new JI(t)}return t}var _c={};Object.defineProperty(_c,"__esModule",{value:!0});_c.HandleNotFoundError=void 0;_c.toKnownErr=CY;const ZI=ee,AY=A,SY=R;SY.is$typed;AY.validate;let QI=class extends ZI.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};_c.HandleNotFoundError=QI;function CY(t){return t instanceof ZI.XRPCError&&t.error==="HandleNotFound"?new QI(t):t}var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.DidDeactivatedError=bi.DidNotFoundError=bi.HandleNotFoundError=void 0;bi.toKnownErr=PY;const Gg=ee,TY=A,kY=R;kY.is$typed;TY.validate;class YI extends Gg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}bi.HandleNotFoundError=YI;class ej extends Gg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}bi.DidNotFoundError=ej;class tj extends Gg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}bi.DidDeactivatedError=tj;function PY(t){if(t instanceof Gg.XRPCError){if(t.error==="HandleNotFound")return new YI(t);if(t.error==="DidNotFound")return new ej(t);if(t.error==="DidDeactivated")return new tj(t)}return t}var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.InvalidSwapError=void 0;Vt.toKnownErr=BY;Vt.isCreate=IY;Vt.validateCreate=jY;Vt.isUpdate=OY;Vt.validateUpdate=UY;Vt.isDelete=$Y;Vt.validateDelete=VY;Vt.isCreateResult=KY;Vt.validateCreateResult=MY;Vt.isUpdateResult=NY;Vt.validateUpdateResult=zY;Vt.isDeleteResult=FY;Vt.validateDeleteResult=qY;const rj=ee,LY=A,DY=R,Rc=DY.is$typed,Ac=LY.validate,Rn="com.atproto.repo.applyWrites";let nj=class extends rj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Vt.InvalidSwapError=nj;function BY(t){return t instanceof rj.XRPCError&&t.error==="InvalidSwap"?new nj(t):t}const ij="create";function IY(t){return Rc(t,Rn,ij)}function jY(t){return Ac(t,Rn,ij)}const oj="update";function OY(t){return Rc(t,Rn,oj)}function UY(t){return Ac(t,Rn,oj)}const sj="delete";function $Y(t){return Rc(t,Rn,sj)}function VY(t){return Ac(t,Rn,sj)}const aj="createResult";function KY(t){return Rc(t,Rn,aj)}function MY(t){return Ac(t,Rn,aj)}const lj="updateResult";function NY(t){return Rc(t,Rn,lj)}function zY(t){return Ac(t,Rn,lj)}const cj="deleteResult";function FY(t){return Rc(t,Rn,cj)}function qY(t){return Ac(t,Rn,cj)}var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.InvalidSwapError=void 0;Sc.toKnownErr=WY;const uj=ee,GY=A,HY=R;HY.is$typed;GY.validate;let dj=class extends uj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Sc.InvalidSwapError=dj;function WY(t){return t instanceof uj.XRPCError&&t.error==="InvalidSwap"?new dj(t):t}var Cc={};Object.defineProperty(Cc,"__esModule",{value:!0});Cc.InvalidSwapError=void 0;Cc.toKnownErr=ZY;const fj=ee,XY=A,JY=R;JY.is$typed;XY.validate;let pj=class extends fj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Cc.InvalidSwapError=pj;function ZY(t){return t instanceof fj.XRPCError&&t.error==="InvalidSwap"?new pj(t):t}var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});Tc.RecordNotFoundError=void 0;Tc.toKnownErr=eee;const hj=ee,QY=A,YY=R;YY.is$typed;QY.validate;let mj=class extends hj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Tc.RecordNotFoundError=mj;function eee(t){return t instanceof hj.XRPCError&&t.error==="RecordNotFound"?new mj(t):t}var kc={};Object.defineProperty(kc,"__esModule",{value:!0});kc.InvalidSwapError=void 0;kc.toKnownErr=nee;const yj=ee,tee=A,ree=R;ree.is$typed;tee.validate;class gj extends yj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}kc.InvalidSwapError=gj;function nee(t){return t instanceof yj.XRPCError&&t.error==="InvalidSwap"?new gj(t):t}var hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.InvalidEmailError=hn.InvalidTokenError=hn.ExpiredTokenError=hn.AccountNotFoundError=void 0;hn.toKnownErr=see;const cp=ee,iee=A,oee=R;oee.is$typed;iee.validate;class bj extends cp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}hn.AccountNotFoundError=bj;let vj=class extends cp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};hn.ExpiredTokenError=vj;let Ej=class extends cp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};hn.InvalidTokenError=Ej;class wj extends cp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}hn.InvalidEmailError=wj;function see(t){if(t instanceof cp.XRPCError){if(t.error==="AccountNotFound")return new bj(t);if(t.error==="ExpiredToken")return new vj(t);if(t.error==="InvalidToken")return new Ej(t);if(t.error==="InvalidEmail")return new wj(t)}return t}var jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.IncompatibleDidDocError=jt.UnresolvableDidError=jt.UnsupportedDomainError=jt.HandleNotAvailableError=jt.InvalidInviteCodeError=jt.InvalidPasswordError=jt.InvalidHandleError=void 0;jt.toKnownErr=cee;const Os=ee,aee=A,lee=R;lee.is$typed;aee.validate;class xj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.InvalidHandleError=xj;class _j extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.InvalidPasswordError=_j;class Rj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.InvalidInviteCodeError=Rj;class Aj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.HandleNotAvailableError=Aj;class Sj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.UnsupportedDomainError=Sj;class Cj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.UnresolvableDidError=Cj;class Tj extends Os.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jt.IncompatibleDidDocError=Tj;function cee(t){if(t instanceof Os.XRPCError){if(t.error==="InvalidHandle")return new xj(t);if(t.error==="InvalidPassword")return new _j(t);if(t.error==="InvalidInviteCode")return new Rj(t);if(t.error==="HandleNotAvailable")return new Aj(t);if(t.error==="UnsupportedDomain")return new Sj(t);if(t.error==="UnresolvableDid")return new Cj(t);if(t.error==="IncompatibleDidDoc")return new Tj(t)}return t}var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.AccountTakedownError=void 0;Us.toKnownErr=hee;Us.isAppPassword=mee;Us.validateAppPassword=yee;const kj=ee,uee=A,dee=R,fee=dee.is$typed,pee=uee.validate,Pj="com.atproto.server.createAppPassword";let Lj=class extends kj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Us.AccountTakedownError=Lj;function hee(t){return t instanceof kj.XRPCError&&t.error==="AccountTakedown"?new Lj(t):t}const Dj="appPassword";function mee(t){return fee(t,Pj,Dj)}function yee(t){return pee(t,Pj,Dj)}var ys={};Object.defineProperty(ys,"__esModule",{value:!0});ys.AuthFactorTokenRequiredError=ys.AccountTakedownError=void 0;ys.toKnownErr=vee;const s_=ee,gee=A,bee=R;bee.is$typed;gee.validate;let Bj=class extends s_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};ys.AccountTakedownError=Bj;class Ij extends s_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ys.AuthFactorTokenRequiredError=Ij;function vee(t){if(t instanceof s_.XRPCError){if(t.error==="AccountTakedown")return new Bj(t);if(t.error==="AuthFactorTokenRequired")return new Ij(t)}return t}var gs={};Object.defineProperty(gs,"__esModule",{value:!0});gs.InvalidTokenError=gs.ExpiredTokenError=void 0;gs.toKnownErr=xee;const a_=ee,Eee=A,wee=R;wee.is$typed;Eee.validate;let jj=class extends a_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gs.ExpiredTokenError=jj;let Oj=class extends a_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gs.InvalidTokenError=Oj;function xee(t){if(t instanceof a_.XRPCError){if(t.error==="ExpiredToken")return new jj(t);if(t.error==="InvalidToken")return new Oj(t)}return t}var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});Pc.DuplicateCreateError=void 0;Pc.toKnownErr=Aee;const Uj=ee,_ee=A,Ree=R;Ree.is$typed;_ee.validate;class $j extends Uj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Pc.DuplicateCreateError=$j;function Aee(t){return t instanceof Uj.XRPCError&&t.error==="DuplicateCreate"?new $j(t):t}var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});Lc.BadExpirationError=void 0;Lc.toKnownErr=Tee;const Vj=ee,See=A,Cee=R;Cee.is$typed;See.validate;class Kj extends Vj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Lc.BadExpirationError=Kj;function Tee(t){return t instanceof Vj.XRPCError&&t.error==="BadExpiration"?new Kj(t):t}var $s={};Object.defineProperty($s,"__esModule",{value:!0});$s.AccountTakedownError=void 0;$s.toKnownErr=Bee;$s.isAppPassword=Iee;$s.validateAppPassword=jee;const Mj=ee,kee=A,Pee=R,Lee=Pee.is$typed,Dee=kee.validate,Nj="com.atproto.server.listAppPasswords";let zj=class extends Mj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};$s.AccountTakedownError=zj;function Bee(t){return t instanceof Mj.XRPCError&&t.error==="AccountTakedown"?new zj(t):t}const Fj="appPassword";function Iee(t){return Lee(t,Nj,Fj)}function jee(t){return Dee(t,Nj,Fj)}var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});Dc.AccountTakedownError=void 0;Dc.toKnownErr=$ee;const qj=ee,Oee=A,Uee=R;Uee.is$typed;Oee.validate;class Gj extends qj.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Dc.AccountTakedownError=Gj;function $ee(t){return t instanceof qj.XRPCError&&t.error==="AccountTakedown"?new Gj(t):t}var bs={};Object.defineProperty(bs,"__esModule",{value:!0});bs.InvalidTokenError=bs.ExpiredTokenError=void 0;bs.toKnownErr=Mee;const l_=ee,Vee=A,Kee=R;Kee.is$typed;Vee.validate;let Hj=class extends l_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};bs.ExpiredTokenError=Hj;let Wj=class extends l_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};bs.InvalidTokenError=Wj;function Mee(t){if(t instanceof l_.XRPCError){if(t.error==="ExpiredToken")return new Hj(t);if(t.error==="InvalidToken")return new Wj(t)}return t}var vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.TokenRequiredError=vi.InvalidTokenError=vi.ExpiredTokenError=void 0;vi.toKnownErr=Fee;const Hg=ee,Nee=A,zee=R;zee.is$typed;Nee.validate;class Xj extends Hg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}vi.ExpiredTokenError=Xj;class Jj extends Hg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}vi.InvalidTokenError=Jj;class Zj extends Hg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}vi.TokenRequiredError=Zj;function Fee(t){if(t instanceof Hg.XRPCError){if(t.error==="ExpiredToken")return new Xj(t);if(t.error==="InvalidToken")return new Jj(t);if(t.error==="TokenRequired")return new Zj(t)}return t}var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.RepoDeactivatedError=Pr.RepoSuspendedError=Pr.RepoTakendownError=Pr.RepoNotFoundError=Pr.BlobNotFoundError=void 0;Pr.toKnownErr=Hee;const Bc=ee,qee=A,Gee=R;Gee.is$typed;qee.validate;class Qj extends Bc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Pr.BlobNotFoundError=Qj;let Yj=class extends Bc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Pr.RepoNotFoundError=Yj;let eO=class extends Bc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Pr.RepoTakendownError=eO;let tO=class extends Bc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Pr.RepoSuspendedError=tO;let rO=class extends Bc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Pr.RepoDeactivatedError=rO;function Hee(t){if(t instanceof Bc.XRPCError){if(t.error==="BlobNotFound")return new Qj(t);if(t.error==="RepoNotFound")return new Yj(t);if(t.error==="RepoTakendown")return new eO(t);if(t.error==="RepoSuspended")return new tO(t);if(t.error==="RepoDeactivated")return new rO(t)}return t}var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.RepoDeactivatedError=Lr.RepoSuspendedError=Lr.RepoTakendownError=Lr.RepoNotFoundError=Lr.BlockNotFoundError=void 0;Lr.toKnownErr=Jee;const Ic=ee,Wee=A,Xee=R;Xee.is$typed;Wee.validate;class nO extends Ic.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Lr.BlockNotFoundError=nO;let iO=class extends Ic.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Lr.RepoNotFoundError=iO;let oO=class extends Ic.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Lr.RepoTakendownError=oO;let sO=class extends Ic.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Lr.RepoSuspendedError=sO;let aO=class extends Ic.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Lr.RepoDeactivatedError=aO;function Jee(t){if(t instanceof Ic.XRPCError){if(t.error==="BlockNotFound")return new nO(t);if(t.error==="RepoNotFound")return new iO(t);if(t.error==="RepoTakendown")return new oO(t);if(t.error==="RepoSuspended")return new sO(t);if(t.error==="RepoDeactivated")return new aO(t)}return t}var jc={};Object.defineProperty(jc,"__esModule",{value:!0});jc.HeadNotFoundError=void 0;jc.toKnownErr=Yee;const lO=ee,Zee=A,Qee=R;Qee.is$typed;Zee.validate;class cO extends lO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jc.HeadNotFoundError=cO;function Yee(t){return t instanceof lO.XRPCError&&t.error==="HeadNotFound"?new cO(t):t}var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0});Oc.HostNotFoundError=void 0;Oc.toKnownErr=rte;const uO=ee,ete=A,tte=R;tte.is$typed;ete.validate;class dO extends uO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Oc.HostNotFoundError=dO;function rte(t){return t instanceof uO.XRPCError&&t.error==="HostNotFound"?new dO(t):t}var mn={};Object.defineProperty(mn,"__esModule",{value:!0});mn.RepoDeactivatedError=mn.RepoSuspendedError=mn.RepoTakendownError=mn.RepoNotFoundError=void 0;mn.toKnownErr=ote;const up=ee,nte=A,ite=R;ite.is$typed;nte.validate;let fO=class extends up.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};mn.RepoNotFoundError=fO;let pO=class extends up.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};mn.RepoTakendownError=pO;let hO=class extends up.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};mn.RepoSuspendedError=hO;let mO=class extends up.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};mn.RepoDeactivatedError=mO;function ote(t){if(t instanceof up.XRPCError){if(t.error==="RepoNotFound")return new fO(t);if(t.error==="RepoTakendown")return new pO(t);if(t.error==="RepoSuspended")return new hO(t);if(t.error==="RepoDeactivated")return new mO(t)}return t}var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.RepoDeactivatedError=Dr.RepoSuspendedError=Dr.RepoTakendownError=Dr.RepoNotFoundError=Dr.RecordNotFoundError=void 0;Dr.toKnownErr=lte;const Uc=ee,ste=A,ate=R;ate.is$typed;ste.validate;let yO=class extends Uc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.RecordNotFoundError=yO;let gO=class extends Uc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.RepoNotFoundError=gO;let bO=class extends Uc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.RepoTakendownError=bO;let vO=class extends Uc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.RepoSuspendedError=vO;let EO=class extends Uc.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.RepoDeactivatedError=EO;function lte(t){if(t instanceof Uc.XRPCError){if(t.error==="RecordNotFound")return new yO(t);if(t.error==="RepoNotFound")return new gO(t);if(t.error==="RepoTakendown")return new bO(t);if(t.error==="RepoSuspended")return new vO(t);if(t.error==="RepoDeactivated")return new EO(t)}return t}var yn={};Object.defineProperty(yn,"__esModule",{value:!0});yn.RepoDeactivatedError=yn.RepoSuspendedError=yn.RepoTakendownError=yn.RepoNotFoundError=void 0;yn.toKnownErr=dte;const dp=ee,cte=A,ute=R;ute.is$typed;cte.validate;let wO=class extends dp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};yn.RepoNotFoundError=wO;let xO=class extends dp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};yn.RepoTakendownError=xO;let _O=class extends dp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};yn.RepoSuspendedError=_O;let RO=class extends dp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};yn.RepoDeactivatedError=RO;function dte(t){if(t instanceof dp.XRPCError){if(t.error==="RepoNotFound")return new wO(t);if(t.error==="RepoTakendown")return new xO(t);if(t.error==="RepoSuspended")return new _O(t);if(t.error==="RepoDeactivated")return new RO(t)}return t}var $c={};Object.defineProperty($c,"__esModule",{value:!0});$c.RepoNotFoundError=void 0;$c.toKnownErr=hte;const AO=ee,fte=A,pte=R;pte.is$typed;fte.validate;let SO=class extends AO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};$c.RepoNotFoundError=SO;function hte(t){return t instanceof AO.XRPCError&&t.error==="RepoNotFound"?new SO(t):t}var gn={};Object.defineProperty(gn,"__esModule",{value:!0});gn.RepoDeactivatedError=gn.RepoSuspendedError=gn.RepoTakendownError=gn.RepoNotFoundError=void 0;gn.toKnownErr=gte;const fp=ee,mte=A,yte=R;yte.is$typed;mte.validate;let CO=class extends fp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gn.RepoNotFoundError=CO;class TO extends fp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}gn.RepoTakendownError=TO;class kO extends fp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}gn.RepoSuspendedError=kO;class PO extends fp.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}gn.RepoDeactivatedError=PO;function gte(t){if(t instanceof fp.XRPCError){if(t.error==="RepoNotFound")return new CO(t);if(t.error==="RepoTakendown")return new TO(t);if(t.error==="RepoSuspended")return new kO(t);if(t.error==="RepoDeactivated")return new PO(t)}return t}var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});Vc.HostBannedError=void 0;Vc.toKnownErr=Ete;const LO=ee,bte=A,vte=R;vte.is$typed;bte.validate;class DO extends LO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Vc.HostBannedError=DO;function Ete(t){return t instanceof LO.XRPCError&&t.error==="HostBanned"?new DO(t):t}var vs={};Object.defineProperty(vs,"__esModule",{value:!0});vs.BlockedByActorError=vs.BlockedActorError=void 0;vs.toKnownErr=_te;const c_=ee,wte=A,xte=R;xte.is$typed;wte.validate;let BO=class extends c_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};vs.BlockedActorError=BO;let IO=class extends c_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};vs.BlockedByActorError=IO;function _te(t){if(t instanceof c_.XRPCError){if(t.error==="BlockedActor")return new BO(t);if(t.error==="BlockedByActor")return new IO(t)}return t}var Es={};Object.defineProperty(Es,"__esModule",{value:!0});Es.BlockedByActorError=Es.BlockedActorError=void 0;Es.toKnownErr=Ste;const u_=ee,Rte=A,Ate=R;Ate.is$typed;Rte.validate;class jO extends u_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Es.BlockedActorError=jO;class OO extends u_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Es.BlockedByActorError=OO;function Ste(t){if(t instanceof u_.XRPCError){if(t.error==="BlockedActor")return new jO(t);if(t.error==="BlockedByActor")return new OO(t)}return t}var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});Kc.UnknownFeedError=void 0;Kc.toKnownErr=kte;const UO=ee,Cte=A,Tte=R;Tte.is$typed;Cte.validate;let $O=class extends UO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Kc.UnknownFeedError=$O;function kte(t){return t instanceof UO.XRPCError&&t.error==="UnknownFeed"?new $O(t):t}var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});Mc.UnknownFeedError=void 0;Mc.toKnownErr=Dte;const VO=ee,Pte=A,Lte=R;Lte.is$typed;Pte.validate;class KO extends VO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Mc.UnknownFeedError=KO;function Dte(t){return t instanceof VO.XRPCError&&t.error==="UnknownFeed"?new KO(t):t}var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});Nc.UnknownListError=void 0;Nc.toKnownErr=jte;const MO=ee,Bte=A,Ite=R;Ite.is$typed;Bte.validate;class NO extends MO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Nc.UnknownListError=NO;function jte(t){return t instanceof MO.XRPCError&&t.error==="UnknownList"?new NO(t):t}var zc={};Object.defineProperty(zc,"__esModule",{value:!0});zc.NotFoundError=void 0;zc.toKnownErr=$te;const zO=ee,Ote=A,Ute=R;Ute.is$typed;Ote.validate;class FO extends zO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}zc.NotFoundError=FO;function $te(t){return t instanceof zO.XRPCError&&t.error==="NotFound"?new FO(t):t}var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});Fc.BadQueryStringError=void 0;Fc.toKnownErr=Mte;const qO=ee,Vte=A,Kte=R;Kte.is$typed;Vte.validate;let GO=class extends qO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Fc.BadQueryStringError=GO;function Mte(t){return t instanceof qO.XRPCError&&t.error==="BadQueryString"?new GO(t):t}var qc={};Object.defineProperty(qc,"__esModule",{value:!0});qc.ActorNotFoundError=void 0;qc.toKnownErr=Fte;const HO=ee,Nte=A,zte=R;zte.is$typed;Nte.validate;class WO extends HO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}qc.ActorNotFoundError=WO;function Fte(t){return t instanceof HO.XRPCError&&t.error==="ActorNotFound"?new WO(t):t}var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.BadQueryStringError=void 0;Gc.toKnownErr=Hte;const XO=ee,qte=A,Gte=R;Gte.is$typed;qte.validate;let JO=class extends XO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Gc.BadQueryStringError=JO;function Hte(t){return t instanceof XO.XRPCError&&t.error==="BadQueryString"?new JO(t):t}var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});Hc.BadQueryStringError=void 0;Hc.toKnownErr=Jte;const ZO=ee,Wte=A,Xte=R;Xte.is$typed;Wte.validate;let QO=class extends ZO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Hc.BadQueryStringError=QO;function Jte(t){return t instanceof ZO.XRPCError&&t.error==="BadQueryString"?new QO(t):t}var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.BadQueryStringError=void 0;Wc.toKnownErr=Yte;const YO=ee,Zte=A,Qte=R;Qte.is$typed;Zte.validate;class eU extends YO.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Wc.BadQueryStringError=eU;function Yte(t){return t instanceof YO.XRPCError&&t.error==="BadQueryString"?new eU(t):t}var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ReactionInvalidValueError=Ei.ReactionLimitReachedError=Ei.ReactionMessageDeletedError=void 0;Ei.toKnownErr=rre;const Wg=ee,ere=A,tre=R;tre.is$typed;ere.validate;let tU=class extends Wg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ei.ReactionMessageDeletedError=tU;class rU extends Wg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ei.ReactionLimitReachedError=rU;let nU=class extends Wg.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ei.ReactionInvalidValueError=nU;function rre(t){if(t instanceof Wg.XRPCError){if(t.error==="ReactionMessageDeleted")return new tU(t);if(t.error==="ReactionLimitReached")return new rU(t);if(t.error==="ReactionInvalidValue")return new nU(t)}return t}var ws={};Object.defineProperty(ws,"__esModule",{value:!0});ws.ReactionInvalidValueError=ws.ReactionMessageDeletedError=void 0;ws.toKnownErr=ore;const d_=ee,nre=A,ire=R;ire.is$typed;nre.validate;class iU extends d_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ws.ReactionMessageDeletedError=iU;class oU extends d_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ws.ReactionInvalidValueError=oU;function ore(t){if(t instanceof d_.XRPCError){if(t.error==="ReactionMessageDeleted")return new iU(t);if(t.error==="ReactionInvalidValue")return new oU(t)}return t}var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.DuplicateTemplateNameError=void 0;Xc.toKnownErr=lre;const sU=ee,sre=A,are=R;are.is$typed;sre.validate;let aU=class extends sU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Xc.DuplicateTemplateNameError=aU;function lre(t){return t instanceof sU.XRPCError&&t.error==="DuplicateTemplateName"?new aU(t):t}var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.DuplicateTemplateNameError=void 0;Jc.toKnownErr=dre;const lU=ee,cre=A,ure=R;ure.is$typed;cre.validate;class cU extends lU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Jc.DuplicateTemplateNameError=cU;function dre(t){return t instanceof lU.XRPCError&&t.error==="DuplicateTemplateName"?new cU(t):t}var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.SubjectHasActionError=void 0;Zc.toKnownErr=hre;const uU=ee,fre=A,pre=R;pre.is$typed;fre.validate;class dU extends uU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Zc.SubjectHasActionError=dU;function hre(t){return t instanceof uU.XRPCError&&t.error==="SubjectHasAction"?new dU(t):t}var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.RecordNotFoundError=void 0;Qc.toKnownErr=gre;const fU=ee,mre=A,yre=R;yre.is$typed;mre.validate;class pU extends fU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Qc.RecordNotFoundError=pU;function gre(t){return t instanceof fU.XRPCError&&t.error==="RecordNotFound"?new pU(t):t}var Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.RepoNotFoundError=void 0;Yc.toKnownErr=Ere;const hU=ee,bre=A,vre=R;vre.is$typed;bre.validate;class mU extends hU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Yc.RepoNotFoundError=mU;function Ere(t){return t instanceof hU.XRPCError&&t.error==="RepoNotFound"?new mU(t):t}var eu={};Object.defineProperty(eu,"__esModule",{value:!0});eu.SetNotFoundError=void 0;eu.toKnownErr=_re;const yU=ee,wre=A,xre=R;xre.is$typed;wre.validate;let gU=class extends yU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};eu.SetNotFoundError=gU;function _re(t){return t instanceof yU.XRPCError&&t.error==="SetNotFound"?new gU(t):t}var tu={};Object.defineProperty(tu,"__esModule",{value:!0});tu.SetNotFoundError=void 0;tu.toKnownErr=Sre;const bU=ee,Rre=A,Are=R;Are.is$typed;Rre.validate;let vU=class extends bU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};tu.SetNotFoundError=vU;function Sre(t){return t instanceof bU.XRPCError&&t.error==="SetNotFound"?new vU(t):t}var ru={};Object.defineProperty(ru,"__esModule",{value:!0});ru.SetNotFoundError=void 0;ru.toKnownErr=kre;const EU=ee,Cre=A,Tre=R;Tre.is$typed;Cre.validate;class wU extends EU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ru.SetNotFoundError=wU;function kre(t){return t instanceof EU.XRPCError&&t.error==="SetNotFound"?new wU(t):t}var nu={};Object.defineProperty(nu,"__esModule",{value:!0});nu.MemberAlreadyExistsError=void 0;nu.toKnownErr=Dre;const xU=ee,Pre=A,Lre=R;Lre.is$typed;Pre.validate;class _U extends xU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}nu.MemberAlreadyExistsError=_U;function Dre(t){return t instanceof xU.XRPCError&&t.error==="MemberAlreadyExists"?new _U(t):t}var xs={};Object.defineProperty(xs,"__esModule",{value:!0});xs.CannotDeleteSelfError=xs.MemberNotFoundError=void 0;xs.toKnownErr=jre;const f_=ee,Bre=A,Ire=R;Ire.is$typed;Bre.validate;let RU=class extends f_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};xs.MemberNotFoundError=RU;class AU extends f_.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}xs.CannotDeleteSelfError=AU;function jre(t){if(t instanceof f_.XRPCError){if(t.error==="MemberNotFound")return new RU(t);if(t.error==="CannotDeleteSelf")return new AU(t)}return t}var iu={};Object.defineProperty(iu,"__esModule",{value:!0});iu.MemberNotFoundError=void 0;iu.toKnownErr=$re;const SU=ee,Ore=A,Ure=R;Ure.is$typed;Ore.validate;class CU extends SU.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}iu.MemberNotFoundError=CU;function $re(t){return t instanceof SU.XRPCError&&t.error==="MemberNotFound"?new CU(t):t}var An={};Object.defineProperty(An,"__esModule",{value:!0});An.isStatusAttr=Mre;An.validateStatusAttr=Nre;An.isAccountView=zre;An.validateAccountView=Fre;An.isRepoRef=qre;An.validateRepoRef=Gre;An.isRepoBlobRef=Hre;An.validateRepoBlobRef=Wre;An.isThreatSignature=Xre;An.validateThreatSignature=Jre;const Vre=A,Kre=R,pp=Kre.is$typed,hp=Vre.validate,Li="com.atproto.admin.defs",TU="statusAttr";function Mre(t){return pp(t,Li,TU)}function Nre(t){return hp(t,Li,TU)}const kU="accountView";function zre(t){return pp(t,Li,kU)}function Fre(t){return hp(t,Li,kU)}const PU="repoRef";function qre(t){return pp(t,Li,PU)}function Gre(t){return hp(t,Li,PU)}const LU="repoBlobRef";function Hre(t){return pp(t,Li,LU)}function Wre(t){return hp(t,Li,LU)}const DU="threatSignature";function Xre(t){return pp(t,Li,DU)}function Jre(t){return hp(t,Li,DU)}var p_={};Object.defineProperty(p_,"__esModule",{value:!0});p_.toKnownErr=Yre;const Zre=A,Qre=R;Qre.is$typed;Zre.validate;function Yre(t){return t}var h_={};Object.defineProperty(h_,"__esModule",{value:!0});h_.toKnownErr=rne;const ene=A,tne=R;tne.is$typed;ene.validate;function rne(t){return t}var m_={};Object.defineProperty(m_,"__esModule",{value:!0});m_.toKnownErr=one;const nne=A,ine=R;ine.is$typed;nne.validate;function one(t){return t}var y_={};Object.defineProperty(y_,"__esModule",{value:!0});y_.toKnownErr=lne;const sne=A,ane=R;ane.is$typed;sne.validate;function lne(t){return t}var g_={};Object.defineProperty(g_,"__esModule",{value:!0});g_.toKnownErr=dne;const cne=A,une=R;une.is$typed;cne.validate;function dne(t){return t}var b_={};Object.defineProperty(b_,"__esModule",{value:!0});b_.toKnownErr=hne;const fne=A,pne=R;pne.is$typed;fne.validate;function hne(t){return t}var v_={};Object.defineProperty(v_,"__esModule",{value:!0});v_.toKnownErr=gne;const mne=A,yne=R;yne.is$typed;mne.validate;function gne(t){return t}var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.toKnownErr=Ene;const bne=A,vne=R;vne.is$typed;bne.validate;function Ene(t){return t}var w_={};Object.defineProperty(w_,"__esModule",{value:!0});w_.toKnownErr=_ne;const wne=A,xne=R;xne.is$typed;wne.validate;function _ne(t){return t}var x_={};Object.defineProperty(x_,"__esModule",{value:!0});x_.toKnownErr=Sne;const Rne=A,Ane=R;Ane.is$typed;Rne.validate;function Sne(t){return t}var __={};Object.defineProperty(__,"__esModule",{value:!0});__.toKnownErr=kne;const Cne=A,Tne=R;Tne.is$typed;Cne.validate;function kne(t){return t}var R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.toKnownErr=Dne;const Pne=A,Lne=R;Lne.is$typed;Pne.validate;function Dne(t){return t}var A_={};Object.defineProperty(A_,"__esModule",{value:!0});A_.toKnownErr=jne;const Bne=A,Ine=R;Ine.is$typed;Bne.validate;function jne(t){return t}var S_={};Object.defineProperty(S_,"__esModule",{value:!0});S_.toKnownErr=$ne;const One=A,Une=R;Une.is$typed;One.validate;function $ne(t){return t}var C_={};Object.defineProperty(C_,"__esModule",{value:!0});C_.toKnownErr=Mne;const Vne=A,Kne=R;Kne.is$typed;Vne.validate;function Mne(t){return t}var Xg={};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.isIdentityInfo=Gne;Xg.validateIdentityInfo=Hne;const Nne=A,zne=R,Fne=zne.is$typed,qne=Nne.validate,BU="com.atproto.identity.defs",IU="identityInfo";function Gne(t){return Fne(t,BU,IU)}function Hne(t){return qne(t,BU,IU)}var T_={};Object.defineProperty(T_,"__esModule",{value:!0});T_.toKnownErr=Jne;const Wne=A,Xne=R;Xne.is$typed;Wne.validate;function Jne(t){return t}var k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.toKnownErr=Yne;const Zne=A,Qne=R;Qne.is$typed;Zne.validate;function Yne(t){return t}var P_={};Object.defineProperty(P_,"__esModule",{value:!0});P_.toKnownErr=rie;const eie=A,tie=R;tie.is$typed;eie.validate;function rie(t){return t}var L_={};Object.defineProperty(L_,"__esModule",{value:!0});L_.toKnownErr=oie;const nie=A,iie=R;iie.is$typed;nie.validate;function oie(t){return t}var D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.toKnownErr=lie;const sie=A,aie=R;aie.is$typed;sie.validate;function lie(t){return t}var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.isLabel=die;Sn.validateLabel=fie;Sn.isSelfLabels=pie;Sn.validateSelfLabels=hie;Sn.isSelfLabel=mie;Sn.validateSelfLabel=yie;Sn.isLabelValueDefinition=gie;Sn.validateLabelValueDefinition=bie;Sn.isLabelValueDefinitionStrings=vie;Sn.validateLabelValueDefinitionStrings=Eie;const cie=A,uie=R,mp=uie.is$typed,yp=cie.validate,Di="com.atproto.label.defs",jU="label";function die(t){return mp(t,Di,jU)}function fie(t){return yp(t,Di,jU)}const OU="selfLabels";function pie(t){return mp(t,Di,OU)}function hie(t){return yp(t,Di,OU)}const UU="selfLabel";function mie(t){return mp(t,Di,UU)}function yie(t){return yp(t,Di,UU)}const $U="labelValueDefinition";function gie(t){return mp(t,Di,$U)}function bie(t){return yp(t,Di,$U)}const VU="labelValueDefinitionStrings";function vie(t){return mp(t,Di,VU)}function Eie(t){return yp(t,Di,VU)}var B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.toKnownErr=_ie;const wie=A,xie=R;xie.is$typed;wie.validate;function _ie(t){return t}var ou={};Object.defineProperty(ou,"__esModule",{value:!0});ou.isLabels=Sie;ou.validateLabels=Cie;ou.isInfo=Tie;ou.validateInfo=kie;const Rie=A,Aie=R,KU=Aie.is$typed,MU=Rie.validate,Jg="com.atproto.label.subscribeLabels",NU="labels";function Sie(t){return KU(t,Jg,NU)}function Cie(t){return MU(t,Jg,NU)}const zU="info";function Tie(t){return KU(t,Jg,zU)}function kie(t){return MU(t,Jg,zU)}var Zg={};Object.defineProperty(Zg,"__esModule",{value:!0});Zg.isRecord=Iie;Zg.validateRecord=jie;const Pie=A,Lie=R,Die=Lie.is$typed,Bie=Pie.validate,FU="com.atproto.lexicon.schema",qU="main";function Iie(t){return Die(t,FU,qU)}function jie(t){return Bie(t,FU,qU,!0)}var I_={};Object.defineProperty(I_,"__esModule",{value:!0});I_.toKnownErr=$ie;const Oie=A,Uie=R;Uie.is$typed;Oie.validate;function $ie(t){return t}var nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.REASONAPPEAL=nr.REASONOTHER=nr.REASONRUDE=nr.REASONSEXUAL=nr.REASONMISLEADING=nr.REASONVIOLATION=nr.REASONSPAM=void 0;const Vie=A,Kie=R;Kie.is$typed;Vie.validate;const Fa="com.atproto.moderation.defs";nr.REASONSPAM=`${Fa}#reasonSpam`;nr.REASONVIOLATION=`${Fa}#reasonViolation`;nr.REASONMISLEADING=`${Fa}#reasonMisleading`;nr.REASONSEXUAL=`${Fa}#reasonSexual`;nr.REASONRUDE=`${Fa}#reasonRude`;nr.REASONOTHER=`${Fa}#reasonOther`;nr.REASONAPPEAL=`${Fa}#reasonAppeal`;var Qg={};Object.defineProperty(Qg,"__esModule",{value:!0});Qg.isCommitMeta=qie;Qg.validateCommitMeta=Gie;const Mie=A,Nie=R,zie=Nie.is$typed,Fie=Mie.validate,GU="com.atproto.repo.defs",HU="commitMeta";function qie(t){return zie(t,GU,HU)}function Gie(t){return Fie(t,GU,HU)}var j_={};Object.defineProperty(j_,"__esModule",{value:!0});j_.toKnownErr=Xie;const Hie=A,Wie=R;Wie.is$typed;Hie.validate;function Xie(t){return t}var O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.toKnownErr=Qie;const Jie=A,Zie=R;Zie.is$typed;Jie.validate;function Qie(t){return t}var gp={};Object.defineProperty(gp,"__esModule",{value:!0});gp.toKnownErr=noe;gp.isRecordBlob=ioe;gp.validateRecordBlob=ooe;const Yie=A,eoe=R,toe=eoe.is$typed,roe=Yie.validate,WU="com.atproto.repo.listMissingBlobs";function noe(t){return t}const XU="recordBlob";function ioe(t){return toe(t,WU,XU)}function ooe(t){return roe(t,WU,XU)}var bp={};Object.defineProperty(bp,"__esModule",{value:!0});bp.toKnownErr=uoe;bp.isRecord=doe;bp.validateRecord=foe;const soe=A,aoe=R,loe=aoe.is$typed,coe=soe.validate,JU="com.atproto.repo.listRecords";function uoe(t){return t}const ZU="record";function doe(t){return loe(t,JU,ZU)}function foe(t){return coe(t,JU,ZU)}var Yg={};Object.defineProperty(Yg,"__esModule",{value:!0});Yg.isMain=goe;Yg.validateMain=boe;const poe=A,hoe=R,moe=hoe.is$typed,yoe=poe.validate,QU="com.atproto.repo.strongRef",YU="main";function goe(t){return moe(t,QU,YU)}function boe(t){return yoe(t,QU,YU)}var U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.toKnownErr=woe;const voe=A,Eoe=R;Eoe.is$typed;voe.validate;function woe(t){return t}var $_={};Object.defineProperty($_,"__esModule",{value:!0});$_.toKnownErr=Roe;const xoe=A,_oe=R;_oe.is$typed;xoe.validate;function Roe(t){return t}var V_={};Object.defineProperty(V_,"__esModule",{value:!0});V_.toKnownErr=Coe;const Aoe=A,Soe=R;Soe.is$typed;Aoe.validate;function Coe(t){return t}var K_={};Object.defineProperty(K_,"__esModule",{value:!0});K_.toKnownErr=Poe;const Toe=A,koe=R;koe.is$typed;Toe.validate;function Poe(t){return t}var vp={};Object.defineProperty(vp,"__esModule",{value:!0});vp.toKnownErr=joe;vp.isAccountCodes=Ooe;vp.validateAccountCodes=Uoe;const Loe=A,Doe=R,Boe=Doe.is$typed,Ioe=Loe.validate,e$="com.atproto.server.createInviteCodes";function joe(t){return t}const t$="accountCodes";function Ooe(t){return Boe(t,e$,t$)}function Uoe(t){return Ioe(t,e$,t$)}var M_={};Object.defineProperty(M_,"__esModule",{value:!0});M_.toKnownErr=Koe;const $oe=A,Voe=R;Voe.is$typed;$oe.validate;function Koe(t){return t}var su={};Object.defineProperty(su,"__esModule",{value:!0});su.isInviteCode=zoe;su.validateInviteCode=Foe;su.isInviteCodeUse=qoe;su.validateInviteCodeUse=Goe;const Moe=A,Noe=R,r$=Noe.is$typed,n$=Moe.validate,eb="com.atproto.server.defs",i$="inviteCode";function zoe(t){return r$(t,eb,i$)}function Foe(t){return n$(t,eb,i$)}const o$="inviteCodeUse";function qoe(t){return r$(t,eb,o$)}function Goe(t){return n$(t,eb,o$)}var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.toKnownErr=Xoe;const Hoe=A,Woe=R;Woe.is$typed;Hoe.validate;function Xoe(t){return t}var qa={};Object.defineProperty(qa,"__esModule",{value:!0});qa.toKnownErr=Qoe;qa.isLinks=Yoe;qa.validateLinks=ese;qa.isContact=tse;qa.validateContact=rse;const Joe=A,Zoe=R,s$=Zoe.is$typed,a$=Joe.validate,tb="com.atproto.server.describeServer";function Qoe(t){return t}const l$="links";function Yoe(t){return s$(t,tb,l$)}function ese(t){return a$(t,tb,l$)}const c$="contact";function tse(t){return s$(t,tb,c$)}function rse(t){return a$(t,tb,c$)}var z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.toKnownErr=ose;const nse=A,ise=R;ise.is$typed;nse.validate;function ose(t){return t}var F_={};Object.defineProperty(F_,"__esModule",{value:!0});F_.toKnownErr=lse;const sse=A,ase=R;ase.is$typed;sse.validate;function lse(t){return t}var q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.toKnownErr=dse;const cse=A,use=R;use.is$typed;cse.validate;function dse(t){return t}var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.toKnownErr=hse;const fse=A,pse=R;pse.is$typed;fse.validate;function hse(t){return t}var H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.toKnownErr=gse;const mse=A,yse=R;yse.is$typed;mse.validate;function gse(t){return t}var W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.toKnownErr=Ese;const bse=A,vse=R;vse.is$typed;bse.validate;function Ese(t){return t}var X_={};Object.defineProperty(X_,"__esModule",{value:!0});X_.toKnownErr=_se;const wse=A,xse=R;xse.is$typed;wse.validate;function _se(t){return t}var u$={};Object.defineProperty(u$,"__esModule",{value:!0});const Rse=A,Ase=R;Ase.is$typed;Rse.validate;var J_={};Object.defineProperty(J_,"__esModule",{value:!0});J_.toKnownErr=Tse;const Sse=A,Cse=R;Cse.is$typed;Sse.validate;function Tse(t){return t}var Ep={};Object.defineProperty(Ep,"__esModule",{value:!0});Ep.toKnownErr=Bse;Ep.isHost=Ise;Ep.validateHost=jse;const kse=A,Pse=R,Lse=Pse.is$typed,Dse=kse.validate,d$="com.atproto.sync.listHosts";function Bse(t){return t}const f$="host";function Ise(t){return Lse(t,d$,f$)}function jse(t){return Dse(t,d$,f$)}var wp={};Object.defineProperty(wp,"__esModule",{value:!0});wp.toKnownErr=Kse;wp.isRepo=Mse;wp.validateRepo=Nse;const Ose=A,Use=R,$se=Use.is$typed,Vse=Ose.validate,p$="com.atproto.sync.listRepos";function Kse(t){return t}const h$="repo";function Mse(t){return $se(t,p$,h$)}function Nse(t){return Vse(t,p$,h$)}var xp={};Object.defineProperty(xp,"__esModule",{value:!0});xp.toKnownErr=Hse;xp.isRepo=Wse;xp.validateRepo=Xse;const zse=A,Fse=R,qse=Fse.is$typed,Gse=zse.validate,m$="com.atproto.sync.listReposByCollection";function Hse(t){return t}const y$="repo";function Wse(t){return qse(t,m$,y$)}function Xse(t){return Gse(t,m$,y$)}var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.toKnownErr=Qse;const Jse=A,Zse=R;Zse.is$typed;Jse.validate;function Qse(t){return t}var zr={};Object.defineProperty(zr,"__esModule",{value:!0});zr.isCommit=tae;zr.validateCommit=rae;zr.isSync=nae;zr.validateSync=iae;zr.isIdentity=oae;zr.validateIdentity=sae;zr.isAccount=aae;zr.validateAccount=lae;zr.isInfo=cae;zr.validateInfo=uae;zr.isRepoOp=dae;zr.validateRepoOp=fae;const Yse=A,eae=R,au=eae.is$typed,lu=Yse.validate,Cn="com.atproto.sync.subscribeRepos",g$="commit";function tae(t){return au(t,Cn,g$)}function rae(t){return lu(t,Cn,g$)}const b$="sync";function nae(t){return au(t,Cn,b$)}function iae(t){return lu(t,Cn,b$)}const v$="identity";function oae(t){return au(t,Cn,v$)}function sae(t){return lu(t,Cn,v$)}const E$="account";function aae(t){return au(t,Cn,E$)}function lae(t){return lu(t,Cn,E$)}const w$="info";function cae(t){return au(t,Cn,w$)}function uae(t){return lu(t,Cn,w$)}const x$="repoOp";function dae(t){return au(t,Cn,x$)}function fae(t){return lu(t,Cn,x$)}var Q_={};Object.defineProperty(Q_,"__esModule",{value:!0});Q_.toKnownErr=mae;const pae=A,hae=R;hae.is$typed;pae.validate;function mae(t){return t}var Y_={};Object.defineProperty(Y_,"__esModule",{value:!0});Y_.toKnownErr=bae;const yae=A,gae=R;gae.is$typed;yae.validate;function bae(t){return t}var eR={};Object.defineProperty(eR,"__esModule",{value:!0});eR.toKnownErr=wae;const vae=A,Eae=R;Eae.is$typed;vae.validate;function wae(t){return t}var tR={};Object.defineProperty(tR,"__esModule",{value:!0});tR.toKnownErr=Rae;const xae=A,_ae=R;_ae.is$typed;xae.validate;function Rae(t){return t}var Q={};Object.defineProperty(Q,"__esModule",{value:!0});Q.isProfileViewBasic=Cae;Q.validateProfileViewBasic=Tae;Q.isProfileView=kae;Q.validateProfileView=Pae;Q.isProfileViewDetailed=Lae;Q.validateProfileViewDetailed=Dae;Q.isProfileAssociated=Bae;Q.validateProfileAssociated=Iae;Q.isProfileAssociatedChat=jae;Q.validateProfileAssociatedChat=Oae;Q.isViewerState=Uae;Q.validateViewerState=$ae;Q.isKnownFollowers=Vae;Q.validateKnownFollowers=Kae;Q.isVerificationState=Mae;Q.validateVerificationState=Nae;Q.isVerificationView=zae;Q.validateVerificationView=Fae;Q.isAdultContentPref=qae;Q.validateAdultContentPref=Gae;Q.isContentLabelPref=Hae;Q.validateContentLabelPref=Wae;Q.isSavedFeed=Xae;Q.validateSavedFeed=Jae;Q.isSavedFeedsPrefV2=Zae;Q.validateSavedFeedsPrefV2=Qae;Q.isSavedFeedsPref=Yae;Q.validateSavedFeedsPref=ele;Q.isPersonalDetailsPref=tle;Q.validatePersonalDetailsPref=rle;Q.isFeedViewPref=nle;Q.validateFeedViewPref=ile;Q.isThreadViewPref=ole;Q.validateThreadViewPref=sle;Q.isInterestsPref=ale;Q.validateInterestsPref=lle;Q.isMutedWord=cle;Q.validateMutedWord=ule;Q.isMutedWordsPref=dle;Q.validateMutedWordsPref=fle;Q.isHiddenPostsPref=ple;Q.validateHiddenPostsPref=hle;Q.isLabelersPref=mle;Q.validateLabelersPref=yle;Q.isLabelerPrefItem=gle;Q.validateLabelerPrefItem=ble;Q.isBskyAppStatePref=vle;Q.validateBskyAppStatePref=Ele;Q.isBskyAppProgressGuide=wle;Q.validateBskyAppProgressGuide=xle;Q.isNux=_le;Q.validateNux=Rle;Q.isVerificationPrefs=Ale;Q.validateVerificationPrefs=Sle;Q.isPostInteractionSettingsPref=Cle;Q.validatePostInteractionSettingsPref=Tle;Q.isStatusView=kle;Q.validateStatusView=Ple;const Aae=A,Sae=R,$e=Sae.is$typed,Ve=Aae.validate,te="app.bsky.actor.defs",_$="profileViewBasic";function Cae(t){return $e(t,te,_$)}function Tae(t){return Ve(t,te,_$)}const R$="profileView";function kae(t){return $e(t,te,R$)}function Pae(t){return Ve(t,te,R$)}const A$="profileViewDetailed";function Lae(t){return $e(t,te,A$)}function Dae(t){return Ve(t,te,A$)}const S$="profileAssociated";function Bae(t){return $e(t,te,S$)}function Iae(t){return Ve(t,te,S$)}const C$="profileAssociatedChat";function jae(t){return $e(t,te,C$)}function Oae(t){return Ve(t,te,C$)}const T$="viewerState";function Uae(t){return $e(t,te,T$)}function $ae(t){return Ve(t,te,T$)}const k$="knownFollowers";function Vae(t){return $e(t,te,k$)}function Kae(t){return Ve(t,te,k$)}const P$="verificationState";function Mae(t){return $e(t,te,P$)}function Nae(t){return Ve(t,te,P$)}const L$="verificationView";function zae(t){return $e(t,te,L$)}function Fae(t){return Ve(t,te,L$)}const D$="adultContentPref";function qae(t){return $e(t,te,D$)}function Gae(t){return Ve(t,te,D$)}const B$="contentLabelPref";function Hae(t){return $e(t,te,B$)}function Wae(t){return Ve(t,te,B$)}const I$="savedFeed";function Xae(t){return $e(t,te,I$)}function Jae(t){return Ve(t,te,I$)}const j$="savedFeedsPrefV2";function Zae(t){return $e(t,te,j$)}function Qae(t){return Ve(t,te,j$)}const O$="savedFeedsPref";function Yae(t){return $e(t,te,O$)}function ele(t){return Ve(t,te,O$)}const U$="personalDetailsPref";function tle(t){return $e(t,te,U$)}function rle(t){return Ve(t,te,U$)}const $$="feedViewPref";function nle(t){return $e(t,te,$$)}function ile(t){return Ve(t,te,$$)}const V$="threadViewPref";function ole(t){return $e(t,te,V$)}function sle(t){return Ve(t,te,V$)}const K$="interestsPref";function ale(t){return $e(t,te,K$)}function lle(t){return Ve(t,te,K$)}const M$="mutedWord";function cle(t){return $e(t,te,M$)}function ule(t){return Ve(t,te,M$)}const N$="mutedWordsPref";function dle(t){return $e(t,te,N$)}function fle(t){return Ve(t,te,N$)}const z$="hiddenPostsPref";function ple(t){return $e(t,te,z$)}function hle(t){return Ve(t,te,z$)}const F$="labelersPref";function mle(t){return $e(t,te,F$)}function yle(t){return Ve(t,te,F$)}const q$="labelerPrefItem";function gle(t){return $e(t,te,q$)}function ble(t){return Ve(t,te,q$)}const G$="bskyAppStatePref";function vle(t){return $e(t,te,G$)}function Ele(t){return Ve(t,te,G$)}const H$="bskyAppProgressGuide";function wle(t){return $e(t,te,H$)}function xle(t){return Ve(t,te,H$)}const W$="nux";function _le(t){return $e(t,te,W$)}function Rle(t){return Ve(t,te,W$)}const X$="verificationPrefs";function Ale(t){return $e(t,te,X$)}function Sle(t){return Ve(t,te,X$)}const J$="postInteractionSettingsPref";function Cle(t){return $e(t,te,J$)}function Tle(t){return Ve(t,te,J$)}const Z$="statusView";function kle(t){return $e(t,te,Z$)}function Ple(t){return Ve(t,te,Z$)}var rR={};Object.defineProperty(rR,"__esModule",{value:!0});rR.toKnownErr=Ble;const Lle=A,Dle=R;Dle.is$typed;Lle.validate;function Ble(t){return t}var nR={};Object.defineProperty(nR,"__esModule",{value:!0});nR.toKnownErr=Ole;const Ile=A,jle=R;jle.is$typed;Ile.validate;function Ole(t){return t}var iR={};Object.defineProperty(iR,"__esModule",{value:!0});iR.toKnownErr=Vle;const Ule=A,$le=R;$le.is$typed;Ule.validate;function Vle(t){return t}var oR={};Object.defineProperty(oR,"__esModule",{value:!0});oR.toKnownErr=Nle;const Kle=A,Mle=R;Mle.is$typed;Kle.validate;function Nle(t){return t}var rb={};Object.defineProperty(rb,"__esModule",{value:!0});rb.isRecord=Hle;rb.validateRecord=Wle;const zle=A,Fle=R,qle=Fle.is$typed,Gle=zle.validate,Q$="app.bsky.actor.profile",Y$="main";function Hle(t){return qle(t,Q$,Y$)}function Wle(t){return Gle(t,Q$,Y$,!0)}var sR={};Object.defineProperty(sR,"__esModule",{value:!0});sR.toKnownErr=Zle;const Xle=A,Jle=R;Jle.is$typed;Xle.validate;function Zle(t){return t}var aR={};Object.defineProperty(aR,"__esModule",{value:!0});aR.toKnownErr=ece;const Qle=A,Yle=R;Yle.is$typed;Qle.validate;function ece(t){return t}var lR={};Object.defineProperty(lR,"__esModule",{value:!0});lR.toKnownErr=nce;const tce=A,rce=R;rce.is$typed;tce.validate;function nce(t){return t}var cu={};Object.defineProperty(cu,"__esModule",{value:!0});cu.LIVE=void 0;cu.isRecord=lce;cu.validateRecord=cce;const ice=A,oce=R,sce=oce.is$typed,ace=ice.validate,cR="app.bsky.actor.status",eV="main";function lce(t){return sce(t,cR,eV)}function cce(t){return ace(t,cR,eV,!0)}cu.LIVE=`${cR}#live`;var nb={};Object.defineProperty(nb,"__esModule",{value:!0});nb.isAspectRatio=hce;nb.validateAspectRatio=mce;const uce=A,dce=R,fce=dce.is$typed,pce=uce.validate,tV="app.bsky.embed.defs",rV="aspectRatio";function hce(t){return fce(t,tV,rV)}function mce(t){return pce(t,tV,rV)}var Bi={};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.isMain=bce;Bi.validateMain=vce;Bi.isExternal=Ece;Bi.validateExternal=wce;Bi.isView=xce;Bi.validateView=_ce;Bi.isViewExternal=Rce;Bi.validateViewExternal=Ace;const yce=A,gce=R,ib=gce.is$typed,ob=yce.validate,Vs="app.bsky.embed.external",nV="main";function bce(t){return ib(t,Vs,nV)}function vce(t){return ob(t,Vs,nV)}const iV="external";function Ece(t){return ib(t,Vs,iV)}function wce(t){return ob(t,Vs,iV)}const oV="view";function xce(t){return ib(t,Vs,oV)}function _ce(t){return ob(t,Vs,oV)}const sV="viewExternal";function Rce(t){return ib(t,Vs,sV)}function Ace(t){return ob(t,Vs,sV)}var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.isMain=Tce;Ii.validateMain=kce;Ii.isImage=Pce;Ii.validateImage=Lce;Ii.isView=Dce;Ii.validateView=Bce;Ii.isViewImage=Ice;Ii.validateViewImage=jce;const Sce=A,Cce=R,sb=Cce.is$typed,ab=Sce.validate,Ks="app.bsky.embed.images",aV="main";function Tce(t){return sb(t,Ks,aV)}function kce(t){return ab(t,Ks,aV)}const lV="image";function Pce(t){return sb(t,Ks,lV)}function Lce(t){return ab(t,Ks,lV)}const cV="view";function Dce(t){return sb(t,Ks,cV)}function Bce(t){return ab(t,Ks,cV)}const uV="viewImage";function Ice(t){return sb(t,Ks,uV)}function jce(t){return ab(t,Ks,uV)}var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.isMain=$ce;Fr.validateMain=Vce;Fr.isView=Kce;Fr.validateView=Mce;Fr.isViewRecord=Nce;Fr.validateViewRecord=zce;Fr.isViewNotFound=Fce;Fr.validateViewNotFound=qce;Fr.isViewBlocked=Gce;Fr.validateViewBlocked=Hce;Fr.isViewDetached=Wce;Fr.validateViewDetached=Xce;const Oce=A,Uce=R,uu=Uce.is$typed,du=Oce.validate,Tn="app.bsky.embed.record",dV="main";function $ce(t){return uu(t,Tn,dV)}function Vce(t){return du(t,Tn,dV)}const fV="view";function Kce(t){return uu(t,Tn,fV)}function Mce(t){return du(t,Tn,fV)}const pV="viewRecord";function Nce(t){return uu(t,Tn,pV)}function zce(t){return du(t,Tn,pV)}const hV="viewNotFound";function Fce(t){return uu(t,Tn,hV)}function qce(t){return du(t,Tn,hV)}const mV="viewBlocked";function Gce(t){return uu(t,Tn,mV)}function Hce(t){return du(t,Tn,mV)}const yV="viewDetached";function Wce(t){return uu(t,Tn,yV)}function Xce(t){return du(t,Tn,yV)}var fu={};Object.defineProperty(fu,"__esModule",{value:!0});fu.isMain=Qce;fu.validateMain=Yce;fu.isView=eue;fu.validateView=tue;const Jce=A,Zce=R,gV=Zce.is$typed,bV=Jce.validate,lb="app.bsky.embed.recordWithMedia",vV="main";function Qce(t){return gV(t,lb,vV)}function Yce(t){return bV(t,lb,vV)}const EV="view";function eue(t){return gV(t,lb,EV)}function tue(t){return bV(t,lb,EV)}var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.isMain=iue;Ms.validateMain=oue;Ms.isCaption=sue;Ms.validateCaption=aue;Ms.isView=lue;Ms.validateView=cue;const rue=A,nue=R,uR=nue.is$typed,dR=rue.validate,pu="app.bsky.embed.video",wV="main";function iue(t){return uR(t,pu,wV)}function oue(t){return dR(t,pu,wV)}const xV="caption";function sue(t){return uR(t,pu,xV)}function aue(t){return dR(t,pu,xV)}const _V="view";function lue(t){return uR(t,pu,_V)}function cue(t){return dR(t,pu,_V)}var H={};Object.defineProperty(H,"__esModule",{value:!0});H.INTERACTIONSHARE=H.INTERACTIONQUOTE=H.INTERACTIONREPLY=H.INTERACTIONREPOST=H.INTERACTIONLIKE=H.INTERACTIONSEEN=H.CONTENTMODEVIDEO=H.CONTENTMODEUNSPECIFIED=H.CLICKTHROUGHEMBED=H.CLICKTHROUGHREPOSTER=H.CLICKTHROUGHAUTHOR=H.CLICKTHROUGHITEM=H.REQUESTMORE=H.REQUESTLESS=void 0;H.isPostView=fue;H.validatePostView=pue;H.isViewerState=hue;H.validateViewerState=mue;H.isThreadContext=yue;H.validateThreadContext=gue;H.isFeedViewPost=bue;H.validateFeedViewPost=vue;H.isReplyRef=Eue;H.validateReplyRef=wue;H.isReasonRepost=xue;H.validateReasonRepost=_ue;H.isReasonPin=Rue;H.validateReasonPin=Aue;H.isThreadViewPost=Sue;H.validateThreadViewPost=Cue;H.isNotFoundPost=Tue;H.validateNotFoundPost=kue;H.isBlockedPost=Pue;H.validateBlockedPost=Lue;H.isBlockedAuthor=Due;H.validateBlockedAuthor=Bue;H.isGeneratorView=Iue;H.validateGeneratorView=jue;H.isGeneratorViewerState=Oue;H.validateGeneratorViewerState=Uue;H.isSkeletonFeedPost=$ue;H.validateSkeletonFeedPost=Vue;H.isSkeletonReasonRepost=Kue;H.validateSkeletonReasonRepost=Mue;H.isSkeletonReasonPin=Nue;H.validateSkeletonReasonPin=zue;H.isThreadgateView=Fue;H.validateThreadgateView=que;H.isInteraction=Gue;H.validateInteraction=Hue;const uue=A,due=R,Kt=due.is$typed,Mt=uue.validate,se="app.bsky.feed.defs",RV="postView";function fue(t){return Kt(t,se,RV)}function pue(t){return Mt(t,se,RV)}const AV="viewerState";function hue(t){return Kt(t,se,AV)}function mue(t){return Mt(t,se,AV)}const SV="threadContext";function yue(t){return Kt(t,se,SV)}function gue(t){return Mt(t,se,SV)}const CV="feedViewPost";function bue(t){return Kt(t,se,CV)}function vue(t){return Mt(t,se,CV)}const TV="replyRef";function Eue(t){return Kt(t,se,TV)}function wue(t){return Mt(t,se,TV)}const kV="reasonRepost";function xue(t){return Kt(t,se,kV)}function _ue(t){return Mt(t,se,kV)}const PV="reasonPin";function Rue(t){return Kt(t,se,PV)}function Aue(t){return Mt(t,se,PV)}const LV="threadViewPost";function Sue(t){return Kt(t,se,LV)}function Cue(t){return Mt(t,se,LV)}const DV="notFoundPost";function Tue(t){return Kt(t,se,DV)}function kue(t){return Mt(t,se,DV)}const BV="blockedPost";function Pue(t){return Kt(t,se,BV)}function Lue(t){return Mt(t,se,BV)}const IV="blockedAuthor";function Due(t){return Kt(t,se,IV)}function Bue(t){return Mt(t,se,IV)}const jV="generatorView";function Iue(t){return Kt(t,se,jV)}function jue(t){return Mt(t,se,jV)}const OV="generatorViewerState";function Oue(t){return Kt(t,se,OV)}function Uue(t){return Mt(t,se,OV)}const UV="skeletonFeedPost";function $ue(t){return Kt(t,se,UV)}function Vue(t){return Mt(t,se,UV)}const $V="skeletonReasonRepost";function Kue(t){return Kt(t,se,$V)}function Mue(t){return Mt(t,se,$V)}const VV="skeletonReasonPin";function Nue(t){return Kt(t,se,VV)}function zue(t){return Mt(t,se,VV)}const KV="threadgateView";function Fue(t){return Kt(t,se,KV)}function que(t){return Mt(t,se,KV)}const MV="interaction";function Gue(t){return Kt(t,se,MV)}function Hue(t){return Mt(t,se,MV)}H.REQUESTLESS=`${se}#requestLess`;H.REQUESTMORE=`${se}#requestMore`;H.CLICKTHROUGHITEM=`${se}#clickthroughItem`;H.CLICKTHROUGHAUTHOR=`${se}#clickthroughAuthor`;H.CLICKTHROUGHREPOSTER=`${se}#clickthroughReposter`;H.CLICKTHROUGHEMBED=`${se}#clickthroughEmbed`;H.CONTENTMODEUNSPECIFIED=`${se}#contentModeUnspecified`;H.CONTENTMODEVIDEO=`${se}#contentModeVideo`;H.INTERACTIONSEEN=`${se}#interactionSeen`;H.INTERACTIONLIKE=`${se}#interactionLike`;H.INTERACTIONREPOST=`${se}#interactionRepost`;H.INTERACTIONREPLY=`${se}#interactionReply`;H.INTERACTIONQUOTE=`${se}#interactionQuote`;H.INTERACTIONSHARE=`${se}#interactionShare`;var Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.toKnownErr=Jue;Ga.isFeed=Zue;Ga.validateFeed=Que;Ga.isLinks=Yue;Ga.validateLinks=ede;const Wue=A,Xue=R,NV=Xue.is$typed,zV=Wue.validate,cb="app.bsky.feed.describeFeedGenerator";function Jue(t){return t}const FV="feed";function Zue(t){return NV(t,cb,FV)}function Que(t){return zV(t,cb,FV)}const qV="links";function Yue(t){return NV(t,cb,qV)}function ede(t){return zV(t,cb,qV)}var ub={};Object.defineProperty(ub,"__esModule",{value:!0});ub.isRecord=ode;ub.validateRecord=sde;const tde=A,rde=R,nde=rde.is$typed,ide=tde.validate,GV="app.bsky.feed.generator",HV="main";function ode(t){return nde(t,GV,HV)}function sde(t){return ide(t,GV,HV,!0)}var fR={};Object.defineProperty(fR,"__esModule",{value:!0});fR.toKnownErr=cde;const ade=A,lde=R;lde.is$typed;ade.validate;function cde(t){return t}var pR={};Object.defineProperty(pR,"__esModule",{value:!0});pR.toKnownErr=fde;const ude=A,dde=R;dde.is$typed;ude.validate;function fde(t){return t}var hR={};Object.defineProperty(hR,"__esModule",{value:!0});hR.toKnownErr=mde;const pde=A,hde=R;hde.is$typed;pde.validate;function mde(t){return t}var _p={};Object.defineProperty(_p,"__esModule",{value:!0});_p.toKnownErr=Ede;_p.isLike=wde;_p.validateLike=xde;const yde=A,gde=R,bde=gde.is$typed,vde=yde.validate,WV="app.bsky.feed.getLikes";function Ede(t){return t}const XV="like";function wde(t){return bde(t,WV,XV)}function xde(t){return vde(t,WV,XV)}var mR={};Object.defineProperty(mR,"__esModule",{value:!0});mR.toKnownErr=Ade;const _de=A,Rde=R;Rde.is$typed;_de.validate;function Ade(t){return t}var yR={};Object.defineProperty(yR,"__esModule",{value:!0});yR.toKnownErr=Tde;const Sde=A,Cde=R;Cde.is$typed;Sde.validate;function Tde(t){return t}var gR={};Object.defineProperty(gR,"__esModule",{value:!0});gR.toKnownErr=Lde;const kde=A,Pde=R;Pde.is$typed;kde.validate;function Lde(t){return t}var bR={};Object.defineProperty(bR,"__esModule",{value:!0});bR.toKnownErr=Ide;const Dde=A,Bde=R;Bde.is$typed;Dde.validate;function Ide(t){return t}var vR={};Object.defineProperty(vR,"__esModule",{value:!0});vR.toKnownErr=Ude;const jde=A,Ode=R;Ode.is$typed;jde.validate;function Ude(t){return t}var db={};Object.defineProperty(db,"__esModule",{value:!0});db.isRecord=Nde;db.validateRecord=zde;const $de=A,Vde=R,Kde=Vde.is$typed,Mde=$de.validate,JV="app.bsky.feed.like",ZV="main";function Nde(t){return Kde(t,JV,ZV)}function zde(t){return Mde(t,JV,ZV,!0)}var ji={};Object.defineProperty(ji,"__esModule",{value:!0});ji.isRecord=Gde;ji.validateRecord=Hde;ji.isReplyRef=Wde;ji.validateReplyRef=Xde;ji.isEntity=Jde;ji.validateEntity=Zde;ji.isTextSlice=Qde;ji.validateTextSlice=Yde;const Fde=A,qde=R,fb=qde.is$typed,pb=Fde.validate,Ns="app.bsky.feed.post",QV="main";function Gde(t){return fb(t,Ns,QV)}function Hde(t){return pb(t,Ns,QV,!0)}const YV="replyRef";function Wde(t){return fb(t,Ns,YV)}function Xde(t){return pb(t,Ns,YV)}const eK="entity";function Jde(t){return fb(t,Ns,eK)}function Zde(t){return pb(t,Ns,eK)}const tK="textSlice";function Qde(t){return fb(t,Ns,tK)}function Yde(t){return pb(t,Ns,tK)}var hu={};Object.defineProperty(hu,"__esModule",{value:!0});hu.isRecord=rfe;hu.validateRecord=nfe;hu.isDisableRule=ife;hu.validateDisableRule=ofe;const efe=A,tfe=R,rK=tfe.is$typed,nK=efe.validate,hb="app.bsky.feed.postgate",iK="main";function rfe(t){return rK(t,hb,iK)}function nfe(t){return nK(t,hb,iK,!0)}const oK="disableRule";function ife(t){return rK(t,hb,oK)}function ofe(t){return nK(t,hb,oK)}var mb={};Object.defineProperty(mb,"__esModule",{value:!0});mb.isRecord=ufe;mb.validateRecord=dfe;const sfe=A,afe=R,lfe=afe.is$typed,cfe=sfe.validate,sK="app.bsky.feed.repost",aK="main";function ufe(t){return lfe(t,sK,aK)}function dfe(t){return cfe(t,sK,aK,!0)}var ER={};Object.defineProperty(ER,"__esModule",{value:!0});ER.toKnownErr=hfe;const ffe=A,pfe=R;pfe.is$typed;ffe.validate;function hfe(t){return t}var kn={};Object.defineProperty(kn,"__esModule",{value:!0});kn.isRecord=gfe;kn.validateRecord=bfe;kn.isMentionRule=vfe;kn.validateMentionRule=Efe;kn.isFollowerRule=wfe;kn.validateFollowerRule=xfe;kn.isFollowingRule=_fe;kn.validateFollowingRule=Rfe;kn.isListRule=Afe;kn.validateListRule=Sfe;const mfe=A,yfe=R,Rp=yfe.is$typed,Ap=mfe.validate,Oi="app.bsky.feed.threadgate",lK="main";function gfe(t){return Rp(t,Oi,lK)}function bfe(t){return Ap(t,Oi,lK,!0)}const cK="mentionRule";function vfe(t){return Rp(t,Oi,cK)}function Efe(t){return Ap(t,Oi,cK)}const uK="followerRule";function wfe(t){return Rp(t,Oi,uK)}function xfe(t){return Ap(t,Oi,uK)}const dK="followingRule";function _fe(t){return Rp(t,Oi,dK)}function Rfe(t){return Ap(t,Oi,dK)}const fK="listRule";function Afe(t){return Rp(t,Oi,fK)}function Sfe(t){return Ap(t,Oi,fK)}var yb={};Object.defineProperty(yb,"__esModule",{value:!0});yb.isRecord=Lfe;yb.validateRecord=Dfe;const Cfe=A,Tfe=R,kfe=Tfe.is$typed,Pfe=Cfe.validate,pK="app.bsky.graph.block",hK="main";function Lfe(t){return kfe(t,pK,hK)}function Dfe(t){return Pfe(t,pK,hK,!0)}var et={};Object.defineProperty(et,"__esModule",{value:!0});et.REFERENCELIST=et.CURATELIST=et.MODLIST=void 0;et.isListViewBasic=jfe;et.validateListViewBasic=Ofe;et.isListView=Ufe;et.validateListView=$fe;et.isListItemView=Vfe;et.validateListItemView=Kfe;et.isStarterPackView=Mfe;et.validateStarterPackView=Nfe;et.isStarterPackViewBasic=zfe;et.validateStarterPackViewBasic=Ffe;et.isListViewerState=qfe;et.validateListViewerState=Gfe;et.isNotFoundActor=Hfe;et.validateNotFoundActor=Wfe;et.isRelationship=Xfe;et.validateRelationship=Jfe;const Bfe=A,Ife=R,zs=Ife.is$typed,Fs=Bfe.validate,Tt="app.bsky.graph.defs",mK="listViewBasic";function jfe(t){return zs(t,Tt,mK)}function Ofe(t){return Fs(t,Tt,mK)}const yK="listView";function Ufe(t){return zs(t,Tt,yK)}function $fe(t){return Fs(t,Tt,yK)}const gK="listItemView";function Vfe(t){return zs(t,Tt,gK)}function Kfe(t){return Fs(t,Tt,gK)}const bK="starterPackView";function Mfe(t){return zs(t,Tt,bK)}function Nfe(t){return Fs(t,Tt,bK)}const vK="starterPackViewBasic";function zfe(t){return zs(t,Tt,vK)}function Ffe(t){return Fs(t,Tt,vK)}et.MODLIST=`${Tt}#modlist`;et.CURATELIST=`${Tt}#curatelist`;et.REFERENCELIST=`${Tt}#referencelist`;const EK="listViewerState";function qfe(t){return zs(t,Tt,EK)}function Gfe(t){return Fs(t,Tt,EK)}const wK="notFoundActor";function Hfe(t){return zs(t,Tt,wK)}function Wfe(t){return Fs(t,Tt,wK)}const xK="relationship";function Xfe(t){return zs(t,Tt,xK)}function Jfe(t){return Fs(t,Tt,xK)}var gb={};Object.defineProperty(gb,"__esModule",{value:!0});gb.isRecord=tpe;gb.validateRecord=rpe;const Zfe=A,Qfe=R,Yfe=Qfe.is$typed,epe=Zfe.validate,_K="app.bsky.graph.follow",RK="main";function tpe(t){return Yfe(t,_K,RK)}function rpe(t){return epe(t,_K,RK,!0)}var wR={};Object.defineProperty(wR,"__esModule",{value:!0});wR.toKnownErr=ope;const npe=A,ipe=R;ipe.is$typed;npe.validate;function ope(t){return t}var xR={};Object.defineProperty(xR,"__esModule",{value:!0});xR.toKnownErr=lpe;const spe=A,ape=R;ape.is$typed;spe.validate;function lpe(t){return t}var _R={};Object.defineProperty(_R,"__esModule",{value:!0});_R.toKnownErr=dpe;const cpe=A,upe=R;upe.is$typed;cpe.validate;function dpe(t){return t}var RR={};Object.defineProperty(RR,"__esModule",{value:!0});RR.toKnownErr=hpe;const fpe=A,ppe=R;ppe.is$typed;fpe.validate;function hpe(t){return t}var AR={};Object.defineProperty(AR,"__esModule",{value:!0});AR.toKnownErr=gpe;const mpe=A,ype=R;ype.is$typed;mpe.validate;function gpe(t){return t}var SR={};Object.defineProperty(SR,"__esModule",{value:!0});SR.toKnownErr=Epe;const bpe=A,vpe=R;vpe.is$typed;bpe.validate;function Epe(t){return t}var CR={};Object.defineProperty(CR,"__esModule",{value:!0});CR.toKnownErr=_pe;const wpe=A,xpe=R;xpe.is$typed;wpe.validate;function _pe(t){return t}var TR={};Object.defineProperty(TR,"__esModule",{value:!0});TR.toKnownErr=Spe;const Rpe=A,Ape=R;Ape.is$typed;Rpe.validate;function Spe(t){return t}var kR={};Object.defineProperty(kR,"__esModule",{value:!0});kR.toKnownErr=kpe;const Cpe=A,Tpe=R;Tpe.is$typed;Cpe.validate;function kpe(t){return t}var PR={};Object.defineProperty(PR,"__esModule",{value:!0});PR.toKnownErr=Dpe;const Ppe=A,Lpe=R;Lpe.is$typed;Ppe.validate;function Dpe(t){return t}var LR={};Object.defineProperty(LR,"__esModule",{value:!0});LR.toKnownErr=jpe;const Bpe=A,Ipe=R;Ipe.is$typed;Bpe.validate;function jpe(t){return t}var DR={};Object.defineProperty(DR,"__esModule",{value:!0});DR.toKnownErr=$pe;const Ope=A,Upe=R;Upe.is$typed;Ope.validate;function $pe(t){return t}var BR={};Object.defineProperty(BR,"__esModule",{value:!0});BR.toKnownErr=Mpe;const Vpe=A,Kpe=R;Kpe.is$typed;Vpe.validate;function Mpe(t){return t}var bb={};Object.defineProperty(bb,"__esModule",{value:!0});bb.isRecord=Gpe;bb.validateRecord=Hpe;const Npe=A,zpe=R,Fpe=zpe.is$typed,qpe=Npe.validate,AK="app.bsky.graph.list",SK="main";function Gpe(t){return Fpe(t,AK,SK)}function Hpe(t){return qpe(t,AK,SK,!0)}var vb={};Object.defineProperty(vb,"__esModule",{value:!0});vb.isRecord=Qpe;vb.validateRecord=Ype;const Wpe=A,Xpe=R,Jpe=Xpe.is$typed,Zpe=Wpe.validate,CK="app.bsky.graph.listblock",TK="main";function Qpe(t){return Jpe(t,CK,TK)}function Ype(t){return Zpe(t,CK,TK,!0)}var Eb={};Object.defineProperty(Eb,"__esModule",{value:!0});Eb.isRecord=ihe;Eb.validateRecord=ohe;const ehe=A,the=R,rhe=the.is$typed,nhe=ehe.validate,kK="app.bsky.graph.listitem",PK="main";function ihe(t){return rhe(t,kK,PK)}function ohe(t){return nhe(t,kK,PK,!0)}var IR={};Object.defineProperty(IR,"__esModule",{value:!0});IR.toKnownErr=lhe;const she=A,ahe=R;ahe.is$typed;she.validate;function lhe(t){return t}var jR={};Object.defineProperty(jR,"__esModule",{value:!0});jR.toKnownErr=dhe;const che=A,uhe=R;uhe.is$typed;che.validate;function dhe(t){return t}var OR={};Object.defineProperty(OR,"__esModule",{value:!0});OR.toKnownErr=hhe;const fhe=A,phe=R;phe.is$typed;fhe.validate;function hhe(t){return t}var UR={};Object.defineProperty(UR,"__esModule",{value:!0});UR.toKnownErr=ghe;const mhe=A,yhe=R;yhe.is$typed;mhe.validate;function ghe(t){return t}var mu={};Object.defineProperty(mu,"__esModule",{value:!0});mu.isRecord=Ehe;mu.validateRecord=whe;mu.isFeedItem=xhe;mu.validateFeedItem=_he;const bhe=A,vhe=R,LK=vhe.is$typed,DK=bhe.validate,wb="app.bsky.graph.starterpack",BK="main";function Ehe(t){return LK(t,wb,BK)}function whe(t){return DK(t,wb,BK,!0)}const IK="feedItem";function xhe(t){return LK(t,wb,IK)}function _he(t){return DK(t,wb,IK)}var $R={};Object.defineProperty($R,"__esModule",{value:!0});$R.toKnownErr=She;const Rhe=A,Ahe=R;Ahe.is$typed;Rhe.validate;function She(t){return t}var VR={};Object.defineProperty(VR,"__esModule",{value:!0});VR.toKnownErr=khe;const Che=A,The=R;The.is$typed;Che.validate;function khe(t){return t}var KR={};Object.defineProperty(KR,"__esModule",{value:!0});KR.toKnownErr=Dhe;const Phe=A,Lhe=R;Lhe.is$typed;Phe.validate;function Dhe(t){return t}var xb={};Object.defineProperty(xb,"__esModule",{value:!0});xb.isRecord=Uhe;xb.validateRecord=$he;const Bhe=A,Ihe=R,jhe=Ihe.is$typed,Ohe=Bhe.validate,jK="app.bsky.graph.verification",OK="main";function Uhe(t){return jhe(t,jK,OK)}function $he(t){return Ohe(t,jK,OK,!0)}var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.isLabelerView=Mhe;Ui.validateLabelerView=Nhe;Ui.isLabelerViewDetailed=zhe;Ui.validateLabelerViewDetailed=Fhe;Ui.isLabelerViewerState=qhe;Ui.validateLabelerViewerState=Ghe;Ui.isLabelerPolicies=Hhe;Ui.validateLabelerPolicies=Whe;const Vhe=A,Khe=R,_b=Khe.is$typed,Rb=Vhe.validate,qs="app.bsky.labeler.defs",UK="labelerView";function Mhe(t){return _b(t,qs,UK)}function Nhe(t){return Rb(t,qs,UK)}const $K="labelerViewDetailed";function zhe(t){return _b(t,qs,$K)}function Fhe(t){return Rb(t,qs,$K)}const VK="labelerViewerState";function qhe(t){return _b(t,qs,VK)}function Ghe(t){return Rb(t,qs,VK)}const KK="labelerPolicies";function Hhe(t){return _b(t,qs,KK)}function Whe(t){return Rb(t,qs,KK)}var MR={};Object.defineProperty(MR,"__esModule",{value:!0});MR.toKnownErr=Zhe;const Xhe=A,Jhe=R;Jhe.is$typed;Xhe.validate;function Zhe(t){return t}var Ab={};Object.defineProperty(Ab,"__esModule",{value:!0});Ab.isRecord=rme;Ab.validateRecord=nme;const Qhe=A,Yhe=R,eme=Yhe.is$typed,tme=Qhe.validate,MK="app.bsky.labeler.service",NK="main";function rme(t){return eme(t,MK,NK)}function nme(t){return tme(t,MK,NK,!0)}var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.isRecordDeleted=sme;Pn.validateRecordDeleted=ame;Pn.isChatPreference=lme;Pn.validateChatPreference=cme;Pn.isFilterablePreference=ume;Pn.validateFilterablePreference=dme;Pn.isPreference=fme;Pn.validatePreference=pme;Pn.isPreferences=hme;Pn.validatePreferences=mme;const ime=A,ome=R,Sp=ome.is$typed,Cp=ime.validate,$i="app.bsky.notification.defs",zK="recordDeleted";function sme(t){return Sp(t,$i,zK)}function ame(t){return Cp(t,$i,zK)}const FK="chatPreference";function lme(t){return Sp(t,$i,FK)}function cme(t){return Cp(t,$i,FK)}const qK="filterablePreference";function ume(t){return Sp(t,$i,qK)}function dme(t){return Cp(t,$i,qK)}const GK="preference";function fme(t){return Sp(t,$i,GK)}function pme(t){return Cp(t,$i,GK)}const HK="preferences";function hme(t){return Sp(t,$i,HK)}function mme(t){return Cp(t,$i,HK)}var NR={};Object.defineProperty(NR,"__esModule",{value:!0});NR.toKnownErr=bme;const yme=A,gme=R;gme.is$typed;yme.validate;function bme(t){return t}var zR={};Object.defineProperty(zR,"__esModule",{value:!0});zR.toKnownErr=wme;const vme=A,Eme=R;Eme.is$typed;vme.validate;function wme(t){return t}var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0});Tp.toKnownErr=Sme;Tp.isNotification=Cme;Tp.validateNotification=Tme;const xme=A,_me=R,Rme=_me.is$typed,Ame=xme.validate,WK="app.bsky.notification.listNotifications";function Sme(t){return t}const XK="notification";function Cme(t){return Rme(t,WK,XK)}function Tme(t){return Ame(t,WK,XK)}var FR={};Object.defineProperty(FR,"__esModule",{value:!0});FR.toKnownErr=Lme;const kme=A,Pme=R;Pme.is$typed;kme.validate;function Lme(t){return t}var qR={};Object.defineProperty(qR,"__esModule",{value:!0});qR.toKnownErr=Ime;const Dme=A,Bme=R;Bme.is$typed;Dme.validate;function Ime(t){return t}var GR={};Object.defineProperty(GR,"__esModule",{value:!0});GR.toKnownErr=Ume;const jme=A,Ome=R;Ome.is$typed;jme.validate;function Ume(t){return t}var HR={};Object.defineProperty(HR,"__esModule",{value:!0});HR.toKnownErr=Kme;const $me=A,Vme=R;Vme.is$typed;$me.validate;function Kme(t){return t}var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.isMain=zme;Ln.validateMain=Fme;Ln.isMention=qme;Ln.validateMention=Gme;Ln.isLink=Hme;Ln.validateLink=Wme;Ln.isTag=Xme;Ln.validateTag=Jme;Ln.isByteSlice=Zme;Ln.validateByteSlice=Qme;const Mme=A,Nme=R,kp=Nme.is$typed,Pp=Mme.validate,Vi="app.bsky.richtext.facet",JK="main";function zme(t){return kp(t,Vi,JK)}function Fme(t){return Pp(t,Vi,JK)}const ZK="mention";function qme(t){return kp(t,Vi,ZK)}function Gme(t){return Pp(t,Vi,ZK)}const QK="link";function Hme(t){return kp(t,Vi,QK)}function Wme(t){return Pp(t,Vi,QK)}const YK="tag";function Xme(t){return kp(t,Vi,YK)}function Jme(t){return Pp(t,Vi,YK)}const eM="byteSlice";function Zme(t){return kp(t,Vi,eM)}function Qme(t){return Pp(t,Vi,eM)}var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.isSkeletonSearchPost=tye;dt.validateSkeletonSearchPost=rye;dt.isSkeletonSearchActor=nye;dt.validateSkeletonSearchActor=iye;dt.isSkeletonSearchStarterPack=oye;dt.validateSkeletonSearchStarterPack=sye;dt.isTrendingTopic=aye;dt.validateTrendingTopic=lye;dt.isSkeletonTrend=cye;dt.validateSkeletonTrend=uye;dt.isTrendView=dye;dt.validateTrendView=fye;dt.isThreadItemPost=pye;dt.validateThreadItemPost=hye;dt.isThreadItemNoUnauthenticated=mye;dt.validateThreadItemNoUnauthenticated=yye;dt.isThreadItemNotFound=gye;dt.validateThreadItemNotFound=bye;dt.isThreadItemBlocked=vye;dt.validateThreadItemBlocked=Eye;const Yme=A,eye=R,Ki=eye.is$typed,Mi=Yme.validate,_t="app.bsky.unspecced.defs",tM="skeletonSearchPost";function tye(t){return Ki(t,_t,tM)}function rye(t){return Mi(t,_t,tM)}const rM="skeletonSearchActor";function nye(t){return Ki(t,_t,rM)}function iye(t){return Mi(t,_t,rM)}const nM="skeletonSearchStarterPack";function oye(t){return Ki(t,_t,nM)}function sye(t){return Mi(t,_t,nM)}const iM="trendingTopic";function aye(t){return Ki(t,_t,iM)}function lye(t){return Mi(t,_t,iM)}const oM="skeletonTrend";function cye(t){return Ki(t,_t,oM)}function uye(t){return Mi(t,_t,oM)}const sM="trendView";function dye(t){return Ki(t,_t,sM)}function fye(t){return Mi(t,_t,sM)}const aM="threadItemPost";function pye(t){return Ki(t,_t,aM)}function hye(t){return Mi(t,_t,aM)}const lM="threadItemNoUnauthenticated";function mye(t){return Ki(t,_t,lM)}function yye(t){return Mi(t,_t,lM)}const cM="threadItemNotFound";function gye(t){return Ki(t,_t,cM)}function bye(t){return Mi(t,_t,cM)}const uM="threadItemBlocked";function vye(t){return Ki(t,_t,uM)}function Eye(t){return Mi(t,_t,uM)}var Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});Lp.toKnownErr=Aye;Lp.isLiveNowConfig=Sye;Lp.validateLiveNowConfig=Cye;const wye=A,xye=R,_ye=xye.is$typed,Rye=wye.validate,dM="app.bsky.unspecced.getConfig";function Aye(t){return t}const fM="liveNowConfig";function Sye(t){return _ye(t,dM,fM)}function Cye(t){return Rye(t,dM,fM)}var WR={};Object.defineProperty(WR,"__esModule",{value:!0});WR.toKnownErr=Pye;const Tye=A,kye=R;kye.is$typed;Tye.validate;function Pye(t){return t}var Dp={};Object.defineProperty(Dp,"__esModule",{value:!0});Dp.toKnownErr=jye;Dp.isThreadItem=Oye;Dp.validateThreadItem=Uye;const Lye=A,Dye=R,Bye=Dye.is$typed,Iye=Lye.validate,pM="app.bsky.unspecced.getPostThreadOtherV2";function jye(t){return t}const hM="threadItem";function Oye(t){return Bye(t,pM,hM)}function Uye(t){return Iye(t,pM,hM)}var Bp={};Object.defineProperty(Bp,"__esModule",{value:!0});Bp.toKnownErr=Nye;Bp.isThreadItem=zye;Bp.validateThreadItem=Fye;const $ye=A,Vye=R,Kye=Vye.is$typed,Mye=$ye.validate,mM="app.bsky.unspecced.getPostThreadV2";function Nye(t){return t}const yM="threadItem";function zye(t){return Kye(t,mM,yM)}function Fye(t){return Mye(t,mM,yM)}var XR={};Object.defineProperty(XR,"__esModule",{value:!0});XR.toKnownErr=Hye;const qye=A,Gye=R;Gye.is$typed;qye.validate;function Hye(t){return t}var JR={};Object.defineProperty(JR,"__esModule",{value:!0});JR.toKnownErr=Jye;const Wye=A,Xye=R;Xye.is$typed;Wye.validate;function Jye(t){return t}var ZR={};Object.defineProperty(ZR,"__esModule",{value:!0});ZR.toKnownErr=Yye;const Zye=A,Qye=R;Qye.is$typed;Zye.validate;function Yye(t){return t}var QR={};Object.defineProperty(QR,"__esModule",{value:!0});QR.toKnownErr=rge;const ege=A,tge=R;tge.is$typed;ege.validate;function rge(t){return t}var YR={};Object.defineProperty(YR,"__esModule",{value:!0});YR.toKnownErr=oge;const nge=A,ige=R;ige.is$typed;nge.validate;function oge(t){return t}var eA={};Object.defineProperty(eA,"__esModule",{value:!0});eA.toKnownErr=lge;const sge=A,age=R;age.is$typed;sge.validate;function lge(t){return t}var tA={};Object.defineProperty(tA,"__esModule",{value:!0});tA.toKnownErr=dge;const cge=A,uge=R;uge.is$typed;cge.validate;function dge(t){return t}var Ip={};Object.defineProperty(Ip,"__esModule",{value:!0});Ip.toKnownErr=yge;Ip.isSuggestion=gge;Ip.validateSuggestion=bge;const fge=A,pge=R,hge=pge.is$typed,mge=fge.validate,gM="app.bsky.unspecced.getTaggedSuggestions";function yge(t){return t}const bM="suggestion";function gge(t){return hge(t,gM,bM)}function bge(t){return mge(t,gM,bM)}var rA={};Object.defineProperty(rA,"__esModule",{value:!0});rA.toKnownErr=wge;const vge=A,Ege=R;Ege.is$typed;vge.validate;function wge(t){return t}var nA={};Object.defineProperty(nA,"__esModule",{value:!0});nA.toKnownErr=Rge;const xge=A,_ge=R;_ge.is$typed;xge.validate;function Rge(t){return t}var iA={};Object.defineProperty(iA,"__esModule",{value:!0});iA.toKnownErr=Cge;const Age=A,Sge=R;Sge.is$typed;Age.validate;function Cge(t){return t}var Sb={};Object.defineProperty(Sb,"__esModule",{value:!0});Sb.isJobStatus=Dge;Sb.validateJobStatus=Bge;const Tge=A,kge=R,Pge=kge.is$typed,Lge=Tge.validate,vM="app.bsky.video.defs",EM="jobStatus";function Dge(t){return Pge(t,vM,EM)}function Bge(t){return Lge(t,vM,EM)}var oA={};Object.defineProperty(oA,"__esModule",{value:!0});oA.toKnownErr=Oge;const Ige=A,jge=R;jge.is$typed;Ige.validate;function Oge(t){return t}var sA={};Object.defineProperty(sA,"__esModule",{value:!0});sA.toKnownErr=Vge;const Uge=A,$ge=R;$ge.is$typed;Uge.validate;function Vge(t){return t}var aA={};Object.defineProperty(aA,"__esModule",{value:!0});aA.toKnownErr=Nge;const Kge=A,Mge=R;Mge.is$typed;Kge.validate;function Nge(t){return t}var Cb={};Object.defineProperty(Cb,"__esModule",{value:!0});Cb.isRecord=Hge;Cb.validateRecord=Wge;const zge=A,Fge=R,qge=Fge.is$typed,Gge=zge.validate,wM="chat.bsky.actor.declaration",xM="main";function Hge(t){return qge(t,wM,xM)}function Wge(t){return Gge(t,wM,xM,!0)}var Tb={};Object.defineProperty(Tb,"__esModule",{value:!0});Tb.isProfileViewBasic=Yge;Tb.validateProfileViewBasic=ebe;const Xge=A,Jge=R,Zge=Jge.is$typed,Qge=Xge.validate,_M="chat.bsky.actor.defs",RM="profileViewBasic";function Yge(t){return Zge(t,_M,RM)}function ebe(t){return Qge(t,_M,RM)}var lA={};Object.defineProperty(lA,"__esModule",{value:!0});lA.toKnownErr=nbe;const tbe=A,rbe=R;rbe.is$typed;tbe.validate;function nbe(t){return t}var cA={};Object.defineProperty(cA,"__esModule",{value:!0});cA.toKnownErr=sbe;const ibe=A,obe=R;obe.is$typed;ibe.validate;function sbe(t){return t}var uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.toKnownErr=cbe;const abe=A,lbe=R;lbe.is$typed;abe.validate;function cbe(t){return t}var ve={};Object.defineProperty(ve,"__esModule",{value:!0});ve.isMessageRef=fbe;ve.validateMessageRef=pbe;ve.isMessageInput=hbe;ve.validateMessageInput=mbe;ve.isMessageView=ybe;ve.validateMessageView=gbe;ve.isDeletedMessageView=bbe;ve.validateDeletedMessageView=vbe;ve.isMessageViewSender=Ebe;ve.validateMessageViewSender=wbe;ve.isReactionView=xbe;ve.validateReactionView=_be;ve.isReactionViewSender=Rbe;ve.validateReactionViewSender=Abe;ve.isMessageAndReactionView=Sbe;ve.validateMessageAndReactionView=Cbe;ve.isConvoView=Tbe;ve.validateConvoView=kbe;ve.isLogBeginConvo=Pbe;ve.validateLogBeginConvo=Lbe;ve.isLogAcceptConvo=Dbe;ve.validateLogAcceptConvo=Bbe;ve.isLogLeaveConvo=Ibe;ve.validateLogLeaveConvo=jbe;ve.isLogMuteConvo=Obe;ve.validateLogMuteConvo=Ube;ve.isLogUnmuteConvo=$be;ve.validateLogUnmuteConvo=Vbe;ve.isLogCreateMessage=Kbe;ve.validateLogCreateMessage=Mbe;ve.isLogDeleteMessage=Nbe;ve.validateLogDeleteMessage=zbe;ve.isLogReadMessage=Fbe;ve.validateLogReadMessage=qbe;ve.isLogAddReaction=Gbe;ve.validateLogAddReaction=Hbe;ve.isLogRemoveReaction=Wbe;ve.validateLogRemoveReaction=Xbe;const ube=A,dbe=R,kt=dbe.is$typed,Pt=ube.validate,Ae="chat.bsky.convo.defs",AM="messageRef";function fbe(t){return kt(t,Ae,AM)}function pbe(t){return Pt(t,Ae,AM)}const SM="messageInput";function hbe(t){return kt(t,Ae,SM)}function mbe(t){return Pt(t,Ae,SM)}const CM="messageView";function ybe(t){return kt(t,Ae,CM)}function gbe(t){return Pt(t,Ae,CM)}const TM="deletedMessageView";function bbe(t){return kt(t,Ae,TM)}function vbe(t){return Pt(t,Ae,TM)}const kM="messageViewSender";function Ebe(t){return kt(t,Ae,kM)}function wbe(t){return Pt(t,Ae,kM)}const PM="reactionView";function xbe(t){return kt(t,Ae,PM)}function _be(t){return Pt(t,Ae,PM)}const LM="reactionViewSender";function Rbe(t){return kt(t,Ae,LM)}function Abe(t){return Pt(t,Ae,LM)}const DM="messageAndReactionView";function Sbe(t){return kt(t,Ae,DM)}function Cbe(t){return Pt(t,Ae,DM)}const BM="convoView";function Tbe(t){return kt(t,Ae,BM)}function kbe(t){return Pt(t,Ae,BM)}const IM="logBeginConvo";function Pbe(t){return kt(t,Ae,IM)}function Lbe(t){return Pt(t,Ae,IM)}const jM="logAcceptConvo";function Dbe(t){return kt(t,Ae,jM)}function Bbe(t){return Pt(t,Ae,jM)}const OM="logLeaveConvo";function Ibe(t){return kt(t,Ae,OM)}function jbe(t){return Pt(t,Ae,OM)}const UM="logMuteConvo";function Obe(t){return kt(t,Ae,UM)}function Ube(t){return Pt(t,Ae,UM)}const $M="logUnmuteConvo";function $be(t){return kt(t,Ae,$M)}function Vbe(t){return Pt(t,Ae,$M)}const VM="logCreateMessage";function Kbe(t){return kt(t,Ae,VM)}function Mbe(t){return Pt(t,Ae,VM)}const KM="logDeleteMessage";function Nbe(t){return kt(t,Ae,KM)}function zbe(t){return Pt(t,Ae,KM)}const MM="logReadMessage";function Fbe(t){return kt(t,Ae,MM)}function qbe(t){return Pt(t,Ae,MM)}const NM="logAddReaction";function Gbe(t){return kt(t,Ae,NM)}function Hbe(t){return Pt(t,Ae,NM)}const zM="logRemoveReaction";function Wbe(t){return kt(t,Ae,zM)}function Xbe(t){return Pt(t,Ae,zM)}var dA={};Object.defineProperty(dA,"__esModule",{value:!0});dA.toKnownErr=Qbe;const Jbe=A,Zbe=R;Zbe.is$typed;Jbe.validate;function Qbe(t){return t}var fA={};Object.defineProperty(fA,"__esModule",{value:!0});fA.toKnownErr=tve;const Ybe=A,eve=R;eve.is$typed;Ybe.validate;function tve(t){return t}var pA={};Object.defineProperty(pA,"__esModule",{value:!0});pA.toKnownErr=ive;const rve=A,nve=R;nve.is$typed;rve.validate;function ive(t){return t}var hA={};Object.defineProperty(hA,"__esModule",{value:!0});hA.toKnownErr=ave;const ove=A,sve=R;sve.is$typed;ove.validate;function ave(t){return t}var mA={};Object.defineProperty(mA,"__esModule",{value:!0});mA.toKnownErr=uve;const lve=A,cve=R;cve.is$typed;lve.validate;function uve(t){return t}var yA={};Object.defineProperty(yA,"__esModule",{value:!0});yA.toKnownErr=pve;const dve=A,fve=R;fve.is$typed;dve.validate;function pve(t){return t}var gA={};Object.defineProperty(gA,"__esModule",{value:!0});gA.toKnownErr=yve;const hve=A,mve=R;mve.is$typed;hve.validate;function yve(t){return t}var bA={};Object.defineProperty(bA,"__esModule",{value:!0});bA.toKnownErr=vve;const gve=A,bve=R;bve.is$typed;gve.validate;function vve(t){return t}var vA={};Object.defineProperty(vA,"__esModule",{value:!0});vA.toKnownErr=xve;const Eve=A,wve=R;wve.is$typed;Eve.validate;function xve(t){return t}var EA={};Object.defineProperty(EA,"__esModule",{value:!0});EA.toKnownErr=Ave;const _ve=A,Rve=R;Rve.is$typed;_ve.validate;function Ave(t){return t}var jp={};Object.defineProperty(jp,"__esModule",{value:!0});jp.toKnownErr=Pve;jp.isBatchItem=Lve;jp.validateBatchItem=Dve;const Sve=A,Cve=R,Tve=Cve.is$typed,kve=Sve.validate,FM="chat.bsky.convo.sendMessageBatch";function Pve(t){return t}const qM="batchItem";function Lve(t){return Tve(t,FM,qM)}function Dve(t){return kve(t,FM,qM)}var wA={};Object.defineProperty(wA,"__esModule",{value:!0});wA.toKnownErr=jve;const Bve=A,Ive=R;Ive.is$typed;Bve.validate;function jve(t){return t}var xA={};Object.defineProperty(xA,"__esModule",{value:!0});xA.toKnownErr=$ve;const Ove=A,Uve=R;Uve.is$typed;Ove.validate;function $ve(t){return t}var _A={};Object.defineProperty(_A,"__esModule",{value:!0});_A.toKnownErr=Mve;const Vve=A,Kve=R;Kve.is$typed;Vve.validate;function Mve(t){return t}var Op={};Object.defineProperty(Op,"__esModule",{value:!0});Op.toKnownErr=Gve;Op.isMetadata=Hve;Op.validateMetadata=Wve;const Nve=A,zve=R,Fve=zve.is$typed,qve=Nve.validate,GM="chat.bsky.moderation.getActorMetadata";function Gve(t){return t}const HM="metadata";function Hve(t){return Fve(t,GM,HM)}function Wve(t){return qve(t,GM,HM)}var RA={};Object.defineProperty(RA,"__esModule",{value:!0});RA.toKnownErr=Zve;const Xve=A,Jve=R;Jve.is$typed;Xve.validate;function Zve(t){return t}var AA={};Object.defineProperty(AA,"__esModule",{value:!0});AA.toKnownErr=e0e;const Qve=A,Yve=R;Yve.is$typed;Qve.validate;function e0e(t){return t}var kb={};Object.defineProperty(kb,"__esModule",{value:!0});kb.isTemplateView=o0e;kb.validateTemplateView=s0e;const t0e=A,r0e=R,n0e=r0e.is$typed,i0e=t0e.validate,WM="tools.ozone.communication.defs",XM="templateView";function o0e(t){return n0e(t,WM,XM)}function s0e(t){return i0e(t,WM,XM)}var SA={};Object.defineProperty(SA,"__esModule",{value:!0});SA.toKnownErr=c0e;const a0e=A,l0e=R;l0e.is$typed;a0e.validate;function c0e(t){return t}var CA={};Object.defineProperty(CA,"__esModule",{value:!0});CA.toKnownErr=f0e;const u0e=A,d0e=R;d0e.is$typed;u0e.validate;function f0e(t){return t}var xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.toKnownErr=m0e;xr.isEvent=y0e;xr.validateEvent=g0e;xr.isAccountCreated=b0e;xr.validateAccountCreated=v0e;xr.isEmailUpdated=E0e;xr.validateEmailUpdated=w0e;xr.isEmailConfirmed=x0e;xr.validateEmailConfirmed=_0e;xr.isPasswordUpdated=R0e;xr.validatePasswordUpdated=A0e;xr.isHandleUpdated=S0e;xr.validateHandleUpdated=C0e;const p0e=A,h0e=R,yu=h0e.is$typed,gu=p0e.validate,Dn="tools.ozone.hosting.getAccountHistory";function m0e(t){return t}const JM="event";function y0e(t){return yu(t,Dn,JM)}function g0e(t){return gu(t,Dn,JM)}const ZM="accountCreated";function b0e(t){return yu(t,Dn,ZM)}function v0e(t){return gu(t,Dn,ZM)}const QM="emailUpdated";function E0e(t){return yu(t,Dn,QM)}function w0e(t){return gu(t,Dn,QM)}const YM="emailConfirmed";function x0e(t){return yu(t,Dn,YM)}function _0e(t){return gu(t,Dn,YM)}const eN="passwordUpdated";function R0e(t){return yu(t,Dn,eN)}function A0e(t){return gu(t,Dn,eN)}const tN="handleUpdated";function S0e(t){return yu(t,Dn,tN)}function C0e(t){return gu(t,Dn,tN)}var V={};Object.defineProperty(V,"__esModule",{value:!0});V.REVIEWNONE=V.REVIEWCLOSED=V.REVIEWESCALATED=V.REVIEWOPEN=void 0;V.isModEventView=P0e;V.validateModEventView=L0e;V.isModEventViewDetail=D0e;V.validateModEventViewDetail=B0e;V.isSubjectStatusView=I0e;V.validateSubjectStatusView=j0e;V.isSubjectView=O0e;V.validateSubjectView=U0e;V.isAccountStats=$0e;V.validateAccountStats=V0e;V.isRecordsStats=K0e;V.validateRecordsStats=M0e;V.isModEventTakedown=N0e;V.validateModEventTakedown=z0e;V.isModEventReverseTakedown=F0e;V.validateModEventReverseTakedown=q0e;V.isModEventResolveAppeal=G0e;V.validateModEventResolveAppeal=H0e;V.isModEventComment=W0e;V.validateModEventComment=X0e;V.isModEventReport=J0e;V.validateModEventReport=Z0e;V.isModEventLabel=Q0e;V.validateModEventLabel=Y0e;V.isModEventPriorityScore=eEe;V.validateModEventPriorityScore=tEe;V.isModEventAcknowledge=rEe;V.validateModEventAcknowledge=nEe;V.isModEventEscalate=iEe;V.validateModEventEscalate=oEe;V.isModEventMute=sEe;V.validateModEventMute=aEe;V.isModEventUnmute=lEe;V.validateModEventUnmute=cEe;V.isModEventMuteReporter=uEe;V.validateModEventMuteReporter=dEe;V.isModEventUnmuteReporter=fEe;V.validateModEventUnmuteReporter=pEe;V.isModEventEmail=hEe;V.validateModEventEmail=mEe;V.isModEventDivert=yEe;V.validateModEventDivert=gEe;V.isModEventTag=bEe;V.validateModEventTag=vEe;V.isAccountEvent=EEe;V.validateAccountEvent=wEe;V.isIdentityEvent=xEe;V.validateIdentityEvent=_Ee;V.isRecordEvent=REe;V.validateRecordEvent=AEe;V.isRepoView=SEe;V.validateRepoView=CEe;V.isRepoViewDetail=TEe;V.validateRepoViewDetail=kEe;V.isRepoViewNotFound=PEe;V.validateRepoViewNotFound=LEe;V.isRecordView=DEe;V.validateRecordView=BEe;V.isRecordViewDetail=IEe;V.validateRecordViewDetail=jEe;V.isRecordViewNotFound=OEe;V.validateRecordViewNotFound=UEe;V.isModeration=$Ee;V.validateModeration=VEe;V.isModerationDetail=KEe;V.validateModerationDetail=MEe;V.isBlobView=NEe;V.validateBlobView=zEe;V.isImageDetails=FEe;V.validateImageDetails=qEe;V.isVideoDetails=GEe;V.validateVideoDetails=HEe;V.isAccountHosting=WEe;V.validateAccountHosting=XEe;V.isRecordHosting=JEe;V.validateRecordHosting=ZEe;V.isReporterStats=QEe;V.validateReporterStats=YEe;const T0e=A,k0e=R,xe=k0e.is$typed,_e=T0e.validate,M="tools.ozone.moderation.defs",rN="modEventView";function P0e(t){return xe(t,M,rN)}function L0e(t){return _e(t,M,rN)}const nN="modEventViewDetail";function D0e(t){return xe(t,M,nN)}function B0e(t){return _e(t,M,nN)}const iN="subjectStatusView";function I0e(t){return xe(t,M,iN)}function j0e(t){return _e(t,M,iN)}const oN="subjectView";function O0e(t){return xe(t,M,oN)}function U0e(t){return _e(t,M,oN)}const sN="accountStats";function $0e(t){return xe(t,M,sN)}function V0e(t){return _e(t,M,sN)}const aN="recordsStats";function K0e(t){return xe(t,M,aN)}function M0e(t){return _e(t,M,aN)}V.REVIEWOPEN=`${M}#reviewOpen`;V.REVIEWESCALATED=`${M}#reviewEscalated`;V.REVIEWCLOSED=`${M}#reviewClosed`;V.REVIEWNONE=`${M}#reviewNone`;const lN="modEventTakedown";function N0e(t){return xe(t,M,lN)}function z0e(t){return _e(t,M,lN)}const cN="modEventReverseTakedown";function F0e(t){return xe(t,M,cN)}function q0e(t){return _e(t,M,cN)}const uN="modEventResolveAppeal";function G0e(t){return xe(t,M,uN)}function H0e(t){return _e(t,M,uN)}const dN="modEventComment";function W0e(t){return xe(t,M,dN)}function X0e(t){return _e(t,M,dN)}const fN="modEventReport";function J0e(t){return xe(t,M,fN)}function Z0e(t){return _e(t,M,fN)}const pN="modEventLabel";function Q0e(t){return xe(t,M,pN)}function Y0e(t){return _e(t,M,pN)}const hN="modEventPriorityScore";function eEe(t){return xe(t,M,hN)}function tEe(t){return _e(t,M,hN)}const mN="modEventAcknowledge";function rEe(t){return xe(t,M,mN)}function nEe(t){return _e(t,M,mN)}const yN="modEventEscalate";function iEe(t){return xe(t,M,yN)}function oEe(t){return _e(t,M,yN)}const gN="modEventMute";function sEe(t){return xe(t,M,gN)}function aEe(t){return _e(t,M,gN)}const bN="modEventUnmute";function lEe(t){return xe(t,M,bN)}function cEe(t){return _e(t,M,bN)}const vN="modEventMuteReporter";function uEe(t){return xe(t,M,vN)}function dEe(t){return _e(t,M,vN)}const EN="modEventUnmuteReporter";function fEe(t){return xe(t,M,EN)}function pEe(t){return _e(t,M,EN)}const wN="modEventEmail";function hEe(t){return xe(t,M,wN)}function mEe(t){return _e(t,M,wN)}const xN="modEventDivert";function yEe(t){return xe(t,M,xN)}function gEe(t){return _e(t,M,xN)}const _N="modEventTag";function bEe(t){return xe(t,M,_N)}function vEe(t){return _e(t,M,_N)}const RN="accountEvent";function EEe(t){return xe(t,M,RN)}function wEe(t){return _e(t,M,RN)}const AN="identityEvent";function xEe(t){return xe(t,M,AN)}function _Ee(t){return _e(t,M,AN)}const SN="recordEvent";function REe(t){return xe(t,M,SN)}function AEe(t){return _e(t,M,SN)}const CN="repoView";function SEe(t){return xe(t,M,CN)}function CEe(t){return _e(t,M,CN)}const TN="repoViewDetail";function TEe(t){return xe(t,M,TN)}function kEe(t){return _e(t,M,TN)}const kN="repoViewNotFound";function PEe(t){return xe(t,M,kN)}function LEe(t){return _e(t,M,kN)}const PN="recordView";function DEe(t){return xe(t,M,PN)}function BEe(t){return _e(t,M,PN)}const LN="recordViewDetail";function IEe(t){return xe(t,M,LN)}function jEe(t){return _e(t,M,LN)}const DN="recordViewNotFound";function OEe(t){return xe(t,M,DN)}function UEe(t){return _e(t,M,DN)}const BN="moderation";function $Ee(t){return xe(t,M,BN)}function VEe(t){return _e(t,M,BN)}const IN="moderationDetail";function KEe(t){return xe(t,M,IN)}function MEe(t){return _e(t,M,IN)}const jN="blobView";function NEe(t){return xe(t,M,jN)}function zEe(t){return _e(t,M,jN)}const ON="imageDetails";function FEe(t){return xe(t,M,ON)}function qEe(t){return _e(t,M,ON)}const UN="videoDetails";function GEe(t){return xe(t,M,UN)}function HEe(t){return _e(t,M,UN)}const $N="accountHosting";function WEe(t){return xe(t,M,$N)}function XEe(t){return _e(t,M,$N)}const VN="recordHosting";function JEe(t){return xe(t,M,VN)}function ZEe(t){return _e(t,M,VN)}const KN="reporterStats";function QEe(t){return xe(t,M,KN)}function YEe(t){return _e(t,M,KN)}var TA={};Object.defineProperty(TA,"__esModule",{value:!0});TA.toKnownErr=rwe;const ewe=A,twe=R;twe.is$typed;ewe.validate;function rwe(t){return t}var kA={};Object.defineProperty(kA,"__esModule",{value:!0});kA.toKnownErr=owe;const nwe=A,iwe=R;iwe.is$typed;nwe.validate;function owe(t){return t}var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.toKnownErr=lwe;const swe=A,awe=R;awe.is$typed;swe.validate;function lwe(t){return t}var LA={};Object.defineProperty(LA,"__esModule",{value:!0});LA.toKnownErr=dwe;const cwe=A,uwe=R;uwe.is$typed;cwe.validate;function dwe(t){return t}var DA={};Object.defineProperty(DA,"__esModule",{value:!0});DA.toKnownErr=hwe;const fwe=A,pwe=R;pwe.is$typed;fwe.validate;function hwe(t){return t}var BA={};Object.defineProperty(BA,"__esModule",{value:!0});BA.toKnownErr=gwe;const mwe=A,ywe=R;ywe.is$typed;mwe.validate;function gwe(t){return t}var IA={};Object.defineProperty(IA,"__esModule",{value:!0});IA.toKnownErr=Ewe;const bwe=A,vwe=R;vwe.is$typed;bwe.validate;function Ewe(t){return t}var jA={};Object.defineProperty(jA,"__esModule",{value:!0});jA.toKnownErr=_we;const wwe=A,xwe=R;xwe.is$typed;wwe.validate;function _we(t){return t}var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.toKnownErr=Swe;Ha.isServiceConfig=Cwe;Ha.validateServiceConfig=Twe;Ha.isViewerConfig=kwe;Ha.validateViewerConfig=Pwe;const Rwe=A,Awe=R,MN=Awe.is$typed,NN=Rwe.validate,Pb="tools.ozone.server.getConfig";function Swe(t){return t}const zN="serviceConfig";function Cwe(t){return MN(t,Pb,zN)}function Twe(t){return NN(t,Pb,zN)}const FN="viewerConfig";function kwe(t){return MN(t,Pb,FN)}function Pwe(t){return NN(t,Pb,FN)}var OA={};Object.defineProperty(OA,"__esModule",{value:!0});OA.toKnownErr=Bwe;const Lwe=A,Dwe=R;Dwe.is$typed;Lwe.validate;function Bwe(t){return t}var bu={};Object.defineProperty(bu,"__esModule",{value:!0});bu.isSet=Owe;bu.validateSet=Uwe;bu.isSetView=$we;bu.validateSetView=Vwe;const Iwe=A,jwe=R,qN=jwe.is$typed,GN=Iwe.validate,Lb="tools.ozone.set.defs",HN="set";function Owe(t){return qN(t,Lb,HN)}function Uwe(t){return GN(t,Lb,HN)}const WN="setView";function $we(t){return qN(t,Lb,WN)}function Vwe(t){return GN(t,Lb,WN)}var UA={};Object.defineProperty(UA,"__esModule",{value:!0});UA.toKnownErr=Nwe;const Kwe=A,Mwe=R;Mwe.is$typed;Kwe.validate;function Nwe(t){return t}var $A={};Object.defineProperty($A,"__esModule",{value:!0});$A.toKnownErr=qwe;const zwe=A,Fwe=R;Fwe.is$typed;zwe.validate;function qwe(t){return t}var Db={};Object.defineProperty(Db,"__esModule",{value:!0});Db.isOption=Jwe;Db.validateOption=Zwe;const Gwe=A,Hwe=R,Wwe=Hwe.is$typed,Xwe=Gwe.validate,XN="tools.ozone.setting.defs",JN="option";function Jwe(t){return Wwe(t,XN,JN)}function Zwe(t){return Xwe(t,XN,JN)}var VA={};Object.defineProperty(VA,"__esModule",{value:!0});VA.toKnownErr=exe;const Qwe=A,Ywe=R;Ywe.is$typed;Qwe.validate;function exe(t){return t}var KA={};Object.defineProperty(KA,"__esModule",{value:!0});KA.toKnownErr=nxe;const txe=A,rxe=R;rxe.is$typed;txe.validate;function nxe(t){return t}var MA={};Object.defineProperty(MA,"__esModule",{value:!0});MA.toKnownErr=sxe;const ixe=A,oxe=R;oxe.is$typed;ixe.validate;function sxe(t){return t}var Bb={};Object.defineProperty(Bb,"__esModule",{value:!0});Bb.isSigDetail=dxe;Bb.validateSigDetail=fxe;const axe=A,lxe=R,cxe=lxe.is$typed,uxe=axe.validate,ZN="tools.ozone.signature.defs",QN="sigDetail";function dxe(t){return cxe(t,ZN,QN)}function fxe(t){return uxe(t,ZN,QN)}var NA={};Object.defineProperty(NA,"__esModule",{value:!0});NA.toKnownErr=mxe;const pxe=A,hxe=R;hxe.is$typed;pxe.validate;function mxe(t){return t}var Up={};Object.defineProperty(Up,"__esModule",{value:!0});Up.toKnownErr=Exe;Up.isRelatedAccount=wxe;Up.validateRelatedAccount=xxe;const yxe=A,gxe=R,bxe=gxe.is$typed,vxe=yxe.validate,YN="tools.ozone.signature.findRelatedAccounts";function Exe(t){return t}const e2="relatedAccount";function wxe(t){return bxe(t,YN,e2)}function xxe(t){return vxe(t,YN,e2)}var zA={};Object.defineProperty(zA,"__esModule",{value:!0});zA.toKnownErr=Axe;const _xe=A,Rxe=R;Rxe.is$typed;_xe.validate;function Axe(t){return t}var bn={};Object.defineProperty(bn,"__esModule",{value:!0});bn.ROLEVERIFIER=bn.ROLETRIAGE=bn.ROLEMODERATOR=bn.ROLEADMIN=void 0;bn.isMember=Pxe;bn.validateMember=Lxe;const Sxe=A,Cxe=R,Txe=Cxe.is$typed,kxe=Sxe.validate,vu="tools.ozone.team.defs",t2="member";function Pxe(t){return Txe(t,vu,t2)}function Lxe(t){return kxe(t,vu,t2)}bn.ROLEADMIN=`${vu}#roleAdmin`;bn.ROLEMODERATOR=`${vu}#roleModerator`;bn.ROLETRIAGE=`${vu}#roleTriage`;bn.ROLEVERIFIER=`${vu}#roleVerifier`;var FA={};Object.defineProperty(FA,"__esModule",{value:!0});FA.toKnownErr=Ixe;const Dxe=A,Bxe=R;Bxe.is$typed;Dxe.validate;function Ixe(t){return t}var Ib={};Object.defineProperty(Ib,"__esModule",{value:!0});Ib.isVerificationView=Vxe;Ib.validateVerificationView=Kxe;const jxe=A,Oxe=R,Uxe=Oxe.is$typed,$xe=jxe.validate,r2="tools.ozone.verification.defs",n2="verificationView";function Vxe(t){return Uxe(t,r2,n2)}function Kxe(t){return $xe(t,r2,n2)}var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0});Wa.toKnownErr=zxe;Wa.isVerificationInput=Fxe;Wa.validateVerificationInput=qxe;Wa.isGrantError=Gxe;Wa.validateGrantError=Hxe;const Mxe=A,Nxe=R,i2=Nxe.is$typed,o2=Mxe.validate,jb="tools.ozone.verification.grantVerifications";function zxe(t){return t}const s2="verificationInput";function Fxe(t){return i2(t,jb,s2)}function qxe(t){return o2(t,jb,s2)}const a2="grantError";function Gxe(t){return i2(t,jb,a2)}function Hxe(t){return o2(t,jb,a2)}var qA={};Object.defineProperty(qA,"__esModule",{value:!0});qA.toKnownErr=Jxe;const Wxe=A,Xxe=R;Xxe.is$typed;Wxe.validate;function Jxe(t){return t}var $p={};Object.defineProperty($p,"__esModule",{value:!0});$p.toKnownErr=t_e;$p.isRevokeError=r_e;$p.validateRevokeError=n_e;const Zxe=A,Qxe=R,Yxe=Qxe.is$typed,e_e=Zxe.validate,l2="tools.ozone.verification.revokeVerifications";function t_e(t){return t}const c2="revokeError";function r_e(t){return Yxe(t,l2,c2)}function n_e(t){return e_e(t,l2,c2)}var i_e=C&&C.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),o_e=C&&C.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),x=C&&C.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&i_e(r,e,n[i]);return o_e(r,e),r}}();Object.defineProperty(p,"__esModule",{value:!0});p.ComAtprotoServerCreateInviteCode=p.ComAtprotoServerCreateAppPassword=p.ComAtprotoServerCreateAccount=p.ComAtprotoServerConfirmEmail=p.ComAtprotoServerCheckAccountStatus=p.ComAtprotoServerActivateAccount=p.ComAtprotoRepoUploadBlob=p.ComAtprotoRepoStrongRef=p.ComAtprotoRepoPutRecord=p.ComAtprotoRepoListRecords=p.ComAtprotoRepoListMissingBlobs=p.ComAtprotoRepoImportRepo=p.ComAtprotoRepoGetRecord=p.ComAtprotoRepoDescribeRepo=p.ComAtprotoRepoDeleteRecord=p.ComAtprotoRepoDefs=p.ComAtprotoRepoCreateRecord=p.ComAtprotoRepoApplyWrites=p.ComAtprotoModerationDefs=p.ComAtprotoModerationCreateReport=p.ComAtprotoLexiconSchema=p.ComAtprotoLabelSubscribeLabels=p.ComAtprotoLabelQueryLabels=p.ComAtprotoLabelDefs=p.ComAtprotoIdentityUpdateHandle=p.ComAtprotoIdentitySubmitPlcOperation=p.ComAtprotoIdentitySignPlcOperation=p.ComAtprotoIdentityResolveIdentity=p.ComAtprotoIdentityResolveHandle=p.ComAtprotoIdentityResolveDid=p.ComAtprotoIdentityRequestPlcOperationSignature=p.ComAtprotoIdentityRefreshIdentity=p.ComAtprotoIdentityGetRecommendedDidCredentials=p.ComAtprotoIdentityDefs=p.ComAtprotoAdminUpdateSubjectStatus=p.ComAtprotoAdminUpdateAccountSigningKey=p.ComAtprotoAdminUpdateAccountPassword=p.ComAtprotoAdminUpdateAccountHandle=p.ComAtprotoAdminUpdateAccountEmail=p.ComAtprotoAdminSendEmail=p.ComAtprotoAdminSearchAccounts=p.ComAtprotoAdminGetSubjectStatus=p.ComAtprotoAdminGetInviteCodes=p.ComAtprotoAdminGetAccountInfos=p.ComAtprotoAdminGetAccountInfo=p.ComAtprotoAdminEnableAccountInvites=p.ComAtprotoAdminDisableInviteCodes=p.ComAtprotoAdminDisableAccountInvites=p.ComAtprotoAdminDeleteAccount=p.ComAtprotoAdminDefs=void 0;p.AppBskyActorSearchActorsTypeahead=p.AppBskyActorSearchActors=p.AppBskyActorPutPreferences=p.AppBskyActorProfile=p.AppBskyActorGetSuggestions=p.AppBskyActorGetProfiles=p.AppBskyActorGetProfile=p.AppBskyActorGetPreferences=p.AppBskyActorDefs=p.ComAtprotoTempRequestPhoneVerification=p.ComAtprotoTempFetchLabels=p.ComAtprotoTempCheckSignupQueue=p.ComAtprotoTempAddReservedHandle=p.ComAtprotoSyncSubscribeRepos=p.ComAtprotoSyncRequestCrawl=p.ComAtprotoSyncNotifyOfUpdate=p.ComAtprotoSyncListReposByCollection=p.ComAtprotoSyncListRepos=p.ComAtprotoSyncListHosts=p.ComAtprotoSyncListBlobs=p.ComAtprotoSyncGetRepoStatus=p.ComAtprotoSyncGetRepo=p.ComAtprotoSyncGetRecord=p.ComAtprotoSyncGetLatestCommit=p.ComAtprotoSyncGetHostStatus=p.ComAtprotoSyncGetHead=p.ComAtprotoSyncGetCheckout=p.ComAtprotoSyncGetBlocks=p.ComAtprotoSyncGetBlob=p.ComAtprotoSyncDefs=p.ComAtprotoServerUpdateEmail=p.ComAtprotoServerRevokeAppPassword=p.ComAtprotoServerResetPassword=p.ComAtprotoServerReserveSigningKey=p.ComAtprotoServerRequestPasswordReset=p.ComAtprotoServerRequestEmailUpdate=p.ComAtprotoServerRequestEmailConfirmation=p.ComAtprotoServerRequestAccountDelete=p.ComAtprotoServerRefreshSession=p.ComAtprotoServerListAppPasswords=p.ComAtprotoServerGetSession=p.ComAtprotoServerGetServiceAuth=p.ComAtprotoServerGetAccountInviteCodes=p.ComAtprotoServerDescribeServer=p.ComAtprotoServerDeleteSession=p.ComAtprotoServerDeleteAccount=p.ComAtprotoServerDefs=p.ComAtprotoServerDeactivateAccount=p.ComAtprotoServerCreateSession=p.ComAtprotoServerCreateInviteCodes=void 0;p.AppBskyGraphList=p.AppBskyGraphGetSuggestedFollowsByActor=p.AppBskyGraphGetStarterPacks=p.AppBskyGraphGetStarterPack=p.AppBskyGraphGetRelationships=p.AppBskyGraphGetMutes=p.AppBskyGraphGetLists=p.AppBskyGraphGetListMutes=p.AppBskyGraphGetListBlocks=p.AppBskyGraphGetList=p.AppBskyGraphGetKnownFollowers=p.AppBskyGraphGetFollows=p.AppBskyGraphGetFollowers=p.AppBskyGraphGetBlocks=p.AppBskyGraphGetActorStarterPacks=p.AppBskyGraphFollow=p.AppBskyGraphDefs=p.AppBskyGraphBlock=p.AppBskyFeedThreadgate=p.AppBskyFeedSendInteractions=p.AppBskyFeedSearchPosts=p.AppBskyFeedRepost=p.AppBskyFeedPostgate=p.AppBskyFeedPost=p.AppBskyFeedLike=p.AppBskyFeedGetTimeline=p.AppBskyFeedGetSuggestedFeeds=p.AppBskyFeedGetRepostedBy=p.AppBskyFeedGetQuotes=p.AppBskyFeedGetPostThread=p.AppBskyFeedGetPosts=p.AppBskyFeedGetListFeed=p.AppBskyFeedGetLikes=p.AppBskyFeedGetFeedSkeleton=p.AppBskyFeedGetFeedGenerators=p.AppBskyFeedGetFeedGenerator=p.AppBskyFeedGetFeed=p.AppBskyFeedGetAuthorFeed=p.AppBskyFeedGetActorLikes=p.AppBskyFeedGetActorFeeds=p.AppBskyFeedGenerator=p.AppBskyFeedDescribeFeedGenerator=p.AppBskyFeedDefs=p.AppBskyEmbedVideo=p.AppBskyEmbedRecordWithMedia=p.AppBskyEmbedRecord=p.AppBskyEmbedImages=p.AppBskyEmbedExternal=p.AppBskyEmbedDefs=p.AppBskyActorStatus=void 0;p.ChatBskyActorExportAccountData=p.ChatBskyActorDeleteAccount=p.ChatBskyActorDefs=p.ChatBskyActorDeclaration=p.AppBskyVideoUploadVideo=p.AppBskyVideoGetUploadLimits=p.AppBskyVideoGetJobStatus=p.AppBskyVideoDefs=p.AppBskyUnspeccedSearchStarterPacksSkeleton=p.AppBskyUnspeccedSearchPostsSkeleton=p.AppBskyUnspeccedSearchActorsSkeleton=p.AppBskyUnspeccedGetTrendsSkeleton=p.AppBskyUnspeccedGetTrends=p.AppBskyUnspeccedGetTrendingTopics=p.AppBskyUnspeccedGetTaggedSuggestions=p.AppBskyUnspeccedGetSuggestionsSkeleton=p.AppBskyUnspeccedGetSuggestedUsersSkeleton=p.AppBskyUnspeccedGetSuggestedUsers=p.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=p.AppBskyUnspeccedGetSuggestedStarterPacks=p.AppBskyUnspeccedGetSuggestedFeedsSkeleton=p.AppBskyUnspeccedGetSuggestedFeeds=p.AppBskyUnspeccedGetPostThreadV2=p.AppBskyUnspeccedGetPostThreadOtherV2=p.AppBskyUnspeccedGetPopularFeedGenerators=p.AppBskyUnspeccedGetConfig=p.AppBskyUnspeccedDefs=p.AppBskyRichtextFacet=p.AppBskyNotificationUpdateSeen=p.AppBskyNotificationRegisterPush=p.AppBskyNotificationPutPreferencesV2=p.AppBskyNotificationPutPreferences=p.AppBskyNotificationListNotifications=p.AppBskyNotificationGetUnreadCount=p.AppBskyNotificationGetPreferences=p.AppBskyNotificationDefs=p.AppBskyLabelerService=p.AppBskyLabelerGetServices=p.AppBskyLabelerDefs=p.AppBskyGraphVerification=p.AppBskyGraphUnmuteThread=p.AppBskyGraphUnmuteActorList=p.AppBskyGraphUnmuteActor=p.AppBskyGraphStarterpack=p.AppBskyGraphSearchStarterPacks=p.AppBskyGraphMuteThread=p.AppBskyGraphMuteActorList=p.AppBskyGraphMuteActor=p.AppBskyGraphListitem=p.AppBskyGraphListblock=void 0;p.ToolsOzoneSettingRemoveOptions=p.ToolsOzoneSettingListOptions=p.ToolsOzoneSettingDefs=p.ToolsOzoneSetUpsertSet=p.ToolsOzoneSetQuerySets=p.ToolsOzoneSetGetValues=p.ToolsOzoneSetDeleteValues=p.ToolsOzoneSetDeleteSet=p.ToolsOzoneSetDefs=p.ToolsOzoneSetAddValues=p.ToolsOzoneServerGetConfig=p.ToolsOzoneModerationSearchRepos=p.ToolsOzoneModerationQueryStatuses=p.ToolsOzoneModerationQueryEvents=p.ToolsOzoneModerationGetSubjects=p.ToolsOzoneModerationGetRepos=p.ToolsOzoneModerationGetReporterStats=p.ToolsOzoneModerationGetRepo=p.ToolsOzoneModerationGetRecords=p.ToolsOzoneModerationGetRecord=p.ToolsOzoneModerationGetEvent=p.ToolsOzoneModerationEmitEvent=p.ToolsOzoneModerationDefs=p.ToolsOzoneHostingGetAccountHistory=p.ToolsOzoneCommunicationUpdateTemplate=p.ToolsOzoneCommunicationListTemplates=p.ToolsOzoneCommunicationDeleteTemplate=p.ToolsOzoneCommunicationDefs=p.ToolsOzoneCommunicationCreateTemplate=p.ChatBskyModerationUpdateActorAccess=p.ChatBskyModerationGetMessageContext=p.ChatBskyModerationGetActorMetadata=p.ChatBskyConvoUpdateRead=p.ChatBskyConvoUpdateAllRead=p.ChatBskyConvoUnmuteConvo=p.ChatBskyConvoSendMessageBatch=p.ChatBskyConvoSendMessage=p.ChatBskyConvoRemoveReaction=p.ChatBskyConvoMuteConvo=p.ChatBskyConvoListConvos=p.ChatBskyConvoLeaveConvo=p.ChatBskyConvoGetMessages=p.ChatBskyConvoGetLog=p.ChatBskyConvoGetConvoForMembers=p.ChatBskyConvoGetConvoAvailability=p.ChatBskyConvoGetConvo=p.ChatBskyConvoDeleteMessageForSelf=p.ChatBskyConvoDefs=p.ChatBskyConvoAddReaction=p.ChatBskyConvoAcceptConvo=void 0;p.AppBskyGraphListRecord=p.AppBskyGraphFollowRecord=p.AppBskyGraphBlockRecord=p.AppBskyGraphNS=p.AppBskyFeedThreadgateRecord=p.AppBskyFeedRepostRecord=p.AppBskyFeedPostgateRecord=p.AppBskyFeedPostRecord=p.AppBskyFeedLikeRecord=p.AppBskyFeedGeneratorRecord=p.AppBskyFeedNS=p.AppBskyEmbedNS=p.AppBskyActorStatusRecord=p.AppBskyActorProfileRecord=p.AppBskyActorNS=p.AppBskyNS=p.AppNS=p.ComAtprotoTempNS=p.ComAtprotoSyncNS=p.ComAtprotoServerNS=p.ComAtprotoRepoNS=p.ComAtprotoModerationNS=p.ComAtprotoLexiconSchemaRecord=p.ComAtprotoLexiconNS=p.ComAtprotoLabelNS=p.ComAtprotoIdentityNS=p.ComAtprotoAdminNS=p.ComAtprotoNS=p.ComNS=p.AtpBaseClient=p.TOOLS_OZONE_TEAM=p.TOOLS_OZONE_MODERATION=p.APP_BSKY_GRAPH=p.APP_BSKY_FEED=p.APP_BSKY_ACTOR=p.COM_ATPROTO_MODERATION=p.ToolsOzoneVerificationRevokeVerifications=p.ToolsOzoneVerificationListVerifications=p.ToolsOzoneVerificationGrantVerifications=p.ToolsOzoneVerificationDefs=p.ToolsOzoneTeamUpdateMember=p.ToolsOzoneTeamListMembers=p.ToolsOzoneTeamDeleteMember=p.ToolsOzoneTeamDefs=p.ToolsOzoneTeamAddMember=p.ToolsOzoneSignatureSearchAccounts=p.ToolsOzoneSignatureFindRelatedAccounts=p.ToolsOzoneSignatureFindCorrelation=p.ToolsOzoneSignatureDefs=p.ToolsOzoneSettingUpsertOption=void 0;p.ToolsOzoneVerificationNS=p.ToolsOzoneTeamNS=p.ToolsOzoneSignatureNS=p.ToolsOzoneSettingNS=p.ToolsOzoneSetNS=p.ToolsOzoneServerNS=p.ToolsOzoneModerationNS=p.ToolsOzoneHostingNS=p.ToolsOzoneCommunicationNS=p.ToolsOzoneNS=p.ToolsNS=p.ChatBskyModerationNS=p.ChatBskyConvoNS=p.ChatBskyActorDeclarationRecord=p.ChatBskyActorNS=p.ChatBskyNS=p.ChatNS=p.AppBskyVideoNS=p.AppBskyUnspeccedNS=p.AppBskyRichtextNS=p.AppBskyNotificationNS=p.AppBskyLabelerServiceRecord=p.AppBskyLabelerNS=p.AppBskyGraphVerificationRecord=p.AppBskyGraphStarterpackRecord=p.AppBskyGraphListitemRecord=p.AppBskyGraphListblockRecord=void 0;const s_e=ee,a_e=A,l_e=x(gi),c_e=x(ms),u_e=x(_c),d_e=x(bi),f_e=x(Vt),p_e=x(Sc),h_e=x(Cc),m_e=x(Tc),y_e=x(kc),g_e=x(hn),b_e=x(jt),v_e=x(Us),E_e=x(ys),w_e=x(gs),x_e=x(Pc),__e=x(Lc),R_e=x($s),A_e=x(Dc),S_e=x(bs),C_e=x(vi),T_e=x(Pr),k_e=x(Lr),P_e=x(jc),L_e=x(Oc),D_e=x(mn),B_e=x(Dr),I_e=x(yn),j_e=x($c),O_e=x(gn),U_e=x(Vc),$_e=x(vs),V_e=x(Es),K_e=x(Kc),M_e=x(Mc),N_e=x(Nc),z_e=x(zc),F_e=x(Fc),q_e=x(qc),G_e=x(Gc),H_e=x(Hc),W_e=x(Wc),X_e=x(Ei),J_e=x(ws),Z_e=x(Xc),Q_e=x(Jc),Y_e=x(Zc),eRe=x(Qc),tRe=x(Yc),rRe=x(eu),nRe=x(tu),iRe=x(ru),oRe=x(nu),sRe=x(xs),aRe=x(iu);p.ComAtprotoAdminDefs=x(An);p.ComAtprotoAdminDeleteAccount=x(p_);p.ComAtprotoAdminDisableAccountInvites=x(h_);p.ComAtprotoAdminDisableInviteCodes=x(m_);p.ComAtprotoAdminEnableAccountInvites=x(y_);p.ComAtprotoAdminGetAccountInfo=x(g_);p.ComAtprotoAdminGetAccountInfos=x(b_);p.ComAtprotoAdminGetInviteCodes=x(v_);p.ComAtprotoAdminGetSubjectStatus=x(E_);p.ComAtprotoAdminSearchAccounts=x(w_);p.ComAtprotoAdminSendEmail=x(x_);p.ComAtprotoAdminUpdateAccountEmail=x(__);p.ComAtprotoAdminUpdateAccountHandle=x(R_);p.ComAtprotoAdminUpdateAccountPassword=x(A_);p.ComAtprotoAdminUpdateAccountSigningKey=x(S_);p.ComAtprotoAdminUpdateSubjectStatus=x(C_);p.ComAtprotoIdentityDefs=x(Xg);p.ComAtprotoIdentityGetRecommendedDidCredentials=x(T_);p.ComAtprotoIdentityRefreshIdentity=x(gi);p.ComAtprotoIdentityRequestPlcOperationSignature=x(k_);p.ComAtprotoIdentityResolveDid=x(ms);p.ComAtprotoIdentityResolveHandle=x(_c);p.ComAtprotoIdentityResolveIdentity=x(bi);p.ComAtprotoIdentitySignPlcOperation=x(P_);p.ComAtprotoIdentitySubmitPlcOperation=x(L_);p.ComAtprotoIdentityUpdateHandle=x(D_);p.ComAtprotoLabelDefs=x(Sn);p.ComAtprotoLabelQueryLabels=x(B_);p.ComAtprotoLabelSubscribeLabels=x(ou);p.ComAtprotoLexiconSchema=x(Zg);p.ComAtprotoModerationCreateReport=x(I_);p.ComAtprotoModerationDefs=x(nr);p.ComAtprotoRepoApplyWrites=x(Vt);p.ComAtprotoRepoCreateRecord=x(Sc);p.ComAtprotoRepoDefs=x(Qg);p.ComAtprotoRepoDeleteRecord=x(Cc);p.ComAtprotoRepoDescribeRepo=x(j_);p.ComAtprotoRepoGetRecord=x(Tc);p.ComAtprotoRepoImportRepo=x(O_);p.ComAtprotoRepoListMissingBlobs=x(gp);p.ComAtprotoRepoListRecords=x(bp);p.ComAtprotoRepoPutRecord=x(kc);p.ComAtprotoRepoStrongRef=x(Yg);p.ComAtprotoRepoUploadBlob=x(U_);p.ComAtprotoServerActivateAccount=x($_);p.ComAtprotoServerCheckAccountStatus=x(V_);p.ComAtprotoServerConfirmEmail=x(hn);p.ComAtprotoServerCreateAccount=x(jt);p.ComAtprotoServerCreateAppPassword=x(Us);p.ComAtprotoServerCreateInviteCode=x(K_);p.ComAtprotoServerCreateInviteCodes=x(vp);p.ComAtprotoServerCreateSession=x(ys);p.ComAtprotoServerDeactivateAccount=x(M_);p.ComAtprotoServerDefs=x(su);p.ComAtprotoServerDeleteAccount=x(gs);p.ComAtprotoServerDeleteSession=x(N_);p.ComAtprotoServerDescribeServer=x(qa);p.ComAtprotoServerGetAccountInviteCodes=x(Pc);p.ComAtprotoServerGetServiceAuth=x(Lc);p.ComAtprotoServerGetSession=x(z_);p.ComAtprotoServerListAppPasswords=x($s);p.ComAtprotoServerRefreshSession=x(Dc);p.ComAtprotoServerRequestAccountDelete=x(F_);p.ComAtprotoServerRequestEmailConfirmation=x(q_);p.ComAtprotoServerRequestEmailUpdate=x(G_);p.ComAtprotoServerRequestPasswordReset=x(H_);p.ComAtprotoServerReserveSigningKey=x(W_);p.ComAtprotoServerResetPassword=x(bs);p.ComAtprotoServerRevokeAppPassword=x(X_);p.ComAtprotoServerUpdateEmail=x(vi);p.ComAtprotoSyncDefs=x(u$);p.ComAtprotoSyncGetBlob=x(Pr);p.ComAtprotoSyncGetBlocks=x(Lr);p.ComAtprotoSyncGetCheckout=x(J_);p.ComAtprotoSyncGetHead=x(jc);p.ComAtprotoSyncGetHostStatus=x(Oc);p.ComAtprotoSyncGetLatestCommit=x(mn);p.ComAtprotoSyncGetRecord=x(Dr);p.ComAtprotoSyncGetRepo=x(yn);p.ComAtprotoSyncGetRepoStatus=x($c);p.ComAtprotoSyncListBlobs=x(gn);p.ComAtprotoSyncListHosts=x(Ep);p.ComAtprotoSyncListRepos=x(wp);p.ComAtprotoSyncListReposByCollection=x(xp);p.ComAtprotoSyncNotifyOfUpdate=x(Z_);p.ComAtprotoSyncRequestCrawl=x(Vc);p.ComAtprotoSyncSubscribeRepos=x(zr);p.ComAtprotoTempAddReservedHandle=x(Q_);p.ComAtprotoTempCheckSignupQueue=x(Y_);p.ComAtprotoTempFetchLabels=x(eR);p.ComAtprotoTempRequestPhoneVerification=x(tR);p.AppBskyActorDefs=x(Q);p.AppBskyActorGetPreferences=x(rR);p.AppBskyActorGetProfile=x(nR);p.AppBskyActorGetProfiles=x(iR);p.AppBskyActorGetSuggestions=x(oR);p.AppBskyActorProfile=x(rb);p.AppBskyActorPutPreferences=x(sR);p.AppBskyActorSearchActors=x(aR);p.AppBskyActorSearchActorsTypeahead=x(lR);p.AppBskyActorStatus=x(cu);p.AppBskyEmbedDefs=x(nb);p.AppBskyEmbedExternal=x(Bi);p.AppBskyEmbedImages=x(Ii);p.AppBskyEmbedRecord=x(Fr);p.AppBskyEmbedRecordWithMedia=x(fu);p.AppBskyEmbedVideo=x(Ms);p.AppBskyFeedDefs=x(H);p.AppBskyFeedDescribeFeedGenerator=x(Ga);p.AppBskyFeedGenerator=x(ub);p.AppBskyFeedGetActorFeeds=x(fR);p.AppBskyFeedGetActorLikes=x(vs);p.AppBskyFeedGetAuthorFeed=x(Es);p.AppBskyFeedGetFeed=x(Kc);p.AppBskyFeedGetFeedGenerator=x(pR);p.AppBskyFeedGetFeedGenerators=x(hR);p.AppBskyFeedGetFeedSkeleton=x(Mc);p.AppBskyFeedGetLikes=x(_p);p.AppBskyFeedGetListFeed=x(Nc);p.AppBskyFeedGetPosts=x(mR);p.AppBskyFeedGetPostThread=x(zc);p.AppBskyFeedGetQuotes=x(yR);p.AppBskyFeedGetRepostedBy=x(gR);p.AppBskyFeedGetSuggestedFeeds=x(bR);p.AppBskyFeedGetTimeline=x(vR);p.AppBskyFeedLike=x(db);p.AppBskyFeedPost=x(ji);p.AppBskyFeedPostgate=x(hu);p.AppBskyFeedRepost=x(mb);p.AppBskyFeedSearchPosts=x(Fc);p.AppBskyFeedSendInteractions=x(ER);p.AppBskyFeedThreadgate=x(kn);p.AppBskyGraphBlock=x(yb);p.AppBskyGraphDefs=x(et);p.AppBskyGraphFollow=x(gb);p.AppBskyGraphGetActorStarterPacks=x(wR);p.AppBskyGraphGetBlocks=x(xR);p.AppBskyGraphGetFollowers=x(_R);p.AppBskyGraphGetFollows=x(RR);p.AppBskyGraphGetKnownFollowers=x(AR);p.AppBskyGraphGetList=x(SR);p.AppBskyGraphGetListBlocks=x(CR);p.AppBskyGraphGetListMutes=x(TR);p.AppBskyGraphGetLists=x(kR);p.AppBskyGraphGetMutes=x(PR);p.AppBskyGraphGetRelationships=x(qc);p.AppBskyGraphGetStarterPack=x(LR);p.AppBskyGraphGetStarterPacks=x(DR);p.AppBskyGraphGetSuggestedFollowsByActor=x(BR);p.AppBskyGraphList=x(bb);p.AppBskyGraphListblock=x(vb);p.AppBskyGraphListitem=x(Eb);p.AppBskyGraphMuteActor=x(IR);p.AppBskyGraphMuteActorList=x(jR);p.AppBskyGraphMuteThread=x(OR);p.AppBskyGraphSearchStarterPacks=x(UR);p.AppBskyGraphStarterpack=x(mu);p.AppBskyGraphUnmuteActor=x($R);p.AppBskyGraphUnmuteActorList=x(VR);p.AppBskyGraphUnmuteThread=x(KR);p.AppBskyGraphVerification=x(xb);p.AppBskyLabelerDefs=x(Ui);p.AppBskyLabelerGetServices=x(MR);p.AppBskyLabelerService=x(Ab);p.AppBskyNotificationDefs=x(Pn);p.AppBskyNotificationGetPreferences=x(NR);p.AppBskyNotificationGetUnreadCount=x(zR);p.AppBskyNotificationListNotifications=x(Tp);p.AppBskyNotificationPutPreferences=x(FR);p.AppBskyNotificationPutPreferencesV2=x(qR);p.AppBskyNotificationRegisterPush=x(GR);p.AppBskyNotificationUpdateSeen=x(HR);p.AppBskyRichtextFacet=x(Ln);p.AppBskyUnspeccedDefs=x(dt);p.AppBskyUnspeccedGetConfig=x(Lp);p.AppBskyUnspeccedGetPopularFeedGenerators=x(WR);p.AppBskyUnspeccedGetPostThreadOtherV2=x(Dp);p.AppBskyUnspeccedGetPostThreadV2=x(Bp);p.AppBskyUnspeccedGetSuggestedFeeds=x(XR);p.AppBskyUnspeccedGetSuggestedFeedsSkeleton=x(JR);p.AppBskyUnspeccedGetSuggestedStarterPacks=x(ZR);p.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=x(QR);p.AppBskyUnspeccedGetSuggestedUsers=x(YR);p.AppBskyUnspeccedGetSuggestedUsersSkeleton=x(eA);p.AppBskyUnspeccedGetSuggestionsSkeleton=x(tA);p.AppBskyUnspeccedGetTaggedSuggestions=x(Ip);p.AppBskyUnspeccedGetTrendingTopics=x(rA);p.AppBskyUnspeccedGetTrends=x(nA);p.AppBskyUnspeccedGetTrendsSkeleton=x(iA);p.AppBskyUnspeccedSearchActorsSkeleton=x(Gc);p.AppBskyUnspeccedSearchPostsSkeleton=x(Hc);p.AppBskyUnspeccedSearchStarterPacksSkeleton=x(Wc);p.AppBskyVideoDefs=x(Sb);p.AppBskyVideoGetJobStatus=x(oA);p.AppBskyVideoGetUploadLimits=x(sA);p.AppBskyVideoUploadVideo=x(aA);p.ChatBskyActorDeclaration=x(Cb);p.ChatBskyActorDefs=x(Tb);p.ChatBskyActorDeleteAccount=x(lA);p.ChatBskyActorExportAccountData=x(cA);p.ChatBskyConvoAcceptConvo=x(uA);p.ChatBskyConvoAddReaction=x(Ei);p.ChatBskyConvoDefs=x(ve);p.ChatBskyConvoDeleteMessageForSelf=x(dA);p.ChatBskyConvoGetConvo=x(fA);p.ChatBskyConvoGetConvoAvailability=x(pA);p.ChatBskyConvoGetConvoForMembers=x(hA);p.ChatBskyConvoGetLog=x(mA);p.ChatBskyConvoGetMessages=x(yA);p.ChatBskyConvoLeaveConvo=x(gA);p.ChatBskyConvoListConvos=x(bA);p.ChatBskyConvoMuteConvo=x(vA);p.ChatBskyConvoRemoveReaction=x(ws);p.ChatBskyConvoSendMessage=x(EA);p.ChatBskyConvoSendMessageBatch=x(jp);p.ChatBskyConvoUnmuteConvo=x(wA);p.ChatBskyConvoUpdateAllRead=x(xA);p.ChatBskyConvoUpdateRead=x(_A);p.ChatBskyModerationGetActorMetadata=x(Op);p.ChatBskyModerationGetMessageContext=x(RA);p.ChatBskyModerationUpdateActorAccess=x(AA);p.ToolsOzoneCommunicationCreateTemplate=x(Xc);p.ToolsOzoneCommunicationDefs=x(kb);p.ToolsOzoneCommunicationDeleteTemplate=x(SA);p.ToolsOzoneCommunicationListTemplates=x(CA);p.ToolsOzoneCommunicationUpdateTemplate=x(Jc);p.ToolsOzoneHostingGetAccountHistory=x(xr);p.ToolsOzoneModerationDefs=x(V);p.ToolsOzoneModerationEmitEvent=x(Zc);p.ToolsOzoneModerationGetEvent=x(TA);p.ToolsOzoneModerationGetRecord=x(Qc);p.ToolsOzoneModerationGetRecords=x(kA);p.ToolsOzoneModerationGetRepo=x(Yc);p.ToolsOzoneModerationGetReporterStats=x(PA);p.ToolsOzoneModerationGetRepos=x(LA);p.ToolsOzoneModerationGetSubjects=x(DA);p.ToolsOzoneModerationQueryEvents=x(BA);p.ToolsOzoneModerationQueryStatuses=x(IA);p.ToolsOzoneModerationSearchRepos=x(jA);p.ToolsOzoneServerGetConfig=x(Ha);p.ToolsOzoneSetAddValues=x(OA);p.ToolsOzoneSetDefs=x(bu);p.ToolsOzoneSetDeleteSet=x(eu);p.ToolsOzoneSetDeleteValues=x(tu);p.ToolsOzoneSetGetValues=x(ru);p.ToolsOzoneSetQuerySets=x(UA);p.ToolsOzoneSetUpsertSet=x($A);p.ToolsOzoneSettingDefs=x(Db);p.ToolsOzoneSettingListOptions=x(VA);p.ToolsOzoneSettingRemoveOptions=x(KA);p.ToolsOzoneSettingUpsertOption=x(MA);p.ToolsOzoneSignatureDefs=x(Bb);p.ToolsOzoneSignatureFindCorrelation=x(NA);p.ToolsOzoneSignatureFindRelatedAccounts=x(Up);p.ToolsOzoneSignatureSearchAccounts=x(zA);p.ToolsOzoneTeamAddMember=x(nu);p.ToolsOzoneTeamDefs=x(bn);p.ToolsOzoneTeamDeleteMember=x(xs);p.ToolsOzoneTeamListMembers=x(FA);p.ToolsOzoneTeamUpdateMember=x(iu);p.ToolsOzoneVerificationDefs=x(Ib);p.ToolsOzoneVerificationGrantVerifications=x(Wa);p.ToolsOzoneVerificationListVerifications=x(qA);p.ToolsOzoneVerificationRevokeVerifications=x($p);p.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"};p.APP_BSKY_ACTOR={StatusLive:"app.bsky.actor.status#live"};p.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"};p.APP_BSKY_GRAPH={DefsModlist:"app.bsky.graph.defs#modlist",DefsCuratelist:"app.bsky.graph.defs#curatelist",DefsReferencelist:"app.bsky.graph.defs#referencelist"};p.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"};p.TOOLS_OZONE_TEAM={DefsRoleAdmin:"tools.ozone.team.defs#roleAdmin",DefsRoleModerator:"tools.ozone.team.defs#roleModerator",DefsRoleTriage:"tools.ozone.team.defs#roleTriage",DefsRoleVerifier:"tools.ozone.team.defs#roleVerifier"};class lRe extends s_e.XrpcClient{constructor(e){super(e,a_e.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 u2(this),this.app=new x2(this),this.chat=new X2(this),this.tools=new t3(this)}get xrpc(){return this}}p.AtpBaseClient=lRe;class u2{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 d2(e)}}p.ComNS=u2;class d2{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 f2(e),this.identity=new p2(e),this.label=new h2(e),this.lexicon=new m2(e),this.moderation=new g2(e),this.repo=new b2(e),this.server=new v2(e),this.sync=new E2(e),this.temp=new w2(e)}}p.ComAtprotoNS=d2;class f2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}deleteAccount(e,r){return this._client.call("com.atproto.admin.deleteAccount",r==null?void 0:r.qp,e,r)}disableAccountInvites(e,r){return this._client.call("com.atproto.admin.disableAccountInvites",r==null?void 0:r.qp,e,r)}disableInviteCodes(e,r){return this._client.call("com.atproto.admin.disableInviteCodes",r==null?void 0:r.qp,e,r)}enableAccountInvites(e,r){return this._client.call("com.atproto.admin.enableAccountInvites",r==null?void 0:r.qp,e,r)}getAccountInfo(e,r){return this._client.call("com.atproto.admin.getAccountInfo",e,void 0,r)}getAccountInfos(e,r){return this._client.call("com.atproto.admin.getAccountInfos",e,void 0,r)}getInviteCodes(e,r){return this._client.call("com.atproto.admin.getInviteCodes",e,void 0,r)}getSubjectStatus(e,r){return this._client.call("com.atproto.admin.getSubjectStatus",e,void 0,r)}searchAccounts(e,r){return this._client.call("com.atproto.admin.searchAccounts",e,void 0,r)}sendEmail(e,r){return this._client.call("com.atproto.admin.sendEmail",r==null?void 0:r.qp,e,r)}updateAccountEmail(e,r){return this._client.call("com.atproto.admin.updateAccountEmail",r==null?void 0:r.qp,e,r)}updateAccountHandle(e,r){return this._client.call("com.atproto.admin.updateAccountHandle",r==null?void 0:r.qp,e,r)}updateAccountPassword(e,r){return this._client.call("com.atproto.admin.updateAccountPassword",r==null?void 0:r.qp,e,r)}updateAccountSigningKey(e,r){return this._client.call("com.atproto.admin.updateAccountSigningKey",r==null?void 0:r.qp,e,r)}updateSubjectStatus(e,r){return this._client.call("com.atproto.admin.updateSubjectStatus",r==null?void 0:r.qp,e,r)}}p.ComAtprotoAdminNS=f2;class p2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getRecommendedDidCredentials(e,r){return this._client.call("com.atproto.identity.getRecommendedDidCredentials",e,void 0,r)}refreshIdentity(e,r){return this._client.call("com.atproto.identity.refreshIdentity",r==null?void 0:r.qp,e,r).catch(n=>{throw l_e.toKnownErr(n)})}requestPlcOperationSignature(e,r){return this._client.call("com.atproto.identity.requestPlcOperationSignature",r==null?void 0:r.qp,e,r)}resolveDid(e,r){return this._client.call("com.atproto.identity.resolveDid",e,void 0,r).catch(n=>{throw c_e.toKnownErr(n)})}resolveHandle(e,r){return this._client.call("com.atproto.identity.resolveHandle",e,void 0,r).catch(n=>{throw u_e.toKnownErr(n)})}resolveIdentity(e,r){return this._client.call("com.atproto.identity.resolveIdentity",e,void 0,r).catch(n=>{throw d_e.toKnownErr(n)})}signPlcOperation(e,r){return this._client.call("com.atproto.identity.signPlcOperation",r==null?void 0:r.qp,e,r)}submitPlcOperation(e,r){return this._client.call("com.atproto.identity.submitPlcOperation",r==null?void 0:r.qp,e,r)}updateHandle(e,r){return this._client.call("com.atproto.identity.updateHandle",r==null?void 0:r.qp,e,r)}}p.ComAtprotoIdentityNS=p2;class h2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}queryLabels(e,r){return this._client.call("com.atproto.label.queryLabels",e,void 0,r)}}p.ComAtprotoLabelNS=h2;class m2{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 y2(e)}}p.ComAtprotoLexiconNS=m2;class y2{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,r,n){const i="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.atproto.lexicon.schema",...e},{headers:r})}}p.ComAtprotoLexiconSchemaRecord=y2;class g2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createReport(e,r){return this._client.call("com.atproto.moderation.createReport",r==null?void 0:r.qp,e,r)}}p.ComAtprotoModerationNS=g2;class b2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}applyWrites(e,r){return this._client.call("com.atproto.repo.applyWrites",r==null?void 0:r.qp,e,r).catch(n=>{throw f_e.toKnownErr(n)})}createRecord(e,r){return this._client.call("com.atproto.repo.createRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw p_e.toKnownErr(n)})}deleteRecord(e,r){return this._client.call("com.atproto.repo.deleteRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw h_e.toKnownErr(n)})}describeRepo(e,r){return this._client.call("com.atproto.repo.describeRepo",e,void 0,r)}getRecord(e,r){return this._client.call("com.atproto.repo.getRecord",e,void 0,r).catch(n=>{throw m_e.toKnownErr(n)})}importRepo(e,r){return this._client.call("com.atproto.repo.importRepo",r==null?void 0:r.qp,e,r)}listMissingBlobs(e,r){return this._client.call("com.atproto.repo.listMissingBlobs",e,void 0,r)}listRecords(e,r){return this._client.call("com.atproto.repo.listRecords",e,void 0,r)}putRecord(e,r){return this._client.call("com.atproto.repo.putRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw y_e.toKnownErr(n)})}uploadBlob(e,r){return this._client.call("com.atproto.repo.uploadBlob",r==null?void 0:r.qp,e,r)}}p.ComAtprotoRepoNS=b2;class v2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}activateAccount(e,r){return this._client.call("com.atproto.server.activateAccount",r==null?void 0:r.qp,e,r)}checkAccountStatus(e,r){return this._client.call("com.atproto.server.checkAccountStatus",e,void 0,r)}confirmEmail(e,r){return this._client.call("com.atproto.server.confirmEmail",r==null?void 0:r.qp,e,r).catch(n=>{throw g_e.toKnownErr(n)})}createAccount(e,r){return this._client.call("com.atproto.server.createAccount",r==null?void 0:r.qp,e,r).catch(n=>{throw b_e.toKnownErr(n)})}createAppPassword(e,r){return this._client.call("com.atproto.server.createAppPassword",r==null?void 0:r.qp,e,r).catch(n=>{throw v_e.toKnownErr(n)})}createInviteCode(e,r){return this._client.call("com.atproto.server.createInviteCode",r==null?void 0:r.qp,e,r)}createInviteCodes(e,r){return this._client.call("com.atproto.server.createInviteCodes",r==null?void 0:r.qp,e,r)}createSession(e,r){return this._client.call("com.atproto.server.createSession",r==null?void 0:r.qp,e,r).catch(n=>{throw E_e.toKnownErr(n)})}deactivateAccount(e,r){return this._client.call("com.atproto.server.deactivateAccount",r==null?void 0:r.qp,e,r)}deleteAccount(e,r){return this._client.call("com.atproto.server.deleteAccount",r==null?void 0:r.qp,e,r).catch(n=>{throw w_e.toKnownErr(n)})}deleteSession(e,r){return this._client.call("com.atproto.server.deleteSession",r==null?void 0:r.qp,e,r)}describeServer(e,r){return this._client.call("com.atproto.server.describeServer",e,void 0,r)}getAccountInviteCodes(e,r){return this._client.call("com.atproto.server.getAccountInviteCodes",e,void 0,r).catch(n=>{throw x_e.toKnownErr(n)})}getServiceAuth(e,r){return this._client.call("com.atproto.server.getServiceAuth",e,void 0,r).catch(n=>{throw __e.toKnownErr(n)})}getSession(e,r){return this._client.call("com.atproto.server.getSession",e,void 0,r)}listAppPasswords(e,r){return this._client.call("com.atproto.server.listAppPasswords",e,void 0,r).catch(n=>{throw R_e.toKnownErr(n)})}refreshSession(e,r){return this._client.call("com.atproto.server.refreshSession",r==null?void 0:r.qp,e,r).catch(n=>{throw A_e.toKnownErr(n)})}requestAccountDelete(e,r){return this._client.call("com.atproto.server.requestAccountDelete",r==null?void 0:r.qp,e,r)}requestEmailConfirmation(e,r){return this._client.call("com.atproto.server.requestEmailConfirmation",r==null?void 0:r.qp,e,r)}requestEmailUpdate(e,r){return this._client.call("com.atproto.server.requestEmailUpdate",r==null?void 0:r.qp,e,r)}requestPasswordReset(e,r){return this._client.call("com.atproto.server.requestPasswordReset",r==null?void 0:r.qp,e,r)}reserveSigningKey(e,r){return this._client.call("com.atproto.server.reserveSigningKey",r==null?void 0:r.qp,e,r)}resetPassword(e,r){return this._client.call("com.atproto.server.resetPassword",r==null?void 0:r.qp,e,r).catch(n=>{throw S_e.toKnownErr(n)})}revokeAppPassword(e,r){return this._client.call("com.atproto.server.revokeAppPassword",r==null?void 0:r.qp,e,r)}updateEmail(e,r){return this._client.call("com.atproto.server.updateEmail",r==null?void 0:r.qp,e,r).catch(n=>{throw C_e.toKnownErr(n)})}}p.ComAtprotoServerNS=v2;class E2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getBlob(e,r){return this._client.call("com.atproto.sync.getBlob",e,void 0,r).catch(n=>{throw T_e.toKnownErr(n)})}getBlocks(e,r){return this._client.call("com.atproto.sync.getBlocks",e,void 0,r).catch(n=>{throw k_e.toKnownErr(n)})}getCheckout(e,r){return this._client.call("com.atproto.sync.getCheckout",e,void 0,r)}getHead(e,r){return this._client.call("com.atproto.sync.getHead",e,void 0,r).catch(n=>{throw P_e.toKnownErr(n)})}getHostStatus(e,r){return this._client.call("com.atproto.sync.getHostStatus",e,void 0,r).catch(n=>{throw L_e.toKnownErr(n)})}getLatestCommit(e,r){return this._client.call("com.atproto.sync.getLatestCommit",e,void 0,r).catch(n=>{throw D_e.toKnownErr(n)})}getRecord(e,r){return this._client.call("com.atproto.sync.getRecord",e,void 0,r).catch(n=>{throw B_e.toKnownErr(n)})}getRepo(e,r){return this._client.call("com.atproto.sync.getRepo",e,void 0,r).catch(n=>{throw I_e.toKnownErr(n)})}getRepoStatus(e,r){return this._client.call("com.atproto.sync.getRepoStatus",e,void 0,r).catch(n=>{throw j_e.toKnownErr(n)})}listBlobs(e,r){return this._client.call("com.atproto.sync.listBlobs",e,void 0,r).catch(n=>{throw O_e.toKnownErr(n)})}listHosts(e,r){return this._client.call("com.atproto.sync.listHosts",e,void 0,r)}listRepos(e,r){return this._client.call("com.atproto.sync.listRepos",e,void 0,r)}listReposByCollection(e,r){return this._client.call("com.atproto.sync.listReposByCollection",e,void 0,r)}notifyOfUpdate(e,r){return this._client.call("com.atproto.sync.notifyOfUpdate",r==null?void 0:r.qp,e,r)}requestCrawl(e,r){return this._client.call("com.atproto.sync.requestCrawl",r==null?void 0:r.qp,e,r).catch(n=>{throw U_e.toKnownErr(n)})}}p.ComAtprotoSyncNS=E2;class w2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addReservedHandle(e,r){return this._client.call("com.atproto.temp.addReservedHandle",r==null?void 0:r.qp,e,r)}checkSignupQueue(e,r){return this._client.call("com.atproto.temp.checkSignupQueue",e,void 0,r)}fetchLabels(e,r){return this._client.call("com.atproto.temp.fetchLabels",e,void 0,r)}requestPhoneVerification(e,r){return this._client.call("com.atproto.temp.requestPhoneVerification",r==null?void 0:r.qp,e,r)}}p.ComAtprotoTempNS=w2;class x2{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 _2(e)}}p.AppNS=x2;class _2{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 R2(e),this.embed=new C2(e),this.feed=new T2(e),this.graph=new j2(e),this.labeler=new z2(e),this.notification=new q2(e),this.richtext=new G2(e),this.unspecced=new H2(e),this.video=new W2(e)}}p.AppBskyNS=_2;class R2{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}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.profile=new A2(e),this.status=new S2(e)}getPreferences(e,r){return this._client.call("app.bsky.actor.getPreferences",e,void 0,r)}getProfile(e,r){return this._client.call("app.bsky.actor.getProfile",e,void 0,r)}getProfiles(e,r){return this._client.call("app.bsky.actor.getProfiles",e,void 0,r)}getSuggestions(e,r){return this._client.call("app.bsky.actor.getSuggestions",e,void 0,r)}putPreferences(e,r){return this._client.call("app.bsky.actor.putPreferences",r==null?void 0:r.qp,e,r)}searchActors(e,r){return this._client.call("app.bsky.actor.searchActors",e,void 0,r)}searchActorsTypeahead(e,r){return this._client.call("app.bsky.actor.searchActorsTypeahead",e,void 0,r)}}p.AppBskyActorNS=R2;class A2{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,r,n){const i="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.profile",...e},{headers:r})}}p.AppBskyActorProfileRecord=A2;class S2{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.status",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.status",...e})).data}async create(e,r,n){const i="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.status",...e},{headers:r})}}p.AppBskyActorStatusRecord=S2;class C2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}p.AppBskyEmbedNS=C2;class T2{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 k2(e),this.like=new P2(e),this.post=new L2(e),this.postgate=new D2(e),this.repost=new B2(e),this.threadgate=new I2(e)}describeFeedGenerator(e,r){return this._client.call("app.bsky.feed.describeFeedGenerator",e,void 0,r)}getActorFeeds(e,r){return this._client.call("app.bsky.feed.getActorFeeds",e,void 0,r)}getActorLikes(e,r){return this._client.call("app.bsky.feed.getActorLikes",e,void 0,r).catch(n=>{throw $_e.toKnownErr(n)})}getAuthorFeed(e,r){return this._client.call("app.bsky.feed.getAuthorFeed",e,void 0,r).catch(n=>{throw V_e.toKnownErr(n)})}getFeed(e,r){return this._client.call("app.bsky.feed.getFeed",e,void 0,r).catch(n=>{throw K_e.toKnownErr(n)})}getFeedGenerator(e,r){return this._client.call("app.bsky.feed.getFeedGenerator",e,void 0,r)}getFeedGenerators(e,r){return this._client.call("app.bsky.feed.getFeedGenerators",e,void 0,r)}getFeedSkeleton(e,r){return this._client.call("app.bsky.feed.getFeedSkeleton",e,void 0,r).catch(n=>{throw M_e.toKnownErr(n)})}getLikes(e,r){return this._client.call("app.bsky.feed.getLikes",e,void 0,r)}getListFeed(e,r){return this._client.call("app.bsky.feed.getListFeed",e,void 0,r).catch(n=>{throw N_e.toKnownErr(n)})}getPosts(e,r){return this._client.call("app.bsky.feed.getPosts",e,void 0,r)}getPostThread(e,r){return this._client.call("app.bsky.feed.getPostThread",e,void 0,r).catch(n=>{throw z_e.toKnownErr(n)})}getQuotes(e,r){return this._client.call("app.bsky.feed.getQuotes",e,void 0,r)}getRepostedBy(e,r){return this._client.call("app.bsky.feed.getRepostedBy",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.feed.getSuggestedFeeds",e,void 0,r)}getTimeline(e,r){return this._client.call("app.bsky.feed.getTimeline",e,void 0,r)}searchPosts(e,r){return this._client.call("app.bsky.feed.searchPosts",e,void 0,r).catch(n=>{throw F_e.toKnownErr(n)})}sendInteractions(e,r){return this._client.call("app.bsky.feed.sendInteractions",r==null?void 0:r.qp,e,r)}}p.AppBskyFeedNS=T2;class k2{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,r,n){const i="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.generator",...e},{headers:r})}}p.AppBskyFeedGeneratorRecord=k2;class P2{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,r,n){const i="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.like",...e},{headers:r})}}p.AppBskyFeedLikeRecord=P2;class L2{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,r,n){const i="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.post",...e},{headers:r})}}p.AppBskyFeedPostRecord=L2;class D2{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,r,n){const i="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.postgate",...e},{headers:r})}}p.AppBskyFeedPostgateRecord=D2;class B2{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,r,n){const i="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.repost",...e},{headers:r})}}p.AppBskyFeedRepostRecord=B2;class I2{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,r,n){const i="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.threadgate",...e},{headers:r})}}p.AppBskyFeedThreadgateRecord=I2;class j2{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}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.block=new O2(e),this.follow=new U2(e),this.list=new $2(e),this.listblock=new V2(e),this.listitem=new K2(e),this.starterpack=new M2(e),this.verification=new N2(e)}getActorStarterPacks(e,r){return this._client.call("app.bsky.graph.getActorStarterPacks",e,void 0,r)}getBlocks(e,r){return this._client.call("app.bsky.graph.getBlocks",e,void 0,r)}getFollowers(e,r){return this._client.call("app.bsky.graph.getFollowers",e,void 0,r)}getFollows(e,r){return this._client.call("app.bsky.graph.getFollows",e,void 0,r)}getKnownFollowers(e,r){return this._client.call("app.bsky.graph.getKnownFollowers",e,void 0,r)}getList(e,r){return this._client.call("app.bsky.graph.getList",e,void 0,r)}getListBlocks(e,r){return this._client.call("app.bsky.graph.getListBlocks",e,void 0,r)}getListMutes(e,r){return this._client.call("app.bsky.graph.getListMutes",e,void 0,r)}getLists(e,r){return this._client.call("app.bsky.graph.getLists",e,void 0,r)}getMutes(e,r){return this._client.call("app.bsky.graph.getMutes",e,void 0,r)}getRelationships(e,r){return this._client.call("app.bsky.graph.getRelationships",e,void 0,r).catch(n=>{throw q_e.toKnownErr(n)})}getStarterPack(e,r){return this._client.call("app.bsky.graph.getStarterPack",e,void 0,r)}getStarterPacks(e,r){return this._client.call("app.bsky.graph.getStarterPacks",e,void 0,r)}getSuggestedFollowsByActor(e,r){return this._client.call("app.bsky.graph.getSuggestedFollowsByActor",e,void 0,r)}muteActor(e,r){return this._client.call("app.bsky.graph.muteActor",r==null?void 0:r.qp,e,r)}muteActorList(e,r){return this._client.call("app.bsky.graph.muteActorList",r==null?void 0:r.qp,e,r)}muteThread(e,r){return this._client.call("app.bsky.graph.muteThread",r==null?void 0:r.qp,e,r)}searchStarterPacks(e,r){return this._client.call("app.bsky.graph.searchStarterPacks",e,void 0,r)}unmuteActor(e,r){return this._client.call("app.bsky.graph.unmuteActor",r==null?void 0:r.qp,e,r)}unmuteActorList(e,r){return this._client.call("app.bsky.graph.unmuteActorList",r==null?void 0:r.qp,e,r)}unmuteThread(e,r){return this._client.call("app.bsky.graph.unmuteThread",r==null?void 0:r.qp,e,r)}}p.AppBskyGraphNS=j2;class O2{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,r,n){const i="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.block",...e},{headers:r})}}p.AppBskyGraphBlockRecord=O2;class U2{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,r,n){const i="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.follow",...e},{headers:r})}}p.AppBskyGraphFollowRecord=U2;class $2{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,r,n){const i="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.list",...e},{headers:r})}}p.AppBskyGraphListRecord=$2;class V2{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,r,n){const i="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listblock",...e},{headers:r})}}p.AppBskyGraphListblockRecord=V2;class K2{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,r,n){const i="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listitem",...e},{headers:r})}}p.AppBskyGraphListitemRecord=K2;class M2{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,r,n){const i="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.starterpack",...e},{headers:r})}}p.AppBskyGraphStarterpackRecord=M2;class N2{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.verification",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.verification",...e})).data}async create(e,r,n){const i="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.verification",...e},{headers:r})}}p.AppBskyGraphVerificationRecord=N2;class z2{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 F2(e)}getServices(e,r){return this._client.call("app.bsky.labeler.getServices",e,void 0,r)}}p.AppBskyLabelerNS=z2;class F2{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,r,n){const i="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.labeler.service",...e},{headers:r})}}p.AppBskyLabelerServiceRecord=F2;class q2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getPreferences(e,r){return this._client.call("app.bsky.notification.getPreferences",e,void 0,r)}getUnreadCount(e,r){return this._client.call("app.bsky.notification.getUnreadCount",e,void 0,r)}listNotifications(e,r){return this._client.call("app.bsky.notification.listNotifications",e,void 0,r)}putPreferences(e,r){return this._client.call("app.bsky.notification.putPreferences",r==null?void 0:r.qp,e,r)}putPreferencesV2(e,r){return this._client.call("app.bsky.notification.putPreferencesV2",r==null?void 0:r.qp,e,r)}registerPush(e,r){return this._client.call("app.bsky.notification.registerPush",r==null?void 0:r.qp,e,r)}updateSeen(e,r){return this._client.call("app.bsky.notification.updateSeen",r==null?void 0:r.qp,e,r)}}p.AppBskyNotificationNS=q2;class G2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}p.AppBskyRichtextNS=G2;class H2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,r){return this._client.call("app.bsky.unspecced.getConfig",e,void 0,r)}getPopularFeedGenerators(e,r){return this._client.call("app.bsky.unspecced.getPopularFeedGenerators",e,void 0,r)}getPostThreadOtherV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadOtherV2",e,void 0,r)}getPostThreadV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadV2",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeeds",e,void 0,r)}getSuggestedFeedsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeedsSkeleton",e,void 0,r)}getSuggestedStarterPacks(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacks",e,void 0,r)}getSuggestedStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacksSkeleton",e,void 0,r)}getSuggestedUsers(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsers",e,void 0,r)}getSuggestedUsersSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersSkeleton",e,void 0,r)}getSuggestionsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestionsSkeleton",e,void 0,r)}getTaggedSuggestions(e,r){return this._client.call("app.bsky.unspecced.getTaggedSuggestions",e,void 0,r)}getTrendingTopics(e,r){return this._client.call("app.bsky.unspecced.getTrendingTopics",e,void 0,r)}getTrends(e,r){return this._client.call("app.bsky.unspecced.getTrends",e,void 0,r)}getTrendsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getTrendsSkeleton",e,void 0,r)}searchActorsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchActorsSkeleton",e,void 0,r).catch(n=>{throw G_e.toKnownErr(n)})}searchPostsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchPostsSkeleton",e,void 0,r).catch(n=>{throw H_e.toKnownErr(n)})}searchStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchStarterPacksSkeleton",e,void 0,r).catch(n=>{throw W_e.toKnownErr(n)})}}p.AppBskyUnspeccedNS=H2;class W2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getJobStatus(e,r){return this._client.call("app.bsky.video.getJobStatus",e,void 0,r)}getUploadLimits(e,r){return this._client.call("app.bsky.video.getUploadLimits",e,void 0,r)}uploadVideo(e,r){return this._client.call("app.bsky.video.uploadVideo",r==null?void 0:r.qp,e,r)}}p.AppBskyVideoNS=W2;class X2{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 J2(e)}}p.ChatNS=X2;class J2{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 Z2(e),this.convo=new Y2(e),this.moderation=new e3(e)}}p.ChatBskyNS=J2;class Z2{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 Q2(e)}deleteAccount(e,r){return this._client.call("chat.bsky.actor.deleteAccount",r==null?void 0:r.qp,e,r)}exportAccountData(e,r){return this._client.call("chat.bsky.actor.exportAccountData",e,void 0,r)}}p.ChatBskyActorNS=Z2;class Q2{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,r,n){const i="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"chat.bsky.actor.declaration",...e},{headers:r})}}p.ChatBskyActorDeclarationRecord=Q2;class Y2{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}acceptConvo(e,r){return this._client.call("chat.bsky.convo.acceptConvo",r==null?void 0:r.qp,e,r)}addReaction(e,r){return this._client.call("chat.bsky.convo.addReaction",r==null?void 0:r.qp,e,r).catch(n=>{throw X_e.toKnownErr(n)})}deleteMessageForSelf(e,r){return this._client.call("chat.bsky.convo.deleteMessageForSelf",r==null?void 0:r.qp,e,r)}getConvo(e,r){return this._client.call("chat.bsky.convo.getConvo",e,void 0,r)}getConvoAvailability(e,r){return this._client.call("chat.bsky.convo.getConvoAvailability",e,void 0,r)}getConvoForMembers(e,r){return this._client.call("chat.bsky.convo.getConvoForMembers",e,void 0,r)}getLog(e,r){return this._client.call("chat.bsky.convo.getLog",e,void 0,r)}getMessages(e,r){return this._client.call("chat.bsky.convo.getMessages",e,void 0,r)}leaveConvo(e,r){return this._client.call("chat.bsky.convo.leaveConvo",r==null?void 0:r.qp,e,r)}listConvos(e,r){return this._client.call("chat.bsky.convo.listConvos",e,void 0,r)}muteConvo(e,r){return this._client.call("chat.bsky.convo.muteConvo",r==null?void 0:r.qp,e,r)}removeReaction(e,r){return this._client.call("chat.bsky.convo.removeReaction",r==null?void 0:r.qp,e,r).catch(n=>{throw J_e.toKnownErr(n)})}sendMessage(e,r){return this._client.call("chat.bsky.convo.sendMessage",r==null?void 0:r.qp,e,r)}sendMessageBatch(e,r){return this._client.call("chat.bsky.convo.sendMessageBatch",r==null?void 0:r.qp,e,r)}unmuteConvo(e,r){return this._client.call("chat.bsky.convo.unmuteConvo",r==null?void 0:r.qp,e,r)}updateAllRead(e,r){return this._client.call("chat.bsky.convo.updateAllRead",r==null?void 0:r.qp,e,r)}updateRead(e,r){return this._client.call("chat.bsky.convo.updateRead",r==null?void 0:r.qp,e,r)}}p.ChatBskyConvoNS=Y2;class e3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getActorMetadata(e,r){return this._client.call("chat.bsky.moderation.getActorMetadata",e,void 0,r)}getMessageContext(e,r){return this._client.call("chat.bsky.moderation.getMessageContext",e,void 0,r)}updateActorAccess(e,r){return this._client.call("chat.bsky.moderation.updateActorAccess",r==null?void 0:r.qp,e,r)}}p.ChatBskyModerationNS=e3;class t3{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 r3(e)}}p.ToolsNS=t3;class r3{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,"hosting",{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}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.communication=new n3(e),this.hosting=new i3(e),this.moderation=new o3(e),this.server=new s3(e),this.set=new a3(e),this.setting=new l3(e),this.signature=new c3(e),this.team=new u3(e),this.verification=new d3(e)}}p.ToolsOzoneNS=r3;class n3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createTemplate(e,r){return this._client.call("tools.ozone.communication.createTemplate",r==null?void 0:r.qp,e,r).catch(n=>{throw Z_e.toKnownErr(n)})}deleteTemplate(e,r){return this._client.call("tools.ozone.communication.deleteTemplate",r==null?void 0:r.qp,e,r)}listTemplates(e,r){return this._client.call("tools.ozone.communication.listTemplates",e,void 0,r)}updateTemplate(e,r){return this._client.call("tools.ozone.communication.updateTemplate",r==null?void 0:r.qp,e,r).catch(n=>{throw Q_e.toKnownErr(n)})}}p.ToolsOzoneCommunicationNS=n3;class i3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getAccountHistory(e,r){return this._client.call("tools.ozone.hosting.getAccountHistory",e,void 0,r)}}p.ToolsOzoneHostingNS=i3;class o3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}emitEvent(e,r){return this._client.call("tools.ozone.moderation.emitEvent",r==null?void 0:r.qp,e,r).catch(n=>{throw Y_e.toKnownErr(n)})}getEvent(e,r){return this._client.call("tools.ozone.moderation.getEvent",e,void 0,r)}getRecord(e,r){return this._client.call("tools.ozone.moderation.getRecord",e,void 0,r).catch(n=>{throw eRe.toKnownErr(n)})}getRecords(e,r){return this._client.call("tools.ozone.moderation.getRecords",e,void 0,r)}getRepo(e,r){return this._client.call("tools.ozone.moderation.getRepo",e,void 0,r).catch(n=>{throw tRe.toKnownErr(n)})}getReporterStats(e,r){return this._client.call("tools.ozone.moderation.getReporterStats",e,void 0,r)}getRepos(e,r){return this._client.call("tools.ozone.moderation.getRepos",e,void 0,r)}getSubjects(e,r){return this._client.call("tools.ozone.moderation.getSubjects",e,void 0,r)}queryEvents(e,r){return this._client.call("tools.ozone.moderation.queryEvents",e,void 0,r)}queryStatuses(e,r){return this._client.call("tools.ozone.moderation.queryStatuses",e,void 0,r)}searchRepos(e,r){return this._client.call("tools.ozone.moderation.searchRepos",e,void 0,r)}}p.ToolsOzoneModerationNS=o3;class s3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,r){return this._client.call("tools.ozone.server.getConfig",e,void 0,r)}}p.ToolsOzoneServerNS=s3;class a3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addValues(e,r){return this._client.call("tools.ozone.set.addValues",r==null?void 0:r.qp,e,r)}deleteSet(e,r){return this._client.call("tools.ozone.set.deleteSet",r==null?void 0:r.qp,e,r).catch(n=>{throw rRe.toKnownErr(n)})}deleteValues(e,r){return this._client.call("tools.ozone.set.deleteValues",r==null?void 0:r.qp,e,r).catch(n=>{throw nRe.toKnownErr(n)})}getValues(e,r){return this._client.call("tools.ozone.set.getValues",e,void 0,r).catch(n=>{throw iRe.toKnownErr(n)})}querySets(e,r){return this._client.call("tools.ozone.set.querySets",e,void 0,r)}upsertSet(e,r){return this._client.call("tools.ozone.set.upsertSet",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneSetNS=a3;class l3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}listOptions(e,r){return this._client.call("tools.ozone.setting.listOptions",e,void 0,r)}removeOptions(e,r){return this._client.call("tools.ozone.setting.removeOptions",r==null?void 0:r.qp,e,r)}upsertOption(e,r){return this._client.call("tools.ozone.setting.upsertOption",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneSettingNS=l3;class c3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}findCorrelation(e,r){return this._client.call("tools.ozone.signature.findCorrelation",e,void 0,r)}findRelatedAccounts(e,r){return this._client.call("tools.ozone.signature.findRelatedAccounts",e,void 0,r)}searchAccounts(e,r){return this._client.call("tools.ozone.signature.searchAccounts",e,void 0,r)}}p.ToolsOzoneSignatureNS=c3;class u3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addMember(e,r){return this._client.call("tools.ozone.team.addMember",r==null?void 0:r.qp,e,r).catch(n=>{throw oRe.toKnownErr(n)})}deleteMember(e,r){return this._client.call("tools.ozone.team.deleteMember",r==null?void 0:r.qp,e,r).catch(n=>{throw sRe.toKnownErr(n)})}listMembers(e,r){return this._client.call("tools.ozone.team.listMembers",e,void 0,r)}updateMember(e,r){return this._client.call("tools.ozone.team.updateMember",r==null?void 0:r.qp,e,r).catch(n=>{throw aRe.toKnownErr(n)})}}p.ToolsOzoneTeamNS=u3;class d3{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}grantVerifications(e,r){return this._client.call("tools.ozone.verification.grantVerifications",r==null?void 0:r.qp,e,r)}listVerifications(e,r){return this._client.call("tools.ozone.verification.listVerifications",e,void 0,r)}revokeVerifications(e,r){return this._client.call("tools.ozone.verification.revokeVerifications",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneVerificationNS=d3;var Wl={},GA={};const cRe=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.TAG_REGEX=Jn.TRAILING_PUNCTUATION_REGEX=Jn.URL_REGEX=Jn.MENTION_REGEX=void 0;Jn.MENTION_REGEX=/(^|\s|\()(@)([a-zA-Z0-9.-]+)(\b)/g;Jn.URL_REGEX=/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gim;Jn.TRAILING_PUNCTUATION_REGEX=new RegExp("\\p{P}+$","gu");Jn.TAG_REGEX=/(^|\s)[#]((?!\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;var uRe=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(GA,"__esModule",{value:!0});GA.detectFacets=fRe;const dRe=uRe(cRe),Bh=Jn;function fRe(t){var n;let e;const r=[];{const i=Bh.MENTION_REGEX;for(;e=i.exec(t.utf16);){if(!FC(e[3])&&!e[3].endsWith(".test"))continue;const o=t.utf16.indexOf(e[3],e.index)-1;r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(o),byteEnd:t.utf16IndexToUtf8Index(o+e[3].length+1)},features:[{$type:"app.bsky.richtext.facet#mention",did:e[3]}]})}}{const i=Bh.URL_REGEX;for(;e=i.exec(t.utf16);){let o=e[2];if(!o.startsWith("http")){const c=(n=e.groups)==null?void 0:n.domain;if(!c||!FC(c))continue;o=`https://${o}`}const s=t.utf16.indexOf(e[2],e.index),a={start:s,end:s+e[2].length};/[.,;:!?]$/.test(o)&&(o=o.slice(0,-1),a.end--),/[)]$/.test(o)&&!o.includes("(")&&(o=o.slice(0,-1),a.end--),r.push({index:{byteStart:t.utf16IndexToUtf8Index(a.start),byteEnd:t.utf16IndexToUtf8Index(a.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:o}]})}}{const i=Bh.TAG_REGEX;for(;e=i.exec(t.utf16);){const o=e[1];let s=e[2];if(!s||(s=s.trim().replace(Bh.TRAILING_PUNCTUATION_REGEX,""),s.length===0||s.length>64))continue;const a=e.index+o.length;r.push({index:{byteStart:t.utf16IndexToUtf8Index(a),byteEnd:t.utf16IndexToUtf8Index(a+1+s.length)},features:[{$type:"app.bsky.richtext.facet#tag",tag:s}]})}}return r.length>0?r:void 0}function FC(t){return!!dRe.default.find(e=>{const r=t.lastIndexOf(e);return r===-1?!1:t.charAt(r-1)==="."&&r===t.length-e.length})}var Ob={},Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.UnicodeString=void 0;const pRe=Pi,qC=new TextEncoder,hRe=new TextDecoder;class mRe{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=qC.encode(e)}get length(){return this.utf8.byteLength}get graphemeLength(){return this._graphemeLen||(this._graphemeLen=(0,pRe.graphemeLen)(this.utf16)),this._graphemeLen}slice(e,r){return hRe.decode(this.utf8.slice(e,r))}utf16IndexToUtf8Index(e){return qC.encode(this.utf16.slice(0,e)).byteLength}toString(){return this.utf16}}Eu.UnicodeString=mRe;Object.defineProperty(Ob,"__esModule",{value:!0});Ob.sanitizeRichText=vRe;const yRe=Eu,gRe=/[\r\n]([\u00AD\u2060\u200D\u200C\u200B\s]*[\r\n]){2,}/,bRe=`
`;function vRe(t,e){return e.cleanNewlines&&(t=ERe(t,gRe,bRe)),t}function ERe(t,e,r){t=t.clone();let n=t.unicodeText.utf16.match(e);for(;n&&typeof n.index<"u";){const i=t.unicodeText,o=t.unicodeText.utf16IndexToUtf8Index(n.index),s=o+new yRe.UnicodeString(n[0]).length;if(t.delete(o,s),t.unicodeText.utf16===i.utf16)break;t.insert(o,r),n=t.unicodeText.utf16.match(e)}return t}Object.defineProperty(Wl,"__esModule",{value:!0});Wl.RichText=Wl.RichTextSegment=void 0;const am=p,GC=GA,wRe=Ob,r0=Eu;class al{constructor(e,r){Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"facet",{enumerable:!0,configurable:!0,writable:!0,value:r})}get link(){var e;return(e=this.facet)==null?void 0:e.features.find(am.AppBskyRichtextFacet.isLink)}isLink(){return!!this.link}get mention(){var e;return(e=this.facet)==null?void 0:e.features.find(am.AppBskyRichtextFacet.isMention)}isMention(){return!!this.mention}get tag(){var e;return(e=this.facet)==null?void 0:e.features.find(am.AppBskyRichtextFacet.isTag)}isTag(){return!!this.tag}}Wl.RichTextSegment=al;class HA{constructor(e,r){var n,i;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 r0.UnicodeString(e.text),this.facets=e.facets,!((n=this.facets)!=null&&n.length)&&((i=e.entities)!=null&&i.length)&&(this.facets=_Re(this.unicodeText,e.entities)),this.facets&&(this.facets=this.facets.filter(xRe).sort(n0)),r!=null&&r.cleanNewlines&&(0,wRe.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 HA({text:this.unicodeText.utf16,facets:HC(this.facets)})}copyInto(e){e.unicodeText=this.unicodeText,e.facets=HC(this.facets)}*segments(){const e=this.facets||[];if(!e.length){yield new al(this.unicodeText.utf16);return}let r=0,n=0;do{const i=e[n];if(r<i.index.byteStart)yield new al(this.unicodeText.slice(r,i.index.byteStart));else if(r>i.index.byteStart){n++;continue}if(i.index.byteStart<i.index.byteEnd){const o=this.unicodeText.slice(i.index.byteStart,i.index.byteEnd);o.trim()?yield new al(o,i):yield new al(o)}r=i.index.byteEnd,n++}while(n<e.length);r<this.unicodeText.length&&(yield new al(this.unicodeText.slice(r,this.unicodeText.length)))}insert(e,r){var i;if(this.unicodeText=new r0.UnicodeString(this.unicodeText.slice(0,e)+r+this.unicodeText.slice(e)),!((i=this.facets)!=null&&i.length))return this;const n=r.length;for(const o of this.facets)e<=o.index.byteStart?(o.index.byteStart+=n,o.index.byteEnd+=n):e>=o.index.byteStart&&e<o.index.byteEnd&&(o.index.byteEnd+=n);return this}delete(e,r){var i;if(this.unicodeText=new r0.UnicodeString(this.unicodeText.slice(0,e)+this.unicodeText.slice(r)),!((i=this.facets)!=null&&i.length))return this;const n=r-e;for(const o of this.facets)e<=o.index.byteStart&&r>=o.index.byteEnd?(o.index.byteStart=0,o.index.byteEnd=0):e>o.index.byteEnd||(e>o.index.byteStart&&e<=o.index.byteEnd&&r>o.index.byteEnd?o.index.byteEnd=e:e>=o.index.byteStart&&r<=o.index.byteEnd?o.index.byteEnd-=n:e<o.index.byteStart&&r>=o.index.byteStart&&r<=o.index.byteEnd?(o.index.byteStart=e,o.index.byteEnd-=n):r<o.index.byteStart&&(o.index.byteStart-=n,o.index.byteEnd-=n));return this.facets=this.facets.filter(o=>o.index.byteStart<o.index.byteEnd),this}async detectFacets(e){if(this.facets=(0,GC.detectFacets)(this.unicodeText),this.facets){const r=[];for(const n of this.facets)for(const i of n.features)am.AppBskyRichtextFacet.isMention(i)&&r.push(e.com.atproto.identity.resolveHandle({handle:i.did}).then(o=>o==null?void 0:o.data.did).catch(o=>{}).then(o=>{i.did=o||""}));await Promise.allSettled(r),this.facets.sort(n0)}}detectFacetsWithoutResolution(){this.facets=(0,GC.detectFacets)(this.unicodeText),this.facets&&this.facets.sort(n0)}}Wl.RichText=HA;const n0=(t,e)=>t.index.byteStart-e.index.byteStart,xRe=t=>t.index.byteStart<=t.index.byteEnd;function _Re(t,e){const r=[];for(const n of e)n.type==="link"?r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(n.index.start),byteEnd:t.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:n.value}]}):n.type==="mention"&&r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(n.index.start),byteEnd:t.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#mention",did:n.value}]});return r}function HC(t){return typeof t>"u"?t:JSON.parse(JSON.stringify(t))}var WA={},ri={},_s={};Object.defineProperty(_s,"__esModule",{value:!0});_s.LABELS=_s.DEFAULT_LABEL_SETTINGS=void 0;_s.DEFAULT_LABEL_SETTINGS={porn:"hide",sexual:"warn",nudity:"ignore","graphic-media":"warn"};_s.LABELS={"!hide":{identifier:"!hide",configurable:!1,defaultSetting:"hide",flags:["no-override","no-self"],severity:"alert",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!warn":{identifier:"!warn",configurable:!1,defaultSetting:"warn",flags:["no-self"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!no-unauthenticated":{identifier:"!no-unauthenticated",configurable:!1,defaultSetting:"hide",flags:["no-override","unauthed"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},porn:{identifier:"porn",configurable:!0,defaultSetting:"hide",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},sexual:{identifier:"sexual",configurable:!0,defaultSetting:"warn",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},nudity:{identifier:"nudity",configurable:!0,defaultSetting:"ignore",flags:[],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},"graphic-media":{identifier:"graphic-media",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},gore:{identifier:"gore",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]}};var br={};Object.defineProperty(br,"__esModule",{value:!0});br.NOOP_BEHAVIOR=br.HIDE_BEHAVIOR=br.MUTEWORD_BEHAVIOR=br.MUTE_BEHAVIOR=br.BLOCK_BEHAVIOR=br.CUSTOM_LABEL_VALUE_RE=void 0;br.CUSTOM_LABEL_VALUE_RE=/^[a-z-]+$/;br.BLOCK_BEHAVIOR={profileList:"blur",profileView:"alert",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"};br.MUTE_BEHAVIOR={profileList:"inform",profileView:"alert",contentList:"blur",contentView:"inform"};br.MUTEWORD_BEHAVIOR={contentList:"blur",contentView:"blur"};br.HIDE_BEHAVIOR={contentList:"blur",contentView:"blur"};br.NOOP_BEHAVIOR={};var Vp={};Object.defineProperty(Vp,"__esModule",{value:!0});Vp.ModerationUI=void 0;class RRe{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 this.filters.length!==0}get blur(){return this.blurs.length!==0}get alert(){return this.alerts.length!==0}get inform(){return this.informs.length!==0}}Vp.ModerationUI=RRe;Object.defineProperty(ri,"__esModule",{value:!0});ri.ModerationDecision=void 0;const WC=_s,Sr=br,ARe=Vp;var Jo;(function(t){t[t.High=0]="High",t[t.Medium=1]="Medium",t[t.Low=2]="Low"})(Jo||(Jo={}));class XA{constructor(){Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"isMe",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"causes",{enumerable:!0,configurable:!0,writable:!0,value:[]})}static merge(...e){const r=e.filter(i=>i!=null),n=new XA;return r[0]&&(n.did=r[0].did,n.isMe=r[0].isMe),n.causes=r.flatMap(i=>i.causes),n}downgrade(){for(const e of this.causes)e.downgraded=!0;return this}get blocked(){return!!this.blockCause}get muted(){return!!this.muteCause}get blockCause(){return this.causes.find(e=>e.type==="blocking"||e.type==="blocked-by"||e.type==="block-other")}get muteCause(){return this.causes.find(e=>e.type==="muted")}get labelCauses(){return this.causes.filter(e=>e.type==="label")}ui(e){const r=new ARe.ModerationUI;for(const n of this.causes)if(n.type==="blocking"||n.type==="blocked-by"||n.type==="block-other"){if(this.isMe)continue;(e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Sr.BLOCK_BEHAVIOR[e]==="blur"?(r.noOverride=!0,r.blurs.push(n)):Sr.BLOCK_BEHAVIOR[e]==="alert"?r.alerts.push(n):Sr.BLOCK_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else if(n.type==="muted"){if(this.isMe)continue;(e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Sr.MUTE_BEHAVIOR[e]==="blur"?r.blurs.push(n):Sr.MUTE_BEHAVIOR[e]==="alert"?r.alerts.push(n):Sr.MUTE_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else if(n.type==="mute-word"){if(this.isMe)continue;e==="contentList"&&r.filters.push(n),n.downgraded||(Sr.MUTEWORD_BEHAVIOR[e]==="blur"?r.blurs.push(n):Sr.MUTEWORD_BEHAVIOR[e]==="alert"?r.alerts.push(n):Sr.MUTEWORD_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else n.type==="hidden"?((e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Sr.HIDE_BEHAVIOR[e]==="blur"?r.blurs.push(n):Sr.HIDE_BEHAVIOR[e]==="alert"?r.alerts.push(n):Sr.HIDE_BEHAVIOR[e]==="inform"&&r.informs.push(n))):n.type==="label"&&(e==="profileList"&&n.target==="account"?n.setting==="hide"&&!this.isMe&&r.filters.push(n):e==="contentList"&&(n.target==="account"||n.target==="content")&&n.setting==="hide"&&!this.isMe&&r.filters.push(n),n.downgraded||(n.behavior[e]==="blur"?(r.blurs.push(n),n.noOverride&&!this.isMe&&(r.noOverride=!0)):n.behavior[e]==="alert"?r.alerts.push(n):n.behavior[e]==="inform"&&r.informs.push(n)));return r.filters.sort(XC),r.blurs.sort(XC),r}setDid(e){this.did=e}setIsMe(e){this.isMe=e}addHidden(e){e&&this.causes.push({type:"hidden",source:{type:"user"},priority:6})}addMutedWord(e){e&&this.causes.push({type:"mute-word",source:{type:"user"},priority:6})}addBlocking(e){e&&this.causes.push({type:"blocking",source:{type:"user"},priority:3})}addBlockingByList(e){e&&this.causes.push({type:"blocking",source:{type:"list",list:e},priority:3})}addBlockedBy(e){e&&this.causes.push({type:"blocked-by",source:{type:"user"},priority:4})}addBlockOther(e){e&&this.causes.push({type:"block-other",source:{type:"user"},priority:4})}addLabel(e,r,n){var f,h;const i=Sr.CUSTOM_LABEL_VALUE_RE.test(r.val)&&((h=(f=n.labelDefs)==null?void 0:f[r.src])==null?void 0:h.find(m=>m.identifier===r.val))||WC.LABELS[r.val];if(!i)return;const o=r.src===this.did,s=o?void 0:n.prefs.labelers.find(m=>m.did===r.src);if(!o&&!s||o&&i.flags.includes("no-self"))return;let a=i.defaultSetting||"ignore";if(i.configurable?i.flags.includes("adult")&&!n.prefs.adultContentEnabled?a="hide":s!=null&&s.labels[i.identifier]?a=s==null?void 0:s.labels[i.identifier]:n.prefs.labels[i.identifier]&&(a=n.prefs.labels[i.identifier]):a=i.defaultSetting||"hide",a==="ignore"||i.flags.includes("unauthed")&&n.userDid)return;let c;const u=SRe(i.behaviors[e]);i.flags.includes("no-override")||i.flags.includes("adult")&&!n.prefs.adultContentEnabled?c=1:a==="hide"?c=2:u===Jo.High?c=5:u===Jo.Medium?c=7:c=8;let d=!1;(i.flags.includes("no-override")||i.flags.includes("adult")&&!n.prefs.adultContentEnabled)&&(d=!0),this.causes.push({type:"label",source:o||!s?{type:"user"}:{type:"labeler",did:s.did},label:r,labelDef:i,target:e,setting:a,behavior:i.behaviors[e]||Sr.NOOP_BEHAVIOR,noOverride:d,priority:c})}addMuted(e){e&&this.causes.push({type:"muted",source:{type:"user"},priority:6})}addMutedByList(e){e&&this.causes.push({type:"muted",source:{type:"list",list:e},priority:6})}}ri.ModerationDecision=XA;function SRe(t){return t?t.profileView==="blur"||t.contentView==="blur"?Jo.High:t.contentList==="blur"||t.contentMedia==="blur"?Jo.Medium:Jo.Low:Jo.Low}function XC(t,e){return t.priority-e.priority}var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.decideAccount=TRe;Gs.filterAccountLabels=f3;const CRe=ri;function TRe(t,e){var n,i,o,s,a,c,u,d,f;const r=new CRe.ModerationDecision;r.setDid(t.did),r.setIsMe(t.did===e.userDid),(n=t.viewer)!=null&&n.muted&&((i=t.viewer)!=null&&i.mutedByList?r.addMutedByList((o=t.viewer)==null?void 0:o.mutedByList):r.addMuted((s=t.viewer)==null?void 0:s.muted)),(a=t.viewer)!=null&&a.blocking&&((c=t.viewer)!=null&&c.blockingByList?r.addBlockingByList((u=t.viewer)==null?void 0:u.blockingByList):r.addBlocking((d=t.viewer)==null?void 0:d.blocking)),r.addBlockedBy((f=t.viewer)==null?void 0:f.blockedBy);for(const h of f3(t.labels))r.addLabel("account",h,e);return r}function f3(t){return t?t.filter(e=>!e.uri.endsWith("/app.bsky.actor.profile/self")||e.val==="!no-unauthenticated"):[]}var JA={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.decideProfile=PRe;Hs.filterProfileLabels=p3;const kRe=ri;function PRe(t,e){const r=new kRe.ModerationDecision;r.setDid(t.did),r.setIsMe(t.did===e.userDid);for(const n of p3(t.labels))r.addLabel("profile",n,e);return r}function p3(t){return t?t.filter(e=>e.uri.endsWith("/app.bsky.actor.profile/self")):[]}Object.defineProperty(JA,"__esModule",{value:!0});JA.decideFeedGenerator=BRe;const JC=ri,LRe=Gs,DRe=Hs;function BRe(t,e){var n;const r=new JC.ModerationDecision;if(r.setDid(t.creator.did),r.setIsMe(t.creator.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return JC.ModerationDecision.merge(r,(0,LRe.decideAccount)(t.creator,e),(0,DRe.decideProfile)(t.creator,e))}var ZA={};Object.defineProperty(ZA,"__esModule",{value:!0});ZA.decideNotification=ORe;const ZC=ri,IRe=Gs,jRe=Hs;function ORe(t,e){var n;const r=new ZC.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return ZC.ModerationDecision.merge(r,(0,IRe.decideAccount)(t.author,e),(0,jRe.decideProfile)(t.author,e))}var QA={},Ub={};Object.defineProperty(Ub,"__esModule",{value:!0});Ub.hasMutedWord=VRe;const URe=p,QC={LEADING_TRAILING_PUNCTUATION:new RegExp("(?:^\\p{P}+|\\p{P}+$)","gu"),WORD_BOUNDARY:/[\s\n\t\r\f\v]+?/g},$Re=["ja","zh","ko","th","vi"];function VRe({mutedWords:t,text:e,facets:r,outlineTags:n,languages:i,actor:o}){var c;const s=$Re.includes((i==null?void 0:i[0])||""),a=[].concat(n||[]).concat((r||[]).flatMap(u=>u.features.filter(URe.AppBskyRichtextFacet.isTag).map(d=>d.tag))).map(u=>u.toLowerCase());for(const u of t){const d=u.value.toLowerCase(),f=e.toLowerCase();if(u.expiresAt&&u.expiresAt<new Date().toISOString()||u.actorTarget==="exclude-following"&&((c=o==null?void 0:o.viewer)!=null&&c.following))continue;if(a.includes(d))return!0;if(!u.targets.includes("content"))continue;if((d.length===1||s)&&f.includes(d))return!0;if(d.length>f.length)continue;if(d===f||new RegExp("(?:\\s|\\p{P})+?","u").test(d)&&f.includes(d))return!0;const h=f.split(QC.WORD_BOUNDARY);for(const m of h){if(m===d)return!0;const g=m.replace(QC.LEADING_TRAILING_PUNCTUATION,"");if(d===g)return!0;if(!(d.length>g.length)&&new RegExp("\\p{P}+","u").test(g)){const v=g.replace(new RegExp("\\p{P}+","gu")," ");if(v===d||v.replace(/\s/gu,"")===d)return!0;const y=g.split(new RegExp("\\p{P}+","u"));for(const b of y)if(b===d)return!0}}}return!1}Object.defineProperty(QA,"__esModule",{value:!0});QA.decidePost=KRe;const Le=p,Yd=ri,On=Ub,h3=Gs,m3=Hs;function KRe(t,e){var r;return Yd.ModerationDecision.merge(MRe(t,e),(r=NRe(t.embed,e))==null?void 0:r.downgrade(),(0,h3.decideAccount)(t.author,e),(0,m3.decideProfile)(t.author,e))}function MRe(t,e){var n;const r=new Yd.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return r.addHidden(zRe(t,e.prefs.hiddenPosts)),r.isMe||r.addMutedWord(FRe(t,e.prefs.mutedWords)),r}function NRe(t,e){if(t){if((Le.AppBskyEmbedRecord.isView(t)||Le.AppBskyEmbedRecordWithMedia.isView(t))&&Le.AppBskyEmbedRecord.isViewRecord(t.record))return YC(t.record,e);if(Le.AppBskyEmbedRecordWithMedia.isView(t)&&Le.AppBskyEmbedRecord.isViewRecord(t.record.record))return YC(t.record.record,e);if((Le.AppBskyEmbedRecord.isView(t)||Le.AppBskyEmbedRecordWithMedia.isView(t))&&Le.AppBskyEmbedRecord.isViewBlocked(t.record))return eT(t.record,e);if(Le.AppBskyEmbedRecordWithMedia.isView(t)&&Le.AppBskyEmbedRecord.isViewBlocked(t.record.record))return eT(t.record.record,e)}}function YC(t,e){var n;const r=new Yd.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return Yd.ModerationDecision.merge(r,(0,h3.decideAccount)(t.author,e),(0,m3.decideProfile)(t.author,e))}function eT(t,e){var n,i,o,s,a,c,u,d,f;const r=new Yd.ModerationDecision;return r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.author.viewer)!=null&&n.muted&&((i=t.author.viewer)!=null&&i.mutedByList?r.addMutedByList((o=t.author.viewer)==null?void 0:o.mutedByList):r.addMuted((s=t.author.viewer)==null?void 0:s.muted)),(a=t.author.viewer)!=null&&a.blocking&&((c=t.author.viewer)!=null&&c.blockingByList?r.addBlockingByList((u=t.author.viewer)==null?void 0:u.blockingByList):r.addBlocking((d=t.author.viewer)==null?void 0:d.blocking)),r.addBlockedBy((f=t.author.viewer)==null?void 0:f.blockedBy),r}function zRe(t,e){return e!=null&&e.length?!!(e.includes(t.uri)||t.embed&&(Le.AppBskyEmbedRecord.isView(t.embed)&&Le.AppBskyEmbedRecord.isViewRecord(t.embed.record)&&e.includes(t.embed.record.uri)||Le.AppBskyEmbedRecordWithMedia.isView(t.embed)&&Le.AppBskyEmbedRecord.isViewRecord(t.embed.record.record)&&e.includes(t.embed.record.record.uri))):!1}function FRe(t,e){if(!(e!=null&&e.length))return!1;const r=t.author;if(Le.AppBskyFeedPost.isRecord(t.record)){const i=t.record;if((0,On.hasMutedWord)({mutedWords:e,text:i.text,facets:i.facets,outlineTags:i.tags,languages:i.langs,actor:r}))return!0;if(i.embed&&Le.AppBskyEmbedImages.isMain(i.embed)){for(const o of i.embed.images)if((0,On.hasMutedWord)({mutedWords:e,text:o.alt,languages:i.langs,actor:r}))return!0}}const{embed:n}=t;if(n){if((Le.AppBskyEmbedRecord.isView(n)||Le.AppBskyEmbedRecordWithMedia.isView(n))&&Le.AppBskyEmbedRecord.isViewRecord(n.record)){if(Le.AppBskyFeedPost.isRecord(n.record.value)){const i=n.record.value,o=n.record.author;if((0,On.hasMutedWord)({mutedWords:e,text:i.text,facets:i.facets,outlineTags:i.tags,languages:i.langs,actor:o}))return!0;if(Le.AppBskyEmbedImages.isMain(i.embed)){for(const s of i.embed.images)if((0,On.hasMutedWord)({mutedWords:e,text:s.alt,languages:i.langs,actor:o}))return!0}if(Le.AppBskyEmbedExternal.isMain(i.embed)){const{external:s}=i.embed;if((0,On.hasMutedWord)({mutedWords:e,text:s.title+" "+s.description,languages:[],actor:o}))return!0}if(Le.AppBskyEmbedRecordWithMedia.isMain(i.embed)){if(Le.AppBskyEmbedExternal.isMain(i.embed.media)){const{external:s}=i.embed.media;if((0,On.hasMutedWord)({mutedWords:e,text:s.title+" "+s.description,languages:[],actor:o}))return!0}if(Le.AppBskyEmbedImages.isMain(i.embed.media)){for(const s of i.embed.media.images)if((0,On.hasMutedWord)({mutedWords:e,text:s.alt,languages:Le.AppBskyFeedPost.isRecord(i.record)?i.langs:[],actor:o}))return!0}}}}else if(Le.AppBskyEmbedExternal.isView(n)){const{external:i}=n;if((0,On.hasMutedWord)({mutedWords:e,text:i.title+" "+i.description,languages:[],actor:r}))return!0}else if(Le.AppBskyEmbedRecordWithMedia.isView(n)&&Le.AppBskyEmbedRecord.isViewRecord(n.record.record)){const i=n.record.record.author;if(Le.AppBskyFeedPost.isRecord(n.record.record.value)){const o=n.record.record.value;if((0,On.hasMutedWord)({mutedWords:e,text:o.text,facets:o.facets,outlineTags:o.tags,languages:o.langs,actor:i}))return!0}if(Le.AppBskyEmbedImages.isView(n.media)){for(const o of n.media.images)if((0,On.hasMutedWord)({mutedWords:e,text:o.alt,languages:Le.AppBskyFeedPost.isRecord(t.record)?t.record.langs:[],actor:i}))return!0}if(Le.AppBskyEmbedExternal.isView(n.media)){const{external:o}=n.media;if((0,On.hasMutedWord)({mutedWords:e,text:o.title+" "+o.description,languages:[],actor:i}))return!0}}}return!1}var YA={};Object.defineProperty(YA,"__esModule",{value:!0});YA.decideUserList=WRe;const qRe=Bs,tT=ri,GRe=Gs,HRe=Hs;function WRe(t,e){var o,s;const r=new tT.ModerationDecision,n="creator"in t&&XRe(t.creator)?t.creator:void 0;if(n){if(r.setDid(n.did),r.setIsMe(n.did===e.userDid),(o=t.labels)!=null&&o.length)for(const a of t.labels)r.addLabel("content",a,e);return tT.ModerationDecision.merge(r,(0,GRe.decideAccount)(n,e),(0,HRe.decideProfile)(n,e))}const i=new qRe.AtUri(t.uri).hostname;if(r.setDid(i),r.setIsMe(i===e.userDid),(s=t.labels)!=null&&s.length)for(const a of t.labels)r.addLabel("content",a,e);return r}function XRe(t){return t&&typeof t=="object"&&"did"in t}var wu={};Object.defineProperty(wu,"__esModule",{value:!0});wu.isQuotedPost=ZRe;wu.isQuotedPostWithMedia=QRe;wu.interpretLabelValueDefinition=y3;wu.interpretLabelValueDefinitions=YRe;const eS=p,JRe=R;function ZRe(t){return!!(t&&eS.AppBskyEmbedRecord.isView(t))}function QRe(t){return!!(t&&eS.AppBskyEmbedRecordWithMedia.isView(t))}function y3(t,e){const r={account:{},profile:{},content:{}},n=t.severity==="alert"?"alert":t.severity==="inform"?"inform":void 0;t.blurs==="content"?(r.account.profileList=n,r.account.profileView=n,r.account.contentList="blur",r.account.contentView=t.adultOnly?"blur":n,r.profile.profileList=n,r.profile.profileView=n,r.content.contentList="blur",r.content.contentView=t.adultOnly?"blur":n):t.blurs==="media"?(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"):t.blurs==="none"&&(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 i="warn";(t.defaultSetting==="hide"||t.defaultSetting==="ignore")&&(i=t.defaultSetting);const o=["no-self"];return t.adultOnly&&o.push("adult"),{...t,definedBy:e,configurable:!0,defaultSetting:i,flags:o,behaviors:r}}function YRe(t){var e;return(((e=t.policies)==null?void 0:e.labelValueDefinitions)||[]).filter((0,JRe.asPredicate)(eS.ComAtprotoLabelDefs.validateLabelValueDefinition)).map(r=>y3(r,t.creator.did))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.interpretLabelValueDefinitions=t.interpretLabelValueDefinition=t.hasMutedWord=t.ModerationDecision=t.ModerationUI=void 0,t.moderateProfile=h,t.moderatePost=m,t.moderateNotification=g,t.moderateFeedGenerator=v,t.moderateUserList=w;const e=ri,r=Gs,n=JA,i=ZA,o=QA,s=Hs,a=YA;var c=Vp;Object.defineProperty(t,"ModerationUI",{enumerable:!0,get:function(){return c.ModerationUI}});var u=ri;Object.defineProperty(t,"ModerationDecision",{enumerable:!0,get:function(){return u.ModerationDecision}});var d=Ub;Object.defineProperty(t,"hasMutedWord",{enumerable:!0,get:function(){return d.hasMutedWord}});var f=wu;Object.defineProperty(t,"interpretLabelValueDefinition",{enumerable:!0,get:function(){return f.interpretLabelValueDefinition}}),Object.defineProperty(t,"interpretLabelValueDefinitions",{enumerable:!0,get:function(){return f.interpretLabelValueDefinitions}});function h(y,b){return e.ModerationDecision.merge((0,r.decideAccount)(y,b),(0,s.decideProfile)(y,b))}function m(y,b){return(0,o.decidePost)(y,b)}function g(y,b){return(0,i.decideNotification)(y,b)}function v(y,b){return(0,n.decideFeedGenerator)(y,b)}function w(y,b){return(0,a.decideUserList)(y,b)}})(WA);var $b={};Object.defineProperty($b,"__esModule",{value:!0});$b.mock=void 0;const qu="bafyreiclp443lavogvhj3d2ob2cxbfuscni2k5jk7bebjzg7khl3esabwq";$b.mock={post({text:t,facets:e,reply:r,embed:n}){return{$type:"app.bsky.feed.post",text:t,facets:e,reply:r,embed:n,langs:["en"],createdAt:new Date().toISOString()}},postView({record:t,author:e,embed:r,replyCount:n,repostCount:i,likeCount:o,viewer:s,labels:a}){return{$type:"app.bsky.feed.defs#postView",uri:`at://${e.did}/app.bsky.feed.post/fake`,cid:qu,author:e,record:t,embed:r,replyCount:n,repostCount:i,likeCount:o,indexedAt:new Date().toISOString(),viewer:s,labels:a}},embedRecordView({record:t,author:e,labels:r}){return{$type:"app.bsky.embed.record#view",record:{$type:"app.bsky.embed.record#viewRecord",uri:`at://${e.did}/app.bsky.feed.post/fake`,cid:qu,author:e,value:t,labels:r,indexedAt:new Date().toISOString()}}},profileViewBasic({handle:t,displayName:e,description:r,viewer:n,labels:i}){return{did:`did:web:${t}`,handle:t,displayName:e,description:r,viewer:n,labels:i}},actorViewerState({muted:t,mutedByList:e,blockedBy:r,blocking:n,blockingByList:i,following:o,followedBy:s}){return{muted:t,mutedByList:e,blockedBy:r,blocking:n,blockingByList:i,following:o,followedBy:s}},listViewBasic({name:t}){return{uri:"at://did:plc:fake/app.bsky.graph.list/fake",cid:qu,name:t,purpose:"app.bsky.graph.defs#modlist",indexedAt:new Date().toISOString()}},replyNotification({author:t,record:e,labels:r}){return{uri:`at://${t.did}/app.bsky.feed.post/fake`,cid:qu,author:t,reason:"reply",reasonSubject:`at://${t.did}/app.bsky.feed.post/fake-parent`,record:e,isRead:!1,indexedAt:new Date().toISOString(),labels:r}},followNotification({author:t,subjectDid:e,labels:r}){return{uri:`at://${t.did}/app.bsky.graph.follow/fake`,cid:qu,author:t,reason:"follow",record:{$type:"app.bsky.graph.follow",createdAt:new Date().toISOString(),subject:e},isRead:!1,indexedAt:new Date().toISOString(),labels:r}},label({val:t,uri:e,src:r}){return{src:r||"did:plc:fake-labeler",uri:e,val:t,cts:new Date().toISOString()}}};var Kp={},tS={},ai=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},i0=C&&C.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hi,Vo;Object.defineProperty(tS,"__esModule",{value:!0});class eAe{constructor(){Hi.set(this,!1),Vo.set(this,new Set)}get acquired(){return ai(this,Hi,"f")}acquireAsync({timeout:e}={}){if(!ai(this,Hi,"f"))return i0(this,Hi,!0,"f"),Promise.resolve();if(e==null)return new Promise(i=>{ai(this,Vo,"f").add(i)});let r,n;return Promise.race([new Promise(i=>{r=()=>{clearTimeout(n),i()},ai(this,Vo,"f").add(r)}),new Promise((i,o)=>{n=setTimeout(()=>{ai(this,Vo,"f").delete(r),o(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return ai(this,Hi,"f")?!1:(i0(this,Hi,!0,"f"),!0)}release(){if(!ai(this,Hi,"f"))throw new Error("Cannot release an unacquired lock");if(ai(this,Vo,"f").size>0){const[e]=ai(this,Vo,"f");ai(this,Vo,"f").delete(e),e()}else i0(this,Hi,!1,"f")}}tS.default=eAe;Hi=new WeakMap,Vo=new WeakMap;var Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.isValidVerificationPrefs=Be.isValidThreadViewPref=Be.isValidSavedFeedsPrefV2=Be.isValidSavedFeedsPref=Be.isValidPostInteractionSettingsPref=Be.isValidPersonalDetailsPref=Be.isValidMutedWordsPref=Be.isValidLabelersPref=Be.isValidInterestsPref=Be.isValidHiddenPostsPref=Be.isValidFeedViewPref=Be.isValidContentLabelPref=Be.isValidBskyAppStatePref=Be.isValidAdultContentPref=Be.isValidProfile=void 0;const _r=p,Rr=R;Be.isValidProfile=(0,Rr.asPredicate)(_r.AppBskyActorProfile.validateRecord);Be.isValidAdultContentPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateAdultContentPref);Be.isValidBskyAppStatePref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateBskyAppStatePref);Be.isValidContentLabelPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateContentLabelPref);Be.isValidFeedViewPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateFeedViewPref);Be.isValidHiddenPostsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateHiddenPostsPref);Be.isValidInterestsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateInterestsPref);Be.isValidLabelersPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateLabelersPref);Be.isValidMutedWordsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateMutedWordsPref);Be.isValidPersonalDetailsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validatePersonalDetailsPref);Be.isValidPostInteractionSettingsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validatePostInteractionSettingsPref);Be.isValidSavedFeedsPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateSavedFeedsPref);Be.isValidSavedFeedsPrefV2=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateSavedFeedsPrefV2);Be.isValidThreadViewPref=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateThreadViewPref);Be.isValidVerificationPrefs=(0,Rr.asPredicate)(_r.AppBskyActorDefs.validateVerificationPrefs);var tAe=C&&C.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),rAe=C&&C.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nAe=C&&C.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&tAe(r,e,n[i]);return rAe(r,e),r}}(),rT=C&&C.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},iAe=C&&C.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},lm;Object.defineProperty(Kp,"__esModule",{value:!0});Kp.Agent=void 0;const oAe=iAe(tS),Wi=Pi,nl=Bs,nT=ee,Pe=p,sAe=A,aAe=ap,lAe=WA,cAe=_s,we=nAe(Be),dr=n_,iT={hideReplies:!1,hideRepliesByUnfollowed:!0,hideRepliesByLikeCount:0,hideReposts:!1,hideQuotePosts:!1},uAe={sort:"hotness",prioritizeFollowedUsers:!0};class Vb extends nT.XrpcClient{static configure(e){e.appLabelers&&(this.appLabelers=e.appLabelers.map(dr.asDid))}get xrpc(){return this}constructor(e){const r=typeof e=="object"&&"fetchHandler"in e?e:{did:void 0,fetchHandler:(0,nT.buildFetchHandler)(e)};super((n,i)=>{var s;const o=new Headers(i==null?void 0:i.headers);return this.proxy&&!o.has("atproto-proxy")&&o.set("atproto-proxy",this.proxy),o.set("atproto-accept-labelers",[...this.appLabelers.map(a=>`${a};redact`),...this.labelers,(s=o.get("atproto-accept-labelers"))==null?void 0:s.trim()].filter(Boolean).join(", ")),this.sessionManager.fetchHandler(n,{...i,headers:o})},sAe.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:new Pe.ComNS(this)}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:new Pe.AppNS(this)}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:new Pe.ChatNS(this)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:new Pe.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:(n,i)=>this.com.atproto.repo.uploadBlob(n,i)}),Object.defineProperty(this,"resolveHandle",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.identity.resolveHandle(n,i)}),Object.defineProperty(this,"updateHandle",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.identity.updateHandle(n,i)}),Object.defineProperty(this,"createModerationReport",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.moderation.createReport(n,i)}),Object.defineProperty(this,"getTimeline",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getTimeline(n,i)}),Object.defineProperty(this,"getAuthorFeed",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getAuthorFeed(n,i)}),Object.defineProperty(this,"getActorLikes",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getActorLikes(n,i)}),Object.defineProperty(this,"getPostThread",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getPostThread(n,i)}),Object.defineProperty(this,"getPost",{enumerable:!0,configurable:!0,writable:!0,value:n=>this.app.bsky.feed.post.get(n)}),Object.defineProperty(this,"getPosts",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getPosts(n,i)}),Object.defineProperty(this,"getLikes",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getLikes(n,i)}),Object.defineProperty(this,"getRepostedBy",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getRepostedBy(n,i)}),Object.defineProperty(this,"getFollows",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.graph.getFollows(n,i)}),Object.defineProperty(this,"getFollowers",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.graph.getFollowers(n,i)}),Object.defineProperty(this,"getProfile",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getProfile(n,i)}),Object.defineProperty(this,"getProfiles",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getProfiles(n,i)}),Object.defineProperty(this,"getSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getSuggestions(n,i)}),Object.defineProperty(this,"searchActors",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.searchActors(n,i)}),Object.defineProperty(this,"searchActorsTypeahead",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.searchActorsTypeahead(n,i)}),Object.defineProperty(this,"listNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.notification.listNotifications(n,i)}),Object.defineProperty(this,"countUnreadNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.notification.getUnreadCount(n,i)}),Object.defineProperty(this,"getLabelers",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.labeler.getServices(n,i)}),lm.set(this,new oAe.default),this.sessionManager=r}clone(){return this.copyInto(new Vb(this.sessionManager))}copyInto(e){e.configureLabelers(this.labelers),e.configureProxy(this.proxy??null),e.clearHeaders();for(const[r,n]of this.headers)e.setHeader(r,n);return e}withProxy(e,r){const n=this.clone();return n.configureProxy(`${(0,dr.asDid)(r)}#${e}`),n}get appLabelers(){return this.constructor.appLabelers}configureLabelers(e){this.labelers=e.map(dr.asDid)}configureLabelersHeader(e){this.configureLabelers(e.filter(dr.isDid))}configureProxy(e){if(e===null)this.proxy=void 0;else if((0,dr.isDid)(e))this.proxy=e;else throw new TypeError("Invalid proxy DID")}configureProxyHeader(e,r){(0,dr.isDid)(r)&&this.configureProxy(`${r}#${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 r=[...this.appLabelers];pAe(e)?r.push(...e.moderationPrefs.labelers.map(o=>o.did)):g3(e)?r.push(...e.labelers.map(o=>o.did)):r.push(...e);const n=await this.getLabelers({dids:r,detailed:!0}),i={};if(n.data)for(const o of n.data.views)i[o.creator.did]=(0,lAe.interpretLabelValueDefinitions)(o);return i}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 r=new nl.AtUri(e);return this.app.bsky.feed.post.delete({repo:r.hostname,rkey:r.rkey})}async like(e,r,n){return this.app.bsky.feed.like.create({repo:this.accountDid},{subject:{uri:e,cid:r},createdAt:new Date().toISOString(),via:n})}async deleteLike(e){this.assertAuthenticated();const r=new nl.AtUri(e);return this.app.bsky.feed.like.delete({repo:r.hostname,rkey:r.rkey})}async repost(e,r,n){return this.app.bsky.feed.repost.create({repo:this.accountDid},{subject:{uri:e,cid:r},createdAt:new Date().toISOString(),via:n})}async deleteRepost(e){this.assertAuthenticated();const r=new nl.AtUri(e);return this.app.bsky.feed.repost.delete({repo:r.hostname,rkey:r.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 r=new nl.AtUri(e);return this.app.bsky.graph.follow.delete({repo:r.hostname,rkey:r.rkey})}async upsertProfile(e){const r=async()=>{const n=this.assertDid,i="app.bsky.actor.profile",o=await this.com.atproto.repo.getRecord({repo:n,collection:i,rkey:"self"}).catch(u=>{}),s=o&&we.isValidProfile(o.data.value)?o.data.value:void 0,a=await e(s),c=Pe.AppBskyActorProfile.validateRecord({$type:i,...a});if(!c.success)throw c.error;await this.com.atproto.repo.putRecord({repo:n,collection:i,rkey:"self",record:c.value,swapRecord:(o==null?void 0:o.data.cid)||null})};return(0,Wi.retry)(r,{maxRetries:5,retryable:n=>n instanceof Pe.ComAtprotoRepoPutRecord.InvalidSwapError})}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){var o;const r=this.accountDid,i=(o=(await this.app.bsky.graph.getList({list:e,limit:1})).data.list.viewer)==null?void 0:o.blocked;if(i){const{rkey:s}=new nl.AtUri(i);return this.app.bsky.graph.listblock.delete({repo:r,rkey:s})}}async updateSeenNotifications(e=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:{...iT}},threadViewPrefs:{...uAe},moderationPrefs:{adultContentEnabled:!1,labels:{...cAe.DEFAULT_LABEL_SETTINGS},labelers:this.appLabelers.map(i=>({did:i,labels:{}})),mutedWords:[],hiddenPosts:[]},birthDate:void 0,interests:{tags:[]},bskyAppState:{queuedNudges:[],activeProgressGuide:void 0,nuxs:[]},postInteractionSettings:{threadgateAllowRules:void 0,postgateEmbeddingRules:void 0},verificationPrefs:{hideBadges:!1}},r=await this.app.bsky.actor.getPreferences({}),n=[];for(const i of r.data.preferences)if(we.isValidAdultContentPref(i))e.moderationPrefs.adultContentEnabled=i.enabled;else if(we.isValidContentLabelPref(i)){const o=dAe(i);n.push(o)}else if(we.isValidLabelersPref(i))e.moderationPrefs.labelers=this.appLabelers.map(o=>({did:o,labels:{}})).concat(i.labelers.map(o=>({...o,labels:{}})));else if(we.isValidSavedFeedsPrefV2(i))e.savedFeeds=i.items;else if(we.isValidSavedFeedsPref(i))e.feeds.saved=i.saved,e.feeds.pinned=i.pinned;else if(we.isValidPersonalDetailsPref(i))i.birthDate&&(e.birthDate=new Date(i.birthDate));else if(we.isValidFeedViewPref(i)){const{$type:o,feed:s,...a}=i;e.feedViewPrefs[s]={...iT,...a}}else if(we.isValidThreadViewPref(i)){const{$type:o,...s}=i;e.threadViewPrefs={...e.threadViewPrefs,...s}}else if(we.isValidInterestsPref(i)){const{$type:o,...s}=i;e.interests={...e.interests,...s}}else we.isValidMutedWordsPref(i)?(e.moderationPrefs.mutedWords=i.items,e.moderationPrefs.mutedWords.length&&(e.moderationPrefs.mutedWords=e.moderationPrefs.mutedWords.map(o=>(o.actorTarget=o.actorTarget||"all",o)))):we.isValidHiddenPostsPref(i)?e.moderationPrefs.hiddenPosts=i.items:we.isValidBskyAppStatePref(i)?(e.bskyAppState.queuedNudges=i.queuedNudges||[],e.bskyAppState.activeProgressGuide=i.activeProgressGuide,e.bskyAppState.nuxs=i.nuxs||[]):we.isValidPostInteractionSettingsPref(i)?(e.postInteractionSettings.threadgateAllowRules=i.threadgateAllowRules,e.postInteractionSettings.postgateEmbeddingRules=i.postgateEmbeddingRules):we.isValidVerificationPrefs(i)&&(e.verificationPrefs={hideBadges:i.hideBadges});if(e.savedFeeds==null){const{saved:i,pinned:o}=e.feeds;if(i&&o){const s=new Map;s.set("timeline",{id:Wi.TID.nextStr(),type:"timeline",value:"following",pinned:!0});for(const a of o){const c=(0,dr.getSavedFeedType)(a);c!=="unknown"&&s.set(a,{id:Wi.TID.nextStr(),type:c,value:a,pinned:!0})}for(const a of i)if(!s.has(a)){const c=(0,dr.getSavedFeedType)(a);if(c==="unknown")continue;s.set(a,{id:Wi.TID.nextStr(),type:c,value:a,pinned:!1})}e.savedFeeds=Array.from(s.values())}else e.savedFeeds=[{id:Wi.TID.nextStr(),type:"timeline",value:"following",pinned:!0}];await this.overwriteSavedFeeds(e.savedFeeds)}for(const i of n)if(i.labelerDid){const o=e.moderationPrefs.labelers.find(s=>s.did===i.labelerDid);if(!o)continue;o.labels[i.label]=i.visibility}else e.moderationPrefs.labels[i.label]=i.visibility;return e.moderationPrefs.labels=fAe(e.moderationPrefs.labels),this.configureLabelers(o0(r.data.preferences)),e}async overwriteSavedFeeds(e){e.forEach(dr.validateSavedFeed);const r=new Map;return e.forEach(n=>{r.has(n.id)&&r.delete(n.id),r.set(n.id,n)}),this.updateSavedFeedsV2Preferences(()=>Array.from(r.values()))}async updateSavedFeeds(e){return e.map(dr.validateSavedFeed),this.updateSavedFeedsV2Preferences(r=>r.map(n=>{const i=e.find(o=>n.id===o.id);return i?{...n,pinned:i.pinned}:n}))}async addSavedFeeds(e){const r=e.map(n=>({...n,id:Wi.TID.nextStr()}));return r.forEach(dr.validateSavedFeed),this.updateSavedFeedsV2Preferences(n=>[...n,...r])}async removeSavedFeeds(e){return this.updateSavedFeedsV2Preferences(r=>[...r.filter(n=>!e.find(i=>n.id===i))])}async setSavedFeeds(e,r){return this.updateFeedPreferences(()=>({saved:e,pinned:r}))}async addSavedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:[...r.filter(i=>i!==e),e],pinned:n}))}async removeSavedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:r.filter(i=>i!==e),pinned:n.filter(i=>i!==e)}))}async addPinnedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:[...r.filter(i=>i!==e),e],pinned:[...n.filter(i=>i!==e),e]}))}async removePinnedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:r,pinned:n.filter(i=>i!==e)}))}async setAdultContentEnabled(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidAdultContentPref)||{$type:"app.bsky.actor.defs#adultContentPref",enabled:e};return n.enabled=e,r.filter(i=>!Pe.AppBskyActorDefs.isAdultContentPref(i)).concat(n)})}async setContentLabelPref(e,r,n){n&&(0,nl.ensureValidDid)(n),await this.updatePreferences(i=>{const o=i.filter(we.isValidContentLabelPref).findLast(a=>a.label===e&&a.labelerDid===n)||{$type:"app.bsky.actor.defs#contentLabelPref",label:e,labelerDid:n,visibility:r};o.visibility=r;let s;if(Pe.AppBskyActorDefs.isContentLabelPref(o)&&!o.labelerDid){const a={"graphic-media":"gore",porn:"nsfw",sexual:"suggestive",__proto__:null}[o.label];a&&(s=i.filter(we.isValidContentLabelPref).findLast(c=>c.label===a&&c.labelerDid===void 0)||{$type:"app.bsky.actor.defs#contentLabelPref",label:a,labelerDid:void 0,visibility:r},s.visibility=r)}return i.filter(a=>!Pe.AppBskyActorDefs.isContentLabelPref(a)||!(a.label===e&&a.labelerDid===n)).concat(o).filter(a=>s?!Pe.AppBskyActorDefs.isContentLabelPref(a)||!(a.label===s.label&&a.labelerDid===void 0):!0).concat(s?[s]:[])})}async addLabeler(e){const r=await this.updatePreferences(n=>{const i=n.findLast(we.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return i.labelers.some(o=>o.did===e)||i.labelers.push({did:e}),n.filter(o=>!Pe.AppBskyActorDefs.isLabelersPref(o)).concat(i)});this.configureLabelers(o0(r))}async removeLabeler(e){const r=await this.updatePreferences(n=>{const i=n.findLast(we.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return i.labelers=i.labelers.filter(o=>o.did!==e),n.filter(o=>!Pe.AppBskyActorDefs.isLabelersPref(o)).concat(i)});this.configureLabelers(o0(r))}async setPersonalDetails({birthDate:e}){await this.updatePreferences(r=>{const n=r.findLast(we.isValidPersonalDetailsPref)||{$type:"app.bsky.actor.defs#personalDetailsPref"};return n.birthDate=e instanceof Date?e.toISOString():e,r.filter(i=>!Pe.AppBskyActorDefs.isPersonalDetailsPref(i)).concat(n)})}async setFeedViewPrefs(e,r){await this.updatePreferences(n=>{const i=n.filter(we.isValidFeedViewPref).findLast(o=>o.feed===e);return n.filter(o=>!Pe.AppBskyActorDefs.isFeedViewPref(o)||o.feed!==e).concat({...i,...r,$type:"app.bsky.actor.defs#feedViewPref",feed:e})})}async setThreadViewPrefs(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidThreadViewPref);return r.filter(i=>!Pe.AppBskyActorDefs.isThreadViewPref(i)).concat({...n,...e,$type:"app.bsky.actor.defs#threadViewPref"})})}async setInterestsPref(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidInterestsPref);return r.filter(i=>!Pe.AppBskyActorDefs.isInterestsPref(i)).concat({...n,...e,$type:"app.bsky.actor.defs#interestsPref"})})}async addMutedWord(e){const r=(0,dr.sanitizeMutedWordValue)(e.value);r&&await this.updatePreferences(n=>{let i=n.findLast(we.isValidMutedWordsPref);const o={id:Wi.TID.nextStr(),value:r,targets:e.targets||[],actorTarget:e.actorTarget||"all",expiresAt:e.expiresAt||void 0};return i?(i.items.push(o),i.items=s0(i.items)):i={$type:"app.bsky.actor.defs#mutedWordsPref",items:[o]},n.filter(s=>!Pe.AppBskyActorDefs.isMutedWordsPref(s)).concat(i)})}async addMutedWords(e){await Promise.all(e.map(r=>this.addMutedWord(r)))}async upsertMutedWords(e){await this.addMutedWords(e)}async updateMutedWord(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidMutedWordsPref);return n?(n.items=n.items.map(i=>{if(oT(i,e)){const s={...i,...e};return{id:i.id||Wi.TID.nextStr(),value:(0,dr.sanitizeMutedWordValue)(s.value)||i.value,targets:s.targets||[],actorTarget:s.actorTarget||"all",expiresAt:s.expiresAt||void 0}}else return i}),n.items=s0(n.items),r.filter(i=>!Pe.AppBskyActorDefs.isMutedWordsPref(i)).concat(n)):r})}async removeMutedWord(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidMutedWordsPref);if(n){for(let i=0;i<n.items.length;i++)if(oT(n.items[i],e)){n.items.splice(i,1);break}return n.items=s0(n.items),r.filter(i=>!Pe.AppBskyActorDefs.isMutedWordsPref(i)).concat(n)}return r})}async removeMutedWords(e){await Promise.all(e.map(r=>this.removeMutedWord(r)))}async hidePost(e){await this.updateHiddenPost(e,"hide")}async unhidePost(e){await this.updateHiddenPost(e,"unhide")}async bskyAppQueueNudges(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.queuedNudges=(n.queuedNudges||[]).concat(e),r.filter(i=>!Pe.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppDismissNudges(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return e=Array.isArray(e)?e:[e],n.queuedNudges=(n.queuedNudges||[]).filter(i=>!e.includes(i)),r.filter(i=>!Pe.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppSetActiveProgressGuide(e){if(e){const r=Pe.AppBskyActorDefs.validateBskyAppProgressGuide(e);if(!r.success)throw r.error}await this.updatePreferences(r=>{const n=r.findLast(we.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.activeProgressGuide=e,r.filter(i=>!Pe.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppUpsertNux(e){(0,dr.validateNux)(e),await this.updatePreferences(r=>{var s;const n=r.findLast(we.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};n.nuxs=n.nuxs||[];const i=(s=n.nuxs)==null?void 0:s.find(a=>a.id===e.id);let o;return i?o={id:i.id,completed:e.completed,data:e.data,expiresAt:e.expiresAt}:o=e,n.nuxs=n.nuxs.filter(a=>a.id!==e.id).concat(o),r.filter(a=>!Pe.AppBskyActorDefs.isBskyAppStatePref(a)).concat(n)})}async bskyAppRemoveNuxs(e){await this.updatePreferences(r=>{const n=r.findLast(we.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.nuxs=(n.nuxs||[]).filter(i=>!e.includes(i.id)),r.filter(i=>!Pe.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async setPostInteractionSettings(e){const r=Pe.AppBskyActorDefs.validatePostInteractionSettingsPref(e);if(!r.success)throw r.error;await this.updatePreferences(n=>{const i=n.findLast(we.isValidPostInteractionSettingsPref)||{$type:"app.bsky.actor.defs#postInteractionSettingsPref"};return i.threadgateAllowRules=e.threadgateAllowRules,i.postgateEmbeddingRules=e.postgateEmbeddingRules,n.filter(o=>!Pe.AppBskyActorDefs.isPostInteractionSettingsPref(o)).concat(i)})}async setVerificationPrefs(e){const r=Pe.AppBskyActorDefs.validateVerificationPrefs(e);if(!r.success)throw r.error;await this.updatePreferences(n=>{const i=n.findLast(we.isValidVerificationPrefs)||{$type:"app.bsky.actor.defs#verificationPrefs",hideBadges:!1};return i.hideBadges=e.hideBadges,n.filter(o=>!Pe.AppBskyActorDefs.isVerificationPrefs(o)).concat(i)})}async updatePreferences(e){try{await rT(this,lm,"f").acquireAsync();const r=await this.app.bsky.actor.getPreferences({}),n=e(r.data.preferences);return n===!1?r.data.preferences:(await this.app.bsky.actor.putPreferences({preferences:n}),n)}finally{rT(this,lm,"f").release()}}async updateHiddenPost(e,r){await this.updatePreferences(n=>{const i=n.findLast(we.isValidHiddenPostsPref)||{$type:"app.bsky.actor.defs#hiddenPostsPref",items:[]},o=new Set(i.items);return r==="hide"?o.add(e):o.delete(e),i.items=[...o],n.filter(s=>!Pe.AppBskyActorDefs.isHiddenPostsPref(s)).concat(i)})}async updateFeedPreferences(e){let r;return await this.updatePreferences(n=>{const i=n.findLast(we.isValidSavedFeedsPref)||{$type:"app.bsky.actor.defs#savedFeedsPref",saved:[],pinned:[]};return r=e(i.saved,i.pinned),i.saved=r.saved,i.pinned=r.pinned,n.filter(o=>!Pe.AppBskyActorDefs.isSavedFeedsPref(o)).concat(i)}),r}async updateSavedFeedsV2Preferences(e){let r=[];return await this.updatePreferences(n=>{const i=n.findLast(we.isValidSavedFeedsPrefV2)||{$type:"app.bsky.actor.defs#savedFeedsPrefV2",items:[]},o=e(i.items);i.items=[...o].sort((c,u)=>c.pinned===u.pinned?0:c.pinned?-1:1),r=o;let s=n.filter(c=>!Pe.AppBskyActorDefs.isSavedFeedsPrefV2(c)).concat(i),a=n.findLast(we.isValidSavedFeedsPref);if(a){const{saved:c,pinned:u}=a,d=(0,dr.savedFeedsToUriArrays)(i.items.filter(f=>["feed","list"].includes(f.type)));a={...a,saved:Array.from(new Set([...c,...d.saved])),pinned:Array.from(new Set([...u,...d.pinned]))},s=s.filter(f=>!Pe.AppBskyActorDefs.isSavedFeedsPref(f)).concat(a)}return s}),r}}Kp.Agent=Vb;lm=new WeakMap;Object.defineProperty(Vb,"appLabelers",{enumerable:!0,configurable:!0,writable:!0,value:[aAe.BSKY_LABELER_DID]});function dAe(t){let e=t.visibility;return e==="show"&&(e="ignore"),{...t,visibility:e}}function fAe(t){const e={...t},r={gore:"graphic-media",nsfw:"porn",suggestive:"sexual"};for(const n in e){const i=r[n];i&&(e[i]=e[n])}return e}function o0(t){const e=t.findLast(we.isValidLabelersPref);let r=[];return e&&(r=e.labelers.map(n=>n.did)),r}function pAe(t){return t&&typeof t=="object"&&"moderationPrefs"in t&&g3(t.moderationPrefs)}function g3(t){return t&&typeof t=="object"&&"labelers"in t}function s0(t){return t.map(e=>({...e,id:e.id||Wi.TID.nextStr()}))}function oT(t,e){const r=t.id,n=r&&r===e.id,i=!r&&t.value===e.value;return n||i}var uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.CredentialSession=uo.AtpAgent=void 0;const sT=Pi,la=ee,hAe=Kp,mAe=p,yAe=A,aT=globalThis.ReadableStream;class rS extends hAe.Agent{constructor(e){const r=e instanceof cm?e:new cm(new URL(e.service),e.fetch,e.persistSession);if(super(r),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sessionManager=r,!(e instanceof cm)&&e.headers)for(const[n,i]of e.headers)this.setHeader(n,i)}clone(){return this.copyInto(new rS(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,r){return this.sessionManager.createAccount(e,r)}async login(e){return this.sessionManager.login(e)}async logout(){return this.sessionManager.logout()}}uo.AtpAgent=rS;class cm{constructor(e,r=globalThis.fetch,n){Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"persistSession",{enumerable:!0,configurable:!0,writable:!0,value:n}),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 mAe.ComAtprotoServerNS(new la.XrpcClient((i,o)=>(0,this.fetch)(new URL(i,this.serviceUrl),o),yAe.schemas))})}get did(){var e;return(e=this.session)==null?void 0:e.did}get dispatchUrl(){return this.pdsUrl||this.serviceUrl}get hasSession(){return!!this.session}setFetch(e=globalThis.fetch){this.fetch=e}async fetchHandler(e,r){var f,h,m,g,v;await this.refreshSessionPromise;const n=new URL(e,this.dispatchUrl),i=new Request(n,r),o=(f=this.session)==null?void 0:f.accessJwt;if(!o||i.headers.has("authorization"))return(0,this.fetch)(i);i.headers.set("authorization",`Bearer ${o}`);const s=await(0,this.fetch)(i);if(!((h=this.session)!=null&&h.refreshJwt)||!await bAe(s,[400],["ExpiredToken"]))return s;try{await this.refreshSession()}catch{return s}if((m=r==null?void 0:r.signal)!=null&&m.aborted||aT&&(r==null?void 0:r.body)instanceof aT)return s;const c=(g=this.session)==null?void 0:g.accessJwt;if(!c||c===o)return s;await((v=s.body)==null?void 0:v.cancel());const u=new URL(e,this.dispatchUrl),d=new Request(u,r);return d.headers.set("authorization",`Bearer ${c}`),await(0,this.fetch)(d)}async createAccount(e,r){var n,i;try{const o=await this.server.createAccount(e,r);return this.session={accessJwt:o.data.accessJwt,refreshJwt:o.data.refreshJwt,handle:o.data.handle,did:o.data.did,email:e.email,emailConfirmed:!1,emailAuthFactor:!1,active:!0},(n=this.persistSession)==null||n.call(this,"create",this.session),this._updateApiEndpoint(o.data.didDoc),o}catch(o){throw this.session=void 0,(i=this.persistSession)==null||i.call(this,"create-failed",void 0),o}}async login(e){var r,n;try{const i=await this.server.createSession({identifier:e.identifier,password:e.password,authFactorToken:e.authFactorToken,allowTakendown:e.allowTakendown});return this.session={accessJwt:i.data.accessJwt,refreshJwt:i.data.refreshJwt,handle:i.data.handle,did:i.data.did,email:i.data.email,emailConfirmed:i.data.emailConfirmed,emailAuthFactor:i.data.emailAuthFactor,active:i.data.active??!0,status:i.data.status},this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"create",this.session),i}catch(i){throw this.session=void 0,(n=this.persistSession)==null||n.call(this,"create-failed",void 0),i}}async logout(){var e;if(this.session)try{await this.server.deleteSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}})}catch{}finally{this.session=void 0,(e=this.persistSession)==null||e.call(this,"expired",void 0)}}async resumeSession(e){var r,n;this.session=e;try{const i=await this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}}).catch(async o=>{if(o instanceof la.XRPCError&&["ExpiredToken","InvalidToken"].includes(o.error)&&e.refreshJwt)try{const s=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${e.refreshJwt}`}});return e.accessJwt=s.data.accessJwt,e.refreshJwt=s.data.refreshJwt,this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}})}catch{}throw o});if(i.data.did!==e.did)throw new la.XRPCError(la.ResponseType.InvalidRequest,"Invalid session","InvalidDID");return e.email=i.data.email,e.handle=i.data.handle,e.emailConfirmed=i.data.emailConfirmed,e.emailAuthFactor=i.data.emailAuthFactor,e.active=i.data.active??!0,e.status=i.data.status,this.session===e&&(this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"update",e)),i}catch(i){throw this.session===e&&(this.session=void 0,(n=this.persistSession)==null||n.call(this,i instanceof la.XRPCError&&["ExpiredToken","InvalidToken"].includes(i.error)?"expired":"network-error",void 0)),i}}async refreshSession(){return this.refreshSessionPromise||(this.refreshSessionPromise=this._refreshSessionInner().finally(()=>{this.refreshSessionPromise=void 0}))}async _refreshSessionInner(){var e,r,n;if((e=this.session)!=null&&e.refreshJwt)try{const i=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}});this.session={...this.session,accessJwt:i.data.accessJwt,refreshJwt:i.data.refreshJwt,handle:i.data.handle,did:i.data.did},this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"update",this.session)}catch(i){i instanceof la.XRPCError&&i.error&&["ExpiredToken","InvalidToken"].includes(i.error)&&(this.session=void 0,(n=this.persistSession)==null||n.call(this,"expired",void 0))}}_updateApiEndpoint(e){if((0,sT.isValidDidDoc)(e)){const r=(0,sT.getPdsEndpoint)(e);this.pdsUrl=r?new URL(r):void 0}else this.pdsUrl=void 0}}uo.CredentialSession=cm;function gAe(t){return la.errorResponseBody.safeParse(t).success}async function bAe(t,e,r){if(!e.includes(t.status))return!1;try{const n=await vAe(t,10240);return gAe(n)&&r.includes(n.error)}catch{return!1}}async function vAe(t,e=1/0){if(wAe(t)!=="application/json")throw new Error("Not JSON");if(EAe(t)>e)throw new Error("Response too large");return t.clone().json()}function EAe({headers:t}){return t.get("Content-Length")?Number(t.get("Content-Length")):NaN}function wAe({headers:t}){var e,r;return(r=(e=t.get("Content-Type"))==null?void 0:e.split(";")[0])==null?void 0:r.trim()}var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0});Kb.BskyAgent=void 0;const xAe=uo;class ly extends xAe.AtpAgent{clone(){if(this.constructor===ly){const e=new ly(this.sessionManager);return this.copyInto(e)}throw new TypeError("Cannot clone a subclass of BskyAgent")}}Kb.BskyAgent=ly;(function(t){var e=C&&C.__createBinding||(Object.create?function(w,y,b,E){E===void 0&&(E=b);var _=Object.getOwnPropertyDescriptor(y,b);(!_||("get"in _?!y.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return y[b]}}),Object.defineProperty(w,E,_)}:function(w,y,b,E){E===void 0&&(E=b),w[E]=y[b]}),r=C&&C.__exportStar||function(w,y){for(var b in w)b!=="default"&&!Object.prototype.hasOwnProperty.call(y,b)&&e(y,w,b)};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.asPredicate=t.schemas=t.parseLanguage=t.stringifyLex=t.lexToJson=t.jsonToLex=t.jsonStringToLex=t.BlobRef=t.AtUri=void 0;const n=Ia,i=A;var o=Bs;Object.defineProperty(t,"AtUri",{enumerable:!0,get:function(){return o.AtUri}});var s=Ia;Object.defineProperty(t,"BlobRef",{enumerable:!0,get:function(){return s.BlobRef}}),Object.defineProperty(t,"jsonStringToLex",{enumerable:!0,get:function(){return s.jsonStringToLex}}),Object.defineProperty(t,"jsonToLex",{enumerable:!0,get:function(){return s.jsonToLex}}),Object.defineProperty(t,"lexToJson",{enumerable:!0,get:function(){return s.lexToJson}}),Object.defineProperty(t,"stringifyLex",{enumerable:!0,get:function(){return s.stringifyLex}});var a=Pi;Object.defineProperty(t,"parseLanguage",{enumerable:!0,get:function(){return a.parseLanguage}}),r(KI,t),r(ap,t),r(n_,t),r(p,t);var c=A;Object.defineProperty(t,"schemas",{enumerable:!0,get:function(){return c.schemas}});var u=R;Object.defineProperty(t,"asPredicate",{enumerable:!0,get:function(){return u.asPredicate}}),r(Wl,t),r(Ob,t),r(Eu,t),r(Jn,t),r(WA,t),r(br,t),r($b,t);var d=_s;Object.defineProperty(t,"DEFAULT_LABEL_SETTINGS",{enumerable:!0,get:function(){return d.DEFAULT_LABEL_SETTINGS}}),Object.defineProperty(t,"LABELS",{enumerable:!0,get:function(){return d.LABELS}});var f=Kp;Object.defineProperty(t,"Agent",{enumerable:!0,get:function(){return f.Agent}});var h=uo;Object.defineProperty(t,"AtpAgent",{enumerable:!0,get:function(){return h.AtpAgent}});var m=uo;Object.defineProperty(t,"CredentialSession",{enumerable:!0,get:function(){return m.CredentialSession}});var g=Kb;Object.defineProperty(t,"BskyAgent",{enumerable:!0,get:function(){return g.BskyAgent}});var v=uo;Object.defineProperty(t,"default",{enumerable:!0,get:function(){return v.AtpAgent}}),t.lexicons=new n.Lexicons(i.lexicons)})(KE);class _Ae{constructor(){Oe(this,"oauthClient",null);Oe(this,"agent",null);Oe(this,"initializePromise",null)}async initialize(){return this.initializePromise?this.initializePromise:(this.initializePromise=this._doInitialize(),this.initializePromise)}async _doInitialize(){var e,r;try{console.log("=== INITIALIZING ATPROTO OAUTH CLIENT ===");const n=this.getClientId();console.log("Client ID:",n),this.oauthClient=await bE.BrowserOAuthClient.load({clientId:n,handleResolver:"https://bsky.social"}),console.log("BrowserOAuthClient initialized successfully with multi-PDS support");const i=await this.oauthClient.init();if(i!=null&&i.session){if(console.log("Existing session restored:",{did:i.session.did,handle:i.session.handle||"unknown",hasAccessJwt:!!i.session.accessJwt,hasRefreshJwt:!!i.session.refreshJwt}),console.log("Creating Agent with session:",i.session),console.log("Full session object:",i.session),console.log("Session type:",typeof i.session),console.log("Session constructor:",(r=(e=i.session)==null?void 0:e.constructor)==null?void 0:r.name),i.session){console.log("Session properties:");for(const s in i.session)console.log(` ${s}:`,i.session[s]);const o=Object.getOwnPropertyNames(Object.getPrototypeOf(i.session));console.log("Session methods:",o)}if(i.session){const o=await this.processSession(i.session);console.log("Session processed during initialization:",o)}}else console.log("No existing session found")}catch(n){throw console.error("Failed to initialize OAuth client:",n),this.initializePromise=null,n}}async processSession(e){var i,o,s;console.log("Processing session:",e),console.log("Session structure:"),console.log("- sub:",e.sub),console.log("- did:",e.did),console.log("- handle:",e.handle),console.log("- iss:",e.iss),console.log("- aud:",e.aud),e.agent&&(console.log("- agent:",e.agent),console.log("- agent.did:",(i=e.agent)==null?void 0:i.did),console.log("- agent.handle:",(o=e.agent)==null?void 0:o.handle));const r=e.sub||e.did;let n=e.handle||"unknown";try{this.agent=new KE.Agent(e),console.log("Agent created directly with session"),console.log("Agent after creation:"),console.log("- agent.did:",this.agent.did),console.log("- agent.session:",this.agent.session),this.agent.session&&(console.log("- agent.session.did:",this.agent.session.did),console.log("- agent.session.handle:",this.agent.session.handle))}catch{console.log("Failed to create Agent with session directly, trying dpopFetch method"),this.agent=new KE.Agent({service:((s=e.server)==null?void 0:s.serviceEndpoint)||"https://bsky.social",fetch:e.dpopFetch})}if(this._sessionInfo={did:r,handle:n},!n||n==="unknown"){console.log("Handle not in session, attempting to resolve...");try{await new Promise(c=>setTimeout(c,300));const a=await this.agent.getProfile({actor:r});if(a.data.handle)return n=a.data.handle,this._sessionInfo.handle=n,console.log("Successfully resolved handle via getProfile:",n),{did:r,handle:n}}catch(a){console.error("getProfile failed:",a)}try{const a=await this.agent.com.atproto.repo.describeRepo({repo:r});if(a.data.handle)return n=a.data.handle,this._sessionInfo.handle=n,console.log("Got handle from describeRepo:",n),{did:r,handle:n}}catch(a){console.error("describeRepo failed:",a)}r==="did:plc:uqzpqmrjnptsxezjx4xuh2mn"&&(n="syui.ai",this._sessionInfo.handle=n,console.log("Using hardcoded handle for known DID"))}return{did:r,handle:n}}getClientId(){const e="https://syui.ai/client-metadata.json";return console.log("Using client ID from environment:",e),e}detectPDSFromHandle(e){console.log("Detecting PDS for handle:",e);const r={"syu.is":"https://syu.is","bsky.social":"https://bsky.social"};for(const[n,i]of Object.entries(r))if(e.endsWith(`.${n}`))return console.log(`Handle ${e} mapped to PDS: ${i}`),i;return console.log(`Handle ${e} using default PDS: https://bsky.social`),"https://bsky.social"}async initiateOAuthFlow(e){try{if(console.log("=== INITIATING OAUTH FLOW ==="),this.oauthClient||(console.log("OAuth client not initialized, initializing now..."),await this.initialize()),!this.oauthClient)throw new Error("Failed to initialize OAuth client");if(!e&&(e=prompt("ハンドルを入力してください (例: user.bsky.social または user.syu.is):"),!e))throw new Error("Handle is required for authentication");console.log("Starting OAuth flow for handle:",e);const r=this.detectPDSFromHandle(e);console.log("Detected PDS for handle:",{handle:e,pdsUrl:r}),r!=="https://bsky.social"&&(console.log("Re-initializing OAuth client for custom PDS:",r),this.oauthClient=await bE.BrowserOAuthClient.load({clientId:this.getClientId(),handleResolver:r})),console.log("Calling oauthClient.authorize with handle:",e);try{const n=await this.oauthClient.authorize(e,{scope:"atproto transition:generic"});console.log("Authorization URL generated:",n.toString()),console.log("URL breakdown:",{protocol:n.protocol,hostname:n.hostname,pathname:n.pathname,search:n.search}),sessionStorage.setItem("oauth_debug_pre_redirect",JSON.stringify({timestamp:new Date().toISOString(),handle:e,authUrl:n.toString(),currentUrl:window.location.href})),console.log("About to redirect to:",n.toString()),window.location.href=n.toString()}catch(n){throw console.error("oauthClient.authorize failed:",n),console.error("Error details:",{name:n.name,message:n.message,stack:n.stack}),n}}catch(r){throw console.error("Failed to initiate OAuth flow:",r),new Error(`OAuth認証の開始に失敗しました: ${r}`)}}async handleOAuthCallback(){try{if(console.log("=== HANDLING OAUTH CALLBACK ==="),console.log("Current URL:",window.location.href),console.log("URL hash:",window.location.hash),console.log("URL search:",window.location.search),this.oauthClient||(console.log("OAuth client not initialized, initializing now..."),await this.initialize()),!this.oauthClient)throw new Error("Failed to initialize OAuth client");console.log("OAuth client ready, initializing to process callback...");const e=await this.oauthClient.init();if(console.log("OAuth callback processing result:",e),e!=null&&e.session)return this.processSession(e.session);console.log("No session found immediately, waiting..."),await new Promise(n=>setTimeout(n,1e3));const r=await this.checkSession();return r?(console.log("Session found after delay:",r),r):(console.warn("OAuth callback completed but no session was created"),null)}catch(e){throw console.error("OAuth callback handling failed:",e),console.error("Error details:",{name:e.name,message:e.message,stack:e.stack}),new Error(`OAuth認証の完了に失敗しました: ${e.message}`)}}async checkSession(){try{if(console.log("=== CHECK SESSION CALLED ==="),this.oauthClient||(console.log("No OAuth client, initializing..."),await this.initialize()),!this.oauthClient)return console.log("OAuth client initialization failed"),null;console.log("Running oauthClient.init() to check session...");const e=await this.oauthClient.init();return console.log("oauthClient.init() result:",e),e!=null&&e.session?this.processSession(e.session):null}catch(e){return console.error("Session check failed:",e),null}}getAgent(){return this.agent}getSession(){var e,r;if(console.log("getSession called"),console.log("Current state:",{hasAgent:!!this.agent,hasAgentSession:!!((e=this.agent)!=null&&e.session),hasOAuthClient:!!this.oauthClient,hasSessionInfo:!!this._sessionInfo}),(r=this.agent)!=null&&r.session){const n={did:this.agent.session.did,handle:this.agent.session.handle||"unknown",accessJwt:this.agent.session.accessJwt||"",refreshJwt:this.agent.session.refreshJwt||""};return console.log("Returning agent session:",n),n}if(this._sessionInfo){const n={did:this._sessionInfo.did,handle:this._sessionInfo.handle,accessJwt:"dpop-protected",refreshJwt:"dpop-protected"};return console.log("Returning stored session info:",n),n}return console.log("No session available"),null}isAuthenticated(){return!!this.agent||!!this._sessionInfo}getUser(){const e=this.getSession();return e?{did:e.did,handle:e.handle}:null}async logout(){try{if(console.log("=== LOGGING OUT ==="),this.agent=null,console.log("Agent cleared"),this.oauthClient){console.log("Clearing OAuth client session...");try{typeof this.oauthClient.signOut=="function"?(await this.oauthClient.signOut(),console.log("OAuth client signed out")):typeof this.oauthClient.revoke=="function"?(await this.oauthClient.revoke(),console.log("OAuth client revoked")):console.log("No explicit signOut method found on OAuth client")}catch(r){console.error("OAuth client logout error:",r)}this.oauthClient=null,this.initializePromise=null}localStorage.removeItem("atproto_session"),sessionStorage.clear();const e=[];for(let r=0;r<localStorage.length;r++){const n=localStorage.key(r);n&&(n.includes("oauth")||n.includes("atproto")||n.includes("session"))&&e.push(n)}e.forEach(r=>{console.log("Removing localStorage key:",r),localStorage.removeItem(r)}),console.log("=== LOGOUT COMPLETED ==="),setTimeout(()=>{window.location.reload()},100)}catch(e){console.error("Logout failed:",e)}}async saveCardToBox(e){const r=await this.checkSession();if(!r)throw new Error("認証が必要です。ログインしてください。");const n=r.did;try{if(console.log("Saving cards to atproto collection..."),console.log("Using DID:",n),!this.agent)throw new Error("Agentが初期化されていません。");const i="ai.card.box",o="self",s=new Date().toISOString(),a={$type:"ai.card.box",cards:e.map(u=>({id:u.id,cp:u.cp,status:u.status,skill:u.skill,owner_did:u.owner_did,obtained_at:u.obtained_at,is_unique:u.is_unique,unique_id:u.unique_id})),total_cards:e.length,updated_at:s,createdAt:s};console.log("PutRecord request:",{repo:n,collection:i,rkey:o,record:a});const c=await this.agent.com.atproto.repo.putRecord({repo:n,collection:i,rkey:o,record:a});console.log("カードデータをai.card.boxに保存しました:",c)}catch(i){throw console.error("カードボックス保存エラー:",i),i}}async getCardsFromBox(){const e=await this.checkSession();if(!e)throw new Error("認証が必要です。ログインしてください。");const r=e.did;try{if(console.log("Fetching cards from atproto collection..."),console.log("Using DID:",r),!this.agent)throw new Error("Agentが初期化されていません。");const n=await this.agent.com.atproto.repo.getRecord({repo:r,collection:"ai.card.box",rkey:"self"});return console.log("Cards from box response:",n),{records:[{uri:`at://${r}/ai.card.box/self`,cid:n.data.cid,value:n.data.value}]}}catch(n){if(console.error("カードボックス取得エラー:",n),n.toString().includes("RecordNotFound"))return{records:[]};throw n}}async deleteCardBox(){const e=await this.checkSession();if(!e)throw new Error("認証が必要です。ログインしてください。");const r=e.did;try{if(console.log("Deleting card box collection..."),console.log("Using DID:",r),!this.agent)throw new Error("Agentが初期化されていません。");const n=await this.agent.com.atproto.repo.deleteRecord({repo:r,collection:"ai.card.box",rkey:"self"});console.log("Card box deleted successfully:",n)}catch(n){throw console.error("カードボックス削除エラー:",n),n}}setManualTokens(e,r){console.warn("Manual token setting is not supported with official BrowserOAuthClient"),console.warn("Please use the proper OAuth flow instead");const n={did:"did:plc:uqzpqmrjnptsxezjx4xuh2mn",handle:"syui.ai",accessJwt:e,refreshJwt:r};localStorage.setItem("atproto_session",JSON.stringify(n)),console.log("Manual tokens stored in localStorage for backward compatibility")}saveSessionToStorage(e){console.warn("saveSessionToStorage is deprecated with BrowserOAuthClient"),localStorage.setItem("atproto_session",JSON.stringify(e))}async backupUserCards(e){return this.saveCardToBox(e)}}const Cr=new _Ae;function RAe(t){try{const r=t.replace(/^https?:\/\//,"").split(".");if(r.length<2)throw new Error("Invalid host format");const i=r.reverse().join(".");return{comment:i,user:`${i}.user`,chat:`${i}.chat`}}catch(e){return console.warn("Failed to generate collection names from host:",t,e),{comment:"ai.syui.log",user:"ai.syui.log.user",chat:"ai.syui.log.chat"}}}function AAe(){const e=window.location.pathname.match(/\/posts\/([^/]+)\.html$/);return e?e[1]:void 0}function SAe(){const t="https://syui.ai",e="did:plc:uqzpqmrjnptsxezjx4xuh2mn";RAe(t);const r={comment:"ai.syui.log",user:"ai.syui.log.user",chat:"ai.syui.log.chat"},n=AAe(),i=!0,o=!0,s="ollama",a="gemma3:2b",c="https://ollama.syui.ai",u="https://public.api.bsky.app";return console.log("App configuration:",{host:t,adminDid:e,collections:r,rkey:n||"none (not on post page)",ai:{enabled:i,askAi:o,provider:s,model:a,host:c},bskyPublicApi:u}),{adminDid:e,collections:r,host:t,rkey:n,aiEnabled:i,aiAskAi:o,aiProvider:s,aiModel:a,aiHost:c,bskyPublicApi:u}}const Te=SAe(),CAe=({user:t,isEnabled:e})=>{const[r,n]=k.useState([]),[i,o]=k.useState(!1),[s,a]=k.useState(!1),[c,u]=k.useState(null),d={enabled:!0,askAi:!0,provider:"ollama",model:"gemma3:2b",host:"https://ollama.syui.ai",systemPrompt:"you are a helpful ai assistant trained on this blog's content. you can answer questions about the articles, provide insights, and help users understand the topics discussed.",aiDid:"did:plc:4hqjfn7m6n5hno3doamuhgef",bskyPublicApi:"https://public.api.bsky.app"};k.useEffect(()=>{(async()=>{console.log("=== AI PROFILE FETCH START ==="),console.log("AI DID:",d.aiDid);try{const m=Cr.getAgent();if(m){console.log("Fetching AI profile with agent for DID:",d.aiDid);const v=await m.getProfile({actor:d.aiDid});console.log("AI profile fetched successfully:",v.data);const w={did:d.aiDid,handle:v.data.handle,displayName:v.data.displayName,avatar:v.data.avatar,description:v.data.description};console.log("Setting aiProfile to:",w),u(w),window.dispatchEvent(new CustomEvent("aiProfileLoaded",{detail:w})),console.log("=== AI PROFILE FETCH SUCCESS (AGENT) ===");return}console.log("No agent available, trying public API for AI profile");const g=await fetch(`${d.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(d.aiDid)}`);if(g.ok){const v=await g.json();console.log("AI profile fetched via public API:",v);const w={did:d.aiDid,handle:v.handle,displayName:v.displayName,avatar:v.avatar,description:v.description};console.log("Setting aiProfile to:",w),u(w),window.dispatchEvent(new CustomEvent("aiProfileLoaded",{detail:w})),console.log("=== AI PROFILE FETCH SUCCESS (PUBLIC API) ===");return}else console.error("Public API failed with status:",g.status)}catch(m){console.error("Failed to fetch AI profile:",m),u(null)}console.log("=== AI PROFILE FETCH FAILED ===")})()},[d.aiDid]),k.useEffect(()=>{if(!e)return;const h=async m=>{if(!(!t||!m.detail||!m.detail.question||s||!c)){console.log("AIChat received question:",m.detail.question),console.log("Current aiProfile state:",c),a(!0);try{await f(m.detail.question)}finally{a(!1)}}};return setTimeout(()=>{window.addEventListener("postAIQuestion",h),console.log("AIChat event listener registered"),window.dispatchEvent(new CustomEvent("aiChatReady"))},100),()=>{window.removeEventListener("postAIQuestion",h)}},[t,e,s,c]);const f=async h=>{if(!(!t||!c)){o(!0);try{const m=Cr.getAgent();if(!m)throw new Error("No agent available");const g=new Date,v=g.toISOString().replace(/[:.]/g,"-"),w={$type:Te.collections.chat,question:h,url:window.location.href,createdAt:g.toISOString(),author:{did:t.did,handle:t.handle,avatar:t.avatar,displayName:t.displayName||t.handle},context:{page_title:document.title,page_url:window.location.href}};await m.api.com.atproto.repo.putRecord({repo:t.did,collection:Te.collections.chat,rkey:v,record:w}),console.log("Question posted to ATProto");const y=await m.api.com.atproto.repo.listRecords({repo:t.did,collection:Te.collections.chat,limit:10});let b="";y.data.records&&(b=y.data.records.map(B=>B.value.question?`User: ${B.value.question}`:B.value.answer?`AI: ${B.value.answer}`:"").filter(Boolean).join(`
`));let E="";if(d.provider==="ollama"){const B=`${d.systemPrompt}
Question: ${h}
Answer:`,I=await fetch(`${d.host}/api/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d.model,prompt:B,stream:!1,options:{temperature:.9,top_p:.9,num_predict:80,repeat_penalty:1.1}})});if(!I.ok)throw new Error("AI API request failed");E=(await I.json()).response}window.dispatchEvent(new CustomEvent("aiResponseReceived",{detail:{answer:E,aiProfile:c,timestamp:g.toISOString()}}));const _=g.toISOString().replace(/[:.]/g,"-")+"-answer";console.log("=== SAVING AI ANSWER ==="),console.log("Current aiProfile:",c);const T={$type:Te.collections.chat,answer:E,question_rkey:v,url:window.location.href,createdAt:g.toISOString(),author:{did:c.did,handle:c.handle,displayName:c.displayName,avatar:c.avatar}};console.log("Answer record to save:",T),m.api.com.atproto.repo.putRecord({repo:t.did,collection:Te.collections.chat,rkey:_,record:T}).catch(B=>{console.error("Failed to save AI response to ATProto:",B)})}catch(m){console.error("Failed to generate AI response:",m),window.dispatchEvent(new CustomEvent("aiResponseError",{detail:{error:"AI応答の生成に失敗しました"}}))}finally{o(!1)}}};return null};function b3(t,e){return function(){return t.apply(e,arguments)}}const{toString:TAe}=Object.prototype,{getPrototypeOf:nS}=Object,{iterator:Mb,toStringTag:v3}=Symbol,Nb=(t=>e=>{const r=TAe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ii=t=>(t=t.toLowerCase(),e=>Nb(e)===t),zb=t=>e=>typeof e===t,{isArray:xu}=Array,ef=zb("undefined");function kAe(t){return t!==null&&!ef(t)&&t.constructor!==null&&!ef(t.constructor)&&Ur(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const E3=ii("ArrayBuffer");function PAe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&E3(t.buffer),e}const LAe=zb("string"),Ur=zb("function"),w3=zb("number"),Fb=t=>t!==null&&typeof t=="object",DAe=t=>t===!0||t===!1,um=t=>{if(Nb(t)!=="object")return!1;const e=nS(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(v3 in t)&&!(Mb in t)},BAe=ii("Date"),IAe=ii("File"),jAe=ii("Blob"),OAe=ii("FileList"),UAe=t=>Fb(t)&&Ur(t.pipe),$Ae=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ur(t.append)&&((e=Nb(t))==="formdata"||e==="object"&&Ur(t.toString)&&t.toString()==="[object FormData]"))},VAe=ii("URLSearchParams"),[KAe,MAe,NAe,zAe]=["ReadableStream","Request","Response","Headers"].map(ii),FAe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mp(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),xu(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(n=0;n<s;n++)a=o[n],e.call(null,t[a],a,t)}}function x3(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const ga=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_3=t=>!ef(t)&&t!==ga;function qE(){const{caseless:t}=_3(this)&&this||{},e={},r=(n,i)=>{const o=t&&x3(e,i)||i;um(e[o])&&um(n)?e[o]=qE(e[o],n):um(n)?e[o]=qE({},n):xu(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Mp(arguments[n],r);return e}const qAe=(t,e,r,{allOwnKeys:n}={})=>(Mp(e,(i,o)=>{r&&Ur(i)?t[o]=b3(i,r):t[o]=i},{allOwnKeys:n}),t),GAe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),HAe=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},WAe=(t,e,r,n)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&nS(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},XAe=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},JAe=t=>{if(!t)return null;if(xu(t))return t;let e=t.length;if(!w3(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ZAe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nS(Uint8Array)),QAe=(t,e)=>{const n=(t&&t[Mb]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},YAe=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},eSe=ii("HTMLFormElement"),tSe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),lT=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),rSe=ii("RegExp"),R3=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Mp(r,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(n[o]=s||i)}),Object.defineProperties(t,n)},nSe=t=>{R3(t,(e,r)=>{if(Ur(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Ur(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},iSe=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return xu(t)?n(t):n(String(t).split(e)),r},oSe=()=>{},sSe=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function aSe(t){return!!(t&&Ur(t.append)&&t[v3]==="FormData"&&t[Mb])}const lSe=t=>{const e=new Array(10),r=(n,i)=>{if(Fb(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=xu(n)?[]:{};return Mp(n,(s,a)=>{const c=r(s,i+1);!ef(c)&&(o[a]=c)}),e[i]=void 0,o}}return n};return r(t,0)},cSe=ii("AsyncFunction"),uSe=t=>t&&(Fb(t)||Ur(t))&&Ur(t.then)&&Ur(t.catch),A3=((t,e)=>t?setImmediate:e?((r,n)=>(ga.addEventListener("message",({source:i,data:o})=>{i===ga&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),ga.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ur(ga.postMessage)),dSe=typeof queueMicrotask<"u"?queueMicrotask.bind(ga):typeof process<"u"&&process.nextTick||A3,fSe=t=>t!=null&&Ur(t[Mb]),j={isArray:xu,isArrayBuffer:E3,isBuffer:kAe,isFormData:$Ae,isArrayBufferView:PAe,isString:LAe,isNumber:w3,isBoolean:DAe,isObject:Fb,isPlainObject:um,isReadableStream:KAe,isRequest:MAe,isResponse:NAe,isHeaders:zAe,isUndefined:ef,isDate:BAe,isFile:IAe,isBlob:jAe,isRegExp:rSe,isFunction:Ur,isStream:UAe,isURLSearchParams:VAe,isTypedArray:ZAe,isFileList:OAe,forEach:Mp,merge:qE,extend:qAe,trim:FAe,stripBOM:GAe,inherits:HAe,toFlatObject:WAe,kindOf:Nb,kindOfTest:ii,endsWith:XAe,toArray:JAe,forEachEntry:QAe,matchAll:YAe,isHTMLForm:eSe,hasOwnProperty:lT,hasOwnProp:lT,reduceDescriptors:R3,freezeMethods:nSe,toObjectSet:iSe,toCamelCase:tSe,noop:oSe,toFiniteNumber:sSe,findKey:x3,global:ga,isContextDefined:_3,isSpecCompliantForm:aSe,toJSONObject:lSe,isAsyncFn:cSe,isThenable:uSe,setImmediate:A3,asap:dSe,isIterable:fSe};function he(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}j.inherits(he,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}});const S3=he.prototype,C3={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{C3[t]={value:t}});Object.defineProperties(he,C3);Object.defineProperty(S3,"isAxiosError",{value:!0});he.from=(t,e,r,n,i,o)=>{const s=Object.create(S3);return j.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),he.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const pSe=null;function GE(t){return j.isPlainObject(t)||j.isArray(t)}function T3(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function cT(t,e,r){return t?t.concat(e).map(function(i,o){return i=T3(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function hSe(t){return j.isArray(t)&&!t.some(GE)}const mSe=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function qb(t,e,r){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!j.isUndefined(w[v])});const n=r.metaTokens,i=r.visitor||d,o=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(e);if(!j.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(j.isDate(g))return g.toISOString();if(!c&&j.isBlob(g))throw new he("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(g)||j.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,v,w){let y=g;if(g&&!w&&typeof g=="object"){if(j.endsWith(v,"{}"))v=n?v:v.slice(0,-2),g=JSON.stringify(g);else if(j.isArray(g)&&hSe(g)||(j.isFileList(g)||j.endsWith(v,"[]"))&&(y=j.toArray(g)))return v=T3(v),y.forEach(function(E,_){!(j.isUndefined(E)||E===null)&&e.append(s===!0?cT([v],_,o):s===null?v:v+"[]",u(E))}),!1}return GE(g)?!0:(e.append(cT(w,v,o),u(g)),!1)}const f=[],h=Object.assign(mSe,{defaultVisitor:d,convertValue:u,isVisitable:GE});function m(g,v){if(!j.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(g),j.forEach(g,function(y,b){(!(j.isUndefined(y)||y===null)&&i.call(e,y,j.isString(b)?b.trim():b,v,h))===!0&&m(y,v?v.concat(b):[b])}),f.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return m(t),e}function uT(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function iS(t,e){this._pairs=[],t&&qb(t,this,e)}const k3=iS.prototype;k3.append=function(e,r){this._pairs.push([e,r])};k3.toString=function(e){const r=e?function(n){return e.call(this,n,uT)}:uT;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function ySe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function P3(t,e,r){if(!e)return t;const n=r&&r.encode||ySe;j.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(e,r):o=j.isURLSearchParams(e)?e.toString():new iS(e,r).toString(n),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class dT{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){j.forEach(this.handlers,function(n){n!==null&&e(n)})}}const L3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gSe=typeof URLSearchParams<"u"?URLSearchParams:iS,bSe=typeof FormData<"u"?FormData:null,vSe=typeof Blob<"u"?Blob:null,ESe={isBrowser:!0,classes:{URLSearchParams:gSe,FormData:bSe,Blob:vSe},protocols:["http","https","file","blob","url","data"]},oS=typeof window<"u"&&typeof document<"u",HE=typeof navigator=="object"&&navigator||void 0,wSe=oS&&(!HE||["ReactNative","NativeScript","NS"].indexOf(HE.product)<0),xSe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_Se=oS&&window.location.href||"http://localhost",RSe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oS,hasStandardBrowserEnv:wSe,hasStandardBrowserWebWorkerEnv:xSe,navigator:HE,origin:_Se},Symbol.toStringTag,{value:"Module"})),or={...RSe,...ESe};function ASe(t,e){return qb(t,new or.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return or.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function SSe(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function CSe(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function D3(t){function e(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=r.length;return s=!s&&j.isArray(i)?i.length:s,c?(j.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!j.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&j.isArray(i[s])&&(i[s]=CSe(i[s])),!a)}if(j.isFormData(t)&&j.isFunction(t.entries)){const r={};return j.forEachEntry(t,(n,i)=>{e(SSe(n),i,r,0)}),r}return null}function TSe(t,e,r){if(j.isString(t))try{return(e||JSON.parse)(t),j.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Np={transitional:L3,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i?JSON.stringify(D3(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e)||j.isReadableStream(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ASe(e,this.formSerializer).toString();if((a=j.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return qb(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),TSe(e)):e}],transformResponse:[function(e){const r=this.transitional||Np.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(j.isResponse(e)||j.isReadableStream(e))return e;if(e&&j.isString(e)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?he.from(a,he.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:or.classes.FormData,Blob:or.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],t=>{Np.headers[t]={}});const kSe=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),PSe=t=>{const e={};let r,n,i;return t&&t.split(`
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&kSe[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},fT=Symbol("internals");function Gu(t){return t&&String(t).trim().toLowerCase()}function dm(t){return t===!1||t==null?t:j.isArray(t)?t.map(dm):String(t)}function LSe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const DSe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function a0(t,e,r,n,i){if(j.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!j.isString(e)){if(j.isString(n))return e.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(e)}}function BSe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function ISe(t,e){const r=j.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,s){return this[n].call(this,e,i,o,s)},configurable:!0})})}let $r=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function o(a,c,u){const d=Gu(c);if(!d)throw new Error("header name must be a non-empty string");const f=j.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=dm(a))}const s=(a,c)=>j.forEach(a,(u,d)=>o(u,d,c));if(j.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(j.isString(e)&&(e=e.trim())&&!DSe(e))s(PSe(e),r);else if(j.isObject(e)&&j.isIterable(e)){let a={},c,u;for(const d of e){if(!j.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[u=d[0]]=(c=a[u])?j.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}s(a,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=Gu(e),e){const n=j.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return LSe(i);if(j.isFunction(r))return r.call(this,i,n);if(j.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Gu(e),e){const n=j.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||a0(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function o(s){if(s=Gu(s),s){const a=j.findKey(n,s);a&&(!r||a0(n,n[a],a,r))&&(delete n[a],i=!0)}}return j.isArray(e)?e.forEach(o):o(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!e||a0(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const r=this,n={};return j.forEach(this,(i,o)=>{const s=j.findKey(n,o);if(s){r[s]=dm(i),delete r[o];return}const a=e?BSe(o):String(o).trim();a!==o&&delete r[o],r[a]=dm(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return j.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[fT]=this[fT]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Gu(s);n[a]||(ISe(i,s),n[a]=!0)}return j.isArray(e)?e.forEach(o):o(e),this}};$r.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors($r.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});j.freezeMethods($r);function l0(t,e){const r=this||Np,n=e||r,i=$r.from(n.headers);let o=n.data;return j.forEach(t,function(a){o=a.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function B3(t){return!!(t&&t.__CANCEL__)}function _u(t,e,r){he.call(this,t??"canceled",he.ERR_CANCELED,e,r),this.name="CanceledError"}j.inherits(_u,he,{__CANCEL__:!0});function I3(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function jSe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function OSe(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=n[o];s||(s=u),r[i]=c,n[i]=u;let f=o,h=0;for(;f!==i;)h+=r[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const m=d&&u-d;return m?Math.round(h*1e3/m):void 0}}function USe(t,e){let r=0,n=1e3/e,i,o;const s=(u,d=Date.now())=>{r=d,i=null,o&&(clearTimeout(o),o=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-r;f>=n?s(u,d):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},n-f)))},()=>i&&s(i)]}const cy=(t,e,r=3)=>{let n=0;const i=OSe(50,250);return USe(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-n,u=i(c),d=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},pT=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},hT=t=>(...e)=>j.asap(()=>t(...e)),$Se=or.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,or.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(or.origin),or.navigator&&/(msie|trident)/i.test(or.navigator.userAgent)):()=>!0,VSe=or.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];j.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),j.isString(n)&&s.push("path="+n),j.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KSe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function MSe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function j3(t,e,r){let n=!KSe(e);return t&&(n||r==!1)?MSe(t,e):e}const mT=t=>t instanceof $r?{...t}:t;function Oa(t,e){e=e||{};const r={};function n(u,d,f,h){return j.isPlainObject(u)&&j.isPlainObject(d)?j.merge.call({caseless:h},u,d):j.isPlainObject(d)?j.merge({},d):j.isArray(d)?d.slice():d}function i(u,d,f,h){if(j.isUndefined(d)){if(!j.isUndefined(u))return n(void 0,u,f,h)}else return n(u,d,f,h)}function o(u,d){if(!j.isUndefined(d))return n(void 0,d)}function s(u,d){if(j.isUndefined(d)){if(!j.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function a(u,d,f){if(f in e)return n(u,d);if(f in t)return n(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d,f)=>i(mT(u),mT(d),f,!0)};return j.forEach(Object.keys(Object.assign({},t,e)),function(d){const f=c[d]||i,h=f(t[d],e[d],d);j.isUndefined(h)&&f!==a||(r[d]=h)}),r}const O3=t=>{const e=Oa({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=$r.from(s),e.url=P3(j3(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(j.isFormData(r)){if(or.hasStandardBrowserEnv||or.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(or.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(e)),n||n!==!1&&$Se(e.url))){const u=i&&o&&VSe.read(o);u&&s.set(i,u)}return e},NSe=typeof XMLHttpRequest<"u",zSe=NSe&&function(t){return new Promise(function(r,n){const i=O3(t);let o=i.data;const s=$r.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,d,f,h,m,g;function v(){m&&m(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function y(){if(!w)return;const E=$r.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:E,config:t,request:w};I3(function(I){r(I),v()},function(I){n(I),v()},T),w=null}"onloadend"in w?w.onloadend=y:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(y)},w.onabort=function(){w&&(n(new he("Request aborted",he.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||L3;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),n(new he(_,T.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,t,w)),w=null},o===void 0&&s.setContentType(null),"setRequestHeader"in w&&j.forEach(s.toJSON(),function(_,T){w.setRequestHeader(T,_)}),j.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),a&&a!=="json"&&(w.responseType=i.responseType),u&&([h,g]=cy(u,!0),w.addEventListener("progress",h)),c&&w.upload&&([f,m]=cy(c),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(d=E=>{w&&(n(!E||E.type?new _u(null,t,w):E),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const b=jSe(i.url);if(b&&or.protocols.indexOf(b)===-1){n(new he("Unsupported protocol "+b+":",he.ERR_BAD_REQUEST,t));return}w.send(o||null)})},FSe=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const o=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;n.abort(d instanceof he?d:new _u(d instanceof Error?d.message:d))}};let s=e&&setTimeout(()=>{s=null,o(new he(`timeout ${e} of ms exceeded`,he.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>j.asap(a),c}},qSe=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},GSe=async function*(t,e){for await(const r of HSe(t))yield*qSe(r,e)},HSe=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},yT=(t,e,r,n)=>{const i=GSe(t,e);let o=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){a(),c.close();return}let f=d.byteLength;if(r){let h=o+=f;r(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},Gb=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",U3=Gb&&typeof ReadableStream=="function",WSe=Gb&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),$3=(t,...e)=>{try{return!!t(...e)}catch{return!1}},XSe=U3&&$3(()=>{let t=!1;const e=new Request(or.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),gT=64*1024,WE=U3&&$3(()=>j.isReadableStream(new Response("").body)),uy={stream:WE&&(t=>t.body)};Gb&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!uy[e]&&(uy[e]=j.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new he(`Response type '${e}' is not supported`,he.ERR_NOT_SUPPORT,n)})})})(new Response);const JSe=async t=>{if(t==null)return 0;if(j.isBlob(t))return t.size;if(j.isSpecCompliantForm(t))return(await new Request(or.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(j.isArrayBufferView(t)||j.isArrayBuffer(t))return t.byteLength;if(j.isURLSearchParams(t)&&(t=t+""),j.isString(t))return(await WSe(t)).byteLength},ZSe=async(t,e)=>{const r=j.toFiniteNumber(t.getContentLength());return r??JSe(e)},QSe=Gb&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=O3(t);u=u?(u+"").toLowerCase():"text";let m=FSe([i,o&&o.toAbortSignal()],s),g;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let w;try{if(c&&XSe&&r!=="get"&&r!=="head"&&(w=await ZSe(d,n))!==0){let T=new Request(e,{method:"POST",body:n,duplex:"half"}),B;if(j.isFormData(n)&&(B=T.headers.get("content-type"))&&d.setContentType(B),T.body){const[I,O]=pT(w,cy(hT(c)));n=yT(T.body,gT,I,O)}}j.isString(f)||(f=f?"include":"omit");const y="credentials"in Request.prototype;g=new Request(e,{...h,signal:m,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:y?f:void 0});let b=await fetch(g);const E=WE&&(u==="stream"||u==="response");if(WE&&(a||E&&v)){const T={};["status","statusText","headers"].forEach(F=>{T[F]=b[F]});const B=j.toFiniteNumber(b.headers.get("content-length")),[I,O]=a&&pT(B,cy(hT(a),!0))||[];b=new Response(yT(b.body,gT,I,()=>{O&&O(),v&&v()}),T)}u=u||"text";let _=await uy[j.findKey(uy,u)||"text"](b,t);return!E&&v&&v(),await new Promise((T,B)=>{I3(T,B,{data:_,headers:$r.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:g})})}catch(y){throw v&&v(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,t,g),{cause:y.cause||y}):he.from(y,y&&y.code,t,g)}}),XE={http:pSe,xhr:zSe,fetch:QSe};j.forEach(XE,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const bT=t=>`- ${t}`,YSe=t=>j.isFunction(t)||t===null||t===!1,V3={getAdapter:t=>{t=j.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){r=t[o];let s;if(n=r,!YSe(r)&&(n=XE[(s=String(r)).toLowerCase()],n===void 0))throw new he(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+o]=n}if(!n){const o=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
`+o.map(bT).join(`
`):" "+bT(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:XE};function c0(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _u(null,t)}function vT(t){return c0(t),t.headers=$r.from(t.headers),t.data=l0.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),V3.getAdapter(t.adapter||Np.adapter)(t).then(function(n){return c0(t),n.data=l0.call(t,t.transformResponse,n),n.headers=$r.from(n.headers),n},function(n){return B3(n)||(c0(t),n&&n.response&&(n.response.data=l0.call(t,t.transformResponse,n.response),n.response.headers=$r.from(n.response.headers))),Promise.reject(n)})}const K3="1.9.0",Hb={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Hb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ET={};Hb.transitional=function(e,r,n){function i(o,s){return"[Axios v"+K3+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(e===!1)throw new he(i(s," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!ET[s]&&(ET[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,s,a):!0}};Hb.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function e1e(t,e,r){if(typeof t!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new he("option "+o+" must be "+c,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const fm={assertOptions:e1e,validators:Hb},li=fm.validators;let Aa=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dT,response:new dT}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Oa(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&fm.assertOptions(n,{silentJSONParsing:li.transitional(li.boolean),forcedJSONParsing:li.transitional(li.boolean),clarifyTimeoutError:li.transitional(li.boolean)},!1),i!=null&&(j.isFunction(i)?r.paramsSerializer={serialize:i}:fm.assertOptions(i,{encode:li.function,serialize:li.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),fm.assertOptions(r,{baseUrl:li.spelling("baseURL"),withXsrfToken:li.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&j.merge(o.common,o[r.method]);o&&j.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),r.headers=$r.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(c=c&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let d,f=0,h;if(!c){const g=[vT.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,d=Promise.resolve(r);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let m=r;for(f=0;f<h;){const g=a[f++],v=a[f++];try{m=g(m)}catch(w){v.call(this,w);break}}try{d=vT.call(this,m)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=Oa(this.defaults,e);const r=j3(e.baseURL,e.url,e.allowAbsoluteUrls);return P3(r,e.params,e.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(e){Aa.prototype[e]=function(r,n){return this.request(Oa(n||{},{method:e,url:r,data:(n||{}).data}))}});j.forEach(["post","put","patch"],function(e){function r(n){return function(o,s,a){return this.request(Oa(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Aa.prototype[e]=r(),Aa.prototype[e+"Form"]=r(!0)});let t1e=class M3{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,a){n.reason||(n.reason=new _u(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new M3(function(i){e=i}),cancel:e}}};function r1e(t){return function(r){return t.apply(null,r)}}function n1e(t){return j.isObject(t)&&t.isAxiosError===!0}const JE={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(JE).forEach(([t,e])=>{JE[e]=t});function N3(t){const e=new Aa(t),r=b3(Aa.prototype.request,e);return j.extend(r,Aa.prototype,e,{allOwnKeys:!0}),j.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return N3(Oa(t,i))},r}const qe=N3(Np);qe.Axios=Aa;qe.CanceledError=_u;qe.CancelToken=t1e;qe.isCancel=B3;qe.VERSION=K3;qe.toFormData=qb;qe.AxiosError=he;qe.Cancel=qe.CanceledError;qe.all=function(e){return Promise.all(e)};qe.spread=r1e;qe.isAxiosError=n1e;qe.mergeConfig=Oa;qe.AxiosHeaders=$r;qe.formToJSON=t=>D3(j.isHTMLForm(t)?new FormData(t):t);qe.getAdapter=V3.getAdapter;qe.HttpStatusCode=JE;qe.default=qe;const{Axios:DLe,AxiosError:BLe,CanceledError:ILe,isCancel:jLe,CancelToken:OLe,VERSION:ULe,all:$Le,Cancel:VLe,isAxiosError:KLe,spread:MLe,toFormData:NLe,AxiosHeaders:zLe,HttpStatusCode:FLe,formToJSON:qLe,getAdapter:GLe,mergeConfig:HLe}=qe,u0="/api/v1";class i1e{constructor(){Oe(this,"token",null);Oe(this,"user",null);this.token=localStorage.getItem("ai_card_token"),this.token&&(qe.defaults.headers.common.Authorization=`Bearer ${this.token}`)}async login(e,r){try{const n=await qe.post(`${u0}/auth/login`,{identifier:e,password:r}),{access_token:i,did:o,handle:s}=n.data;return this.token=i,localStorage.setItem("ai_card_token",i),qe.defaults.headers.common.Authorization=`Bearer ${i}`,this.user={did:o,handle:s},n.data}catch{throw new Error("Login failed")}}async logout(){try{await qe.post(`${u0}/auth/logout`)}catch{}this.token=null,this.user=null,localStorage.removeItem("ai_card_token"),delete qe.defaults.headers.common.Authorization}async verify(){if(!this.token)return null;try{const e=await qe.get(`${u0}/auth/verify`);if(e.data.valid)return this.user={did:e.data.did,handle:e.data.handle},this.user}catch{this.logout()}return null}getUser(){return this.user}isAuthenticated(){return this.token!==null}}const wT=new i1e;function o1e(){if(console.log("APP COMPONENT LOADED - Console working!"),console.log("Current timestamp:",new Date().toISOString()),console.log("IMMEDIATE URL CHECK:"),console.log("- href:",window.location.href),console.log("- pathname:",window.location.pathname),console.log("- search:",window.location.search),console.log("- hash:",window.location.hash),window.location.search.includes("code=")||window.location.search.includes("state=")){const U=`OAuth callback detected!
URL: ${window.location.href}
Search: ${window.location.search}`;alert(U),console.log("OAuth callback URL detected!")}else{const U=sessionStorage.getItem("pre_oauth_url"),J=sessionStorage.getItem("oauth_state"),pe=sessionStorage.getItem("oauth_code_verifier");console.log("=== OAUTH SESSION STORAGE CHECK ==="),console.log("Pre-OAuth URL:",U),console.log("Stored state:",J),console.log("Stored code verifier:",pe?"Present":"Missing"),console.log("=== END SESSION STORAGE CHECK ===")}const[t,e]=k.useState(null),[r,n]=k.useState(!0),[i,o]=k.useState([]),[s,a]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(null),[h,m]=k.useState(""),[g,v]=k.useState(""),[w,y]=k.useState(!1),[b,E]=k.useState([]),[_,T]=k.useState(null),[B,I]=k.useState("comments"),[O,F]=k.useState([]);k.useEffect(()=>{(()=>{const ne=localStorage.getItem("cached_comments_"+window.location.pathname);if(ne){const{comments:ye,timestamp:le}=JSON.parse(ne);if(Date.now()-le<3e5)return o(ye),!0}return!1})()?console.log("Cached comments loaded successfully"):(console.log("No cached comments found, loading from ATProto..."),Ke());const J=()=>{const ne=new URLSearchParams(window.location.search);ne.has("code")&&ne.has("state")&&window.location.reload()};window.addEventListener("popstate",J);const pe=new URLSearchParams(window.location.search);return pe.has("code")&&pe.has("state")?void 0:((async()=>{console.log("Checking OAuth session...");const ne=await Cr.checkSession();if(console.log("OAuth checkSession result:",ne),ne){console.log("OAuth session found:",ne);const le=(ne.handle!==ne.did,ne.handle),Me=await re(ne.did,le);e(Me),console.log("OAuth session found, loading all comments..."),Ke(),Rt(Me.did),Me.did===Te.adminDid&&tt(),n(!1);return}else console.log("No OAuth session found");const ye=await wT.verify();ye&&(e(ye),console.log("Legacy auth session found, loading all comments..."),Ke(),ye.did===Te.adminDid&&tt()),n(!1),console.log("No auth session found, loading all comments anyway..."),Ke()})(),()=>{window.removeEventListener("popstate",J)})},[]);const re=async(U,J)=>{try{const pe=Cr.getAgent();if(pe){const Re=await pe.getProfile({actor:J});return{did:U,handle:J,avatar:Re.data.avatar,displayName:Re.data.displayName||J}}}catch(pe){console.error("Failed to get user profile:",pe)}return{did:U,handle:J,avatar:ze(J),displayName:J}},ze=U=>`https://via.placeholder.com/48x48/1185fe/ffffff?text=${U?U.charAt(0).toUpperCase():"U"}`,Rt=async U=>{try{console.log("Loading AI chat history for DID:",U);const J=Cr.getAgent();if(!J){console.log("No agent available");return}const pe=await J.api.com.atproto.repo.listRecords({repo:U,collection:Te.collections.chat,limit:100});console.log("AI chat history loaded:",pe.data);const Re=pe.data.records||[],Ee=Re.filter(ye=>{var le,Me,Ne;return ye.value.answer?((le=ye.value.author)==null?void 0:le.handle)&&((Me=ye.value.author)==null?void 0:Me.handle)!=="ai-assistant"&&((Ne=ye.value.author)==null?void 0:Ne.displayName)!=="AI Assistant":!0});console.log(`Filtered ${Re.length} records to ${Ee.length} valid records`);const ne=Ee.sort((ye,le)=>new Date(ye.value.createdAt).getTime()-new Date(le.value.createdAt).getTime());F(ne)}catch(J){console.error("Failed to load AI chat history:",J),F([])}},Nt=async()=>{try{const U=Te.adminDid;console.log("Fetching user list from admin DID:",U);const J=await fetch(`https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=${encodeURIComponent(U)}&collection=${encodeURIComponent(Te.collections.user)}&limit=100`);if(!J.ok)return console.warn("Failed to fetch user list from admin, using default users. Status:",J.status),sn();const Re=(await J.json()).records||[];if(console.log("User records found:",Re.length),Re.length===0)return console.log("No user records found, using default users"),sn();const Ee=[];for(const ne of Re)if(ne.value.users){const ye=await Promise.all(ne.value.users.map(async le=>{if(le.did&&le.did.includes("-placeholder")){console.log(`Resolving placeholder DID for ${le.handle}`);try{const Me=await fetch(`${Te.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(le.handle)}`);if(Me.ok){const Ne=await Me.json();if(Ne.did)return console.log(`Resolved ${le.handle}: ${le.did} -> ${Ne.did}`),{...le,did:Ne.did}}}catch(Me){console.warn(`Failed to resolve DID for ${le.handle}:`,Me)}}return le}));Ee.push(...ye)}return console.log("Loaded and resolved users from admin records:",Ee),Ee}catch(U){return console.warn("Failed to load users from records, using defaults:",U),sn()}},tt=async()=>{try{console.log("Loading user list records...");const U=Te.adminDid,J=await fetch(`https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=${encodeURIComponent(U)}&collection=${encodeURIComponent(Te.collections.user)}&limit=100`);if(!J.ok){console.warn("Failed to fetch user list records"),E([]);return}const Ee=((await J.json()).records||[]).sort((ne,ye)=>new Date(ye.value.createdAt).getTime()-new Date(ne.value.createdAt).getTime());console.log(`Loaded ${Ee.length} user list records`),E(Ee)}catch(U){console.error("Failed to load user list records:",U),E([])}},sn=()=>{const U=[{did:Te.adminDid,handle:"syui.ai",pds:"https://bsky.social"}];return t&&t.did&&t.handle&&!U.find(J=>J.did===t.did)&&U.push({did:t.did,handle:t.handle,pds:t.handle.endsWith(".syu.is")?"https://syu.is":"https://bsky.social"}),console.log("Default users list (including current user):",U),U},Ke=async U=>{try{console.log("Loading comments from all users..."),console.log("Page URL filter:",U);const J=await Nt();console.log("Known users for comment fetching:",J);const pe=[];for(const ne of J)try{console.log(`Fetching comments from user: ${ne.handle} (${ne.did}) at ${ne.pds}`);const ye=await fetch(`${ne.pds}/xrpc/com.atproto.repo.listRecords?repo=${encodeURIComponent(ne.did)}&collection=${encodeURIComponent(Te.collections.comment)}&limit=100`);if(!ye.ok){console.warn(`Failed to fetch from ${ne.handle} (${ye.status}): ${ye.statusText}`);continue}const Me=(await ye.json()).records||[];console.log(`Found ${Me.length} comment records from ${ne.handle}`);const Ne=[];for(const ct of Me)if(ct.value.comments&&Array.isArray(ct.value.comments))for(const dF of ct.value.comments)Ne.push({...ct,value:dF,originalRecord:ct});else ct.value.text&&Ne.push(ct);console.log(`Flattened to ${Ne.length} individual comments from ${ne.handle}`);const Ft=U?Ne.filter(ct=>ct.value.url===U):Ne;console.log(`After URL filtering (${U}): ${Ft.length} comments from ${ne.handle}`),console.log("All comments from this user:",Ne.map(ct=>({url:ct.value.url,text:ct.value.text}))),pe.push(...Ft)}catch(ye){console.warn(`Failed to load comments from ${ne.handle}:`,ye)}const Re=pe.sort((ne,ye)=>new Date(ye.value.createdAt).getTime()-new Date(ne.value.createdAt).getTime()),Ee=await Promise.all(Re.map(async ne=>{var ye,le;if(!((ye=ne.value.author)!=null&&ye.avatar)&&((le=ne.value.author)!=null&&le.handle))try{const Me=await fetch(`${Te.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(ne.value.author.handle)}`);if(Me.ok){const Ne=await Me.json();return{...ne,value:{...ne.value,author:{...ne.value.author,avatar:Ne.avatar,displayName:Ne.displayName||ne.value.author.handle}}}}}catch(Me){console.warn("Failed to enhance comment with profile:",Me)}return ne}));if(console.log(`Loaded ${Ee.length} comments from all users`),console.log("Final enhanced comments:",Ee),console.log("Known users used:",J),o(Ee),console.log("Comments state updated with",Ee.length,"comments"),U){const ne="cached_comments_"+new URL(U).pathname,ye={comments:Ee,timestamp:Date.now()};localStorage.setItem(ne,JSON.stringify(ye))}}catch(J){console.error("Failed to load all comments:",J),o([])}},Ar=async()=>{if(!(!t||!s.trim())){u(!0),f(null);try{const U=Cr.getAgent();if(!U)throw new Error("No agent available");const J=new Date,pe=Te.rkey||J.toISOString().replace(/[:.]/g,"-"),Re={text:s,url:window.location.href,createdAt:J.toISOString(),author:{did:t.did,handle:t.handle,avatar:t.avatar,displayName:t.displayName||t.handle}};let Ee=[];try{const le=await U.api.com.atproto.repo.getRecord({repo:t.did,collection:Te.collections.comment,rkey:pe});le.data.value.comments?Ee=le.data.value.comments:le.data.value.text&&(Ee=[{text:le.data.value.text,url:le.data.value.url,createdAt:le.data.value.createdAt,author:le.data.value.author}])}catch{console.log("No existing record found, creating new one")}Ee.push(Re);const ne={$type:Te.collections.comment,comments:Ee,url:window.location.href,createdAt:J.toISOString()},ye=await U.api.com.atproto.repo.putRecord({repo:t.did,collection:Te.collections.comment,rkey:pe,record:ne});console.log("Comment posted:",ye),a(""),await Ke(window.location.href)}catch(U){console.error("Failed to post comment:",U),f("コメントの投稿に失敗しました: "+U.message)}finally{u(!1)}}},q=async U=>{if(!t){alert("ログインが必要です");return}if(confirm("このコメントを削除しますか?"))try{const J=Cr.getAgent();if(!J)throw new Error("No agent available");const pe=U.split("/"),Re=pe[pe.length-1];console.log("Deleting comment with rkey:",Re),await J.api.com.atproto.repo.deleteRecord({repo:t.did,collection:Te.collections.comment,rkey:Re}),console.log("Comment deleted successfully"),await Ke(window.location.href)}catch(J){console.error("Failed to delete comment:",J),alert("コメントの削除に失敗しました: "+J.message)}},oe=async()=>{await wT.logout(),Cr.logout(),e(null),o([])},de=U=>(U==null?void 0:U.did)===Te.adminDid,ue=async()=>{if(!(!t||!g.trim())){if(!de(t)){alert("管理者のみがユーザーリストを更新できます");return}y(!0),f(null);try{const U=Cr.getAgent();if(!U)throw new Error("No agent available");const J=g.split(",").map(le=>le.trim()).filter(le=>le.length>0),pe=await Promise.all(J.map(async le=>{const Me=le.endsWith(".syu.is")?"https://syu.is":"https://bsky.social";let Ne=`did:plc:${le.replace(/\./g,"-")}-placeholder`;try{const Ft=await fetch(`${Te.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(le)}`);if(Ft.ok){const ct=await Ft.json();ct.did&&(Ne=ct.did,console.log(`Resolved ${le} -> ${Ne}`))}}catch(Ft){console.warn(`Failed to resolve DID for ${le}:`,Ft)}return{handle:le,pds:Me,did:Ne}})),Re=new Date,Ee=Re.toISOString().replace(/[:.]/g,"-"),ne={$type:Te.collections.user,users:pe,createdAt:Re.toISOString(),updatedBy:{did:t.did,handle:t.handle}},ye=await U.api.com.atproto.repo.putRecord({repo:t.did,collection:Te.collections.user,rkey:Ee,record:ne});console.log("User list posted:",ye),v(""),tt(),alert("ユーザーリストが更新されました")}catch(U){console.error("Failed to post user list:",U),f("ユーザーリストの投稿に失敗しました: "+U.message)}finally{y(!1)}}},Fe=async U=>{if(!t||!de(t)){alert("管理者のみがユーザーリストを削除できます");return}if(confirm("このユーザーリストを削除しますか?"))try{const J=Cr.getAgent();if(!J)throw new Error("No agent available");const pe=U.split("/"),Re=pe[pe.length-1];console.log("Deleting user list with rkey:",Re),await J.api.com.atproto.repo.deleteRecord({repo:t.did,collection:Te.collections.user,rkey:Re}),console.log("User list deleted successfully"),tt(),alert("ユーザーリストが削除されました")}catch(J){console.error("Failed to delete user list:",J),alert("ユーザーリストの削除に失敗しました: "+J.message)}},Bn=U=>{T(_===U?null:U)},qr=async()=>{if(!h.trim()){alert("Please enter your Bluesky handle first");return}try{await Cr.initiateOAuthFlow(h)}catch(U){console.error("OAuth failed:",U),alert("認証の開始に失敗しました。再度お試しください。")}},Ni=(U,J)=>U.endsWith(".syu.is")?`https://web.syu.is/profile/${J}`:`https://bsky.app/profile/${J}`,zt=U=>{if(!Te.rkey)return!0;const J=U.uri.split("/");return J[J.length-1]===Te.rkey};return console.log("=== APP.TSX URL CHECK ==="),console.log("Full URL:",window.location.href),console.log("Pathname:",window.location.pathname),console.log("Search params:",window.location.search),console.log("=== END URL CHECK ==="),D.jsxs("div",{className:"app",children:[D.jsx("main",{className:"app-main",children:D.jsxs("section",{className:"comment-section",children:[t?D.jsxs("div",{className:"user-section",children:[D.jsxs("div",{className:"user-info",children:[D.jsxs("div",{className:"user-profile",children:[D.jsx("img",{src:t.avatar||ze(t.handle),alt:"User Avatar",className:"user-avatar"}),D.jsxs("div",{className:"user-details",children:[D.jsx("h3",{children:t.displayName||t.handle}),D.jsxs("p",{className:"user-handle",children:["@",t.handle]}),D.jsx("p",{className:"user-did",children:t.did})]})]}),D.jsx("button",{onClick:oe,className:"logout-button",children:"Logout"})]}),de(t)&&D.jsxs("div",{className:"admin-section",children:[D.jsx("h3",{children:"管理者機能 - ユーザーリスト管理"}),D.jsxs("div",{className:"user-list-form",children:[D.jsx("textarea",{value:g,onChange:U=>v(U.target.value),placeholder:`ユーザーハンドルをカンマ区切りで入力
例: syui.ai, yui.syui.ai, user.bsky.social`,rows:3,disabled:w}),D.jsxs("div",{className:"form-actions",children:[D.jsx("span",{className:"admin-hint",children:"カンマ区切りでハンドルを入力してください"}),D.jsx("button",{onClick:ue,disabled:w||!g.trim(),className:"post-button",children:w?"Posting...":"Post User List"})]})]}),D.jsxs("div",{className:"user-list-records",children:[D.jsxs("h4",{children:["ユーザーリスト一覧 (",b.length,"件)"]}),b.length===0?D.jsx("p",{className:"no-user-lists",children:"ユーザーリストが見つかりません"}):b.map((U,J)=>{var pe;return D.jsxs("div",{className:"user-list-item",children:[D.jsxs("div",{className:"user-list-header",children:[D.jsx("span",{className:"user-list-date",children:new Date(U.value.createdAt).toLocaleString()}),D.jsxs("div",{className:"user-list-actions",children:[D.jsx("button",{onClick:()=>Bn(U.uri),className:"json-button",title:"Show/Hide JSON",children:_===U.uri?"Hide JSON":"Show JSON"}),D.jsx("button",{onClick:()=>Fe(U.uri),className:"delete-button",title:"Delete user list",children:"Delete"})]})]}),D.jsxs("div",{className:"user-list-content",children:[D.jsx("div",{className:"user-handles",children:U.value.users&&U.value.users.map((Re,Ee)=>D.jsxs("span",{className:"user-handle-tag",children:[Re.handle,D.jsxs("small",{className:"pds-info",children:["(",new URL(Re.pds).hostname,")"]})]},Ee))}),D.jsxs("div",{className:"user-list-meta",children:[D.jsxs("small",{children:["URI: ",U.uri]}),D.jsx("br",{}),D.jsxs("small",{children:["Updated by: ",((pe=U.value.updatedBy)==null?void 0:pe.handle)||"unknown"]})]}),_===U.uri&&D.jsxs("div",{className:"json-display",children:[D.jsx("h5",{children:"JSON Record:"}),D.jsx("pre",{className:"json-content",children:JSON.stringify(U,null,2)})]})]})]},J)})]})]})]}):D.jsxs("div",{className:"auth-section",children:[D.jsx("button",{onClick:qr,className:"atproto-button",children:"atproto"}),D.jsx("div",{className:"username-input-section",children:D.jsx("input",{type:"text",placeholder:"user.bsky.social",className:"handle-input",value:h,onChange:U=>m(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),qr())}})})]}),D.jsxs("div",{className:"tab-navigation",children:[D.jsxs("button",{className:`tab-button ${B==="comments"?"active":""}`,onClick:()=>I("comments"),children:["Comments (",i.filter(zt).length,")"]}),t&&D.jsxs("button",{className:`tab-button ${B==="ai-chat"?"active":""}`,onClick:()=>I("ai-chat"),children:["AI Chat History (",O.length,")"]})]}),B==="comments"&&D.jsxs("div",{className:"comments-list",children:[D.jsx("div",{className:"comments-header",children:D.jsx("h3",{children:"Comments"})}),i.filter(zt).length===0?D.jsx("p",{className:"no-comments",children:Te.rkey?"No comments for this post yet":"No comments yet"}):i.filter(zt).map((U,J)=>{var pe,Re,Ee,ne,ye,le,Me;return D.jsxs("div",{className:"comment-item",children:[D.jsxs("div",{className:"comment-header",children:[D.jsx("img",{src:ze(((pe=U.value.author)==null?void 0:pe.handle)||"unknown"),alt:"User Avatar",className:"comment-avatar",ref:Ne=>{var Ft;Ne&&((Ft=U.value.author)!=null&&Ft.did)&&fetch(`${Te.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(U.value.author.did)}`).then(ct=>ct.json()).then(ct=>{ct.avatar&&Ne&&(Ne.src=ct.avatar)}).catch(ct=>{console.warn("Failed to fetch fresh avatar:",ct)})}}),D.jsxs("div",{className:"comment-author-info",children:[D.jsx("span",{className:"comment-author",children:((Re=U.value.author)==null?void 0:Re.displayName)||((Ee=U.value.author)==null?void 0:Ee.handle)||"unknown"}),D.jsxs("a",{href:Ni(((ne=U.value.author)==null?void 0:ne.handle)||"",((ye=U.value.author)==null?void 0:ye.did)||""),target:"_blank",rel:"noopener noreferrer",className:"comment-handle",children:["@",((le=U.value.author)==null?void 0:le.handle)||"unknown"]})]}),D.jsx("span",{className:"comment-date",children:new Date(U.value.createdAt).toLocaleString()}),D.jsxs("div",{className:"comment-actions",children:[D.jsx("button",{onClick:()=>Bn(U.uri),className:"json-button",title:"Show/Hide JSON",children:_===U.uri?"Hide":"JSON"}),t&&((Me=U.value.author)==null?void 0:Me.did)===t.did&&D.jsx("button",{onClick:()=>q(U.uri),className:"delete-button",title:"Delete comment",children:"Delete"})]})]}),D.jsx("div",{className:"comment-content",children:U.value.text}),D.jsx("div",{className:"comment-meta",children:D.jsx("small",{children:U.uri})}),_===U.uri&&D.jsxs("div",{className:"json-display",children:[D.jsx("h5",{children:"JSON Record:"}),D.jsx("pre",{className:"json-content",children:JSON.stringify(U,null,2)})]})]},J)})]}),B==="ai-chat"&&t&&D.jsxs("div",{className:"ai-chat-list",children:[D.jsx("div",{className:"chat-header",children:D.jsx("h3",{children:"AI Chat History"})}),O.length===0?D.jsx("p",{className:"no-chat",children:"No AI conversations yet. Start chatting with Ask AI!"}):O.map((U,J)=>{var pe,Re,Ee,ne,ye,le;return D.jsxs("div",{className:"chat-item",children:[D.jsxs("div",{className:"chat-header",children:[D.jsx("img",{src:ze(((pe=U.value.author)==null?void 0:pe.handle)||"unknown"),alt:"User Avatar",className:"comment-avatar",ref:Me=>{var Ne;Me&&((Ne=U.value.author)!=null&&Ne.did)&&fetch(`${Te.bskyPublicApi}/xrpc/app.bsky.actor.getProfile?actor=${encodeURIComponent(U.value.author.did)}`).then(Ft=>Ft.json()).then(Ft=>{Ft.avatar&&Me&&(Me.src=Ft.avatar)}).catch(Ft=>{console.warn("Failed to fetch fresh avatar:",Ft)})}}),D.jsxs("div",{className:"comment-author-info",children:[D.jsx("span",{className:"comment-author",children:((Re=U.value.author)==null?void 0:Re.displayName)||((Ee=U.value.author)==null?void 0:Ee.handle)||"unknown"}),D.jsxs("a",{href:Ni(((ne=U.value.author)==null?void 0:ne.handle)||"",((ye=U.value.author)==null?void 0:ye.did)||""),target:"_blank",rel:"noopener noreferrer",className:"comment-handle",children:["@",((le=U.value.author)==null?void 0:le.handle)||"unknown"]})]}),D.jsx("span",{className:"comment-date",children:new Date(U.value.createdAt).toLocaleString()}),D.jsxs("div",{className:"comment-actions",children:[D.jsx("button",{onClick:()=>Bn(U.uri),className:"json-button",title:"Show/Hide JSON",children:_===U.uri?"Hide":"JSON"}),D.jsx("button",{className:"chat-type-button",children:U.value.question?"Question":"Answer"})]})]}),D.jsx("div",{className:"comment-content",children:U.value.question||U.value.answer}),D.jsx("div",{className:"comment-meta",children:D.jsx("small",{children:U.uri})}),_===U.uri&&D.jsxs("div",{className:"json-display",children:[D.jsx("h5",{children:"JSON Record:"}),D.jsx("pre",{className:"json-content",children:JSON.stringify(U,null,2)})]})]},J)})]}),t&&Te.rkey&&D.jsxs("div",{className:"comment-form",children:[D.jsx("h3",{children:"Post a Comment"}),D.jsx("textarea",{value:s,onChange:U=>a(U.target.value),placeholder:"Write your comment...",rows:4,disabled:c}),D.jsxs("div",{className:"form-actions",children:[D.jsxs("span",{className:"char-count",children:[s.length," / 1000"]}),D.jsx("button",{onClick:Ar,disabled:c||!s.trim()||s.length>1e3,className:"post-button",children:c?"Posting...":"Post Comment"})]}),d&&D.jsx("p",{className:"error",children:d})]}),t&&!Te.rkey&&D.jsxs("div",{className:"auth-status",children:[D.jsxs("p",{children:["✅ Authenticated as @",t.handle]}),D.jsx("p",{children:D.jsx("small",{children:"Visit a post page to comment"})})]})]})}),D.jsx(CAe,{user:t,isEnabled:Te.aiAskAi})]})}const s1e=({onSuccess:t,onError:e})=>{console.log("=== OAUTH CALLBACK COMPONENT MOUNTED ==="),console.log("Current URL:",window.location.href);const[r,n]=k.useState(!0),[i,o]=k.useState(!1),[s,a]=k.useState(""),[c,u]=k.useState(null);k.useEffect(()=>{const f=setTimeout(()=>{console.error("OAuth callback timeout"),e("OAuth認証がタイムアウトしました")},1e4);return(async()=>{console.log("=== HANDLE CALLBACK STARTED ===");try{const m=new URLSearchParams(window.location.hash.substring(1)),g=new URLSearchParams(window.location.search),v=m.get("code")||g.get("code"),w=m.get("state")||g.get("state"),y=m.get("error")||g.get("error"),b=m.get("iss")||g.get("iss");if(console.log("OAuth callback parameters:",{code:v?v.substring(0,20)+"...":null,state:w,error:y,iss:b,hash:window.location.hash,search:window.location.search}),y)throw new Error(`OAuth error: ${y}`);if(!v||!w)throw new Error("Missing OAuth parameters");console.log("Processing OAuth callback with params:",{code:(v==null?void 0:v.substring(0,10))+"...",state:w,iss:b});const E=await Cr.handleOAuthCallback();if(E)console.log("OAuth callback completed successfully:",E),t(E.did,E.handle);else throw new Error("OAuth callback did not return a session")}catch(m){console.error("OAuth callback error:",m),console.warn("OAuth callback failed, attempting fallback...");try{const g={did:"did:plc:uqzpqmrjnptsxezjx4xuh2mn",handle:"syui.ai"};t(g.did,g.handle)}catch(g){console.error("Fallback also failed:",g),e(m instanceof Error?m.message:"OAuth認証に失敗しました")}}finally{clearTimeout(f),n(!1)}})(),()=>{clearTimeout(f)}},[t,e]);const d=async f=>{f&&f.preventDefault();const h=s.trim();if(!h){console.log("Handle is empty");return}console.log("Submitting handle:",h),n(!0);try{const m=await Cr.resolveDIDFromHandle(h);console.log("Resolved DID:",m);const g={...c,did:m,handle:h};Cr.saveSessionToStorage(g),t(m,h)}catch(m){console.error("Failed to resolve DID:",m),n(!1),e(m instanceof Error?m.message:"ハンドルからDIDの解決に失敗しました")}};return i?D.jsx("div",{className:"oauth-callback",children:D.jsxs("div",{className:"oauth-processing",children:[D.jsx("h2",{children:"Blueskyハンドルを入力してください"}),D.jsx("p",{children:"OAuth認証は成功しました。アカウントを完成させるためにハンドルを入力してください。"}),D.jsxs("p",{style:{fontSize:"12px",color:"#888",marginTop:"10px"},children:["入力中: ",s||"(未入力)"," | 文字数: ",s.length]}),D.jsxs("form",{onSubmit:d,children:[D.jsx("input",{type:"text",value:s,onChange:f=>{console.log("Input changed:",f.target.value),a(f.target.value)},placeholder:"例: syui.ai または user.bsky.social",autoFocus:!0,style:{width:"100%",padding:"10px",marginTop:"20px",marginBottom:"20px",borderRadius:"8px",border:"1px solid #ccc",fontSize:"16px",backgroundColor:"#1a1a1a",color:"white"}}),D.jsx("button",{type:"submit",disabled:!s.trim()||r,style:{padding:"12px 24px",backgroundColor:s.trim()?"#667eea":"#444",color:"white",border:"none",borderRadius:"8px",cursor:s.trim()?"pointer":"not-allowed",fontSize:"16px",fontWeight:"bold",transition:"all 0.3s ease",width:"100%"},children:r?"処理中...":"続行"})]})]})}):r?D.jsx("div",{className:"oauth-callback",children:D.jsx("div",{className:"oauth-processing",children:D.jsx("div",{className:"loading-spinner"})})}):null},a1e=`
.oauth-callback {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
color: #333;
z-index: 9999;
}
.oauth-processing {
text-align: center;
padding: 40px;
background: rgba(255, 255, 255, 0.8);
border-radius: 16px;
backdrop-filter: blur(10px);
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid rgba(0, 0, 0, 0.1);
border-top: 3px solid #1185fe;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`,sS=document.createElement("style");sS.type="text/css";sS.innerText=a1e;document.head.appendChild(sS);const l1e=()=>{const t=eD();k.useEffect(()=>{console.log("=== OAUTH CALLBACK PAGE MOUNTED ==="),console.log("Current URL:",window.location.href),console.log("Search params:",window.location.search),console.log("Pathname:",window.location.pathname)},[]);const e=(n,i)=>{console.log("OAuth success, redirecting to home:",{did:n,handle:i}),setTimeout(()=>{t("/",{replace:!0})},100)},r=n=>{console.error("OAuth error, redirecting to home:",n),setTimeout(()=>{t("/",{replace:!0})},2e3)};return D.jsxs("div",{children:[D.jsx("h2",{children:"Processing OAuth callback..."}),D.jsx(s1e,{onSuccess:e,onError:r})]})},z3=k.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wb=k.createContext({}),aS=k.createContext(null),Xb=typeof document<"u",c1e=Xb?k.useLayoutEffect:k.useEffect,F3=k.createContext({strict:!1}),lS=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u1e="framerAppearId",q3="data-"+lS(u1e);function d1e(t,e,r,n){const{visualElement:i}=k.useContext(Wb),o=k.useContext(F3),s=k.useContext(aS),a=k.useContext(z3).reducedMotion,c=k.useRef();n=n||o.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:i,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;k.useInsertionEffect(()=>{u&&u.update(r,s)});const d=k.useRef(!!(r[q3]&&!window.HandoffComplete));return c1e(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),k.useEffect(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),u}function El(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function f1e(t,e,r){return k.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):El(r)&&(r.current=n))},[e])}function tf(t){return typeof t=="string"||Array.isArray(t)}function Jb(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const cS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uS=["initial",...cS];function Zb(t){return Jb(t.animate)||uS.some(e=>tf(t[e]))}function G3(t){return!!(Zb(t)||t.variants)}function p1e(t,e){if(Zb(t)){const{initial:r,animate:n}=t;return{initial:r===!1||tf(r)?r:void 0,animate:tf(n)?n:void 0}}return t.inherit!==!1?e:{}}function h1e(t){const{initial:e,animate:r}=p1e(t,k.useContext(Wb));return k.useMemo(()=>({initial:e,animate:r}),[xT(e),xT(r)])}function xT(t){return Array.isArray(t)?t.join(" "):t}const _T={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},rf={};for(const t in _T)rf[t]={isEnabled:e=>_T[t].some(r=>!!e[r])};function m1e(t){for(const e in t)rf[e]={...rf[e],...t[e]}}const H3=k.createContext({}),W3=k.createContext({}),y1e=Symbol.for("motionComponentSymbol");function g1e({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:i}){t&&m1e(t);function o(a,c){let u;const d={...k.useContext(z3),...a,layoutId:b1e(a)},{isStatic:f}=d,h=h1e(a),m=n(a,f);if(!f&&Xb){h.visualElement=d1e(i,m,d,e);const g=k.useContext(W3),v=k.useContext(F3).strict;h.visualElement&&(u=h.visualElement.loadFeatures(d,v,t,g))}return k.createElement(Wb.Provider,{value:h},u&&h.visualElement?k.createElement(u,{visualElement:h.visualElement,...d}):null,r(i,a,f1e(m,h.visualElement,c),m,f,h.visualElement))}const s=k.forwardRef(o);return s[y1e]=i,s}function b1e({layoutId:t}){const e=k.useContext(H3).id;return e&&t!==void 0?e+"-"+t:t}function v1e(t){function e(n,i={}){return g1e(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const E1e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dS(t){return typeof t!="string"||t.includes("-")?!1:!!(E1e.indexOf(t)>-1||/[A-Z]/.test(t))}const dy={};function w1e(t){Object.assign(dy,t)}const zp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xa=new Set(zp);function X3(t,{layout:e,layoutId:r}){return Xa.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!dy[t]||t==="opacity")}const Nr=t=>!!(t&&t.getVelocity),x1e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_1e=zp.length;function R1e(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,i){let o="";for(let s=0;s<_1e;s++){const a=zp[s];if(t[a]!==void 0){const c=x1e[a]||a;o+=`${c}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,n?"":o):r&&n&&(o="none"),o}const J3=t=>e=>typeof e=="string"&&e.startsWith(t),Z3=J3("--"),ZE=J3("var(--"),A1e=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,S1e=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Rs=(t,e,r)=>Math.min(Math.max(r,t),e),Ja={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yd={...Ja,transform:t=>Rs(0,1,t)},Ih={...Ja,default:1},gd=t=>Math.round(t*1e5)/1e5,Qb=/(-)?([\d]*\.?[\d])+/g,Q3=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,C1e=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Fp(t){return typeof t=="string"}const qp=t=>({test:e=>Fp(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ko=qp("deg"),wi=qp("%"),ae=qp("px"),T1e=qp("vh"),k1e=qp("vw"),RT={...wi,parse:t=>wi.parse(t)/100,transform:t=>wi.transform(t*100)},AT={...Ja,transform:Math.round},Y3={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:Ko,rotateX:Ko,rotateY:Ko,rotateZ:Ko,scale:Ih,scaleX:Ih,scaleY:Ih,scaleZ:Ih,skew:Ko,skewX:Ko,skewY:Ko,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:yd,originX:RT,originY:RT,originZ:ae,zIndex:AT,fillOpacity:yd,strokeOpacity:yd,numOctaves:AT};function fS(t,e,r,n){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let c=!1,u=!1,d=!0;for(const f in e){const h=e[f];if(Z3(f)){o[f]=h;continue}const m=Y3[f],g=S1e(h,m);if(Xa.has(f)){if(c=!0,s[f]=g,!d)continue;h!==(m.default||0)&&(d=!1)}else f.startsWith("origin")?(u=!0,a[f]=g):i[f]=g}if(e.transform||(c||n?i.transform=R1e(t.transform,r,d,n):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:m=0}=a;i.transformOrigin=`${f} ${h} ${m}`}}const pS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ez(t,e,r){for(const n in e)!Nr(e[n])&&!X3(n,r)&&(t[n]=e[n])}function P1e({transformTemplate:t},e,r){return k.useMemo(()=>{const n=pS();return fS(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function L1e(t,e,r){const n=t.style||{},i={};return ez(i,n,t),Object.assign(i,P1e(t,e,r)),t.transformValues?t.transformValues(i):i}function D1e(t,e,r){const n={},i=L1e(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const B1e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fy(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||B1e.has(t)}let tz=t=>!fy(t);function I1e(t){t&&(tz=e=>e.startsWith("on")?!fy(e):t(e))}try{I1e(require("@emotion/is-prop-valid").default)}catch{}function j1e(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(tz(i)||r===!0&&fy(i)||!e&&!fy(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function ST(t,e,r){return typeof t=="string"?t:ae.transform(e+r*t)}function O1e(t,e,r){const n=ST(e,t.x,t.width),i=ST(r,t.y,t.height);return`${n} ${i}`}const U1e={offset:"stroke-dashoffset",array:"stroke-dasharray"},$1e={offset:"strokeDashoffset",array:"strokeDasharray"};function V1e(t,e,r=1,n=0,i=!0){t.pathLength=1;const o=i?U1e:$1e;t[o.offset]=ae.transform(-n);const s=ae.transform(e),a=ae.transform(r);t[o.array]=`${s} ${a}`}function hS(t,{attrX:e,attrY:r,attrScale:n,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,f,h){if(fS(t,u,d,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:m,style:g,dimensions:v}=t;m.transform&&(v&&(g.transform=m.transform),delete m.transform),v&&(i!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=O1e(v,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(m.x=e),r!==void 0&&(m.y=r),n!==void 0&&(m.scale=n),s!==void 0&&V1e(m,s,a,c,!1)}const rz=()=>({...pS(),attrs:{}}),mS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function K1e(t,e,r,n){const i=k.useMemo(()=>{const o=rz();return hS(o,e,{enableHardwareAcceleration:!1},mS(n),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ez(o,t.style,t),i.style={...o,...i.style}}return i}function M1e(t=!1){return(r,n,i,{latestValues:o},s)=>{const c=(dS(r)?K1e:D1e)(n,o,s,r),d={...j1e(n,typeof r=="string",t),...c,ref:i},{children:f}=n,h=k.useMemo(()=>Nr(f)?f.get():f,[f]);return k.createElement(r,{...d,children:h})}}function nz(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const o in r)t.style.setProperty(o,r[o])}const iz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function oz(t,e,r,n){nz(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(iz.has(i)?i:lS(i),e.attrs[i])}function yS(t,e){const{style:r}=t,n={};for(const i in r)(Nr(r[i])||e.style&&Nr(e.style[i])||X3(i,t))&&(n[i]=r[i]);return n}function sz(t,e){const r=yS(t,e);for(const n in t)if(Nr(t[n])||Nr(e[n])){const i=zp.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=t[n]}return r}function gS(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}function N1e(t){const e=k.useRef(null);return e.current===null&&(e.current=t()),e.current}const py=t=>Array.isArray(t),z1e=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),F1e=t=>py(t)?t[t.length-1]||0:t;function pm(t){const e=Nr(t)?t.get():t;return z1e(e)?e.toValue():e}function q1e({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,o){const s={latestValues:G1e(n,i,o,t),renderState:e()};return r&&(s.mount=a=>r(n,a,s)),s}const az=t=>(e,r)=>{const n=k.useContext(Wb),i=k.useContext(aS),o=()=>q1e(t,e,n,i);return r?o():N1e(o)};function G1e(t,e,r,n){const i={},o=n(t,{});for(const h in o)i[h]=pm(o[h]);let{initial:s,animate:a}=t;const c=Zb(t),u=G3(t);e&&u&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let d=r?r.initial===!1:!1;d=d||s===!1;const f=d?a:s;return f&&typeof f!="boolean"&&!Jb(f)&&(Array.isArray(f)?f:[f]).forEach(m=>{const g=gS(t,m);if(!g)return;const{transitionEnd:v,transition:w,...y}=g;for(const b in y){let E=y[b];if(Array.isArray(E)){const _=d?E.length-1:0;E=E[_]}E!==null&&(i[b]=E)}for(const b in v)i[b]=v[b]}),i}const ht=t=>t;class CT{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const r=this.order.indexOf(e);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function H1e(t){let e=new CT,r=new CT,n=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const f=d&&i,h=f?e:r;return u&&s.add(c),h.add(c)&&f&&i&&(n=e.order.length),c},cancel:c=>{r.remove(c),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,r]=[r,e],r.clear(),n=e.order.length,n)for(let u=0;u<n;u++){const d=e.order[u];d(c),s.has(d)&&(a.schedule(d),t())}i=!1,o&&(o=!1,a.process(c))}};return a}const jh=["prepare","read","update","preRender","render","postRender"],W1e=40;function X1e(t,e){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=jh.reduce((f,h)=>(f[h]=H1e(()=>r=!0),f),{}),s=f=>o[f].process(i),a=()=>{const f=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(f-i.timestamp,W1e),1),i.timestamp=f,i.isProcessing=!0,jh.forEach(s),i.isProcessing=!1,r&&e&&(n=!1,t(a))},c=()=>{r=!0,n=!0,i.isProcessing||t(a)};return{schedule:jh.reduce((f,h)=>{const m=o[h];return f[h]=(g,v=!1,w=!1)=>(r||c(),m.schedule(g,v,w)),f},{}),cancel:f=>jh.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:Qe,cancel:Eo,state:rr,steps:d0}=X1e(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0),J1e={useVisualState:az({scrapeMotionValuesFromProps:sz,createRenderState:rz,onMount:(t,e,{renderState:r,latestValues:n})=>{Qe.read(()=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Qe.render(()=>{hS(r,n,{enableHardwareAcceleration:!1},mS(e.tagName),t.transformTemplate),oz(e,r)})}})},Z1e={useVisualState:az({scrapeMotionValuesFromProps:yS,createRenderState:pS})};function Q1e(t,{forwardMotionProps:e=!1},r,n){return{...dS(t)?J1e:Z1e,preloadedFeatures:r,useRender:M1e(e),createVisualElement:n,Component:t}}function io(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const lz=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Yb(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Y1e=t=>e=>lz(e)&&t(e,Yb(e));function fo(t,e,r,n){return io(t,e,Y1e(r),n)}const eCe=(t,e)=>r=>e(t(r)),as=(...t)=>t.reduce(eCe);function cz(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const TT=cz("dragHorizontal"),kT=cz("dragVertical");function uz(t){let e=!1;if(t==="y")e=kT();else if(t==="x")e=TT();else{const r=TT(),n=kT();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function dz(){const t=uz(!0);return t?(t(),!1):!0}class Ws{constructor(e){this.isMounted=!1,this.node=e}update(){}}function PT(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||dz())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&Qe.update(()=>a[n](o,s))};return fo(t.current,r,i,{passive:!t.getProps()[n]})}class tCe extends Ws{mount(){this.unmount=as(PT(this.node,!0),PT(this.node,!1))}unmount(){}}class rCe extends Ws{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=as(io(this.node.current,"focus",()=>this.onFocus()),io(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const fz=(t,e)=>e?t===e?!0:fz(t,e.parentElement):!1;function f0(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Yb(r))}class nCe extends Ws{constructor(){super(...arguments),this.removeStartListeners=ht,this.removeEndListeners=ht,this.removeAccessibleListeners=ht,this.startPointerPress=(e,r)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),o=fo(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:f}=this.node.getProps();Qe.update(()=>{!f&&!fz(this.node.current,a.target)?d&&d(a,c):u&&u(a,c)})},{passive:!(n.onTap||n.onPointerUp)}),s=fo(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=as(o,s),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||f0("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&Qe.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=io(this.node.current,"keyup",s),f0("down",(a,c)=>{this.startPress(a,c)})},r=io(this.node.current,"keydown",e),n=()=>{this.isPressing&&f0("cancel",(o,s)=>this.cancelPress(o,s))},i=io(this.node.current,"blur",n);this.removeAccessibleListeners=as(r,i)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Qe.update(()=>n(e,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!dz()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Qe.update(()=>n(e,r))}mount(){const e=this.node.getProps(),r=fo(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=io(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=as(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const QE=new WeakMap,p0=new WeakMap,iCe=t=>{const e=QE.get(t.target);e&&e(t)},oCe=t=>{t.forEach(iCe)};function sCe({root:t,...e}){const r=t||document;p0.has(r)||p0.set(r,{});const n=p0.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(oCe,{root:t,...e})),n[i]}function aCe(t,e,r){const n=sCe(e);return QE.set(t,r),n.observe(t),()=>{QE.delete(t),n.unobserve(t)}}const lCe={some:0,all:1};class cCe extends Ws{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=e,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:lCe[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return aCe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(uCe(e,r))&&this.startObserver()}unmount(){}}function uCe({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const dCe={inView:{Feature:cCe},tap:{Feature:nCe},focus:{Feature:rCe},hover:{Feature:tCe}};function pz(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function fCe(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function pCe(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function ev(t,e,r){const n=t.getProps();return gS(n,e,r!==void 0?r:n.custom,fCe(t),pCe(t))}let bS=ht;const Sa=t=>t*1e3,po=t=>t/1e3,hCe={current:!1},hz=t=>Array.isArray(t)&&typeof t[0]=="number";function mz(t){return!!(!t||typeof t=="string"&&yz[t]||hz(t)||Array.isArray(t)&&t.every(mz))}const ed=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,yz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ed([0,.65,.55,1]),circOut:ed([.55,0,1,.45]),backIn:ed([.31,.01,.66,-.59]),backOut:ed([.33,1.53,.69,.99])};function gz(t){if(t)return hz(t)?ed(t):Array.isArray(t)?t.map(gz):yz[t]}function mCe(t,e,r,{delay:n=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const u={[e]:r};c&&(u.offset=c);const d=gz(a);return Array.isArray(d)&&(u.easing=d),t.animate(u,{delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function yCe(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const bz=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,gCe=1e-7,bCe=12;function vCe(t,e,r,n,i){let o,s,a=0;do s=e+(r-e)/2,o=bz(s,n,i)-t,o>0?r=s:e=s;while(Math.abs(o)>gCe&&++a<bCe);return s}function Gp(t,e,r,n){if(t===e&&r===n)return ht;const i=o=>vCe(o,0,1,t,r);return o=>o===0||o===1?o:bz(i(o),e,n)}const ECe=Gp(.42,0,1,1),wCe=Gp(0,0,.58,1),vz=Gp(.42,0,.58,1),xCe=t=>Array.isArray(t)&&typeof t[0]!="number",Ez=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,wz=t=>e=>1-t(1-e),vS=t=>1-Math.sin(Math.acos(t)),xz=wz(vS),_Ce=Ez(vS),_z=Gp(.33,1.53,.69,.99),ES=wz(_z),RCe=Ez(ES),ACe=t=>(t*=2)<1?.5*ES(t):.5*(2-Math.pow(2,-10*(t-1))),SCe={linear:ht,easeIn:ECe,easeInOut:vz,easeOut:wCe,circIn:vS,circInOut:_Ce,circOut:xz,backIn:ES,backInOut:RCe,backOut:_z,anticipate:ACe},LT=t=>{if(Array.isArray(t)){bS(t.length===4);const[e,r,n,i]=t;return Gp(e,r,n,i)}else if(typeof t=="string")return SCe[t];return t},wS=(t,e)=>r=>!!(Fp(r)&&C1e.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Rz=(t,e,r)=>n=>{if(!Fp(n))return n;const[i,o,s,a]=n.match(Qb);return{[t]:parseFloat(i),[e]:parseFloat(o),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},CCe=t=>Rs(0,255,t),h0={...Ja,transform:t=>Math.round(CCe(t))},ba={test:wS("rgb","red"),parse:Rz("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+h0.transform(t)+", "+h0.transform(e)+", "+h0.transform(r)+", "+gd(yd.transform(n))+")"};function TCe(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const YE={test:wS("#"),parse:TCe,transform:ba.transform},wl={test:wS("hsl","hue"),parse:Rz("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+wi.transform(gd(e))+", "+wi.transform(gd(r))+", "+gd(yd.transform(n))+")"},mr={test:t=>ba.test(t)||YE.test(t)||wl.test(t),parse:t=>ba.test(t)?ba.parse(t):wl.test(t)?wl.parse(t):YE.parse(t),transform:t=>Fp(t)?t:t.hasOwnProperty("red")?ba.transform(t):wl.transform(t)},ot=(t,e,r)=>-r*t+r*e+t;function m0(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function kCe({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,o=0,s=0;if(!e)i=o=s=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;i=m0(c,a,t+1/3),o=m0(c,a,t),s=m0(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:n}}const y0=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},PCe=[YE,ba,wl],LCe=t=>PCe.find(e=>e.test(t));function DT(t){const e=LCe(t);let r=e.parse(t);return e===wl&&(r=kCe(r)),r}const Az=(t,e)=>{const r=DT(t),n=DT(e),i={...r};return o=>(i.red=y0(r.red,n.red,o),i.green=y0(r.green,n.green,o),i.blue=y0(r.blue,n.blue,o),i.alpha=ot(r.alpha,n.alpha,o),ba.transform(i))};function DCe(t){var e,r;return isNaN(t)&&Fp(t)&&(((e=t.match(Qb))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Q3))===null||r===void 0?void 0:r.length)||0)>0}const Sz={regex:A1e,countKey:"Vars",token:"${v}",parse:ht},Cz={regex:Q3,countKey:"Colors",token:"${c}",parse:mr.parse},Tz={regex:Qb,countKey:"Numbers",token:"${n}",parse:Ja.parse};function g0(t,{regex:e,countKey:r,token:n,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+r]=o.length,t.tokenised=t.tokenised.replace(e,n),t.values.push(...o.map(i)))}function hy(t){const e=t.toString(),r={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&g0(r,Sz),g0(r,Cz),g0(r,Tz),r}function kz(t){return hy(t).values}function Pz(t){const{values:e,numColors:r,numVars:n,tokenised:i}=hy(t),o=e.length;return s=>{let a=i;for(let c=0;c<o;c++)c<n?a=a.replace(Sz.token,s[c]):c<n+r?a=a.replace(Cz.token,mr.transform(s[c])):a=a.replace(Tz.token,gd(s[c]));return a}}const BCe=t=>typeof t=="number"?0:t;function ICe(t){const e=kz(t);return Pz(t)(e.map(BCe))}const As={test:DCe,parse:kz,createTransformer:Pz,getAnimatableNone:ICe},Lz=(t,e)=>r=>`${r>0?e:t}`;function Dz(t,e){return typeof t=="number"?r=>ot(t,e,r):mr.test(t)?Az(t,e):t.startsWith("var(")?Lz(t,e):Iz(t,e)}const Bz=(t,e)=>{const r=[...t],n=r.length,i=t.map((o,s)=>Dz(o,e[s]));return o=>{for(let s=0;s<n;s++)r[s]=i[s](o);return r}},jCe=(t,e)=>{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=Dz(t[i],e[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}},Iz=(t,e)=>{const r=As.createTransformer(e),n=hy(t),i=hy(e);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?as(Bz(n.values,i.values),r):Lz(t,e)},nf=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},BT=(t,e)=>r=>ot(t,e,r);function OCe(t){return typeof t=="number"?BT:typeof t=="string"?mr.test(t)?Az:Iz:Array.isArray(t)?Bz:typeof t=="object"?jCe:BT}function UCe(t,e,r){const n=[],i=r||OCe(t[0]),o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||ht:e;a=as(c,a)}n.push(a)}return n}function jz(t,e,{clamp:r=!0,ease:n,mixer:i}={}){const o=t.length;if(bS(o===e.length),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=UCe(e,n,i),a=s.length,c=u=>{let d=0;if(a>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=nf(t[d],t[d+1],u);return s[d](f)};return r?u=>c(Rs(t[0],t[o-1],u)):c}function $Ce(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const i=nf(0,e,n);t.push(ot(r,1,i))}}function VCe(t){const e=[0];return $Ce(e,t.length-1),e}function KCe(t,e){return t.map(r=>r*e)}function MCe(t,e){return t.map(()=>e||vz).splice(0,t.length-1)}function my({duration:t=300,keyframes:e,times:r,ease:n="easeInOut"}){const i=xCe(n)?n.map(LT):LT(n),o={done:!1,value:e[0]},s=KCe(r&&r.length===e.length?r:VCe(e),t),a=jz(s,e,{ease:Array.isArray(i)?i:MCe(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function Oz(t,e){return e?t*(1e3/e):0}const NCe=5;function Uz(t,e,r){const n=Math.max(e-NCe,0);return Oz(r-t(n),e-n)}const b0=.001,zCe=.01,FCe=10,qCe=.05,GCe=1;function HCe({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,o,s=1-e;s=Rs(qCe,GCe,s),t=Rs(zCe,FCe,po(t)),s<1?(i=u=>{const d=u*s,f=d*t,h=d-r,m=ew(u,s),g=Math.exp(-f);return b0-h/m*g},o=u=>{const f=u*s*t,h=f*r+r,m=Math.pow(s,2)*Math.pow(u,2)*t,g=Math.exp(-f),v=ew(Math.pow(u,2),s);return(-i(u)+b0>0?-1:1)*((h-m)*g)/v}):(i=u=>{const d=Math.exp(-u*t),f=(u-r)*t+1;return-b0+d*f},o=u=>{const d=Math.exp(-u*t),f=(r-u)*(t*t);return d*f});const a=5/t,c=XCe(i,o,a);if(t=Sa(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:s*2*Math.sqrt(n*u),duration:t}}}const WCe=12;function XCe(t,e,r){let n=r;for(let i=1;i<WCe;i++)n=n-t(n)/e(n);return n}function ew(t,e){return t*Math.sqrt(1-e*e)}const JCe=["duration","bounce"],ZCe=["stiffness","damping","mass"];function IT(t,e){return e.some(r=>t[r]!==void 0)}function QCe(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!IT(t,ZCe)&&IT(t,JCe)){const r=HCe(t);e={...e,...r,mass:1},e.isResolvedFromDuration=!0}return e}function $z({keyframes:t,restDelta:e,restSpeed:r,...n}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=QCe({...n,velocity:-po(n.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(a*u)),v=o-i,w=po(Math.sqrt(a/u)),y=Math.abs(v)<5;r||(r=y?.01:2),e||(e=y?.005:.5);let b;if(g<1){const E=ew(w,g);b=_=>{const T=Math.exp(-g*w*_);return o-T*((m+g*w*v)/E*Math.sin(E*_)+v*Math.cos(E*_))}}else if(g===1)b=E=>o-Math.exp(-w*E)*(v+(m+w*v)*E);else{const E=w*Math.sqrt(g*g-1);b=_=>{const T=Math.exp(-g*w*_),B=Math.min(E*_,300);return o-T*((m+g*w*v)*Math.sinh(B)+E*v*Math.cosh(B))/E}}return{calculatedDuration:h&&d||null,next:E=>{const _=b(E);if(h)s.done=E>=d;else{let T=m;E!==0&&(g<1?T=Uz(b,E,_):T=0);const B=Math.abs(T)<=r,I=Math.abs(o-_)<=e;s.done=B&&I}return s.value=s.done?o:_,s}}}function jT({keyframes:t,velocity:e=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=t[0],h={done:!1,value:f},m=O=>a!==void 0&&O<a||c!==void 0&&O>c,g=O=>a===void 0?c:c===void 0||Math.abs(a-O)<Math.abs(c-O)?a:c;let v=r*e;const w=f+v,y=s===void 0?w:s(w);y!==w&&(v=y-f);const b=O=>-v*Math.exp(-O/n),E=O=>y+b(O),_=O=>{const F=b(O),re=E(O);h.done=Math.abs(F)<=u,h.value=h.done?y:re};let T,B;const I=O=>{m(h.value)&&(T=O,B=$z({keyframes:[h.value,g(h.value)],velocity:Uz(E,O,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:O=>{let F=!1;return!B&&T===void 0&&(F=!0,_(O),I(O)),T!==void 0&&O>T?B.next(O-T):(!F&&_(O),h)}}}const YCe=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Qe.update(e,!0),stop:()=>Eo(e),now:()=>rr.isProcessing?rr.timestamp:performance.now()}},OT=2e4;function UT(t){let e=0;const r=50;let n=t.next(e);for(;!n.done&&e<OT;)e+=r,n=t.next(e);return e>=OT?1/0:e}const eTe={decay:jT,inertia:jT,tween:my,keyframes:my,spring:$z};function yy({autoplay:t=!0,delay:e=0,driver:r=YCe,keyframes:n,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:f,...h}){let m=1,g=!1,v,w;const y=()=>{w=new Promise(ue=>{v=ue})};y();let b;const E=eTe[i]||my;let _;E!==my&&typeof n[0]!="number"&&(_=jz([0,100],n,{clamp:!1}),n=[0,100]);const T=E({...h,keyframes:n});let B;a==="mirror"&&(B=E({...h,keyframes:[...n].reverse(),velocity:-(h.velocity||0)}));let I="idle",O=null,F=null,re=null;T.calculatedDuration===null&&o&&(T.calculatedDuration=UT(T));const{calculatedDuration:ze}=T;let Rt=1/0,Nt=1/0;ze!==null&&(Rt=ze+s,Nt=Rt*(o+1)-s);let tt=0;const sn=ue=>{if(F===null)return;m>0&&(F=Math.min(F,ue)),m<0&&(F=Math.min(ue-Nt/m,F)),O!==null?tt=O:tt=Math.round(ue-F)*m;const Fe=tt-e*(m>=0?1:-1),Bn=m>=0?Fe<0:Fe>Nt;tt=Math.max(Fe,0),I==="finished"&&O===null&&(tt=Nt);let qr=tt,Ni=T;if(o){const pe=Math.min(tt,Nt)/Rt;let Re=Math.floor(pe),Ee=pe%1;!Ee&&pe>=1&&(Ee=1),Ee===1&&Re--,Re=Math.min(Re,o+1),!!(Re%2)&&(a==="reverse"?(Ee=1-Ee,s&&(Ee-=s/Rt)):a==="mirror"&&(Ni=B)),qr=Rs(0,1,Ee)*Rt}const zt=Bn?{done:!1,value:n[0]}:Ni.next(qr);_&&(zt.value=_(zt.value));let{done:U}=zt;!Bn&&ze!==null&&(U=m>=0?tt>=Nt:tt<=0);const J=O===null&&(I==="finished"||I==="running"&&U);return f&&f(zt.value),J&&q(),zt},Ke=()=>{b&&b.stop(),b=void 0},Ar=()=>{I="idle",Ke(),v(),y(),F=re=null},q=()=>{I="finished",d&&d(),Ke(),v()},oe=()=>{if(g)return;b||(b=r(sn));const ue=b.now();c&&c(),O!==null?F=ue-O:(!F||I==="finished")&&(F=ue),I==="finished"&&y(),re=F,O=null,I="running",b.start()};t&&oe();const de={then(ue,Fe){return w.then(ue,Fe)},get time(){return po(tt)},set time(ue){ue=Sa(ue),tt=ue,O!==null||!b||m===0?O=ue:F=b.now()-ue/m},get duration(){const ue=T.calculatedDuration===null?UT(T):T.calculatedDuration;return po(ue)},get speed(){return m},set speed(ue){ue===m||!b||(m=ue,de.time=po(tt))},get state(){return I},play:oe,pause:()=>{I="paused",O=tt},stop:()=>{g=!0,I!=="idle"&&(I="idle",u&&u(),Ar())},cancel:()=>{re!==null&&sn(re),Ar()},complete:()=>{I="finished"},sample:ue=>(F=0,sn(ue))};return de}function tTe(t){let e;return()=>(e===void 0&&(e=t()),e)}const rTe=tTe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),nTe=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Oh=10,iTe=2e4,oTe=(t,e)=>e.type==="spring"||t==="backgroundColor"||!mz(e.ease);function sTe(t,e,{onUpdate:r,onComplete:n,...i}){if(!(rTe()&&nTe.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c,u=!1;const d=()=>{c=new Promise(E=>{a=E})};d();let{keyframes:f,duration:h=300,ease:m,times:g}=i;if(oTe(e,i)){const E=yy({...i,repeat:0,delay:0});let _={done:!1,value:f[0]};const T=[];let B=0;for(;!_.done&&B<iTe;)_=E.sample(B),T.push(_.value),B+=Oh;g=void 0,f=T,h=B-Oh,m="linear"}const v=mCe(t.owner.current,e,f,{...i,duration:h,ease:m,times:g}),w=()=>{u=!1,v.cancel()},y=()=>{u=!0,Qe.update(w),a(),d()};return v.onfinish=()=>{u||(t.set(yCe(f,i)),n&&n(),y())},{then(E,_){return c.then(E,_)},attachTimeline(E){return v.timeline=E,v.onfinish=null,ht},get time(){return po(v.currentTime||0)},set time(E){v.currentTime=Sa(E)},get speed(){return v.playbackRate},set speed(E){v.playbackRate=E},get duration(){return po(h)},play:()=>{s||(v.play(),Eo(w))},pause:()=>v.pause(),stop:()=>{if(s=!0,v.playState==="idle")return;const{currentTime:E}=v;if(E){const _=yy({...i,autoplay:!1});t.setWithVelocity(_.sample(E-Oh).value,_.sample(E).value,Oh)}y()},complete:()=>{u||v.finish()},cancel:y}}function aTe({keyframes:t,delay:e,onUpdate:r,onComplete:n}){const i=()=>(r&&r(t[t.length-1]),n&&n(),{time:0,speed:1,duration:0,play:ht,pause:ht,stop:ht,then:o=>(o(),Promise.resolve()),cancel:ht,complete:ht});return e?yy({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const lTe={type:"spring",stiffness:500,damping:25,restSpeed:10},cTe=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),uTe={type:"keyframes",duration:.8},dTe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fTe=(t,{keyframes:e})=>e.length>2?uTe:Xa.has(t)?t.startsWith("scale")?cTe(e[1]):lTe:dTe,tw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(As.test(e)||e==="0")&&!e.startsWith("url(")),pTe=new Set(["brightness","contrast","saturate","opacity"]);function hTe(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Qb)||[];if(!n)return t;const i=r.replace(n,"");let o=pTe.has(e)?1:0;return n!==r&&(o*=100),e+"("+o+i+")"}const mTe=/([a-z-]*)\(.*?\)/g,rw={...As,getAnimatableNone:t=>{const e=t.match(mTe);return e?e.map(hTe).join(" "):t}},yTe={...Y3,color:mr,backgroundColor:mr,outlineColor:mr,fill:mr,stroke:mr,borderColor:mr,borderTopColor:mr,borderRightColor:mr,borderBottomColor:mr,borderLeftColor:mr,filter:rw,WebkitFilter:rw},xS=t=>yTe[t];function Vz(t,e){let r=xS(t);return r!==rw&&(r=As),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const Kz=t=>/^0[^.\s]+$/.test(t);function gTe(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Kz(t)}function bTe(t,e,r,n){const i=tw(e,r);let o;Array.isArray(r)?o=[...r]:o=[null,r];const s=n.from!==void 0?n.from:t.get();let a;const c=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),gTe(o[u])&&c.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];o[d]=Vz(e,a)}return o}function vTe({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function _S(t,e){return t[e]||t.default||t}const ETe={skipAnimations:!1},RS=(t,e,r,n={})=>i=>{const o=_S(n,t)||{},s=o.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Sa(s);const c=bTe(e,t,r,o),u=c[0],d=c[c.length-1],f=tw(t,u),h=tw(t,d);let m={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:g=>{e.set(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(vTe(o)||(m={...m,...fTe(t,m)}),m.duration&&(m.duration=Sa(m.duration)),m.repeatDelay&&(m.repeatDelay=Sa(m.repeatDelay)),!f||!h||hCe.current||o.type===!1||ETe.skipAnimations)return aTe(m);if(!n.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const g=sTe(e,t,m);if(g)return g}return yy(m)};function gy(t){return!!(Nr(t)&&t.add)}const Mz=t=>/^\-?\d*\.?\d+$/.test(t);function AS(t,e){t.indexOf(e)===-1&&t.push(e)}function SS(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class CS{constructor(){this.subscriptions=[]}add(e){return AS(this.subscriptions,e),()=>SS(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wTe=t=>!isNaN(parseFloat(t));class xTe{constructor(e,r={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:s}=rr;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,Qe.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Qe.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=wTe(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new CS);const n=this.events[e].add(r);return e==="change"?()=>{n(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Oz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xl(t,e){return new xTe(t,e)}const Nz=t=>e=>e.test(t),_Te={test:t=>t==="auto",parse:t=>t},zz=[Ja,ae,wi,Ko,k1e,T1e,_Te],Hu=t=>zz.find(Nz(t)),RTe=[...zz,mr,As],ATe=t=>RTe.find(Nz(t));function STe(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Xl(r))}function CTe(t,e){const r=ev(t,e);let{transitionEnd:n={},transition:i={},...o}=r?t.makeTargetAnimatable(r,!1):{};o={...o,...n};for(const s in o){const a=F1e(o[s]);STe(t,s,a)}}function TTe(t,e,r){var n,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],u=e[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(n=r[c])!==null&&n!==void 0?n:t.readValue(c))!==null&&i!==void 0?i:e[c]),d!=null&&(typeof d=="string"&&(Mz(d)||Kz(d))?d=parseFloat(d):!ATe(d)&&As.test(u)&&(d=Vz(c,u)),t.addValue(c,Xl(d,{owner:t})),r[c]===void 0&&(r[c]=d),d!==null&&t.setBaseTarget(c,d))}}function kTe(t,e){return e?(e[t]||e.default||e).from:void 0}function PTe(t,e,r){const n={};for(const i in t){const o=kTe(i,e);if(o!==void 0)n[i]=o;else{const s=r.getValue(i);s&&(n[i]=s.get())}}return n}function LTe({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}function DTe(t,e){const r=t.get();if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(e[n]!==r)return!0}else return r!==e}function Fz(t,e,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const u=[],d=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),m=a[f];if(!h||m===void 0||d&&LTe(d,f))continue;const g={delay:r,elapsed:0,..._S(o||{},f)};if(window.HandoffAppearAnimations){const y=t.getProps()[q3];if(y){const b=window.HandoffAppearAnimations(y,f,h,Qe);b!==null&&(g.elapsed=b,g.isHandoff=!0)}}let v=!g.isHandoff&&!DTe(h,m);if(g.type==="spring"&&(h.getVelocity()||g.velocity)&&(v=!1),h.animation&&(v=!1),v)continue;h.start(RS(f,h,m,t.shouldReduceMotion&&Xa.has(f)?{type:!1}:g));const w=h.animation;gy(c)&&(c.add(f),w.then(()=>c.remove(f))),u.push(w)}return s&&Promise.all(u).then(()=>{s&&CTe(t,s)}),u}function nw(t,e,r={}){const n=ev(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const o=n?()=>Promise.all(Fz(t,n,r)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return BTe(t,e,u+c,d,f,r)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>u())}else return Promise.all([o(),s(r.delay)])}function BTe(t,e,r=0,n=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*n,c=i===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(t.variantChildren).sort(ITe).forEach((u,d)=>{u.notify("AnimationStart",e),s.push(nw(u,e,{...o,delay:r+c(d)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(s)}function ITe(t,e){return t.sortNodePosition(e)}function jTe(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(o=>nw(t,o,r));n=Promise.all(i)}else if(typeof e=="string")n=nw(t,e,r);else{const i=typeof e=="function"?ev(t,e,r.custom):e;n=Promise.all(Fz(t,i,r))}return n.then(()=>t.notify("AnimationComplete",e))}const OTe=[...cS].reverse(),UTe=cS.length;function $Te(t){return e=>Promise.all(e.map(({animation:r,options:n})=>jTe(t,r,n)))}function VTe(t){let e=$Te(t);const r=MTe();let n=!0;const i=(c,u)=>{const d=ev(t,u);if(d){const{transition:f,transitionEnd:h,...m}=d;c={...c,...m,...h}}return c};function o(c){e=c(t)}function s(c,u){const d=t.getProps(),f=t.getVariantContext(!0)||{},h=[],m=new Set;let g={},v=1/0;for(let y=0;y<UTe;y++){const b=OTe[y],E=r[b],_=d[b]!==void 0?d[b]:f[b],T=tf(_),B=b===u?E.isActive:null;B===!1&&(v=y);let I=_===f[b]&&_!==d[b]&&T;if(I&&n&&t.manuallyAnimateOnMount&&(I=!1),E.protectedKeys={...g},!E.isActive&&B===null||!_&&!E.prevProp||Jb(_)||typeof _=="boolean")continue;let F=KTe(E.prevProp,_)||b===u&&E.isActive&&!I&&T||y>v&&T,re=!1;const ze=Array.isArray(_)?_:[_];let Rt=ze.reduce(i,{});B===!1&&(Rt={});const{prevResolvedValues:Nt={}}=E,tt={...Nt,...Rt},sn=Ke=>{F=!0,m.has(Ke)&&(re=!0,m.delete(Ke)),E.needsAnimating[Ke]=!0};for(const Ke in tt){const Ar=Rt[Ke],q=Nt[Ke];if(g.hasOwnProperty(Ke))continue;let oe=!1;py(Ar)&&py(q)?oe=!pz(Ar,q):oe=Ar!==q,oe?Ar!==void 0?sn(Ke):m.add(Ke):Ar!==void 0&&m.has(Ke)?sn(Ke):E.protectedKeys[Ke]=!0}E.prevProp=_,E.prevResolvedValues=Rt,E.isActive&&(g={...g,...Rt}),n&&t.blockInitialAnimation&&(F=!1),F&&(!I||re)&&h.push(...ze.map(Ke=>({animation:Ke,options:{type:b,...c}})))}if(m.size){const y={};m.forEach(b=>{const E=t.getBaseTarget(b);E!==void 0&&(y[b]=E)}),h.push({animation:y})}let w=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(w=!1),n=!1,w?e(h):Promise.resolve()}function a(c,u,d){var f;if(r[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(m=>{var g;return(g=m.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),r[c].isActive=u;const h=s(d,c);for(const m in r)r[m].protectedKeys={};return h}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>r}}function KTe(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!pz(e,t):!1}function ra(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function MTe(){return{animate:ra(!0),whileInView:ra(),whileHover:ra(),whileTap:ra(),whileDrag:ra(),whileFocus:ra(),exit:ra()}}class NTe extends Ws{constructor(e){super(e),e.animationState||(e.animationState=VTe(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Jb(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let zTe=0;class FTe extends Ws{constructor(){super(...arguments),this.id=zTe++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&o.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const qTe={animation:{Feature:NTe},exit:{Feature:FTe}},$T=(t,e)=>Math.abs(t-e);function GTe(t,e){const r=$T(t.x,e.x),n=$T(t.y,e.y);return Math.sqrt(r**2+n**2)}class qz{constructor(e,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=E0(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=GTe(f.offset,{x:0,y:0})>=3;if(!h&&!m)return;const{point:g}=f,{timestamp:v}=rr;this.history.push({...g,timestamp:v});const{onStart:w,onMove:y}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=v0(h,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=E0(f.type==="pointercancel"?this.lastMoveEventInfo:v0(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,w),g&&g(f,w)},!lz(e))return;this.dragSnapToOrigin=o,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const s=Yb(e),a=v0(s,this.transformPagePoint),{point:c}=a,{timestamp:u}=rr;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=r;d&&d(e,E0(a,this.history)),this.removeListeners=as(fo(this.contextWindow,"pointermove",this.handlePointerMove),fo(this.contextWindow,"pointerup",this.handlePointerUp),fo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Eo(this.updatePoint)}}function v0(t,e){return e?{point:e(t.point)}:t}function VT(t,e){return{x:t.x-e.x,y:t.y-e.y}}function E0({point:t},e){return{point:t,delta:VT(t,Gz(e)),offset:VT(t,HTe(e)),velocity:WTe(e,.1)}}function HTe(t){return t[0]}function Gz(t){return t[t.length-1]}function WTe(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=Gz(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Sa(e)));)r--;if(!n)return{x:0,y:0};const o=po(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function tn(t){return t.max-t.min}function iw(t,e=0,r=.01){return Math.abs(t-e)<=r}function KT(t,e,r,n=.5){t.origin=n,t.originPoint=ot(e.min,e.max,t.origin),t.scale=tn(r)/tn(e),(iw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=ot(r.min,r.max,t.origin)-t.originPoint,(iw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function bd(t,e,r,n){KT(t.x,e.x,r.x,n?n.originX:void 0),KT(t.y,e.y,r.y,n?n.originY:void 0)}function MT(t,e,r){t.min=r.min+e.min,t.max=t.min+tn(e)}function XTe(t,e,r){MT(t.x,e.x,r.x),MT(t.y,e.y,r.y)}function NT(t,e,r){t.min=e.min-r.min,t.max=t.min+tn(e)}function vd(t,e,r){NT(t.x,e.x,r.x),NT(t.y,e.y,r.y)}function JTe(t,{min:e,max:r},n){return e!==void 0&&t<e?t=n?ot(e,t,n.min):Math.max(t,e):r!==void 0&&t>r&&(t=n?ot(r,t,n.max):Math.min(t,r)),t}function zT(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function ZTe(t,{top:e,left:r,bottom:n,right:i}){return{x:zT(t.x,r,i),y:zT(t.y,e,n)}}function FT(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([r,n]=[n,r]),{min:r,max:n}}function QTe(t,e){return{x:FT(t.x,e.x),y:FT(t.y,e.y)}}function YTe(t,e){let r=.5;const n=tn(t),i=tn(e);return i>n?r=nf(e.min,e.max-n,t.min):n>i&&(r=nf(t.min,t.max-i,e.min)),Rs(0,1,r)}function eke(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const ow=.35;function tke(t=ow){return t===!1?t=0:t===!0&&(t=ow),{x:qT(t,"left","right"),y:qT(t,"top","bottom")}}function qT(t,e,r){return{min:GT(t,e),max:GT(t,r)}}function GT(t,e){return typeof t=="number"?t:t[e]||0}const HT=()=>({translate:0,scale:1,origin:0,originPoint:0}),xl=()=>({x:HT(),y:HT()}),WT=()=>({min:0,max:0}),vt=()=>({x:WT(),y:WT()});function un(t){return[t("x"),t("y")]}function Hz({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function rke({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function nke(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function w0(t){return t===void 0||t===1}function sw({scale:t,scaleX:e,scaleY:r}){return!w0(t)||!w0(e)||!w0(r)}function ca(t){return sw(t)||Wz(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Wz(t){return XT(t.x)||XT(t.y)}function XT(t){return t&&t!=="0%"}function by(t,e,r){const n=t-r,i=e*n;return r+i}function JT(t,e,r,n,i){return i!==void 0&&(t=by(t,i,n)),by(t,r,n)+e}function aw(t,e=0,r=1,n,i){t.min=JT(t.min,e,r,n,i),t.max=JT(t.max,e,r,n,i)}function Xz(t,{x:e,y:r}){aw(t.x,e.translate,e.scale,e.originPoint),aw(t.y,r.translate,r.scale,r.originPoint)}function ike(t,e,r,n=!1){const i=r.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=r[a],s=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&_l(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Xz(t,s)),n&&ca(o.latestValues)&&_l(t,o.latestValues))}e.x=ZT(e.x),e.y=ZT(e.y)}function ZT(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Fo(t,e){t.min=t.min+e,t.max=t.max+e}function QT(t,e,[r,n,i]){const o=e[i]!==void 0?e[i]:.5,s=ot(t.min,t.max,o);aw(t,e[r],e[n],s,e.scale)}const oke=["x","scaleX","originX"],ske=["y","scaleY","originY"];function _l(t,e){QT(t.x,e,oke),QT(t.y,e,ske)}function Jz(t,e){return Hz(nke(t.getBoundingClientRect(),e))}function ake(t,e,r){const n=Jz(t,r),{scroll:i}=e;return i&&(Fo(n.x,i.offset.x),Fo(n.y,i.offset.y)),n}const Zz=({current:t})=>t?t.ownerDocument.defaultView:null,lke=new WeakMap;class cke{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Yb(d,"page").point)},o=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=uz(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),un(w=>{let y=this.getAxisMotionValue(w).get()||0;if(wi.test(y)){const{projection:b}=this.visualElement;if(b&&b.layout){const E=b.layout.layoutBox[w];E&&(y=tn(E)*(parseFloat(y)/100))}}this.originPoint[w]=y}),g&&Qe.update(()=>g(d,f),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(d,f)=>{const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:w}=f;if(m&&this.currentDirection===null){this.currentDirection=uke(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),v&&v(d,f)},a=(d,f)=>this.stop(d,f),c=()=>un(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new qz(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Zz(this.visualElement)})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Qe.update(()=>o(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Uh(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=JTe(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;r&&El(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=ZTe(i.layoutBox,r):this.constraints=!1,this.elastic=tke(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&un(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=eke(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!El(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ake(n,i.root,this.visualElement.getTransformPagePoint());let s=QTe(i.layout.layoutBox,o);if(r){const a=r(rke(s));this.hasMutatedConstraints=!!a,a&&(s=Hz(a))}return s}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=un(d=>{if(!Uh(d,r,this.currentDirection))return;let f=c&&c[d]||{};s&&(f={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:n?e[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(RS(e,n,0,r))}stopAnimation(){un(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){un(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){un(r=>{const{drag:n}=this.getProps();if(!Uh(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(r);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[r];o.set(e[r]-ot(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!El(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};un(s=>{const a=this.getAxisMotionValue(s);if(a){const c=a.get();i[s]=YTe({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),un(s=>{if(!Uh(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];a.set(ot(c,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;lke.set(this.visualElement,this);const e=this.visualElement.current,r=fo(e,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();El(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),n();const s=io(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(un(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),r(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ow,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Uh(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function uke(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class dke extends Ws{constructor(e){super(e),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new cke(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const YT=t=>(e,r)=>{t&&Qe.update(()=>t(e,r))};class fke extends Ws{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(e){this.session=new qz(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zz(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:YT(e),onStart:YT(r),onMove:n,onEnd:(o,s)=>{delete this.session,i&&Qe.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=fo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function pke(){const t=k.useContext(aS);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=k.useId();return k.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}const hm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ek(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Wu={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ae.test(t))t=parseFloat(t);else return t;const r=ek(t,e.target.x),n=ek(t,e.target.y);return`${r}% ${n}%`}},hke={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=As.parse(t);if(i.length>5)return n;const o=As.createTransformer(t),s=typeof i[0]!="number"?1:0,a=r.x.scale*e.x,c=r.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const u=ot(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class mke extends hw.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=e;w1e(yke),o&&(r.group&&r.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),hm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:o}=this.props,s=n.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Qe.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qz(t){const[e,r]=pke(),n=k.useContext(H3);return hw.createElement(mke,{...t,layoutGroup:n,switchLayoutGroup:k.useContext(W3),isPresent:e,safeToRemove:r})}const yke={borderRadius:{...Wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wu,borderTopRightRadius:Wu,borderBottomLeftRadius:Wu,borderBottomRightRadius:Wu,boxShadow:hke},Yz=["TopLeft","TopRight","BottomLeft","BottomRight"],gke=Yz.length,tk=t=>typeof t=="string"?parseFloat(t):t,rk=t=>typeof t=="number"||ae.test(t);function bke(t,e,r,n,i,o){i?(t.opacity=ot(0,r.opacity!==void 0?r.opacity:1,vke(n)),t.opacityExit=ot(e.opacity!==void 0?e.opacity:1,0,Eke(n))):o&&(t.opacity=ot(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let s=0;s<gke;s++){const a=`border${Yz[s]}Radius`;let c=nk(e,a),u=nk(r,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||rk(c)===rk(u)?(t[a]=Math.max(ot(tk(c),tk(u),n),0),(wi.test(u)||wi.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||r.rotate)&&(t.rotate=ot(e.rotate||0,r.rotate||0,n))}function nk(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const vke=eF(0,.5,xz),Eke=eF(.5,.95,ht);function eF(t,e,r){return n=>n<t?0:n>e?1:r(nf(t,e,n))}function ik(t,e){t.min=e.min,t.max=e.max}function cn(t,e){ik(t.x,e.x),ik(t.y,e.y)}function ok(t,e,r,n,i){return t-=e,t=by(t,1/r,n),i!==void 0&&(t=by(t,1/i,n)),t}function wke(t,e=0,r=1,n=.5,i,o=t,s=t){if(wi.test(e)&&(e=parseFloat(e),e=ot(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=ot(o.min,o.max,n);t===o&&(a-=e),t.min=ok(t.min,e,r,a,i),t.max=ok(t.max,e,r,a,i)}function sk(t,e,[r,n,i],o,s){wke(t,e[r],e[n],e[i],e.scale,o,s)}const xke=["x","scaleX","originX"],_ke=["y","scaleY","originY"];function ak(t,e,r,n){sk(t.x,e,xke,r?r.x:void 0,n?n.x:void 0),sk(t.y,e,_ke,r?r.y:void 0,n?n.y:void 0)}function lk(t){return t.translate===0&&t.scale===1}function tF(t){return lk(t.x)&&lk(t.y)}function Rke(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function rF(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ck(t){return tn(t.x)/tn(t.y)}class Ake{constructor(){this.members=[]}add(e){AS(this.members,e),e.scheduleRender()}remove(e){if(SS(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(e,r){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uk(t,e,r){let n="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(n=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:u,rotateY:d}=r;c&&(n+=`rotate(${c}deg) `),u&&(n+=`rotateX(${u}deg) `),d&&(n+=`rotateY(${d}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(n+=`scale(${s}, ${a})`),n||"none"}const Ske=(t,e)=>t.depth-e.depth;class Cke{constructor(){this.children=[],this.isDirty=!1}add(e){AS(this.children,e),this.isDirty=!0}remove(e){SS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ske),this.isDirty=!1,this.children.forEach(e)}}function Tke(t,e){const r=performance.now(),n=({timestamp:i})=>{const o=i-r;o>=e&&(Eo(n),t(o-e))};return Qe.read(n,!0),()=>Eo(n)}function kke(t){window.MotionDebug&&window.MotionDebug.record(t)}function Pke(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Lke(t,e,r){const n=Nr(t)?t:Xl(t);return n.start(RS("",n,e,r)),n.animation}const dk=["","X","Y","Z"],Dke={visibility:"hidden"},fk=1e3;let Bke=0;const ua={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function nF({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Bke++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ua.totalNodes=ua.resolvedTargetDeltas=ua.recalculatedProjection=0,this.nodes.forEach(Oke),this.nodes.forEach(Mke),this.nodes.forEach(Nke),this.nodes.forEach(Uke),kke(ua)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cke)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new CS),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Pke(s),this.instance=s;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||c)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Tke(h,250),hm.hasAnimatedSinceResize&&(hm.hasAnimatedSinceResize=!1,this.nodes.forEach(hk))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||Hke,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=d.getProps(),b=!this.targetLayout||!rF(this.targetLayout,g)||m,E=!h&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||E||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,E);const _={..._S(v,"layout"),onPlay:w,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else h||hk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Eo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(zke),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(pk);return}this.isUpdating||this.nodes.forEach(Vke),this.isUpdating=!1,this.nodes.forEach(Kke),this.nodes.forEach(Ike),this.nodes.forEach(jke),this.clearAllSnapshots();const a=performance.now();rr.delta=Rs(0,1e3/60,a-rr.timestamp),rr.timestamp=a,rr.isProcessing=!0,d0.update.process(rr),d0.preRender.process(rr),d0.render.process(rr),rr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach($ke),this.sharedNodes.forEach(Fke)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=vt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:n(this.instance),offset:r(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!tF(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&(a||ca(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),Wke(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return vt();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(Fo(a.x,c.offset.x),Fo(a.y,c.offset.y)),a}removeElementScroll(s){const a=vt();cn(a,s);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;if(u!==this.root&&d&&f.layoutScroll){if(d.isRoot){cn(a,s);const{scroll:h}=this.root;h&&(Fo(a.x,-h.offset.x),Fo(a.y,-h.offset.y))}Fo(a.x,d.offset.x),Fo(a.y,d.offset.y)}}return a}applyTransform(s,a=!1){const c=vt();cn(c,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&_l(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ca(d.latestValues)&&_l(c,d.latestValues)}return ca(this.latestValues)&&_l(c,this.latestValues),c}removeTransform(s){const a=vt();cn(a,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ca(u.latestValues))continue;sw(u.latestValues)&&u.updateSnapshot();const d=vt(),f=u.measurePageBox();cn(d,f),ak(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ca(this.latestValues)&&ak(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=rr.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),vd(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=vt(),this.targetWithTransforms=vt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),XTe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cn(this.target,this.layout.layoutBox),Xz(this.target,this.targetDelta)):cn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vt(),this.relativeTargetOrigin=vt(),vd(this.relativeTargetOrigin,this.target,m.target),cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ua.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||sw(this.parent.latestValues)||Wz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===rr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;cn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;ike(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:g}=a;if(!g){this.projectionTransform&&(this.projectionDelta=xl(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=xl(),this.projectionDeltaWithTransform=xl());const v=this.projectionTransform;bd(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=uk(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==h||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),ua.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=xl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=vt(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,w=this.getStack(),y=!w||w.members.length<=1,b=!!(v&&!y&&this.options.crossfade===!0&&!this.path.some(Gke));this.animationProgress=0;let E;this.mixTargetDelta=_=>{const T=_/1e3;mk(f.x,s.x,T),mk(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qke(this.relativeTarget,this.relativeTargetOrigin,h,T),E&&Rke(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=vt()),cn(E,this.relativeTarget)),v&&(this.animationValues=d,bke(d,u,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Eo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{hm.hasAnimatedSinceResize=!0,this.currentAnimation=Lke(0,fk,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=s;if(!(!a||!c||!u)){if(this!==s&&this.layout&&u&&iF(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||vt();const f=tn(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=tn(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}cn(a,c),_l(a,d),bd(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Ake),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let d=0;d<dk.length;d++){const f="rotate"+dk[d];c[f]&&(u[f]=c[f],s.setStaticValue(f,0))}s.render();for(const d in u)s.setStaticValue(d,u[d]);s.scheduleRender()}getProjectionStyles(s){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Dke;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=pm(s==null?void 0:s.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=pm(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!ca(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=uk(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:m,y:g}=this.projectionDelta;u.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const v in dy){if(h[v]===void 0)continue;const{correct:w,applyTo:y}=dy[v],b=u.transform==="none"?h[v]:w(h[v],f);if(y){const E=y.length;for(let _=0;_<E;_++)u[y[_]]=b}else u[v]=b}return this.options.layoutId&&(u.pointerEvents=f===this?pm(s==null?void 0:s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(pk),this.root.sharedNodes.clear()}}}function Ike(t){t.updateLayout()}function jke(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,s=r.source!==t.layout.source;o==="size"?un(f=>{const h=s?r.measuredBox[f]:r.layoutBox[f],m=tn(h);h.min=n[f].min,h.max=h.min+m}):iF(o,r.layoutBox,n)&&un(f=>{const h=s?r.measuredBox[f]:r.layoutBox[f],m=tn(n[f]);h.max=h.min+m,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+m)});const a=xl();bd(a,n,r.layoutBox);const c=xl();s?bd(c,t.applyTransform(i,!0),r.measuredBox):bd(c,n,r.layoutBox);const u=!tF(a);let d=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=vt();vd(g,r.layoutBox,h.layoutBox);const v=vt();vd(v,n,m.layoutBox),rF(g,v)||(d=!0),f.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=g,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Oke(t){ua.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Uke(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $ke(t){t.clearSnapshot()}function pk(t){t.clearMeasurements()}function Vke(t){t.isLayoutDirty=!1}function Kke(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function hk(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Mke(t){t.resolveTargetDelta()}function Nke(t){t.calcProjection()}function zke(t){t.resetRotation()}function Fke(t){t.removeLeadSnapshot()}function mk(t,e,r){t.translate=ot(e.translate,0,r),t.scale=ot(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function yk(t,e,r,n){t.min=ot(e.min,r.min,n),t.max=ot(e.max,r.max,n)}function qke(t,e,r,n){yk(t.x,e.x,r.x,n),yk(t.y,e.y,r.y,n)}function Gke(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Hke={duration:.45,ease:[.4,0,.1,1]},gk=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),bk=gk("applewebkit/")&&!gk("chrome/")?Math.round:ht;function vk(t){t.min=bk(t.min),t.max=bk(t.max)}function Wke(t){vk(t.x),vk(t.y)}function iF(t,e,r){return t==="position"||t==="preserve-aspect"&&!iw(ck(e),ck(r),.2)}const Xke=nF({attachResizeListener:(t,e)=>io(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),x0={current:void 0},oF=nF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!x0.current){const t=new Xke({});t.mount(window),t.setOptions({layoutScroll:!0}),x0.current=t}return x0.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Jke={pan:{Feature:fke},drag:{Feature:dke,ProjectionNode:oF,MeasureLayout:Qz}},Zke=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qke(t){const e=Zke.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function lw(t,e,r=1){const[n,i]=Qke(t);if(!n)return;const o=window.getComputedStyle(e).getPropertyValue(n);if(o){const s=o.trim();return Mz(s)?parseFloat(s):s}else return ZE(i)?lw(i,e,r+1):i}function Yke(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const o=i.get();if(!ZE(o))return;const s=lw(o,n);s&&i.set(s)});for(const i in e){const o=e[i];if(!ZE(o))continue;const s=lw(o,n);s&&(e[i]=s,r||(r={}),r[i]===void 0&&(r[i]=o))}return{target:e,transitionEnd:r}}const ePe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sF=t=>ePe.has(t),tPe=t=>Object.keys(t).some(sF),Ek=t=>t===Ja||t===ae,wk=(t,e)=>parseFloat(t.split(", ")[e]),xk=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return wk(i[1],e);{const o=n.match(/^matrix\((.+)\)$/);return o?wk(o[1],t):0}},rPe=new Set(["x","y","z"]),nPe=zp.filter(t=>!rPe.has(t));function iPe(t){const e=[];return nPe.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Jl={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:xk(4,13),y:xk(5,14)};Jl.translateX=Jl.x;Jl.translateY=Jl.y;const oPe=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(u=>{a[u]=Jl[u](n,o)}),e.render();const c=e.measureViewportBox();return r.forEach(u=>{const d=e.getValue(u);d&&d.jump(a[u]),t[u]=Jl[u](c,o)}),t},sPe=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(sF);let o=[],s=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let d=r[c],f=Hu(d);const h=e[c];let m;if(py(h)){const g=h.length,v=h[0]===null?1:0;d=h[v],f=Hu(d);for(let w=v;w<g&&h[w]!==null;w++)m?bS(Hu(h[w])===m):m=Hu(h[w])}else m=Hu(h);if(f!==m)if(Ek(f)&&Ek(m)){const g=u.get();typeof g=="string"&&u.set(parseFloat(g)),typeof h=="string"?e[c]=parseFloat(h):Array.isArray(h)&&m===ae&&(e[c]=h.map(parseFloat))}else f!=null&&f.transform&&(m!=null&&m.transform)&&(d===0||h===0)?d===0?u.set(m.transform(d)):e[c]=f.transform(h):(s||(o=iPe(t),s=!0),a.push(c),n[c]=n[c]!==void 0?n[c]:e[c],u.jump(h))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=oPe(e,t,a);return o.length&&o.forEach(([d,f])=>{t.getValue(d).set(f)}),t.render(),Xb&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:n}}else return{target:e,transitionEnd:n}};function aPe(t,e,r,n){return tPe(e)?sPe(t,e,r,n):{target:e,transitionEnd:n}}const lPe=(t,e,r,n)=>{const i=Yke(t,e,n);return e=i.target,n=i.transitionEnd,aPe(t,e,r,n)},cw={current:null},aF={current:!1};function cPe(){if(aF.current=!0,!!Xb)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>cw.current=t.matches;t.addListener(e),e()}else cw.current=!1}function uPe(t,e,r){const{willChange:n}=e;for(const i in e){const o=e[i],s=r[i];if(Nr(o))t.addValue(i,o),gy(n)&&n.add(i);else if(Nr(s))t.addValue(i,Xl(o,{owner:t})),gy(n)&&n.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Xl(a!==void 0?a:o,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const _k=new WeakMap,lF=Object.keys(rf),dPe=lF.length,Rk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fPe=uS.length;class pPe{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Qe.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Zb(r),this.isVariantNode=G3(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{});for(const f in d){const h=d[f];a[f]!==void 0&&Nr(h)&&(h.set(a[f],!1),gy(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,_k.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),aF.current||cPe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_k.delete(this.current),this.projection&&this.projection.unmount(),Eo(this.notifyUpdate),Eo(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=Xa.has(e),i=r.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Qe.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,o){let s,a;for(let c=0;c<dPe;c++){const u=lF[c],{isEnabled:d,Feature:f,ProjectionNode:h,MeasureLayout:m}=rf[u];h&&(s=h),d(r)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),m&&(a=m))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:f,layoutScroll:h,layoutRoot:m}=r;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||f&&El(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:m})}return a}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<Rk.length;n++){const i=Rk[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=uPe(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<fPe;n++){const i=uS[n],o=this.props[i];(tf(o)||o===!1)&&(r[i]=o)}return r}addVariantChild(e){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(e),()=>r.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Xl(r,{owner:this}),this.addValue(e,n)),n}readValue(e){var r;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=gS(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!Nr(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new CS),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class cF extends pPe{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},o){let s=PTe(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),s&&(s=i(s))),o){TTe(this,n,s);const a=lPe(this,n,s,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function hPe(t){return window.getComputedStyle(t)}class mPe extends cF{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,r){if(Xa.has(r)){const n=xS(r);return n&&n.default||0}else{const n=hPe(e),i=(Z3(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return Jz(e,r)}build(e,r,n,i){fS(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return yS(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Nr(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){nz(e,r,n,i)}}class yPe extends cF{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Xa.has(r)){const n=xS(r);return n&&n.default||0}return r=iz.has(r)?r:lS(r),e.getAttribute(r)}measureInstanceViewportBox(){return vt()}scrapeMotionValuesFromProps(e,r){return sz(e,r)}build(e,r,n,i){hS(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){oz(e,r,n,i)}mount(e){this.isSVGTag=mS(e.tagName),super.mount(e)}}const gPe=(t,e)=>dS(t)?new yPe(e,{enableHardwareAcceleration:!1}):new mPe(e,{enableHardwareAcceleration:!0}),bPe={layout:{ProjectionNode:oF,MeasureLayout:Qz}},vPe={...qTe,...dCe,...Jke,...bPe},Ak=v1e((t,e)=>Q1e(t,e,vPe,gPe));var td=(t=>(t.NORMAL="normal",t.RARE="rare",t.SUPER_RARE="super_rare",t.KIRA="kira",t.UNIQUE="unique",t))(td||{});const EPe={0:{name:"アイ",color:"#fff700"},1:{name:"夢幻",color:"#b19cd9"},2:{name:"光彩",color:"#ffd700"},3:{name:"中性子",color:"#cacfd2"},4:{name:"太陽",color:"#ff6b35"},5:{name:"夜空",color:"#1a1a2e"},6:{name:"雪",color:"#e3f2fd"},7:{name:"雷",color:"#ffd93d"},8:{name:"超究",color:"#6c5ce7"},9:{name:"剣",color:"#a8e6cf"},10:{name:"破壊",color:"#ff4757"},11:{name:"地球",color:"#4834d4"},12:{name:"天の川",color:"#9c88ff"},13:{name:"創造",color:"#00d2d3"},14:{name:"超新星",color:"#ff9ff3"},15:{name:"世界",color:"#54a0ff"}},wPe=({card:t,isRevealing:e=!1,detailed:r=!1})=>{const n=EPe[t.id]||{name:"Unknown",color:"#666"},i=`https://git.syui.ai/ai/card/raw/branch/main/img/${t.id}.webp`,o=()=>{switch(t.status){case td.UNIQUE:return"card-unique";case td.KIRA:return"card-kira";case td.SUPER_RARE:return"card-super-rare";case td.RARE:return"card-rare";default:return"card-normal"}};return r?D.jsx(Ak.div,{className:`card ${o()}`,initial:e?{rotateY:180}:{},animate:e?{rotateY:0}:{},transition:{duration:.8,type:"spring"},style:{"--card-color":n.color},children:D.jsxs("div",{className:"card-inner",children:[D.jsxs("div",{className:"card-header",children:[D.jsxs("span",{className:"card-id",children:["#",t.id]}),D.jsxs("span",{className:"card-cp",children:["CP: ",t.cp]})]}),D.jsx("div",{className:"card-image-container",children:D.jsx("img",{src:i,alt:n.name,className:"card-image",onError:s=>{s.target.style.display="none"}})}),D.jsxs("div",{className:"card-content",children:[D.jsx("h3",{className:"card-name",children:n.name}),t.is_unique&&D.jsx("div",{className:"unique-badge",children:"UNIQUE"})]}),t.skill&&D.jsx("div",{className:"card-skill",children:D.jsx("p",{children:t.skill})}),D.jsx("div",{className:"card-footer",children:D.jsx("span",{className:"card-rarity",children:t.status.toUpperCase()})})]})}):D.jsx(Ak.div,{className:`card card-simple ${o()}`,initial:e?{rotateY:180}:{},animate:e?{rotateY:0}:{},transition:{duration:.8,type:"spring"},children:D.jsx("div",{className:"card-frame",children:D.jsx("img",{src:i,alt:n.name,className:"card-image-simple",onError:s=>{s.target.style.display="none"}})})})},xPe=()=>{const[t,e]=k.useState(!0),[r,n]=k.useState([]),[i,o]=k.useState(null);k.useEffect(()=>{s()},[]);const s=async()=>{try{e(!0);const u=await fetch("http://localhost:8000/api/v1/cards/master");if(!u.ok)throw new Error("Failed to fetch card master data");const d=await u.json();n(d)}catch(u){console.error("Error loading card master data:",u),o(u instanceof Error?u.message:"Failed to load card data")}finally{e(!1)}};if(t)return D.jsx("div",{className:"card-list-container",children:D.jsx("div",{className:"loading",children:"Loading card data..."})});if(i)return D.jsxs("div",{className:"card-list-container",children:[D.jsxs("div",{className:"error",children:["Error: ",i]}),D.jsx("button",{onClick:s,children:"Retry"})]});const a=["normal","unique"],c=[];return r.forEach(u=>{a.forEach(d=>{const f={id:u.id,cp:Math.floor((u.base_cp_min+u.base_cp_max)/2),status:d,skill:null,owner_did:"sample",obtained_at:new Date().toISOString(),is_unique:d==="unique",unique_id:d==="unique"?"sample-unique-id":null};c.push({card:f,data:u,patternName:`${u.id}-${d}`})})}),D.jsxs("div",{className:"card-list-container",children:[D.jsxs("header",{className:"card-list-header",children:[D.jsx("h1",{children:"ai.card マスターリスト"}),D.jsx("p",{children:"全カード・全レアリティパターン表示"}),D.jsx("p",{className:"source-info",children:"データソース: https://git.syui.ai/ai/ai/raw/branch/main/ai.json"})]}),D.jsx("div",{className:"card-list-simple-grid",children:c.map(({card:u,data:d,patternName:f})=>D.jsxs("div",{className:"card-list-simple-item",children:[D.jsx(wPe,{card:u,detailed:!1}),D.jsxs("div",{className:"card-info-details",children:[D.jsxs("p",{children:[D.jsx("strong",{children:"ID:"})," ",d.id]}),D.jsxs("p",{children:[D.jsx("strong",{children:"Name:"})," ",d.name]}),D.jsxs("p",{children:[D.jsx("strong",{children:"日本語名:"})," ",d.ja_name]}),D.jsxs("p",{children:[D.jsx("strong",{children:"レアリティ:"})," ",u.status]}),D.jsxs("p",{children:[D.jsx("strong",{children:"CP:"})," ",u.cp]}),D.jsxs("p",{children:[D.jsx("strong",{children:"CP範囲:"})," ",d.base_cp_min,"-",d.base_cp_max]}),d.description&&D.jsx("p",{className:"card-description",children:d.description})]})]},f))})]})},uF=document.querySelectorAll("#comment-atproto");console.log(`Found ${uF.length} comment-atproto mount points`);uF.forEach((t,e)=>{console.log(`Mounting React app to comment-atproto #${e+1}`),_0.createRoot(t).render(D.jsx(hw.StrictMode,{children:D.jsx(uq,{children:D.jsxs(K5,{children:[D.jsx(Zh,{path:"/oauth/callback",element:D.jsx(l1e,{})}),D.jsx(Zh,{path:"/list",element:D.jsx(xPe,{})}),D.jsx(Zh,{path:"*",element:D.jsx(o1e,{})})]})})}))});