@teammy/server 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +461 -233
- package/dist/web/assets/Assistant-BAhJ1B8n.js +1 -0
- package/dist/web/assets/{Computers-DAf8sobH.css → Computers-CBnQX-2p.css} +1 -1
- package/dist/web/assets/Computers-hHQYztG9.js +13 -0
- package/dist/web/assets/{Conversation-DN9pVRsf.js → Conversation-Bdsoobmv.js} +1 -1
- package/dist/web/assets/{Dashboard-B0Dj-KMg.js → Dashboard-De-8jlcE.js} +1 -1
- package/dist/web/assets/Dropdown-Dh9Q9fSi.js +55 -0
- package/dist/web/assets/{Files-B-iLyRvj.js → Files-DYc1q61J.js} +1 -1
- package/dist/web/assets/{Help-B21pS1RH.js → Help-DHZAzK6c.js} +13 -6
- package/dist/web/assets/{Markdown-Bh1l6OQM.js → Markdown-Gk89fXoh.js} +2 -2
- package/dist/web/assets/{MessageComposer-D9vqKUX5.js → MessageComposer-DFvWZibH.js} +1 -1
- package/dist/web/assets/{ResourceLibrary-qg568G4m.js → ResourceLibrary-DYwZzWyh.js} +3 -3
- package/dist/web/assets/{TerminalPane-hEQVsy4e.js → TerminalPane-ZhM38vie.js} +1 -1
- package/dist/web/assets/{WorkspaceTree-BMZWhAXJ.js → WorkspaceTree-yST2ByxM.js} +1 -1
- package/dist/web/assets/{file-links-DvISesr0.js → file-links-CtHFx6cd.js} +1 -1
- package/dist/web/assets/index-CWjsEUUy.js +10 -0
- package/dist/web/assets/{task-links-BeRoF5ff.js → task-links-ArhNpuGG.js} +1 -1
- package/dist/web/downloads/teammy-inbox-skill.zip +0 -0
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/Assistant-CfsrbTdh.js +0 -1
- package/dist/web/assets/Computers-CdwUaH3q.js +0 -13
- package/dist/web/assets/Dropdown-Cz5xKbpV.js +0 -55
- package/dist/web/assets/index-_W-pw3aC.js +0 -10
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));function u(){return document.querySelector(`meta[name="teammy-base-path"]`)?.content??``}function d(e){let t=u();return!e.startsWith(`/`)||e.startsWith(`//`)||!t||e===t||e.startsWith(t+`/`)||e.startsWith(t+`?`)?e:t+e}function f(){let e=u();return e&&(location.pathname===e||location.pathname.startsWith(e+`/`))?location.pathname.slice(e.length)||`/`:location.pathname}function p(e,t,n=``){return d(`/projects/${encodeURIComponent(e)}/help?${new URLSearchParams({doc:t})}${n}`)}function m(){return location.origin+u()}var h=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,te={};function _(e,t,n){this.props=e,this.context=t,this.refs=te,this.updater=n||ee}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ne(){}ne.prototype=_.prototype;function v(e,t,n){this.props=e,this.context=t,this.refs=te,this.updater=n||ee}var re=v.prototype=new ne;re.constructor=v,g(re,_.prototype),re.isPureReactComponent=!0;var ie=Array.isArray;function ae(){}var y={H:null,A:null,T:null,S:null},oe=Object.prototype.hasOwnProperty;function b(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return b(e.type,t,e.props)}function x(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ce(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var le=/\/+/g;function S(e,t){return typeof e==`object`&&e&&e.key!=null?ce(``+e.key):t.toString(36)}function ue(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ae,ae):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function C(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,C(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+S(e,0):a,ie(o)?(i=``,c!=null&&(i=c.replace(le,`$&/`)+`/`),C(o,r,i,``,function(e){return e})):o!=null&&(x(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(le,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ie(e))for(var u=0;u<e.length;u++)a=e[u],s=l+S(a,u),c+=C(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+S(a,u++),c+=C(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return C(ue(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function de(e,t,n){if(e==null)return e;var r=[],i=0;return C(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function fe(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var pe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function me(e){var t=y.T,n={};n.types=t===null?null:t.types,y.T=n;try{var r=e(),i=y.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ae,pe)}catch(e){pe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),y.T=t}}function he(e){var t=y.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else me(he.bind(null,e))}var ge={map:de,forEach:function(e,t,n){de(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return de(e,function(){t++}),t},toArray:function(e){return de(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=v,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return y.H.useMemoCache(e)}},e.addTransitionType=he,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!oe.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return b(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)oe.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return b(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=x,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:fe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=me,e.unstable_useCacheRefresh=function(){return y.H.useCacheRefresh()},e.use=function(e){return y.H.use(e)},e.useActionState=function(e,t,n){return y.H.useActionState(e,t,n)},e.useCallback=function(e,t){return y.H.useCallback(e,t)},e.useContext=function(e){return y.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return y.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return y.H.useEffect(e,t)},e.useEffectEvent=function(e){return y.H.useEffectEvent(e)},e.useId=function(){return y.H.useId()},e.useImperativeHandle=function(e,t,n){return y.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return y.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return y.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return y.H.useMemo(e,t)},e.useOptimistic=function(e,t){return y.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return y.H.useReducer(e,t,n)},e.useRef=function(e){return y.H.useRef(e)},e.useState=function(e){return y.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return y.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return y.H.useTransition()},e.version=`19.3.1`})),ee=o(((e,t)=>{t.exports=h()}));function g(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function te(e,t=`|`){return e.map(e=>be(e)).join(t)}function _(e,t){return typeof t==`bigint`?t.toString():t}var ne=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function v(e){return new ne(e)}function re(e){return e==null}function ie(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ae(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var y=Symbol(`evaluating`);function oe(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==y)return r===void 0&&(r=y,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function se(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function x(e){return se(e._zod.def)??e._zod.def.shape}function ce(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return b(this,t,e),e},enumerable:!0,configurable:!0})}function le(e,t,n){t in e?b(e,t,n):e[t]=n}function S(e,t,n,r){let i=x(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ce(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):le(e,a,r?r(n.value,a):n.value))}}function ue(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ce(e,n,()=>t[n]):le(e,n,r.value))}}function C(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function de(e){return JSON.stringify(e)}function fe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var pe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function me(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var he=v(()=>{if(k.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ge(e){if(me(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return me(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function _e(e){return ge(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ve=new Set([`string`,`number`,`symbol`]);function ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function w(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function T(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function be(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function xe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Se={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ce={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function we(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return S(i,e,Te(e,t)),w(e,C(n,{shape:i,checks:[]}))}function Te(e,t){let n=x(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Ee(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Te(e,t)),a={};return S(a,e,Reflect.ownKeys(x(e)).filter(e=>!i.has(e))),w(e,C(n,{shape:a,checks:[]}))}function De(e,t){if(!ge(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=x(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return w(e,C(e._zod.def,{shape:Oe(e,t)}))}function Oe(e,t){let n={};return S(n,e,Reflect.ownKeys(x(e))),ue(n,t),n}function ke(e,t){if(!ge(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return w(e,C(e._zod.def,{shape:Oe(e,t)}))}function Ae(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return S(n,e,Reflect.ownKeys(x(e))),S(n,t,Reflect.ownKeys(x(t))),w(e,C(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function je(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Te(t,n)):void 0,o={};return S(o,t,Reflect.ownKeys(x(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),w(t,C(t._zod.def,{shape:o,checks:[]}))}function Me(e,t,n){let r=n?new Set(Te(t,n)):void 0,i={};return S(i,t,Reflect.ownKeys(x(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),w(t,C(t._zod.def,{shape:i}))}function E(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ne(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Pe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Fe(e){return typeof e==`string`?e:e?.message}function Ie(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Le(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Re(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Fe(e.inst?._zod.def?.error?.(e))??Fe(a?.(e))??Fe(t?.error?.(e))??Fe(n.customError?.(e))??Fe(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var ze=/[\uD800-\uDBFF]/;function Be(e){let t=e.length;if(!ze.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function He(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ue(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function We(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Je(e,n,r.value)}}function Ge(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ke(e,t,n){return Ge(e,t,n,!1)}function qe(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ge(this,n,r(this))},set(e){Ge(this,n,e)}})}return t}function Je(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ge(this,t,n.bind(this))},set(e){Ge(this,t,e)}})}function Ye(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Xe,Ze=!1,Qe={configurable:!0,get(){Ze=!0}};function D(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Xe!==e._zod?Xe=void 0:(Xe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Qe);let e=Ze;Ze=!1;try{let r=n(this);return Ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ze||=e,r}catch(n){throw delete this[t],Ze||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function $e(e,t,n,r){let i=Ye(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var et=`~constantCatch`;function tt(e){let t=()=>e;return t[et]=!0,t}var nt,rt={value:void 0,enumerable:!1},it=`captureStackTrace`in Error?Error:null;function at(e){let t=it;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return it=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function O(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){rt.value=new a(r);try{Object.defineProperty(n,"_zod",rt)}finally{rt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),We(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?at(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ot=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},st=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(nt=globalThis).__zod_globalConfig??(nt.__zod_globalConfig={});var k=globalThis.__zod_globalConfig;function A(e){return e&&Object.assign(k,e),k}function ct(){let e=this._zod;return e.message??=JSON.stringify(e.def,_,2),e.message}function lt(e){this._zod.message=e}var ut={get:ct,set:lt,enumerable:!0,configurable:!0},dt={value:void 0,enumerable:!1},ft=new WeakSet([Object.prototype,Error.prototype]),pt=O(`$ZodError`,(e,t)=>{e.name=`$ZodError`,dt.value=t,Object.defineProperty(e,"issues",dt),dt.value=void 0,Object.defineProperty(e,"message",ut);let n=Object.getPrototypeOf(e);ft.has(n)||(ft.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function mt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ht(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?mt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function gt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function _t(e,t){return{callee:t?.callee??e,Err:t?.Err}}var vt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ot;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Re(e,o,A())));throw pe(n,a?.callee??t),n}return s.value};return t},yt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Re(e,o,A())));throw pe(n,a?.callee??t),n}return s.value};return t},bt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ot;return a.issues.length?xt(e,a.issues,i):{success:!0,data:a.value}};function xt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Re(e,n,A()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var St=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?xt(e,a.issues,i):{success:!0,data:a.value}},Ct=Symbol.for(`zod.compile.invalid`),wt=Symbol.for(`zod.compile.fallback`),Tt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ct)return!0;if(r.definite===!0&&n===void 0)return!1}return Et(e,t,n)});function Et(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[wt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new ot;return a.issues.length===0}var Dt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Ot=e=>{let t=vt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,_t(n,a))};return n},kt=e=>{let t=vt(e),n=(e,r,i,a)=>t(e,r,i,_t(n,a));return n},At=e=>{let t=yt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,_t(n,a))};return n},jt=e=>{let t=yt(e),n=async(e,r,i,a)=>await t(e,r,i,_t(n,a));return n},Mt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bt(e)(t,n,i)},Nt=e=>(t,n,r)=>bt(e)(t,n,r),Pt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return St(e)(t,n,i)},Ft=e=>async(t,n,r)=>St(e)(t,n,r),It=/^[cC][0-9a-z]{6,}$/,Lt=/^[0-9a-z]+$/,Rt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,zt=/^[0-9a-vA-V]{20}$/,Bt=/^[A-Za-z0-9]{27}$/,Vt=/^[a-zA-Z0-9_-]{21}$/;function Ht(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ut=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Wt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Kt=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qt=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Jt(){return new RegExp(qt,`u`)}var Yt=/^(?:(?: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])$/,Xt=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Zt=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qt=/^(([0-9a-fA-F]{1,4}:){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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$t=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,en=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tn=/^https?$/,nn=/^\+[1-9]\d{6,14}$/,rn=`(?:(?:\\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])))`;function an(e){return RegExp(`^${e}$`)}var on=an(rn);function sn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cn(e){return RegExp(`^${sn(e)}$`)}function ln(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${sn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${sn({precision:e.precision})}`:n;return RegExp(`^${rn}T(?:${r})$`)}var un=/^[\s\S]{0,}$/,dn=/^-?\d+$/,fn=/^-?\d+(?:\.\d+)?$/,pn=/^(?:true|false)$/i,mn=/^[^A-Z]*$/,hn=/^[^a-z]*$/,j=O(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gn=e=>{let t=e.value;return!re(t)&&t.length!==void 0},_n={number:`number`,bigint:`bigint`,object:`date`},vn=O(`$ZodCheckLessThan`,(e,t)=>{j.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yn=O(`$ZodCheckGreaterThan`,(e,t)=>{j.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bn=O(`$ZodCheckMultipleOf`,(e,t)=>{j.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ae(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),xn=O(`$ZodCheckNumberFormat`,(e,t)=>{j.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Se[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Sn=O(`$ZodCheckMaxLength`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Be(r):i)<=t.maximum)return;let a=Ve(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=O(`$ZodCheckMinLength`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Be(r):i)>=t.minimum)return;let a=Ve(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wn=O(`$ZodCheckLengthEquals`,(e,t)=>{var n;j.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Be(r):i;if(a===t.length)return;let o=Ve(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tn=O(`$ZodCheckStringFormat`,(e,t)=>{var n,r;j.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),En=O(`$ZodCheckRegex`,(e,t)=>{Tn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Dn=O(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=mn,Tn.init(e,t)}),On=O(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=hn,Tn.init(e,t)}),kn=O(`$ZodCheckIncludes`,(e,t)=>{j.init(e,t);let n=ye(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),An=O(`$ZodCheckStartsWith`,(e,t)=>{j.init(e,t);let n=RegExp(`^${ye(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),jn=O(`$ZodCheckEndsWith`,(e,t)=>{j.init(e,t);let n=RegExp(`.*${ye(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Mn=O(`$ZodCheckOverwrite`,(e,t)=>{j.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Nn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
3
|
+
`)}\n};`)(...Object.values(this.closed))}},Pn={major:4,minor:6,patch:7},M=O(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=E(t),a;for(let o of n){if(o._zod.def.when){if(Ne(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ot;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Le(t.issues,n,e),i||=E(t,n))});else{if(t.issues.length===n)continue;Le(t.issues,n,e),i||=E(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(E(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ot;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ot;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ke(this,`~standard`,Ln(this))},set"~standard"(e){Ge(this,`~standard`,e)}}),Fn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Re(e,t,A()))}:{value:e.value};async function In(e,t){let n={async:!0};return Fn(await e._zod.run({value:t,issues:[]},n),n)}function Ln(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Fn(r,n)}catch{}return In(e,t)},vendor:`zod`,version:1}}var Rn=O(`$ZodString`,(e,t)=>{M.init(e,t),e._zod.pattern=t.pattern??un,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),N=O(`$ZodStringFormat`,(e,t)=>{Tn.init(e,t),Rn.init(e,t)}),zn=O(`$ZodGUID`,(e,t)=>{t.pattern??=Wt,N.init(e,t)}),Bn=O(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Gt(e)}else t.pattern??=Gt();N.init(e,t)}),Vn=O(`$ZodEmail`,(e,t)=>{t.pattern??=Kt,N.init(e,t)});function Hn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Un(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Hn(e)||2:Wn(e,t)}function Wn(e,t){if(!t.normalize&&t.protocol?.source===tn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Gn=/[\t\n\r]/g;function Kn(e){return e.replace(Gn,``)}function qn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Jn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Yn=O(`$ZodURL`,(e,t)=>{N.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Un(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Kn(r);return}t.hostname&&!qn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Jn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Kn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Xn=O(`$ZodEmoji`,(e,t)=>{t.pattern??=Jt(),N.init(e,t)}),Zn=O(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Vt:Ht(t.length),N.init(e,t)}),Qn=O(`$ZodCUID`,(e,t)=>{t.pattern??=It,N.init(e,t)}),$n=O(`$ZodCUID2`,(e,t)=>{t.pattern??=Lt,N.init(e,t)}),er=O(`$ZodULID`,(e,t)=>{t.pattern??=Rt,N.init(e,t)}),tr=O(`$ZodXID`,(e,t)=>{t.pattern??=zt,N.init(e,t)}),nr=O(`$ZodKSUID`,(e,t)=>{t.pattern??=Bt,N.init(e,t)}),rr=O(`$ZodISODateTime`,(e,t)=>{t.pattern??=ln(t),N.init(e,t)}),ir=O(`$ZodISODate`,(e,t)=>{t.pattern??=on,N.init(e,t)}),ar=O(`$ZodISOTime`,(e,t)=>{t.pattern??=cn(t),N.init(e,t)}),or=O(`$ZodISODuration`,(e,t)=>{t.pattern??=Ut,N.init(e,t)}),sr=O(`$ZodIPv4`,(e,t)=>{t.pattern??=Yt,N.init(e,t)}),cr=/^[0-9a-fA-F:.]+$/;function lr(e){return cr.test(e)?Hn(`http://[${e}]`):!1}var ur=O(`$ZodIPv6`,(e,t)=>{t.pattern??=Xt,N.init(e,t),e._zod.check=n=>{lr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),dr=O(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Zt,N.init(e,t)});function fr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:lr(n)}var pr=O(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Qt,N.init(e,t),e._zod.check=n=>{fr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function mr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var hr=/^[0-9a-zA-Z+/]*={0,2}$/,gr=O(`$ZodBase64`,(e,t)=>{t.pattern??=hr,N.init(e,t),e._zod.check=n=>{mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),_r=/^[A-Za-z0-9_-]*$/;function vr(e){if(!_r.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var yr=O(`$ZodBase64URL`,(e,t)=>{t.pattern??=_r,N.init(e,t),e._zod.check=n=>{vr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),br=O(`$ZodE164`,(e,t)=>{t.pattern??=nn,N.init(e,t)});function xr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Sr=O(`$ZodJWT`,(e,t)=>{N.init(e,t),e._zod.check=n=>{xr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Cr=O(`$ZodNumber`,(e,t)=>{M.init(e,t),e._zod.pattern=fn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),wr=O(`$ZodNumberFormat`,(e,t)=>{xn.init(e,t),Cr.init(e,t)}),Tr=O(`$ZodBoolean`,(e,t)=>{M.init(e,t),e._zod.pattern=pn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Er=O(`$ZodUnknown`,(e,t)=>{M.init(e,t),e._zod.parse=e=>e}),Dr=O(`$ZodNever`,(e,t)=>{M.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Or(e,t){let n=Ie(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Ie(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Le(n.issues,t,e),n}}return i(n,a)}}var kr=e=>Array.isArray(e)?e.length:-1;function Ar(e,t,n){e.issues.length&&t.issues.push(...Pe(n,e.issues)),t.value[n]=e.value}var jr=O(`$ZodArray`,(e,t)=>{M.init(e,t);let n=k.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Ar(t,r,e)));else if(Ar(c,r,e),s&&c.issues.length!==0&&E(c))break}return o.length?Promise.all(o).then(()=>r):r},Or(e,kr)});function Mr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Pe(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Nr=[];function Pr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Nr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=xe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Fr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(E(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Mr(e,n,i,t,d,f))):Mr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ir=O(`$ZodObject`,(e,t)=>{M.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=v(()=>Pr(t));D(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||b(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=me,o=t.catchall,s,c=k.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(E(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Mr(n,t,e,r,a,o))):Mr(s,t,e,r,a,o)}return o?Fr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Lr=O(`$ZodObjectJIT`,(e,t)=>{Ir.init(e,t);let n=e._zod.parse,r=v(()=>Pr(t)),i=k.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Nn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
|
+
let ${e}_ab = false;
|
|
5
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
6
|
+
const iss = ${e}.issues[i];
|
|
7
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
8
|
+
payload.issues.push(iss);
|
|
9
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
10
|
+
}
|
|
11
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
12
|
+
payload.value = newResult;
|
|
13
|
+
return payload;
|
|
14
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:de(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
15
|
+
const ${n}_present = ${i};
|
|
16
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
17
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (${e}) {
|
|
21
|
+
newResult[${r}] = ${n}.value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
`)}else f?(o.write(`
|
|
26
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
27
|
+
}
|
|
28
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
29
|
+
if (${n}.value !== undefined || ${i}) {
|
|
30
|
+
newResult[${r}] = ${n}.value;
|
|
31
|
+
}
|
|
32
|
+
`)):o.write(`
|
|
33
|
+
const ${n}_present = ${i};
|
|
34
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
35
|
+
}
|
|
36
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
37
|
+
payload.issues.push({
|
|
38
|
+
code: "invalid_type",
|
|
39
|
+
expected: "nonoptional",
|
|
40
|
+
input: undefined,
|
|
41
|
+
path: [${r}]
|
|
42
|
+
});
|
|
43
|
+
if (ctx && ctx.abortEarly) {
|
|
44
|
+
payload.value = newResult;
|
|
45
|
+
return payload;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (${n}_present) {
|
|
50
|
+
newResult[${r}] = ${n}.value;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=me,c=!k.jitless,l=c&&he.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Fr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Rr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!E(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Re(e,r,A())))}),t)}var zr=O(`$ZodUnion`,(e,t)=>{M.init(e,t),D(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),D(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),D(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),D(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ie(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Rr(t,r,e,i)):Rr(o,r,e,i)}});function Br(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Vr=O(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,zr.init(e,t);let n=e._zod.parse;D(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||b(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=se(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=v(()=>Br(t));e._zod.parse=(i,a)=>{let o=i.value;if(!me(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Hr=O(`$ZodIntersection`,(e,t)=>{M.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Wr(e,t,n)):Wr(e,i,a)}});function Ur(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ge(e)&&ge(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Ur(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Ur(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Ur(t.value,n.value);if(!c.valid){if(E(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Gr=O(`$ZodRecord`,(e,t)=>{M.init(e,t);let n=k.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!ge(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Re(e,i,A())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Pe(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Pe(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&fn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Re(e,i,A())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Pe(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Pe(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Kr=O(`$ZodEnum`,(e,t)=>{M.init(e,t);let n=g(t.entries),r=new Set(n);e._zod.values=r,D(e,`pattern`,e=>{let t=g(e.def.entries).filter(e=>ve.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ye(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qr=O(`$ZodLiteral`,(e,t)=>{M.init(e,t);let n=new Set(t.values);e._zod.values=n,D(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ye(e):e?ye(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Jr=O(`$ZodTransform`,(e,t)=>{M.init(e,t),e._zod.optin=`optional`,k.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new st(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ot;return n.value=i,n}});function Yr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xr=O(`$ZodOptional`,(e,t)=>{M.init(e,t),D(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,D(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),D(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ie(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Yr(e,t)):Yr(e,r)}return t.innerType._zod.run(e,n)}}),Zr=O(`$ZodExactOptional`,(e,t)=>{Xr.init(e,t),D(e,`values`,e=>e.def.innerType._zod.values),D(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Qr=O(`$ZodNullable`,(e,t)=>{M.init(e,t),D(e,`optin`,e=>e.def.innerType._zod.optin),D(e,`optout`,e=>e.def.innerType._zod.optout),D(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ie(t.source)}|null)$`):void 0}),D(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$r=O(`$ZodDefault`,(e,t)=>{M.init(e,t),e._zod.optin=`defaulted`,D(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ei(e,t)):ei(r,t)}});function ei(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ti=O(`$ZodPrefault`,(e,t)=>{M.init(e,t),e._zod.optin=`defaulted`,D(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ni=O(`$ZodNonOptional`,(e,t)=>{M.init(e,t),D(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ri(t,e)):ri(i,e)}});function ri(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function ii(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Re(e,r,A()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ai=O(`$ZodCatch`,(e,t)=>{M.init(e,t),D(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),D(e,`optout`,e=>e.def.innerType._zod.optout),D(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ii(e,r,t,n)):ii(e,r,t,n)}}),oi=O(`$ZodPipe`,(e,t)=>{M.init(e,t),D(e,`values`,e=>e.def.in._zod.values),D(e,`optin`,e=>e.def.in._zod.optin),D(e,`optout`,e=>e.def.out._zod.optout),D(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.in,n)):si(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.out,n)):si(r,t.out,n)}});function si(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ci=O(`$ZodReadonly`,(e,t)=>{M.init(e,t),D(e,`propValues`,e=>e.def.innerType._zod.propValues),D(e,`values`,e=>e.def.innerType._zod.values),D(e,`optin`,e=>e.def.innerType?._zod?.optin),D(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(li):li(r)}});function li(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ui=O(`$ZodLazy`,(e,t)=>{M.init(e,t),oe(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),D(e,`pattern`,e=>e.innerType?._zod?.pattern),D(e,`propValues`,e=>e.innerType?._zod?.propValues),D(e,`optin`,e=>e.innerType?._zod?.optin??void 0),D(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),di=O(`$ZodCustom`,(e,t)=>{j.init(e,t),M.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>fi(t,n,r,e));fi(i,n,r,e)}});function fi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ue(e))}}var pi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},mi=`~memo`,hi=[];function gi(e){return typeof e==`object`&&!!e}function _i(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var vi=new WeakMap,yi=0,bi=1,xi=2;function Si(e,t,n){let r=vi.get(e);if(r!==void 0)return r?xi:yi;if(t.has(e))return xi;t.add(e);let i=yi,a=e=>{if(i!==xi&&e?._zod){let r=Si(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=yi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?bi:o.value?._zod?Si(o.value,t,n):yi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=se(c);s(e?o(e,!0):bi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Si(r,t,!1):bi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Ci(e,i)}function Ci(e,t){return t!==bi&&vi.set(e,t===xi),t}function wi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Ti,Ei=[],Di={alloc(e,t,n){let r=Ti;if(!r)return n;Ti=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ei.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ki(n,e.value))throw new pi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Si(e,new Set,!1);if(i===yi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===xi||r?n=!0:r=!0}let l=s.value;if(!gi(l))return t(s,c);let u=c[mi];u||(u={buckets:new WeakMap,backEdges:void 0},c[mi]=u);let d;i===c?d=a:(d=wi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(..._i(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Ti=d;let p=Ei.length,m=t(s,c);Ti=void 0;let h=Ei.length>p?Ei.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?_i(e.issues):hi),e)):(h&&(h.issues=m.issues.length?_i(m.issues):hi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Oi(){return Di}function ki(e,t){let n=e[mi]?.backEdges;return n!==void 0&&gi(t)&&n.has(t)}var Ai=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(He(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${be(e.values[0])}`:`Invalid option: expected one of ${te(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${te(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ji(){return{localeError:Ai()}}var Mi,Ni=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Pi(){return new Ni}(Mi=globalThis).__zod_globalRegistry??(Mi.__zod_globalRegistry=Pi());var Fi=globalThis.__zod_globalRegistry;function Ii(e){return e.checks&&=[...e.checks],e}function Li(e,t){return new e(Ii({type:`string`,...T(t)}))}function Ri(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...T(t)})}function zi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...T(t)})}function Bi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...T(t)})}function Vi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...T(t)})}function Hi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...T(t)})}function Ui(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...T(t)})}function Wi(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...T(t)})}function Gi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...T(t)})}function Ki(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...T(t)})}function qi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...T(t)})}function Ji(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...T(t)})}function Yi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...T(t)})}function Xi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...T(t)})}function Zi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...T(t)})}function Qi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...T(t)})}function $i(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...T(t)})}function ea(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...T(t)})}function ta(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...T(t)})}function na(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...T(t)})}function ra(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...T(t)})}function ia(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...T(t)})}function aa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...T(t)})}function oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...T(t)})}function sa(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...T(t)})}function ca(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...T(t)})}function la(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...T(t)})}function ua(e,t){return new e(Ii({type:`number`,checks:[],...T(t)}))}function da(e,t){return new e(Ii({type:`number`,coerce:!0,checks:[],...T(t)}))}function fa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...T(t)})}function pa(e,t){return new e({type:`boolean`,...T(t)})}function ma(e){return new e({type:`unknown`})}function ha(e,t){return new e({type:`never`,...T(t)})}function ga(e,t){return new vn({check:`less_than`,...T(t),value:e,inclusive:!1})}function _a(e,t){return new vn({check:`less_than`,...T(t),value:e,inclusive:!0})}function va(e,t){return new yn({check:`greater_than`,...T(t),value:e,inclusive:!1})}function ya(e,t){return new yn({check:`greater_than`,...T(t),value:e,inclusive:!0})}function ba(e,t){return new bn({check:`multiple_of`,...T(t),value:e})}function xa(e,t){return new Sn({check:`max_length`,...T(t),maximum:e})}function Sa(e,t){return new Cn({check:`min_length`,...T(t),minimum:e})}function Ca(e,t){return new wn({check:`length_equals`,...T(t),length:e})}function wa(e,t){return new En({check:`string_format`,format:`regex`,...T(t),pattern:e})}function Ta(e){return new Dn({check:`string_format`,format:`lowercase`,...T(e)})}function Ea(e){return new On({check:`string_format`,format:`uppercase`,...T(e)})}function Da(e,t){return new kn({check:`string_format`,format:`includes`,...T(t),includes:e})}function Oa(e,t){return new An({check:`string_format`,format:`starts_with`,...T(t),prefix:e})}function ka(e,t){return new jn({check:`string_format`,format:`ends_with`,...T(t),suffix:e})}function Aa(e){return new Mn({check:`overwrite`,tx:e})}function ja(e){return Aa(t=>t.normalize(e))}function Ma(){return Aa(e=>e.trim())}function Na(){return Aa(e=>e.toLowerCase())}function Pa(){return Aa(e=>e.toUpperCase())}function Fa(){return Aa(e=>fe(e))}function Ia(e,t,n){return new e({type:`array`,element:t,...T(n)})}function La(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...T(n)})}function Ra(e,t){let n=za(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ue(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ue(r))}},e(t.value,t)),t);return n}function za(e,t){let n=new j({check:`custom`,...T(t)});return n._zod.check=e,n}function Ba(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&b(e,t,n[t]);return e}function Va(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Fi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function P(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function F(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,F(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Ba(o.schema,c),t.io===`input`&&I(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ha(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ua(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Ha(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Ha(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
54
|
+
|
|
55
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Wa(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Wa(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Ga=new Set([`type`,`properties`,`required`,`additionalProperties`]),Ka=[`oneOf`,`anyOf`];function qa(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ja(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Ga.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??qa(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}b(n,r,e.length===1?e[0]:Ja(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=qa(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ya(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Ga)if(t in e)return;let n=t.filter(e=>Ka.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ja(t);else{let e=n[0],i=Ka.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ja([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Ba(e,r))}function Xa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Ba(i,s),Ba(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Wa(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ya(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Ba(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,b(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Qa(t,`input`,e.processors),output:Qa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function I(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return I(r.element,n);if(r.type===`set`)return I(r.valueType,n);if(r.type===`lazy`)return I(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return I(r.innerType,n);if(r.type===`intersection`)return I(r.left,n)||I(r.right,n);if(r.type===`record`||r.type===`map`)return I(r.keyType,n)||I(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:I(r.in,n)||I(r.out,n);if(r.type===`object`){for(let e in r.shape)if(I(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(I(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(I(e,n))return!0;return!!(r.rest&&I(r.rest,n))}return!1}var Za=(e,t={})=>n=>{let r=Va({...n,processors:t});return F(e,r),Ua(r,e),Xa(r,e)},Qa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Va({...i??{},target:a,io:t,processors:n});return F(e,o),Ua(o,e),Xa(o,e)},$a=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},eo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},to=(e,t)=>{$a(e,`minimum`,t),eo(e,`maximum`,t)},no=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},ro=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},io=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ao=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},oo=(e,t)=>$a(e,`minimum`,t.minimum),so=(e,t)=>eo(e,`maximum`,t.maximum),co=e=>(t,n)=>{ao(t,n.format);let[r,i]=e[n.format];$a(t,`minimum`,r),eo(t,`maximum`,i)},lo={greater_than:(e,t)=>$a(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>eo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>no(e,t.value),number_format:co(Se),bigint_format:co(Ce),min_length:oo,max_length:so,length_equals:(e,t)=>to(e,t.length),min_size:oo,max_size:so,size_equals:(e,t)=>to(e,t.size),string_format:(e,t)=>{ao(e,t.format),t.pattern&&ro(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>io(e,t.mime)};function L(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&$a(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&$a(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&eo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&eo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&no(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&io(t,i.mime);for(let e of i.patterns??[])ro(t,e);return t}var uo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fo=new Map([[hr,$t],[_r,en]]),po=e=>fo.get(e)??e,mo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=L(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=uo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(po);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ho=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=L(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):P(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},go=(e,t,n,r)=>{n.type=`boolean`},_o=(e,t,n,r)=>{n.not={}},vo=(e,t,n,r)=>{let i=e._zod.def,a=g(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},yo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(P(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(P(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},bo=(e,t,n,r)=>{P(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},xo=(e,t,n,r)=>{P(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},So=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=L(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=F(a.element,t,{...r,path:[...r.path,`items`]})};function Co(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Co(t.out):t.type===`catch`?Co(t.innerType):e._zod.optin}var wo=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&P(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)b(i.properties,e,F(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Co(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=F(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},To=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>F(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Eo=(e,t,n,r)=>{let i=e._zod.def,a=F(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=F(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function Do(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Do(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Do(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?fn:dn).source)),p}var Oo=new WeakMap;function ko(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Oo.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Do(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Ao=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=L(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=F(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)b(i.patternProperties,po(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=F(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Oo.get(t);n||(n=[],Oo.set(t,n),t.deferred.push(()=>ko(t))),n.push(e)}i.additionalProperties=F(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Co(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},jo=(e,t,n,r)=>{let i=e._zod.def,a=F(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Mo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},No=Symbol();function Po(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(P(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),No):JSON.parse(o)}var Fo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Po(i.defaultValue,e,t,n,r);o!==No&&(n.default=o)},Io=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Po(i.defaultValue,e,t,n,r);o!==No&&(n._prefault=o)},Lo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{P(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Ro=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;F(o,t,r);let s=t.seen.get(e);s.ref=o},zo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Bo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Vo=(e,t,n,r)=>{let i=e._zod.innerType;F(i,t,r);let a=t.seen.get(e);a.ref=i},Ho=new WeakSet([Object.prototype,Error.prototype]);function Uo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Wo=(e,t)=>{pt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ho.has(n)||(Ho.add(n),Uo(n,`format`,e=>t=>gt(e,t)),Uo(n,`flatten`,e=>t=>ht(e,t)),Uo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_,2)}),Uo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Go=O(`ZodError`,Wo),R=O(`ZodError`,Wo,void 0,{Parent:Error}),Ko=vt(R),qo=yt(R),Jo=bt(R),Yo=St(R),Xo=Ot(R),Zo=kt(R),Qo=At(R),$o=jt(R),es=Mt(R),ts=Nt(R),ns=Pt(R),rs=Ft(R);function is(){k.localeError||A(ji())}function as(){k.memoizer||A({memoizer:Oi()})}var z=O(`ZodType`,(e,t)=>(is(),M.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(C(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return w(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cc(e,t))},superRefine(e,t){return this.check(wc(e,t))},overwrite(e){return this.check(Aa(e))},optional(){return rc(this)},exactOptional(){return ac(this)},nullable(){return sc(this)},nullish(){return rc(sc(this))},nonoptional(e){return pc(this,e)},array(){return G(this)},or(e){return Us([this,e])},and(e){return qs(this,e)},transform(e){return _c(this,tc(e))},default(e){return lc(this,e)},prefault(e){return dc(this,e)},catch(e){return hc(this,e)},pipe(e){return _c(this,e)},readonly(){return yc(this)},describe(e){let t=this.clone();return Fi.add(t,{description:e}),t},meta(...e){if(e.length===0)return Fi.get(this);let t=this.clone();return Fi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ke(this,`~standard`,{...Ln(this),jsonSchema:{input:Qa(this,`input`),output:Qa(this,`output`)}})},set"~standard"(e){Ge(this,`~standard`,e)},parse:function e(t,n){return Ko(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await qo(this,t,n,{callee:e})},safeParse(e,t){return Jo(this,e,t)},async safeParseAsync(e,t){return Yo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ge(this,`spa`,e)},validate(e,t){return Tt(this,e,t)},validateAsync(e,t){return Dt(this,e,t)},encode:function e(t,n){return Xo(this,t,n,{callee:e})},decode:function e(t,n){return Zo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Qo(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await $o(this,t,n,{callee:e})},safeEncode(e,t){return es(this,e,t)},safeDecode(e,t){return ts(this,e,t)},async safeEncodeAsync(e,t){return ns(this,e,t)},async safeDecodeAsync(e,t){return rs(this,e,t)},toJSONSchema(e){return Za(this,{})(e)},get description(){return Fi.get(this)?.description},get _def(){return this._zod.def}}),os=O(`_ZodString`,(e,t)=>{Rn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r)},qe({format:e=>L(e).format??null,minLength:e=>L(e).minimum??null,maxLength:e=>L(e).maximum??null},{regex(...e){return this.check(wa(...e))},includes(...e){return this.check(Da(...e))},startsWith(...e){return this.check(Oa(...e))},endsWith(...e){return this.check(ka(...e))},min(...e){return this.check(Sa(...e))},max(...e){return this.check(xa(...e))},length(...e){return this.check(Ca(...e))},nonempty(...e){return this.check(Sa(1,...e))},lowercase(e){return this.check(Ta(e))},uppercase(e){return this.check(Ea(e))},trim(){return this.check(Ma())},normalize(...e){return this.check(ja(...e))},toLowerCase(){return this.check(Na())},toUpperCase(){return this.check(Pa())},slugify(){return this.check(Fa())}})),ss=O(`ZodString`,(e,t)=>{Rn.init(e,t),os.init(e,t)},{email(e){return this.check(Ri(fs,e))},url(e){return this.check(Wi(hs,e))},jwt(e){return this.check(aa(js,e))},emoji(e){return this.check(Gi(_s,e))},guid(e){return this.check(zi(ps,e))},uuid(e){return this.check(Bi(ms,e))},uuidv4(e){return this.check(Vi(ms,e))},uuidv6(e){return this.check(Hi(ms,e))},uuidv7(e){return this.check(Ui(ms,e))},nanoid(e){return this.check(Ki(vs,e))},cuid(e){return this.check(qi(ys,e))},cuid2(e){return this.check(Ji(bs,e))},ulid(e){return this.check(Yi(xs,e))},base64(e){return this.check(na(Os,e))},base64url(e){return this.check(ra(ks,e))},xid(e){return this.check(Xi(Ss,e))},ksuid(e){return this.check(Zi(Cs,e))},ipv4(e){return this.check(Qi(ws,e))},ipv6(e){return this.check($i(Ts,e))},cidrv4(e){return this.check(ea(Es,e))},cidrv6(e){return this.check(ta(Ds,e))},e164(e){return this.check(ia(As,e))},datetime(e){return this.check(oa(cs,e))},date(e){return this.check(sa(ls,e))},time(e){return this.check(ca(us,e))},duration(e){return this.check(la(ds,e))}});function B(e){return Li(ss,e)}var V=O(`ZodStringFormat`,(e,t)=>{N.init(e,t),os.init(e,t)}),cs=O(`ZodISODateTime`,(e,t)=>{rr.init(e,t),V.init(e,t)}),ls=O(`ZodISODate`,(e,t)=>{ir.init(e,t),V.init(e,t)}),us=O(`ZodISOTime`,(e,t)=>{ar.init(e,t),V.init(e,t)}),ds=O(`ZodISODuration`,(e,t)=>{or.init(e,t),V.init(e,t)}),fs=O(`ZodEmail`,(e,t)=>{Vn.init(e,t),V.init(e,t)}),ps=O(`ZodGUID`,(e,t)=>{zn.init(e,t),V.init(e,t)}),ms=O(`ZodUUID`,(e,t)=>{Bn.init(e,t),V.init(e,t)});function H(e){return Bi(ms,e)}var hs=O(`ZodURL`,(e,t)=>{Yn.init(e,t),V.init(e,t)});function gs(e){return Wi(hs,e)}var _s=O(`ZodEmoji`,(e,t)=>{Xn.init(e,t),V.init(e,t)}),vs=O(`ZodNanoID`,(e,t)=>{Zn.init(e,t),V.init(e,t)}),ys=O(`ZodCUID`,(e,t)=>{Qn.init(e,t),V.init(e,t)}),bs=O(`ZodCUID2`,(e,t)=>{$n.init(e,t),V.init(e,t)}),xs=O(`ZodULID`,(e,t)=>{er.init(e,t),V.init(e,t)}),Ss=O(`ZodXID`,(e,t)=>{tr.init(e,t),V.init(e,t)}),Cs=O(`ZodKSUID`,(e,t)=>{nr.init(e,t),V.init(e,t)}),ws=O(`ZodIPv4`,(e,t)=>{sr.init(e,t),V.init(e,t)}),Ts=O(`ZodIPv6`,(e,t)=>{ur.init(e,t),V.init(e,t)}),Es=O(`ZodCIDRv4`,(e,t)=>{dr.init(e,t),V.init(e,t)}),Ds=O(`ZodCIDRv6`,(e,t)=>{pr.init(e,t),V.init(e,t)}),Os=O(`ZodBase64`,(e,t)=>{gr.init(e,t),V.init(e,t)}),ks=O(`ZodBase64URL`,(e,t)=>{yr.init(e,t),V.init(e,t)}),As=O(`ZodE164`,(e,t)=>{br.init(e,t),V.init(e,t)}),js=O(`ZodJWT`,(e,t)=>{Sr.init(e,t),V.init(e,t)}),Ms=O(`ZodNumber`,(e,t)=>{Cr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r),e.isFinite=!0},qe({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=L(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=L(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=L(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>L(e).format??null},{gt(e,t){return this.check(va(e,t))},gte(e,t){return this.check(ya(e,t))},min(e,t){return this.check(ya(e,t))},lt(e,t){return this.check(ga(e,t))},lte(e,t){return this.check(_a(e,t))},max(e,t){return this.check(_a(e,t))},int(e){return this.check(Ps(e))},safe(e){return this.check(Ps(e))},positive(e){return this.check(va(0,e))},nonnegative(e){return this.check(ya(0,e))},negative(e){return this.check(ga(0,e))},nonpositive(e){return this.check(_a(0,e))},multipleOf(e,t){return this.check(ba(e,t))},step(e,t){return this.check(ba(e,t))},finite(){return this}}));function U(e){return ua(Ms,e)}var Ns=O(`ZodNumberFormat`,(e,t)=>{wr.init(e,t),Ms.init(e,t)});function Ps(e){return fa(Ns,e)}var Fs=O(`ZodBoolean`,(e,t)=>{Tr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r)});function W(e){return pa(Fs,e)}var Is=O(`ZodUnknown`,(e,t)=>{Er.init(e,t),z.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ls(){return ma(Is)}var Rs=O(`ZodNever`,(e,t)=>{Dr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r)});function zs(e){return ha(Rs,e)}var Bs=O(`ZodArray`,(e,t)=>{as(),jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>So(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Sa(e,t))},nonempty(e){return this.check(Sa(1,e))},max(e,t){return this.check(xa(e,t))},length(e,t){return this.check(Ca(e,t))},unwrap(){return this.element}});function G(e,t){return Ia(Bs,e,t)}var Vs=O(`ZodObject`,(e,t)=>{as(),Lr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),$e(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Qs(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(C(this._zod.def,{catchall:e}))},passthrough(){return this.clone(C(this._zod.def,{catchall:Ls()}))},loose(){return this.clone(C(this._zod.def,{catchall:Ls()}))},strict(){return this.clone(C(this._zod.def,{catchall:zs()}))},strip(){return this.clone(C(this._zod.def,{catchall:void 0}))},extend(e){return De(this,e)},safeExtend(e){return ke(this,e)},merge(e){return Ae(this,e)},pick(e){return we(this,e)},omit(e){return Ee(this,e)},partial(...e){return je(nc,this,e[0])},exactPartial(...e){return je(ic,this,e[0],`exactPartial`)},required(...e){return Me(fc,this,e[0])}});function K(e,t){return new Vs({type:`object`,shape:e??{},...T(t)})}var Hs=O(`ZodUnion`,(e,t)=>{zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.options=t.options});function Us(e,t){return new Hs({type:`union`,options:e,...T(t)})}var Ws=O(`ZodDiscriminatedUnion`,(e,t)=>{Hs.init(e,t),Vr.init(e,t)});function Gs(e,t,n){return new Ws({type:`union`,options:t,discriminator:e,...T(n)})}var Ks=O(`ZodIntersection`,(e,t)=>{Hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r)});function qs(e,t){return new Ks({type:`intersection`,left:e,right:t})}var Js=O(`ZodRecord`,(e,t)=>{as(),Gr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ys(e,t,n){return!t||!t._zod?new Js({type:`record`,keyType:B(),valueType:e,...T(t)}):new Js({type:`record`,keyType:e,valueType:t,...T(n)})}function Xs(e,t,n){return new Js({type:`record`,keyType:e,valueType:t,...T(n),partial:!0})}var Zs=O(`ZodEnum`,(e,t)=>{Kr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Zs({...t,checks:[],...T(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Zs({...t,checks:[],...T(r),entries:i})}});function Qs(e,t){return new Zs({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...T(t)})}var $s=O(`ZodLiteral`,(e,t)=>{qr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function q(e,t){return new $s({type:`literal`,values:Array.isArray(e)?e:[e],...T(t)})}var ec=O(`ZodTransform`,(e,t)=>{as(),Jr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new st(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ue(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ue(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function tc(e){return new ec({type:`transform`,transform:e})}var nc=O(`ZodOptional`,(e,t)=>{Xr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rc(e){return new nc({type:`optional`,innerType:e})}var ic=O(`ZodExactOptional`,(e,t)=>{Zr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ac(e){return new ic({type:`optional`,innerType:e})}var oc=O(`ZodNullable`,(e,t)=>{Qr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sc(e){return new oc({type:`nullable`,innerType:e})}var cc=O(`ZodDefault`,(e,t)=>{$r.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lc(e,t){return new cc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}var uc=O(`ZodPrefault`,(e,t)=>{ti.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dc(e,t){return new uc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}var fc=O(`ZodNonOptional`,(e,t)=>{ni.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function pc(e,t){return new fc({type:`nonoptional`,innerType:e,...T(t)})}var mc=O(`ZodCatch`,(e,t)=>{ai.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function hc(e,t){return new mc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:tt(t)})}var gc=O(`ZodPipe`,(e,t)=>{oi.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ro(e,t,n,r),e.in=t.in,e.out=t.out});function _c(e,t){return new gc({type:`pipe`,in:e,out:t})}var vc=O(`ZodReadonly`,(e,t)=>{ci.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yc(e){return new vc({type:`readonly`,innerType:e})}var bc=O(`ZodLazy`,(e,t)=>{ui.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vo(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function xc(e){return new bc({type:`lazy`,getter:e})}var Sc=O(`ZodCustom`,(e,t)=>{di.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r)});function Cc(e,t={}){return La(Sc,e,t)}function wc(e,t){return Ra(e,t)}var J=ee(),Y=B().regex(/^[a-z][a-z0-9_-]{0,63}$/),Tc=H();K({deviceId:Tc,projectId:Y.optional()}).strict(),K({workspaceId:Y,memberId:Y,deviceId:Tc}),K({members:G(Y)});var Ec=134217728,Dc=10485760,Oc=3e5,kc=B().regex(/^[a-f0-9]{64}$/),X=U().int().nonnegative().max(2**53-1),Ac=B().min(1).max(1024).refine(e=>e!==e.normalize(`NFC`)||/[\\\x00-\x1f\x7f:<>"|?*]/.test(e)?!1:e.split(`/`).every(e=>e.length>0&&e.length<=255&&e!==`.`&&e!==`..`&&!/[. ]$/.test(e)&&!/^\.teammy(?:-|$)/i.test(e)&&!/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(e)),`Path must be a portable, normalized relative file path.`),jc=K({sha256:kc,size:U().int().min(0).max(Ec)}),Mc=jc.extend({size:U().int().min(0).max(Dc)}),Nc=Gs(`kind`,[Mc.extend({kind:q(`upsert`),path:Ac}).strict(),K({kind:q(`delete`),path:Ac}).strict()]);K({operationId:H(),parentRevision:X,changes:G(Nc)}).strict().refine(e=>new Set(e.changes.map(e=>e.path)).size===e.changes.length,`Duplicate paths in a publication.`),K({operationId:H(),revision:X});var Pc=Mc.extend({path:Ac,revision:X});K({revision:X,complete:W().default(!1),files:G(Pc),nextCursor:B().nullable()}),K({headRevision:X,revisions:G(K({revision:X,operationId:H(),createdAt:B(),changes:G(Nc)}))}),K({hashes:G(kc).max(200)}).strict(),K({missing:G(kc)});var Fc=Gs(`kind`,[Pc.extend({kind:q(`file`)}),K({kind:q(`directory`),path:Ac,fileCount:U().int().positive()})]),Ic=K({revision:X,path:Us([q(``),Ac]),entries:G(Fc),nextCursor:B().nullable()}),Lc=K({revision:X,file:Pc}),Rc=B().url().max(2048).refine(e=>{let t=new URL(e);return[`http:`,`https:`].includes(t.protocol)&&!t.username&&!t.password&&!t.search&&!t.hash},`Use an HTTP(S) server URL without credentials, query or fragment.`),zc=K({checkIntervalSeconds:U().int().min(1).max(86400),fileSettleSeconds:U().int().min(0).max(86400)}).strict(),Bc=K({schemaVersion:q(1),projectId:Y,projectName:B().trim().min(1).max(120),description:B().max(2e3),publicServerUrl:Rc,configRevision:X,scopeProfile:q(`workspace-and-sessions-v1`),sync:zc}).strict(),Vc=K({operationId:H(),publicServerUrl:Rc,adminId:Y}).strict(),Hc=K({initialized:W(),authMode:Qs([`member-id`,`tai`]).default(`member-id`)}),Uc=Bc.pick({projectName:!0,description:!0}).extend({expectedRevision:X.optional()}).strict(),Wc=K({id:Y,displayName:B().max(120),enabled:W(),accountEnabled:W(),revision:X,bound:W(),fileRevision:X,lastPublishedAt:B().nullable(),hasFiles:W().default(!1),hasSessions:W().default(!1)}),Gc=K({memberId:Y,displayName:B(),siteRole:Qs([`admin`,`member`])}),Kc=Gc.extend({workspaceId:Y}),qc=K({seen:W()}),Jc=K({id:Y}).strict(),Yc=K({expectedRevision:X,displayName:B().trim().max(120).optional(),enabled:W().optional()}).strict();K({operationId:H(),projectName:B().trim().min(1).max(120),description:B().max(2e3).default(``),workspacePath:B().trim().min(1).optional()}).strict();var Xc=K({projects:G(K({projectId:Y,projectName:B(),description:B()}))}),Zc=U().int().positive().nullable(),Qc=K({sync:zc,publicServerUrl:Rc,maxConcurrentRuns:Zc.default(null),revision:X}),$c=K({publicServerUrl:Rc.optional(),sync:zc.optional(),maxConcurrentRuns:Zc.optional(),expectedRevision:X}).strict().refine(e=>e.publicServerUrl!==void 0||e.sync!==void 0||e.maxConcurrentRuns!==void 0,`Provide a setting to update.`),el=K({id:Y,displayName:B(),siteRole:Qs([`admin`,`member`]),enabled:W(),revision:X}),tl=K({id:Y,displayName:B().trim().max(120).default(``),siteRole:Qs([`admin`,`member`]).default(`member`)}).strict(),nl=K({expectedRevision:X,displayName:B().trim().max(120).optional(),enabled:W().optional(),siteRole:Qs([`admin`,`member`]).optional()}).strict();K({status:q(`ok`)});var rl=K({name:q(`teammy`),version:B().min(1),protocolVersion:q(1),capabilities:G(B()),clientUrl:B().url().optional()});K({error:K({code:B(),message:B(),requestId:B()})});var il=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,al=B().regex(/^tmy_[a-f0-9]{64}$/);K({operationId:H(),projectId:Y,memberId:Y,deviceId:Tc,credential:al,multiDevice:q(!0).optional()}).strict();var ol=K({checkIntervalSeconds:U().min(1).max(86400),fileSettleSeconds:U().min(0).max(86400)}).strict(),sl=K({checkedAt:B(),published:W(),appliedFiles:U().int().nonnegative(),pendingFiles:U().int().nonnegative(),sessionSources:U().int().nonnegative(),errors:G(B().max(1e3)).max(20)}).strict(),cl=K({clientVersion:B().max(64),receivedRevision:X.nullable(),appliedRevision:X.nullable(),effectivePolicy:ol,overrides:G(Qs([`checkIntervalSeconds`,`fileSettleSeconds`])).max(2),configError:B().max(2e3).nullable(),reportError:B().max(2e3).nullable(),lastSync:sl.nullable()}).strict(),ll=B().max(64).regex(il),ul=K({running:B().min(1).max(64),waiting:ll.optional(),issue:B().max(1500).optional()});ul.extend({installation:H()}),K({enabled:W(),target:ll.nullable()});var dl=K({devices:G(K({memberId:Y,deviceId:Tc.nullish(),name:B().nullish(),bound:W(),lastSeenAt:B().nullable(),status:cl.nullable(),autoUpdate:ul.extend({enabled:W()}).optional()}))}),Z={brand:`Teammy`,navigation:`主导航`,filePreview:`文件预览`,versionPicker:`选择目录版本`,connectCommand:`连接命令`,syncCommand:`开启同步命令`,syncStopCommand:`停止同步命令`,installCommandLabel:`安装命令`,skipToMain:`跳到主要内容`,loading:`正在加载…`,retry:`重试`,refresh:`刷新`,cancel:`取消`,close:`关闭`,save:`保存`,saving:`正在保存…`,next:`下一步`,back:`上一步`,confirm:`确认`,logout:`退出登录`,menu:`导航菜单`,files:`工作区`,dashboard:`工作看板`,sessions:`会话库`,members:`成员`,settings:`设置`,account:`个人账户`,project:`项目`,projectName:`项目名称`,description:`项目说明`,address:`团队接入地址`,addressHint:`填写成员设备能够访问的服务地址。`,adminId:`管理员 ID`,memberId:`成员 ID`,idHint:`以小写字母开头,最多 64 位,可包含数字、短横线或下划线。ID 创建后不可修改。`,displayName:`显示名称`,admin:`管理员`,member:`成员`,enabled:`已启用`,disabled:`已停用`,login:`进入工作台`,loginTitle:`连接你的团队`,loginHint:`输入管理员预先建立的成员 ID。`,existing:`接入已有工作区`,choose:`请选择`,interval:`文件检查间隔(秒)`,settle:`文件稳定等待(秒)`,timingHint:`文件停止修改后开始计时。新设置约 30 秒后下发,当前批次结束后生效。`,scope:`共享范围`,owner:`文件所属成员`,noFiles:`该目录版本暂无文件`,noFilesHint:`运行客户端同步后查看。`,pickFile:`选择文件,查看内容`,more:`加载更多`,name:`文件路径`,size:`大小`,version:`版本`,directoryVersion:`目录版本`,latest:`最新版本`,viewVersion:`查看版本`,download:`下载原文件`,raw:`原文`,rendered:`预览`,previewUnavailable:`该文件不支持文本预览,请下载查看。`,previewLarge:`文件超过 512 KiB,请下载查看完整内容。`,readOnly:`只读`,refreshFiles:`刷新目录`,remoteImage:`图片`,addMember:`添加成员`,editName:`修改名称`,disableMember:`停用成员`,enableMember:`启用成员`,resetDevice:`重置设备`,resetHint:`撤销该成员的设备凭证,保留共享文件与历史。成员需要重新运行 connect --reconnect。`,disableHint:`停止该成员访问和同步本项目,保留历史资料。其他项目不受影响。`,enableHint:`恢复本项目访问权限。设备需要重新接入。`,bound:`设备已绑定`,unbound:`尚未绑定设备`,noContact:`尚无状态报告`,lastContact:`最近联系`,lastPublished:`最近发布`,noPublication:`尚未发布文件`,stale:`报告已超过 2 分钟`,applied:`已应用`,waiting:`等待应用`,failed:`应用失败`,received:`已接收`,saved:`服务端已保存`,override:`含命令行覆盖`,effective:`当前有效策略`,syncResult:`最近同步`,pending:`待发文件`,clientVersion:`客户端版本`,syncIssues:`同步提示`,statusHint:`最近上报状态,非实时在线状态。`,connectTitle:`连接项目目录`,connectHint:`在工作目录(例如 utu/)运行以下命令,并在打开的网页中确认用户 ID,将当前工作目录连接到 Teammy 服务:`,connectAfter:`注意:会话采集以工作目录为范围,只采集该目录及其子目录中的 Agent 会话。因此,建议在项目根目录(例如 utu/)执行此命令。`,install:`首次使用`,installHint:`需要 Node.js 22.19+。安装后按上方说明连接项目。`,copy:`复制`,copied:`已复制`,copyFailed:`复制失败,请手动选择命令。`,configSaved:`设置已保存,等待客户端接收并上报。`,reloadConfig:`读取最新设置`,configConflict:`设置已被其他成员修改。先读取最新设置,再重新编辑。`,permissionHint:`公共设置由管理员维护。`,application:`配置应用情况`,serverVersion:`服务端版本`,notReported:`未上报`,seconds:`秒`,errors:{AI_DEFAULT_REQUIRED:`请选择模型,或先设置默认接入点。`,AI_PROFILE_DISABLED:`该模型接入点已停用,请重新选择。`,AI_CONFIG_CONFLICT:`模型设置已更新,请重新载入后保存。`,SITE_ADMIN_REQUIRED:`此操作需要站点管理员身份。`,USER_NOT_FOUND:`用户尚未建立或账号已停用,请联系站点管理员。`,USER_EXISTS:`该用户 ID 已存在。`,PROJECT_NOT_FOUND:`项目不存在或你已不再是该项目成员。`,PROJECT_REQUIRED:`请选择一个项目。`,PROJECT_MISMATCH:`设备凭证属于其他项目。`,UNKNOWN_MEMBER:`成员 ID 不存在或已被停用。`,LOGIN_REQUIRED:`登录已失效,请重新登录。`,ADMIN_REQUIRED:`此操作需要管理员身份。`,STALE_CONFIG:`设置已变更,请读取最新设置后重试。`,STALE_MEMBER:`成员信息已变更,请刷新后重试。`,LAST_ADMIN:`至少需要保留一位启用的管理员。`,MEMBER_EXISTS:`该成员 ID 已存在。`,ALREADY_INITIALIZED:`服务已初始化,请刷新页面进入登录。`,INVALID_REQUEST:`请检查输入内容和数值范围。`,INVALID_RESPONSE:`服务返回了无法识别的响应,请刷新后重试。`,GATEWAY_ERROR:`服务网关未能转发请求,请检查部署配置。`,FORBIDDEN:`没有执行此操作的权限。`,INVALID_REVISION:`该目录版本不存在。`}};function fl(e){let t=e.replace(/\s+/g,` `).trim()||`未命名对话`,n=Array.from(t);return n.length>56?n.slice(0,56).join(``)+`…`:t}var pl=class extends Error{code;status;constructor(e,t,n){super(Z.errors[e]??t),this.code=e,this.status=n}},ml;async function hl(e,t,n={}){let r=n.method??`GET`,i=n.body instanceof Blob?n.body:void 0,a=await fetch(d(`/api/v1/${e}`),{method:r===`PATCH`?`POST`:r,headers:{accept:`application/json`,...r===`PATCH`?{"x-http-method-override":`PATCH`}:{},...n.body===void 0?{}:{"content-type":i?`application/octet-stream`:`application/json`},...r===`GET`?{}:{"x-teammy-web":`1`}},body:i??(n.body===void 0?void 0:JSON.stringify(n.body)),signal:n.signal?AbortSignal.any([n.signal,AbortSignal.timeout(n.timeoutMs??15e3)]):AbortSignal.timeout(n.timeoutMs??15e3),credentials:`same-origin`}),o=a.headers.get(`x-teammy-data-generation`);if(o){let e=ml!==void 0&&ml!==o;ml=o,e&&window.dispatchEvent(new Event(`teammy:data-reset`))}let s=await a.json().catch(()=>{throw new pl(`INVALID_RESPONSE`,``,a.status)});if(s?.Response?.Error)throw new pl(`GATEWAY_ERROR`,``,a.status);if(!a.ok){let e=new pl(s?.error?.code??`HTTP_ERROR`,s?.error?.message??`HTTP ${a.status}`,a.status);throw e.code===`LOGIN_REQUIRED`&&window.dispatchEvent(new Event(`teammy:logout`)),e}let c=t.safeParse(s);if(!c.success)throw new pl(`INVALID_RESPONSE`,``,a.status);return c.data}var gl={clientLatest:e=>hl(`client/latest`,K({version:B().min(1),versions:G(B()).default([])}),{signal:e}),server:e=>hl(`server`,rl,{signal:e}),projects:e=>hl(`projects`,Xc,{signal:e}),setup:e=>hl(`setup`,Hc,{signal:e}),session:e=>hl(`web/session`,Gc,{signal:e}),login:e=>hl(`web/session`,Gc,{method:`POST`,body:{id:e}}),logout:()=>hl(`web/session`,K({ok:W()}),{method:`DELETE`})};function _l(e){return{config:t=>e(`project/config`,Bc,{signal:t}),members:t=>e(`web/members`,K({members:G(Wc)}),{signal:t}),devices:t=>e(`web/devices`,dl,{signal:t}),file:(t,n,r,i)=>e(`files/${encodeURIComponent(t)}/entry?${new URLSearchParams({path:n,...r===void 0?{}:{revision:String(r)}})}`,Lc,{signal:i}),tree:(t,n,r,i,a)=>e(`files/${encodeURIComponent(t)}/tree?${new URLSearchParams({path:n,after:i,limit:`100`,...r===void 0?{}:{revision:String(r)}})}`,Ic,{signal:a})}}function vl(e){return e instanceof Go?Z.errors.INVALID_REQUEST:e instanceof Error?e.message:String(e)}function yl(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function bl(){let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}async function xl(e,t,n){let r=await fetch(d(`${n}/blobs/${e.sha256}`),{signal:AbortSignal.any([t,AbortSignal.timeout(Oc)])});if(!r.ok)throw r.status===401&&window.dispatchEvent(new Event(`teammy:logout`)),new pl(`HTTP_ERROR`,`HTTP ${r.status}`,r.status);let i=await r.arrayBuffer();if(i.byteLength!==e.size)throw Error(`File size mismatch.`);let a;try{a=new TextDecoder(`utf-8`,{fatal:!0}).decode(i)}catch{throw Error(Z.previewUnavailable)}if(a.includes(`\0`))throw Error(Z.previewUnavailable);return a}var Sl=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Cl=o(((e,t)=>{t.exports=Sl()})),Q=Cl(),wl=class{values=new Map;get(e){return this.values.get(e)}set(e,t){this.values.set(e,t)}delete(e){this.values.delete(e)}},Tl=(0,J.createContext)(void 0);function El({children:e}){let[{cache:t,generation:n},r]=(0,J.useState)(()=>({cache:new wl,generation:0}));return(0,J.useEffect)(()=>{let e=()=>{let e=new URL(location.href);for(let t of[`chat`,`message`])e.searchParams.delete(t);history.replaceState(history.state,``,e),r(e=>({cache:new wl,generation:e.generation+1}))};return window.addEventListener(`teammy:data-reset`,e),()=>window.removeEventListener(`teammy:data-reset`,e)},[]),(0,Q.jsx)(Tl.Provider,{value:t,children:(0,Q.jsx)(J.Fragment,{children:e},n)})}var Dl=()=>(0,J.useContext)(Tl),Ol=(...e)=>JSON.stringify(e);function kl(e,t=!1,n){let r=Dl(),i=n??e,a=()=>n?r?.get(n):void 0,[o,s]=(0,J.useState)(()=>({source:i,data:a(),error:``,loading:!0})),c=o.source===i?o:{source:i,data:a(),error:``,loading:!0},l=(0,J.useRef)(null),u=(0,J.useRef)(0),d=(0,J.useCallback)(async()=>{l.current?.abort();let t=new AbortController;l.current=t;let o=++u.current;s(e=>({source:i,data:e.source===i?e.data:a(),error:``,loading:!0}));try{let a=await e(t.signal);o===u.current&&(n&&r?.set(n,a),s({source:i,data:a,error:``,loading:!1}))}catch(e){if(!t.signal.aborted&&o===u.current){let t=e instanceof pl&&[401,403,404].includes(e.status);t&&n&&r?.delete(n),s(n=>({...n,data:t?void 0:n.data,error:vl(e)}))}}finally{o===u.current&&(s(e=>({...e,loading:!1})),l.current=null)}},[e,n,r]);return(0,J.useEffect)(()=>{d();let e=()=>{!document.hidden&&!l.current&&d()},n=t?setInterval(e,typeof t==`number`?t:3e4):void 0;return t&&document.addEventListener(`visibilitychange`,e),()=>{u.current++,l.current?.abort(),l.current=null,clearInterval(n),document.removeEventListener(`visibilitychange`,e)}},[d,t]),{data:c.data,error:c.error,loading:c.loading,reload:d}}function Al(){return kl(gl.clientLatest,3e5)}function jl(){let[e]=(0,J.useState)(()=>new AbortController);return(0,J.useEffect)(()=>()=>e.abort(),[e]),e.signal}async function Ml(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.activeElement,n=window.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t).cloneRange()):[],i=document.createElement(`textarea`);i.value=e,i.readOnly=!0,i.style.cssText=`position:fixed;left:0;top:0;opacity:0;pointer-events:none;`,document.body.append(i);try{if(i.focus({preventScroll:!0}),i.select(),!document.execCommand(`copy`))throw Error(`Clipboard copy was denied.`)}finally{if(i.remove(),t instanceof HTMLElement&&t.focus({preventScroll:!0}),n){n.removeAllRanges();for(let e of r)n.addRange(e)}}}var Nl=new URL(`teammy-logo-light-B6BoNVcp.svg`,import.meta.url).href,Pl=new URL(`teammy-logo-dark-GROHRRMa.svg`,import.meta.url).href,Fl=new URL(`teammy-y-standard-light-Bl5D78Uj.svg`,import.meta.url).href,Il=new URL(`teammy-y-standard-dark-C4LRaRpE.svg`,import.meta.url).href,Ll=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-focus-light%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20focus%20pose,%20transparent%20background;%20for%20light%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(-3%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20113.002%20C%20118.444%20111.534%20127.482%20103.119%20133.012%2094.364%20C%20142.105%2079.966%20149.119%2064.195%20159.042%2035.835%20C%20167.649%2011.235%20170.163%207.091%20179.22%202.578%20C%20183.328%200.531%20185.863%20-0%20191.537%200%20C%20203.952%200%20214.157%206.698%20219.622%2018.435%20C%20222.964%2025.612%20222.934%2037.364%20219.549%2047.449%20C%20216.06%2057.842%20204.241%2083.895%20194.889%20101.805%20C%20181.005%20128.395%20171.321%20144.622%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23161615'%20transform='translate(2.5%203)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Rl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-focus-dark%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20focus%20pose,%20transparent%20background;%20for%20dark%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(-3%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20113.002%20C%20118.444%20111.534%20127.482%20103.119%20133.012%2094.364%20C%20142.105%2079.966%20149.119%2064.195%20159.042%2035.835%20C%20167.649%2011.235%20170.163%207.091%20179.22%202.578%20C%20183.328%200.531%20185.863%20-0%20191.537%200%20C%20203.952%200%20214.157%206.698%20219.622%2018.435%20C%20222.964%2025.612%20222.934%2037.364%20219.549%2047.449%20C%20216.06%2057.842%20204.241%2083.895%20194.889%20101.805%20C%20181.005%20128.395%20171.321%20144.622%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23FFFFFF'%20transform='translate(2.5%203)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,zl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-respond-light%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20respond%20pose,%20transparent%20background;%20for%20light%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(2.5%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20112.856%20C%20118.444%20111.12%20127.482%20101.716%20133.012%2091.812%20C%20142.105%2074.963%20149.119%2057.285%20159.042%2027.157%20C%20167.649%201.542%20170.163%20-2.773%20179.22%20-7.422%20C%20183.328%20-9.469%20185.863%20-10%20191.537%20-10%20C%20203.952%20-10%20214.157%20-3.302%20219.622%208.435%20C%20222.964%2015.612%20222.934%2027.364%20219.549%2037.449%20C%20216.06%2047.842%20204.241%2075.158%20194.889%2095.806%20C%20181.005%20126.785%20171.321%20144.508%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23161615'%20transform='translate(0%20-1.5)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Bl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20role='img'%20aria-labelledby='title%20desc'%3e%3ctitle%20id='title'%3eteammy-y-respond-dark%3c/title%3e%3cdesc%20id='desc'%3eteammy%20v02%20y%20mascot,%20respond%20pose,%20transparent%20background;%20for%20dark%20backgrounds.%3c/desc%3e%3cg%20transform='translate(112%2060)%20scale(1.3)'%3e%3cg%20id='y-pose'%20transform='rotate(2.5%20111.0%20302)'%3e%3cpath%20id='y-body'%20fill='%23FD523A'%20fill-rule='evenodd'%20d='M%2049.317%20300.497%20C%2028.532%20295.979%2018.688%20282.992%2023.472%20266.402%20C%2026.05%20257.459%2033.188%20245.557%2064.462%20198.05%20C%2073.677%20184.052%2081.395%20172.127%2081.613%20171.55%20C%2081.831%20170.972%2078.97%20168.935%2075.255%20167.022%20C%2065.861%20162.185%2050.569%20146.814%2041.34%20132.932%20C%2029.015%20114.392%2010.878%2075.899%203.443%2052.5%20C%201.197%2045.434%200.575%2041.566%200.546%2034.5%20C%200.514%2026.44%200.839%2024.805%203.66%2018.841%20C%207.579%2010.555%2013.474%204.715%2020.613%202.044%20C%2029.833%20-1.406%2039.061%20-0.444%2046.837%204.779%20C%2054.765%2010.103%2057.482%2015.595%2066.49%2044.5%20C%2083.08%2097.73%2096.468%20117.452%20112.993%20112.856%20C%20118.444%20111.12%20127.482%20101.716%20133.012%2091.812%20C%20142.105%2074.963%20149.119%2057.285%20159.042%2027.157%20C%20167.649%201.542%20170.163%20-2.773%20179.22%20-7.422%20C%20183.328%20-9.469%20185.863%20-10%20191.537%20-10%20C%20203.952%20-10%20214.157%20-3.302%20219.622%208.435%20C%20222.964%2015.612%20222.934%2027.364%20219.549%2037.449%20C%20216.06%2047.842%20204.241%2075.158%20194.889%2095.806%20C%20181.005%20126.785%20171.321%20144.508%20133.006%20205.5%20C%20113.066%20237.182%20105%20250.137%20105%20250.478%20C%20105%20250.627%20111.412%20250.979%20119.25%20251.262%20C%20135.581%20251.85%20142.206%20253.486%20147.663%20258.277%20C%20156.782%20266.284%20156.024%20279.688%20145.965%20288.298%20C%20138.721%20294.498%20128.637%20297.41%20103.721%20300.494%20C%2088.557%20302.372%2057.948%20302.373%2049.317%20300.497%20Z'/%3e%3cg%20fill='%23FFFFFF'%20transform='translate(0%20-1.5)'%3e%3cpath%20id='y-eye-1'%20d='M%20107%2045.5%20C%20107%2054.613%20102.075%2062%2096%2062%20C%2089.925%2062%2085%2054.613%2085%2045.5%20C%2085%2036.387%2089.925%2029%2096%2029%20C%20102.075%2029%20107%2036.387%20107%2045.5%20Z'/%3e%3cpath%20id='y-eye-2'%20d='M%20139%2045.5%20C%20139%2054.613%20134.075%2062%20128%2062%20C%20121.925%2062%20117%2054.613%20117%2045.5%20C%20117%2036.387%20121.925%2029%20128%2029%20C%20134.075%2029%20139%2036.387%20139%2045.5%20Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Vl=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Hl(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Vl(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Ul=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Wl=e=>{let t=Ul(e);return t.charAt(0).toUpperCase()+t.slice(1)},Gl=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Kl={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function ql(e){return e!=null}function Jl(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Kl.width,a=e.size??e.height??Kl.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Gl(...c):Gl(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Kl[`stroke-width`])*Number(e.size??e.width??Kl.width)/Number(t.size??t.width??Kl.width):t.strokeWidth??Kl[`stroke-width`];return[`svg`,{...Object.entries(Kl).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&ql(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&ql(t.width)&&{[r(`width`)]:t.width},...`height`in t&&ql(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Yl(e,t={}){return Jl(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Xl=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Zl=(0,J.createContext)({}),Ql=()=>(0,J.useContext)(Zl),$l=(0,J.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:ee=!1,color:g=`currentColor`,className:te=``}=Ql()??{},_=!!c||Xl(d),[ne,v,re=[]]=Yl(u,{color:e??g,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??ee,className:Gl(te,s),hasA11yProp:_,attributes:d});return(0,J.createElement)(ne,{ref:f,...v},[...re.map(([e,t])=>(0,J.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function $(e,t=[],n=[]){let r=typeof e==`string`?Hl(e,t,n):e,i=(0,J.forwardRef)(({className:e,...t},n)=>(0,J.createElement)($l,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Wl(r.name)),i}var eu={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};eu.node;var tu=$(eu),nu={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};nu.node;var ru=$(nu),iu={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};iu.node;var au=$(iu),ou={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};ou.node;var su=$(ou),cu={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};cu.node;var lu=$(cu),uu={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};uu.node;var du=$(uu),fu={name:`brush-cleaning`,size:24,node:[[`path`,{d:`m16 22-1-4`,key:`1ow2iv`}],[`path`,{d:`M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1`,key:`11gii7`}],[`path`,{d:`M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z`,key:`bju7h4`}],[`path`,{d:`m8 22 1-4`,key:`s3unb`}]]};fu.node;var pu=$(fu),mu={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};mu.node;var hu=$(mu),gu={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};gu.node;var _u=$(gu),vu={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};vu.node;var yu=$(vu),bu={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};bu.node;var xu=$(bu),Su={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Su.node;var Cu=$(Su),wu={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};wu.node;var Tu=$(wu),Eu={name:`clipboard-paste`,size:24,node:[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]};Eu.node;var Du=$(Eu),Ou={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};Ou.node;var ku=$(Ou),Au={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Au.node;var ju=$(Au),Mu={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Mu.node;var Nu=$(Mu),Pu={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Pu.node;var Fu=$(Pu),Iu={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Iu.node;var Lu=$(Iu),Ru={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Ru.node;var zu=$(Ru),Bu={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Bu.node;var Vu=$(Bu),Hu={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Hu.node;var Uu=$(Hu),Wu={name:`file-image`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]};Wu.node;var Gu=$(Wu),Ku={name:`file-plus-corner`,size:24,node:[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],aliases:[`file-plus-2`]};Ku.node;var qu=$(Ku),Ju={name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]};Ju.node;var Yu=$(Ju),Xu={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Xu.node;var Zu=$(Xu),Qu={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Qu.node;var $u=$(Qu),ed={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};ed.node;var td=$(ed),nd={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};nd.node;var rd=$(nd),id={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};id.node;var ad=$(id),od={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};od.node;var sd=$(od),cd={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};cd.node;var ld=$(cd),ud={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};ud.node;var dd=$(ud),fd={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};fd.node;var pd=$(fd),md={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};md.node;var hd=$(md),gd={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};gd.node;var _d=$(gd),vd={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};vd.node;var yd=$(vd),bd={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};bd.node;var xd=$(bd),Sd={name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]};Sd.node;var Cd=$(Sd),wd={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};wd.node;var Td=$(wd),Ed={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};Ed.node;var Dd=$(Ed),Od={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Od.node;var kd=$(Od),Ad={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Ad.node;var jd=$(Ad),Md={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Md.node;var Nd=$(Md),Pd={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};Pd.node;var Fd=$(Pd),Id={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};Id.node;var Ld=$(Id),Rd={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Rd.node;var zd=$(Rd),Bd={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Bd.node;var Vd=$(Bd),Hd={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Hd.node;var Ud=$(Hd),Wd={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Wd.node;var Gd=$(Wd),Kd={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Kd.node;var qd=$(Kd),Jd={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};Jd.node;var Yd=$(Jd),Xd={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Xd.node;var Zd=$(Xd),Qd={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Qd.node;var $d=$(Qd),ef={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};ef.node;var tf=$(ef),nf={name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]};nf.node;var rf=$(nf),af={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};af.node;var of=$(af),sf={name:`user-round-check`,size:24,node:[[`path`,{d:`M2 21a8 8 0 0 1 13.292-6`,key:`bjp14o`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`m16 19 2 2 4-4`,key:`1b14m6`}]],aliases:[`user-check-2`]};sf.node;var cf=$(sf),lf={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};lf.node;var uf=$(lf),df={name:`user-round-x`,size:24,node:[[`path`,{d:`m16.5 16.5 5 5`,key:`zc9lw7`}],[`path`,{d:`M2 21a8 8 0 0 1 11.531-7.18`,key:`x5izle`}],[`path`,{d:`m21.5 16.5-5 5`,key:`1empo3`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}]],aliases:[`user-x-2`]};df.node;var ff=$(df),pf={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};pf.node;var mf=$(pf),hf={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};hf.node;var gf=$(hf),_f={name:`zoom-in`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};_f.node;var vf=$(_f),yf={name:`zoom-out`,size:24,node:[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]};yf.node;var bf=$(yf),xf={light:{logo:Nl,standard:Fl,focus:Ll,respond:zl},dark:{logo:Pl,standard:Il,focus:Rl,respond:Bl}};function Sf({compact:e=!1,background:t=`light`}){return(0,Q.jsx)(`div`,{className:`brand ${e?`brand-compact`:``}`,children:(0,Q.jsx)(`img`,{src:xf[t][e?`standard`:`logo`],alt:`Teammy`})})}function Cf({pose:e=`focus`,background:t=`light`}){return(0,Q.jsx)(`img`,{className:`mascot mascot-${e}`,src:xf[t][e],alt:``,"aria-hidden":`true`})}function wf({name:e,small:t=!1}){return(0,Q.jsx)(`span`,{className:`avatar ${t?`small`:``}`,"aria-hidden":`true`,children:Array.from(e)[0]?.toUpperCase()})}function Tf({children:e}){return(0,Q.jsx)(`span`,{className:`count`,children:e})}function Ef({title:e,description:t,icon:n,mascot:r=!1,children:i}){return(0,Q.jsxs)(`div`,{className:`empty-state`,children:[r?(0,Q.jsx)(Cf,{}):n?(0,Q.jsx)(Lf,{name:n}):null,(0,Q.jsx)(`h3`,{children:e}),t&&(0,Q.jsx)(`p`,{children:t}),i]})}function Df({title:e,count:t,children:n}){return(0,Q.jsxs)(`div`,{className:`section-heading`,children:[(0,Q.jsxs)(`h2`,{children:[e,t!==void 0&&(0,Q.jsx)(Tf,{children:t})]}),n]})}function Of({label:e,children:t}){return(0,Q.jsx)(`div`,{className:`toolbar-actions`,role:`group`,"aria-label":e,children:t})}function kf({children:e,error:t=!1}){return e?(0,Q.jsx)(`div`,{"data-testid":`notice`,"data-kind":t?`error`:`info`,className:`notice ${t?`error`:``}`,role:t?`alert`:`status`,children:e}):null}function Af({id:e,name:t,label:n,hint:r,children:i}){let a=[i.props[`aria-describedby`],r?`${e}-hint`:void 0].filter(Boolean).join(` `)||void 0;return(0,Q.jsxs)(`label`,{className:`field`,htmlFor:e,children:[(0,Q.jsx)(`span`,{id:`${e}-label`,children:n}),(0,J.cloneElement)(i,{id:e,name:t??i.props.name??e,"data-testid":e,"aria-labelledby":`${e}-label`,"aria-describedby":a}),r&&(0,Q.jsx)(`small`,{id:`${e}-hint`,children:r})]})}function jf({title:e,description:t,children:n}){return(0,Q.jsxs)(`header`,{className:`page-header`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{children:e}),t&&(0,Q.jsx)(`p`,{children:t})]}),n]})}function Mf({id:e,title:t,label:n,actions:r,onKeyDown:i,children:a,onClose:o}){let s=(0,J.useRef)(null);return(0,J.useEffect)(()=>{let e=document.activeElement;return s.current?.showModal(),()=>{s.current?.close(),e?.focus()}},[]),(0,Q.jsx)(`dialog`,{id:e,"data-testid":e,"aria-labelledby":n?void 0:`${e}-title`,"aria-label":n,ref:s,onKeyDown:i,onCancel:e=>{e.preventDefault(),o()},onClick:e=>{e.target===e.currentTarget&&o()},children:(0,Q.jsxs)(`div`,{className:`dialog-content`,children:[(0,Q.jsxs)(`header`,{className:`dialog-header`,children:[(0,Q.jsx)(`h2`,{id:`${e}-title`,children:t}),r,(0,Q.jsx)(Bf,{icon:`close`,label:Z.close,"data-testid":`dialog-close`,onClick:o})]}),a]})})}function Nf({id:e,label:t,value:n}){let[r,i]=(0,J.useState)(``);return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`command`,"data-testid":e,children:[(0,Q.jsx)(`code`,{"data-testid":`${e}-value`,children:n}),(0,Q.jsx)(Bf,{icon:`copy`,"data-testid":`${e}-copy`,label:`${Z.copy}${t}`,onClick:async()=>{try{await Ml(n),i(Z.copied)}catch{i(Z.copyFailed)}}})]}),r&&(0,Q.jsx)(`small`,{"data-testid":`${e}-feedback`,role:`status`,children:r})]})}function Pf({value:e}){return e?(0,Q.jsx)(`time`,{dateTime:e,children:new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}):(0,Q.jsx)(`span`,{children:`—`})}var Ff={clear:pu,assistant:Zd,messages:Cd,channels:Td,pin:Fd,more:zu,computers:kd,archive:ru,send:au,activity:tu,dashboard:dd,home:ad,clock:ku,warning:of,command:tf,sessions:Td,message:Cd,files:td,materials:lu,memory:du,question:Tu,folderOpen:$u,chevronUp:xu,chevronDown:_u,members:mf,settings:qd,help:Tu,filter:rd,compact:Dd,stop:$d,restore:Ud,refresh:Vd,loading:_d,chevron:yu,file:Zu,text:rf,link:pd,attachment:jd,image:sd,paste:Du,zoomIn:vf,zoomOut:bf,imageFile:Gu,spreadsheetFile:Yu,codeFile:Uu,addText:hd,addFile:qu,download:Lu,code:ju,preview:Vu,sparkles:Zd,close:gf,plus:zd,edit:Nd,device:kd,disable:ff,enable:cf,reset:ld,menu:xd,logout:yd,account:uf,copy:Nu,general:Yd,connect:Ld,model:Fu,check:hu,search:Gd,notifications:su,attention:Cu},If={small:16,normal:24,navigation:38};function Lf({name:e,size:t=`normal`}){let n=Ff[e];return(0,Q.jsx)(n,{className:`icon`,size:If[t],strokeWidth:2,absoluteStrokeWidth:!0,"aria-hidden":`true`})}var Rf={channels:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`path`,{d:`M4.3 2.3h9.5a2.3 2.3 0 0 1 2.3 2.3v5.8a2.3 2.3 0 0 1-2.3 2.3H6.9l-3.5 2.9a.85.85 0 0 1-1.4-.65V4.6a2.3 2.3 0 0 1 2.3-2.3Z`}),(0,Q.jsx)(`path`,{d:`M18 8.5h1.8a2.2 2.2 0 0 1 2.2 2.2v10a.85.85 0 0 1-1.4.65L17.4 19h-7.2A2.2 2.2 0 0 1 8 16.8v-2.2h5.8a4.2 4.2 0 0 0 4.2-4.2Z`})]}),materials:(0,Q.jsx)(`path`,{d:`M2 5a2 2 0 0 1 2-2h3.1c1.6 0 2.9.45 4 1.3v16.4a6.4 6.4 0 0 0-3.9-1.2H4a2 2 0 0 1-2-2Zm20 0a2 2 0 0 0-2-2h-3.1c-1.6 0-2.9.45-4 1.3v16.4a6.4 6.4 0 0 1 3.9-1.2H20a2 2 0 0 0 2-2Z`}),help:(0,Q.jsx)(`path`,{fillRule:`evenodd`,d:`M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0ZM8.5 8.9a3.6 3.6 0 0 1 7 .9c0 1.8-1.3 2.7-2.4 3.5-.5.4-.6.7-.6 1.3h-1.8c0-1.4.5-2.1 1.5-2.8 1-.7 1.5-1.2 1.5-2a1.8 1.8 0 0 0-3.5-.45ZM13 17.2a1.15 1.15 0 1 1-2.3 0 1.15 1.15 0 0 1 2.3 0Z`}),settings:(0,Q.jsx)(`path`,{fillRule:`evenodd`,d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.32-1.915ZM15.4 12a3.4 3.4 0 1 1-6.8 0 3.4 3.4 0 0 1 6.8 0Z`})};function zf({name:e,selected:t}){let n=t&&Rf[e];return n?(0,Q.jsx)(`svg`,{className:`icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,Q.jsx)(`g`,{stroke:`none`,children:n})}):(0,Q.jsx)(Lf,{name:e})}function Bf({label:e,icon:t,tooltip:n=t!==`refresh`,className:r=``,variant:i=`ghost`,...a}){return(0,Q.jsx)(`button`,{type:`button`,...a,className:`icon-button ${i===`primary`?`primary`:``} ${r}`,"aria-label":e,"data-tooltip":n===!0?e:n||void 0,children:(0,Q.jsx)(Lf,{name:t})})}function Vf({id:e,label:t,trigger:n,triggerId:r,className:i=``,disabled:a=!1,placement:o=`bottom`,routeKey:s,children:c,open:l,onOpenChange:u,focusFirst:d=!0}){let[f,p]=(0,J.useState)(!1),m=l??f,h=e=>{p(e),u?.(e)},ee=(0,J.useRef)(null),g=(0,J.useRef)(null),te=(0,J.useRef)(!1),_=(0,J.useRef)(null),[ne,v]=(0,J.useState)();return(0,J.useLayoutEffect)(()=>{if(!m||o!==`top`)return;let e=()=>{if(!g.current||!_.current)return;let e=g.current.getBoundingClientRect(),t=_.current.getBoundingClientRect().width;v({position:`fixed`,top:`auto`,bottom:innerHeight-e.top+8,left:Math.max(8,Math.min(e.left,innerWidth-t-8)),maxHeight:`min(var(--dropdown-max-height, 70dvh), ${Math.max(80,e.top-24)}px)`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[m,o]),(0,J.useEffect)(()=>h(!1),[s]),(0,J.useEffect)(()=>{if(!m)return;let e=ee.current?.querySelectorAll(`[role="menuitem"]:not(:disabled)`);d&&e?.[te.current?e.length-1:0]?.focus();let t=e=>{ee.current?.contains(e.target)||h(!1)};return document.addEventListener(`pointerdown`,t),()=>document.removeEventListener(`pointerdown`,t)},[m]),(0,Q.jsxs)(`div`,{className:`dropdown ${i}`,ref:ee,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||h(!1)},onKeyDown:e=>{e.key===`Escape`&&m&&(e.stopPropagation(),h(!1),g.current?.focus())},children:[(0,Q.jsx)(`button`,{ref:g,type:`button`,disabled:a,className:`dropdown-trigger`,"data-testid":r,"aria-label":t,"aria-haspopup":`menu`,"aria-expanded":m,"aria-controls":e,onClick:()=>{te.current=!1,h(!m)},onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),te.current=e.key===`ArrowUp`,h(!0))},children:n}),m&&(0,Q.jsx)(`div`,{id:e,ref:_,style:o===`top`?ne:void 0,className:`dropdown-menu`,role:`menu`,"aria-label":t,"data-testid":e,onKeyDown:e=>{let t=[...e.currentTarget.querySelectorAll(`[role="menuitem"]:not(:disabled)`)],n=t.indexOf(document.activeElement),r=e.key===`ArrowDown`?(n+1)%t.length:e.key===`ArrowUp`?(n+t.length-1)%t.length:e.key===`Home`?0:e.key===`End`?t.length-1:void 0;r!==void 0&&(e.preventDefault(),t[r]?.focus())},children:c(()=>{h(!1),g.current?.focus()})})]})}export{jc as $,bl as A,l as At,Yc as B,Ol as C,d as Ct,gl as D,p as Dt,pl as E,m as Et,Z as F,Qc as G,qc as H,dl as I,el as J,$c as K,Uc as L,hl as M,yl as N,_l as O,o as Ot,fl as P,Oc as Q,Jc as R,El as S,ee as St,Cl as T,u as Tt,Rc as U,Bc as V,Vc as W,Gc as X,nl as Y,Kc as Z,Pf as _,Us as _t,Tf as a,Ms as at,jl as b,H as bt,Lf as c,W as ct,Mf as d,q as dt,Ac as et,zf as f,U as ft,Of as g,B as gt,Df as h,Ys as ht,Nf as i,Y as it,xl as j,vl as k,s as kt,Bf as l,Gs as lt,jf as m,Xs as mt,wf as n,X as nt,Ef as o,Qs as ot,kf as p,K as pt,tl as q,Sf as r,Tc as rt,Af as s,G as st,Vf as t,kc as tt,Cf as u,xc as ut,Ml as v,Ls as vt,Dl as w,f as wt,kl as x,da as xt,Al as y,gs as yt,Wc as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,Ct as t,E as n,F as r,St as i,T as a,c as o,et as s,g as c,l,o as u,p as d,x as f}from"./Dropdown-
|
|
1
|
+
import{C as e,Ct as t,E as n,F as r,St as i,T as a,c as o,et as s,g as c,l,o as u,p as d,x as f}from"./Dropdown-Dh9Q9fSi.js";import{M as p,N as m,j as h,z as g}from"./index-CWjsEUUy.js";import{r as _}from"./task-links-ArhNpuGG.js";import{t as v}from"./Markdown-Gk89fXoh.js";import{a as y,i as b,l as x,n as S,o as C,s as w,t as T}from"./WorkspaceTree-yST2ByxM.js";import{t as E}from"./file-links-CtHFx6cd.js";var D=i(),O=a();function k(e,t){let n=t.split(`/`).slice(0,-1);return n.map((t,r)=>S(e,n.slice(0,r+1).join(`/`))).concat(S(e,``))}function A({members:e,onRefresh:i}){let{api:a,projectId:o}=g(),[c,h]=(0,D.useState)(()=>{let t=new URLSearchParams(location.search),n=t.get(`owner`),r=s.safeParse(t.get(`path`));return n&&(w(n)||e.some(e=>e.id===n))&&r.success&&!C(r.data)?{owner:n,path:r.data}:void 0}),[v,x]=(0,D.useState)(()=>new Set(c?k(c.owner,c.path):[])),[A,N]=(0,D.useState)(()=>c?{...c,kind:`file`}:void 0),[P,F]=(0,D.useState)(0),[I,L]=(0,D.useState)(()=>{let e=new URLSearchParams(location.search);return!c&&(e.has(`owner`)||e.has(`path`))?`文件链接不完整或目标已不可用。`:``}),R=(0,D.useCallback)(async e=>{if(c)try{return{owner:c.owner,...await a.file(c.owner,c.path,void 0,e)}}catch(e){throw e instanceof n&&e.code===`FILE_NOT_FOUND`?Error(`找不到这个文件,可能已被删除或移动。`):e}},[c?.owner,c?.path,P]),z=f(R),B=z.data?.owner===c?.owner&&z.data?.file.path===c?.path?z.data:void 0;function V(e,t){let n=t.split(`/`).filter(Boolean);x(t=>{let r=new Set(t);for(let t=0;t<=n.length;t++)r.add(S(e,n.slice(0,t).join(`/`)));return r})}function H(e,n){L(``),V(e,n.split(`/`).slice(0,-1).join(`/`)),h({owner:e,path:n}),N({owner:e,path:n,kind:`file`}),history.replaceState(null,``,t(_(o,e,n)))}function U(n){if(!c)return!1;let r=E(w(c.owner)?c.path:`${c.owner}/${c.path}`,n);if(!r)return!/^[a-z][a-z0-9+.-]*:/i.test(n)&&!n.startsWith(`//`)&&(L(`该链接超出工作区,请在原仓库查看。`),!0);if(C(r.path))return L(`配置文件不在文件浏览中显示。`),!0;if(y(r.path))return location.assign(t(`/projects/${o}/memory`)),!0;let[i,...a]=r.path.split(`/`),s=e.some(e=>e.id===i),l=s?i:b,u=s?a.join(`/`):r.path;return L(``),r.directory?(V(l,u),N({owner:l,path:u,kind:`directory`})):l===c.owner&&u===c.path?r.anchor&&[...document.querySelectorAll(`.markdown h1,.markdown h2,.markdown h3,.markdown h4`)].find(e=>e.textContent?.trim().toLowerCase().replace(/\s+/g,`-`)===r.anchor.toLowerCase())?.scrollIntoView({block:`center`}):H(l,u),!0}return(0,O.jsx)(p,{"data-testid":`file-browser`,label:`文件资源管理器`,navigation:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(m,{title:`工作区`,children:(0,O.jsx)(l,{icon:`refresh`,label:`刷新文件`,"data-testid":`files-refresh`,onClick:()=>{L(``),F(e=>e+1),i()}})}),(0,O.jsx)(T,{members:e,expanded:v,selected:A,revealed:!z.loading&&!z.error&&B?{owner:B.owner,path:B.file.path,file:B.file}:void 0,onSelect:H,onToggle:(e,t)=>{N({owner:e,path:t,kind:`directory`}),x(n=>{let r=new Set(n),i=S(e,t);return r.has(i)?r.delete(i):r.add(i),r})}},P)]}),children:(0,O.jsx)(`section`,{className:`file-detail`,"data-testid":`file-preview`,"data-owner-id":c?.owner,"data-file-path":c?.path,"aria-label":r.filePreview,children:B&&!z.loading&&!z.error?(0,O.jsx)(M,{owner:B.owner,file:B.file,linkError:I,onLink:U},`${B.owner}:${B.file.path}:${B.file.sha256}`):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(j,{target:c}),(0,O.jsxs)(`div`,{className:`reader-body`,children:[(0,O.jsx)(d,{error:!0,children:I||!z.loading&&z.error}),z.error&&(0,O.jsx)(`button`,{className:`file-entry-retry`,"data-testid":`files-retry`,onClick:()=>void z.reload(),children:r.retry}),c&&z.loading&&(0,O.jsx)(`p`,{className:`preview-body`,role:`status`,children:r.loading}),!c&&!I&&(0,O.jsx)(u,{mascot:!0,title:`查看工作区文件`,description:r.pickFile})]})]})})})}function j({target:e,children:t}){let n=e&&(w(e.owner)?`teamcontext`:e.owner);return(0,O.jsx)(h,{title:e?(0,O.jsxs)(`h2`,{className:`file-detail-path`,title:`${n}/${e.path}`,children:[(0,O.jsxs)(`span`,{children:[n,` / `]}),e.path]}):r.filePreview,actions:t})}function M({owner:t,file:n,linkError:i,onLink:a}){let{readTextBlob:s,blobUrl:u,projectId:p}=g(),[m,h]=(0,D.useState)(!1),_=n.size>524288,y=/\.(md|markdown)$/i.test(n.path),b=/\.html?$/i.test(n.path),S=(0,D.useCallback)(e=>_?Promise.resolve(void 0):s(n,e),[n.sha256,n.size,_]),C=f(S,!1,e(p,`file-body`,n.sha256));return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(j,{target:{owner:t,path:n.path},children:(0,O.jsxs)(c,{label:`文件操作`,children:[(y||b)&&(0,O.jsx)(l,{icon:m?`preview`:`code`,label:m?`切换为预览`:`切换为原文`,"data-testid":`file-toggle-raw`,"aria-pressed":m,onClick:()=>h(!m)}),(0,O.jsx)(`a`,{className:`icon-button`,"data-testid":`file-download`,"aria-label":r.download,title:r.download,href:u(n.sha256),download:n.path.split(`/`).at(-1),children:(0,O.jsx)(o,{name:`download`})})]})}),(0,O.jsxs)(`div`,{className:`reader-body`,children:[(0,O.jsx)(d,{error:!0,children:i}),_?(0,O.jsx)(`div`,{className:`empty`,children:(0,O.jsx)(`p`,{children:r.previewLarge})}):C.error?(0,O.jsxs)(`div`,{className:`preview-body`,children:[(0,O.jsx)(d,{error:!0,children:C.error}),(0,O.jsx)(`button`,{"data-testid":`file-preview-retry`,onClick:()=>void C.reload(),children:r.retry})]}):C.loading?(0,O.jsx)(`p`,{className:`preview-body`,role:`status`,children:r.loading}):(0,O.jsx)(`div`,{className:`preview-body${b&&!m?` preview-body-html`:``}`,children:b&&!m?(0,O.jsx)(x,{url:u(n.sha256),name:n.path.split(`/`).at(-1)}):y&&!m?(0,O.jsx)(`article`,{className:`markdown`,"data-testid":`file-content`,"data-format":`markdown`,children:(0,O.jsx)(v,{onLink:a,children:C.data??``})}):(0,O.jsx)(`pre`,{className:`raw`,"data-testid":`file-content`,"data-format":`text`,children:C.data})})]})]})}export{A as Files};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as e,Dt as t,N as n,St as r,T as i,i as a,o,x as s,y as c}from"./Dropdown-
|
|
1
|
+
import{D as e,Dt as t,N as n,St as r,T as i,i as a,o,x as s,y as c}from"./Dropdown-Dh9Q9fSi.js";import{L as l,M as u,N as d,j as f,n as p}from"./index-CWjsEUUy.js";import{t as m}from"./Markdown-Gk89fXoh.js";var h=`# 帮助
|
|
2
2
|
|
|
3
3
|
网页目录按 [index.json](index.json) 中的分组和文章顺序展示。
|
|
4
4
|
|
|
@@ -91,6 +91,7 @@ import{D as e,Dt as t,N as n,St as r,T as i,i as a,o,x as s,y as c}from"./Dropdo
|
|
|
91
91
|
| 26/11/19 | v0.2.16 | 修复已知问题。 |
|
|
92
92
|
| 26/11/19 | v0.2.17 | 任务编号及相关交互;电脑会话完成时企微提醒;客户端静默更新。 |
|
|
93
93
|
| 26/11/19 | v0.2.18 | 设置交互更新;修复已知问题。 |
|
|
94
|
+
| 26/11/19 | v0.2.19 | 支持自动更新;修复已知问题。 |
|
|
94
95
|
`,_=`# 让开发 Agent 使用 Teammy
|
|
95
96
|
|
|
96
97
|
正在使用的开发 Agent 可以通过 Teammy 查询任务、资料和历史会话。开始一项工作前,让 Agent 查找团队已有的结论,有助于减少重复摸索。
|
|
@@ -220,6 +221,8 @@ Agent 工作时,按 Enter 或点击发送即可插话。Codex、Claude Code、
|
|
|
220
221
|
|
|
221
222
|
Agent 暂停等待授权或回答时,在卡片中操作。期间发送的普通消息会在会话恢复后交付。发送按钮左侧的停止按钮可中断工作。悬停消息下的小图标可查看等待或异常状态。
|
|
222
223
|
|
|
224
|
+
打开长会话时先显示最近的记录,向上滚动可继续加载更早消息。查看历史时,新回复会保存在下方,当前阅读位置会保留。
|
|
225
|
+
|
|
223
226
|
同一轮连续的工具调用合并为一行。点击调用次数可查看列表,再展开某一项可查看输出。本轮工作结束后才提示未读,工作结束分隔线显示在最后一条回复之前。
|
|
224
227
|
|
|
225
228
|
### 编辑历史消息
|
|
@@ -639,7 +642,11 @@ teammy logs
|
|
|
639
642
|
|
|
640
643
|
## 升级与修复
|
|
641
644
|
|
|
642
|
-
|
|
645
|
+
客户端默认自动更新。后台启动时检查一次,之后约每小时检查本站已开放且 npm 已公开的版本。新版先下载到本机,正在工作的 Agent 和待回答的问题可以照常处理。共用这个后台的各项目 Agent 都空闲后才切换,各台设备独立更新。
|
|
646
|
+
|
|
647
|
+
在「设置 → 设备与本地 Agent」可按设备切换「自动更新客户端」。等待切换时,设备旁显示已下载的版本。下载连续失败时,这里会显示原因,后台会稍后重试。关闭开关后会取消尚未开始的自动切换。
|
|
648
|
+
|
|
649
|
+
旧客户端首次升级,或需要手动更新时,可在终端运行以下命令。
|
|
643
650
|
|
|
644
651
|
\`\`\`sh
|
|
645
652
|
npm install -g @teammy/cli@latest && teammy repair
|
|
@@ -649,7 +656,7 @@ npm install -g @teammy/cli@latest && teammy repair
|
|
|
649
656
|
|
|
650
657
|
「电脑」里的终端由独立进程维持。客户端切换版本时,原终端及其滚屏记录会保留,网页重新连接后可以继续使用。
|
|
651
658
|
|
|
652
|
-
在项目根目录运行 \`teammy status\`
|
|
659
|
+
在项目根目录运行 \`teammy status\` 可以查看安装版本和后台运行版本。自动更新等待切换时,还会列出已下载的版本。
|
|
653
660
|
|
|
654
661
|
> npm 更新只替换安装包;\`teammy --version\` 和 \`teammy status\` 只查看状态。首次安装、尚未连接项目时运行 \`repair\` 也可以,它不会自动绑定项目或启动 Agent,之后按[首次接入](../getting-started/installation.md)连接即可。
|
|
655
662
|
|
|
@@ -700,7 +707,7 @@ teammy uninstall
|
|
|
700
707
|
npm uninstall -g @teammy/cli
|
|
701
708
|
\`\`\`
|
|
702
709
|
|
|
703
|
-
|
|
710
|
+
卸载会移除本机后台和自动下载的客户端版本,保留本地 \`teamcontext/\`、绑定记录和历史。如果还要解除服务端的文件夹绑定,在项目设置中处理即可。
|
|
704
711
|
`,O=`# 模型接入与选择
|
|
705
712
|
|
|
706
713
|
Tim 的问答和项目内容整理使用服务端配置的模型。管理员可以添加多个模型接入点,设置全站默认,也可以为某个项目单独选择。
|
|
@@ -771,7 +778,7 @@ Tim 的问答和项目内容整理使用服务端配置的模型。管理员可
|
|
|
771
778
|
|
|
772
779
|
接管开关按整类消息生效。代码评审不再按结论类型细分。自动转交进入待处理队列,等待当前轮结束,不直接插入正在执行的轮次。
|
|
773
780
|
|
|
774
|
-
「电脑会话完成」默认选「不额外通知」,只在会话列表标记未读。选择「网页」,主导航的「电脑」图标也会提示未读。选择「网页+企微」,Tim
|
|
781
|
+
「电脑会话完成」默认选「不额外通知」,只在会话列表标记未读。选择「网页」,主导航的「电脑」图标也会提示未读。选择「网页+企微」,Tim 还会私聊发送目录、会话标题、本轮的完整最终回复和会话链接。超过企业微信单条消息长度的回复会分条发送。网页中发起和 Tim 转交的工作都适用,无需绑定专用群。等待回答、手动停止和执行失败时不会发送完成提醒。
|
|
775
782
|
|
|
776
783
|
「电脑会话提出问题」可单独设置,默认也为「不额外通知」。问题始终可在原会话处理。选择「网页」后,新卡片会在「电脑」入口和对应会话标记未读,实际看到卡片或卡片关闭后清除这项标记。选择「网页+企微」还会收到直达卡片的私聊链接。打开链接后,由你在卡片上回答或确认。
|
|
777
784
|
|
|
@@ -983,4 +990,4 @@ teamcontext/alice/2026-11-12-data-check/
|
|
|
983
990
|
标有「需要确认」的任务,表示记录中有影响判断的歧义。查看来源后,可以修改内容再保存;如果当前内容已经准确,直接保存即可确认。
|
|
984
991
|
|
|
985
992
|
> 网页修订保存在对应任务的 \`_task_update/\` 子目录中,作为补充记录同步,不改写原任务正文。
|
|
986
|
-
`,N=new URL(`workflow-h92qCEHO.svg`,import.meta.url).href,P=r(),F={sections:[{title:`开始使用`,documents:[{title:`新成员接入指南`,path:`getting-started/onboarding.md`},{title:`认识 Teammy`,path:`getting-started/overview.md`},{title:`安装与首次接入`,path:`getting-started/installation.md`}]},{title:`工作区与任务`,documents:[{title:`工作记录与任务看板`,path:`workspace/work-records.md`}]},{title:`对话与协作`,documents:[{title:`与 Tim 交流`,path:`conversations/talk-to-tim.md`},{title:`在企业微信中使用 Teammy`,path:`conversations/wecom.md`},{title:`代码仓库与 PR/MR 评审`,path:`conversations/code-review.md`}]},{title:`电脑与本地执行`,documents:[{title:`使用本地 Agent`,path:`computers/local-agent.md`},{title:`使用终端`,path:`computers/terminal.md`},{title:`让开发 Agent 使用 Teammy`,path:`computers/agent-integration.md`}]},{title:`资料与经验`,documents:[{title:`资料、记忆与会话库`,path:`resources/library.md`}]},{title:`设置与维护`,documents:[{title:`项目与成员管理`,path:`settings/project-and-members.md`},{title:`消息与通知`,path:`settings/notifications.md`},{title:`模型接入与选择`,path:`settings/models.md`},{title:`客户端维护与同步`,path:`settings/client-maintenance.md`}]},{title:`问题排查`,documents:[{title:`常见问题`,path:`troubleshooting/common-issues.md`}]},{title:`Changelog`,documents:[{title:`版本更新`,path:`changelog.md`}]}]},I=i(),L=new Map(Object.entries(Object.assign({"../../../../docs/help/README.md":h,"../../../../docs/help/changelog.md":g,"../../../../docs/help/computers/agent-integration.md":_,"../../../../docs/help/computers/local-agent.md":v,"../../../../docs/help/computers/terminal.md":y,"../../../../docs/help/conversations/code-review.md":b,"../../../../docs/help/conversations/talk-to-tim.md":x,"../../../../docs/help/conversations/wecom.md":S,"../../../../docs/help/getting-started/installation.md":C,"../../../../docs/help/getting-started/onboarding.md":w,"../../../../docs/help/getting-started/overview.md":T,"../../../../docs/help/resources/library.md":E,"../../../../docs/help/settings/client-maintenance.md":D,"../../../../docs/help/settings/models.md":O,"../../../../docs/help/settings/notifications.md":k,"../../../../docs/help/settings/project-and-members.md":A,"../../../../docs/help/troubleshooting/common-issues.md":j,"../../../../docs/help/workspace/work-records.md":M})).map(([e,t])=>[e.slice(22),t])),R=new Map(Object.entries(Object.assign({"../../../../docs/help/assets/workflow.svg":N})).map(([e,t])=>[e.slice(22),t])),z=F.sections.flatMap(e=>e.documents)[0]??{title:`帮助`,path:`README.md`};function B(e,t){if(!/^(?:[a-z][a-z\d+.-]*:|\/)/i.test(e))try{let n=new URL(e,`https://help.invalid/${t}`);return{path:decodeURIComponent(n.pathname.slice(1)),hash:n.hash}}catch{}}function V({config:r,navigate:i}){let h=new URLSearchParams(location.search).get(`doc`),g=h||z.path,_=L.get(g),v=_?.match(/^# [^\r\n]+(?:\r?\n|$)/)?.[0],y=F.sections.flatMap(e=>e.documents).find(e=>e.path===g)?.title,b=location.hash,x=(0,P.useRef)(null),S=c(),C=s(e.server,!0),w=`teammy connect --url ${n(C.data?.clientUrl??r.publicServerUrl)} --project ${n(r.projectId)}`,T=(e,n=``)=>t(r.projectId,e,n);(0,P.useEffect)(()=>{let e=x.current;if(!e)return;if(!h&&!b){window.scrollTo(0,0);return}let t=``;try{t=decodeURIComponent(b.slice(1)).toLowerCase()}catch{}((t?[...e.querySelectorAll(`h1,h2,h3,h4,h5,h6`)].find(e=>e.textContent?.trim().toLowerCase().replace(/\s+/g,`-`)===t):void 0)??e).scrollIntoView({block:`start`})},[h,b]);function E(e,t){e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),i(t))}function D(e){return({children:t,href:n=``})=>{let r=B(n,e);if(!r||!r.path.endsWith(`.md`))return(0,I.jsx)(`a`,{href:r&&R.get(r.path)||n,target:`_blank`,rel:`noreferrer noopener`,children:t});let i=T(r.path,r.hash);return(0,I.jsx)(`a`,{href:i,onClick:e=>E(e,i),children:t})}}return(0,I.jsx)(
|
|
993
|
+
`,N=new URL(`workflow-h92qCEHO.svg`,import.meta.url).href,P=r(),F={sections:[{title:`开始使用`,documents:[{title:`新成员接入指南`,path:`getting-started/onboarding.md`},{title:`认识 Teammy`,path:`getting-started/overview.md`},{title:`安装与首次接入`,path:`getting-started/installation.md`}]},{title:`工作区与任务`,documents:[{title:`工作记录与任务看板`,path:`workspace/work-records.md`}]},{title:`对话与协作`,documents:[{title:`与 Tim 交流`,path:`conversations/talk-to-tim.md`},{title:`在企业微信中使用 Teammy`,path:`conversations/wecom.md`},{title:`代码仓库与 PR/MR 评审`,path:`conversations/code-review.md`}]},{title:`电脑与本地执行`,documents:[{title:`使用本地 Agent`,path:`computers/local-agent.md`},{title:`使用终端`,path:`computers/terminal.md`},{title:`让开发 Agent 使用 Teammy`,path:`computers/agent-integration.md`}]},{title:`资料与经验`,documents:[{title:`资料、记忆与会话库`,path:`resources/library.md`}]},{title:`设置与维护`,documents:[{title:`项目与成员管理`,path:`settings/project-and-members.md`},{title:`消息与通知`,path:`settings/notifications.md`},{title:`模型接入与选择`,path:`settings/models.md`},{title:`客户端维护与同步`,path:`settings/client-maintenance.md`}]},{title:`问题排查`,documents:[{title:`常见问题`,path:`troubleshooting/common-issues.md`}]},{title:`Changelog`,documents:[{title:`版本更新`,path:`changelog.md`}]}]},I=i(),L=new Map(Object.entries(Object.assign({"../../../../docs/help/README.md":h,"../../../../docs/help/changelog.md":g,"../../../../docs/help/computers/agent-integration.md":_,"../../../../docs/help/computers/local-agent.md":v,"../../../../docs/help/computers/terminal.md":y,"../../../../docs/help/conversations/code-review.md":b,"../../../../docs/help/conversations/talk-to-tim.md":x,"../../../../docs/help/conversations/wecom.md":S,"../../../../docs/help/getting-started/installation.md":C,"../../../../docs/help/getting-started/onboarding.md":w,"../../../../docs/help/getting-started/overview.md":T,"../../../../docs/help/resources/library.md":E,"../../../../docs/help/settings/client-maintenance.md":D,"../../../../docs/help/settings/models.md":O,"../../../../docs/help/settings/notifications.md":k,"../../../../docs/help/settings/project-and-members.md":A,"../../../../docs/help/troubleshooting/common-issues.md":j,"../../../../docs/help/workspace/work-records.md":M})).map(([e,t])=>[e.slice(22),t])),R=new Map(Object.entries(Object.assign({"../../../../docs/help/assets/workflow.svg":N})).map(([e,t])=>[e.slice(22),t])),z=F.sections.flatMap(e=>e.documents)[0]??{title:`帮助`,path:`README.md`};function B(e,t){if(!/^(?:[a-z][a-z\d+.-]*:|\/)/i.test(e))try{let n=new URL(e,`https://help.invalid/${t}`);return{path:decodeURIComponent(n.pathname.slice(1)),hash:n.hash}}catch{}}function V({config:r,navigate:i}){let h=new URLSearchParams(location.search).get(`doc`),g=h||z.path,_=L.get(g),v=_?.match(/^# [^\r\n]+(?:\r?\n|$)/)?.[0],y=F.sections.flatMap(e=>e.documents).find(e=>e.path===g)?.title,b=location.hash,x=(0,P.useRef)(null),S=c(),C=s(e.server,!0),w=`teammy connect --url ${n(C.data?.clientUrl??r.publicServerUrl)} --project ${n(r.projectId)}`,T=(e,n=``)=>t(r.projectId,e,n);(0,P.useEffect)(()=>{let e=x.current;if(!e)return;if(!h&&!b){window.scrollTo(0,0);return}let t=``;try{t=decodeURIComponent(b.slice(1)).toLowerCase()}catch{}((t?[...e.querySelectorAll(`h1,h2,h3,h4,h5,h6`)].find(e=>e.textContent?.trim().toLowerCase().replace(/\s+/g,`-`)===t):void 0)??e).scrollIntoView({block:`start`})},[h,b]);function E(e,t){e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),i(t))}function D(e){return({children:t,href:n=``})=>{let r=B(n,e);if(!r||!r.path.endsWith(`.md`))return(0,I.jsx)(`a`,{href:r&&R.get(r.path)||n,target:`_blank`,rel:`noreferrer noopener`,children:t});let i=T(r.path,r.hash);return(0,I.jsx)(`a`,{href:i,onClick:e=>E(e,i),children:t})}}return(0,I.jsx)(u,{reading:!0,className:`help-explorer`,label:`帮助目录`,navigation:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(d,{title:`帮助`}),(0,I.jsx)(`nav`,{className:`help-navigation`,"aria-label":`帮助文档`,children:F.sections.map(e=>(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h2`,{children:e.title}),(0,I.jsx)(`ul`,{children:e.documents.map(e=>(0,I.jsx)(`li`,{children:(0,I.jsx)(l,{href:T(e.path),"aria-current":g===e.path?`page`:void 0,onClick:t=>E(t,T(e.path)),children:e.title})},e.path))})]},e.title))})]}),children:(0,I.jsxs)(`section`,{className:`session-reader`,"aria-label":`帮助内容`,ref:x,"data-testid":_?`help-content`:void 0,children:[(0,I.jsx)(f,{title:v?(0,I.jsx)(m,{children:v}):y||`帮助文档`}),_?(0,I.jsxs)(`article`,{className:`session-reader-content markdown`,children:[g===`getting-started/onboarding.md`&&(0,I.jsx)(p,{}),(0,I.jsx)(m,{components:{a:D(g),img:({src:e,alt:t})=>{let n=typeof e==`string`?B(e,g):void 0;return(0,I.jsx)(`img`,{src:n&&R.get(n.path)||e,alt:t,loading:`lazy`})},p:({children:e,node:t})=>t?.children.some(e=>e.type===`element`&&e.tagName===`code`&&e.children[0]?.type===`text`&&e.children[0].value===`{{TEAMMY_CLIENT_VERSION}}`)&&(!S.data||S.error)?(0,I.jsx)(`p`,{role:`status`,children:S.error?`暂时无法获取最新版客户端版本,如出现问题,请安装更新到最新版。`:`正在查询最新版客户端版本…`}):(0,I.jsx)(`p`,{children:e}),code:({children:e,className:t})=>(0,I.jsx)(`code`,{className:t,children:e===`{{TEAMMY_CLIENT_VERSION}}`?S.data?.version:e}),pre:({children:e,node:t})=>{let n=t?.children[0];return n?.type===`element`&&n.tagName===`code`&&n.children.length===1&&n.children[0]?.type===`text`&&n.children[0].value.trim()===`{{TEAMMY_CONNECT_COMMAND}}`?(0,I.jsx)(a,{id:`help-connect-command`,label:`连接命令`,value:w},w):(0,I.jsx)(`pre`,{children:e})}},children:_.slice(v?.length??0)})]}):(0,I.jsxs)(`div`,{className:`reader-body`,children:[(0,I.jsx)(o,{title:`未找到这篇帮助文档`}),(0,I.jsxs)(`a`,{href:T(z.path),onClick:e=>E(e,T(z.path)),children:[`返回`,z.title]})]})]})})}export{V as Help};
|