lensmcp 1.23.13 → 1.24.0
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/bundled/bridge.js +27 -27
- package/bundled/capture-runner.js +26 -26
- package/bundled/dashboard-ui/app.css +1 -1
- package/bundled/dashboard-ui/app.js +17 -17
- package/bundled/dashboard.js +98 -64
- package/bundled/lint-runner.js +3 -3
- package/bundled/main.js +43 -40
- package/bundled/shim.js +47 -43
- package/lib/bridge-origins.d.ts +16 -0
- package/lib/bridge-origins.js +1 -0
- package/lib/cli.js +53 -42
- package/lib/dashboard-login.d.ts +17 -0
- package/lib/dashboard-login.js +3 -0
- package/lib/duplicate-registration.d.ts +6 -3
- package/lib/duplicate-registration.js +1 -1
- package/lib/forward-signals.d.ts +24 -0
- package/lib/forward-signals.js +1 -0
- package/lib/guest-graph.d.ts +44 -0
- package/lib/guest-graph.js +4 -0
- package/lib/heap-analyzer-main.d.ts +1 -0
- package/lib/heap-analyzer-main.js +3 -0
- package/lib/heap-analyzer.d.ts +109 -0
- package/lib/heap-analyzer.js +1 -0
- package/lib/lint-args.d.ts +1 -1
- package/lib/mcp-mode.d.ts +92 -10
- package/lib/mcp-mode.js +3 -2
- package/lib/mcp-restart.d.ts +20 -1
- package/lib/mcp-restart.js +1 -1
- package/lib/mcp-sessions.d.ts +20 -0
- package/lib/mcp-sessions.js +2 -0
- package/lib/mcp-token.d.ts +48 -0
- package/lib/mcp-token.js +4 -0
- package/lib/mcp-wiring.d.ts +20 -5
- package/lib/mcp-wiring.js +2 -2
- package/lib/mem-command.d.ts +106 -0
- package/lib/mem-command.js +3 -0
- package/lib/perf-rules-check.d.ts +35 -0
- package/lib/perf-rules-check.js +4 -0
- package/lib/pod-source-maps.d.ts +31 -0
- package/lib/pod-source-maps.js +1 -0
- package/lib/process-ownership.d.ts +30 -0
- package/lib/process-ownership.js +2 -0
- package/lib/server-bundle.d.ts +19 -0
- package/lib/server-bundle.js +5 -0
- package/lib/status-client.d.ts +4 -1
- package/lib/status-client.js +2 -2
- package/lib/sweep.d.ts +15 -0
- package/lib/sweep.js +1 -1
- package/lib/workspace-scope.d.ts +26 -9
- package/package.json +4 -4
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/scripts/dashboard-open.sh +26 -6
- package/plugin/skills/dashboard/SKILL.md +3 -1
- package/plugin/skills/using-lensmcp/SKILL.md +27 -0
- package/plugin/skills/using-lensmcp/rules/bundle-heavy-barrel-import.md +79 -0
- package/plugin/skills/using-lensmcp/rules/pod-heap-budget.md +53 -0
- package/plugin/skills/using-lensmcp/rules/pod-retained-generation.md +38 -0
- package/plugins/lensmcp/.codex-plugin/plugin.json +1 -1
- package/plugins/lensmcp/skills/lensmcp-dashboard/SKILL.md +5 -2
- package/plugins/lensmcp/skills/using-lensmcp/SKILL.md +21 -0
- package/plugins/lensmcp/skills/using-lensmcp/rules/bundle-heavy-barrel-import.md +79 -0
- package/plugins/lensmcp/skills/using-lensmcp/rules/pod-heap-budget.md +53 -0
- package/plugins/lensmcp/skills/using-lensmcp/rules/pod-retained-generation.md +38 -0
package/bundled/dashboard.js
CHANGED
|
@@ -1,113 +1,118 @@
|
|
|
1
|
-
"use strict";var IE=Object.defineProperty;var s=(e,t)=>IE(e,"name",{value:t,configurable:!0});var um=Object.defineProperty,o=s((e,t)=>um(e,"name",{value:t,configurable:!0}),"a"),Ge=s((e,t)=>{for(var r in t)um(e,r,{get:t[r],enumerable:!0})},"at");import"reflect-metadata";import{createHash as _E}from"node:crypto";import{existsSync as rm,readFileSync as nm,statSync as im}from"node:fs";import{createServer as SE}from"node:http";import{basename as FE}from"node:path";var sm="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function am(e,t){let r="",i=e;for(let u=t-1;u>=0;u--){let n=i%32;r=sm[n]+r,i=(i-n)/32}return r}s(am,"tk"),o(am,"encodeTime");function om(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let i=0;i<e;i++)r+=sm[(t[i]??0)&31];return r}s(om,"rk"),o(om,"encodeRandom");function tt(e=Date.now()){return am(e,10)+om(16)}s(tt,"Me"),o(tt,"ulid");var jE=class{static{s(this,"No")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let i=r.handler(t);i&&typeof i.then=="function"&&i.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},Wt="REDACTED",zE=["token","secret","password","passwd","apikey","credential","assertion","signature"],NE=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),OE=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function Us(e){let t=e.toLowerCase();if(OE.test(t.replace(/[-_.]+/g,"")))return!1;if(zE.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&NE.has(r))return!0;return!1}s(Us,"Hy"),o(Us,"isSecretParam");var RE=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,TE=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function lm(e){return e&&e.replace(RE,`$1${Wt}@`).replace(TE,(t,r,i)=>Us(i)?`${r}${i}=${Wt}`:t)}s(lm,"ck"),o(lm,"redactUrlParams");var ME=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,PE=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,UE=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function ut(e){return lm(e).replace(UE,(t,r,i,u)=>`${r}${i}${u}${Wt}${u}`).replace(ME,Wt).replace(PE,(t,r)=>`${r} ${Wt}`)}s(ut,"ct"),o(ut,"redactText");function Zs(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(Zs,"Yy"),o(Zs,"clip");function dm(e,t=4096){if(e!==void 0)return Zs(ut(e),t)}s(dm,"Qy"),o(dm,"safeText");function cm(e){return Zs(ut(e),300)}s(cm,"eb"),o(cm,"safeTitle");var ZE=6,qE=64,LE=/^TS\d{1,5}$/,JE=o((e,t)=>e==="code"&&typeof t=="string"&&LE.test(t),"isDiagnosticCode");function Su(e,t=0,r=ZE){if(typeof e=="string")return ut(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let n=!1,a=e.map((l,d)=>{if(d>=qE)return l;let c=Su(l,t+1,r);return c!==l&&(n=!0),c});return n?a:e}let i=!1,u={};for(let[n,a]of Object.entries(e)){let l=Us(n)&&a!==void 0&&a!==null&&!JE(n,a)?Wt:Su(a,t+1,r);l!==a&&(i=!0),u[n]=l}return i?u:e}s(Su,"cr"),o(Su,"redactDeep");var VE=12;function pm(e={}){let t=e.maxDepth??VE,r=0,i=0;return{redact(u){r+=1;let n=u.title===void 0?void 0:cm(ut(u.title)),a=u.message===void 0?void 0:dm(ut(u.message),4096),l=u.raw===void 0?void 0:Su(u.raw,0,t),d=n!==u.title,c=a!==u.message,p=l!==u.raw;return!d&&!c&&!p?u:(i+=1,{...u,...n!==void 0?{title:n}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:i}),"stats"),reset:o(()=>{r=0,i=0},"reset")}}s(pm,"tb"),o(pm,"createEventRedactor");var WE=class{static{s(this,"Do")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),i=JSON.stringify(r);if(i===t.lastJson)return;t.lastJson=i,t.revision+=1;let u=this.subs.get(e);if(u)for(let n of u)try{n(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},mm=class{static{s(this,"ur")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let i={...r,...t,id:r.id};return this.nodes.set(e,i),i}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],i=e.direction??"both",u=e.depth??4,n=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=n);){let{id:c,d:p}=d.shift();if(!a.has(c)&&(a.add(c),!(p>=u)))for(let h of r){if(i==="out"||i==="both"){let m=this.outByAxis.get(h)?.get(c);if(m)for(let f of m){l.add(f);let g=this.edges.get(f);a.has(g.to)||d.push({id:g.to,d:p+1})}}if(i==="in"||i==="both"){let m=this.inByAxis.get(h)?.get(c);if(m)for(let f of m){l.add(f);let g=this.edges.get(f);a.has(g.from)||d.push({id:g.from,d:p+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(c=>this.edges.get(c)).filter(c=>!!c)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let i=this.nodes.get(r);i&&t.push(i)}return t}};function fm(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(fm,"yk"),o(fm,"fnv1a32");function hm(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${fm(t.join("|"))}`}s(hm,"rb"),o(hm,"fingerprint");var GE=class{static{s(this,"Po")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function qs(e,t={}){let r,i;if(t.flowId)i=t.flowId,r=e.filter(h=>h.context.flowId===i);else{let h=e.find(m=>m.context.flowId);if(!h)return;i=h.context.flowId,r=e.filter(m=>m.context.flowId===i)}if(r.length===0)return;r.sort((h,m)=>h.timestamp-m.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let n=r[0],a=[],l,d;for(let h of r){let m=gm(h);if(m){if(a.push(m),m.kind==="render"||m.kind==="final-render"){let f=h.raw;f?.render&&(l={id:f.render.id,page:f.render.page,route:f.render.route,componentName:f.render.componentName})}else if(h.source==="visual"&&m.kind==="visual-violation"){let f=h.raw;f?.frame&&(d=f.frame.id)}}}for(let h=a.length-1;h>=0;h--)if(a[h].kind==="render"){a[h]={...a[h],kind:"final-render"};break}let c=r[0].timestamp,p=r[r.length-1].timestamp;return{flowId:i,origin:{type:n.context.originType,nodeId:n.context.originNodeId,at:n.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:c,endedAt:p,eventCount:r.length}}s(qs,"Mo"),o(qs,"compileStory");function gm(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,i=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(i)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${i}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(gm,"bk"),o(gm,"classifyEvent");var v={};Ge(v,{$brand:s(()=>bm,"$brand"),$input:s(()=>tg,"$input"),$output:s(()=>eg,"$output"),NEVER:s(()=>Em,"NEVER"),TimePrecision:s(()=>rg,"TimePrecision"),ZodAny:s(()=>P0,"ZodAny"),ZodArray:s(()=>W0,"ZodArray"),ZodBase64:s(()=>ti,"ZodBase64"),ZodBase64URL:s(()=>ui,"ZodBase64URL"),ZodBigInt:s(()=>gr,"ZodBigInt"),ZodBigIntFormat:s(()=>ai,"ZodBigIntFormat"),ZodBoolean:s(()=>hr,"ZodBoolean"),ZodCIDRv4:s(()=>Qn,"ZodCIDRv4"),ZodCIDRv6:s(()=>ei,"ZodCIDRv6"),ZodCUID:s(()=>Vn,"ZodCUID"),ZodCUID2:s(()=>Wn,"ZodCUID2"),ZodCatch:s(()=>$l,"ZodCatch"),ZodCodec:s(()=>xr,"ZodCodec"),ZodCustom:s(()=>kr,"ZodCustom"),ZodCustomStringFormat:s(()=>iu,"ZodCustomStringFormat"),ZodDate:s(()=>li,"ZodDate"),ZodDefault:s(()=>El,"ZodDefault"),ZodDiscriminatedUnion:s(()=>el,"ZodDiscriminatedUnion"),ZodE164:s(()=>ri,"ZodE164"),ZodEmail:s(()=>qn,"ZodEmail"),ZodEmoji:s(()=>Ln,"ZodEmoji"),ZodEnum:s(()=>ou,"ZodEnum"),ZodError:s(()=>Sb,"ZodError"),ZodExactOptional:s(()=>gl,"ZodExactOptional"),ZodFile:s(()=>ml,"ZodFile"),ZodFirstPartyTypeKind:s(()=>Ul,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>Nl,"ZodFunction"),ZodGUID:s(()=>cr,"ZodGUID"),ZodIPv4:s(()=>Xn,"ZodIPv4"),ZodIPv6:s(()=>Yn,"ZodIPv6"),ZodISODate:s(()=>Wo,"ZodISODate"),ZodISODateTime:s(()=>Jo,"ZodISODateTime"),ZodISODuration:s(()=>Xo,"ZodISODuration"),ZodISOTime:s(()=>Ko,"ZodISOTime"),ZodIntersection:s(()=>ul,"ZodIntersection"),ZodIssueCode:s(()=>Fb,"ZodIssueCode"),ZodJWT:s(()=>ni,"ZodJWT"),ZodKSUID:s(()=>Hn,"ZodKSUID"),ZodLazy:s(()=>Fl,"ZodLazy"),ZodLiteral:s(()=>cl,"ZodLiteral"),ZodMAC:s(()=>h0,"ZodMAC"),ZodMap:s(()=>sl,"ZodMap"),ZodNaN:s(()=>Bl,"ZodNaN"),ZodNanoID:s(()=>Jn,"ZodNanoID"),ZodNever:s(()=>q0,"ZodNever"),ZodNonOptional:s(()=>vi,"ZodNonOptional"),ZodNull:s(()=>M0,"ZodNull"),ZodNullable:s(()=>vl,"ZodNullable"),ZodNumber:s(()=>mr,"ZodNumber"),ZodNumberFormat:s(()=>zt,"ZodNumberFormat"),ZodObject:s(()=>yr,"ZodObject"),ZodOptional:s(()=>mi,"ZodOptional"),ZodPipe:s(()=>$r,"ZodPipe"),ZodPrefault:s(()=>bl,"ZodPrefault"),ZodPreprocess:s(()=>Al,"ZodPreprocess"),ZodPromise:s(()=>jl,"ZodPromise"),ZodReadonly:s(()=>Il,"ZodReadonly"),ZodRealError:s(()=>Fe,"ZodRealError"),ZodRecord:s(()=>au,"ZodRecord"),ZodSet:s(()=>ol,"ZodSet"),ZodString:s(()=>dr,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>Dl,"ZodSuccess"),ZodSymbol:s(()=>N0,"ZodSymbol"),ZodTemplateLiteral:s(()=>_l,"ZodTemplateLiteral"),ZodTransform:s(()=>hl,"ZodTransform"),ZodTuple:s(()=>rl,"ZodTuple"),ZodType:s(()=>Y,"ZodType"),ZodULID:s(()=>Gn,"ZodULID"),ZodURL:s(()=>pr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>R0,"ZodUndefined"),ZodUnion:s(()=>Er,"ZodUnion"),ZodUnknown:s(()=>Z0,"ZodUnknown"),ZodVoid:s(()=>L0,"ZodVoid"),ZodXID:s(()=>Kn,"ZodXID"),ZodXor:s(()=>Y0,"ZodXor"),_ZodString:s(()=>Zn,"_ZodString"),_default:s(()=>hi,"_default"),_function:s(()=>Cr,"_function"),any:s(()=>U0,"any"),array:s(()=>su,"array"),base64:s(()=>b0,"base64"),base64url:s(()=>D0,"base64url"),bigint:s(()=>F0,"bigint"),boolean:s(()=>si,"boolean"),catch:s(()=>Ei,"catch"),check:s(()=>Ol,"check"),cidrv4:s(()=>y0,"cidrv4"),cidrv6:s(()=>E0,"cidrv6"),clone:s(()=>Ae,"clone"),codec:s(()=>Cl,"codec"),coerce:s(()=>Nv,"coerce"),config:s(()=>Ee,"config"),core:s(()=>vm,"core"),cuid:s(()=>l0,"cuid"),cuid2:s(()=>d0,"cuid2"),custom:s(()=>Rl,"custom"),date:s(()=>V0,"date"),decode:s(()=>Ev,"decode"),decodeAsync:s(()=>Dv,"decodeAsync"),describe:s(()=>kv,"describe"),discriminatedUnion:s(()=>tl,"discriminatedUnion"),e164:s(()=>w0,"e164"),email:s(()=>Qo,"email"),emoji:s(()=>a0,"emoji"),encode:s(()=>yv,"encode"),encodeAsync:s(()=>bv,"encodeAsync"),endsWith:s(()=>ur,"endsWith"),enum:s(()=>Dr,"enum"),exactOptional:s(()=>fi,"exactOptional"),file:s(()=>fl,"file"),flattenError:s(()=>cn,"flattenError"),float32:s(()=>A0,"float32"),float64:s(()=>I0,"float64"),formatError:s(()=>pn,"formatError"),fromJSONSchema:s(()=>zv,"fromJSONSchema"),function:s(()=>Cr,"function"),getErrorMap:s(()=>Sv,"getErrorMap"),globalRegistry:s(()=>Ne,"globalRegistry"),gt:s(()=>Xe,"gt"),gte:s(()=>Be,"gte"),guid:s(()=>e0,"guid"),hash:s(()=>k0,"hash"),hex:s(()=>C0,"hex"),hostname:s(()=>x0,"hostname"),httpUrl:s(()=>s0,"httpUrl"),includes:s(()=>er,"includes"),instanceof:s(()=>Tl,"instanceof"),int:s(()=>fr,"int"),int32:s(()=>_0,"int32"),int64:s(()=>j0,"int64"),intersection:s(()=>di,"intersection"),invertCodec:s(()=>kl,"invertCodec"),ipv4:s(()=>f0,"ipv4"),ipv6:s(()=>v0,"ipv6"),iso:s(()=>Lo,"iso"),json:s(()=>Ml,"json"),jwt:s(()=>$0,"jwt"),keyof:s(()=>G0,"keyof"),ksuid:s(()=>m0,"ksuid"),lazy:s(()=>Di,"lazy"),length:s(()=>tu,"length"),literal:s(()=>pl,"literal"),locales:s(()=>Va,"locales"),looseObject:s(()=>X0,"looseObject"),looseRecord:s(()=>il,"looseRecord"),lowercase:s(()=>Yu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Se,"lte"),mac:s(()=>g0,"mac"),map:s(()=>al,"map"),maxLength:s(()=>eu,"maxLength"),maxSize:s(()=>_t,"maxSize"),meta:s(()=>Av,"meta"),mime:s(()=>rr,"mime"),minLength:s(()=>at,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>It,"multipleOf"),nan:s(()=>xl,"nan"),nanoid:s(()=>o0,"nanoid"),nativeEnum:s(()=>dl,"nativeEnum"),negative:s(()=>Tn,"negative"),never:s(()=>vr,"never"),nonnegative:s(()=>Pn,"nonnegative"),nonoptional:s(()=>yi,"nonoptional"),nonpositive:s(()=>Mn,"nonpositive"),normalize:s(()=>nr,"normalize"),null:s(()=>oi,"null"),nullable:s(()=>du,"nullable"),nullish:s(()=>yl,"nullish"),number:s(()=>ii,"number"),object:s(()=>K0,"object"),optional:s(()=>lu,"optional"),overwrite:s(()=>Ze,"overwrite"),parse:s(()=>fv,"parse"),parseAsync:s(()=>hv,"parseAsync"),partialRecord:s(()=>nl,"partialRecord"),pipe:s(()=>Br,"pipe"),positive:s(()=>Rn,"positive"),prefault:s(()=>gi,"prefault"),preprocess:s(()=>Pl,"preprocess"),prettifyError:s(()=>ta,"prettifyError"),promise:s(()=>zl,"promise"),property:s(()=>Un,"property"),readonly:s(()=>bi,"readonly"),record:s(()=>pi,"record"),refine:s(()=>wi,"refine"),regex:s(()=>Xu,"regex"),regexes:s(()=>st,"regexes"),registry:s(()=>gn,"registry"),safeDecode:s(()=>$v,"safeDecode"),safeDecodeAsync:s(()=>xv,"safeDecodeAsync"),safeEncode:s(()=>wv,"safeEncode"),safeEncodeAsync:s(()=>Bv,"safeEncodeAsync"),safeParse:s(()=>gv,"safeParse"),safeParseAsync:s(()=>vv,"safeParseAsync"),set:s(()=>ll,"set"),setErrorMap:s(()=>_v,"setErrorMap"),size:s(()=>Qt,"size"),slugify:s(()=>or,"slugify"),startsWith:s(()=>tr,"startsWith"),strictObject:s(()=>H0,"strictObject"),string:s(()=>nu,"string"),stringFormat:s(()=>B0,"stringFormat"),stringbool:s(()=>Iv,"stringbool"),success:s(()=>wl,"success"),superRefine:s(()=>$i,"superRefine"),symbol:s(()=>O0,"symbol"),templateLiteral:s(()=>Sl,"templateLiteral"),toJSONSchema:s(()=>qo,"toJSONSchema"),toLowerCase:s(()=>sr,"toLowerCase"),toUpperCase:s(()=>ar,"toUpperCase"),transform:s(()=>wr,"transform"),treeifyError:s(()=>Qs,"treeifyError"),trim:s(()=>ir,"trim"),tuple:s(()=>ci,"tuple"),uint32:s(()=>S0,"uint32"),uint64:s(()=>z0,"uint64"),ulid:s(()=>c0,"ulid"),undefined:s(()=>T0,"undefined"),union:s(()=>br,"union"),unknown:s(()=>ot,"unknown"),uppercase:s(()=>Qu,"uppercase"),url:s(()=>i0,"url"),util:s(()=>te,"util"),uuid:s(()=>t0,"uuid"),uuidv4:s(()=>u0,"uuidv4"),uuidv6:s(()=>r0,"uuidv6"),uuidv7:s(()=>n0,"uuidv7"),void:s(()=>J0,"void"),xid:s(()=>p0,"xid"),xor:s(()=>Q0,"xor")});var vm={};Ge(vm,{$ZodAny:s(()=>xf,"$ZodAny"),$ZodArray:s(()=>_f,"$ZodArray"),$ZodAsyncError:s(()=>Ct,"$ZodAsyncError"),$ZodBase64:s(()=>hf,"$ZodBase64"),$ZodBase64URL:s(()=>gf,"$ZodBase64URL"),$ZodBigInt:s(()=>xa,"$ZodBigInt"),$ZodBigIntFormat:s(()=>Df,"$ZodBigIntFormat"),$ZodBoolean:s(()=>Ba,"$ZodBoolean"),$ZodCIDRv4:s(()=>mf,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>ff,"$ZodCIDRv6"),$ZodCUID:s(()=>ef,"$ZodCUID"),$ZodCUID2:s(()=>tf,"$ZodCUID2"),$ZodCatch:s(()=>Kf,"$ZodCatch"),$ZodCheck:s(()=>oe,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>_4,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>Z4,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>Ea,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>P4,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>O4,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>ya,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>T4,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>z4,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>S4,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>L4,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>N4,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>F4,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>A4,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>I4,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>J4,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>q4,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>R4,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>j4,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>U4,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>Zu,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>M4,"$ZodCheckUpperCase"),$ZodCodec:s(()=>qa,"$ZodCodec"),$ZodCustom:s(()=>rh,"$ZodCustom"),$ZodCustomStringFormat:s(()=>Ef,"$ZodCustomStringFormat"),$ZodDate:s(()=>If,"$ZodDate"),$ZodDefault:s(()=>Jf,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>zf,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>vf,"$ZodE164"),$ZodEmail:s(()=>H4,"$ZodEmail"),$ZodEmoji:s(()=>Y4,"$ZodEmoji"),$ZodEncodeError:s(()=>an,"$ZodEncodeError"),$ZodEnum:s(()=>Mf,"$ZodEnum"),$ZodError:s(()=>Ys,"$ZodError"),$ZodExactOptional:s(()=>qf,"$ZodExactOptional"),$ZodFile:s(()=>Uf,"$ZodFile"),$ZodFunction:s(()=>eh,"$ZodFunction"),$ZodGUID:s(()=>G4,"$ZodGUID"),$ZodIPv4:s(()=>df,"$ZodIPv4"),$ZodIPv6:s(()=>cf,"$ZodIPv6"),$ZodISODate:s(()=>af,"$ZodISODate"),$ZodISODateTime:s(()=>sf,"$ZodISODateTime"),$ZodISODuration:s(()=>lf,"$ZodISODuration"),$ZodISOTime:s(()=>of,"$ZodISOTime"),$ZodIntersection:s(()=>Nf,"$ZodIntersection"),$ZodJWT:s(()=>yf,"$ZodJWT"),$ZodKSUID:s(()=>nf,"$ZodKSUID"),$ZodLazy:s(()=>uh,"$ZodLazy"),$ZodLiteral:s(()=>Pf,"$ZodLiteral"),$ZodMAC:s(()=>pf,"$ZodMAC"),$ZodMap:s(()=>Rf,"$ZodMap"),$ZodNaN:s(()=>Hf,"$ZodNaN"),$ZodNanoID:s(()=>Q4,"$ZodNanoID"),$ZodNever:s(()=>kf,"$ZodNever"),$ZodNonOptional:s(()=>Wf,"$ZodNonOptional"),$ZodNull:s(()=>Bf,"$ZodNull"),$ZodNullable:s(()=>Lf,"$ZodNullable"),$ZodNumber:s(()=>$a,"$ZodNumber"),$ZodNumberFormat:s(()=>bf,"$ZodNumberFormat"),$ZodObject:s(()=>Sf,"$ZodObject"),$ZodObjectJIT:s(()=>Ff,"$ZodObjectJIT"),$ZodOptional:s(()=>Ma,"$ZodOptional"),$ZodPipe:s(()=>Za,"$ZodPipe"),$ZodPrefault:s(()=>Vf,"$ZodPrefault"),$ZodPreprocess:s(()=>Xf,"$ZodPreprocess"),$ZodPromise:s(()=>th,"$ZodPromise"),$ZodReadonly:s(()=>Yf,"$ZodReadonly"),$ZodRealError:s(()=>_e,"$ZodRealError"),$ZodRecord:s(()=>Of,"$ZodRecord"),$ZodRegistry:s(()=>ug,"$ZodRegistry"),$ZodSet:s(()=>Tf,"$ZodSet"),$ZodString:s(()=>qu,"$ZodString"),$ZodStringFormat:s(()=>se,"$ZodStringFormat"),$ZodSuccess:s(()=>Gf,"$ZodSuccess"),$ZodSymbol:s(()=>wf,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>Qf,"$ZodTemplateLiteral"),$ZodTransform:s(()=>Zf,"$ZodTransform"),$ZodTuple:s(()=>Fa,"$ZodTuple"),$ZodType:s(()=>H,"$ZodType"),$ZodULID:s(()=>uf,"$ZodULID"),$ZodURL:s(()=>X4,"$ZodURL"),$ZodUUID:s(()=>K4,"$ZodUUID"),$ZodUndefined:s(()=>$f,"$ZodUndefined"),$ZodUnion:s(()=>fn,"$ZodUnion"),$ZodUnknown:s(()=>Cf,"$ZodUnknown"),$ZodVoid:s(()=>Af,"$ZodVoid"),$ZodXID:s(()=>rf,"$ZodXID"),$ZodXor:s(()=>jf,"$ZodXor"),$brand:s(()=>bm,"$brand"),$constructor:s(()=>w,"$constructor"),$input:s(()=>tg,"$input"),$output:s(()=>eg,"$output"),Doc:s(()=>V4,"Doc"),JSONSchema:s(()=>_b,"JSONSchema"),JSONSchemaGenerator:s(()=>Ib,"JSONSchemaGenerator"),NEVER:s(()=>Em,"NEVER"),TimePrecision:s(()=>rg,"TimePrecision"),_any:s(()=>Bo,"_any"),_array:s(()=>So,"_array"),_base64:s(()=>jn,"_base64"),_base64url:s(()=>zn,"_base64url"),_bigint:s(()=>vo,"_bigint"),_boolean:s(()=>ho,"_boolean"),_catch:s(()=>Dg,"_catch"),_check:s(()=>Oo,"_check"),_cidrv4:s(()=>Sn,"_cidrv4"),_cidrv6:s(()=>Fn,"_cidrv6"),_coercedBigint:s(()=>yo,"_coercedBigint"),_coercedBoolean:s(()=>go,"_coercedBoolean"),_coercedDate:s(()=>Io,"_coercedDate"),_coercedNumber:s(()=>oo,"_coercedNumber"),_coercedString:s(()=>to,"_coercedString"),_cuid:s(()=>Bn,"_cuid"),_cuid2:s(()=>xn,"_cuid2"),_custom:s(()=>jo,"_custom"),_date:s(()=>Ao,"_date"),_decode:s(()=>ia,"_decode"),_decodeAsync:s(()=>aa,"_decodeAsync"),_default:s(()=>yg,"_default"),_discriminatedUnion:s(()=>sg,"_discriminatedUnion"),_e164:s(()=>Nn,"_e164"),_email:s(()=>vn,"_email"),_emoji:s(()=>wn,"_emoji"),_encode:s(()=>na,"_encode"),_encodeAsync:s(()=>sa,"_encodeAsync"),_endsWith:s(()=>ur,"_endsWith"),_enum:s(()=>pg,"_enum"),_file:s(()=>Fo,"_file"),_float32:s(()=>co,"_float32"),_float64:s(()=>po,"_float64"),_gt:s(()=>Xe,"_gt"),_gte:s(()=>Be,"_gte"),_guid:s(()=>Ku,"_guid"),_includes:s(()=>er,"_includes"),_int:s(()=>lo,"_int"),_int32:s(()=>mo,"_int32"),_int64:s(()=>Eo,"_int64"),_intersection:s(()=>ag,"_intersection"),_ipv4:s(()=>In,"_ipv4"),_ipv6:s(()=>_n,"_ipv6"),_isoDate:s(()=>no,"_isoDate"),_isoDateTime:s(()=>ro,"_isoDateTime"),_isoDuration:s(()=>so,"_isoDuration"),_isoTime:s(()=>io,"_isoTime"),_jwt:s(()=>On,"_jwt"),_ksuid:s(()=>An,"_ksuid"),_lazy:s(()=>xg,"_lazy"),_length:s(()=>tu,"_length"),_literal:s(()=>fg,"_literal"),_lowercase:s(()=>Yu,"_lowercase"),_lt:s(()=>He,"_lt"),_lte:s(()=>Se,"_lte"),_mac:s(()=>uo,"_mac"),_map:s(()=>dg,"_map"),_max:s(()=>Se,"_max"),_maxLength:s(()=>eu,"_maxLength"),_maxSize:s(()=>_t,"_maxSize"),_mime:s(()=>rr,"_mime"),_min:s(()=>Be,"_min"),_minLength:s(()=>at,"_minLength"),_minSize:s(()=>Ye,"_minSize"),_multipleOf:s(()=>It,"_multipleOf"),_nan:s(()=>_o,"_nan"),_nanoid:s(()=>$n,"_nanoid"),_nativeEnum:s(()=>mg,"_nativeEnum"),_negative:s(()=>Tn,"_negative"),_never:s(()=>Co,"_never"),_nonnegative:s(()=>Pn,"_nonnegative"),_nonoptional:s(()=>Eg,"_nonoptional"),_nonpositive:s(()=>Mn,"_nonpositive"),_normalize:s(()=>nr,"_normalize"),_null:s(()=>$o,"_null"),_nullable:s(()=>vg,"_nullable"),_number:s(()=>ao,"_number"),_optional:s(()=>gg,"_optional"),_overwrite:s(()=>Ze,"_overwrite"),_parse:s(()=>Tu,"_parse"),_parseAsync:s(()=>Mu,"_parseAsync"),_pipe:s(()=>wg,"_pipe"),_positive:s(()=>Rn,"_positive"),_promise:s(()=>Cg,"_promise"),_property:s(()=>Un,"_property"),_readonly:s(()=>$g,"_readonly"),_record:s(()=>lg,"_record"),_refine:s(()=>zo,"_refine"),_regex:s(()=>Xu,"_regex"),_safeDecode:s(()=>la,"_safeDecode"),_safeDecodeAsync:s(()=>ca,"_safeDecodeAsync"),_safeEncode:s(()=>oa,"_safeEncode"),_safeEncodeAsync:s(()=>da,"_safeEncodeAsync"),_safeParse:s(()=>Pu,"_safeParse"),_safeParseAsync:s(()=>Uu,"_safeParseAsync"),_set:s(()=>cg,"_set"),_size:s(()=>Qt,"_size"),_slugify:s(()=>or,"_slugify"),_startsWith:s(()=>tr,"_startsWith"),_string:s(()=>eo,"_string"),_stringFormat:s(()=>uu,"_stringFormat"),_stringbool:s(()=>Mo,"_stringbool"),_success:s(()=>bg,"_success"),_superRefine:s(()=>No,"_superRefine"),_symbol:s(()=>Do,"_symbol"),_templateLiteral:s(()=>Bg,"_templateLiteral"),_toLowerCase:s(()=>sr,"_toLowerCase"),_toUpperCase:s(()=>ar,"_toUpperCase"),_transform:s(()=>hg,"_transform"),_trim:s(()=>ir,"_trim"),_tuple:s(()=>og,"_tuple"),_uint32:s(()=>fo,"_uint32"),_uint64:s(()=>bo,"_uint64"),_ulid:s(()=>Cn,"_ulid"),_undefined:s(()=>wo,"_undefined"),_union:s(()=>ng,"_union"),_unknown:s(()=>xo,"_unknown"),_uppercase:s(()=>Qu,"_uppercase"),_url:s(()=>Hu,"_url"),_uuid:s(()=>yn,"_uuid"),_uuidv4:s(()=>En,"_uuidv4"),_uuidv6:s(()=>bn,"_uuidv6"),_uuidv7:s(()=>Dn,"_uuidv7"),_void:s(()=>ko,"_void"),_xid:s(()=>kn,"_xid"),_xor:s(()=>ig,"_xor"),clone:s(()=>Ae,"clone"),config:s(()=>Ee,"config"),createStandardJSONSchemaMethod:s(()=>lr,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>kg,"createToJSONSchemaMethod"),decode:s(()=>YE,"decode"),decodeAsync:s(()=>e5,"decodeAsync"),describe:s(()=>Ro,"describe"),encode:s(()=>XE,"encode"),encodeAsync:s(()=>QE,"encodeAsync"),extractDefs:s(()=>Ft,"extractDefs"),finalize:s(()=>jt,"finalize"),flattenError:s(()=>cn,"flattenError"),formatError:s(()=>pn,"formatError"),globalConfig:s(()=>Fu,"globalConfig"),globalRegistry:s(()=>Ne,"globalRegistry"),initializeContext:s(()=>St,"initializeContext"),isValidBase64:s(()=>mn,"isValidBase64"),isValidBase64URL:s(()=>Da,"isValidBase64URL"),isValidJWT:s(()=>wa,"isValidJWT"),locales:s(()=>Va,"locales"),meta:s(()=>To,"meta"),parse:s(()=>ua,"parse"),parseAsync:s(()=>ra,"parseAsync"),prettifyError:s(()=>ta,"prettifyError"),process:s(()=>ne,"process"),regexes:s(()=>st,"regexes"),registry:s(()=>gn,"registry"),safeDecode:s(()=>u5,"safeDecode"),safeDecodeAsync:s(()=>n5,"safeDecodeAsync"),safeEncode:s(()=>t5,"safeEncode"),safeEncodeAsync:s(()=>r5,"safeEncodeAsync"),safeParse:s(()=>Xm,"safeParse"),safeParseAsync:s(()=>Ym,"safeParseAsync"),toDotPath:s(()=>ea,"toDotPath"),toJSONSchema:s(()=>qo,"toJSONSchema"),treeifyError:s(()=>Qs,"treeifyError"),util:s(()=>te,"util"),version:s(()=>W4,"version")});var ym,Em=Object.freeze({status:"aborted"});function w(e,t,r){function i(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let c=a.prototype,p=Object.keys(c);for(let h=0;h<p.length;h++){let m=p[h];m in l||(l[m]=c[m].bind(l))}}s(i,"o"),o(i,"init");let u=r?.Parent??Object;class n extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(n,"name",{value:e});function a(l){var d;let c=r?.Parent?new n:this;i(c,l),(d=c._zod).deferred??(d.deferred=[]);for(let p of c._zod.deferred)p();return c}return s(a,"s"),o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(w,"_"),o(w,"$constructor");var bm=Symbol("zod_brand"),Ct=class extends Error{static{s(this,"Ke")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},an=class extends Error{static{s(this,"gt")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(ym=globalThis).__zod_globalConfig??(ym.__zod_globalConfig={});var Fu=globalThis.__zod_globalConfig;function Ee(e){return e&&Object.assign(Fu,e),Fu}s(Ee,"le"),o(Ee,"config");var te={};Ge(te,{BIGINT_FORMAT_RANGES:s(()=>Rm,"BIGINT_FORMAT_RANGES"),Class:s(()=>HE,"Class"),NUMBER_FORMAT_RANGES:s(()=>Om,"NUMBER_FORMAT_RANGES"),aborted:s(()=>it,"aborted"),allowsEval:s(()=>Fm,"allowsEval"),assert:s(()=>xm,"assert"),assertEqual:s(()=>Dm,"assertEqual"),assertIs:s(()=>$m,"assertIs"),assertNever:s(()=>Bm,"assertNever"),assertNotEqual:s(()=>wm,"assertNotEqual"),assignProp:s(()=>Ke,"assignProp"),base64ToUint8Array:s(()=>Hs,"base64ToUint8Array"),base64urlToUint8Array:s(()=>Vm,"base64urlToUint8Array"),cached:s(()=>Gt,"cached"),captureStackTrace:s(()=>Vs,"captureStackTrace"),cleanEnum:s(()=>Jm,"cleanEnum"),cleanRegex:s(()=>zu,"cleanRegex"),clone:s(()=>Ae,"clone"),cloneDef:s(()=>Am,"cloneDef"),createTransparentProxy:s(()=>Nm,"createTransparentProxy"),defineLazy:s(()=>ee,"defineLazy"),esc:s(()=>ln,"esc"),escapeRegex:s(()=>Ue,"escapeRegex"),explicitlyAborted:s(()=>Ks,"explicitlyAborted"),extend:s(()=>Pm,"extend"),finalizeIssue:s(()=>xe,"finalizeIssue"),floatSafeRemainder:s(()=>Ls,"floatSafeRemainder"),getElementAtPath:s(()=>Im,"getElementAtPath"),getEnumValues:s(()=>on,"getEnumValues"),getLengthableOrigin:s(()=>Ou,"getLengthableOrigin"),getParsedType:s(()=>KE,"getParsedType"),getSizableOrigin:s(()=>Nu,"getSizableOrigin"),hexToUint8Array:s(()=>Gm,"hexToUint8Array"),isObject:s(()=>kt,"isObject"),isPlainObject:s(()=>nt,"isPlainObject"),issue:s(()=>Ru,"issue"),joinValues:s(()=>z,"joinValues"),jsonStringifyReplacer:s(()=>ju,"jsonStringifyReplacer"),merge:s(()=>Zm,"merge"),mergeDefs:s(()=>Pe,"mergeDefs"),normalizeParams:s(()=>T,"normalizeParams"),nullish:s(()=>rt,"nullish"),numKeys:s(()=>jm,"numKeys"),objectClone:s(()=>km,"objectClone"),omit:s(()=>Mm,"omit"),optionalKeys:s(()=>Gs,"optionalKeys"),parsedType:s(()=>G,"parsedType"),partial:s(()=>qm,"partial"),pick:s(()=>Tm,"pick"),prefixIssues:s(()=>Ie,"prefixIssues"),primitiveTypes:s(()=>zm,"primitiveTypes"),promiseAllObject:s(()=>_m,"promiseAllObject"),propertyKeyTypes:s(()=>dn,"propertyKeyTypes"),randomString:s(()=>Sm,"randomString"),required:s(()=>Lm,"required"),safeExtend:s(()=>Um,"safeExtend"),shallowClone:s(()=>Ws,"shallowClone"),slugify:s(()=>Js,"slugify"),stringifyPrimitive:s(()=>V,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>Xs,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>Wm,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>Km,"uint8ArrayToHex"),unwrapMessage:s(()=>Kt,"unwrapMessage")});function Dm(e){return e}s(Dm,"wk"),o(Dm,"assertEqual");function wm(e){return e}s(wm,"xk"),o(wm,"assertNotEqual");function $m(e){}s($m,"$k"),o($m,"assertIs");function Bm(e){throw new Error("Unexpected value in exhaustive check")}s(Bm,"_k"),o(Bm,"assertNever");function xm(e){}s(xm,"kk"),o(xm,"assert");function on(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}s(on,"ln"),o(on,"getEnumValues");function z(e,t="|"){return e.map(r=>V(r)).join(t)}s(z,"I"),o(z,"joinValues");function ju(e,t){return typeof t=="bigint"?t.toString():t}s(ju,"lr"),o(ju,"jsonStringifyReplacer");function Gt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(Gt,"dr"),o(Gt,"cached");function rt(e){return e==null}s(rt,"vt"),o(rt,"nullish");function zu(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(zu,"dn"),o(zu,"cleanRegex");function Ls(e,t){let r=e/t,i=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<u?0:r-i}s(Ls,"Ka"),o(Ls,"floatSafeRemainder");var Cm=Symbol("evaluating");function ee(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Cm)return i===void 0&&(i=Cm,i=r()),i},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(ee,"Q"),o(ee,"defineLazy");function km(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(km,"Sk"),o(km,"objectClone");function Ke(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(Ke,"yt"),o(Ke,"assignProp");function Pe(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}s(Pe,"ut"),o(Pe,"mergeDefs");function Am(e){return Pe(e._zod.def)}s(Am,"Ik"),o(Am,"cloneDef");function Im(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}s(Im,"Rk"),o(Im,"getElementAtPath");function _m(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let u={};for(let n=0;n<t.length;n++)u[t[n]]=i[n];return u})}s(_m,"Ek"),o(_m,"promiseAllObject");function Sm(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}s(Sm,"Tk"),o(Sm,"randomString");function ln(e){return JSON.stringify(e)}s(ln,"Co"),o(ln,"esc");function Js(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(Js,"Wa"),o(Js,"slugify");var Vs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function kt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(kt,"Zt"),o(kt,"isObject");var Fm=Gt(()=>{if(Fu.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function nt(e){if(kt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(kt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(nt,"bt"),o(nt,"isPlainObject");function Ws(e){return nt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(Ws,"Ha"),o(Ws,"shallowClone");function jm(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(jm,"Ak"),o(jm,"numKeys");var KE=o(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),dn=new Set(["string","number","symbol"]),zm=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Ue,"Ze"),o(Ue,"escapeRegex");function Ae(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}s(Ae,"Ie"),o(Ae,"clone");function T(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}s(T,"L"),o(T,"normalizeParams");function Nm(e){let t;return new Proxy({},{get(r,i,u){return t??(t=e()),Reflect.get(t,i,u)},set(r,i,u,n){return t??(t=e()),Reflect.set(t,i,u,n)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,u){return t??(t=e()),Reflect.defineProperty(t,i,u)}})}s(Nm,"jk"),o(Nm,"createTransparentProxy");function V(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(V,"D"),o(V,"stringifyPrimitive");function Gs(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(Gs,"Qa"),o(Gs,"optionalKeys");var Om={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Rm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Tm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Ke(this,"shape",n),n},checks:[]});return Ae(e,u)}s(Tm,"Ok"),o(Tm,"pick");function Mm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Ke(this,"shape",n),n},checks:[]});return Ae(e,u)}s(Mm,"Nk"),o(Mm,"omit");function Pm(e,t){if(!nt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let n in t)if(Object.getOwnPropertyDescriptor(u,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Pe(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return Ke(this,"shape",u),u}});return Ae(e,i)}s(Pm,"Dk"),o(Pm,"extend");function Um(e,t){if(!nt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ke(this,"shape",i),i}});return Ae(e,r)}s(Um,"Pk"),o(Um,"safeExtend");function Zm(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Pe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ke(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ae(e,r)}s(Zm,"Mk"),o(Zm,"merge");function qm(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=Pe(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let l in r){if(!(l in n))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:n[l]}):n[l])}else for(let l in n)a[l]=e?new e({type:"optional",innerType:n[l]}):n[l];return Ke(this,"shape",a),a},checks:[]});return Ae(t,u)}s(qm,"Ck"),o(qm,"partial");function Lm(e,t,r){let i=Pe(t._zod.def,{get shape(){let u=t._zod.def.shape,n={...u};if(r)for(let a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(n[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)n[a]=new e({type:"nonoptional",innerType:u[a]});return Ke(this,"shape",n),n}});return Ae(t,i)}s(Lm,"Uk"),o(Lm,"required");function it(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(it,"wt"),o(it,"aborted");function Ks(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(Ks,"rc"),o(Ks,"explicitlyAborted");function Ie(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}s(Ie,"Ae"),o(Ie,"prefixIssues");function Kt(e){return typeof e=="string"?e:e?.message}s(Kt,"un"),o(Kt,"unwrapMessage");function xe(e,t,r){let i=e.message?e.message:Kt(e.inst?._zod.def?.error?.(e))??Kt(t?.error?.(e))??Kt(r.customError?.(e))??Kt(r.localeError?.(e))??"Invalid input",{inst:u,continue:n,input:a,...l}=e;return l.path??(l.path=[]),l.message=i,t?.reportInput&&(l.input=a),l}s(xe,"Re"),o(xe,"finalizeIssue");function Nu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(Nu,"fn"),o(Nu,"getSizableOrigin");function Ou(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(Ou,"mn"),o(Ou,"getLengthableOrigin");function G(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 r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(G,"P"),o(G,"parsedType");function Ru(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}s(Ru,"pr"),o(Ru,"issue");function Jm(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(Jm,"Lk"),o(Jm,"cleanEnum");function Hs(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}s(Hs,"ib"),o(Hs,"base64ToUint8Array");function Xs(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s(Xs,"sb"),o(Xs,"uint8ArrayToBase64");function Vm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Hs(t+r)}s(Vm,"Fk"),o(Vm,"base64urlToUint8Array");function Wm(e){return Xs(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(Wm,"Bk"),o(Wm,"uint8ArrayToBase64url");function Gm(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}s(Gm,"Zk"),o(Gm,"hexToUint8Array");function Km(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(Km,"qk"),o(Km,"uint8ArrayToHex");var HE=class{static{s(this,"Ja")}static{o(this,"Class")}constructor(...e){}},Hm=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ju,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Ys=w("$ZodError",Hm),_e=w("$ZodError",Hm,{Parent:Error});function cn(e,t=r=>r.message){let r={},i=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):i.push(t(u));return{formErrors:i,fieldErrors:r}}s(cn,"gn"),o(cn,"flattenError");function pn(e,t=r=>r.message){let r={_errors:[]},i=o((u,n=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},[...n,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...n,...a.path]);else{let l=[...n,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,c=0;for(;c<l.length;){let p=l[c];c===l.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(t(a))):d[p]=d[p]||{_errors:[]},d=d[p],c++}}}},"processError");return i(e),r}s(pn,"vn"),o(pn,"formatError");function Qs(e,t=r=>r.message){let r={errors:[]},i=o((u,n=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(c=>i({issues:c},[...n,...d.path]));else if(d.code==="invalid_key")i({issues:d.issues},[...n,...d.path]);else if(d.code==="invalid_element")i({issues:d.issues},[...n,...d.path]);else{let c=[...n,...d.path];if(c.length===0){r.errors.push(t(d));continue}let p=r,h=0;for(;h<c.length;){let m=c[h],f=h===c.length-1;typeof m=="string"?(p.properties??(p.properties={}),(a=p.properties)[m]??(a[m]={errors:[]}),p=p.properties[m]):(p.items??(p.items=[]),(l=p.items)[m]??(l[m]={errors:[]}),p=p.items[m]),f&&p.errors.push(t(d)),h++}}},"processError");return i(e),r}s(Qs,"nc"),o(Qs,"treeifyError");function ea(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}s(ea,"cb"),o(ea,"toDotPath");function ta(e){let t=[],r=[...e.issues].sort((i,u)=>(i.path??[]).length-(u.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${ea(i.path)}`);return t.join(`
|
|
2
|
-
`)}s(ta,"oc"),o(ta,"prettifyError");var Tu=o(e=>(t,r,i,u)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Ct;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>xe(d,n,Ee())));throw Vs(l,u?.callee),l}return a.value},"_parse"),ua=Tu(_e),Mu=o(e=>async(t,r,i,u)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>xe(d,n,Ee())));throw Vs(l,u?.callee),l}return a.value},"_parseAsync"),ra=Mu(_e),Pu=o(e=>(t,r,i)=>{let u=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},u);if(n instanceof Promise)throw new Ct;return n.issues.length?{success:!1,error:new(e??Ys)(n.issues.map(a=>xe(a,u,Ee())))}:{success:!0,data:n.value}},"_safeParse"),Xm=Pu(_e),Uu=o(e=>async(t,r,i)=>{let u=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},u);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>xe(a,u,Ee())))}:{success:!0,data:n.value}},"_safeParseAsync"),Ym=Uu(_e),na=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Tu(e)(t,r,u)},"_encode"),XE=na(_e),ia=o(e=>(t,r,i)=>Tu(e)(t,r,i),"_decode"),YE=ia(_e),sa=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Mu(e)(t,r,u)},"_encodeAsync"),QE=sa(_e),aa=o(e=>async(t,r,i)=>Mu(e)(t,r,i),"_decodeAsync"),e5=aa(_e),oa=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Pu(e)(t,r,u)},"_safeEncode"),t5=oa(_e),la=o(e=>(t,r,i)=>Pu(e)(t,r,i),"_safeDecode"),u5=la(_e),da=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Uu(e)(t,r,u)},"_safeEncodeAsync"),r5=da(_e),ca=o(e=>async(t,r,i)=>Uu(e)(t,r,i),"_safeDecodeAsync"),n5=ca(_e),st={};Ge(st,{base64:s(()=>f4,"base64"),base64url:s(()=>ma,"base64url"),bigint:s(()=>b4,"bigint"),boolean:s(()=>w4,"boolean"),browserEmail:s(()=>p5,"browserEmail"),cidrv4:s(()=>p4,"cidrv4"),cidrv6:s(()=>m4,"cidrv6"),cuid:s(()=>Qm,"cuid"),cuid2:s(()=>e4,"cuid2"),date:s(()=>y4,"date"),datetime:s(()=>ga,"datetime"),domain:s(()=>h5,"domain"),duration:s(()=>i4,"duration"),e164:s(()=>g4,"e164"),email:s(()=>a4,"email"),emoji:s(()=>pa,"emoji"),extendedDuration:s(()=>i5,"extendedDuration"),guid:s(()=>s4,"guid"),hex:s(()=>g5,"hex"),hostname:s(()=>f5,"hostname"),html5Email:s(()=>l5,"html5Email"),httpProtocol:s(()=>h4,"httpProtocol"),idnEmail:s(()=>c5,"idnEmail"),integer:s(()=>D4,"integer"),ipv4:s(()=>l4,"ipv4"),ipv6:s(()=>d4,"ipv6"),ksuid:s(()=>r4,"ksuid"),lowercase:s(()=>x4,"lowercase"),mac:s(()=>c4,"mac"),md5_base64:s(()=>y5,"md5_base64"),md5_base64url:s(()=>E5,"md5_base64url"),md5_hex:s(()=>v5,"md5_hex"),nanoid:s(()=>n4,"nanoid"),null:s(()=>$4,"null"),number:s(()=>va,"number"),rfc5322Email:s(()=>d5,"rfc5322Email"),sha1_base64:s(()=>D5,"sha1_base64"),sha1_base64url:s(()=>w5,"sha1_base64url"),sha1_hex:s(()=>b5,"sha1_hex"),sha256_base64:s(()=>B5,"sha256_base64"),sha256_base64url:s(()=>x5,"sha256_base64url"),sha256_hex:s(()=>$5,"sha256_hex"),sha384_base64:s(()=>k5,"sha384_base64"),sha384_base64url:s(()=>A5,"sha384_base64url"),sha384_hex:s(()=>C5,"sha384_hex"),sha512_base64:s(()=>_5,"sha512_base64"),sha512_base64url:s(()=>S5,"sha512_base64url"),sha512_hex:s(()=>I5,"sha512_hex"),string:s(()=>E4,"string"),time:s(()=>ha,"time"),ulid:s(()=>t4,"ulid"),undefined:s(()=>B4,"undefined"),unicodeEmail:s(()=>o4,"unicodeEmail"),uppercase:s(()=>C4,"uppercase"),uuid:s(()=>Ht,"uuid"),uuid4:s(()=>s5,"uuid4"),uuid6:s(()=>a5,"uuid6"),uuid7:s(()=>o5,"uuid7"),xid:s(()=>u4,"xid")});var Qm=/^[cC][0-9a-z]{6,}$/,e4=/^[0-9a-z]+$/,t4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,u4=/^[0-9a-vA-V]{20}$/,r4=/^[A-Za-z0-9]{27}$/,n4=/^[a-zA-Z0-9_-]{21}$/,i4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,i5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,s4=/^([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})$/,Ht=o(e=>e?new 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)$/,"uuid"),s5=Ht(4),a5=Ht(6),o5=Ht(7),a4=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,l5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,d5=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,o4=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,c5=o4,p5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pa(){return new RegExp(m5,"u")}s(pa,"gc"),o(pa,"emoji");var l4=/^(?:(?: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])$/,d4=/^(([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}|:))$/,c4=o(e=>{let t=Ue(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),p4=/^((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])$/,m4=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,f4=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ma=/^[A-Za-z0-9_-]*$/,f5=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,h5=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,h4=/^https?$/,g4=/^\+[1-9]\d{6,14}$/,v4="(?:(?:\\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])))",y4=new RegExp(`^${v4}$`);function fa(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}s(fa,"db"),o(fa,"timeSource");function ha(e){return new RegExp(`^${fa(e)}$`)}s(ha,"Ic"),o(ha,"time");function ga(e){let t=fa({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${v4}T(?:${i})$`)}s(ga,"Rc"),o(ga,"datetime");var E4=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),b4=/^-?\d+n?$/,D4=/^-?\d+$/,va=/^-?\d+(?:\.\d+)?$/,w4=/^(?:true|false)$/i,$4=/^null$/i,B4=/^undefined$/i,x4=/^[^A-Z]*$/,C4=/^[^a-z]*$/,g5=/^[0-9a-fA-F]*$/;function Xt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(Xt,"yn"),o(Xt,"fixedBase64");function Yt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(Yt,"bn"),o(Yt,"fixedBase64url");var v5=/^[0-9a-fA-F]{32}$/,y5=Xt(22,"=="),E5=Yt(22),b5=/^[0-9a-fA-F]{40}$/,D5=Xt(27,"="),w5=Yt(27),$5=/^[0-9a-fA-F]{64}$/,B5=Xt(43,"="),x5=Yt(43),C5=/^[0-9a-fA-F]{96}$/,k5=Xt(64,""),A5=Yt(64),I5=/^[0-9a-fA-F]{128}$/,_5=Xt(86,"=="),S5=Yt(86),oe=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),k4={number:"number",bigint:"bigint",object:"date"},ya=w("$ZodCheckLessThan",(e,t)=>{oe.init(e,t);let r=k4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ea=w("$ZodCheckGreaterThan",(e,t)=>{oe.init(e,t);let r=k4[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),A4=w("$ZodCheckMultipleOf",(e,t)=>{oe.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Ls(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),I4=w("$ZodCheckNumberFormat",(e,t)=>{oe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[u,n]=Om[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=n,r&&(l.pattern=D4)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>n&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),_4=w("$ZodCheckBigIntFormat",(e,t)=>{oe.init(e,t);let[r,i]=Rm[t.format];e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=u=>{let n=u.value;n<r&&u.issues.push({origin:"bigint",input:n,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),n>i&&u.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),S4=w("$ZodCheckMaxSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;u.size<=t.maximum||i.issues.push({origin:Nu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),F4=w("$ZodCheckMinSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;u.size>=t.minimum||i.issues.push({origin:Nu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),j4=w("$ZodCheckSizeEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=i=>{let u=i.value,n=u.size;if(n===t.size)return;let a=n>t.size;i.issues.push({origin:Nu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),z4=w("$ZodCheckMaxLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;if(u.length<=t.maximum)return;let n=Ou(u);i.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),N4=w("$ZodCheckMinLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;if(u.length>=t.minimum)return;let n=Ou(u);i.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),O4=w("$ZodCheckLengthEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!rt(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=i=>{let u=i.value,n=u.length;if(n===t.length)return;let a=Ou(u),l=n>t.length;i.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Zu=w("$ZodCheckStringFormat",(e,t)=>{var r,i;oe.init(e,t),e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),R4=w("$ZodCheckRegex",(e,t)=>{Zu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),T4=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=x4),Zu.init(e,t)}),M4=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=C4),Zu.init(e,t)}),P4=w("$ZodCheckIncludes",(e,t)=>{oe.init(e,t);let r=Ue(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(u=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),U4=w("$ZodCheckStartsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`^${Ue(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Z4=w("$ZodCheckEndsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`.*${Ue(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function ba(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues))}s(ba,"pb"),o(ba,"handleCheckPropertyResult");var q4=w("$ZodCheckProperty",(e,t)=>{oe.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(u=>ba(u,r,t.property));ba(i,r,t.property)}}),L4=w("$ZodCheckMimeType",(e,t)=>{oe.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),J4=w("$ZodCheckOverwrite",(e,t)=>{oe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),V4=class{static{s(this,"wn")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
1
|
+
"use strict";var s5=Object.defineProperty;var s=(e,t)=>s5(e,"name",{value:t,configurable:!0});var qm=Object.defineProperty,o=s((e,t)=>qm(e,"name",{value:t,configurable:!0}),"a"),ut=s((e,t)=>{for(var r in t)qm(e,r,{get:t[r],enumerable:!0})},"mt");import"reflect-metadata";import{createHash as a5}from"node:crypto";import{existsSync as Zm,readFileSync as Lm,statSync as Vm}from"node:fs";import{createServer as o5}from"node:http";import{basename as l5}from"node:path";var Jm="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Wm(e,t){let r="",i=e;for(let u=t-1;u>=0;u--){let n=i%32;r=Jm[n]+r,i=(i-n)/32}return r}s(Wm,"IS"),o(Wm,"encodeTime");function Gm(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let i=0;i<e;i++)r+=Jm[(t[i]??0)&31];return r}s(Gm,"RS"),o(Gm,"encodeRandom");function lt(e=Date.now()){return Wm(e,10)+Gm(16)}s(lt,"Fe"),o(lt,"ulid");var Km=class{static{s(this,"mr")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let i=r.handler(t);i&&typeof i.then=="function"&&i.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},eu="REDACTED",d5=["token","secret","password","passwd","apikey","credential","assertion","signature"],c5=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),p5=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function sa(e){let t=e.toLowerCase();if(p5.test(t.replace(/[-_.]+/g,"")))return!1;if(d5.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&c5.has(r))return!0;return!1}s(sa,"Gb"),o(sa,"isSecretParam");var m5=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,f5=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function Hm(e){return e&&e.replace(m5,`$1${eu}@`).replace(f5,(t,r,i)=>sa(i)?`${r}${i}=${eu}`:t)}s(Hm,"OS"),o(Hm,"redactUrlParams");var h5=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,g5=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,v5=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function dt(e){return Hm(e).replace(v5,(t,r,i,u)=>`${r}${i}${u}${eu}${u}`).replace(h5,eu).replace(g5,(t,r)=>`${r} ${eu}`)}s(dt,"ht"),o(dt,"redactText");function aa(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(aa,"Jb"),o(aa,"clip");function Xm(e,t=4096){if(e!==void 0)return aa(dt(e),t)}s(Xm,"Wb"),o(Xm,"safeText");function Ym(e){return aa(dt(e),300)}s(Ym,"Kb"),o(Ym,"safeTitle");var y5=6,E5=64,b5=/^TS\d{1,5}$/,w5=o((e,t)=>e==="code"&&typeof t=="string"&&b5.test(t),"isDiagnosticCode");function Zu(e,t=0,r=y5){if(typeof e=="string")return dt(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let n=!1,a=e.map((l,d)=>{if(d>=E5)return l;let c=Zu(l,t+1,r);return c!==l&&(n=!0),c});return n?a:e}let i=!1,u={};for(let[n,a]of Object.entries(e)){let l=sa(n)&&a!==void 0&&a!==null&&!w5(n,a)?eu:Zu(a,t+1,r);l!==a&&(i=!0),u[n]=l}return i?u:e}s(Zu,"gr"),o(Zu,"redactDeep");var D5=12;function oa(e={}){let t=e.maxDepth??D5,r=0,i=0;return{redact(u){r+=1;let n=u.title===void 0?void 0:Ym(dt(u.title)),a=u.message===void 0?void 0:Xm(dt(u.message),4096),l=u.raw===void 0?void 0:Zu(u.raw,0,t),d=n!==u.title,c=a!==u.message,p=l!==u.raw;return!d&&!c&&!p?u:(i+=1,{...u,...n!==void 0?{title:n}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:i}),"stats"),reset:o(()=>{r=0,i=0},"reset")}}s(oa,"ri"),o(oa,"createEventRedactor");var Qm=class{static{s(this,"vr")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),i=JSON.stringify(r);if(i===t.lastJson)return;t.lastJson=i,t.revision+=1;let u=this.subs.get(e);if(u)for(let n of u)try{n(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},e4=class{static{s(this,"yr")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let i={...r,...t,id:r.id};return this.nodes.set(e,i),i}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],i=e.direction??"both",u=e.depth??4,n=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=n);){let{id:c,d:p}=d.shift();if(!a.has(c)&&(a.add(c),!(p>=u)))for(let m of r){if(i==="out"||i==="both"){let f=this.outByAxis.get(m)?.get(c);if(f)for(let h of f){l.add(h);let g=this.edges.get(h);a.has(g.to)||d.push({id:g.to,d:p+1})}}if(i==="in"||i==="both"){let f=this.inByAxis.get(m)?.get(c);if(f)for(let h of f){l.add(h);let g=this.edges.get(h);a.has(g.from)||d.push({id:g.from,d:p+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(c=>this.edges.get(c)).filter(c=>!!c)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let i=this.nodes.get(r);i&&t.push(i)}return t}};function t4(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(t4,"ZS"),o(t4,"fnv1a32");function u4(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${t4(t.join("|"))}`}s(u4,"Xb"),o(u4,"fingerprint");var $5=class{static{s(this,"ni")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function la(e,t={}){let r,i;if(t.flowId)i=t.flowId,r=e.filter(m=>m.context.flowId===i);else{let m=e.find(f=>f.context.flowId);if(!m)return;i=m.context.flowId,r=e.filter(f=>f.context.flowId===i)}if(r.length===0)return;r.sort((m,f)=>m.timestamp-f.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let n=r[0],a=[],l,d;for(let m of r){let f=r4(m);if(f){if(a.push(f),f.kind==="render"||f.kind==="final-render"){let h=m.raw;h?.render&&(l={id:h.render.id,page:h.render.page,route:h.render.route,componentName:h.render.componentName})}else if(m.source==="visual"&&f.kind==="visual-violation"){let h=m.raw;h?.frame&&(d=h.frame.id)}}}for(let m=a.length-1;m>=0;m--)if(a[m].kind==="render"){a[m]={...a[m],kind:"final-render"};break}let c=r[0].timestamp,p=r[r.length-1].timestamp;return{flowId:i,origin:{type:n.context.originType,nodeId:n.context.originNodeId,at:n.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:c,endedAt:p,eventCount:r.length}}s(la,"oi"),o(la,"compileStory");function r4(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,i=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(i)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${i}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(r4,"qS"),o(r4,"classifyEvent");var i4={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},B5=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),da="db-request-account",x5=new Set(["react","valtio","client-runtime","chrome","visual"]),tu=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),le=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),De=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function n4(e){let t=tu(e.raw)?e.raw:{},r=tu(t.request)?t.request:{},i=tu(t.span)?t.span:{},u=e.context??{},n=le(t.kind)??"",a=n===da,l=(a?De(t.lastEndedAt):void 0)??De(e.timestamp)??0,d=De(r.startedAt)??De(i.startTime)??De(t.startedAt)??(a?De(t.firstStartedAt):void 0),c=De(r.endedAt)??De(i.endTime)??(d!==void 0&&De(t.durationMs)!==void 0?d+t.durationMs:void 0),p=Math.min(l,d??l),m=Math.max(l,c??l),f=tu(t.render)?t.render:{},h=tu(t.update)?t.update:{},g=n==="render"?le(f.componentName):n==="state-update"?le(h.path)?.split(".").slice(0,2).join("."):void 0,b=le(t.queue),x=le(t.jobId),$=String(e.source),w=le(t.project)??le(u.projectName);return{event:e,id:e.id,ts:l,from:p,to:m,kind:n,source:$,...le(u.requestId)?{requestId:le(u.requestId)}:{},...le(u.parentRequestId)?{parentRequestId:le(u.parentRequestId)}:{},...b&&x?{queueKey:`${b}#${x}`}:{},browser:x5.has($)||$==="memory"&&w===void 0,bookkeeping:B5.has(n),...w?{project:w}:{},...g?{subject:g}:{},...n==="fetch-start"||n==="fetch-done"?{route:ca(le(t.url)),method:le(t.method)}:n==="server-request"?{route:le(r.route),method:le(r.method)}:n==="gateway-request"?{route:ca(le(t.url)),method:le(t.method)}:{}}}s(n4,"JS"),o(n4,"readItem");function ca(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return i?i[1]??"/":r}s(ca,"Hb"),o(ca,"pathOnly");var C5=o(e=>e.split(".")[0],"rootOf"),s4=o((e,t)=>e.reduce((r,i)=>Math.min(r,t(i)),1/0),"minOf"),a4=o((e,t)=>e.reduce((r,i)=>Math.max(r,t(i)),-1/0),"maxOf"),pa=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),ma=o(e=>e.requestId&&!e.requestId.startsWith("job:")?C5(e.requestId):void 0,"directFamilyOf");function o4(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(o4,"KS"),o(o4,"jobKeyOf");function l4(e,t){let r=e.filter(n=>!n.parentRequestId&&(n.kind==="server-request"||n.kind==="gateway-request"||n.kind==="fetch-start"||n.kind==="fetch-done")).sort((n,a)=>n.from-a.from||pa(n,a));if(r.length<2)return[e];let i=[];for(let n of r){let a=i[i.length-1];a&&n.from<=a.to+t?a.to=Math.max(a.to,n.to):i.push({from:n.from,to:n.to})}if(i.length<2)return[e];let u=i.map(()=>[]);for(let n of e){let a=i.findIndex(l=>n.ts>=l.from-t&&n.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<i.length;l+=1)i[l].from<=n.ts&&(a=l)}u[a].push(n)}return u.filter(n=>n.length>0)}s(l4,"XS"),o(l4,"occurrencesOf");var d4={debug:0,info:1,warning:2,error:3,fatal:4};function fa(e,t){let r=[],i=[];for(let u of e){let n=i[i.length-1];n&&u.ts-n.ts>=t&&(r.push(i),i=[]),i.push(u)}return i.length&&r.push(i),r}s(fa,"Qb"),o(fa,"runs");function c4(e,t={}){let r={...i4};for(let[w,k]of Object.entries(t))typeof k=="number"&&Number.isFinite(k)&&(r[w]=k);let i=new Set,u=[];for(let w of e)i.has(w.id)||(i.add(w.id),u.push(n4(w)));u.sort(pa);let n=le(u[0]?.event.context?.flowId)??le(u[0]?.event.raw?.flowId)??"",a=new Map;for(let w of u)w.kind==="queue-enqueued"&&w.queueKey&&w.requestId&&!w.requestId.startsWith("job:")&&!a.has(w.queueKey)&&a.set(w.queueKey,w);let l=new Map,d=new Map,c=[];for(let w of u){let k=o4(w),C=ma(w);if(k!==void 0){let M=d.get(k);M?M.push(w):d.set(k,[w])}else if(C!==void 0){let M=l.get(C);M?M.push(w):l.set(C,[w])}else c.push(w)}let p=[],m=new Map;for(let[w,k]of l)l4(k,r.occurrenceSlackMs).forEach((C,M)=>{let y={id:`${n}~r:${w}${M===0?"":`@${M+1}`}`,kind:"request",items:C,requestId:w};p.push(y);for(let D of C)m.set(D,y)});for(let[w,k]of d){let C=a.get(w),M=C?m.get(C):void 0;M?M.items.push(...k):p.push({id:`${n}~r:job:${w}`,kind:"request",items:k,requestId:`job:${w}`})}let f=u.filter(w=>w.kind==="fetch-done"&&ma(w)!==void 0),h=new Map;for(let w of p)w.requestId&&h.set(w.requestId,[...h.get(w.requestId)??[],w]);let g=o((w,k)=>{let C=h.get(w);if(C)return C.find(M=>M.items.some(y=>y.kind==="fetch-done"&&y.ts===k))??C[C.length-1]},"owningUnit"),b=c.filter(w=>w.browser);for(let w of fa(b,r.burstGapMs)){let k=w[0].ts,C=f.filter(D=>D.ts<=k&&k-D.ts<=r.attachWindowMs),M=[...new Set(C.map(D=>ma(D)))];if(M.length===1){let D=g(M[0],C[C.length-1].ts);if(D){D.items.push(...w);continue}}let y=w.some(D=>D.kind==="flow-origin");p.push({id:`${n}~${y?"o":"u"}:${w[0].id}`,kind:y?"origin":"ui",items:w,...M.length>1?{after:M.sort()}:{}})}for(let w of fa(c.filter(k=>!k.browser),r.phaseGapMs))p.push({id:`${n}~a:${w[0].id}`,kind:"ambient",items:w});let x=p4(n,u.length,p,r),$=xi(u.map(w=>w.event));return $?{...x,sql:$}:x}s(c4,"nw"),o(c4,"segmentFlow");function p4(e,t,r,i){for(let f of r)f.items.sort(pa);let u=r.map(f=>({unit:f,from:s4(f.items,h=>h.from),to:a4(f.items,h=>h.to)}));u.sort((f,h)=>f.from-h.from||(f.unit.id<h.unit.id?-1:1));let n=new Map,a=0,l=-1/0;for(let f of u)(a===0||f.from-l>=i.phaseGapMs)&&(a+=1),l=Math.max(l,f.to),n.set(f.unit,a);let d=[];for(let f of u){let h=m4(f.unit.items,i.maxSegmentEvents),g=f.unit.kind==="request"?xi(f.unit.items.map(b=>b.event)):void 0;h.forEach((b,x)=>{let $=f4(e,f.unit,b,n.get(f.unit),h.length>1?{index:x+1,total:h.length}:void 0);d.push(g&&x===0?{...$,sql:g}:$)})}let c={};for(let f of d)for(let h of f.eventIds)c[h]=f.id;let p=[];for(let f of d){let h=p[f.phase-1];h||(h={index:f.phase,start:f.start,end:f.end,segmentIds:[]},p[f.phase-1]=h),h.start=Math.min(h.start,f.start),h.end=Math.max(h.end,f.end),h.segmentIds.push(f.id)}let m=d.reduce((f,h)=>f+h.counts.signal,0);return{flowId:e,segments:d,phases:p.filter(Boolean),assignment:c,stats:{events:t,signal:m,bookkeeping:t-m,segments:d.length,phases:p.filter(Boolean).length,largestSegment:d.reduce((f,h)=>Math.max(f,h.counts.total),0)}}}s(p4,"HS"),o(p4,"assemble");function m4(e,t){if(e.filter(n=>!n.bookkeeping).length<=t)return[e];let r=[],i=[],u=0;for(let n of e)!n.bookkeeping&&u===t&&(r.push(i),i=[],u=0),i.push(n),n.bookkeeping||(u+=1);return i.length&&r.push(i),r}s(m4,"YS"),o(m4,"chunk");function f4(e,t,r,i,u){let n={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let h of r){h.bookkeeping?n.bookkeeping+=1:n.signal+=1;let g=String(h.event.severity);g==="error"||g==="fatal"?n.errors+=1:g==="warning"&&(n.warnings+=1),(d4[g]??1)>(d4[l]??0)&&(l=g),h.project&&a.add(h.project)}let d=t.kind==="ui"||t.kind==="origin"?g4(r):[],c=s4(r,h=>h.from),p=a4(r,h=>h.to),m=h4(t.items),f=t.id;return{id:u&&u.index>1?`${f}#${u.index}`:f,flowId:e,kind:t.kind,label:v4(t,r,m,u,d),phase:i,start:c,end:p,durationMs:p-c,eventIds:r.map(h=>h.id),counts:n,projects:[...a].sort(),...m.route?{route:m.route}:{},...m.method?{method:m.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(f4,"QS"),o(f4,"toSegment");function h4(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(h4,"eI"),o(h4,"routeOf");function g4(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,i)=>i[1]-r[1]||(r[0]<i[0]?-1:1)).slice(0,3).map(([r,i])=>i>1?`${r} \xD7${i}`:r)}s(g4,"tI"),o(g4,"hotOf");function v4(e,t,r,i,u){let n=i?` (part ${i.index}/${i.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${n}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${n}`:`request ${e.requestId??""}${n}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:`background${n}`}s(v4,"rI"),o(v4,"labelOf");var y4=50;function xi(e){let t=new Map,r=new Map,i=new Set;for(let g of e){if(i.has(g.id))continue;i.add(g.id);let b=tu(g.raw)?g.raw:{},x=le(b.kind),$=le(g.context?.requestId);if(!$)continue;let w=le(b.project)??le(g.context?.projectName);if(x==="db-query"&&g.source==="db"){let k=r.get($)??{count:0,workMs:0,...w?{project:w}:{}};k.count+=1,k.workMs+=De(b.durationMs)??0,r.set($,k)}else if(x===da){let k=le(b.accountId)??g.id,C=De(b.seq)??0,M=t.get(k);if(M&&M.seq>=C)continue;t.set(k,{requestId:$,...w?{project:w}:{},seq:C,basis:b.basis==="end"?"end":"settled",statements:De(b.statements)??0,failed:De(b.failed)??0,workMs:De(b.workMs)??0,recorded:De(b.recorded)??0,suppressed:De(b.suppressed)??0,unwritten:De(b.unwritten)??0})}}let u=new Map;for(let g of t.values()){let b=u.get(g.requestId);if(!b){u.set(g.requestId,{...g});continue}g.basis==="settled"&&(b.basis="settled"),b.statements+=g.statements,b.failed+=g.failed,b.workMs+=g.workMs,b.recorded+=g.recorded,b.suppressed+=g.suppressed,b.unwritten+=g.unwritten}let n=[...new Set([...r.keys(),...u.keys()])].sort();if(n.length===0)return;let a={statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0},l={statements:0,workMs:0},d=[];for(let g of n){let b=r.get(g),x=u.get(g),$=b?.count??0;l.statements+=$,l.workMs+=b?.workMs??0;let w=!x||$>x.statements?"unverified":$===x.statements?"complete":"incomplete";x&&w!=="unverified"&&(a.statements+=x.statements,a.failed+=x.failed,a.workMs+=x.workMs,a.recorded+=x.recorded,a.suppressed+=x.suppressed,a.unwritten+=x.unwritten);let k=b?.project??x?.project;d.push({requestId:g,...k?{project:k}:{},status:w,observed:$,observedWorkMs:b?.workMs??0,...x?{basis:x.basis,statements:x.statements,failed:x.failed,workMs:x.workMs,recorded:x.recorded,suppressed:x.suppressed,unwritten:x.unwritten}:{}})}let c=o(g=>d.filter(b=>b.status===g).length,"tally"),p=c("unverified"),m=c("incomplete"),f=o(g=>(g.statements??0)-g.observed,"missing"),h=d.filter(g=>g.status!=="complete").sort((g,b)=>(g.status==="incomplete"?0:1)-(b.status==="incomplete"?0:1)||f(b)-f(g)||(g.requestId<b.requestId?-1:g.requestId>b.requestId?1:0));return{status:p>0?"unverified":m>0?"incomplete":"complete",requests:d.length,complete:c("complete"),incomplete:m,unverified:p,settled:d.filter(g=>g.status!=="unverified"&&g.basis==="settled").length,observed:l,accounted:a,gaps:h.slice(0,y4),gapsTruncated:h.length>y4}}s(xi,"si"),o(xi,"sqlAccountingOf");var v={};ut(v,{$brand:s(()=>D4,"$brand"),$input:s(()=>rv,"$input"),$output:s(()=>uv,"$output"),NEVER:s(()=>w4,"NEVER"),TimePrecision:s(()=>nv,"TimePrecision"),ZodAny:s(()=>cl,"ZodAny"),ZodArray:s(()=>yl,"ZodArray"),ZodBase64:s(()=>wn,"ZodBase64"),ZodBase64URL:s(()=>Dn,"ZodBase64URL"),ZodBigInt:s(()=>Ar,"ZodBigInt"),ZodBigIntFormat:s(()=>kn,"ZodBigIntFormat"),ZodBoolean:s(()=>kr,"ZodBoolean"),ZodCIDRv4:s(()=>En,"ZodCIDRv4"),ZodCIDRv6:s(()=>bn,"ZodCIDRv6"),ZodCUID:s(()=>pn,"ZodCUID"),ZodCUID2:s(()=>mn,"ZodCUID2"),ZodCatch:s(()=>Gl,"ZodCatch"),ZodCodec:s(()=>Or,"ZodCodec"),ZodCustom:s(()=>Tr,"ZodCustom"),ZodCustomStringFormat:s(()=>mu,"ZodCustomStringFormat"),ZodDate:s(()=>In,"ZodDate"),ZodDefault:s(()=>Ll,"ZodDefault"),ZodDiscriminatedUnion:s(()=>xl,"ZodDiscriminatedUnion"),ZodE164:s(()=>$n,"ZodE164"),ZodEmail:s(()=>ln,"ZodEmail"),ZodEmoji:s(()=>dn,"ZodEmoji"),ZodEnum:s(()=>gu,"ZodEnum"),ZodError:s(()=>lD,"ZodError"),ZodExactOptional:s(()=>Ul,"ZodExactOptional"),ZodFile:s(()=>Rl,"ZodFile"),ZodFirstPartyTypeKind:s(()=>pd,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>sd,"ZodFunction"),ZodGUID:s(()=>$r,"ZodGUID"),ZodIPv4:s(()=>vn,"ZodIPv4"),ZodIPv6:s(()=>yn,"ZodIPv6"),ZodISODate:s(()=>y0,"ZodISODate"),ZodISODateTime:s(()=>g0,"ZodISODateTime"),ZodISODuration:s(()=>D0,"ZodISODuration"),ZodISOTime:s(()=>b0,"ZodISOTime"),ZodIntersection:s(()=>kl,"ZodIntersection"),ZodIssueCode:s(()=>dD,"ZodIssueCode"),ZodJWT:s(()=>Bn,"ZodJWT"),ZodKSUID:s(()=>gn,"ZodKSUID"),ZodLazy:s(()=>rd,"ZodLazy"),ZodLiteral:s(()=>Ml,"ZodLiteral"),ZodMAC:s(()=>P0,"ZodMAC"),ZodMap:s(()=>Sl,"ZodMap"),ZodNaN:s(()=>Kl,"ZodNaN"),ZodNanoID:s(()=>cn,"ZodNanoID"),ZodNever:s(()=>fl,"ZodNever"),ZodNonOptional:s(()=>On,"ZodNonOptional"),ZodNull:s(()=>dl,"ZodNull"),ZodNullable:s(()=>ql,"ZodNullable"),ZodNumber:s(()=>xr,"ZodNumber"),ZodNumberFormat:s(()=>Pt,"ZodNumberFormat"),ZodObject:s(()=>_r,"ZodObject"),ZodOptional:s(()=>jn,"ZodOptional"),ZodPipe:s(()=>Nr,"ZodPipe"),ZodPrefault:s(()=>Vl,"ZodPrefault"),ZodPreprocess:s(()=>Ql,"ZodPreprocess"),ZodPromise:s(()=>id,"ZodPromise"),ZodReadonly:s(()=>ed,"ZodReadonly"),ZodRealError:s(()=>Ne,"ZodRealError"),ZodRecord:s(()=>hu,"ZodRecord"),ZodSet:s(()=>jl,"ZodSet"),ZodString:s(()=>Dr,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>Jl,"ZodSuccess"),ZodSymbol:s(()=>sl,"ZodSymbol"),ZodTemplateLiteral:s(()=>td,"ZodTemplateLiteral"),ZodTransform:s(()=>Pl,"ZodTransform"),ZodTuple:s(()=>Al,"ZodTuple"),ZodType:s(()=>Q,"ZodType"),ZodULID:s(()=>fn,"ZodULID"),ZodURL:s(()=>Br,"ZodURL"),ZodUUID:s(()=>He,"ZodUUID"),ZodUndefined:s(()=>ol,"ZodUndefined"),ZodUnion:s(()=>Sr,"ZodUnion"),ZodUnknown:s(()=>ml,"ZodUnknown"),ZodVoid:s(()=>hl,"ZodVoid"),ZodXID:s(()=>hn,"ZodXID"),ZodXor:s(()=>$l,"ZodXor"),_ZodString:s(()=>on,"_ZodString"),_default:s(()=>Nn,"_default"),_function:s(()=>Rr,"_function"),any:s(()=>pl,"any"),array:s(()=>fu,"array"),base64:s(()=>V0,"base64"),base64url:s(()=>J0,"base64url"),bigint:s(()=>rl,"bigint"),boolean:s(()=>Cn,"boolean"),catch:s(()=>Tn,"catch"),check:s(()=>ad,"check"),cidrv4:s(()=>Z0,"cidrv4"),cidrv6:s(()=>L0,"cidrv6"),clone:s(()=>Se,"clone"),codec:s(()=>Xl,"codec"),coerce:s(()=>O1,"coerce"),config:s(()=>be,"config"),core:s(()=>E4,"core"),cuid:s(()=>z0,"cuid"),cuid2:s(()=>N0,"cuid2"),custom:s(()=>od,"custom"),date:s(()=>vl,"date"),decode:s(()=>w1,"decode"),decodeAsync:s(()=>$1,"decodeAsync"),describe:s(()=>I1,"describe"),discriminatedUnion:s(()=>Cl,"discriminatedUnion"),e164:s(()=>W0,"e164"),email:s(()=>B0,"email"),emoji:s(()=>F0,"emoji"),encode:s(()=>b1,"encode"),encodeAsync:s(()=>D1,"encodeAsync"),endsWith:s(()=>fr,"endsWith"),enum:s(()=>jr,"enum"),exactOptional:s(()=>zn,"exactOptional"),file:s(()=>Tl,"file"),flattenError:s(()=>_i,"flattenError"),float32:s(()=>Q0,"float32"),float64:s(()=>el,"float64"),formatError:s(()=>Si,"formatError"),fromJSONSchema:s(()=>M1,"fromJSONSchema"),function:s(()=>Rr,"function"),getErrorMap:s(()=>j1,"getErrorMap"),globalRegistry:s(()=>Re,"globalRegistry"),gt:s(()=>nt,"gt"),gte:s(()=>Ce,"gte"),guid:s(()=>x0,"guid"),hash:s(()=>Y0,"hash"),hex:s(()=>X0,"hex"),hostname:s(()=>H0,"hostname"),httpUrl:s(()=>S0,"httpUrl"),includes:s(()=>pr,"includes"),instanceof:s(()=>ld,"instanceof"),int:s(()=>Cr,"int"),int32:s(()=>tl,"int32"),int64:s(()=>il,"int64"),intersection:s(()=>_n,"intersection"),invertCodec:s(()=>Yl,"invertCodec"),ipv4:s(()=>T0,"ipv4"),ipv6:s(()=>q0,"ipv6"),iso:s(()=>h0,"iso"),json:s(()=>dd,"json"),jwt:s(()=>G0,"jwt"),keyof:s(()=>El,"keyof"),ksuid:s(()=>R0,"ksuid"),lazy:s(()=>Un,"lazy"),length:s(()=>lu,"length"),literal:s(()=>Ol,"literal"),locales:s(()=>yo,"locales"),looseObject:s(()=>Dl,"looseObject"),looseRecord:s(()=>_l,"looseRecord"),lowercase:s(()=>dr,"lowercase"),lt:s(()=>it,"lt"),lte:s(()=>ze,"lte"),mac:s(()=>U0,"mac"),map:s(()=>Fl,"map"),maxLength:s(()=>ou,"maxLength"),maxSize:s(()=>Mt,"maxSize"),meta:s(()=>_1,"meta"),mime:s(()=>hr,"mime"),minLength:s(()=>ht,"minLength"),minSize:s(()=>st,"minSize"),multipleOf:s(()=>Nt,"multipleOf"),nan:s(()=>Hl,"nan"),nanoid:s(()=>j0,"nanoid"),nativeEnum:s(()=>Nl,"nativeEnum"),negative:s(()=>rn,"negative"),never:s(()=>Ir,"never"),nonnegative:s(()=>sn,"nonnegative"),nonoptional:s(()=>Rn,"nonoptional"),nonpositive:s(()=>nn,"nonpositive"),normalize:s(()=>gr,"normalize"),null:s(()=>An,"null"),nullable:s(()=>yu,"nullable"),nullish:s(()=>Zl,"nullish"),number:s(()=>xn,"number"),object:s(()=>bl,"object"),optional:s(()=>vu,"optional"),overwrite:s(()=>Ke,"overwrite"),parse:s(()=>g1,"parse"),parseAsync:s(()=>v1,"parseAsync"),partialRecord:s(()=>Il,"partialRecord"),pipe:s(()=>Mr,"pipe"),positive:s(()=>un,"positive"),prefault:s(()=>Mn,"prefault"),preprocess:s(()=>cd,"preprocess"),prettifyError:s(()=>Ca,"prettifyError"),promise:s(()=>nd,"promise"),property:s(()=>an,"property"),readonly:s(()=>Pn,"readonly"),record:s(()=>Fn,"record"),refine:s(()=>qn,"refine"),regex:s(()=>lr,"regex"),regexes:s(()=>ft,"regexes"),registry:s(()=>Ni,"registry"),safeDecode:s(()=>x1,"safeDecode"),safeDecodeAsync:s(()=>k1,"safeDecodeAsync"),safeEncode:s(()=>B1,"safeEncode"),safeEncodeAsync:s(()=>C1,"safeEncodeAsync"),safeParse:s(()=>y1,"safeParse"),safeParseAsync:s(()=>E1,"safeParseAsync"),set:s(()=>zl,"set"),setErrorMap:s(()=>F1,"setErrorMap"),size:s(()=>au,"size"),slugify:s(()=>br,"slugify"),startsWith:s(()=>mr,"startsWith"),strictObject:s(()=>wl,"strictObject"),string:s(()=>pu,"string"),stringFormat:s(()=>K0,"stringFormat"),stringbool:s(()=>S1,"stringbool"),success:s(()=>Wl,"success"),superRefine:s(()=>Zn,"superRefine"),symbol:s(()=>al,"symbol"),templateLiteral:s(()=>ud,"templateLiteral"),toJSONSchema:s(()=>f0,"toJSONSchema"),toLowerCase:s(()=>yr,"toLowerCase"),toUpperCase:s(()=>Er,"toUpperCase"),transform:s(()=>zr,"transform"),treeifyError:s(()=>Ba,"treeifyError"),trim:s(()=>vr,"trim"),tuple:s(()=>Sn,"tuple"),uint32:s(()=>ul,"uint32"),uint64:s(()=>nl,"uint64"),ulid:s(()=>M0,"ulid"),undefined:s(()=>ll,"undefined"),union:s(()=>Fr,"union"),unknown:s(()=>gt,"unknown"),uppercase:s(()=>cr,"uppercase"),url:s(()=>_0,"url"),util:s(()=>te,"util"),uuid:s(()=>C0,"uuid"),uuidv4:s(()=>k0,"uuidv4"),uuidv6:s(()=>A0,"uuidv6"),uuidv7:s(()=>I0,"uuidv7"),void:s(()=>gl,"void"),xid:s(()=>O0,"xid"),xor:s(()=>Bl,"xor")});var E4={};ut(E4,{$ZodAny:s(()=>kh,"$ZodAny"),$ZodArray:s(()=>Fh,"$ZodArray"),$ZodAsyncError:s(()=>Ft,"$ZodAsyncError"),$ZodBase64:s(()=>vh,"$ZodBase64"),$ZodBase64URL:s(()=>yh,"$ZodBase64URL"),$ZodBigInt:s(()=>Ha,"$ZodBigInt"),$ZodBigIntFormat:s(()=>$h,"$ZodBigIntFormat"),$ZodBoolean:s(()=>Ka,"$ZodBoolean"),$ZodCIDRv4:s(()=>hh,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>gh,"$ZodCIDRv6"),$ZodCUID:s(()=>rh,"$ZodCUID"),$ZodCUID2:s(()=>ih,"$ZodCUID2"),$ZodCatch:s(()=>Xh,"$ZodCatch"),$ZodCheck:s(()=>de,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>jf,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>Vf,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>La,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>Zf,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>Tf,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>Za,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>Uf,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>Of,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>zf,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>Wf,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>Rf,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>Nf,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>Sf,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>Ff,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>Gf,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>Jf,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>Pf,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>Mf,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>Lf,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>er,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>qf,"$ZodCheckUpperCase"),$ZodCodec:s(()=>ho,"$ZodCodec"),$ZodCustom:s(()=>ng,"$ZodCustom"),$ZodCustomStringFormat:s(()=>wh,"$ZodCustomStringFormat"),$ZodDate:s(()=>Sh,"$ZodDate"),$ZodDefault:s(()=>Wh,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>Mh,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>Eh,"$ZodE164"),$ZodEmail:s(()=>Qf,"$ZodEmail"),$ZodEmoji:s(()=>th,"$ZodEmoji"),$ZodEncodeError:s(()=>Ci,"$ZodEncodeError"),$ZodEnum:s(()=>Uh,"$ZodEnum"),$ZodError:s(()=>$a,"$ZodError"),$ZodExactOptional:s(()=>Vh,"$ZodExactOptional"),$ZodFile:s(()=>Zh,"$ZodFile"),$ZodFunction:s(()=>ug,"$ZodFunction"),$ZodGUID:s(()=>Xf,"$ZodGUID"),$ZodIPv4:s(()=>ph,"$ZodIPv4"),$ZodIPv6:s(()=>mh,"$ZodIPv6"),$ZodISODate:s(()=>lh,"$ZodISODate"),$ZodISODateTime:s(()=>oh,"$ZodISODateTime"),$ZodISODuration:s(()=>ch,"$ZodISODuration"),$ZodISOTime:s(()=>dh,"$ZodISOTime"),$ZodIntersection:s(()=>Oh,"$ZodIntersection"),$ZodJWT:s(()=>bh,"$ZodJWT"),$ZodKSUID:s(()=>ah,"$ZodKSUID"),$ZodLazy:s(()=>ig,"$ZodLazy"),$ZodLiteral:s(()=>qh,"$ZodLiteral"),$ZodMAC:s(()=>fh,"$ZodMAC"),$ZodMap:s(()=>Th,"$ZodMap"),$ZodNaN:s(()=>Yh,"$ZodNaN"),$ZodNanoID:s(()=>uh,"$ZodNanoID"),$ZodNever:s(()=>Ih,"$ZodNever"),$ZodNonOptional:s(()=>Kh,"$ZodNonOptional"),$ZodNull:s(()=>Ch,"$ZodNull"),$ZodNullable:s(()=>Jh,"$ZodNullable"),$ZodNumber:s(()=>Ga,"$ZodNumber"),$ZodNumberFormat:s(()=>Dh,"$ZodNumberFormat"),$ZodObject:s(()=>jh,"$ZodObject"),$ZodObjectJIT:s(()=>zh,"$ZodObjectJIT"),$ZodOptional:s(()=>co,"$ZodOptional"),$ZodPipe:s(()=>fo,"$ZodPipe"),$ZodPrefault:s(()=>Gh,"$ZodPrefault"),$ZodPreprocess:s(()=>Qh,"$ZodPreprocess"),$ZodPromise:s(()=>rg,"$ZodPromise"),$ZodReadonly:s(()=>eg,"$ZodReadonly"),$ZodRealError:s(()=>je,"$ZodRealError"),$ZodRecord:s(()=>Rh,"$ZodRecord"),$ZodRegistry:s(()=>iv,"$ZodRegistry"),$ZodSet:s(()=>Ph,"$ZodSet"),$ZodString:s(()=>tr,"$ZodString"),$ZodStringFormat:s(()=>se,"$ZodStringFormat"),$ZodSuccess:s(()=>Hh,"$ZodSuccess"),$ZodSymbol:s(()=>Bh,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>tg,"$ZodTemplateLiteral"),$ZodTransform:s(()=>Lh,"$ZodTransform"),$ZodTuple:s(()=>ro,"$ZodTuple"),$ZodType:s(()=>X,"$ZodType"),$ZodULID:s(()=>nh,"$ZodULID"),$ZodURL:s(()=>eh,"$ZodURL"),$ZodUUID:s(()=>Yf,"$ZodUUID"),$ZodUndefined:s(()=>xh,"$ZodUndefined"),$ZodUnion:s(()=>ji,"$ZodUnion"),$ZodUnknown:s(()=>Ah,"$ZodUnknown"),$ZodVoid:s(()=>_h,"$ZodVoid"),$ZodXID:s(()=>sh,"$ZodXID"),$ZodXor:s(()=>Nh,"$ZodXor"),$brand:s(()=>D4,"$brand"),$constructor:s(()=>B,"$constructor"),$input:s(()=>rv,"$input"),$output:s(()=>uv,"$output"),Doc:s(()=>Kf,"Doc"),JSONSchema:s(()=>oD,"JSONSchema"),JSONSchemaGenerator:s(()=>aD,"JSONSchemaGenerator"),NEVER:s(()=>w4,"NEVER"),TimePrecision:s(()=>nv,"TimePrecision"),_any:s(()=>Ko,"_any"),_array:s(()=>u0,"_array"),_base64:s(()=>Yi,"_base64"),_base64url:s(()=>Qi,"_base64url"),_bigint:s(()=>qo,"_bigint"),_boolean:s(()=>Po,"_boolean"),_catch:s(()=>$v,"_catch"),_check:s(()=>a0,"_check"),_cidrv4:s(()=>Hi,"_cidrv4"),_cidrv6:s(()=>Xi,"_cidrv6"),_coercedBigint:s(()=>Zo,"_coercedBigint"),_coercedBoolean:s(()=>Uo,"_coercedBoolean"),_coercedDate:s(()=>e0,"_coercedDate"),_coercedNumber:s(()=>zo,"_coercedNumber"),_coercedString:s(()=>ko,"_coercedString"),_cuid:s(()=>Zi,"_cuid"),_cuid2:s(()=>Li,"_cuid2"),_custom:s(()=>i0,"_custom"),_date:s(()=>Qo,"_date"),_decode:s(()=>_a,"_decode"),_decodeAsync:s(()=>Fa,"_decodeAsync"),_default:s(()=>bv,"_default"),_discriminatedUnion:s(()=>ov,"_discriminatedUnion"),_e164:s(()=>en,"_e164"),_email:s(()=>Mi,"_email"),_emoji:s(()=>Ui,"_emoji"),_encode:s(()=>Ia,"_encode"),_encodeAsync:s(()=>Sa,"_encodeAsync"),_endsWith:s(()=>fr,"_endsWith"),_enum:s(()=>fv,"_enum"),_file:s(()=>r0,"_file"),_float32:s(()=>Mo,"_float32"),_float64:s(()=>Oo,"_float64"),_gt:s(()=>nt,"_gt"),_gte:s(()=>Ce,"_gte"),_guid:s(()=>ar,"_guid"),_includes:s(()=>pr,"_includes"),_int:s(()=>No,"_int"),_int32:s(()=>Ro,"_int32"),_int64:s(()=>Lo,"_int64"),_intersection:s(()=>lv,"_intersection"),_ipv4:s(()=>Gi,"_ipv4"),_ipv6:s(()=>Ki,"_ipv6"),_isoDate:s(()=>_o,"_isoDate"),_isoDateTime:s(()=>Io,"_isoDateTime"),_isoDuration:s(()=>Fo,"_isoDuration"),_isoTime:s(()=>So,"_isoTime"),_jwt:s(()=>tn,"_jwt"),_ksuid:s(()=>Wi,"_ksuid"),_lazy:s(()=>kv,"_lazy"),_length:s(()=>lu,"_length"),_literal:s(()=>gv,"_literal"),_lowercase:s(()=>dr,"_lowercase"),_lt:s(()=>it,"_lt"),_lte:s(()=>ze,"_lte"),_mac:s(()=>Ao,"_mac"),_map:s(()=>pv,"_map"),_max:s(()=>ze,"_max"),_maxLength:s(()=>ou,"_maxLength"),_maxSize:s(()=>Mt,"_maxSize"),_mime:s(()=>hr,"_mime"),_min:s(()=>Ce,"_min"),_minLength:s(()=>ht,"_minLength"),_minSize:s(()=>st,"_minSize"),_multipleOf:s(()=>Nt,"_multipleOf"),_nan:s(()=>t0,"_nan"),_nanoid:s(()=>qi,"_nanoid"),_nativeEnum:s(()=>hv,"_nativeEnum"),_negative:s(()=>rn,"_negative"),_never:s(()=>Xo,"_never"),_nonnegative:s(()=>sn,"_nonnegative"),_nonoptional:s(()=>wv,"_nonoptional"),_nonpositive:s(()=>nn,"_nonpositive"),_normalize:s(()=>gr,"_normalize"),_null:s(()=>Go,"_null"),_nullable:s(()=>Ev,"_nullable"),_number:s(()=>jo,"_number"),_optional:s(()=>yv,"_optional"),_overwrite:s(()=>Ke,"_overwrite"),_parse:s(()=>Hu,"_parse"),_parseAsync:s(()=>Xu,"_parseAsync"),_pipe:s(()=>Bv,"_pipe"),_positive:s(()=>un,"_positive"),_promise:s(()=>Av,"_promise"),_property:s(()=>an,"_property"),_readonly:s(()=>xv,"_readonly"),_record:s(()=>cv,"_record"),_refine:s(()=>n0,"_refine"),_regex:s(()=>lr,"_regex"),_safeDecode:s(()=>za,"_safeDecode"),_safeDecodeAsync:s(()=>Ma,"_safeDecodeAsync"),_safeEncode:s(()=>ja,"_safeEncode"),_safeEncodeAsync:s(()=>Na,"_safeEncodeAsync"),_safeParse:s(()=>Yu,"_safeParse"),_safeParseAsync:s(()=>Qu,"_safeParseAsync"),_set:s(()=>mv,"_set"),_size:s(()=>au,"_size"),_slugify:s(()=>br,"_slugify"),_startsWith:s(()=>mr,"_startsWith"),_string:s(()=>Co,"_string"),_stringFormat:s(()=>du,"_stringFormat"),_stringbool:s(()=>d0,"_stringbool"),_success:s(()=>Dv,"_success"),_superRefine:s(()=>s0,"_superRefine"),_symbol:s(()=>Jo,"_symbol"),_templateLiteral:s(()=>Cv,"_templateLiteral"),_toLowerCase:s(()=>yr,"_toLowerCase"),_toUpperCase:s(()=>Er,"_toUpperCase"),_transform:s(()=>vv,"_transform"),_trim:s(()=>vr,"_trim"),_tuple:s(()=>dv,"_tuple"),_uint32:s(()=>To,"_uint32"),_uint64:s(()=>Vo,"_uint64"),_ulid:s(()=>Vi,"_ulid"),_undefined:s(()=>Wo,"_undefined"),_union:s(()=>sv,"_union"),_unknown:s(()=>Ho,"_unknown"),_uppercase:s(()=>cr,"_uppercase"),_url:s(()=>or,"_url"),_uuid:s(()=>Oi,"_uuid"),_uuidv4:s(()=>Ri,"_uuidv4"),_uuidv6:s(()=>Ti,"_uuidv6"),_uuidv7:s(()=>Pi,"_uuidv7"),_void:s(()=>Yo,"_void"),_xid:s(()=>Ji,"_xid"),_xor:s(()=>av,"_xor"),clone:s(()=>Se,"clone"),config:s(()=>be,"config"),createStandardJSONSchemaMethod:s(()=>wr,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>Iv,"createToJSONSchemaMethod"),decode:s(()=>_5,"decode"),decodeAsync:s(()=>F5,"decodeAsync"),describe:s(()=>o0,"describe"),encode:s(()=>I5,"encode"),encodeAsync:s(()=>S5,"encodeAsync"),extractDefs:s(()=>Rt,"extractDefs"),finalize:s(()=>Tt,"finalize"),flattenError:s(()=>_i,"flattenError"),formatError:s(()=>Si,"formatError"),globalConfig:s(()=>Lu,"globalConfig"),globalRegistry:s(()=>Re,"globalRegistry"),initializeContext:s(()=>Ot,"initializeContext"),isValidBase64:s(()=>Fi,"isValidBase64"),isValidBase64URL:s(()=>Ja,"isValidBase64URL"),isValidJWT:s(()=>Wa,"isValidJWT"),locales:s(()=>yo,"locales"),meta:s(()=>l0,"meta"),parse:s(()=>ka,"parse"),parseAsync:s(()=>Aa,"parseAsync"),prettifyError:s(()=>Ca,"prettifyError"),process:s(()=>ie,"process"),regexes:s(()=>ft,"regexes"),registry:s(()=>Ni,"registry"),safeDecode:s(()=>z5,"safeDecode"),safeDecodeAsync:s(()=>M5,"safeDecodeAsync"),safeEncode:s(()=>j5,"safeEncode"),safeEncodeAsync:s(()=>N5,"safeEncodeAsync"),safeParse:s(()=>Q4,"safeParse"),safeParseAsync:s(()=>ef,"safeParseAsync"),toDotPath:s(()=>xa,"toDotPath"),toJSONSchema:s(()=>f0,"toJSONSchema"),treeifyError:s(()=>Ba,"treeifyError"),util:s(()=>te,"util"),version:s(()=>Hf,"version")});var b4,w4=Object.freeze({status:"aborted"});function B(e,t,r){function i(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let c=a.prototype,p=Object.keys(c);for(let m=0;m<p.length;m++){let f=p[m];f in l||(l[f]=c[f].bind(l))}}s(i,"o"),o(i,"init");let u=r?.Parent??Object;class n extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(n,"name",{value:e});function a(l){var d;let c=r?.Parent?new n:this;i(c,l),(d=c._zod).deferred??(d.deferred=[]);for(let p of c._zod.deferred)p();return c}return s(a,"s"),o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(B,"k"),o(B,"$constructor");var D4=Symbol("zod_brand"),Ft=class extends Error{static{s(this,"Qe")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ci=class extends Error{static{s(this,"St")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(b4=globalThis).__zod_globalConfig??(b4.__zod_globalConfig={});var Lu=globalThis.__zod_globalConfig;function be(e){return e&&Object.assign(Lu,e),Lu}s(be,"fe"),o(be,"config");var te={};ut(te,{BIGINT_FORMAT_RANGES:s(()=>T4,"BIGINT_FORMAT_RANGES"),Class:s(()=>A5,"Class"),NUMBER_FORMAT_RANGES:s(()=>R4,"NUMBER_FORMAT_RANGES"),aborted:s(()=>mt,"aborted"),allowsEval:s(()=>z4,"allowsEval"),assert:s(()=>k4,"assert"),assertEqual:s(()=>$4,"assertEqual"),assertIs:s(()=>x4,"assertIs"),assertNever:s(()=>C4,"assertNever"),assertNotEqual:s(()=>B4,"assertNotEqual"),assignProp:s(()=>rt,"assignProp"),base64ToUint8Array:s(()=>wa,"base64ToUint8Array"),base64urlToUint8Array:s(()=>G4,"base64urlToUint8Array"),cached:s(()=>uu,"cached"),captureStackTrace:s(()=>va,"captureStackTrace"),cleanEnum:s(()=>W4,"cleanEnum"),cleanRegex:s(()=>Ju,"cleanRegex"),clone:s(()=>Se,"clone"),cloneDef:s(()=>_4,"cloneDef"),createTransparentProxy:s(()=>O4,"createTransparentProxy"),defineLazy:s(()=>ee,"defineLazy"),esc:s(()=>Ai,"esc"),escapeRegex:s(()=>Ge,"escapeRegex"),explicitlyAborted:s(()=>ba,"explicitlyAborted"),extend:s(()=>q4,"extend"),finalizeIssue:s(()=>Ae,"finalizeIssue"),floatSafeRemainder:s(()=>ha,"floatSafeRemainder"),getElementAtPath:s(()=>S4,"getElementAtPath"),getEnumValues:s(()=>ki,"getEnumValues"),getLengthableOrigin:s(()=>Gu,"getLengthableOrigin"),getParsedType:s(()=>k5,"getParsedType"),getSizableOrigin:s(()=>Wu,"getSizableOrigin"),hexToUint8Array:s(()=>H4,"hexToUint8Array"),isObject:s(()=>jt,"isObject"),isPlainObject:s(()=>pt,"isPlainObject"),issue:s(()=>Ku,"issue"),joinValues:s(()=>O,"joinValues"),jsonStringifyReplacer:s(()=>Vu,"jsonStringifyReplacer"),merge:s(()=>L4,"merge"),mergeDefs:s(()=>We,"mergeDefs"),normalizeParams:s(()=>T,"normalizeParams"),nullish:s(()=>ct,"nullish"),numKeys:s(()=>N4,"numKeys"),objectClone:s(()=>I4,"objectClone"),omit:s(()=>U4,"omit"),optionalKeys:s(()=>Ea,"optionalKeys"),parsedType:s(()=>G,"parsedType"),partial:s(()=>V4,"partial"),pick:s(()=>P4,"pick"),prefixIssues:s(()=>Fe,"prefixIssues"),primitiveTypes:s(()=>M4,"primitiveTypes"),promiseAllObject:s(()=>F4,"promiseAllObject"),propertyKeyTypes:s(()=>Ii,"propertyKeyTypes"),randomString:s(()=>j4,"randomString"),required:s(()=>J4,"required"),safeExtend:s(()=>Z4,"safeExtend"),shallowClone:s(()=>ya,"shallowClone"),slugify:s(()=>ga,"slugify"),stringifyPrimitive:s(()=>J,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>Da,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>K4,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>X4,"uint8ArrayToHex"),unwrapMessage:s(()=>ru,"unwrapMessage")});function $4(e){return e}s($4,"nI"),o($4,"assertEqual");function B4(e){return e}s(B4,"oI"),o(B4,"assertNotEqual");function x4(e){}s(x4,"iI"),o(x4,"assertIs");function C4(e){throw new Error("Unexpected value in exhaustive check")}s(C4,"sI"),o(C4,"assertNever");function k4(e){}s(k4,"aI"),o(k4,"assert");function ki(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}s(ki,"In"),o(ki,"getEnumValues");function O(e,t="|"){return e.map(r=>J(r)).join(t)}s(O,"R"),o(O,"joinValues");function Vu(e,t){return typeof t=="bigint"?t.toString():t}s(Vu,"wr"),o(Vu,"jsonStringifyReplacer");function uu(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(uu,"xr"),o(uu,"cached");function ct(e){return e==null}s(ct,"It"),o(ct,"nullish");function Ju(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(Ju,"Rn"),o(Ju,"cleanRegex");function ha(e,t){let r=e/t,i=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<u?0:r-i}s(ha,"Sc"),o(ha,"floatSafeRemainder");var A4=Symbol("evaluating");function ee(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==A4)return i===void 0&&(i=A4,i=r()),i},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(ee,"Q"),o(ee,"defineLazy");function I4(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(I4,"cI"),o(I4,"objectClone");function rt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(rt,"Rt"),o(rt,"assignProp");function We(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}s(We,"gt"),o(We,"mergeDefs");function _4(e){return We(e._zod.def)}s(_4,"uI"),o(_4,"cloneDef");function S4(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}s(S4,"lI"),o(S4,"getElementAtPath");function F4(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let u={};for(let n=0;n<t.length;n++)u[t[n]]=i[n];return u})}s(F4,"dI"),o(F4,"promiseAllObject");function j4(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}s(j4,"pI"),o(j4,"randomString");function Ai(e){return JSON.stringify(e)}s(Ai,"ai"),o(Ai,"esc");function ga(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(ga,"Ic"),o(ga,"slugify");var va="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(jt,"Yt"),o(jt,"isObject");var z4=uu(()=>{if(Lu.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function pt(e){if(jt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(jt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(pt,"Et"),o(pt,"isPlainObject");function ya(e){return pt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(ya,"Ec"),o(ya,"shallowClone");function N4(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(N4,"fI"),o(N4,"numKeys");var k5=o(e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},"getParsedType"),Ii=new Set(["string","number","symbol"]),M4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Ge,"Je"),o(Ge,"escapeRegex");function Se(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}s(Se,"Te"),o(Se,"clone");function T(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:o(()=>t.error,"error")}:t}s(T,"B"),o(T,"normalizeParams");function O4(e){let t;return new Proxy({},{get(r,i,u){return t??(t=e()),Reflect.get(t,i,u)},set(r,i,u,n){return t??(t=e()),Reflect.set(t,i,u,n)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,u){return t??(t=e()),Reflect.defineProperty(t,i,u)}})}s(O4,"hI"),o(O4,"createTransparentProxy");function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(J,"D"),o(J,"stringifyPrimitive");function Ea(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(Ea,"Ac"),o(Ea,"optionalKeys");var R4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},T4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P4(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=We(e._zod.def,{get shape(){let n={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return rt(this,"shape",n),n},checks:[]});return Se(e,u)}s(P4,"gI"),o(P4,"pick");function U4(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=We(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return rt(this,"shape",n),n},checks:[]});return Se(e,u)}s(U4,"vI"),o(U4,"omit");function q4(e,t){if(!pt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let n in t)if(Object.getOwnPropertyDescriptor(u,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=We(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return rt(this,"shape",u),u}});return Se(e,i)}s(q4,"yI"),o(q4,"extend");function Z4(e,t){if(!pt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=We(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return rt(this,"shape",i),i}});return Se(e,r)}s(Z4,"bI"),o(Z4,"safeExtend");function L4(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=We(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return rt(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Se(e,r)}s(L4,"wI"),o(L4,"merge");function V4(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=We(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let l in r){if(!(l in n))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:n[l]}):n[l])}else for(let l in n)a[l]=e?new e({type:"optional",innerType:n[l]}):n[l];return rt(this,"shape",a),a},checks:[]});return Se(t,u)}s(V4,"xI"),o(V4,"partial");function J4(e,t,r){let i=We(t._zod.def,{get shape(){let u=t._zod.def.shape,n={...u};if(r)for(let a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(n[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)n[a]=new e({type:"nonoptional",innerType:u[a]});return rt(this,"shape",n),n}});return Se(t,i)}s(J4,"$I"),o(J4,"required");function mt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(mt,"Tt"),o(mt,"aborted");function ba(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(ba,"Oc"),o(ba,"explicitlyAborted");function Fe(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}s(Fe,"Oe"),o(Fe,"prefixIssues");function ru(e){return typeof e=="string"?e:e?.message}s(ru,"Sn"),o(ru,"unwrapMessage");function Ae(e,t,r){let i=e.message?e.message:ru(e.inst?._zod.def?.error?.(e))??ru(t?.error?.(e))??ru(r.customError?.(e))??ru(r.localeError?.(e))??"Invalid input",{inst:u,continue:n,input:a,...l}=e;return l.path??(l.path=[]),l.message=i,t?.reportInput&&(l.input=a),l}s(Ae,"Ae"),o(Ae,"finalizeIssue");function Wu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(Wu,"Tn"),o(Wu,"getSizableOrigin");function Gu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(Gu,"An"),o(Gu,"getLengthableOrigin");function G(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 r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(G,"U"),o(G,"parsedType");function Ku(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}s(Ku,"$r"),o(Ku,"issue");function W4(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(W4,"_I"),o(W4,"cleanEnum");function wa(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}s(wa,"sw"),o(wa,"base64ToUint8Array");function Da(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s(Da,"aw"),o(Da,"uint8ArrayToBase64");function G4(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return wa(t+r)}s(G4,"kI"),o(G4,"base64urlToUint8Array");function K4(e){return Da(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(K4,"SI"),o(K4,"uint8ArrayToBase64url");function H4(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}s(H4,"II"),o(H4,"hexToUint8Array");function X4(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(X4,"RI"),o(X4,"uint8ArrayToHex");var A5=class{static{s(this,"kc")}static{o(this,"Class")}constructor(...e){}},Y4=o((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vu,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),$a=B("$ZodError",Y4),je=B("$ZodError",Y4,{Parent:Error});function _i(e,t=r=>r.message){let r={},i=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):i.push(t(u));return{formErrors:i,fieldErrors:r}}s(_i,"zn"),o(_i,"flattenError");function Si(e,t=r=>r.message){let r={_errors:[]},i=o((u,n=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},[...n,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...n,...a.path]);else{let l=[...n,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,c=0;for(;c<l.length;){let p=l[c];c===l.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(t(a))):d[p]=d[p]||{_errors:[]},d=d[p],c++}}}},"processError");return i(e),r}s(Si,"On"),o(Si,"formatError");function Ba(e,t=r=>r.message){let r={errors:[]},i=o((u,n=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(c=>i({issues:c},[...n,...d.path]));else if(d.code==="invalid_key")i({issues:d.issues},[...n,...d.path]);else if(d.code==="invalid_element")i({issues:d.issues},[...n,...d.path]);else{let c=[...n,...d.path];if(c.length===0){r.errors.push(t(d));continue}let p=r,m=0;for(;m<c.length;){let f=c[m],h=m===c.length-1;typeof f=="string"?(p.properties??(p.properties={}),(a=p.properties)[f]??(a[f]={errors:[]}),p=p.properties[f]):(p.items??(p.items=[]),(l=p.items)[f]??(l[f]={errors:[]}),p=p.items[f]),h&&p.errors.push(t(d)),m++}}},"processError");return i(e),r}s(Ba,"Mc"),o(Ba,"treeifyError");function xa(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}s(xa,"uw"),o(xa,"toDotPath");function Ca(e){let t=[],r=[...e.issues].sort((i,u)=>(i.path??[]).length-(u.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${xa(i.path)}`);return t.join(`
|
|
2
|
+
`)}s(Ca,"Nc"),o(Ca,"prettifyError");var Hu=o(e=>(t,r,i,u)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Ft;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>Ae(d,n,be())));throw va(l,u?.callee),l}return a.value},"_parse"),ka=Hu(je),Xu=o(e=>async(t,r,i,u)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>Ae(d,n,be())));throw va(l,u?.callee),l}return a.value},"_parseAsync"),Aa=Xu(je),Yu=o(e=>(t,r,i)=>{let u=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},u);if(n instanceof Promise)throw new Ft;return n.issues.length?{success:!1,error:new(e??$a)(n.issues.map(a=>Ae(a,u,be())))}:{success:!0,data:n.value}},"_safeParse"),Q4=Yu(je),Qu=o(e=>async(t,r,i)=>{let u=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},u);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>Ae(a,u,be())))}:{success:!0,data:n.value}},"_safeParseAsync"),ef=Qu(je),Ia=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Hu(e)(t,r,u)},"_encode"),I5=Ia(je),_a=o(e=>(t,r,i)=>Hu(e)(t,r,i),"_decode"),_5=_a(je),Sa=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Xu(e)(t,r,u)},"_encodeAsync"),S5=Sa(je),Fa=o(e=>async(t,r,i)=>Xu(e)(t,r,i),"_decodeAsync"),F5=Fa(je),ja=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Yu(e)(t,r,u)},"_safeEncode"),j5=ja(je),za=o(e=>(t,r,i)=>Yu(e)(t,r,i),"_safeDecode"),z5=za(je),Na=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return Qu(e)(t,r,u)},"_safeEncodeAsync"),N5=Na(je),Ma=o(e=>async(t,r,i)=>Qu(e)(t,r,i),"_safeDecodeAsync"),M5=Ma(je),ft={};ut(ft,{base64:s(()=>vf,"base64"),base64url:s(()=>Ra,"base64url"),bigint:s(()=>$f,"bigint"),boolean:s(()=>xf,"boolean"),browserEmail:s(()=>L5,"browserEmail"),cidrv4:s(()=>hf,"cidrv4"),cidrv6:s(()=>gf,"cidrv6"),cuid:s(()=>tf,"cuid"),cuid2:s(()=>uf,"cuid2"),date:s(()=>wf,"date"),datetime:s(()=>Ua,"datetime"),domain:s(()=>W5,"domain"),duration:s(()=>of,"duration"),e164:s(()=>Ef,"e164"),email:s(()=>df,"email"),emoji:s(()=>Oa,"emoji"),extendedDuration:s(()=>O5,"extendedDuration"),guid:s(()=>lf,"guid"),hex:s(()=>G5,"hex"),hostname:s(()=>J5,"hostname"),html5Email:s(()=>U5,"html5Email"),httpProtocol:s(()=>yf,"httpProtocol"),idnEmail:s(()=>Z5,"idnEmail"),integer:s(()=>Bf,"integer"),ipv4:s(()=>pf,"ipv4"),ipv6:s(()=>mf,"ipv6"),ksuid:s(()=>sf,"ksuid"),lowercase:s(()=>Af,"lowercase"),mac:s(()=>ff,"mac"),md5_base64:s(()=>H5,"md5_base64"),md5_base64url:s(()=>X5,"md5_base64url"),md5_hex:s(()=>K5,"md5_hex"),nanoid:s(()=>af,"nanoid"),null:s(()=>Cf,"null"),number:s(()=>qa,"number"),rfc5322Email:s(()=>q5,"rfc5322Email"),sha1_base64:s(()=>Q5,"sha1_base64"),sha1_base64url:s(()=>ew,"sha1_base64url"),sha1_hex:s(()=>Y5,"sha1_hex"),sha256_base64:s(()=>uw,"sha256_base64"),sha256_base64url:s(()=>rw,"sha256_base64url"),sha256_hex:s(()=>tw,"sha256_hex"),sha384_base64:s(()=>nw,"sha384_base64"),sha384_base64url:s(()=>sw,"sha384_base64url"),sha384_hex:s(()=>iw,"sha384_hex"),sha512_base64:s(()=>ow,"sha512_base64"),sha512_base64url:s(()=>lw,"sha512_base64url"),sha512_hex:s(()=>aw,"sha512_hex"),string:s(()=>Df,"string"),time:s(()=>Pa,"time"),ulid:s(()=>rf,"ulid"),undefined:s(()=>kf,"undefined"),unicodeEmail:s(()=>cf,"unicodeEmail"),uppercase:s(()=>If,"uppercase"),uuid:s(()=>iu,"uuid"),uuid4:s(()=>R5,"uuid4"),uuid6:s(()=>T5,"uuid6"),uuid7:s(()=>P5,"uuid7"),xid:s(()=>nf,"xid")});var tf=/^[cC][0-9a-z]{6,}$/,uf=/^[0-9a-z]+$/,rf=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nf=/^[0-9a-vA-V]{20}$/,sf=/^[A-Za-z0-9]{27}$/,af=/^[a-zA-Z0-9_-]{21}$/,of=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,lf=/^([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})$/,iu=o(e=>e?new 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)$/,"uuid"),R5=iu(4),T5=iu(6),P5=iu(7),df=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,U5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,q5=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,cf=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Z5=cf,L5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,V5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Oa(){return new RegExp(V5,"u")}s(Oa,"Jc"),o(Oa,"emoji");var pf=/^(?:(?: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])$/,mf=/^(([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}|:))$/,ff=o(e=>{let t=Ge(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),hf=/^((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])$/,gf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vf=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ra=/^[A-Za-z0-9_-]*$/,J5=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,W5=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,yf=/^https?$/,Ef=/^\+[1-9]\d{6,14}$/,bf="(?:(?:\\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])))",wf=new RegExp(`^${bf}$`);function Ta(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}s(Ta,"pw"),o(Ta,"timeSource");function Pa(e){return new RegExp(`^${Ta(e)}$`)}s(Pa,"nu"),o(Pa,"time");function Ua(e){let t=Ta({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${bf}T(?:${i})$`)}s(Ua,"ou"),o(Ua,"datetime");var Df=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),$f=/^-?\d+n?$/,Bf=/^-?\d+$/,qa=/^-?\d+(?:\.\d+)?$/,xf=/^(?:true|false)$/i,Cf=/^null$/i,kf=/^undefined$/i,Af=/^[^A-Z]*$/,If=/^[^a-z]*$/,G5=/^[0-9a-fA-F]*$/;function nu(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(nu,"Mn"),o(nu,"fixedBase64");function su(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(su,"Nn"),o(su,"fixedBase64url");var K5=/^[0-9a-fA-F]{32}$/,H5=nu(22,"=="),X5=su(22),Y5=/^[0-9a-fA-F]{40}$/,Q5=nu(27,"="),ew=su(27),tw=/^[0-9a-fA-F]{64}$/,uw=nu(43,"="),rw=su(43),iw=/^[0-9a-fA-F]{96}$/,nw=nu(64,""),sw=su(64),aw=/^[0-9a-fA-F]{128}$/,ow=nu(86,"=="),lw=su(86),de=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),_f={number:"number",bigint:"bigint",object:"date"},Za=B("$ZodCheckLessThan",(e,t)=>{de.init(e,t);let r=_f[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),La=B("$ZodCheckGreaterThan",(e,t)=>{de.init(e,t);let r=_f[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sf=B("$ZodCheckMultipleOf",(e,t)=>{de.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ha(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Ff=B("$ZodCheckNumberFormat",(e,t)=>{de.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[u,n]=R4[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=n,r&&(l.pattern=Bf)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>n&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),jf=B("$ZodCheckBigIntFormat",(e,t)=>{de.init(e,t);let[r,i]=T4[t.format];e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=u=>{let n=u.value;n<r&&u.issues.push({origin:"bigint",input:n,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),n>i&&u.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),zf=B("$ZodCheckMaxSize",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;u.size<=t.maximum||i.issues.push({origin:Wu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Nf=B("$ZodCheckMinSize",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;u.size>=t.minimum||i.issues.push({origin:Wu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Mf=B("$ZodCheckSizeEquals",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=i=>{let u=i.value,n=u.size;if(n===t.size)return;let a=n>t.size;i.issues.push({origin:Wu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Of=B("$ZodCheckMaxLength",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;if(u.length<=t.maximum)return;let n=Gu(u);i.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Rf=B("$ZodCheckMinLength",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;if(u.length>=t.minimum)return;let n=Gu(u);i.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Tf=B("$ZodCheckLengthEquals",(e,t)=>{var r;de.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!ct(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=i=>{let u=i.value,n=u.length;if(n===t.length)return;let a=Gu(u),l=n>t.length;i.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),er=B("$ZodCheckStringFormat",(e,t)=>{var r,i;de.init(e,t),e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Pf=B("$ZodCheckRegex",(e,t)=>{er.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Uf=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Af),er.init(e,t)}),qf=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=If),er.init(e,t)}),Zf=B("$ZodCheckIncludes",(e,t)=>{de.init(e,t);let r=Ge(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(u=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),Lf=B("$ZodCheckStartsWith",(e,t)=>{de.init(e,t);let r=new RegExp(`^${Ge(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Vf=B("$ZodCheckEndsWith",(e,t)=>{de.init(e,t);let r=new RegExp(`.*${Ge(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Va(e,t,r){e.issues.length&&t.issues.push(...Fe(r,e.issues))}s(Va,"fw"),o(Va,"handleCheckPropertyResult");var Jf=B("$ZodCheckProperty",(e,t)=>{de.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(u=>Va(u,r,t.property));Va(i,r,t.property)}}),Wf=B("$ZodCheckMimeType",(e,t)=>{de.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Gf=B("$ZodCheckOverwrite",(e,t)=>{de.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),Kf=class{static{s(this,"Pn")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
3
3
|
`).filter(u=>u),r=Math.min(...t.map(u=>u.length-u.trimStart().length)),i=t.map(u=>u.slice(r)).map(u=>" ".repeat(this.indent*2)+u);for(let u of i)this.content.push(u)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...t,r.join(`
|
|
4
|
-
`))}},W4={major:4,minor:4,patch:3},H=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=W4;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let n of u._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let c=it(a),p;for(let h of l){if(h._zod.def.when){if(Ks(a)||!h._zod.def.when(a))continue}else if(c)continue;let m=a.issues.length,f=h._zod.check(a);if(f instanceof Promise&&d?.async===!1)throw new Ct;if(p||f instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(c||(c=it(a,m)))});else{if(a.issues.length===m)continue;c||(c=it(a,m))}}return p?p.then(()=>a):a},"runChecks"),n=o((a,l,d)=>{if(it(a))return a.aborted=!0,a;let c=u(l,i,d);if(c instanceof Promise){if(d.async===!1)throw new Ct;return c.then(p=>e._zod.parse(p,d))}return e._zod.parse(c,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(p=>n(p,a,l)):n(c,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Ct;return d.then(c=>u(c,i,l))}return u(d,i,l)}}ee(e,"~standard",()=>({validate:o(u=>{try{let n=Xm(e,u);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ym(e,u).then(n=>n.success?{value:n.data}:{issues:n.error?.issues})}},"validate"),vendor:"zod",version:1}))}),qu=w("$ZodString",(e,t)=>{H.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??E4(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),se=w("$ZodStringFormat",(e,t)=>{Zu.init(e,t),qu.init(e,t)}),G4=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=s4),se.init(e,t)}),K4=w("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ht(r))}else t.pattern??(t.pattern=Ht());se.init(e,t)}),H4=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=a4),se.init(e,t)}),X4=w("$ZodURL",(e,t)=>{se.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===h4.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Y4=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pa()),se.init(e,t)}),Q4=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=n4),se.init(e,t)}),ef=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Qm),se.init(e,t)}),tf=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=e4),se.init(e,t)}),uf=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=t4),se.init(e,t)}),rf=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=u4),se.init(e,t)}),nf=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=r4),se.init(e,t)}),sf=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ga(t)),se.init(e,t)}),af=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=y4),se.init(e,t)}),of=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ha(t)),se.init(e,t)}),lf=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=i4),se.init(e,t)}),df=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=l4),se.init(e,t),e._zod.bag.format="ipv4"}),cf=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=d4),se.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),pf=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=c4(t.delimiter)),se.init(e,t),e._zod.bag.format="mac"}),mf=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=p4),se.init(e,t)}),ff=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=m4),se.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[u,n]=i;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function mn(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(mn,"$u"),o(mn,"isValidBase64");var hf=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=f4),se.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{mn(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Da(e){if(!ma.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return mn(r)}s(Da,"Tb"),o(Da,"isValidBase64URL");var gf=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ma),se.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Da(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),vf=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=g4),se.init(e,t)});function wa(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let u=JSON.parse(atob(i));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(wa,"Ab"),o(wa,"isValidJWT");var yf=w("$ZodJWT",(e,t)=>{se.init(e,t),e._zod.check=r=>{wa(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ef=w("$ZodCustomStringFormat",(e,t)=>{se.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),$a=w("$ZodNumber",(e,t)=>{H.init(e,t),e._zod.pattern=e._zod.bag.pattern??va,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let n=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...n?{received:n}:{}}),r}}),bf=w("$ZodNumberFormat",(e,t)=>{I4.init(e,t),$a.init(e,t)}),Ba=w("$ZodBoolean",(e,t)=>{H.init(e,t),e._zod.pattern=w4,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),xa=w("$ZodBigInt",(e,t)=>{H.init(e,t),e._zod.pattern=b4,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Df=w("$ZodBigIntFormat",(e,t)=>{_4.init(e,t),xa.init(e,t)}),wf=w("$ZodSymbol",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),$f=w("$ZodUndefined",(e,t)=>{H.init(e,t),e._zod.pattern=B4,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Bf=w("$ZodNull",(e,t)=>{H.init(e,t),e._zod.pattern=$4,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),xf=w("$ZodAny",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),Cf=w("$ZodUnknown",(e,t)=>{H.init(e,t),e._zod.parse=r=>r}),kf=w("$ZodNever",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Af=w("$ZodVoid",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),If=w("$ZodDate",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,n=u instanceof Date;return n&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...n?{received:"Invalid Date"}:{},inst:e}),r}});function Ca(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}s(Ca,"hb"),o(Ca,"handleArrayResult");var _f=w("$ZodArray",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let n=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?n.push(d.then(c=>Ca(c,r,a))):Ca(d,r,a)}return n.length?Promise.all(n).then(()=>r):r}});function Lu(e,t,r,i,u,n){let a=r in i;if(e.issues.length){if(u&&n&&!a)return;t.issues.push(...Ie(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(Lu,"ni"),o(Lu,"handlePropertyResult");function ka(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Gs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(ka,"zb"),o(ka,"normalizeDef");function Aa(e,t,r,i,u,n){let a=[],l=u.keySet,d=u.catchall._zod,c=d.def.type,p=d.optin==="optional",h=d.optout==="optional";for(let m in t){if(m==="__proto__"||l.has(m))continue;if(c==="never"){a.push(m);continue}let f=d.run({value:t[m],issues:[]},i);f instanceof Promise?e.push(f.then(g=>Lu(g,r,m,t,p,h))):Lu(f,r,m,t,p,h)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length?Promise.all(e).then(()=>r):r}s(Aa,"jb"),o(Aa,"handleCatchall");var Sf=w("$ZodObject",(e,t)=>{if(H.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=Gt(()=>ka(t));ee(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let c=a[d]._zod;if(c.values){l[d]??(l[d]=new Set);for(let p of c.values)l[d].add(p)}}return l});let i=kt,u=t.catchall,n;e._zod.parse=(a,l)=>{n??(n=r.value);let d=a.value;if(!i(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let c=[],p=n.shape;for(let h of n.keys){let m=p[h],f=m._zod.optin==="optional",g=m._zod.optout==="optional",E=m._zod.run({value:d[h],issues:[]},l);E instanceof Promise?c.push(E.then(b=>Lu(b,a,h,d,f,g))):Lu(E,a,h,d,f,g)}return u?Aa(c,d,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),Ff=w("$ZodObjectJIT",(e,t)=>{Sf.init(e,t);let r=e._zod.parse,i=Gt(()=>ka(t)),u=o(h=>{let m=new V4(["shape","payload","ctx"]),f=i.value,g=o(A=>{let _=ln(A);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`},"parseStr");m.write("const input = payload.value;");let E=Object.create(null),b=0;for(let A of f.keys)E[A]=`key_${b++}`;m.write("const newResult = {};");for(let A of f.keys){let _=E[A],j=ln(A),F=h[A],D=F?._zod?.optin==="optional",B=F?._zod?.optout==="optional";m.write(`const ${_} = ${g(A)};`),D&&B?m.write(`
|
|
5
|
-
if (${
|
|
6
|
-
if (${
|
|
7
|
-
payload.issues = payload.issues.concat(${
|
|
4
|
+
`))}},Hf={major:4,minor:4,patch:3},X=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hf;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let n of u._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let c=mt(a),p;for(let m of l){if(m._zod.def.when){if(ba(a)||!m._zod.def.when(a))continue}else if(c)continue;let f=a.issues.length,h=m._zod.check(a);if(h instanceof Promise&&d?.async===!1)throw new Ft;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,a.issues.length!==f&&(c||(c=mt(a,f)))});else{if(a.issues.length===f)continue;c||(c=mt(a,f))}}return p?p.then(()=>a):a},"runChecks"),n=o((a,l,d)=>{if(mt(a))return a.aborted=!0,a;let c=u(l,i,d);if(c instanceof Promise){if(d.async===!1)throw new Ft;return c.then(p=>e._zod.parse(p,d))}return e._zod.parse(c,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(p=>n(p,a,l)):n(c,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Ft;return d.then(c=>u(c,i,l))}return u(d,i,l)}}ee(e,"~standard",()=>({validate:o(u=>{try{let n=Q4(e,u);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ef(e,u).then(n=>n.success?{value:n.data}:{issues:n.error?.issues})}},"validate"),vendor:"zod",version:1}))}),tr=B("$ZodString",(e,t)=>{X.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Df(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),se=B("$ZodStringFormat",(e,t)=>{er.init(e,t),tr.init(e,t)}),Xf=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lf),se.init(e,t)}),Yf=B("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=iu(r))}else t.pattern??(t.pattern=iu());se.init(e,t)}),Qf=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=df),se.init(e,t)}),eh=B("$ZodURL",(e,t)=>{se.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===yf.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),th=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Oa()),se.init(e,t)}),uh=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=af),se.init(e,t)}),rh=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tf),se.init(e,t)}),ih=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=uf),se.init(e,t)}),nh=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=rf),se.init(e,t)}),sh=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=nf),se.init(e,t)}),ah=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=sf),se.init(e,t)}),oh=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ua(t)),se.init(e,t)}),lh=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wf),se.init(e,t)}),dh=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Pa(t)),se.init(e,t)}),ch=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=of),se.init(e,t)}),ph=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pf),se.init(e,t),e._zod.bag.format="ipv4"}),mh=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mf),se.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),fh=B("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ff(t.delimiter)),se.init(e,t),e._zod.bag.format="mac"}),hh=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=hf),se.init(e,t)}),gh=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gf),se.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[u,n]=i;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Fi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(Fi,"Qu"),o(Fi,"isValidBase64");var vh=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=vf),se.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Fi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Ja(e){if(!Ra.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fi(r)}s(Ja,"Aw"),o(Ja,"isValidBase64URL");var yh=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ra),se.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Ja(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Eh=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ef),se.init(e,t)});function Wa(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let u=JSON.parse(atob(i));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(Wa,"jw"),o(Wa,"isValidJWT");var bh=B("$ZodJWT",(e,t)=>{se.init(e,t),e._zod.check=r=>{Wa(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),wh=B("$ZodCustomStringFormat",(e,t)=>{se.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ga=B("$ZodNumber",(e,t)=>{X.init(e,t),e._zod.pattern=e._zod.bag.pattern??qa,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let n=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...n?{received:n}:{}}),r}}),Dh=B("$ZodNumberFormat",(e,t)=>{Ff.init(e,t),Ga.init(e,t)}),Ka=B("$ZodBoolean",(e,t)=>{X.init(e,t),e._zod.pattern=xf,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),Ha=B("$ZodBigInt",(e,t)=>{X.init(e,t),e._zod.pattern=$f,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),$h=B("$ZodBigIntFormat",(e,t)=>{jf.init(e,t),Ha.init(e,t)}),Bh=B("$ZodSymbol",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),xh=B("$ZodUndefined",(e,t)=>{X.init(e,t),e._zod.pattern=kf,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Ch=B("$ZodNull",(e,t)=>{X.init(e,t),e._zod.pattern=Cf,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),kh=B("$ZodAny",(e,t)=>{X.init(e,t),e._zod.parse=r=>r}),Ah=B("$ZodUnknown",(e,t)=>{X.init(e,t),e._zod.parse=r=>r}),Ih=B("$ZodNever",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),_h=B("$ZodVoid",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),Sh=B("$ZodDate",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,n=u instanceof Date;return n&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...n?{received:"Invalid Date"}:{},inst:e}),r}});function Xa(e,t,r){e.issues.length&&t.issues.push(...Fe(r,e.issues)),t.value[r]=e.value}s(Xa,"gw"),o(Xa,"handleArrayResult");var Fh=B("$ZodArray",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let n=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?n.push(d.then(c=>Xa(c,r,a))):Xa(d,r,a)}return n.length?Promise.all(n).then(()=>r):r}});function ur(e,t,r,i,u,n){let a=r in i;if(e.issues.length){if(u&&n&&!a)return;t.issues.push(...Fe(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(ur,"Ii"),o(ur,"handlePropertyResult");function Ya(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Ea(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(Ya,"zw"),o(Ya,"normalizeDef");function Qa(e,t,r,i,u,n){let a=[],l=u.keySet,d=u.catchall._zod,c=d.def.type,p=d.optin==="optional",m=d.optout==="optional";for(let f in t){if(f==="__proto__"||l.has(f))continue;if(c==="never"){a.push(f);continue}let h=d.run({value:t[f],issues:[]},i);h instanceof Promise?e.push(h.then(g=>ur(g,r,f,t,p,m))):ur(h,r,f,t,p,m)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length?Promise.all(e).then(()=>r):r}s(Qa,"Ow"),o(Qa,"handleCatchall");var jh=B("$ZodObject",(e,t)=>{if(X.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=uu(()=>Ya(t));ee(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let c=a[d]._zod;if(c.values){l[d]??(l[d]=new Set);for(let p of c.values)l[d].add(p)}}return l});let i=jt,u=t.catchall,n;e._zod.parse=(a,l)=>{n??(n=r.value);let d=a.value;if(!i(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let c=[],p=n.shape;for(let m of n.keys){let f=p[m],h=f._zod.optin==="optional",g=f._zod.optout==="optional",b=f._zod.run({value:d[m],issues:[]},l);b instanceof Promise?c.push(b.then(x=>ur(x,a,m,d,h,g))):ur(b,a,m,d,h,g)}return u?Qa(c,d,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),zh=B("$ZodObjectJIT",(e,t)=>{jh.init(e,t);let r=e._zod.parse,i=uu(()=>Ya(t)),u=o(m=>{let f=new Kf(["shape","payload","ctx"]),h=i.value,g=o(w=>{let k=Ai(w);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`},"parseStr");f.write("const input = payload.value;");let b=Object.create(null),x=0;for(let w of h.keys)b[w]=`key_${x++}`;f.write("const newResult = {};");for(let w of h.keys){let k=b[w],C=Ai(w),M=m[w],y=M?._zod?.optin==="optional",D=M?._zod?.optout==="optional";f.write(`const ${k} = ${g(w)};`),y&&D?f.write(`
|
|
5
|
+
if (${k}.issues.length) {
|
|
6
|
+
if (${C} in input) {
|
|
7
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
8
8
|
...iss,
|
|
9
|
-
path: iss.path ? [${
|
|
9
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
10
10
|
})));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (${
|
|
15
|
-
if (${
|
|
16
|
-
newResult[${
|
|
14
|
+
if (${k}.value === undefined) {
|
|
15
|
+
if (${C} in input) {
|
|
16
|
+
newResult[${C}] = undefined;
|
|
17
17
|
}
|
|
18
18
|
} else {
|
|
19
|
-
newResult[${
|
|
19
|
+
newResult[${C}] = ${k}.value;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
`):
|
|
23
|
-
if (${
|
|
24
|
-
payload.issues = payload.issues.concat(${
|
|
22
|
+
`):y?f.write(`
|
|
23
|
+
if (${k}.issues.length) {
|
|
24
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
25
25
|
...iss,
|
|
26
|
-
path: iss.path ? [${
|
|
26
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
27
27
|
})));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
if (${
|
|
31
|
-
if (${
|
|
32
|
-
newResult[${
|
|
30
|
+
if (${k}.value === undefined) {
|
|
31
|
+
if (${C} in input) {
|
|
32
|
+
newResult[${C}] = undefined;
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
|
-
newResult[${
|
|
35
|
+
newResult[${C}] = ${k}.value;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
`):
|
|
39
|
-
const ${
|
|
40
|
-
if (${
|
|
41
|
-
payload.issues = payload.issues.concat(${
|
|
38
|
+
`):f.write(`
|
|
39
|
+
const ${k}_present = ${C} in input;
|
|
40
|
+
if (${k}.issues.length) {
|
|
41
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
42
42
|
...iss,
|
|
43
|
-
path: iss.path ? [${
|
|
43
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
44
44
|
})));
|
|
45
45
|
}
|
|
46
|
-
if (!${
|
|
46
|
+
if (!${k}_present && !${k}.issues.length) {
|
|
47
47
|
payload.issues.push({
|
|
48
48
|
code: "invalid_type",
|
|
49
49
|
expected: "nonoptional",
|
|
50
50
|
input: undefined,
|
|
51
|
-
path: [${
|
|
51
|
+
path: [${C}]
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
if (${
|
|
56
|
-
if (${
|
|
57
|
-
newResult[${
|
|
55
|
+
if (${k}_present) {
|
|
56
|
+
if (${k}.value === undefined) {
|
|
57
|
+
newResult[${C}] = undefined;
|
|
58
58
|
} else {
|
|
59
|
-
newResult[${
|
|
59
|
+
newResult[${C}] = ${k}.value;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");let $=m.compile();return(A,_)=>$(h,A,_)},"generateFastpass"),n,a=kt,l=!Fu.jitless,d=l&&Fm.value,c=t.catchall,p;e._zod.parse=(h,m)=>{p??(p=i.value);let f=h.value;return a(f)?l&&d&&m?.async===!1&&m.jitless!==!0?(n||(n=u(t.shape)),h=n(h,m),c?Aa([],f,h,m,p,e):h):r(h,m):(h.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),h)}});function Ia(e,t,r,i){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let u=e.filter(n=>!it(n));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>xe(a,i,Ee())))}),t)}s(Ia,"gb"),o(Ia,"handleUnionResults");var fn=w("$ZodUnion",(e,t)=>{H.init(e,t),ee(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ee(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ee(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),ee(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>zu(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);if(d instanceof Promise)a.push(d),n=!0;else{if(d.issues.length===0)return d;a.push(d)}}return n?Promise.all(a).then(l=>Ia(l,i,e,u)):Ia(a,i,e,u)}});function _a(e,t,r,i){let u=e.filter(n=>n.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>xe(a,i,Ee())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(_a,"vb"),o(_a,"handleExclusiveUnionResults");var jf=w("$ZodXor",(e,t)=>{fn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);d instanceof Promise?(a.push(d),n=!0):a.push(d)}return n?Promise.all(a).then(l=>_a(l,i,e,u)):_a(a,i,e,u)}}),zf=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fn.init(e,t);let r=e._zod.parse;ee(e._zod,"propValues",()=>{let u={};for(let n of t.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let c of d)u[l].add(c)}}return u});let i=Gt(()=>{let u=t.options,n=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(n.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);n.set(d,a)}}return n});e._zod.parse=(u,n)=>{let a=u.value;if(!kt(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=i.value.get(a?.[t.discriminator]);return l?l._zod.run(u,n):t.unionFallback||n.direction==="backward"?r(u,n):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),Nf=w("$ZodIntersection",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value,n=t.left._zod.run({value:u,issues:[]},i),a=t.right._zod.run({value:u,issues:[]},i);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([l,d])=>Sa(r,l,d)):Sa(r,n,a)}});function hn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nt(e)&&nt(t)){let r=Object.keys(t),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),u={...e,...t};for(let n of i){let a=hn(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};u[n]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let u=e[i],n=t[i],a=hn(u,n);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(hn,"tu"),o(hn,"mergeValues");function Sa(e,t,r){let i=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let n=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(n.length&&u&&e.issues.push({...u,keys:n}),it(e))return e;let a=hn(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(Sa,"yb"),o(Sa,"handleIntersectionResults");var Fa=w("$ZodTuple",(e,t)=>{H.init(e,t);let r=t.items;e._zod.parse=(i,u)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],l=ja(r,"optin"),d=ja(r,"optout");if(!t.rest){if(n.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:n,inst:e,origin:"array"}),i;n.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=new Array(r.length);for(let p=0;p<r.length;p++){let h=r[p]._zod.run({value:n[p],issues:[]},u);h instanceof Promise?a.push(h.then(m=>{c[p]=m})):c[p]=h}if(t.rest){let p=r.length-1,h=n.slice(r.length);for(let m of h){p++;let f=t.rest._zod.run({value:m,issues:[]},u);f instanceof Promise?a.push(f.then(g=>za(g,i,p))):za(f,i,p)}}return a.length?Promise.all(a).then(()=>Na(c,i,r,n,d)):Na(c,i,r,n,d)}});function ja(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(ja,"bb"),o(ja,"getTupleOptStart");function za(e,t,r){e.issues.length&&t.issues.push(...Ie(r,e.issues)),t.value[r]=e.value}s(za,"wb"),o(za,"handleTupleResult");function Na(e,t,r,i,u){for(let n=0;n<r.length;n++){let a=e[n],l=n<i.length;if(a.issues.length){if(!l&&n>=u){t.value.length=n;break}t.issues.push(...Ie(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=i.length&&r[n]._zod.optout==="optional"&&t.value[n]===void 0;n--)t.value.length=n;return t}s(Na,"xb"),o(Na,"handleTupleResults");var Of=w("$ZodRecord",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!nt(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){l.add(typeof c=="number"?c.toString():c);let p=t.keyType._zod.run({value:c,issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(f=>xe(f,i,Ee())),input:c,path:[c],inst:e});continue}let h=p.value,m=t.valueType._zod.run({value:u[c],issues:[]},i);m instanceof Promise?n.push(m.then(f=>{f.issues.length&&r.issues.push(...Ie(c,f.issues)),r.value[h]=f.value})):(m.issues.length&&r.issues.push(...Ie(c,m.issues)),r.value[h]=m.value)}let d;for(let c in u)l.has(c)||(d=d??[],d.push(c));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&va.test(l)&&d.issues.length){let p=t.keyType._zod.run({value:Number(l),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>xe(p,i,Ee())),input:l,path:[l],inst:e});continue}let c=t.valueType._zod.run({value:u[l],issues:[]},i);c instanceof Promise?n.push(c.then(p=>{p.issues.length&&r.issues.push(...Ie(l,p.issues)),r.value[d.value]=p.value})):(c.issues.length&&r.issues.push(...Ie(l,c.issues)),r.value[d.value]=c.value)}}return n.length?Promise.all(n).then(()=>r):r}}),Rf=w("$ZodMap",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let n=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||c instanceof Promise?n.push(Promise.all([d,c]).then(([p,h])=>{Oa(p,h,r,a,u,e,i)})):Oa(d,c,r,a,u,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function Oa(e,t,r,i,u,n,a){e.issues.length&&(dn.has(typeof i)?r.issues.push(...Ie(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:n,issues:e.issues.map(l=>xe(l,a,Ee()))})),t.issues.length&&(dn.has(typeof i)?r.issues.push(...Ie(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:n,key:i,issues:t.issues.map(l=>xe(l,a,Ee()))})),r.value.set(e.value,t.value)}s(Oa,"$b"),o(Oa,"handleMapResult");var Tf=w("$ZodSet",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let n=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise?n.push(l.then(d=>Ra(d,r))):Ra(l,r)}return n.length?Promise.all(n).then(()=>r):r}});function Ra(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s(Ra,"_b"),o(Ra,"handleSetResult");var Mf=w("$ZodEnum",(e,t)=>{H.init(e,t);let r=on(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(u=>dn.has(typeof u)).map(u=>typeof u=="string"?Ue(u):u.toString()).join("|")})$`),e._zod.parse=(u,n)=>{let a=u.value;return i.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),Pf=w("$ZodLiteral",(e,t)=>{if(H.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Ue(i):i?Ue(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,u)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),Uf=w("$ZodFile",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),Zf=w("$ZodTransform",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new an(e.constructor.name);let u=t.transform(r.value,r);if(i.async)return(u instanceof Promise?u:Promise.resolve(u)).then(n=>(r.value=n,r.fallback=!0,r));if(u instanceof Promise)throw new Ct;return r.value=u,r.fallback=!0,r}});function Ta(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s(Ta,"kb"),o(Ta,"handleOptionalResult");var Ma=w("$ZodOptional",(e,t)=>{H.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ee(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zu(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>Ta(a,u)):Ta(n,u)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),qf=w("$ZodExactOptional",(e,t)=>{Ma.init(e,t),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Lf=w("$ZodNullable",(e,t)=>{H.init(e,t),ee(e._zod,"optin",()=>t.innerType._zod.optin),ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${zu(r.source)}|null)$`):void 0}),ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Jf=w("$ZodDefault",(e,t)=>{H.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>Pa(n,t)):Pa(u,t)}});function Pa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(Pa,"Sb"),o(Pa,"handleDefaultResult");var Vf=w("$ZodPrefault",(e,t)=>{H.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Wf=w("$ZodNonOptional",(e,t)=>{H.init(e,t),ee(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>Ua(n,e)):Ua(u,e)}});function Ua(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(Ua,"Ib"),o(Ua,"handleNonOptionalResult");var Gf=w("$ZodSuccess",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new an("ZodSuccess");let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),Kf=w("$ZodCatch",(e,t)=>{H.init(e,t),e._zod.optin="optional",ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(a=>xe(a,i,Ee()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(n=>xe(n,i,Ee()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Hf=w("$ZodNaN",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Za=w("$ZodPipe",(e,t)=>{H.init(e,t),ee(e._zod,"values",()=>t.in._zod.values),ee(e._zod,"optin",()=>t.in._zod.optin),ee(e._zod,"optout",()=>t.out._zod.optout),ee(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let n=t.out._zod.run(r,i);return n instanceof Promise?n.then(a=>Ju(a,t.in,i)):Ju(n,t.in,i)}let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>Ju(n,t.out,i)):Ju(u,t.out,i)}});function Ju(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(Ju,"ei"),o(Ju,"handlePipeResult");var qa=w("$ZodCodec",(e,t)=>{H.init(e,t),ee(e._zod,"values",()=>t.in._zod.values),ee(e._zod,"optin",()=>t.in._zod.optin),ee(e._zod,"optout",()=>t.out._zod.optout),ee(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>Vu(n,t,i)):Vu(u,t,i)}else{let u=t.out._zod.run(r,i);return u instanceof Promise?u.then(n=>Vu(n,t,i)):Vu(u,t,i)}}});function Vu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(u=>Wu(e,u,t.out,r)):Wu(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(u=>Wu(e,u,t.in,r)):Wu(e,i,t.in,r)}}s(Vu,"ti"),o(Vu,"handleCodecAResult");function Wu(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}s(Wu,"ri"),o(Wu,"handleCodecTxResult");var Xf=w("$ZodPreprocess",(e,t)=>{Za.init(e,t)}),Yf=w("$ZodReadonly",(e,t)=>{H.init(e,t),ee(e._zod,"propValues",()=>t.innerType._zod.propValues),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"optin",()=>t.innerType?._zod?.optin),ee(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(La):La(u)}});function La(e){return e.value=Object.freeze(e.value),e}s(La,"Rb"),o(La,"handleReadonlyResult");var Qf=w("$ZodTemplateLiteral",(e,t)=>{H.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let u=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let n=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(n,a))}else if(i===null||zm.has(typeof i))r.push(Ue(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,u)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),eh=w("$ZodFunction",(e,t)=>(H.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let u=e._def.input?ua(e._def.input,i):i,n=Reflect.apply(r,this,u);return e._def.output?ua(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let u=e._def.input?await ra(e._def.input,i):i,n=await Reflect.apply(r,this,u);return e._def.output?await ra(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Fa({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),th=w("$ZodPromise",(e,t)=>{H.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},i))}),uh=w("$ZodLazy",(e,t)=>{H.init(e,t),ee(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),ee(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ee(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ee(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ee(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),rh=w("$ZodCustom",(e,t)=>{oe.init(e,t),H.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,u=t.fn(i);if(u instanceof Promise)return u.then(n=>Ja(n,r,i,e));Ja(u,r,i,e)}});function Ja(e,t,r,i){if(!e){let u={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(u.params=i._zod.def.params),t.issues.push(Ru(u))}}s(Ja,"Eb"),o(Ja,"handleRefineResult");var Va={};Ge(Va,{ar:s(()=>nh,"ar"),az:s(()=>ih,"az"),be:s(()=>sh,"be"),bg:s(()=>ah,"bg"),ca:s(()=>oh,"ca"),cs:s(()=>lh,"cs"),da:s(()=>dh,"da"),de:s(()=>ch,"de"),el:s(()=>ph,"el"),en:s(()=>Ga,"en"),eo:s(()=>mh,"eo"),es:s(()=>fh,"es"),fa:s(()=>hh,"fa"),fi:s(()=>gh,"fi"),fr:s(()=>vh,"fr"),frCA:s(()=>yh,"frCA"),he:s(()=>Eh,"he"),hr:s(()=>bh,"hr"),hu:s(()=>Dh,"hu"),hy:s(()=>wh,"hy"),id:s(()=>$h,"id"),is:s(()=>Bh,"is"),it:s(()=>xh,"it"),ja:s(()=>Ch,"ja"),ka:s(()=>kh,"ka"),kh:s(()=>Ah,"kh"),km:s(()=>Ha,"km"),ko:s(()=>Ih,"ko"),lt:s(()=>_h,"lt"),mk:s(()=>Sh,"mk"),ms:s(()=>Fh,"ms"),nl:s(()=>jh,"nl"),no:s(()=>zh,"no"),ota:s(()=>Nh,"ota"),pl:s(()=>Rh,"pl"),ps:s(()=>Oh,"ps"),pt:s(()=>Th,"pt"),ro:s(()=>Mh,"ro"),ru:s(()=>Ph,"ru"),sl:s(()=>Uh,"sl"),sv:s(()=>Zh,"sv"),ta:s(()=>qh,"ta"),th:s(()=>Lh,"th"),tr:s(()=>Jh,"tr"),ua:s(()=>Vh,"ua"),uk:s(()=>Qa,"uk"),ur:s(()=>Wh,"ur"),uz:s(()=>Gh,"uz"),vi:s(()=>Kh,"vi"),yo:s(()=>Yh,"yo"),zhCN:s(()=>Hh,"zhCN"),zhTW:s(()=>Xh,"zhTW")});var F5=o(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return u.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${V(u.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${u.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${r[n.format]??u.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function nh(){return{localeError:F5()}}s(nh,"dl"),o(nh,"default");var j5=o(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${V(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[n.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function ih(){return{localeError:j5()}}s(ih,"pl"),o(ih,"default");function Wa(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Wa,"Nb"),o(Wa,"getBelarusianPlural");var z5=o(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${V(u.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Wa(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Wa(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function sh(){return{localeError:z5()}}s(sh,"fl"),o(sh,"default");var N5=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${V(u.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function ah(){return{localeError:N5()}}s(ah,"ml"),o(ah,"default");var O5=o(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${V(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${z(u.values," o ")}`;case"too_big":{let n=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${n} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${n} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function oh(){return{localeError:O5()}}s(oh,"hl"),o(oh,"default");var R5=o(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${V(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${r[n.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${z(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function lh(){return{localeError:R5()}}s(lh,"gl"),o(lh,"default");var T5=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${n}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${V(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${n} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${n} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function dh(){return{localeError:T5()}}s(dh,"vl"),o(dh,"default");var M5=o(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${V(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ist`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ist`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function ch(){return{localeError:M5()}}s(ch,"yl"),o(ch,"default");var P5=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${V(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function ph(){return{localeError:P5()}}s(ph,"bl"),o(ph,"default");var U5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Invalid input: expected ${n}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`Invalid option: expected one of ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${n}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${n}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(n=>`'${n}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function Ga(){return{localeError:U5()}}s(Ga,"kn"),o(Ga,"default");var Z5=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${V(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${n}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function mh(){return{localeError:Z5()}}s(mh,"wl"),o(mh,"default");var q5=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${V(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${n}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function fh(){return{localeError:q5()}}s(fh,"xl"),o(fh,"default");var L5=o(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${V(u.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${z(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[n.format]??u.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${z(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function hh(){return{localeError:L5()}}s(hh,"$l"),o(hh,"default");var J5=o(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${V(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${z(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function gh(){return{localeError:J5()}}s(gh,"_l"),o(gh,"default");var V5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${V(u.values[0])} attendu`:`Option invalide : une valeur parmi ${z(u.values,"|")} attendue`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function vh(){return{localeError:V5()}}s(vh,"kl"),o(vh,"default");var W5=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${V(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${n}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${z(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function yh(){return{localeError:W5()}}s(yh,"Sl"),o(yh,"default");var G5=o(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=o(c=>c?e[c]:void 0,"typeEntry"),i=o(c=>{let p=r(c);return p?p.label:c??e.unknown.label},"typeLabel"),u=o(c=>`\u05D4${i(c)}`,"withDefinite"),n=o(c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(c=>c?t[c]??null:null,"getSizing"),l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let p=c.expected,h=d[p??""]??i(p),m=G(c.input),f=d[m]??e[m]?.label??m;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${V(c.values[0])}`;let p=c.values.map(m=>V(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p[0]} \u05D0\u05D5 ${p[1]}`;let h=p[p.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${h}`}case"too_big":{let p=a(c.origin),h=u(c.origin??"value");if(c.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${h} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${h} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=c.inclusive?`${c.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${h} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let m=c.inclusive?"<=":"<",f=n(c.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${h} ${f} ${m}${c.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${h} ${f} ${m}${c.maximum.toString()}`}case"too_small":{let p=a(c.origin),h=u(c.origin??"value");if(c.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${h} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${h} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${h} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let E=c.inclusive?`${c.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${h} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let m=c.inclusive?">=":">",f=n(c.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${h} ${f} ${m}${c.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${h} ${f} ${m}${c.minimum.toString()}`}case"invalid_format":{let p=c;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${p.pattern}`;let h=l[p.format],m=h?.label??p.format,f=(h?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${z(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${u(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Eh(){return{localeError:G5()}}s(Eh,"Il"),o(Eh,"default");var K5=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${V(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${n}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${n}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${r[n.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function bh(){return{localeError:K5()}}s(bh,"Rl"),o(bh,"default");var H5=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${V(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${n}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[n.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Dh(){return{localeError:H5()}}s(Dh,"El"),o(Dh,"default");function Ka(e,t,r){return Math.abs(e)===1?t:r}s(Ka,"Db"),o(Ka,"getArmenianPlural");function At(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(At,"yr"),o(At,"withDefiniteArticle");var X5=o(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return u.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${V(u.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ka(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${At(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${At(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ka(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${At(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${At(u.origin)} \u056C\u056B\u0576\u056B ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[n.format]??u.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${z(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${At(u.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${At(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function wh(){return{localeError:X5()}}s(wh,"Tl"),o(wh,"default");var Y5=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${V(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function $h(){return{localeError:Y5()}}s($h,"Al"),o($h,"default");var Q5=o(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${V(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${n}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${n}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${z(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function Bh(){return{localeError:Q5()}}s(Bh,"zl"),o(Bh,"default");var eb=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${n}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${V(u.values[0])}`:`Opzione non valida: atteso uno tra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${n}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${n}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${r[n.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${z(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function xh(){return{localeError:eb()}}s(xh,"jl"),o(xh,"default");var tb=o(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${V(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${z(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${u.keys.length>1?"\u7FA4":""}: ${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Ch(){return{localeError:tb()}}s(Ch,"Ol"),o(Ch,"default");var ub=o(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return u.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${V(u.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${z(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${u.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function kh(){return{localeError:ub()}}s(kh,"Nl"),o(kh,"default");var rb=o(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return u.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${V(u.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${z(u.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Ha(){return{localeError:rb()}}s(Ha,"Sn"),o(Ha,"default");function Ah(){return Ha()}s(Ah,"Dl"),o(Ah,"default");var nb=o(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${V(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${z(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${n}${a}`}case"too_small":{let n=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[n.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${z(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Ih(){return{localeError:nb()}}s(Ih,"Pl"),o(Ih,"default");var Gu=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function Xa(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}s(Xa,"Pb"),o(Xa,"getUnitTypeFromNumber");var ib=o(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(u,n,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[n],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${n}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${V(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${z(u.values,"|")} pasirinkim\u0173`;case"too_big":{let n=i[u.origin]??u.origin,a=t(u.origin,Xa(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${Gu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Gu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let n=i[u.origin]??u.origin,a=t(u.origin,Xa(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${Gu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Gu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${z(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=i[u.origin]??u.origin;return`${Gu(n??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function _h(){return{localeError:ib()}}s(_h,"Ml"),o(_h,"default");var sb=o(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${V(u.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Sh(){return{localeError:sb()}}s(Sh,"Cl"),o(Sh,"default");var ab=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${V(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${z(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function Fh(){return{localeError:ab()}}s(Fh,"Ul"),o(Fh,"default");var ob=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${n}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${V(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} is`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} is`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function jh(){return{localeError:ob()}}s(jh,"Ll"),o(jh,"default");var lb=o(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${n}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${V(u.values[0])}`:`Ugyldig valg: forventet en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function zh(){return{localeError:lb()}}s(zh,"Fl"),o(zh,"default");var db=o(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${V(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=u;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[n.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function Nh(){return{localeError:db()}}s(Nh,"Bl"),o(Nh,"default");var cb=o(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${V(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${z(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[n.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${z(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function Oh(){return{localeError:cb()}}s(Oh,"Zl"),o(Oh,"default");var pb=o(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${V(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[n.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function Rh(){return{localeError:pb()}}s(Rh,"ql"),o(Rh,"default");var mb=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${V(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${n}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${r[n.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${z(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function Th(){return{localeError:mb()}}s(Th,"Vl"),o(Th,"default");var fb=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${V(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${r[n.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${z(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function Mh(){return{localeError:fb()}}s(Mh,"Gl"),o(Mh,"default");function Ya(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Ya,"Mb"),o(Ya,"getRussianPlural");var hb=o(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${V(u.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ya(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ya(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function Ph(){return{localeError:hb()}}s(Ph,"Jl"),o(Ph,"default");var gb=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${V(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${n}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${n}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${z(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function Uh(){return{localeError:gb()}}s(Uh,"Kl"),o(Uh,"default");var vb=o(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${V(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${z(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function Zh(){return{localeError:vb()}}s(Zh,"Wl"),o(Zh,"default");var yb=o(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return u.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(u.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${z(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function qh(){return{localeError:yb()}}s(qh,"Xl"),o(qh,"default");var Eb=o(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${V(u.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${u.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${z(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function Lh(){return{localeError:Eb()}}s(Lh,"Hl"),o(Lh,"default");var bb=o(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${V(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Jh(){return{localeError:bb()}}s(Jh,"Yl"),o(Jh,"default");var Db=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${V(u.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${z(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function Qa(){return{localeError:Db()}}s(Qa,"Rn"),o(Qa,"default");function Vh(){return Qa()}s(Vh,"Ql"),o(Vh,"default");var wb=o(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${V(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${z(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${n}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${n}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${u.keys.length>1?"\u0632":""}: ${z(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Wh(){return{localeError:wb()}}s(Wh,"ed"),o(Wh,"default");var $b=o(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${V(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[n.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Gh(){return{localeError:$b()}}s(Gh,"td"),o(Gh,"default");var Bb=o(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${V(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${r[n.format]??u.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${z(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Kh(){return{localeError:Bb()}}s(Kh,"rd"),o(Kh,"default");var xb=o(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${V(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${r[n.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${z(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Hh(){return{localeError:xb()}}s(Hh,"nd"),o(Hh,"default");var Cb=o(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${V(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${z(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function Xh(){return{localeError:Cb()}}s(Xh,"od"),o(Xh,"default");var kb=o(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${V(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${z(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${n}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.maximum}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${n}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.minimum}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${r[n.format]??u.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${z(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Yh(){return{localeError:kb()}}s(Yh,"id"),o(Yh,"default");var Qh,eg=Symbol("ZodOutput"),tg=Symbol("ZodInput"),ug=class{static{s(this,"ui")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.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 r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function gn(){return new ug}s(gn,"li"),o(gn,"registry"),(Qh=globalThis).__zod_globalRegistry??(Qh.__zod_globalRegistry=gn());var Ne=globalThis.__zod_globalRegistry;function eo(e,t){return new e({type:"string",...T(t)})}s(eo,"cd"),o(eo,"_string");function to(e,t){return new e({type:"string",coerce:!0,...T(t)})}s(to,"ud"),o(to,"_coercedString");function vn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}s(vn,"di"),o(vn,"_email");function Ku(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}s(Ku,"Tn"),o(Ku,"_guid");function yn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}s(yn,"pi"),o(yn,"_uuid");function En(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}s(En,"fi"),o(En,"_uuidv4");function bn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}s(bn,"mi"),o(bn,"_uuidv6");function Dn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}s(Dn,"hi"),o(Dn,"_uuidv7");function Hu(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}s(Hu,"An"),o(Hu,"_url");function wn(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}s(wn,"gi"),o(wn,"_emoji");function $n(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}s($n,"vi"),o($n,"_nanoid");function Bn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}s(Bn,"yi"),o(Bn,"_cuid");function xn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}s(xn,"bi"),o(xn,"_cuid2");function Cn(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}s(Cn,"wi"),o(Cn,"_ulid");function kn(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}s(kn,"xi"),o(kn,"_xid");function An(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}s(An,"$i"),o(An,"_ksuid");function In(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}s(In,"_i"),o(In,"_ipv4");function _n(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}s(_n,"ki"),o(_n,"_ipv6");function uo(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}s(uo,"ld"),o(uo,"_mac");function Sn(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}s(Sn,"Si"),o(Sn,"_cidrv4");function Fn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}s(Fn,"Ii"),o(Fn,"_cidrv6");function jn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}s(jn,"Ri"),o(jn,"_base64");function zn(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}s(zn,"Ei"),o(zn,"_base64url");function Nn(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}s(Nn,"Ti"),o(Nn,"_e164");function On(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}s(On,"Ai"),o(On,"_jwt");var rg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ro(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}s(ro,"pd"),o(ro,"_isoDateTime");function no(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}s(no,"fd"),o(no,"_isoDate");function io(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}s(io,"md"),o(io,"_isoTime");function so(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}s(so,"hd"),o(so,"_isoDuration");function ao(e,t){return new e({type:"number",checks:[],...T(t)})}s(ao,"gd"),o(ao,"_number");function oo(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}s(oo,"vd"),o(oo,"_coercedNumber");function lo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}s(lo,"yd"),o(lo,"_int");function co(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}s(co,"bd"),o(co,"_float32");function po(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}s(po,"wd"),o(po,"_float64");function mo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}s(mo,"xd"),o(mo,"_int32");function fo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}s(fo,"$d"),o(fo,"_uint32");function ho(e,t){return new e({type:"boolean",...T(t)})}s(ho,"_d"),o(ho,"_boolean");function go(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}s(go,"kd"),o(go,"_coercedBoolean");function vo(e,t){return new e({type:"bigint",...T(t)})}s(vo,"Sd"),o(vo,"_bigint");function yo(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}s(yo,"Id"),o(yo,"_coercedBigint");function Eo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}s(Eo,"Rd"),o(Eo,"_int64");function bo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}s(bo,"Ed"),o(bo,"_uint64");function Do(e,t){return new e({type:"symbol",...T(t)})}s(Do,"Td"),o(Do,"_symbol");function wo(e,t){return new e({type:"undefined",...T(t)})}s(wo,"Ad"),o(wo,"_undefined");function $o(e,t){return new e({type:"null",...T(t)})}s($o,"zd"),o($o,"_null");function Bo(e){return new e({type:"any"})}s(Bo,"jd"),o(Bo,"_any");function xo(e){return new e({type:"unknown"})}s(xo,"Od"),o(xo,"_unknown");function Co(e,t){return new e({type:"never",...T(t)})}s(Co,"Nd"),o(Co,"_never");function ko(e,t){return new e({type:"void",...T(t)})}s(ko,"Dd"),o(ko,"_void");function Ao(e,t){return new e({type:"date",...T(t)})}s(Ao,"Pd"),o(Ao,"_date");function Io(e,t){return new e({type:"date",coerce:!0,...T(t)})}s(Io,"Md"),o(Io,"_coercedDate");function _o(e,t){return new e({type:"nan",...T(t)})}s(_o,"Cd"),o(_o,"_nan");function He(e,t){return new ya({check:"less_than",...T(t),value:e,inclusive:!1})}s(He,"He"),o(He,"_lt");function Se(e,t){return new ya({check:"less_than",...T(t),value:e,inclusive:!0})}s(Se,"Ue"),o(Se,"_lte");function Xe(e,t){return new Ea({check:"greater_than",...T(t),value:e,inclusive:!1})}s(Xe,"Ye"),o(Xe,"_gt");function Be(e,t){return new Ea({check:"greater_than",...T(t),value:e,inclusive:!0})}s(Be,"Ee"),o(Be,"_gte");function Rn(e){return Xe(0,e)}s(Rn,"zi"),o(Rn,"_positive");function Tn(e){return He(0,e)}s(Tn,"ji"),o(Tn,"_negative");function Mn(e){return Se(0,e)}s(Mn,"Oi"),o(Mn,"_nonpositive");function Pn(e){return Be(0,e)}s(Pn,"Ni"),o(Pn,"_nonnegative");function It(e,t){return new A4({check:"multiple_of",...T(t),value:e})}s(It,"xt"),o(It,"_multipleOf");function _t(e,t){return new S4({check:"max_size",...T(t),maximum:e})}s(_t,"$t"),o(_t,"_maxSize");function Ye(e,t){return new F4({check:"min_size",...T(t),minimum:e})}s(Ye,"Qe"),o(Ye,"_minSize");function Qt(e,t){return new j4({check:"size_equals",...T(t),size:e})}s(Qt,"Gt"),o(Qt,"_size");function eu(e,t){return new z4({check:"max_length",...T(t),maximum:e})}s(eu,"Jt"),o(eu,"_maxLength");function at(e,t){return new N4({check:"min_length",...T(t),minimum:e})}s(at,"lt"),o(at,"_minLength");function tu(e,t){return new O4({check:"length_equals",...T(t),length:e})}s(tu,"Kt"),o(tu,"_length");function Xu(e,t){return new R4({check:"string_format",format:"regex",...T(t),pattern:e})}s(Xu,"br"),o(Xu,"_regex");function Yu(e){return new T4({check:"string_format",format:"lowercase",...T(e)})}s(Yu,"wr"),o(Yu,"_lowercase");function Qu(e){return new M4({check:"string_format",format:"uppercase",...T(e)})}s(Qu,"xr"),o(Qu,"_uppercase");function er(e,t){return new P4({check:"string_format",format:"includes",...T(t),includes:e})}s(er,"$r"),o(er,"_includes");function tr(e,t){return new U4({check:"string_format",format:"starts_with",...T(t),prefix:e})}s(tr,"_r"),o(tr,"_startsWith");function ur(e,t){return new Z4({check:"string_format",format:"ends_with",...T(t),suffix:e})}s(ur,"kr"),o(ur,"_endsWith");function Un(e,t,r){return new q4({check:"property",property:e,schema:t,...T(r)})}s(Un,"Di"),o(Un,"_property");function rr(e,t){return new L4({check:"mime_type",mime:e,...T(t)})}s(rr,"Sr"),o(rr,"_mime");function Ze(e){return new J4({check:"overwrite",tx:e})}s(Ze,"We"),o(Ze,"_overwrite");function nr(e){return Ze(t=>t.normalize(e))}s(nr,"Ir"),o(nr,"_normalize");function ir(){return Ze(e=>e.trim())}s(ir,"Rr"),o(ir,"_trim");function sr(){return Ze(e=>e.toLowerCase())}s(sr,"Er"),o(sr,"_toLowerCase");function ar(){return Ze(e=>e.toUpperCase())}s(ar,"Tr"),o(ar,"_toUpperCase");function or(){return Ze(e=>Js(e))}s(or,"Ar"),o(or,"_slugify");function So(e,t,r){return new e({type:"array",element:t,...T(r)})}s(So,"Ud"),o(So,"_array");function ng(e,t,r){return new e({type:"union",options:t,...T(r)})}s(ng,"SI"),o(ng,"_union");function ig(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}s(ig,"II"),o(ig,"_xor");function sg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...T(i)})}s(sg,"RI"),o(sg,"_discriminatedUnion");function ag(e,t,r){return new e({type:"intersection",left:t,right:r})}s(ag,"EI"),o(ag,"_intersection");function og(e,t,r,i){let u=r instanceof H,n=u?i:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...T(n)})}s(og,"TI"),o(og,"_tuple");function lg(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...T(i)})}s(lg,"AI"),o(lg,"_record");function dg(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...T(i)})}s(dg,"zI"),o(dg,"_map");function cg(e,t,r){return new e({type:"set",valueType:t,...T(r)})}s(cg,"jI"),o(cg,"_set");function pg(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:i,...T(r)})}s(pg,"OI"),o(pg,"_enum");function mg(e,t,r){return new e({type:"enum",entries:t,...T(r)})}s(mg,"NI"),o(mg,"_nativeEnum");function fg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}s(fg,"DI"),o(fg,"_literal");function Fo(e,t){return new e({type:"file",...T(t)})}s(Fo,"Ld"),o(Fo,"_file");function hg(e,t){return new e({type:"transform",transform:t})}s(hg,"PI"),o(hg,"_transform");function gg(e,t){return new e({type:"optional",innerType:t})}s(gg,"MI"),o(gg,"_optional");function vg(e,t){return new e({type:"nullable",innerType:t})}s(vg,"CI"),o(vg,"_nullable");function yg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ws(r)}})}s(yg,"UI"),o(yg,"_default");function Eg(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}s(Eg,"LI"),o(Eg,"_nonoptional");function bg(e,t){return new e({type:"success",innerType:t})}s(bg,"FI"),o(bg,"_success");function Dg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s(Dg,"BI"),o(Dg,"_catch");function wg(e,t,r){return new e({type:"pipe",in:t,out:r})}s(wg,"ZI"),o(wg,"_pipe");function $g(e,t){return new e({type:"readonly",innerType:t})}s($g,"qI"),o($g,"_readonly");function Bg(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}s(Bg,"VI"),o(Bg,"_templateLiteral");function xg(e,t){return new e({type:"lazy",getter:t})}s(xg,"GI"),o(xg,"_lazy");function Cg(e,t){return new e({type:"promise",innerType:t})}s(Cg,"JI"),o(Cg,"_promise");function jo(e,t,r){let i=T(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}s(jo,"Fd"),o(jo,"_custom");function zo(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}s(zo,"Bd"),o(zo,"_refine");function No(e,t){let r=Oo(i=>(i.addIssue=u=>{if(typeof u=="string")i.issues.push(Ru(u,i.value,r._zod.def));else{let n=u;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=i.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),i.issues.push(Ru(n))}},e(i.value,i)),t);return r}s(No,"Zd"),o(No,"_superRefine");function Oo(e,t){let r=new oe({check:"custom",...T(t)});return r._zod.check=e,r}s(Oo,"Ub"),o(Oo,"_check");function Ro(e){let t=new oe({check:"describe"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,description:e})}],t._zod.check=()=>{},t}s(Ro,"qd"),o(Ro,"describe");function To(e){let t=new oe({check:"meta"});return t._zod.onattach=[r=>{let i=Ne.get(r)??{};Ne.add(r,{...i,...e})}],t._zod.check=()=>{},t}s(To,"Vd"),o(To,"meta");function Mo(e,t){let r=T(t),i=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),u=u.map(f=>typeof f=="string"?f.toLowerCase():f));let n=new Set(i),a=new Set(u),l=e.Codec??qa,d=e.Boolean??Ba,c=e.String??qu,p=new c({type:"string",error:r.error}),h=new d({type:"boolean",error:r.error}),m=new l({type:"pipe",in:p,out:h,transform:o(((f,g)=>{let E=f;return r.case!=="sensitive"&&(E=E.toLowerCase()),n.has(E)?!0:a.has(E)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:g.value,inst:m,continue:!1}),{})}),"transform"),reverseTransform:o(((f,g)=>f===!0?i[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return m}s(Mo,"Gd"),o(Mo,"_stringbool");function uu(e,t,r,i={}){let u=T(i),n={...T(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(n.pattern=r),new e(n)}s(uu,"zr"),o(uu,"_stringFormat");function St(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??Ne,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}s(St,"_t"),o(St,"initializeContext");function ne(e,t,r={path:[],schemaPath:[]}){var i;let u=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{let h=a.schema,m=t.processors[u.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);m(e,t,h,c)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),ne(p,t,c),t.seen.get(p).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&$e(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(ne,"te"),o(ne,"process");function Ft(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=i.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,h=e.external.uri??(f=>f);if(p)return{ref:h(p)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${h("__shared")}#/${l}/${m}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},"makeURI"),n=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:c}=u(a);l.def={...l.schema},c&&(l.defId=c);let p=l.schema;for(let h in p)delete p[h];p.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
63
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");let $=f.compile();return(w,k)=>$(m,w,k)},"generateFastpass"),n,a=jt,l=!Lu.jitless,d=l&&z4.value,c=t.catchall,p;e._zod.parse=(m,f)=>{p??(p=i.value);let h=m.value;return a(h)?l&&d&&f?.async===!1&&f.jitless!==!0?(n||(n=u(t.shape)),m=n(m,f),c?Qa([],h,m,f,p,e):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function eo(e,t,r,i){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let u=e.filter(n=>!mt(n));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>Ae(a,i,be())))}),t)}s(eo,"vw"),o(eo,"handleUnionResults");var ji=B("$ZodUnion",(e,t)=>{X.init(e,t),ee(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ee(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ee(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),ee(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>Ju(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);if(d instanceof Promise)a.push(d),n=!0;else{if(d.issues.length===0)return d;a.push(d)}}return n?Promise.all(a).then(l=>eo(l,i,e,u)):eo(a,i,e,u)}});function to(e,t,r,i){let u=e.filter(n=>n.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>Ae(a,i,be())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(to,"yw"),o(to,"handleExclusiveUnionResults");var Nh=B("$ZodXor",(e,t)=>{ji.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);d instanceof Promise?(a.push(d),n=!0):a.push(d)}return n?Promise.all(a).then(l=>to(l,i,e,u)):to(a,i,e,u)}}),Mh=B("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ji.init(e,t);let r=e._zod.parse;ee(e._zod,"propValues",()=>{let u={};for(let n of t.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let c of d)u[l].add(c)}}return u});let i=uu(()=>{let u=t.options,n=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(n.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);n.set(d,a)}}return n});e._zod.parse=(u,n)=>{let a=u.value;if(!jt(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=i.value.get(a?.[t.discriminator]);return l?l._zod.run(u,n):t.unionFallback||n.direction==="backward"?r(u,n):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),Oh=B("$ZodIntersection",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value,n=t.left._zod.run({value:u,issues:[]},i),a=t.right._zod.run({value:u,issues:[]},i);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([l,d])=>uo(r,l,d)):uo(r,n,a)}});function zi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pt(e)&&pt(t)){let r=Object.keys(t),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),u={...e,...t};for(let n of i){let a=zi(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};u[n]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let u=e[i],n=t[i],a=zi(u,n);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(zi,"zu"),o(zi,"mergeValues");function uo(e,t,r){let i=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let n=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(n.length&&u&&e.issues.push({...u,keys:n}),mt(e))return e;let a=zi(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(uo,"bw"),o(uo,"handleIntersectionResults");var ro=B("$ZodTuple",(e,t)=>{X.init(e,t);let r=t.items;e._zod.parse=(i,u)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],l=io(r,"optin"),d=io(r,"optout");if(!t.rest){if(n.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:n,inst:e,origin:"array"}),i;n.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=new Array(r.length);for(let p=0;p<r.length;p++){let m=r[p]._zod.run({value:n[p],issues:[]},u);m instanceof Promise?a.push(m.then(f=>{c[p]=f})):c[p]=m}if(t.rest){let p=r.length-1,m=n.slice(r.length);for(let f of m){p++;let h=t.rest._zod.run({value:f,issues:[]},u);h instanceof Promise?a.push(h.then(g=>no(g,i,p))):no(h,i,p)}}return a.length?Promise.all(a).then(()=>so(c,i,r,n,d)):so(c,i,r,n,d)}});function io(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(io,"ww"),o(io,"getTupleOptStart");function no(e,t,r){e.issues.length&&t.issues.push(...Fe(r,e.issues)),t.value[r]=e.value}s(no,"xw"),o(no,"handleTupleResult");function so(e,t,r,i,u){for(let n=0;n<r.length;n++){let a=e[n],l=n<i.length;if(a.issues.length){if(!l&&n>=u){t.value.length=n;break}t.issues.push(...Fe(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=i.length&&r[n]._zod.optout==="optional"&&t.value[n]===void 0;n--)t.value.length=n;return t}s(so,"$w"),o(so,"handleTupleResults");var Rh=B("$ZodRecord",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!pt(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){l.add(typeof c=="number"?c.toString():c);let p=t.keyType._zod.run({value:c,issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(h=>Ae(h,i,be())),input:c,path:[c],inst:e});continue}let m=p.value,f=t.valueType._zod.run({value:u[c],issues:[]},i);f instanceof Promise?n.push(f.then(h=>{h.issues.length&&r.issues.push(...Fe(c,h.issues)),r.value[m]=h.value})):(f.issues.length&&r.issues.push(...Fe(c,f.issues)),r.value[m]=f.value)}let d;for(let c in u)l.has(c)||(d=d??[],d.push(c));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&qa.test(l)&&d.issues.length){let p=t.keyType._zod.run({value:Number(l),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Ae(p,i,be())),input:l,path:[l],inst:e});continue}let c=t.valueType._zod.run({value:u[l],issues:[]},i);c instanceof Promise?n.push(c.then(p=>{p.issues.length&&r.issues.push(...Fe(l,p.issues)),r.value[d.value]=p.value})):(c.issues.length&&r.issues.push(...Fe(l,c.issues)),r.value[d.value]=c.value)}}return n.length?Promise.all(n).then(()=>r):r}}),Th=B("$ZodMap",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let n=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||c instanceof Promise?n.push(Promise.all([d,c]).then(([p,m])=>{ao(p,m,r,a,u,e,i)})):ao(d,c,r,a,u,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function ao(e,t,r,i,u,n,a){e.issues.length&&(Ii.has(typeof i)?r.issues.push(...Fe(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:n,issues:e.issues.map(l=>Ae(l,a,be()))})),t.issues.length&&(Ii.has(typeof i)?r.issues.push(...Fe(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:n,key:i,issues:t.issues.map(l=>Ae(l,a,be()))})),r.value.set(e.value,t.value)}s(ao,"_w"),o(ao,"handleMapResult");var Ph=B("$ZodSet",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let n=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise?n.push(l.then(d=>oo(d,r))):oo(l,r)}return n.length?Promise.all(n).then(()=>r):r}});function oo(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s(oo,"kw"),o(oo,"handleSetResult");var Uh=B("$ZodEnum",(e,t)=>{X.init(e,t);let r=ki(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(u=>Ii.has(typeof u)).map(u=>typeof u=="string"?Ge(u):u.toString()).join("|")})$`),e._zod.parse=(u,n)=>{let a=u.value;return i.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),qh=B("$ZodLiteral",(e,t)=>{if(X.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Ge(i):i?Ge(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,u)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),Zh=B("$ZodFile",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),Lh=B("$ZodTransform",(e,t)=>{X.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Ci(e.constructor.name);let u=t.transform(r.value,r);if(i.async)return(u instanceof Promise?u:Promise.resolve(u)).then(n=>(r.value=n,r.fallback=!0,r));if(u instanceof Promise)throw new Ft;return r.value=u,r.fallback=!0,r}});function lo(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s(lo,"Sw"),o(lo,"handleOptionalResult");var co=B("$ZodOptional",(e,t)=>{X.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ee(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ju(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>lo(a,u)):lo(n,u)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Vh=B("$ZodExactOptional",(e,t)=>{co.init(e,t),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Jh=B("$ZodNullable",(e,t)=>{X.init(e,t),ee(e._zod,"optin",()=>t.innerType._zod.optin),ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ju(r.source)}|null)$`):void 0}),ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Wh=B("$ZodDefault",(e,t)=>{X.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>po(n,t)):po(u,t)}});function po(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(po,"Iw"),o(po,"handleDefaultResult");var Gh=B("$ZodPrefault",(e,t)=>{X.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Kh=B("$ZodNonOptional",(e,t)=>{X.init(e,t),ee(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>mo(n,e)):mo(u,e)}});function mo(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(mo,"Rw"),o(mo,"handleNonOptionalResult");var Hh=B("$ZodSuccess",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Ci("ZodSuccess");let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),Xh=B("$ZodCatch",(e,t)=>{X.init(e,t),e._zod.optin="optional",ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(a=>Ae(a,i,be()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(n=>Ae(n,i,be()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Yh=B("$ZodNaN",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),fo=B("$ZodPipe",(e,t)=>{X.init(e,t),ee(e._zod,"values",()=>t.in._zod.values),ee(e._zod,"optin",()=>t.in._zod.optin),ee(e._zod,"optout",()=>t.out._zod.optout),ee(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let n=t.out._zod.run(r,i);return n instanceof Promise?n.then(a=>rr(a,t.in,i)):rr(n,t.in,i)}let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>rr(n,t.out,i)):rr(u,t.out,i)}});function rr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(rr,"_i"),o(rr,"handlePipeResult");var ho=B("$ZodCodec",(e,t)=>{X.init(e,t),ee(e._zod,"values",()=>t.in._zod.values),ee(e._zod,"optin",()=>t.in._zod.optin),ee(e._zod,"optout",()=>t.out._zod.optout),ee(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>ir(n,t,i)):ir(u,t,i)}else{let u=t.out._zod.run(r,i);return u instanceof Promise?u.then(n=>ir(n,t,i)):ir(u,t,i)}}});function ir(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(u=>nr(e,u,t.out,r)):nr(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(u=>nr(e,u,t.in,r)):nr(e,i,t.in,r)}}s(ir,"ki"),o(ir,"handleCodecAResult");function nr(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}s(nr,"Si"),o(nr,"handleCodecTxResult");var Qh=B("$ZodPreprocess",(e,t)=>{fo.init(e,t)}),eg=B("$ZodReadonly",(e,t)=>{X.init(e,t),ee(e._zod,"propValues",()=>t.innerType._zod.propValues),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"optin",()=>t.innerType?._zod?.optin),ee(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(go):go(u)}});function go(e){return e.value=Object.freeze(e.value),e}s(go,"Ew"),o(go,"handleReadonlyResult");var tg=B("$ZodTemplateLiteral",(e,t)=>{X.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let u=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let n=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(n,a))}else if(i===null||M4.has(typeof i))r.push(Ge(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,u)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),ug=B("$ZodFunction",(e,t)=>(X.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let u=e._def.input?ka(e._def.input,i):i,n=Reflect.apply(r,this,u);return e._def.output?ka(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let u=e._def.input?await Aa(e._def.input,i):i,n=await Reflect.apply(r,this,u);return e._def.output?await Aa(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new ro({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),rg=B("$ZodPromise",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},i))}),ig=B("$ZodLazy",(e,t)=>{X.init(e,t),ee(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),ee(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ee(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ee(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ee(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),ng=B("$ZodCustom",(e,t)=>{de.init(e,t),X.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,u=t.fn(i);if(u instanceof Promise)return u.then(n=>vo(n,r,i,e));vo(u,r,i,e)}});function vo(e,t,r,i){if(!e){let u={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(u.params=i._zod.def.params),t.issues.push(Ku(u))}}s(vo,"Tw"),o(vo,"handleRefineResult");var yo={};ut(yo,{ar:s(()=>sg,"ar"),az:s(()=>ag,"az"),be:s(()=>og,"be"),bg:s(()=>lg,"bg"),ca:s(()=>dg,"ca"),cs:s(()=>cg,"cs"),da:s(()=>pg,"da"),de:s(()=>mg,"de"),el:s(()=>fg,"el"),en:s(()=>bo,"en"),eo:s(()=>hg,"eo"),es:s(()=>gg,"es"),fa:s(()=>vg,"fa"),fi:s(()=>yg,"fi"),fr:s(()=>Eg,"fr"),frCA:s(()=>bg,"frCA"),he:s(()=>wg,"he"),hr:s(()=>Dg,"hr"),hu:s(()=>$g,"hu"),hy:s(()=>Bg,"hy"),id:s(()=>xg,"id"),is:s(()=>Cg,"is"),it:s(()=>kg,"it"),ja:s(()=>Ag,"ja"),ka:s(()=>Ig,"ka"),kh:s(()=>_g,"kh"),km:s(()=>Do,"km"),ko:s(()=>Sg,"ko"),lt:s(()=>Fg,"lt"),mk:s(()=>jg,"mk"),ms:s(()=>zg,"ms"),nl:s(()=>Ng,"nl"),no:s(()=>Mg,"no"),ota:s(()=>Og,"ota"),pl:s(()=>Tg,"pl"),ps:s(()=>Rg,"ps"),pt:s(()=>Pg,"pt"),ro:s(()=>Ug,"ro"),ru:s(()=>qg,"ru"),sl:s(()=>Zg,"sl"),sv:s(()=>Lg,"sv"),ta:s(()=>Vg,"ta"),th:s(()=>Jg,"th"),tr:s(()=>Wg,"tr"),ua:s(()=>Gg,"ua"),uk:s(()=>xo,"uk"),ur:s(()=>Kg,"ur"),uz:s(()=>Hg,"uz"),vi:s(()=>Xg,"vi"),yo:s(()=>ev,"yo"),zhCN:s(()=>Yg,"zhCN"),zhTW:s(()=>Qg,"zhTW")});var dw=o(()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return u.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${J(u.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${u.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${r[n.format]??u.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${O(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function sg(){return{localeError:dw()}}s(sg,"Bl"),o(sg,"default");var cw=o(()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${J(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[n.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function ag(){return{localeError:cw()}}s(ag,"Zl"),o(ag,"default");function Eo(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Eo,"Nw"),o(Eo,"getBelarusianPlural");var pw=o(()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${J(u.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Eo(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.maximum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Eo(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${O(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function og(){return{localeError:pw()}}s(og,"ql"),o(og,"default");var mw=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${J(u.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${O(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function lg(){return{localeError:mw()}}s(lg,"Vl"),o(lg,"default");var fw=o(()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${J(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${O(u.values," o ")}`;case"too_big":{let n=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${n} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${n} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function dg(){return{localeError:fw()}}s(dg,"Gl"),o(dg,"default");var hw=o(()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${J(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${r[n.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${O(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function cg(){return{localeError:hw()}}s(cg,"Jl"),o(cg,"default");var gw=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${n}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${J(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${n} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${n} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${O(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function pg(){return{localeError:gw()}}s(pg,"Wl"),o(pg,"default");var vw=o(()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${J(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ist`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ist`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${O(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function mg(){return{localeError:vw()}}s(mg,"Kl"),o(mg,"default");var yw=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${J(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${O(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function fg(){return{localeError:yw()}}s(fg,"Xl"),o(fg,"default");var Ew=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Invalid input: expected ${n}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${J(u.values[0])}`:`Invalid option: expected one of ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${n}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${n}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(n=>`'${n}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function bo(){return{localeError:Ew()}}s(bo,"Ln"),o(bo,"default");var bw=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${J(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${n}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function hg(){return{localeError:bw()}}s(hg,"Hl"),o(hg,"default");var ww=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${J(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${n}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function gg(){return{localeError:ww()}}s(gg,"Yl"),o(gg,"default");var Dw=o(()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${J(u.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${O(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[n.format]??u.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${O(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function vg(){return{localeError:Dw()}}s(vg,"Ql"),o(vg,"default");var $w=o(()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${J(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${O(u.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}},"error");function yg(){return{localeError:$w()}}s(yg,"ed"),o(yg,"default");var Bw=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${J(u.values[0])} attendu`:`Option invalide : une valeur parmi ${O(u.values,"|")} attendue`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${O(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Eg(){return{localeError:Bw()}}s(Eg,"td"),o(Eg,"default");var xw=o(()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${J(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${n}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${O(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function bg(){return{localeError:xw()}}s(bg,"rd"),o(bg,"default");var Cw=o(()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=o(c=>c?e[c]:void 0,"typeEntry"),i=o(c=>{let p=r(c);return p?p.label:c??e.unknown.label},"typeLabel"),u=o(c=>`\u05D4${i(c)}`,"withDefinite"),n=o(c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(c=>c?t[c]??null:null,"getSizing"),l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},d={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let p=c.expected,m=d[p??""]??i(p),f=G(c.input),h=d[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${J(c.values[0])}`;let p=c.values.map(f=>J(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p[0]} \u05D0\u05D5 ${p[1]}`;let m=p[p.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let p=a(c.origin),m=u(c.origin??"value");if(c.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",b=c.inclusive?`${c.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let f=c.inclusive?"<=":"<",h=n(c.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.maximum.toString()}`}case"too_small":{let p=a(c.origin),m=u(c.origin??"value");if(c.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let x=(c.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`}let b=c.inclusive?`${c.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let f=c.inclusive?">=":">",h=n(c.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.minimum.toString()}`}case"invalid_format":{let p=c;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${p.pattern}`;let m=l[p.format],f=m?.label??p.format,h=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${h}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${O(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${u(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function wg(){return{localeError:Cw()}}s(wg,"nd"),o(wg,"default");var kw=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${J(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${n}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${n}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${r[n.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${O(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function Dg(){return{localeError:kw()}}s(Dg,"od"),o(Dg,"default");var Aw=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${J(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${n}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[n.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function $g(){return{localeError:Aw()}}s($g,"id"),o($g,"default");function wo(e,t,r){return Math.abs(e)===1?t:r}s(wo,"Pw"),o(wo,"getArmenianPlural");function zt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(zt,"Er"),o(zt,"withDefiniteArticle");var Iw=o(()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return u.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${J(u.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=wo(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${zt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.maximum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${zt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=wo(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${zt(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.minimum.toString()} ${d}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${zt(u.origin)} \u056C\u056B\u0576\u056B ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[n.format]??u.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${O(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${zt(u.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${zt(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Bg(){return{localeError:Iw()}}s(Bg,"sd"),o(Bg,"default");var _w=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${J(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function xg(){return{localeError:_w()}}s(xg,"ad"),o(xg,"default");var Sw=o(()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${J(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${n}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${n}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${O(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function Cg(){return{localeError:Sw()}}s(Cg,"cd"),o(Cg,"default");var Fw=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${n}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${J(u.values[0])}`:`Opzione non valida: atteso uno tra ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${n}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${n}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${r[n.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${O(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function kg(){return{localeError:Fw()}}s(kg,"ud"),o(kg,"default");var jw=o(()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${J(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${O(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${u.keys.length>1?"\u7FA4":""}: ${O(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Ag(){return{localeError:jw()}}s(Ag,"ld"),o(Ag,"default");var zw=o(()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return u.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${J(u.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${O(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${u.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${O(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function Ig(){return{localeError:zw()}}s(Ig,"dd"),o(Ig,"default");var Nw=o(()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return u.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${J(u.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${O(u.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function Do(){return{localeError:Nw()}}s(Do,"Fn"),o(Do,"default");function _g(){return Do()}s(_g,"pd"),o(_g,"default");var Mw=o(()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${J(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${O(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${n}${a}`}case"too_small":{let n=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[n.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${O(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Sg(){return{localeError:Mw()}}s(Sg,"fd"),o(Sg,"default");var sr=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function $o(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}s($o,"Dw"),o($o,"getUnitTypeFromNumber");var Ow=o(()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(u,n,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[n],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${n}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${J(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${O(u.values,"|")} pasirinkim\u0173`;case"too_big":{let n=i[u.origin]??u.origin,a=t(u.origin,$o(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${sr(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${sr(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let n=i[u.origin]??u.origin,a=t(u.origin,$o(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${sr(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${sr(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${O(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=i[u.origin]??u.origin;return`${sr(n??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Fg(){return{localeError:Ow()}}s(Fg,"md"),o(Fg,"default");var Rw=o(()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${J(u.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${O(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function jg(){return{localeError:Rw()}}s(jg,"hd"),o(jg,"default");var Tw=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${J(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${O(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function zg(){return{localeError:Tw()}}s(zg,"gd"),o(zg,"default");var Pw=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${n}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${J(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} is`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} is`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function Ng(){return{localeError:Pw()}}s(Ng,"vd"),o(Ng,"default");var Uw=o(()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${n}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${J(u.values[0])}`:`Ugyldig valg: forventet en av ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${O(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function Mg(){return{localeError:Uw()}}s(Mg,"yd"),o(Mg,"default");var qw=o(()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${J(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=u;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[n.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function Og(){return{localeError:qw()}}s(Og,"bd"),o(Og,"default");var Zw=o(()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${J(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${O(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[n.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${O(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function Rg(){return{localeError:Zw()}}s(Rg,"wd"),o(Rg,"default");var Lw=o(()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${J(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[n.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function Tg(){return{localeError:Lw()}}s(Tg,"xd"),o(Tg,"default");var Vw=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${J(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${n}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${r[n.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${O(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function Pg(){return{localeError:Vw()}}s(Pg,"$d"),o(Pg,"default");var Jw=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${J(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${r[n.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${O(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function Ug(){return{localeError:Jw()}}s(Ug,"_d"),o(Ug,"default");function Bo(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(Bo,"Cw"),o(Bo,"getRussianPlural");var Ww=o(()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${J(u.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Bo(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.maximum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Bo(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.minimum.toString()} ${d}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${O(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function qg(){return{localeError:Ww()}}s(qg,"kd"),o(qg,"default");var Gw=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${J(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${n}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${n}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${O(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function Zg(){return{localeError:Gw()}}s(Zg,"Sd"),o(Zg,"default");var Kw=o(()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${J(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${O(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function Lg(){return{localeError:Kw()}}s(Lg,"Id"),o(Lg,"default");var Hw=o(()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return u.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${J(u.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${O(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u.origin} ${n}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${u.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}},"error");function Vg(){return{localeError:Hw()}}s(Vg,"Rd"),o(Vg,"default");var Xw=o(()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${J(u.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${u.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${O(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function Jg(){return{localeError:Xw()}}s(Jg,"Ed"),o(Jg,"default");var Yw=o(()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${J(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function Wg(){return{localeError:Yw()}}s(Wg,"Td"),o(Wg,"default");var Qw=o(()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${J(u.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${O(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function xo(){return{localeError:Qw()}}s(xo,"Zn"),o(xo,"default");function Gg(){return xo()}s(Gg,"Ad"),o(Gg,"default");var eD=o(()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${J(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${O(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${n}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${n}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${u.keys.length>1?"\u0632":""}: ${O(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function Kg(){return{localeError:eD()}}s(Kg,"jd"),o(Kg,"default");var tD=o(()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${J(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[n.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function Hg(){return{localeError:tD()}}s(Hg,"zd"),o(Hg,"default");var uD=o(()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${J(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${r[n.format]??u.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${O(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function Xg(){return{localeError:uD()}}s(Xg,"Od"),o(Xg,"default");var rD=o(()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${J(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${r[n.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${O(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function Yg(){return{localeError:rD()}}s(Yg,"Md"),o(Yg,"default");var iD=o(()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${J(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${O(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function Qg(){return{localeError:iD()}}s(Qg,"Nd"),o(Qg,"default");var nD=o(()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=G(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${J(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${O(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${n}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.maximum}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${n}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.minimum}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${r[n.format]??u.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${O(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function ev(){return{localeError:nD()}}s(ev,"Pd"),o(ev,"default");var tv,uv=Symbol("ZodOutput"),rv=Symbol("ZodInput"),iv=class{static{s(this,"zi")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.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 r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ni(){return new iv}s(Ni,"Oi"),o(Ni,"registry"),(tv=globalThis).__zod_globalRegistry??(tv.__zod_globalRegistry=Ni());var Re=globalThis.__zod_globalRegistry;function Co(e,t){return new e({type:"string",...T(t)})}s(Co,"Ud"),o(Co,"_string");function ko(e,t){return new e({type:"string",coerce:!0,...T(t)})}s(ko,"Ld"),o(ko,"_coercedString");function Mi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}s(Mi,"Mi"),o(Mi,"_email");function ar(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}s(ar,"Vn"),o(ar,"_guid");function Oi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}s(Oi,"Ni"),o(Oi,"_uuid");function Ri(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}s(Ri,"Pi"),o(Ri,"_uuidv4");function Ti(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}s(Ti,"Di"),o(Ti,"_uuidv6");function Pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}s(Pi,"Ci"),o(Pi,"_uuidv7");function or(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}s(or,"Gn"),o(or,"_url");function Ui(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}s(Ui,"Ui"),o(Ui,"_emoji");function qi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}s(qi,"Li"),o(qi,"_nanoid");function Zi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}s(Zi,"Fi"),o(Zi,"_cuid");function Li(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}s(Li,"Bi"),o(Li,"_cuid2");function Vi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}s(Vi,"Zi"),o(Vi,"_ulid");function Ji(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}s(Ji,"qi"),o(Ji,"_xid");function Wi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}s(Wi,"Vi"),o(Wi,"_ksuid");function Gi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}s(Gi,"Gi"),o(Gi,"_ipv4");function Ki(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}s(Ki,"Ji"),o(Ki,"_ipv6");function Ao(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}s(Ao,"Fd"),o(Ao,"_mac");function Hi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}s(Hi,"Wi"),o(Hi,"_cidrv4");function Xi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}s(Xi,"Ki"),o(Xi,"_cidrv6");function Yi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}s(Yi,"Xi"),o(Yi,"_base64");function Qi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}s(Qi,"Hi"),o(Qi,"_base64url");function en(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}s(en,"Yi"),o(en,"_e164");function tn(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}s(tn,"Qi"),o(tn,"_jwt");var nv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Io(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}s(Io,"Zd"),o(Io,"_isoDateTime");function _o(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}s(_o,"qd"),o(_o,"_isoDate");function So(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}s(So,"Vd"),o(So,"_isoTime");function Fo(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}s(Fo,"Gd"),o(Fo,"_isoDuration");function jo(e,t){return new e({type:"number",checks:[],...T(t)})}s(jo,"Jd"),o(jo,"_number");function zo(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}s(zo,"Wd"),o(zo,"_coercedNumber");function No(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}s(No,"Kd"),o(No,"_int");function Mo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}s(Mo,"Xd"),o(Mo,"_float32");function Oo(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}s(Oo,"Hd"),o(Oo,"_float64");function Ro(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}s(Ro,"Yd"),o(Ro,"_int32");function To(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}s(To,"Qd"),o(To,"_uint32");function Po(e,t){return new e({type:"boolean",...T(t)})}s(Po,"ep"),o(Po,"_boolean");function Uo(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}s(Uo,"tp"),o(Uo,"_coercedBoolean");function qo(e,t){return new e({type:"bigint",...T(t)})}s(qo,"rp"),o(qo,"_bigint");function Zo(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}s(Zo,"np"),o(Zo,"_coercedBigint");function Lo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}s(Lo,"op"),o(Lo,"_int64");function Vo(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}s(Vo,"ip"),o(Vo,"_uint64");function Jo(e,t){return new e({type:"symbol",...T(t)})}s(Jo,"sp"),o(Jo,"_symbol");function Wo(e,t){return new e({type:"undefined",...T(t)})}s(Wo,"ap"),o(Wo,"_undefined");function Go(e,t){return new e({type:"null",...T(t)})}s(Go,"cp"),o(Go,"_null");function Ko(e){return new e({type:"any"})}s(Ko,"up"),o(Ko,"_any");function Ho(e){return new e({type:"unknown"})}s(Ho,"lp"),o(Ho,"_unknown");function Xo(e,t){return new e({type:"never",...T(t)})}s(Xo,"dp"),o(Xo,"_never");function Yo(e,t){return new e({type:"void",...T(t)})}s(Yo,"pp"),o(Yo,"_void");function Qo(e,t){return new e({type:"date",...T(t)})}s(Qo,"fp"),o(Qo,"_date");function e0(e,t){return new e({type:"date",coerce:!0,...T(t)})}s(e0,"mp"),o(e0,"_coercedDate");function t0(e,t){return new e({type:"nan",...T(t)})}s(t0,"hp"),o(t0,"_nan");function it(e,t){return new Za({check:"less_than",...T(t),value:e,inclusive:!1})}s(it,"st"),o(it,"_lt");function ze(e,t){return new Za({check:"less_than",...T(t),value:e,inclusive:!0})}s(ze,"Ze"),o(ze,"_lte");function nt(e,t){return new La({check:"greater_than",...T(t),value:e,inclusive:!1})}s(nt,"at"),o(nt,"_gt");function Ce(e,t){return new La({check:"greater_than",...T(t),value:e,inclusive:!0})}s(Ce,"je"),o(Ce,"_gte");function un(e){return nt(0,e)}s(un,"es"),o(un,"_positive");function rn(e){return it(0,e)}s(rn,"ts"),o(rn,"_negative");function nn(e){return ze(0,e)}s(nn,"rs"),o(nn,"_nonpositive");function sn(e){return Ce(0,e)}s(sn,"ns"),o(sn,"_nonnegative");function Nt(e,t){return new Sf({check:"multiple_of",...T(t),value:e})}s(Nt,"At"),o(Nt,"_multipleOf");function Mt(e,t){return new zf({check:"max_size",...T(t),maximum:e})}s(Mt,"jt"),o(Mt,"_maxSize");function st(e,t){return new Nf({check:"min_size",...T(t),minimum:e})}s(st,"ct"),o(st,"_minSize");function au(e,t){return new Mf({check:"size_equals",...T(t),size:e})}s(au,"tr"),o(au,"_size");function ou(e,t){return new Of({check:"max_length",...T(t),maximum:e})}s(ou,"rr"),o(ou,"_maxLength");function ht(e,t){return new Rf({check:"min_length",...T(t),minimum:e})}s(ht,"vt"),o(ht,"_minLength");function lu(e,t){return new Tf({check:"length_equals",...T(t),length:e})}s(lu,"nr"),o(lu,"_length");function lr(e,t){return new Pf({check:"string_format",format:"regex",...T(t),pattern:e})}s(lr,"Tr"),o(lr,"_regex");function dr(e){return new Uf({check:"string_format",format:"lowercase",...T(e)})}s(dr,"Ar"),o(dr,"_lowercase");function cr(e){return new qf({check:"string_format",format:"uppercase",...T(e)})}s(cr,"jr"),o(cr,"_uppercase");function pr(e,t){return new Zf({check:"string_format",format:"includes",...T(t),includes:e})}s(pr,"zr"),o(pr,"_includes");function mr(e,t){return new Lf({check:"string_format",format:"starts_with",...T(t),prefix:e})}s(mr,"Or"),o(mr,"_startsWith");function fr(e,t){return new Vf({check:"string_format",format:"ends_with",...T(t),suffix:e})}s(fr,"Mr"),o(fr,"_endsWith");function an(e,t,r){return new Jf({check:"property",property:e,schema:t,...T(r)})}s(an,"os"),o(an,"_property");function hr(e,t){return new Wf({check:"mime_type",mime:e,...T(t)})}s(hr,"Nr"),o(hr,"_mime");function Ke(e){return new Gf({check:"overwrite",tx:e})}s(Ke,"et"),o(Ke,"_overwrite");function gr(e){return Ke(t=>t.normalize(e))}s(gr,"Pr"),o(gr,"_normalize");function vr(){return Ke(e=>e.trim())}s(vr,"Dr"),o(vr,"_trim");function yr(){return Ke(e=>e.toLowerCase())}s(yr,"Cr"),o(yr,"_toLowerCase");function Er(){return Ke(e=>e.toUpperCase())}s(Er,"Ur"),o(Er,"_toUpperCase");function br(){return Ke(e=>ga(e))}s(br,"Lr"),o(br,"_slugify");function u0(e,t,r){return new e({type:"array",element:t,...T(r)})}s(u0,"gp"),o(u0,"_array");function sv(e,t,r){return new e({type:"union",options:t,...T(r)})}s(sv,"cR"),o(sv,"_union");function av(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}s(av,"uR"),o(av,"_xor");function ov(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...T(i)})}s(ov,"lR"),o(ov,"_discriminatedUnion");function lv(e,t,r){return new e({type:"intersection",left:t,right:r})}s(lv,"dR"),o(lv,"_intersection");function dv(e,t,r,i){let u=r instanceof X,n=u?i:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...T(n)})}s(dv,"pR"),o(dv,"_tuple");function cv(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...T(i)})}s(cv,"fR"),o(cv,"_record");function pv(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...T(i)})}s(pv,"mR"),o(pv,"_map");function mv(e,t,r){return new e({type:"set",valueType:t,...T(r)})}s(mv,"hR"),o(mv,"_set");function fv(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:i,...T(r)})}s(fv,"gR"),o(fv,"_enum");function hv(e,t,r){return new e({type:"enum",entries:t,...T(r)})}s(hv,"vR"),o(hv,"_nativeEnum");function gv(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}s(gv,"yR"),o(gv,"_literal");function r0(e,t){return new e({type:"file",...T(t)})}s(r0,"vp"),o(r0,"_file");function vv(e,t){return new e({type:"transform",transform:t})}s(vv,"bR"),o(vv,"_transform");function yv(e,t){return new e({type:"optional",innerType:t})}s(yv,"wR"),o(yv,"_optional");function Ev(e,t){return new e({type:"nullable",innerType:t})}s(Ev,"xR"),o(Ev,"_nullable");function bv(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ya(r)}})}s(bv,"$R"),o(bv,"_default");function wv(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}s(wv,"_R"),o(wv,"_nonoptional");function Dv(e,t){return new e({type:"success",innerType:t})}s(Dv,"kR"),o(Dv,"_success");function $v(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s($v,"SR"),o($v,"_catch");function Bv(e,t,r){return new e({type:"pipe",in:t,out:r})}s(Bv,"IR"),o(Bv,"_pipe");function xv(e,t){return new e({type:"readonly",innerType:t})}s(xv,"RR"),o(xv,"_readonly");function Cv(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}s(Cv,"ER"),o(Cv,"_templateLiteral");function kv(e,t){return new e({type:"lazy",getter:t})}s(kv,"TR"),o(kv,"_lazy");function Av(e,t){return new e({type:"promise",innerType:t})}s(Av,"AR"),o(Av,"_promise");function i0(e,t,r){let i=T(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}s(i0,"yp"),o(i0,"_custom");function n0(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}s(n0,"bp"),o(n0,"_refine");function s0(e,t){let r=a0(i=>(i.addIssue=u=>{if(typeof u=="string")i.issues.push(Ku(u,i.value,r._zod.def));else{let n=u;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=i.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),i.issues.push(Ku(n))}},e(i.value,i)),t);return r}s(s0,"wp"),o(s0,"_superRefine");function a0(e,t){let r=new de({check:"custom",...T(t)});return r._zod.check=e,r}s(a0,"Lw"),o(a0,"_check");function o0(e){let t=new de({check:"describe"});return t._zod.onattach=[r=>{let i=Re.get(r)??{};Re.add(r,{...i,description:e})}],t._zod.check=()=>{},t}s(o0,"xp"),o(o0,"describe");function l0(e){let t=new de({check:"meta"});return t._zod.onattach=[r=>{let i=Re.get(r)??{};Re.add(r,{...i,...e})}],t._zod.check=()=>{},t}s(l0,"$p"),o(l0,"meta");function d0(e,t){let r=T(t),i=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),u=u.map(h=>typeof h=="string"?h.toLowerCase():h));let n=new Set(i),a=new Set(u),l=e.Codec??ho,d=e.Boolean??Ka,c=e.String??tr,p=new c({type:"string",error:r.error}),m=new d({type:"boolean",error:r.error}),f=new l({type:"pipe",in:p,out:m,transform:o(((h,g)=>{let b=h;return r.case!=="sensitive"&&(b=b.toLowerCase()),n.has(b)?!0:a.has(b)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:g.value,inst:f,continue:!1}),{})}),"transform"),reverseTransform:o(((h,g)=>h===!0?i[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return f}s(d0,"_p"),o(d0,"_stringbool");function du(e,t,r,i={}){let u=T(i),n={...T(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(n.pattern=r),new e(n)}s(du,"Fr"),o(du,"_stringFormat");function Ot(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??Re,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}s(Ot,"zt"),o(Ot,"initializeContext");function ie(e,t,r={path:[],schemaPath:[]}){var i;let u=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{let m=a.schema,f=t.processors[u.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);f(e,t,m,c)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),ie(p,t,c),t.seen.get(p).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&xe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(ie,"te"),o(ie,"process");function Rt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=i.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(p)return{ref:m(p)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${l}/${f}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},"makeURI"),n=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:c}=u(a);l.def={...l.schema},c&&(l.defId=c);let p=l.schema;for(let m in p)delete p[m];p.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
64
64
|
|
|
65
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){n(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(l.cycle){n(a);continue}if(l.count>1&&e.reused==="ref"){n(a);continue}}}s(Ft,"kt"),o(Ft,"extractDefs");function jt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let c=d.def??d.schema,p={...c},h=d.ref;if(d.ref=null,h){i(h);let f=e.seen.get(h),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,p),l._zod.parent===h)for(let E in c)E==="$ref"||E==="allOf"||E in p||delete c[E];if(g.$ref&&f.def)for(let E in c)E==="$ref"||E==="allOf"||E in f.def&&JSON.stringify(c[E])===JSON.stringify(f.def[E])&&delete c[E]}let m=l._zod.parent;if(m&&m!==h){i(m);let f=e.seen.get(m);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}e.override({zodSchema:l,jsonSchema:c,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())i(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&u.id===n&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:lr(t,"input",e.processors),output:lr(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(jt,"St"),o(jt,"finalize");function $e(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return $e(i.element,r);if(i.type==="set")return $e(i.valueType,r);if(i.type==="lazy")return $e(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return $e(i.innerType,r);if(i.type==="intersection")return $e(i.left,r)||$e(i.right,r);if(i.type==="record"||i.type==="map")return $e(i.keyType,r)||$e(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:$e(i.in,r)||$e(i.out,r);if(i.type==="object"){for(let u in i.shape)if($e(i.shape[u],r))return!0;return!1}if(i.type==="union"){for(let u of i.options)if($e(u,r))return!0;return!1}if(i.type==="tuple"){for(let u of i.items)if($e(u,r))return!0;return!!(i.rest&&$e(i.rest,r))}return!1}s($e,"Te"),o($e,"isTransforming");var kg=o((e,t={})=>r=>{let i=St({...r,processors:t});return ne(e,i),Ft(i,e),jt(i,e)},"createToJSONSchemaMethod"),lr=o((e,t,r={})=>i=>{let{libraryOptions:u,target:n}=i??{},a=St({...u??{},target:n,io:t,processors:r});return ne(e,a),Ft(a,e),jt(a,e)},"createStandardJSONSchemaMethod"),Ab={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ag=o((e,t,r,i)=>{let u=r;u.type="string";let{minimum:n,maximum:a,format:l,patterns:d,contentEncoding:c}=e._zod.bag;if(typeof n=="number"&&(u.minLength=n),typeof a=="number"&&(u.maxLength=a),l&&(u.format=Ab[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),c&&(u.contentEncoding=c),d&&d.size>0){let p=[...d];p.length===1?u.pattern=p[0].source:p.length>1&&(u.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},"stringProcessor"),Ig=o((e,t,r,i)=>{let u=r,{minimum:n,maximum:a,format:l,multipleOf:d,exclusiveMaximum:c,exclusiveMinimum:p}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let h=typeof p=="number"&&p>=(n??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";h?f?(u.minimum=p,u.exclusiveMinimum=!0):u.exclusiveMinimum=p:typeof n=="number"&&(u.minimum=n),m?f?(u.maximum=c,u.exclusiveMaximum=!0):u.exclusiveMaximum=c:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),_g=o((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),Sg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Fg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),jg=o((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),zg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Ng=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),Og=o((e,t,r,i)=>{r.not={}},"neverProcessor"),Rg=o((e,t,r,i)=>{},"anyProcessor"),Tg=o((e,t,r,i)=>{},"unknownProcessor"),Mg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),Pg=o((e,t,r,i)=>{let u=e._zod.def,n=on(u.entries);n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),r.enum=n},"enumProcessor"),Ug=o((e,t,r,i)=>{let u=e._zod.def,n=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),n.every(a=>typeof a=="boolean")&&(r.type="boolean"),n.every(a=>a===null)&&(r.type="null"),r.enum=n},"literalProcessor"),Zg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),qg=o((e,t,r,i)=>{let u=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=n.source},"templateLiteralProcessor"),Lg=o((e,t,r,i)=>{let u=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(n.minLength=a),l!==void 0&&(n.maxLength=l),d?d.length===1?(n.contentMediaType=d[0],Object.assign(u,n)):(Object.assign(u,n),u.anyOf=d.map(c=>({contentMediaType:c}))):Object.assign(u,n)},"fileProcessor"),Jg=o((e,t,r,i)=>{r.type="boolean"},"successProcessor"),Vg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Wg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),Gg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Kg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),Hg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),Xg=o((e,t,r,i)=>{let u=r,n=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=ne(n.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),Yg=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object",u.properties={};let a=n.shape;for(let c in a)u.properties[c]=ne(a[c],t,{...i,path:[...i.path,"properties",c]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(c=>{let p=n.shape[c]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(u.required=Array.from(d)),n.catchall?._zod.def.type==="never"?u.additionalProperties=!1:n.catchall?n.catchall&&(u.additionalProperties=ne(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),Po=o((e,t,r,i)=>{let u=e._zod.def,n=u.inclusive===!1,a=u.options.map((l,d)=>ne(l,t,{...i,path:[...i.path,n?"oneOf":"anyOf",d]}));n?r.oneOf=a:r.anyOf=a},"unionProcessor"),Qg=o((e,t,r,i)=>{let u=e._zod.def,n=ne(u.left,t,{...i,path:[...i.path,"allOf",0]}),a=ne(u.right,t,{...i,path:[...i.path,"allOf",1]}),l=o(c=>"allOf"in c&&Object.keys(c).length===1,"isSimpleIntersection"),d=[...l(n)?n.allOf:[n],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),ev=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=n.items.map((m,f)=>ne(m,t,{...i,path:[...i.path,a,f]})),c=n.rest?ne(n.rest,t,{...i,path:[...i.path,l,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,c&&(u.items=c)):t.target==="openapi-3.0"?(u.items={anyOf:d},c&&u.items.anyOf.push(c),u.minItems=d.length,c||(u.maxItems=d.length)):(u.items=d,c&&(u.additionalItems=c));let{minimum:p,maximum:h}=e._zod.bag;typeof p=="number"&&(u.minItems=p),typeof h=="number"&&(u.maxItems=h)},"tupleProcessor"),tv=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object";let a=n.keyType,l=a._zod.bag?.patterns;if(n.mode==="loose"&&l&&l.size>0){let c=ne(n.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});u.patternProperties={};for(let p of l)u.patternProperties[p.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=ne(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),u.additionalProperties=ne(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=a._zod.values;if(d){let c=[...d].filter(p=>typeof p=="string"||typeof p=="number");c.length>0&&(u.required=c)}},"recordProcessor"),uv=o((e,t,r,i)=>{let u=e._zod.def,n=ne(u.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},"nullableProcessor"),rv=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"nonoptionalProcessor"),nv=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),iv=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),sv=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),av=o((e,t,r,i)=>{let u=e._zod.def,n=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?u.out:u.in:u.out;ne(a,t,i);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),ov=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),lv=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"promiseProcessor"),Uo=o((e,t,r,i)=>{let u=e._zod.def;ne(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"optionalProcessor"),dv=o((e,t,r,i)=>{let u=e._zod.innerType;ne(u,t,i);let n=t.seen.get(e);n.ref=u},"lazyProcessor"),Zo={string:Ag,number:Ig,boolean:_g,bigint:Sg,symbol:Fg,null:jg,undefined:zg,void:Ng,never:Og,any:Rg,unknown:Tg,date:Mg,enum:Pg,literal:Ug,nan:Zg,template_literal:qg,file:Lg,success:Jg,custom:Vg,function:Wg,transform:Gg,map:Kg,set:Hg,array:Xg,object:Yg,union:Po,intersection:Qg,tuple:ev,record:tv,nullable:uv,nonoptional:rv,default:nv,prefault:iv,catch:sv,pipe:av,readonly:ov,promise:lv,optional:Uo,lazy:dv};function qo(e,t){if("_idmap"in e){let i=e,u=St({...t,processors:Zo}),n={};for(let d of i._idmap.entries()){let[c,p]=d;ne(p,u)}let a={},l={registry:i,uri:t?.uri,defs:n};u.external=l;for(let d of i._idmap.entries()){let[c,p]=d;Ft(u,p),a[c]=jt(u,p)}if(Object.keys(n).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:n}}return{schemas:a}}let r=St({...t,processors:Zo});return ne(e,r),Ft(r,e),jt(r,e)}s(qo,"Ui"),o(qo,"toJSONSchema");var Ib=class{static{s(this,"Li")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=St({processors:Zo,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return ne(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Ft(this.ctx,e);let r=jt(this.ctx,e),{"~standard":i,...u}=r;return u}},_b={},cv={};Ge(cv,{ZodAny:s(()=>P0,"ZodAny"),ZodArray:s(()=>W0,"ZodArray"),ZodBase64:s(()=>ti,"ZodBase64"),ZodBase64URL:s(()=>ui,"ZodBase64URL"),ZodBigInt:s(()=>gr,"ZodBigInt"),ZodBigIntFormat:s(()=>ai,"ZodBigIntFormat"),ZodBoolean:s(()=>hr,"ZodBoolean"),ZodCIDRv4:s(()=>Qn,"ZodCIDRv4"),ZodCIDRv6:s(()=>ei,"ZodCIDRv6"),ZodCUID:s(()=>Vn,"ZodCUID"),ZodCUID2:s(()=>Wn,"ZodCUID2"),ZodCatch:s(()=>$l,"ZodCatch"),ZodCodec:s(()=>xr,"ZodCodec"),ZodCustom:s(()=>kr,"ZodCustom"),ZodCustomStringFormat:s(()=>iu,"ZodCustomStringFormat"),ZodDate:s(()=>li,"ZodDate"),ZodDefault:s(()=>El,"ZodDefault"),ZodDiscriminatedUnion:s(()=>el,"ZodDiscriminatedUnion"),ZodE164:s(()=>ri,"ZodE164"),ZodEmail:s(()=>qn,"ZodEmail"),ZodEmoji:s(()=>Ln,"ZodEmoji"),ZodEnum:s(()=>ou,"ZodEnum"),ZodExactOptional:s(()=>gl,"ZodExactOptional"),ZodFile:s(()=>ml,"ZodFile"),ZodFunction:s(()=>Nl,"ZodFunction"),ZodGUID:s(()=>cr,"ZodGUID"),ZodIPv4:s(()=>Xn,"ZodIPv4"),ZodIPv6:s(()=>Yn,"ZodIPv6"),ZodIntersection:s(()=>ul,"ZodIntersection"),ZodJWT:s(()=>ni,"ZodJWT"),ZodKSUID:s(()=>Hn,"ZodKSUID"),ZodLazy:s(()=>Fl,"ZodLazy"),ZodLiteral:s(()=>cl,"ZodLiteral"),ZodMAC:s(()=>h0,"ZodMAC"),ZodMap:s(()=>sl,"ZodMap"),ZodNaN:s(()=>Bl,"ZodNaN"),ZodNanoID:s(()=>Jn,"ZodNanoID"),ZodNever:s(()=>q0,"ZodNever"),ZodNonOptional:s(()=>vi,"ZodNonOptional"),ZodNull:s(()=>M0,"ZodNull"),ZodNullable:s(()=>vl,"ZodNullable"),ZodNumber:s(()=>mr,"ZodNumber"),ZodNumberFormat:s(()=>zt,"ZodNumberFormat"),ZodObject:s(()=>yr,"ZodObject"),ZodOptional:s(()=>mi,"ZodOptional"),ZodPipe:s(()=>$r,"ZodPipe"),ZodPrefault:s(()=>bl,"ZodPrefault"),ZodPreprocess:s(()=>Al,"ZodPreprocess"),ZodPromise:s(()=>jl,"ZodPromise"),ZodReadonly:s(()=>Il,"ZodReadonly"),ZodRecord:s(()=>au,"ZodRecord"),ZodSet:s(()=>ol,"ZodSet"),ZodString:s(()=>dr,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>Dl,"ZodSuccess"),ZodSymbol:s(()=>N0,"ZodSymbol"),ZodTemplateLiteral:s(()=>_l,"ZodTemplateLiteral"),ZodTransform:s(()=>hl,"ZodTransform"),ZodTuple:s(()=>rl,"ZodTuple"),ZodType:s(()=>Y,"ZodType"),ZodULID:s(()=>Gn,"ZodULID"),ZodURL:s(()=>pr,"ZodURL"),ZodUUID:s(()=>qe,"ZodUUID"),ZodUndefined:s(()=>R0,"ZodUndefined"),ZodUnion:s(()=>Er,"ZodUnion"),ZodUnknown:s(()=>Z0,"ZodUnknown"),ZodVoid:s(()=>L0,"ZodVoid"),ZodXID:s(()=>Kn,"ZodXID"),ZodXor:s(()=>Y0,"ZodXor"),_ZodString:s(()=>Zn,"_ZodString"),_default:s(()=>hi,"_default"),_function:s(()=>Cr,"_function"),any:s(()=>U0,"any"),array:s(()=>su,"array"),base64:s(()=>b0,"base64"),base64url:s(()=>D0,"base64url"),bigint:s(()=>F0,"bigint"),boolean:s(()=>si,"boolean"),catch:s(()=>Ei,"catch"),check:s(()=>Ol,"check"),cidrv4:s(()=>y0,"cidrv4"),cidrv6:s(()=>E0,"cidrv6"),codec:s(()=>Cl,"codec"),cuid:s(()=>l0,"cuid"),cuid2:s(()=>d0,"cuid2"),custom:s(()=>Rl,"custom"),date:s(()=>V0,"date"),describe:s(()=>kv,"describe"),discriminatedUnion:s(()=>tl,"discriminatedUnion"),e164:s(()=>w0,"e164"),email:s(()=>Qo,"email"),emoji:s(()=>a0,"emoji"),enum:s(()=>Dr,"enum"),exactOptional:s(()=>fi,"exactOptional"),file:s(()=>fl,"file"),float32:s(()=>A0,"float32"),float64:s(()=>I0,"float64"),function:s(()=>Cr,"function"),guid:s(()=>e0,"guid"),hash:s(()=>k0,"hash"),hex:s(()=>C0,"hex"),hostname:s(()=>x0,"hostname"),httpUrl:s(()=>s0,"httpUrl"),instanceof:s(()=>Tl,"instanceof"),int:s(()=>fr,"int"),int32:s(()=>_0,"int32"),int64:s(()=>j0,"int64"),intersection:s(()=>di,"intersection"),invertCodec:s(()=>kl,"invertCodec"),ipv4:s(()=>f0,"ipv4"),ipv6:s(()=>v0,"ipv6"),json:s(()=>Ml,"json"),jwt:s(()=>$0,"jwt"),keyof:s(()=>G0,"keyof"),ksuid:s(()=>m0,"ksuid"),lazy:s(()=>Di,"lazy"),literal:s(()=>pl,"literal"),looseObject:s(()=>X0,"looseObject"),looseRecord:s(()=>il,"looseRecord"),mac:s(()=>g0,"mac"),map:s(()=>al,"map"),meta:s(()=>Av,"meta"),nan:s(()=>xl,"nan"),nanoid:s(()=>o0,"nanoid"),nativeEnum:s(()=>dl,"nativeEnum"),never:s(()=>vr,"never"),nonoptional:s(()=>yi,"nonoptional"),null:s(()=>oi,"null"),nullable:s(()=>du,"nullable"),nullish:s(()=>yl,"nullish"),number:s(()=>ii,"number"),object:s(()=>K0,"object"),optional:s(()=>lu,"optional"),partialRecord:s(()=>nl,"partialRecord"),pipe:s(()=>Br,"pipe"),prefault:s(()=>gi,"prefault"),preprocess:s(()=>Pl,"preprocess"),promise:s(()=>zl,"promise"),readonly:s(()=>bi,"readonly"),record:s(()=>pi,"record"),refine:s(()=>wi,"refine"),set:s(()=>ll,"set"),strictObject:s(()=>H0,"strictObject"),string:s(()=>nu,"string"),stringFormat:s(()=>B0,"stringFormat"),stringbool:s(()=>Iv,"stringbool"),success:s(()=>wl,"success"),superRefine:s(()=>$i,"superRefine"),symbol:s(()=>O0,"symbol"),templateLiteral:s(()=>Sl,"templateLiteral"),transform:s(()=>wr,"transform"),tuple:s(()=>ci,"tuple"),uint32:s(()=>S0,"uint32"),uint64:s(()=>z0,"uint64"),ulid:s(()=>c0,"ulid"),undefined:s(()=>T0,"undefined"),union:s(()=>br,"union"),unknown:s(()=>ot,"unknown"),url:s(()=>i0,"url"),uuid:s(()=>t0,"uuid"),uuidv4:s(()=>u0,"uuidv4"),uuidv6:s(()=>r0,"uuidv6"),uuidv7:s(()=>n0,"uuidv7"),void:s(()=>J0,"void"),xid:s(()=>p0,"xid"),xor:s(()=>Q0,"xor")});var pv={};Ge(pv,{endsWith:s(()=>ur,"endsWith"),gt:s(()=>Xe,"gt"),gte:s(()=>Be,"gte"),includes:s(()=>er,"includes"),length:s(()=>tu,"length"),lowercase:s(()=>Yu,"lowercase"),lt:s(()=>He,"lt"),lte:s(()=>Se,"lte"),maxLength:s(()=>eu,"maxLength"),maxSize:s(()=>_t,"maxSize"),mime:s(()=>rr,"mime"),minLength:s(()=>at,"minLength"),minSize:s(()=>Ye,"minSize"),multipleOf:s(()=>It,"multipleOf"),negative:s(()=>Tn,"negative"),nonnegative:s(()=>Pn,"nonnegative"),nonpositive:s(()=>Mn,"nonpositive"),normalize:s(()=>nr,"normalize"),overwrite:s(()=>Ze,"overwrite"),positive:s(()=>Rn,"positive"),property:s(()=>Un,"property"),regex:s(()=>Xu,"regex"),size:s(()=>Qt,"size"),slugify:s(()=>or,"slugify"),startsWith:s(()=>tr,"startsWith"),toLowerCase:s(()=>sr,"toLowerCase"),toUpperCase:s(()=>ar,"toUpperCase"),trim:s(()=>ir,"trim"),uppercase:s(()=>Qu,"uppercase")});var Lo={};Ge(Lo,{ZodISODate:s(()=>Wo,"ZodISODate"),ZodISODateTime:s(()=>Jo,"ZodISODateTime"),ZodISODuration:s(()=>Xo,"ZodISODuration"),ZodISOTime:s(()=>Ko,"ZodISOTime"),date:s(()=>Go,"date"),datetime:s(()=>Vo,"datetime"),duration:s(()=>Yo,"duration"),time:s(()=>Ho,"time")});var Jo=w("ZodISODateTime",(e,t)=>{sf.init(e,t),ae.init(e,t)});function Vo(e){return ro(Jo,e)}s(Vo,"zp"),o(Vo,"datetime");var Wo=w("ZodISODate",(e,t)=>{af.init(e,t),ae.init(e,t)});function Go(e){return no(Wo,e)}s(Go,"jp"),o(Go,"date");var Ko=w("ZodISOTime",(e,t)=>{of.init(e,t),ae.init(e,t)});function Ho(e){return io(Ko,e)}s(Ho,"Op"),o(Ho,"time");var Xo=w("ZodISODuration",(e,t)=>{lf.init(e,t),ae.init(e,t)});function Yo(e){return so(Xo,e)}s(Yo,"Np"),o(Yo,"duration");var mv=o((e,t)=>{Ys.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>pn(e,r),"value")},flatten:{value:o(r=>cn(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ju,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ju,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),Sb=w("ZodError",mv),Fe=w("ZodError",mv,{Parent:Error}),fv=Tu(Fe),hv=Mu(Fe),gv=Pu(Fe),vv=Uu(Fe),yv=na(Fe),Ev=ia(Fe),bv=sa(Fe),Dv=aa(Fe),wv=oa(Fe),$v=la(Fe),Bv=da(Fe),xv=ca(Fe),Cv=new WeakMap;function ru(e,t,r){let i=Object.getPrototypeOf(e),u=Cv.get(i);if(u||(u=new Set,Cv.set(i,u)),!u.has(t)){u.add(t);for(let n in r){let a=r[n];Object.defineProperty(i,n,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(ru,"Pn"),o(ru,"_installLazyMethods");var Y=w("ZodType",(e,t)=>(H.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:lr(e,"input"),output:lr(e,"output")}}),e.toJSONSchema=kg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>fv(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>gv(e,r,i),e.parseAsync=async(r,i)=>hv(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>vv(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>yv(e,r,i),e.decode=(r,i)=>Ev(e,r,i),e.encodeAsync=async(r,i)=>bv(e,r,i),e.decodeAsync=async(r,i)=>Dv(e,r,i),e.safeEncode=(r,i)=>wv(e,r,i),e.safeDecode=(r,i)=>$v(e,r,i),e.safeEncodeAsync=async(r,i)=>Bv(e,r,i),e.safeDecodeAsync=async(r,i)=>xv(e,r,i),ru(e,"ZodType",{check(...r){let i=this.def;return this.clone(te.mergeDefs(i,{checks:[...i.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return Ae(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(wi(r,i))},superRefine(r,i){return this.check($i(r,i))},overwrite(r){return this.check(Ze(r))},optional(){return lu(this)},exactOptional(){return fi(this)},nullable(){return du(this)},nullish(){return lu(du(this))},nonoptional(r){return yi(this,r)},array(){return su(this)},or(r){return br([this,r])},and(r){return di(this,r)},transform(r){return Br(this,wr(r))},default(r){return hi(this,r)},prefault(r){return gi(this,r)},catch(r){return Ei(this,r)},pipe(r){return Br(this,r)},readonly(){return bi(this)},describe(r){let i=this.clone();return Ne.add(i,{description:r}),i},meta(...r){if(r.length===0)return Ne.get(this);let i=this.clone();return Ne.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Ne.get(e)?.description},configurable:!0}),e)),Zn=w("_ZodString",(e,t)=>{qu.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Ag(e,i,u,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,ru(e,"_ZodString",{regex(...i){return this.check(Xu(...i))},includes(...i){return this.check(er(...i))},startsWith(...i){return this.check(tr(...i))},endsWith(...i){return this.check(ur(...i))},min(...i){return this.check(at(...i))},max(...i){return this.check(eu(...i))},length(...i){return this.check(tu(...i))},nonempty(...i){return this.check(at(1,...i))},lowercase(i){return this.check(Yu(i))},uppercase(i){return this.check(Qu(i))},trim(){return this.check(ir())},normalize(...i){return this.check(nr(...i))},toLowerCase(){return this.check(sr())},toUpperCase(){return this.check(ar())},slugify(){return this.check(or())}})}),dr=w("ZodString",(e,t)=>{qu.init(e,t),Zn.init(e,t),e.email=r=>e.check(vn(qn,r)),e.url=r=>e.check(Hu(pr,r)),e.jwt=r=>e.check(On(ni,r)),e.emoji=r=>e.check(wn(Ln,r)),e.guid=r=>e.check(Ku(cr,r)),e.uuid=r=>e.check(yn(qe,r)),e.uuidv4=r=>e.check(En(qe,r)),e.uuidv6=r=>e.check(bn(qe,r)),e.uuidv7=r=>e.check(Dn(qe,r)),e.nanoid=r=>e.check($n(Jn,r)),e.guid=r=>e.check(Ku(cr,r)),e.cuid=r=>e.check(Bn(Vn,r)),e.cuid2=r=>e.check(xn(Wn,r)),e.ulid=r=>e.check(Cn(Gn,r)),e.base64=r=>e.check(jn(ti,r)),e.base64url=r=>e.check(zn(ui,r)),e.xid=r=>e.check(kn(Kn,r)),e.ksuid=r=>e.check(An(Hn,r)),e.ipv4=r=>e.check(In(Xn,r)),e.ipv6=r=>e.check(_n(Yn,r)),e.cidrv4=r=>e.check(Sn(Qn,r)),e.cidrv6=r=>e.check(Fn(ei,r)),e.e164=r=>e.check(Nn(ri,r)),e.datetime=r=>e.check(Vo(r)),e.date=r=>e.check(Go(r)),e.time=r=>e.check(Ho(r)),e.duration=r=>e.check(Yo(r))});function nu(e){return eo(dr,e)}s(nu,"jn"),o(nu,"string");var ae=w("ZodStringFormat",(e,t)=>{se.init(e,t),Zn.init(e,t)}),qn=w("ZodEmail",(e,t)=>{H4.init(e,t),ae.init(e,t)});function Qo(e){return vn(qn,e)}s(Qo,"Zb"),o(Qo,"email");var cr=w("ZodGUID",(e,t)=>{G4.init(e,t),ae.init(e,t)});function e0(e){return Ku(cr,e)}s(e0,"qb"),o(e0,"guid");var qe=w("ZodUUID",(e,t)=>{K4.init(e,t),ae.init(e,t)});function t0(e){return yn(qe,e)}s(t0,"Vb"),o(t0,"uuid");function u0(e){return En(qe,e)}s(u0,"Gb"),o(u0,"uuidv4");function r0(e){return bn(qe,e)}s(r0,"Jb"),o(r0,"uuidv6");function n0(e){return Dn(qe,e)}s(n0,"Kb"),o(n0,"uuidv7");var pr=w("ZodURL",(e,t)=>{X4.init(e,t),ae.init(e,t)});function i0(e){return Hu(pr,e)}s(i0,"Wb"),o(i0,"url");function s0(e){return Hu(pr,{protocol:st.httpProtocol,hostname:st.domain,...te.normalizeParams(e)})}s(s0,"Xb"),o(s0,"httpUrl");var Ln=w("ZodEmoji",(e,t)=>{Y4.init(e,t),ae.init(e,t)});function a0(e){return wn(Ln,e)}s(a0,"Hb"),o(a0,"emoji");var Jn=w("ZodNanoID",(e,t)=>{Q4.init(e,t),ae.init(e,t)});function o0(e){return $n(Jn,e)}s(o0,"Yb"),o(o0,"nanoid");var Vn=w("ZodCUID",(e,t)=>{ef.init(e,t),ae.init(e,t)});function l0(e){return Bn(Vn,e)}s(l0,"Qb"),o(l0,"cuid");var Wn=w("ZodCUID2",(e,t)=>{tf.init(e,t),ae.init(e,t)});function d0(e){return xn(Wn,e)}s(d0,"ew"),o(d0,"cuid2");var Gn=w("ZodULID",(e,t)=>{uf.init(e,t),ae.init(e,t)});function c0(e){return Cn(Gn,e)}s(c0,"tw"),o(c0,"ulid");var Kn=w("ZodXID",(e,t)=>{rf.init(e,t),ae.init(e,t)});function p0(e){return kn(Kn,e)}s(p0,"rw"),o(p0,"xid");var Hn=w("ZodKSUID",(e,t)=>{nf.init(e,t),ae.init(e,t)});function m0(e){return An(Hn,e)}s(m0,"nw"),o(m0,"ksuid");var Xn=w("ZodIPv4",(e,t)=>{df.init(e,t),ae.init(e,t)});function f0(e){return In(Xn,e)}s(f0,"ow"),o(f0,"ipv4");var h0=w("ZodMAC",(e,t)=>{pf.init(e,t),ae.init(e,t)});function g0(e){return uo(h0,e)}s(g0,"iw"),o(g0,"mac");var Yn=w("ZodIPv6",(e,t)=>{cf.init(e,t),ae.init(e,t)});function v0(e){return _n(Yn,e)}s(v0,"sw"),o(v0,"ipv6");var Qn=w("ZodCIDRv4",(e,t)=>{mf.init(e,t),ae.init(e,t)});function y0(e){return Sn(Qn,e)}s(y0,"aw"),o(y0,"cidrv4");var ei=w("ZodCIDRv6",(e,t)=>{ff.init(e,t),ae.init(e,t)});function E0(e){return Fn(ei,e)}s(E0,"cw"),o(E0,"cidrv6");var ti=w("ZodBase64",(e,t)=>{hf.init(e,t),ae.init(e,t)});function b0(e){return jn(ti,e)}s(b0,"uw"),o(b0,"base64");var ui=w("ZodBase64URL",(e,t)=>{gf.init(e,t),ae.init(e,t)});function D0(e){return zn(ui,e)}s(D0,"lw"),o(D0,"base64url");var ri=w("ZodE164",(e,t)=>{vf.init(e,t),ae.init(e,t)});function w0(e){return Nn(ri,e)}s(w0,"dw"),o(w0,"e164");var ni=w("ZodJWT",(e,t)=>{yf.init(e,t),ae.init(e,t)});function $0(e){return On(ni,e)}s($0,"pw"),o($0,"jwt");var iu=w("ZodCustomStringFormat",(e,t)=>{Ef.init(e,t),ae.init(e,t)});function B0(e,t,r={}){return uu(iu,e,t,r)}s(B0,"fw"),o(B0,"stringFormat");function x0(e){return uu(iu,"hostname",st.hostname,e)}s(x0,"mw"),o(x0,"hostname");function C0(e){return uu(iu,"hex",st.hex,e)}s(C0,"hw"),o(C0,"hex");function k0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,u=st[i];if(!u)throw new Error(`Unrecognized hash format: ${i}`);return uu(iu,i,u,t)}s(k0,"gw"),o(k0,"hash");var mr=w("ZodNumber",(e,t)=>{$a.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Ig(e,i,u,n),ru(e,"ZodNumber",{gt(i,u){return this.check(Xe(i,u))},gte(i,u){return this.check(Be(i,u))},min(i,u){return this.check(Be(i,u))},lt(i,u){return this.check(He(i,u))},lte(i,u){return this.check(Se(i,u))},max(i,u){return this.check(Se(i,u))},int(i){return this.check(fr(i))},safe(i){return this.check(fr(i))},positive(i){return this.check(Xe(0,i))},nonnegative(i){return this.check(Be(0,i))},negative(i){return this.check(He(0,i))},nonpositive(i){return this.check(Se(0,i))},multipleOf(i,u){return this.check(It(i,u))},step(i,u){return this.check(It(i,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ii(e){return ao(mr,e)}s(ii,"Kp"),o(ii,"number");var zt=w("ZodNumberFormat",(e,t)=>{bf.init(e,t),mr.init(e,t)});function fr(e){return lo(zt,e)}s(fr,"Gi"),o(fr,"int");function A0(e){return co(zt,e)}s(A0,"vw"),o(A0,"float32");function I0(e){return po(zt,e)}s(I0,"yw"),o(I0,"float64");function _0(e){return mo(zt,e)}s(_0,"bw"),o(_0,"int32");function S0(e){return fo(zt,e)}s(S0,"ww"),o(S0,"uint32");var hr=w("ZodBoolean",(e,t)=>{Ba.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>_g(e,r,i,u)});function si(e){return ho(hr,e)}s(si,"Wp"),o(si,"boolean");var gr=w("ZodBigInt",(e,t)=>{xa.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Sg(e,i,u,n),e.gte=(i,u)=>e.check(Be(i,u)),e.min=(i,u)=>e.check(Be(i,u)),e.gt=(i,u)=>e.check(Xe(i,u)),e.gte=(i,u)=>e.check(Be(i,u)),e.min=(i,u)=>e.check(Be(i,u)),e.lt=(i,u)=>e.check(He(i,u)),e.lte=(i,u)=>e.check(Se(i,u)),e.max=(i,u)=>e.check(Se(i,u)),e.positive=i=>e.check(Xe(BigInt(0),i)),e.negative=i=>e.check(He(BigInt(0),i)),e.nonpositive=i=>e.check(Se(BigInt(0),i)),e.nonnegative=i=>e.check(Be(BigInt(0),i)),e.multipleOf=(i,u)=>e.check(It(i,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function F0(e){return vo(gr,e)}s(F0,"xw"),o(F0,"bigint");var ai=w("ZodBigIntFormat",(e,t)=>{Df.init(e,t),gr.init(e,t)});function j0(e){return Eo(ai,e)}s(j0,"$w"),o(j0,"int64");function z0(e){return bo(ai,e)}s(z0,"_w"),o(z0,"uint64");var N0=w("ZodSymbol",(e,t)=>{wf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Fg(e,r,i,u)});function O0(e){return Do(N0,e)}s(O0,"kw"),o(O0,"symbol");var R0=w("ZodUndefined",(e,t)=>{$f.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>zg(e,r,i,u)});function T0(e){return wo(R0,e)}s(T0,"Sw"),o(T0,"_undefined");var M0=w("ZodNull",(e,t)=>{Bf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>jg(e,r,i,u)});function oi(e){return $o(M0,e)}s(oi,"Qp"),o(oi,"_null");var P0=w("ZodAny",(e,t)=>{xf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Rg(e,r,i,u)});function U0(){return Bo(P0)}s(U0,"Iw"),o(U0,"any");var Z0=w("ZodUnknown",(e,t)=>{Cf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Tg(e,r,i,u)});function ot(){return xo(Z0)}s(ot,"Wt"),o(ot,"unknown");var q0=w("ZodNever",(e,t)=>{kf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Og(e,r,i,u)});function vr(e){return Co(q0,e)}s(vr,"ps"),o(vr,"never");var L0=w("ZodVoid",(e,t)=>{Af.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ng(e,r,i,u)});function J0(e){return ko(L0,e)}s(J0,"Rw"),o(J0,"_void");var li=w("ZodDate",(e,t)=>{If.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Mg(e,i,u,n),e.min=(i,u)=>e.check(Be(i,u)),e.max=(i,u)=>e.check(Se(i,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function V0(e){return Ao(li,e)}s(V0,"Ew"),o(V0,"date");var W0=w("ZodArray",(e,t)=>{_f.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Xg(e,r,i,u),e.element=t.element,ru(e,"ZodArray",{min(r,i){return this.check(at(r,i))},nonempty(r){return this.check(at(1,r))},max(r,i){return this.check(eu(r,i))},length(r,i){return this.check(tu(r,i))},unwrap(){return this.element}})});function su(e,t){return So(W0,e,t)}s(su,"Un"),o(su,"array");function G0(e){let t=e._zod.def.shape;return Dr(Object.keys(t))}s(G0,"Tw"),o(G0,"keyof");var yr=w("ZodObject",(e,t)=>{Ff.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Yg(e,r,i,u),te.defineLazy(e,"shape",()=>t.shape),ru(e,"ZodObject",{keyof(){return Dr(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ot()})},loose(){return this.clone({...this._zod.def,catchall:ot()})},strict(){return this.clone({...this._zod.def,catchall:vr()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return te.extend(this,r)},safeExtend(r){return te.safeExtend(this,r)},merge(r){return te.merge(this,r)},pick(r){return te.pick(this,r)},omit(r){return te.omit(this,r)},partial(...r){return te.partial(mi,this,r[0])},required(...r){return te.required(vi,this,r[0])}})});function K0(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new yr(r)}s(K0,"Aw"),o(K0,"object");function H0(e,t){return new yr({type:"object",shape:e,catchall:vr(),...te.normalizeParams(t)})}s(H0,"zw"),o(H0,"strictObject");function X0(e,t){return new yr({type:"object",shape:e,catchall:ot(),...te.normalizeParams(t)})}s(X0,"jw"),o(X0,"looseObject");var Er=w("ZodUnion",(e,t)=>{fn.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Po(e,r,i,u),e.options=t.options});function br(e,t){return new Er({type:"union",options:e,...te.normalizeParams(t)})}s(br,"fs"),o(br,"union");var Y0=w("ZodXor",(e,t)=>{Er.init(e,t),jf.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Po(e,r,i,u),e.options=t.options});function Q0(e,t){return new Y0({type:"union",options:e,inclusive:!1,...te.normalizeParams(t)})}s(Q0,"Ow"),o(Q0,"xor");var el=w("ZodDiscriminatedUnion",(e,t)=>{Er.init(e,t),zf.init(e,t)});function tl(e,t,r){return new el({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}s(tl,"Nw"),o(tl,"discriminatedUnion");var ul=w("ZodIntersection",(e,t)=>{Nf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Qg(e,r,i,u)});function di(e,t){return new ul({type:"intersection",left:e,right:t})}s(di,"uf"),o(di,"intersection");var rl=w("ZodTuple",(e,t)=>{Fa.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ev(e,r,i,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function ci(e,t,r){let i=t instanceof H,u=i?r:t,n=i?t:null;return new rl({type:"tuple",items:e,rest:n,...te.normalizeParams(u)})}s(ci,"df"),o(ci,"tuple");var au=w("ZodRecord",(e,t)=>{Of.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>tv(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType});function pi(e,t,r){return!t||!t._zod?new au({type:"record",keyType:nu(),valueType:e,...te.normalizeParams(t)}):new au({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}s(pi,"pf"),o(pi,"record");function nl(e,t,r){let i=Ae(e);return i._zod.values=void 0,new au({type:"record",keyType:i,valueType:t,...te.normalizeParams(r)})}s(nl,"Dw"),o(nl,"partialRecord");function il(e,t,r){return new au({type:"record",keyType:e,valueType:t,mode:"loose",...te.normalizeParams(r)})}s(il,"Pw"),o(il,"looseRecord");var sl=w("ZodMap",(e,t)=>{Rf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Kg(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(_t(...r)),e.size=(...r)=>e.check(Qt(...r))});function al(e,t,r){return new sl({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}s(al,"Mw"),o(al,"map");var ol=w("ZodSet",(e,t)=>{Tf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Hg(e,r,i,u),e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check(_t(...r)),e.size=(...r)=>e.check(Qt(...r))});function ll(e,t){return new ol({type:"set",valueType:e,...te.normalizeParams(t)})}s(ll,"Cw"),o(ll,"set");var ou=w("ZodEnum",(e,t)=>{Mf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Pg(e,i,u,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,u)=>{let n={};for(let a of i)if(r.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ou({...t,checks:[],...te.normalizeParams(u),entries:n})},e.exclude=(i,u)=>{let n={...t.entries};for(let a of i)if(r.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new ou({...t,checks:[],...te.normalizeParams(u),entries:n})}});function Dr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ou({type:"enum",entries:r,...te.normalizeParams(t)})}s(Dr,"ms"),o(Dr,"_enum");function dl(e,t){return new ou({type:"enum",entries:e,...te.normalizeParams(t)})}s(dl,"Uw"),o(dl,"nativeEnum");var cl=w("ZodLiteral",(e,t)=>{Pf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ug(e,r,i,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function pl(e,t){return new cl({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}s(pl,"Lw"),o(pl,"literal");var ml=w("ZodFile",(e,t)=>{Uf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Lg(e,r,i,u),e.min=(r,i)=>e.check(Ye(r,i)),e.max=(r,i)=>e.check(_t(r,i)),e.mime=(r,i)=>e.check(rr(Array.isArray(r)?r:[r],i))});function fl(e){return Fo(ml,e)}s(fl,"Fw"),o(fl,"file");var hl=w("ZodTransform",(e,t)=>{Zf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Gg(e,r,i,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new an(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(te.issue(n,r.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(te.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(n=>(r.value=n,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function wr(e){return new hl({type:"transform",transform:e})}s(wr,"hs"),o(wr,"transform");var mi=w("ZodOptional",(e,t)=>{Ma.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Uo(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function lu(e){return new mi({type:"optional",innerType:e})}s(lu,"Nn"),o(lu,"optional");var gl=w("ZodExactOptional",(e,t)=>{qf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Uo(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function fi(e){return new gl({type:"optional",innerType:e})}s(fi,"bf"),o(fi,"exactOptional");var vl=w("ZodNullable",(e,t)=>{Lf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>uv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function du(e){return new vl({type:"nullable",innerType:e})}s(du,"Dn"),o(du,"nullable");function yl(e){return lu(du(e))}s(yl,"Bw"),o(yl,"nullish");var El=w("ZodDefault",(e,t)=>{Jf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>nv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hi(e,t){return new El({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}s(hi,"$f"),o(hi,"_default");var bl=w("ZodPrefault",(e,t)=>{Vf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>iv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function gi(e,t){return new bl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}s(gi,"kf"),o(gi,"prefault");var vi=w("ZodNonOptional",(e,t)=>{Wf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>rv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function yi(e,t){return new vi({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}s(yi,"Sf"),o(yi,"nonoptional");var Dl=w("ZodSuccess",(e,t)=>{Gf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Jg(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function wl(e){return new Dl({type:"success",innerType:e})}s(wl,"Zw"),o(wl,"success");var $l=w("ZodCatch",(e,t)=>{Kf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>sv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ei(e,t){return new $l({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(Ei,"Ef"),o(Ei,"_catch");var Bl=w("ZodNaN",(e,t)=>{Hf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Zg(e,r,i,u)});function xl(e){return _o(Bl,e)}s(xl,"qw"),o(xl,"nan");var $r=w("ZodPipe",(e,t)=>{Za.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>av(e,r,i,u),e.in=t.in,e.out=t.out});function Br(e,t){return new $r({type:"pipe",in:e,out:t})}s(Br,"Ji"),o(Br,"pipe");var xr=w("ZodCodec",(e,t)=>{$r.init(e,t),qa.init(e,t)});function Cl(e,t,r){return new xr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(Cl,"Vw"),o(Cl,"codec");function kl(e){let t=e._zod.def;return new xr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(kl,"Gw"),o(kl,"invertCodec");var Al=w("ZodPreprocess",(e,t)=>{$r.init(e,t),Xf.init(e,t)}),Il=w("ZodReadonly",(e,t)=>{Yf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ov(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function bi(e){return new Il({type:"readonly",innerType:e})}s(bi,"jf"),o(bi,"readonly");var _l=w("ZodTemplateLiteral",(e,t)=>{Qf.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>qg(e,r,i,u)});function Sl(e,t){return new _l({type:"template_literal",parts:e,...te.normalizeParams(t)})}s(Sl,"Jw"),o(Sl,"templateLiteral");var Fl=w("ZodLazy",(e,t)=>{uh.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>dv(e,r,i,u),e.unwrap=()=>e._zod.def.getter()});function Di(e){return new Fl({type:"lazy",getter:e})}s(Di,"Df"),o(Di,"lazy");var jl=w("ZodPromise",(e,t)=>{th.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>lv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function zl(e){return new jl({type:"promise",innerType:e})}s(zl,"Kw"),o(zl,"promise");var Nl=w("ZodFunction",(e,t)=>{eh.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Wg(e,r,i,u)});function Cr(e){return new Nl({type:"function",input:Array.isArray(e?.input)?ci(e?.input):e?.input??su(ot()),output:e?.output??ot()})}s(Cr,"Ww"),o(Cr,"_function");var kr=w("ZodCustom",(e,t)=>{rh.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Vg(e,r,i,u)});function Ol(e){let t=new oe({check:"custom"});return t._zod.check=e,t}s(Ol,"Xw"),o(Ol,"check");function Rl(e,t){return jo(kr,e??(()=>!0),t)}s(Rl,"Hw"),o(Rl,"custom");function wi(e,t={}){return zo(kr,e,t)}s(wi,"Cf"),o(wi,"refine");function $i(e,t){return No(e,t)}s($i,"Uf"),o($i,"superRefine");var kv=Ro,Av=To;function Tl(e,t={}){let r=new kr({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0,...te.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}s(Tl,"ex"),o(Tl,"_instanceof");var Iv=o((...e)=>Mo({Codec:xr,Boolean:hr,String:dr},...e),"stringbool");function Ml(e){let t=Di(()=>br([nu(e),ii(),si(),oi(),su(t),pi(nu(),t)]));return t}s(Ml,"rx"),o(Ml,"json");function Pl(e,t){return new Al({type:"pipe",in:wr(e),out:t})}s(Pl,"nx"),o(Pl,"preprocess");var Fb={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function _v(e){Ee({customError:e})}s(_v,"QI"),o(_v,"setErrorMap");function Sv(){return Ee().customError}s(Sv,"e0"),o(Sv,"getErrorMap");var Ul;Ul||(Ul={});var Z={...cv,...pv,iso:Lo},jb=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Fv(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(Fv,"r0"),o(Fv,"detectVersion");function jv(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(jv,"n0"),o(jv,"resolveRef");function Zl(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return Z.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let n=jv(u,t),a=De(n,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return Z.null();if(u.length===0)return Z.never();if(u.length===1)return Z.literal(u[0]);if(u.every(a=>typeof a=="string"))return Z.enum(u);let n=u.map(a=>Z.literal(a));return n.length<2?n[0]:Z.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(n=>{let a={...e,type:n};return Zl(a,t)});return u.length===0?Z.never():u.length===1?u[0]:Z.union(u)}if(!r)return Z.any();let i;switch(r){case"string":{let u=Z.string();if(e.format){let n=e.format;n==="email"?u=u.check(Z.email()):n==="uri"||n==="uri-reference"?u=u.check(Z.url()):n==="uuid"||n==="guid"?u=u.check(Z.uuid()):n==="date-time"?u=u.check(Z.iso.datetime()):n==="date"?u=u.check(Z.iso.date()):n==="time"?u=u.check(Z.iso.time()):n==="duration"?u=u.check(Z.iso.duration()):n==="ipv4"?u=u.check(Z.ipv4()):n==="ipv6"?u=u.check(Z.ipv6()):n==="mac"?u=u.check(Z.mac()):n==="cidr"?u=u.check(Z.cidrv4()):n==="cidr-v6"?u=u.check(Z.cidrv6()):n==="base64"?u=u.check(Z.base64()):n==="base64url"?u=u.check(Z.base64url()):n==="e164"?u=u.check(Z.e164()):n==="jwt"?u=u.check(Z.jwt()):n==="emoji"?u=u.check(Z.emoji()):n==="nanoid"?u=u.check(Z.nanoid()):n==="cuid"?u=u.check(Z.cuid()):n==="cuid2"?u=u.check(Z.cuid2()):n==="ulid"?u=u.check(Z.ulid()):n==="xid"?u=u.check(Z.xid()):n==="ksuid"&&(u=u.check(Z.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),i=u;break}case"number":case"integer":{let u=r==="integer"?Z.number().int():Z.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),i=u;break}case"boolean":{i=Z.boolean();break}case"null":{i=Z.null();break}case"object":{let u={},n=e.properties||{},a=new Set(e.required||[]);for(let[d,c]of Object.entries(n)){let p=De(c,t);u[d]=a.has(d)?p:p.optional()}if(e.propertyNames){let d=De(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?De(e.additionalProperties,t):Z.any();if(Object.keys(u).length===0){i=Z.record(d,c);break}let p=Z.object(u).passthrough(),h=Z.looseRecord(d,c);i=Z.intersection(p,h);break}if(e.patternProperties){let d=e.patternProperties,c=Object.keys(d),p=[];for(let m of c){let f=De(d[m],t),g=Z.string().regex(new RegExp(m));p.push(Z.looseRecord(g,f))}let h=[];if(Object.keys(u).length>0&&h.push(Z.object(u).passthrough()),h.push(...p),h.length===0)i=Z.object({}).passthrough();else if(h.length===1)i=h[0];else{let m=Z.intersection(h[0],h[1]);for(let f=2;f<h.length;f++)m=Z.intersection(m,h[f]);i=m}break}let l=Z.object(u);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall(De(e.additionalProperties,t)):i=l.passthrough();break}case"array":{let u=e.prefixItems,n=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>De(d,t)),l=n&&typeof n=="object"&&!Array.isArray(n)?De(n,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(d=>De(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?De(e.additionalItems,t):void 0;l?i=Z.tuple(a).rest(l):i=Z.tuple(a),typeof e.minItems=="number"&&(i=i.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(Z.maxLength(e.maxItems)))}else if(n!==void 0){let a=De(n,t),l=Z.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}s(Zl,"ox"),o(Zl,"convertBaseSchema");function De(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r=Zl(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(c=>De(c,t)),d=Z.union(l);r=i?Z.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(c=>De(c,t)),d=Z.xor(l);r=i?Z.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:Z.any();else{let l=i?r:De(e.allOf[0],t),d=i?0:1;for(let c=d;c<e.allOf.length;c++)l=Z.intersection(l,De(e.allOf[c],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=Z.nullable(r)),e.readOnly===!0&&(r=Z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of n)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))jb.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s(De,"ke"),o(De,"convertSchema");function zv(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Fv(r,t?.defaultTarget),u=r.$defs||r.definitions||{},n={version:i,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Ne};return De(r,n)}s(zv,"ix"),o(zv,"fromJSONSchema");var Nv={};Ge(Nv,{bigint:s(()=>Mv,"bigint"),boolean:s(()=>Tv,"boolean"),date:s(()=>Pv,"date"),number:s(()=>Rv,"number"),string:s(()=>Ov,"string")});function Ov(e){return to(dr,e)}s(Ov,"o0"),o(Ov,"string");function Rv(e){return oo(mr,e)}s(Rv,"i0"),o(Rv,"number");function Tv(e){return go(hr,e)}s(Tv,"s0"),o(Tv,"boolean");function Mv(e){return yo(gr,e)}s(Mv,"a0"),o(Mv,"bigint");function Pv(e){return Io(li,e)}s(Pv,"c0"),o(Pv,"date"),Ee(Ga());var ql=v.object({file:v.string(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),symbol:v.string().optional(),componentName:v.string().optional(),hookName:v.string().optional()}),zb=v.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),Uv=v.object({sessionId:v.string(),browserContextId:v.string().optional(),tabId:v.string().optional(),frameId:v.string().optional(),route:v.string().optional(),url:v.string().optional(),flowId:v.string().optional(),originType:zb.optional(),originNodeId:v.string().optional(),causedByNodeId:v.string().optional(),requestId:v.string().optional(),parentRequestId:v.string().optional(),traceparent:v.string().optional(),projectName:v.string().optional(),userActionId:v.string().optional(),userIdHash:v.string().optional(),tenantIdHash:v.string().optional()}),Nb=v.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai","lens"]),Ob=v.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),Ll=v.enum(["debug","info","warning","error","fatal"]),R7=v.object({id:v.string(),sessionId:v.string(),timestamp:v.number().int().nonnegative(),source:Nb,category:Ob,severity:Ll,context:Uv,fingerprint:v.string(),title:v.string(),message:v.string().optional(),location:ql.optional(),relatedFiles:v.array(v.string()).optional(),relatedUrls:v.array(v.string()).optional(),raw:v.unknown().optional()}),Rb=v.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),Tb=v.enum(["created","active","completed","disposed","errored"]),T7=v.object({id:v.string(),parentTraceNodeId:v.string().optional(),type:Rb,logicalId:v.string().optional(),instanceId:v.string().optional(),generation:v.number().int().nonnegative().optional(),lifecycle:Tb,context:Uv,name:v.string(),startTime:v.number().int().nonnegative(),endTime:v.number().int().nonnegative().optional(),durationMs:v.number().nonnegative().optional(),location:ql.optional(),attributes:v.record(v.string(),v.unknown())}),Mb=v.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),M7=v.object({id:v.string(),from:v.string(),to:v.string(),axis:Mb,type:v.string(),timestamp:v.number().int().nonnegative(),attributes:v.record(v.string(),v.unknown()).optional()}),Pb=v.enum(["mount","update"]),Ub=v.discriminatedUnion("type",[v.object({type:v.literal("props"),changedKeys:v.array(v.string())}),v.object({type:v.literal("react-state"),hookIndex:v.number().int()}),v.object({type:v.literal("context"),contextName:v.string()}),v.object({type:v.literal("valtio-path"),path:v.string(),changedKeys:v.array(v.string())}),v.object({type:v.literal("parent-render"),parentRenderId:v.string()}),v.object({type:v.literal("hook-dep-changed"),hookInstanceId:v.string(),depsHashBefore:v.string(),depsHashAfter:v.string()}),v.object({type:v.literal("force"),reason:v.string()})]),P7=v.object({phase:Pb,actualDurationMs:v.number().nonnegative(),baseDurationMs:v.number().nonnegative(),startTime:v.number().nonnegative(),commitTime:v.number().nonnegative(),why:v.array(Ub)}),U7=v.object({hookInstanceId:v.string(),depsHash:v.string(),prevDepsHash:v.string().optional(),durationMs:v.number().nonnegative(),cleanupRan:v.boolean().optional()}),Z7=v.object({storeId:v.string(),path:v.string(),changedKeys:v.array(v.string()),beforeHash:v.string(),afterHash:v.string(),preview:v.unknown().optional()}),q7=v.object({method:v.string(),route:v.string(),status:v.number().int().optional(),durationMs:v.number().nonnegative().optional(),traceparent:v.string().optional()}),Zb=v.enum(["N+1","sequential-await","growing-allocation"]),L7=v.object({iterations:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),dbCallsInsideLoop:v.number().int().nonnegative(),redisCallsInsideLoop:v.number().int().nonnegative(),awaitedOperationsInsideLoop:v.number().int().nonnegative(),slowestIterations:v.array(v.object({index:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),childNodeIds:v.array(v.string())})).optional(),patterns:v.array(Zb).optional()}),qb=v.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),J7=v.object({ownerInstanceId:v.string(),containerKind:qb,fieldName:v.string(),itemCount:v.number().int().nonnegative(),estimatedBytes:v.number().nonnegative(),retainedBytes:v.number().nonnegative().optional(),growthSinceStart:v.number()}),Lb=v.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),V7=v.object({ownerNodeId:v.string(),operation:Lb,beforeCount:v.number().int().nonnegative(),afterCount:v.number().int().nonnegative(),estimatedDeltaBytes:v.number(),keyPreview:v.string().optional(),valueType:v.string().optional()}),Zv=v.object({x:v.number(),y:v.number(),width:v.number().nonnegative(),height:v.number().nonnegative()}),Jb=v.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),Vb=v.enum(["computed-style","layout","paint-order"]),W7=v.object({causedBy:Jb,viewport:Zv,layoutSnapshotId:v.string(),styleSnapshotId:v.string(),screenshotId:v.string().optional(),changedNodes:v.array(v.object({uid:v.string(),component:v.string().optional(),change:Vb,property:v.string().optional(),before:v.unknown().optional(),after:v.unknown().optional()}))}),Wb=v.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),Gb=v.enum(["always","after-animation","stable-only","during-animation"]),Kb=v.enum(["info","warning","error"]),G7=v.object({ruleId:v.string(),ruleType:Wb,severity:Kb,timing:Gb,element:v.object({uid:v.string(),component:v.string().optional(),rect:Zv}),expected:v.record(v.string(),v.unknown()),actual:v.record(v.string(),v.unknown()),evidence:v.object({computedStyle:v.string().optional(),screenshotCrop:v.string().optional(),trace:v.string().optional(),cssCause:v.object({selector:v.string(),file:v.string().optional(),line:v.number().int().optional(),declaration:v.string().optional()}).optional()})}),Hb=v.enum(["none","connected"]),Xb=v.enum(["running","clean","failing","error"]),Yb=v.object({id:v.string(),tool:v.string(),project:v.string().optional(),firstReportedAt:v.number().int().nonnegative(),lastReportedAt:v.number().int().nonnegative(),lastRunStatus:Xb,lastRunDurationMs:v.number().int().nonnegative().optional(),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative().optional(),error:v.string().optional()}),Bi=v.object({producer:Hb,producers:v.array(Yb),lastReportedAt:v.number().int().nonnegative().optional(),ageMs:v.number().int().nonnegative().optional(),stale:v.boolean(),detail:v.string()}),qv=10*6e4;function xi(e){let t=e.now??Date.now(),r=[...e.producers].sort((c,p)=>p.lastReportedAt-c.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let i=r[0].lastReportedAt,u=Math.max(0,t-i),n=u>qv,a=r.filter(c=>c.lastRunStatus==="failing"),l=r.filter(c=>c.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(c=>c.id).join(", ")}); newest report ${Lv(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(c=>`${c.id} \u2014 ${c.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),n&&d.push(`Older than ${Math.round(qv/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:i,ageMs:u,stale:n,detail:d.join(" ")}}s(xi,"Br"),o(xi,"summariseProducers");function Lv(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(Lv,"E0"),o(Lv,"describeAge");var cu=v.object({$schema:v.string().optional(),schemaVersion:v.literal(1),revision:v.number().int().nonnegative(),updatedAt:v.string().datetime().optional()}),Qb=v.enum(["starting","clean","warning","failing"]),Jv=v.object({source:v.string(),severity:Ll,title:v.string(),fingerprint:v.string(),resource:v.string(),pageId:v.string().optional(),flowId:v.string().optional(),location:ql.optional()}),eD=v.object({typecheck:v.enum(["passed","failed","unknown"]).optional(),lint:v.enum(["passed","failed","unknown"]).optional(),build:v.enum(["passed","failed","unknown"]).optional(),runtime:v.enum(["passed","failed","warning","unknown"]).optional(),visual:v.enum(["passed","failed","warning","unknown"]).optional(),memory:v.enum(["passed","failed","warning","unknown"]).optional()}),tD=v.enum(["embedded","shared"]),uD=v.object({mode:tD,pid:v.number(),startedAt:v.string(),url:v.string().optional()}),K7=cu.extend({sessionId:v.string(),status:Qb,activeTab:v.string().optional(),tabsWithIssues:v.array(v.string()).optional(),blocking:v.array(Jv),warnings:v.array(Jv).default([]),suggestedReads:v.array(v.string()),checks:eD.optional(),server:uD.optional()}),rD=v.object({eventsResident:v.number().int().nonnegative(),eventsResidentBytes:v.number().int().nonnegative(),eventsIngested:v.number().int().nonnegative(),eventsDropped:v.number().int().nonnegative(),eventsDroppedForBytes:v.number().int().nonnegative().optional(),eventCap:v.number().int().nonnegative().optional(),eventByteCap:v.number().int().nonnegative().optional(),artifactsResident:v.number().int().nonnegative().optional(),artifactsResidentBytes:v.number().int().nonnegative().optional(),artifactsDropped:v.number().int().nonnegative().optional(),artifactByteCap:v.number().int().nonnegative().optional(),truncatedEvents:v.number().int().nonnegative().optional(),truncatedBytesReclaimed:v.number().int().nonnegative().optional(),rawByteLimit:v.number().int().nonnegative().optional(),reducers:v.record(v.string(),v.object({residentEvents:v.number().int().nonnegative(),residentBytes:v.number().int().nonnegative(),evictedEvents:v.number().int().nonnegative(),evictedForBytes:v.number().int().nonnegative(),eventCap:v.number().int().nonnegative(),byteCap:v.number().int().nonnegative()})).optional()}),H7=cu.extend({sessionId:v.string(),supportedResources:v.array(v.string()),supportedTools:v.array(v.string()),supportedJobs:v.array(v.string()),supportedChannels:v.array(v.string()),subscribedByDefault:v.array(v.string()),transports:v.array(v.enum(["stdio","http","socket"])),host:v.object({platform:v.string(),node:v.string()}),project:v.object({name:v.string(),nxVersion:v.string().optional()}),storage:rD.optional()}),nD=v.object({id:v.string(),timestamp:v.number().int().nonnegative(),message:v.string(),fingerprint:v.string(),code:v.string().optional(),rule:v.string().optional(),severity:Ll.optional(),file:v.string().optional(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),project:v.string().optional()}),X7=cu.merge(Bi).extend({status:v.enum(["unknown","clean","failing"]),errorCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),Y7=cu.merge(Bi).extend({errors:v.array(nD)}),Q7=cu.merge(Bi).extend({status:v.enum(["unknown","clean","warning","failing"]),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),eA=cu.merge(Bi).extend({status:v.enum(["unknown","clean","warning","failing"]),hmrUpdates:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),Ar=Symbol.for("@lensmcp/session/Session"),Ir=Symbol.for("@lensmcp/core/EventBus"),iD=Symbol.for("@lensmcp/core/GraphStore"),q=Symbol.for("@lensmcp/core/ResourceStore"),sD=Symbol.for("@lensmcp/storage/Storage"),aD="capture-request.json",oD="capture-runner.json",lD="capture-rules.json",Jl="__lensmcpTruncation",dD="__lensmcpTruncated";function Le(e,t=Number.POSITIVE_INFINITY,r=12){return Nt(e,t,r,32)}s(Le,"qe"),o(Le,"estimateJsonBytes");function Vl(e,t,r=12){return Nt(e,t,r,Number.POSITIVE_INFINITY)>t}s(Vl,"ws"),o(Vl,"exceedsJsonByteBudget");function Nt(e,t,r,i){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return i;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=Nt(e[l],t-a,r-1,i)+1,a>t)return a;return a}let u=2,n=e;for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;let l=Nt(n[a],t-u,r-1,i);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(Nt,"qr"),o(Nt,"walk");function Ci(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(Ci,"Bf"),o(Ci,"record");function Vv(e,t,r){return Ci(e,r),{[dD]:!0,originalBytes:Le(t,Number.POSITIVE_INFINITY,64)}}s(Vv,"D0"),o(Vv,"stub");function Wv(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s(Wv,"P0"),o(Wv,"isScalar");function pu(e,t,r,i){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let n=Math.max(0,u-64);return Ci(t,i),t.budget-=n,`${e.slice(0,n)}\u2026[lensmcp truncated: ${e.length-n} more chars]`}return e===null||typeof e!="object"?(t.budget-=Nt(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?Vv(t,e,i):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?Gv(e,t,r,i):Kv(e,t,r,i)}s(pu,"Vr"),o(pu,"clampValue");function Gv(e,t,r,i){let u=[],n=Math.min(e.length,t.maxArrayItems);for(let a=0;a<n&&!(t.budget<=0);a++)u.push(pu(e[a],t,r-1,`${i}[${a}]`));return u.length<e.length&&Ci(t,`${i}[] (+${e.length-u.length} items dropped)`),u}s(Gv,"M0"),o(Gv,"clampArray");function Kv(e,t,r,i){let u={},n,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],c=Nt(d,512,r-1,Number.POSITIVE_INFINITY);if(c<=512&&(!a||Wv(d))){u[l]=d,t.budget-=l.length+4+c;continue}(n??=[]).push({key:l,bytes:c})}if(!n)return u;n.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of n){let d=i?`${i}.${l}`:l;u[l]=pu(e[l],t,r-1,d)}return u}s(Kv,"C0"),o(Kv,"clampObject");function Hv(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!Vl(e,r,i)){let d=Le(e,r,i),c={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:pu(e,c,i,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=Le(e,Number.POSITIVE_INFINITY,64),n={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=pu(e,n,i,""),l=Le(a,Number.POSITIVE_INFINITY,i);if(n.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:n.paths};a[Jl]=d}return{value:a,truncated:n.truncatedAnything,originalBytes:u,keptBytes:l,paths:n.paths}}s(Hv,"Zf"),o(Hv,"boundedClone");function Ot(e,t){if(e.size<=t)return 0;let r=0,i=e.keys();for(;e.size>t;){let u=i.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(Ot,"Xe"),o(Ot,"capMap");var _r=256,mu="error-dismissed",ki="error-restored",Xv="lens",cD=new Set(["dashboard","cli","agent"]);function Wl(e){if(e.source!==Xv||!e.raw||typeof e.raw!="object")return;let t=e.raw,r=t.groupId;if(typeof r!="string"||r.length===0||r.length>2048)return;if(t.kind===ki)return{kind:ki,groupId:r};if(t.kind!==mu)return;let i=t.until;if(typeof i!="number"||!Number.isFinite(i))return;let u=Array.isArray(t.eventIds)?t.eventIds.filter(c=>typeof c=="string"&&c.length>0).slice(0,200):[],n=cD.has(t.by)?t.by:void 0,a=o((c,p)=>typeof c=="string"&&c.trim()?c.trim().slice(0,p):void 0,"text"),l=a(t.reason,500),d=a(t.title,300);return{kind:mu,groupId:r,until:Math.min(i,e.timestamp),eventIds:u,...n?{by:n}:{},...l?{reason:l}:{},...d?{title:d}:{}}}s(Wl,"xs"),o(Wl,"readErrorDismissal");function Gl(e){let{source:t,category:r,title:i,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(i)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(Gl,"Gf"),o(Gl,"areaOf");var Yv=240,pD=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),mD=new Set(["tenantId","caller","userId","accountId","email","subject"]),fD=8;function Qv(e){let t=Ai(e,0);return Hv(Su({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s(Qv,"Z0"),o(Qv,"aiProjection");function Ai(e,t){if(typeof e=="string")return e1(e);if(e===null||typeof e!="object")return e;if(t>=fD)return;if(Array.isArray(e))return e.slice(0,32).map(i=>Ai(i,t+1));let r={};for(let[i,u]of Object.entries(e))if(!mD.has(i)){if(pD.has(i)){typeof u=="string"?r[`${i}Chars`]=u.length:Array.isArray(u)?r[`${i}Count`]=u.length:u!=null&&(r[`${i}Present`]=!0);continue}r[i]=Ai(u,t+1)}return r}s(Ai,"Vf"),o(Ai,"projectAi");function e1(e){return e.length<=Yv?ut(e):`${ut(e.slice(0,Yv))}\u2026`}s(e1,"q0"),o(e1,"clipText");function t1(e,t={}){let r=e.raw??{},i=r.render??{},u=r.span??{},n=r.request??{},a=o(D=>typeof D=="number"?D:void 0,"num"),l=r.loop??{},d=r.effect??{},c=a(r.durationMs)??a(u.durationMs)??a(n.durationMs)??a(l.durationMs)??a(i.actualDurationMs)??a(d.durationMs),p=typeof r.kind=="string"?r.kind:void 0,h=p==="fetch-done"||p==="fetch-error",m=a(i.commitTime),f=p==="render"&&m!==void 0&&Math.abs(m-e.timestamp)<6e4,g=h?e.timestamp:f?m:a(r.startedAt)??a(u.startTime)??a(n.startedAt)??a(l.startedAt)??(c!==void 0?e.timestamp-c:e.timestamp),E;if(typeof r.query=="string"){let D=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",B=typeof r.result=="string"?` \u2192 ${r.result}`:"";E=r.query+D+B}else if(typeof r.command=="string"){let D=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";E=r.command+D}else if(p==="state-update"){let D=r.update??{},B="";try{B=JSON.stringify(D.preview)}catch{}E=`${D.storeId??""}.${D.path??""} = ${B}`}else p==="queue-completed"&&typeof r.returned=="string"?E=`returned ${r.returned}`:p==="queue-enqueued"&&(E=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let b;if(p==="gateway-request")b=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(p==="fetch-start"||p==="fetch-done"||p==="fetch-error")try{let D=new URL(String(r.href??r.url??""));b=`${D.hostname}${D.pathname}`}catch{}let $;if(p==="gateway-request"&&Array.isArray(r.steps))$=r.steps.map(D=>{let B=[String(D.step)];return D.project&&B.push(String(D.project)),D.prefix&&B.push(String(D.prefix)),D.mode&&B.push(String(D.mode)+(D.ok===!1?" \u2717":D.ok===!0?" \u2713":"")),D.caller&&B.push("by "+String(D.caller)),D.pod&&B.push(String(D.pod)),typeof D.atMs=="number"&&B.push(`@${D.atMs}ms`),B.join(" ")}),E=$.map(D=>D.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(p==="egress")E=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(p==="ai-call"){let D=r.usage??{},B=D.promptTokens!==void 0||D.completionTokens!==void 0?` \xB7 ${a(D.promptTokens)??"?"}\u2192${a(D.completionTokens)??"?"} tok`:"",x=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",N=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",O=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.provider??""}/${r.model??"?"}${B}${x}${N}${O}${r.stream===!0?" \xB7 stream":""}`}else if(p==="ai-round"){let D=r.model??{},B=r.usage??{},x=Array.isArray(r.toolCalls)?r.toolCalls:[],N=`${a(B.promptTokens)??"?"}\u2192${a(B.completionTokens)??"?"} tok`,O=x.length?` \xB7 ${x.length} tool call${x.length===1?"":"s"}`:"",K=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${D.provider??""}/${D.model??""} \xB7 ${N}${O}${K}`}else if(p==="ai-turn-start"){let D=Array.isArray(r.tools)?r.tools:[];E=`skill ${r.skill??""} \xB7 ${r.output??""}${D.length?" \xB7 tools: "+D.join(", "):""}`}else if(p==="ai-tool-call"){let D=r.call??{},B=r.result??{},x=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${D.name??"tool"} ${B.error!=null?"\u2717 "+String(B.error):"\u2713"}${x}`}else if(p==="ai-turn-end"){let D=r.usage??{},B=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",x=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(D.promptTokens)??"?"}+${a(D.completionTokens)??"?"} tok${B}${x}`}}let A;p==="db-query"&&typeof r.query=="string"?A=r.query:p==="redis-op"?A=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:p==="egress"?A=`${r.method??"GET"} ${r.host??""}`:p==="ai-call"?A=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:p==="queue-enqueued"?A=`enqueue ${r.queue??""}`:p==="span"&&typeof u.name=="string"?A=u.name:p==="memory-mutation"&&(A=e.title);let _=e.context??{},j=i.commitId??d.commitId??r.commitId,F=Array.isArray(i.why)?i.why.map(D=>typeof D?.type=="string"?D.type:void 0).filter(D=>!!D):[];return{id:e.id,t:e.timestamp,start:g,...A?{sig:A}:{},...b?{urlKey:b}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:p,area:Gl({source:e.source,category:e.category,title:e.title,kind:p}),...typeof u.role=="string"?{role:u.role}:{},...typeof _.requestId=="string"?{requestId:_.requestId}:{},...typeof _.parentRequestId=="string"?{parentRequestId:_.parentRequestId}:{},...typeof j=="string"?{commitId:j}:{},...typeof i.componentName=="string"?{component:i.componentName}:{},...typeof i.phase=="string"?{phase:i.phase}:{},...F.length?{why:F}:{},...p==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...p==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...p==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof _.projectName=="string"?{project:_.projectName}:typeof r.project=="string"?{project:r.project}:{},...c!==void 0?{durationMs:c}:{},...h&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:Qv(r)}:{},...E?{detail:E}:{},...$?{steps:$}:{}}}s(t1,"V0"),o(t1,"trimFlowEvent");var u1=1;function r1(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(r1,"G0"),o(r1,"kindRank");function fu(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:r1(e.kind)}s(fu,"Kn"),o(fu,"causalRank");function Ii(e,t={}){let r=e.slice().filter(y=>{let C=y.raw??{},k=typeof C.kind=="string"?C.kind:"";if(k==="subscription-added"||k==="subscription-removed"||k==="hook-run"||k==="store-created"||k==="singleton-instance")return!1;let I=C.span;return!(typeof I?.name=="string"&&I.name.startsWith("nest.request "))}).map(y=>t1(y,t)),i=new Set;for(let y=r.length-1;y>=0;y--)i.has(r[y].id)?r.splice(y,1):i.add(r[y].id);let u=new Map;for(let y of r)(y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&!u.has(y.requestId)&&u.set(y.requestId,y.start);let n=o(y=>y.source!=="react"&&y.source!=="valtio"&&y.requestId&&u.has(y.requestId)?u.get(y.requestId):y.start,"anchorOf");r.sort((y,C)=>n(y)-n(C)||y.start-C.start||fu(y)-fu(C)||(C.durationMs??0)-(y.durationMs??0)||y.t-C.t);let a=o(y=>(y.kind==="span"||y.kind==="server-request"||y.kind==="gateway-request"||y.kind==="queue-process")&&(y.durationMs??0)>0,"spanLike"),l=r;for(let y of l)y.group=y.source==="react"||y.source==="valtio"||y.source==="client-runtime"||y.source==="visual"?"browser":"server";let d=new Map;for(let y of l)if((y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&y.project){let C=d.get(y.requestId)??[];C.push({project:y.project,start:y.start,end:y.start+(y.durationMs??0)}),d.set(y.requestId,C)}let c=o((y,C)=>{let k=d.get(y);if(k?.length)return k.every(I=>I.project===k[0].project)?k[0].project:k.filter(I=>I.start<=C+1&&I.end>=C-1).sort((I,U)=>U.start-I.start)[0]?.project},"projectOf");for(let y of l)if(!y.project&&y.source==="nestjs"&&y.requestId){let C=c(y.requestId,y.start);C&&(y.project=C)}for(let y of l){let C,k=y.requestId;for(let I of l){if(I===y||!a(I)||I.group!==y.group||I.requestId!==k)continue;let U=I.project,W=y.project;if(I.kind!=="gateway-request"&&y.kind!=="gateway-request"&&U!==void 0&&W!==void 0&&U!==W)continue;let ue=I.durationMs??0,re=y.durationMs??0,L=Math.abs(I.start-y.start)<=u1,J=fu(I),X=fu(y),ie=I.start<=y.start;if(!(I.start+ue>y.start&&(ie||L&&J<X)&&(!L||(J!==X?J<X:ie&&ue>re))))continue;let ye=C?fu(C):-1,de=C?Math.abs(I.start-C.start)<=u1:!1;(!C||!de&&I.start>C.start||de&&J>ye||de&&J===ye&&(I.durationMs??0)<(C.durationMs??0))&&(C=I)}C&&(y.parent=C.id)}let p=new Map;for(let y of l){if(!y.requestId)continue;let C=p.get(y.requestId);C?C.push(y):p.set(y.requestId,[y])}let h=new Map(l.map(y=>[y.id,y])),m=o((y,C)=>{let k=(p.get(y)??[]).filter(I=>a(I)&&I.start<=C&&I.start+(I.durationMs??0)>=C);if(k.length!==0)return k.sort((I,U)=>U.start-I.start||(I.durationMs??0)-(U.durationMs??0)),k[0]},"callerNodeFor");for(let y of l){if(!y.parentRequestId||y.kind!=="server-request"&&y.kind!=="gateway-request")continue;let C=y.parent?h.get(y.parent):void 0;if(C&&C.requestId===y.requestId)continue;let k=m(y.parentRequestId,y.start);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}let f=l,g=new Map;for(let y of f)y.kind==="gateway-request"&&y.requestId&&!g.has(y.requestId)&&g.set(y.requestId,y);for(let y of f)if(y.group==="server"&&!y.parent&&y.requestId&&y.kind!=="gateway-request"){let C=g.get(y.requestId);C&&C!==y&&C.start<=y.start&&(y.parent=C.id)}let E=new Set,b=new Set,$=[];for(let y of f){if(y.kind!=="gateway-request")continue;if(!y.requestId){$.push(y);continue}let C=p.get(y.requestId)??[];if(C.filter(U=>U.kind==="gateway-request").sort((U,W)=>U.start-W.start)[0]!==y)continue;let k=C.find(U=>U.kind==="fetch-start"),I=C.find(U=>U.kind==="fetch-done"||U.kind==="fetch-error");if(!k&&!I){$.push(y);continue}k&&(y.fetchStartId=k.id,E.add(k.id)),I&&(y.fetchDoneId=I.id,b.add(I.id))}let A=new Map;for(let y of f){if(!y.urlKey)continue;let C=A.get(y.urlKey)??{gws:[],starts:[],dones:[]};y.kind==="gateway-request"?$.includes(y)&&C.gws.push(y):y.kind==="fetch-start"?E.has(y.id)||C.starts.push(y):(y.kind==="fetch-done"||y.kind==="fetch-error")&&(b.has(y.id)||C.dones.push(y)),A.set(y.urlKey,C)}for(let{gws:y,starts:C,dones:k}of A.values()){y.sort((U,W)=>U.start-W.start),C.sort((U,W)=>U.start-W.start);let I=new Set;y.forEach((U,W)=>{let ue=C[W];ue&&(U.fetchStartId=ue.id);let re=ue?ue.t:U.start,L,J=1/0;for(let X of k){if(I.has(X.id))continue;let ie=X.fetchStartedAt??X.start-(X.durationMs??0),ye=Math.abs(ie-re);ye<J&&(J=ye,L=X)}L&&(U.fetchDoneId=L.id,I.add(L.id))})}let _=new Map,j=new Map;for(let y of f)!y.queue||!y.jobId||(y.kind==="queue-enqueued"&&_.set(`${y.queue}#${y.jobId}`,y),y.kind==="queue-process"&&j.set(`${y.queue}#${y.jobId}`,y));for(let y of f){if(!y.queue||!y.jobId)continue;let C=`${y.queue}#${y.jobId}`;if(y.kind==="queue-process"&&!y.parent){let k=_.get(C);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}else if(y.kind==="queue-active"||y.kind==="queue-completed"||y.kind==="queue-failed"){let k=j.get(C);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}}let F=l;{let y=new Map;for(let k of F)k.kind==="fetch-start"&&y.set(k.id,k);let C=new Map;for(let k of F){if(k.kind!=="fetch-done"&&k.kind!=="fetch-error")continue;let I=[...y.values()].find(ue=>ue.requestId&&ue.requestId===k.requestId)?.id,U=I?y.get(I):void 0;if(!U)continue;let W=k.fetchStartedAt??U.start;U.title=k.title,U.severity=k.severity,U.durationMs=k.durationMs??Math.max(0,k.t-W),U.kind="fetch",k.detail&&!U.detail&&(U.detail=k.detail),C.set(k.id,U.id)}if(C.size>0){F=F.filter(k=>!C.has(k.id));for(let k of F)for(k.fetchDoneId&&C.has(k.fetchDoneId)&&(k.fetchDoneId=C.get(k.fetchDoneId));k.parent&&C.has(k.parent);)k.parent=C.get(k.parent)}}let D=o(y=>!!y.commitId&&(y.kind==="render"||y.kind==="effect-run"||y.kind==="render-commit-truncated"),"commitMember"),B=o(y=>[...new Set(y)],"uniq"),x=o(y=>B(y.map(C=>C.component).filter(C=>!!C)),"named"),N=o(y=>y.length<=2?y.join(" + "):`${y[0]} + ${y.length-1} more`,"nameList"),O=o(y=>{let C=new Map;for(let k of y)k.component&&C.set(k.component,(C.get(k.component)??0)+1);return[...C].map(([k,I])=>I>1?`${k} \xD7${I}`:k).join(", ")},"tally"),K=o(y=>{if(!y)return"effect";let C=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(y);return C?`${C[1]}:${C[2]}`:y},"shortHook"),Q=o(y=>`${K(y.hook)}${y.cleanup?" (cleanup)":""}`,"hookLabel"),Dt=o(y=>{let C=Math.min(...y.map(I=>I.start)),k=Math.max(...y.map(I=>I.start+(I.durationMs??0)));return{start:C,durationMs:k-C}},"extent"),We=o(y=>(delete y.component,delete y.why,delete y.phase,delete y.hook,delete y.cleanup,delete y.renderTotal,delete y.renderPublished,y),"asGroup");function Me(y){let C=y[0],k=y.filter(me=>me.kind==="render"),I=y.filter(me=>me.kind==="effect-run"),U=y.find(me=>me.kind==="render-commit-truncated"),W=[...k].sort((me,_u)=>(_u.durationMs??0)-(me.durationMs??0)),ue=W.filter(me=>(me.why??[]).some(_u=>_u!=="parent-render")),re=B(ue.flatMap(me=>(me.why??[]).filter(_u=>_u!=="parent-render"))),L=x(ue),J=k.filter(me=>me.phase==="mount"),X=k.filter(me=>me.phase!=="mount"&&!ue.includes(me)),ie=W[0]?.component??"view",ye=k.length>0&&J.length===k.length,de=re.length?re.join(" + "):void 0,Bt=ye?"mount":"update",xt=L.length?`view update \xB7 ${N(L)} \u2190 ${de}`:ye?`view mount \xB7 ${ie}`:`view update \xB7 ${ie}`,em=U?.renderTotal??k.length,AE=[J.length?`mounted ${O(J)}`:"",X.length?`re-rendered ${O(X)}`:"",!L.length&&!ye&&k.length?"trigger not recorded \u2014 every captured render came from its parent":"",U?`${em} renders, ${U.renderPublished??k.length} recorded (per-commit cap)`:`${k.length} render${k.length===1?"":"s"}`,I.length?`${I.length} effect${I.length===1?"":"s"}: ${I.map(Q).join(", ")}`:""].filter(Boolean).join(" \xB7 "),tm=x(k);return We({...C,...Dt(y),kind:"view-update",title:xt,detail:AE,commitId:C.commitId,viewPhase:Bt,...de?{cause:de}:{},causeComponents:L,components:tm,mounted:x(J),renderCount:em,recordedRenders:k.length,effects:I.length,effectHooks:I.map(Q),memberIds:y.map(me=>me.id),sig:`commit:${Bt}:${de??"-"}:${L.join(",")}:${tm.slice().sort().join(",")}`,severity:y.some(me=>me.severity==="error")?"error":C.severity})}s(Me,"st"),o(Me,"viewUpdateNode");function wt(y){let C=y[0],k=y.map(Q);return We({...C,...Dt(y),kind:"commit-effects",title:y.length===1?`effect \xB7 ${k[0]}`:`effects \xB7 ${k[0]} + ${y.length-1} more`,detail:k.join(", "),commitId:C.commitId,effects:y.length,effectHooks:k,memberIds:y.map(I=>I.id),sig:`effects:${k.slice().sort().join(",")}`})}s(wt,"ir"),o(wt,"effectsNode");let et=o(y=>B(y.map(C=>C==="state-update"?"state update":C==="fetch-start"?"request":C==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function Iu(y,C){let k=y[0],I=y[y.length-1],U=y.length,W=k.detail,ue=Math.min(...y.map(X=>X.start)),re=Math.max(...y.map(X=>X.start+(X.durationMs??0))),L=Math.round(y.reduce((X,ie)=>X+(ie.durationMs??0),0)/U*10)/10,J=Math.round((re-ue)*10)/10;k.count=U,k.avgMs=L,k.wallMs=J,k.durationMs=re-ue,k.items=y.slice(0,12).map(X=>({start:X.start-ue,...X.durationMs!=null?{durationMs:X.durationMs}:{}})),k.memberIds=y.flatMap(X=>X.memberIds??[X.id]),k.title=`\xD7${U} ${k.title}`,y.some(X=>X.severity==="error")&&(k.severity="error"),k.kind==="view-update"?k.detail=[`${U} commits, ${C.length?`one per ${et(C)}`:"back to back"}`,`avg ${L}ms \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 "):k.kind==="state-update"&&W&&I.detail?k.detail=`${U} updates in a row \xB7 wall ${J}ms \xB7 first ${W} \xB7 last ${I.detail}`:k.detail=[`${U} in a row \xB7 wall ${J}ms`,W??""].filter(Boolean).join(" \xB7 ")}s(Iu,"Oo"),o(Iu,"collapseRepeat");let $t=[],ze=new Map,Yp=new Set;for(let y=0;y<F.length;y++){if(Yp.has(y))continue;let C=F[y];if(!D(C)){$t.push(C);continue}let k=[y];for(let W=y+1;W<F.length;W++){let ue=F[W];if(ue.group==="browser"){if(!D(ue)||ue.commitId!==C.commitId)break;k.push(W)}}for(let W of k)Yp.add(W);let I=k.map(W=>F[W]),U=I.some(W=>W.kind!=="effect-run")?Me(I):wt(I);for(let W of I)W.id!==U.id&&ze.set(W.id,U.id);$t.push(U)}if(ze.size>0||$t.some(y=>y.kind==="view-update"||y.kind==="commit-effects")){F=$t;for(let y of F)for(;y.parent&&ze.has(y.parent);)y.parent=ze.get(y.parent)}{let y=new Map;for(let C of F)C.kind==="view-update"&&C.commitId&&!y.has(C.commitId)&&y.set(C.commitId,C);for(let C of F){if(C.kind!=="commit-effects"||C.parent||!C.commitId)continue;let k=y.get(C.commitId);k&&k.start<=C.start&&(C.parent=k.id)}}{let y=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),C=F.map((L,J)=>L.group==="browser"?J:-1).filter(L=>L>=0),k=o(L=>`${L.kind}|${L.sig??L.title}`,"keyOf"),I=C.map(L=>k(F[L])),U=o((L,J,X)=>{for(let ie=0;ie<X;ie++)if(I[L+ie]!==I[J+ie])return!1;return!0},"sameBlock"),W=o(L=>I[L].split("|")[0],"kindAt"),ue=o(L=>{let J=0,X=1;for(let ie=1;ie<=4&&L+ie<=I.length;ie++){let ye=1;for(;L+(ye+1)*ie<=I.length&&U(L,L+ye*ie,ie);)ye+=1;ye>=3&&ie*ye>J*X&&(J=ie,X=ye)}return{k:J,r:X}},"bestBlockAt"),re=new Map;for(let L=0;L<I.length;){let{k:J,r:X}=ue(L);if(J===0){L+=1;continue}let ie=[...Array(J).keys()].find(de=>y.has(W(L+de)));if(ie!==void 0&&ie>0){let de=ue(L+ie);if(de.k===J&&de.r>=3&&de.r>=X-1){L+=ie;continue}}let ye=I.slice(L,L+J).map(de=>de.split("|")[0]).filter(de=>y.has(de));for(let de=0;de<J;de++){let Bt=[];for(let xt=0;xt<X;xt++)Bt.push(F[C[L+de+xt*J]]);Iu(Bt,ye);for(let xt of Bt.slice(1))re.set(xt.id,Bt[0].id)}L+=J*X}if(re.size>0){F=F.filter(L=>!re.has(L.id));for(let L of F)for(;L.parent&&re.has(L.parent);)L.parent=re.get(L.parent)}}{let y=new Map(F.map(C=>[C.id,C]));for(let C of F){let k=new Set([C.id]),I=C;for(;I?.parent;){if(k.has(I.parent)){I.parent=void 0;break}k.add(I.parent),I=y.get(I.parent)}}}let Qp=o(y=>{let C=new Map;for(let I of F){if(!I.sig||a(I)!==y||I.kind==="server-request"||I.kind==="gateway-request"||I.group==="browser")continue;let U=`${I.parent??"root"}|${I.kind}|${I.sig}`,W=C.get(U);W?W.push(I):C.set(U,[I])}let k=new Map;for(let I of C.values()){if(I.length<3)continue;I.sort((J,X)=>J.start-X.start);let U=I[0],W=!1;for(let J=0;J+1<I.length;J++)if(I[J+1].start<I[J].start+(I[J].durationMs??0)){W=!0;break}let ue=U.start,re=Math.max(...I.map(J=>J.start+(J.durationMs??0))),L=I.reduce((J,X)=>J+(X.durationMs??0),0);U.count=I.length,U.parallel=W,U.avgMs=Math.round(L/I.length*10)/10,U.wallMs=re-ue,U.durationMs=re-ue,U.title=`\xD7${I.length} ${U.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,U.detail=`${U.sig} \xD7${I.length} ${W?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${U.avgMs}ms \xB7 wall ${U.wallMs}ms`,U.items=I.slice(0,12).map(J=>({start:J.start-ue,...J.durationMs!=null?{durationMs:J.durationMs}:{}})),U.memberIds=I.flatMap(J=>J.memberIds??[J.id]),I.some(J=>J.severity==="error")&&(U.severity="error");for(let J of I.slice(1))k.set(J.id,U.id)}if(k.size!==0){F=F.filter(I=>!k.has(I.id));for(let I of F)for(;I.parent&&k.has(I.parent);)I.parent=k.get(I.parent)}},"aggregatePass");Qp(!0),Qp(!1);for(let y of F){if(!a(y))continue;let C=y.durationMs??0;if(C<40)continue;let k=F.filter(re=>re.parent===y.id&&(re.durationMs??0)>0).map(re=>[re.start,re.start+(re.durationMs??0)]).sort((re,L)=>re[0]-L[0]),I=0,U=-1,W=-1;for(let[re,L]of k)re>W?(W>U&&(I+=W-U),U=re,W=L):L>W&&(W=L);W>U&&(I+=W-U);let ue=Math.max(0,C-I);(ue>=50||ue/C>=.7&&C>=40)&&(y.selfMs=ue,y.detail=`\u26A0 cpu-heavy: ${ue}ms self-time of ${C}ms${y.detail?" \xB7 "+y.detail:""}`)}return{events:F}}s(Ii,"Wn"),o(Ii,"buildFlowDetail");var n1={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},hD=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),gD=new Set(["react","valtio","client-runtime","chrome","visual"]),Sr=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),he=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Rt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function i1(e){let t=Sr(e.raw)?e.raw:{},r=Sr(t.request)?t.request:{},i=Sr(t.span)?t.span:{},u=e.context??{},n=Rt(e.timestamp)??0,a=he(t.kind)??"",l=Rt(r.startedAt)??Rt(i.startTime)??Rt(t.startedAt),d=Rt(r.endedAt)??Rt(i.endTime)??(l!==void 0&&Rt(t.durationMs)!==void 0?l+t.durationMs:void 0),c=Math.min(n,l??n),p=Math.max(n,d??n),h=Sr(t.render)?t.render:{},m=Sr(t.update)?t.update:{},f=a==="render"?he(h.componentName):a==="state-update"?he(m.path)?.split(".").slice(0,2).join("."):void 0,g=he(t.queue),E=he(t.jobId),b=String(e.source),$=he(t.project)??he(u.projectName);return{event:e,id:e.id,ts:n,from:c,to:p,kind:a,source:b,...he(u.requestId)?{requestId:he(u.requestId)}:{},...he(u.parentRequestId)?{parentRequestId:he(u.parentRequestId)}:{},...g&&E?{queueKey:`${g}#${E}`}:{},browser:gD.has(b)||b==="memory"&&$===void 0,bookkeeping:hD.has(a),...$?{project:$}:{},...f?{subject:f}:{},...a==="fetch-start"||a==="fetch-done"?{route:Kl(he(t.url)),method:he(t.method)}:a==="server-request"?{route:he(r.route),method:he(r.method)}:a==="gateway-request"?{route:Kl(he(t.url)),method:he(t.method)}:{}}}s(i1,"W0"),o(i1,"readItem");function Kl(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return i?i[1]??"/":r}s(Kl,"vx"),o(Kl,"pathOnly");var vD=o(e=>e.split(".")[0],"rootOf"),s1=o((e,t)=>e.reduce((r,i)=>Math.min(r,t(i)),1/0),"minOf"),a1=o((e,t)=>e.reduce((r,i)=>Math.max(r,t(i)),-1/0),"maxOf"),Hl=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),Xl=o(e=>e.requestId&&!e.requestId.startsWith("job:")?vD(e.requestId):void 0,"directFamilyOf");function o1(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(o1,"H0"),o(o1,"jobKeyOf");function l1(e,t){let r=e.filter(n=>!n.parentRequestId&&(n.kind==="server-request"||n.kind==="gateway-request"||n.kind==="fetch-start"||n.kind==="fetch-done")).sort((n,a)=>n.from-a.from||Hl(n,a));if(r.length<2)return[e];let i=[];for(let n of r){let a=i[i.length-1];a&&n.from<=a.to+t?a.to=Math.max(a.to,n.to):i.push({from:n.from,to:n.to})}if(i.length<2)return[e];let u=i.map(()=>[]);for(let n of e){let a=i.findIndex(l=>n.ts>=l.from-t&&n.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<i.length;l+=1)i[l].from<=n.ts&&(a=l)}u[a].push(n)}return u.filter(n=>n.length>0)}s(l1,"Y0"),o(l1,"occurrencesOf");var d1={debug:0,info:1,warning:2,error:3,fatal:4};function Yl(e,t){let r=[],i=[];for(let u of e){let n=i[i.length-1];n&&u.ts-n.ts>=t&&(r.push(i),i=[]),i.push(u)}return i.length&&r.push(i),r}s(Yl,"bx"),o(Yl,"runs");function c1(e,t={}){let r={...n1};for(let[b,$]of Object.entries(t))typeof $=="number"&&Number.isFinite($)&&(r[b]=$);let i=new Set,u=[];for(let b of e)i.has(b.id)||(i.add(b.id),u.push(i1(b)));u.sort(Hl);let n=he(u[0]?.event.context?.flowId)??he(u[0]?.event.raw?.flowId)??"",a=new Map;for(let b of u)b.kind==="queue-enqueued"&&b.queueKey&&b.requestId&&!b.requestId.startsWith("job:")&&!a.has(b.queueKey)&&a.set(b.queueKey,b);let l=new Map,d=new Map,c=[];for(let b of u){let $=o1(b),A=Xl(b);if($!==void 0){let _=d.get($);_?_.push(b):d.set($,[b])}else if(A!==void 0){let _=l.get(A);_?_.push(b):l.set(A,[b])}else c.push(b)}let p=[],h=new Map;for(let[b,$]of l)l1($,r.occurrenceSlackMs).forEach((A,_)=>{let j={id:`${n}~r:${b}${_===0?"":`@${_+1}`}`,kind:"request",items:A,requestId:b};p.push(j);for(let F of A)h.set(F,j)});for(let[b,$]of d){let A=a.get(b),_=A?h.get(A):void 0;_?_.items.push(...$):p.push({id:`${n}~r:job:${b}`,kind:"request",items:$,requestId:`job:${b}`})}let m=u.filter(b=>b.kind==="fetch-done"&&Xl(b)!==void 0),f=new Map;for(let b of p)b.requestId&&f.set(b.requestId,[...f.get(b.requestId)??[],b]);let g=o((b,$)=>{let A=f.get(b);if(A)return A.find(_=>_.items.some(j=>j.kind==="fetch-done"&&j.ts===$))??A[A.length-1]},"owningUnit"),E=c.filter(b=>b.browser);for(let b of Yl(E,r.burstGapMs)){let $=b[0].ts,A=m.filter(F=>F.ts<=$&&$-F.ts<=r.attachWindowMs),_=[...new Set(A.map(F=>Xl(F)))];if(_.length===1){let F=g(_[0],A[A.length-1].ts);if(F){F.items.push(...b);continue}}let j=b.some(F=>F.kind==="flow-origin");p.push({id:`${n}~${j?"o":"u"}:${b[0].id}`,kind:j?"origin":"ui",items:b,..._.length>1?{after:_.sort()}:{}})}for(let b of Yl(c.filter($=>!$.browser),r.phaseGapMs))p.push({id:`${n}~a:${b[0].id}`,kind:"ambient",items:b});return p1(n,u.length,p,r)}s(c1,"$x"),o(c1,"segmentFlow");function p1(e,t,r,i){for(let m of r)m.items.sort(Hl);let u=r.map(m=>({unit:m,from:s1(m.items,f=>f.from),to:a1(m.items,f=>f.to)}));u.sort((m,f)=>m.from-f.from||(m.unit.id<f.unit.id?-1:1));let n=new Map,a=0,l=-1/0;for(let m of u)(a===0||m.from-l>=i.phaseGapMs)&&(a+=1),l=Math.max(l,m.to),n.set(m.unit,a);let d=[];for(let m of u){let f=m1(m.unit.items,i.maxSegmentEvents);f.forEach((g,E)=>{d.push(f1(e,m.unit,g,n.get(m.unit),f.length>1?{index:E+1,total:f.length}:void 0))})}let c={};for(let m of d)for(let f of m.eventIds)c[f]=m.id;let p=[];for(let m of d){let f=p[m.phase-1];f||(f={index:m.phase,start:m.start,end:m.end,segmentIds:[]},p[m.phase-1]=f),f.start=Math.min(f.start,m.start),f.end=Math.max(f.end,m.end),f.segmentIds.push(m.id)}let h=d.reduce((m,f)=>m+f.counts.signal,0);return{flowId:e,segments:d,phases:p.filter(Boolean),assignment:c,stats:{events:t,signal:h,bookkeeping:t-h,segments:d.length,phases:p.filter(Boolean).length,largestSegment:d.reduce((m,f)=>Math.max(m,f.counts.total),0)}}}s(p1,"Q0"),o(p1,"assemble");function m1(e,t){if(e.filter(n=>!n.bookkeeping).length<=t)return[e];let r=[],i=[],u=0;for(let n of e)!n.bookkeeping&&u===t&&(r.push(i),i=[],u=0),i.push(n),n.bookkeeping||(u+=1);return i.length&&r.push(i),r}s(m1,"eR"),o(m1,"chunk");function f1(e,t,r,i,u){let n={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let f of r){f.bookkeeping?n.bookkeeping+=1:n.signal+=1;let g=String(f.event.severity);g==="error"||g==="fatal"?n.errors+=1:g==="warning"&&(n.warnings+=1),(d1[g]??1)>(d1[l]??0)&&(l=g),f.project&&a.add(f.project)}let d=t.kind==="ui"||t.kind==="origin"?g1(r):[],c=s1(r,f=>f.from),p=a1(r,f=>f.to),h=h1(t.items),m=t.id;return{id:u&&u.index>1?`${m}#${u.index}`:m,flowId:e,kind:t.kind,label:v1(t,r,h,u,d),phase:i,start:c,end:p,durationMs:p-c,eventIds:r.map(f=>f.id),counts:n,projects:[...a].sort(),...h.route?{route:h.route}:{},...h.method?{method:h.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(f1,"tR"),o(f1,"toSegment");function h1(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(h1,"rR"),o(h1,"routeOf");function g1(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,i)=>i[1]-r[1]||(r[0]<i[0]?-1:1)).slice(0,3).map(([r,i])=>i>1?`${r} \xD7${i}`:r)}s(g1,"nR"),o(g1,"hotOf");function v1(e,t,r,i,u){let n=i?` (part ${i.index}/${i.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${n}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${n}`:`request ${e.requestId??""}${n}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:`background${n}`}s(v1,"oR"),o(v1,"labelOf");var _i=["user-action","page-load","navigation","api","ai","background","test","system","other"],Si=new Map;function hu(e,t){let r=Si.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),Si.size>500&&Si.clear(),Si.set(e,r)),r.test(t)}s(hu,"Hn"),o(hu,"globMatch");var yD=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function y1(e,t){return t.some(r=>r.route?yD(e)?hu(e,`${r.method??"GET"} ${r.route}`):hu(e,r.route):!1)}s(y1,"sR"),o(y1,"routeMatches");function Ql(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!hu(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&hu(e.origin,t.origin.nodeId))||e.route!==void 0&&!y1(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(i=>hu(e.project,i))))}s(Ql,"_x"),o(Ql,"ruleMatches");var ed=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),lt=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Fi=o(e=>ed(e.raw)?lt(e.raw.kind)??"":"","kindOf");function E1(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>Fi(l)==="flow-origin"),i=r??t.find(l=>lt(l.context?.originType));if(!i)return{};let u=ed(i.raw)?i.raw:{},n=lt(i.context?.originType)??(r?lt(i.title):void 0),a=lt(u.originNodeId)??lt(i.context?.originNodeId);return{...n?{type:n}:{},...a?{nodeId:a}:{}}}s(E1,"aR"),o(E1,"originOf");var ED=/^(verify|e2e|test|smoke|load)[-_:]/i,bD=o((e,t)=>ED.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),b1={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},DD=new Set(["page-load","user-action","navigation"]),wD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ji(e){return e.replace(/[?#].*$/,"").split("/").map(t=>wD.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(ji,"Xf"),o(ji,"templatePath");function D1(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(D1,"pR"),o(D1,"componentOf");function w1(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(w1,"fR"),o(w1,"scriptFamily");function $1(e,t,r,i){let u=t.nodeId,n=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(n)return`${n[1]}:${ji(n[2])}`;if(t.type&&b1[t.type]==="user-action"&&u)return D1(u);if(e==="test")return w1(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${ji(a.route)}`;let l=i.find(d=>Fi(d)==="ai-call");return l&&ed(l.raw)?`ai \xB7 ${lt(l.raw.model)??lt(l.raw.provider)??"call"}`:u?ji(u):void 0}s($1,"mR"),o($1,"subjectOf");var $D=10,BD=1e3,xD=3,CD=500,kD=1e3;function B1(e,t){let r=new Set,i=t.segments.filter(n=>n.kind==="request");t.segments.some(n=>n.counts.errors>0)&&r.add("has-error"),i.some(n=>n.durationMs>=BD)&&r.add("slow"),i.length>=$D&&r.add("fan-out"),new Set(t.segments.flatMap(n=>n.projects)).size>=3&&r.add("multi-service"),e.some(n=>Fi(n)==="queue-enqueued")&&r.add("queue"),e.some(n=>Fi(n)==="ai-call"||n.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=CD&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=kD&&r.add("large");let u=new Map;for(let n of i)(!n.part||n.part.index===1)&&u.set(n.label,(u.get(n.label)??0)+1);return[...u.values()].some(n=>n>=xD)&&r.add("repeated-requests"),[...r].sort()}s(B1,"wR"),o(B1,"tagsOf");function x1(e,t,r=[]){let i=E1(e),u={flowId:t.flowId,origin:i,segments:t.segments},n=B1(e,t),a=o((p,h,m)=>{let f=$1(p,i,t,e);return{category:p,decidedBy:h,...m!==void 0?{ruleIndex:m}:{},tags:n,origin:i,...f?{subject:f}:{}}},"done"),l=r.findIndex(p=>p.category&&Ql(p,u));if(l!==-1)return a(r[l].category,"rule",l);if(bD(t.flowId,i.nodeId))return a("test","test");let d=i.type?b1[i.type]:void 0;if(d)return a(d,"origin");if(n.includes("ai"))return a("ai","shape");let c=t.segments.filter(p=>p.kind==="request");return c.length>0?a(c.every(p=>p.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(p=>p.kind==="ambient")?a("system","shape"):a("other","shape")}s(x1,"Sx"),o(x1,"classifyFlow");function C1(e,t,r=[]){let i=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&Ql(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return i?i.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&DD.has(t.category)?t.category:"ui"}s(C1,"Ix"),o(C1,"categoryOfSegment");function k1(e){return A1(e).map(t=>{let r=new Map;for(let u of t.items){let n=r.get(u.subject);n?n.push(u):r.set(u.subject,[u])}let i=[...r.entries()].sort((u,n)=>(u[0]===void 0?1:0)-(n[0]===void 0?1:0)||n[1].length-u[1].length||String(u[0]).localeCompare(String(n[0]))).map(([u,n])=>({subject:u,count:n.length,items:n}));return{...t,subjects:i}})}s(k1,"Rx"),o(k1,"groupFlows");function A1(e){let t=new Map;for(let i of e){let u=t.get(i.category);u?u.push(i):t.set(i.category,[i])}let r=o(i=>{let u=_i.indexOf(i);return u===-1?_i.length:u},"rank");return[...t.entries()].sort((i,u)=>r(i[0])-r(u[0])||(i[0]<u[0]?-1:i[0]>u[0]?1:0)).map(([i,u])=>({category:i,count:u.length,items:u}))}s(A1,"xR"),o(A1,"groupByCategory");var dt={categories:[],segments:{},problems:[]},td=200,I1=200,_1=64,AD=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,ID=["category","flowId","originType","origin","route","project"],_D={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},ud=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function S1(e,t){if(!ud(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))ID.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let i=e.category;if(typeof i!="string"||i.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=i.trim();if(u.length>_1||!AD.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${_1}) \u2014 rule dropped`]};let n={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>I1)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${I1} characters \u2014 rule dropped`]};n[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:n,problems:r}}s(S1,"SR"),o(S1,"parseRule");function F1(e){if(e==null)return dt;if(!ud(e))return{...dt,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],i=e.categories;i!==void 0&&(Array.isArray(i)?(i.length>td&&t.push(`flows.categories has ${i.length} rules; only the first ${td} are used`),i.slice(0,td).forEach((a,l)=>{let d=S1(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},n=e.segments;if(n!==void 0)if(!ud(n))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(n)){let d=_D[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${n1[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s(F1,"Ax"),o(F1,"parseFlowsConfig");function zi(e,t=dt){let r=c1(e,t.segments),i=x1(e,r,t.categories),u={};for(let n of r.segments)u[n.id]=C1(n,i,t.categories);return{segmentation:r,classification:i,segmentCategories:u}}s(zi,"Jr"),o(zi,"analyzeFlow");function rd(e,t={}){let r=t.threshold??5,i=[];for(let u of e){let n=u.raw??null;if(n?.kind!=="loop"||!n.loop)continue;let a=n.loop.dbCallsInsideLoop??0;a>r&&i.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${n.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:n.loop.iterations,durationMs:n.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return i}s(rd,"ks"),o(rd,"detectDbInLoop");function j1(e,t={}){let r=t.threshold??3,i=new Map;for(let n of e){let a=n.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=i.get(l);d||(d=[],i.set(l,d)),d.push(n)}let u=[];for(let[n,a]of i)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:n,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(j1,"zx"),o(j1,"detectNPlusOne");function z1(e,t={}){let r=t.threshold??5,i=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,c=u.get(d);c||(c=[],u.set(d,c)),c.push(a)}let n=[];for(let[a,l]of u){l.sort((c,p)=>c.timestamp-p.timestamp);let d=0;for(let c=0;c<l.length;c++){for(;l[c].timestamp-l[d].timestamp>i;)d++;let p=c-d+1;if(p>r){let h=l.slice(d,c+1),m=h[0].raw.render?.componentName??a;n.push({kind:"render-storm",severity:"warning",title:`${m} rendered ${p}\xD7 in ${i}ms`,evidence:h.map(f=>f.id),details:{componentInstanceId:a,count:p,windowMs:i,threshold:r},detectedAt:h[h.length-1].timestamp});break}}}return n}s(z1,"jx"),o(z1,"detectRenderStorm");function N1(e,t,r){let i=new Map,u=new Set;function n(l){let d=i.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let c=r(l),p=t.get(l)??[],h;for(let f of p){let g=n(f);(!h||g.totalDurationMs>h.totalDurationMs)&&(h=g)}u.delete(l);let m=h?{path:[l,...h.path],totalDurationMs:c+h.totalDurationMs}:{path:[l],totalDurationMs:c};return i.set(l,m),m}s(n,"i"),o(n,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=n(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(N1,"Ox"),o(N1,"findSlowPath");var O1={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function Je(e){let t={...O1};if(e)for(let r of Object.keys(O1)){let i=e[r];typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=i)}return t}s(Je,"Se"),o(Je,"resolveThresholds");function R1(e){let t=e.raw??null,r=t?.kind,i=e.context,u={id:e.id,parentTraceNodeId:i.causedByNodeId??i.originNodeId,lifecycle:"completed",context:i,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let n=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:n.render?.componentLogicalId,instanceId:n.render?.componentInstanceId,name:`render ${n.render?.componentName??"?"}`,durationMs:n.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let n=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:n.update?.storeId,name:`${n.update?.storeId??"?"}.${n.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let n=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${n.request?.method??"?"} ${n.request?.route??"?"}`,durationMs:n.request?.durationMs}}}if(r==="db-query"){let n=t,a=[n.op,n.table].filter(Boolean).join(" ")||(n.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:n.table?`db:${n.op??"query"}:${n.table}`:void 0,name:n.error?`${a} (failed)`:a,durationMs:n.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let n=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:n.origin?.nodeId,name:n.origin?.label??e.title}}}}s(R1,"IR"),o(R1,"eventToNode");function T1(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),i=[];for(let l of r){let d=R1(l);d&&(e.addNode(d.node),i.push(d))}let u=0,n=o((l,d,c,p)=>{let h={id:`${c}:${l}->${d}`,from:l,to:d,axis:c,type:p,timestamp:e.getNode(d)?.startTime??0};e.addEdge(h),u++},"addEdge");for(let l of i){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&n(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of i){let d=l.node.context.flowId;if(!d)continue;let c=a.get(d);c||(c=[],a.set(d,c)),c.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let c=l[d-1].node,p=l[d].node;p.context.causedByNodeId!==c.id&&n(c.id,p.id,"caused","flow-sequence")}return{nodeCount:i.length,edgeCount:u}}s(T1,"Dx"),o(T1,"buildGraphFromEvents");var M1=new WeakMap;function Ni(e){let t=M1.get(e);if(t!==void 0)return t;let r=Le(e);return M1.set(e,r),r}s(Ni,"Kr"),o(Ni,"estimateEventBytes");function P1(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!Vl(u,r,i)){let c=Le(u,r,i);return{event:e,truncated:!1,originalBytes:c,keptBytes:c}}let n=Le(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=pu(u,a,i,""),d=Le(l,Number.POSITIVE_INFINITY,i);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let c={truncated:!0,originalBytes:n,keptBytes:d,paths:a.paths};l[Jl]=c}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:n,keptBytes:d}}s(P1,"zR"),o(P1,"clampEventRaw");function U1(e={}){let t=0,r=0,i=0,u=e.rawByteLimit??32768;return{clamp(n){t+=1;let a=P1(n,e);return a.truncated&&(r+=1,i+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:i,rawByteLimit:u}},reset(){t=0,r=0,i=0}}}s(U1,"Mx"),o(U1,"createEventClamp");var SD={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},FD=64*1024*1024,jD=32*1024*1024,zD=class{static{s(this,"Ss")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??FD,this.artifactCaps={...SD,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??jD}appendEvent(e){let t=Ni(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let i=Le(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,i),this.artifactOrder.push(e.id),this.residentArtifactBytes+=i;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},ND=class{static{s(this,"Is")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??tt(),this.storage=e.storage??new zD,this.clamp=e.clamp===!1?void 0:U1(e.clamp??{}),this.redactor=e.redact===!1?void 0:pm(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new jE({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((i,u)=>u(i),r),"transform")}:{}}),this.graph=new mm,this.resources=new WE,this.reducers=new GE,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as Fr,ProviderScope as jr}from"@frontmcp/sdk";var nd;function Z1(e){nd=e}s(Z1,"Cx"),o(Z1,"setActiveSession");function gu(){if(!nd)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return nd}s(gu,"to"),o(gu,"requireSession");var OD=Fr({provide:Ar,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:jr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>gu(),"useFactory")}),RD=Fr({provide:Ir,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:jr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>gu().bus,"useFactory")}),TD=Fr({provide:iD,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:jr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>gu().graph,"useFactory")}),MD=Fr({provide:q,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:jr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>gu().resources,"useFactory")}),PD=Fr({provide:sD,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:jr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>gu().storage,"useFactory")}),UD=[OD,RD,TD,MD,PD];function q1(e={}){let t=new ND(e);return t.start(),Z1(t),{session:t,providers:UD}}s(q1,"Lx"),o(q1,"bootstrapLensmcp");var uA=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),rA=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
|
|
66
|
-
`);import{createSocket as
|
|
67
|
-
`))!==-1;){let c=a.slice(0,d);a=a.slice(d+1),c&&e.onMessage(c)}a.length>i&&(t(new Error(`uds: frame exceeded ${i} bytes without a newline \u2014 connection dropped`)),a="",n.destroy())}),n.on("error",l=>t(l)),n.on("close",()=>r.delete(n))});return u.on("error",n=>t(n)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(n=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{
|
|
68
|
-
`))!==-1;){let B=f.slice(0,D);if(f=f.slice(D+1),g){g=!1;continue}a(B)}}finally{qD(_)}}},"drain"),e.pollMs??50);$.unref?.(),l.push(()=>clearInterval($))}if(r){let[m,f]=r.split(":"),g=Number(f);if(m&&Number.isFinite(g)){c=!0;let E;try{E=ZD("udp4"),E.on("message",b=>a(b.toString("utf8"))),E.on("error",b=>u(b)),E.bind(g,m),E.unref()}catch(b){u(b),c=!1}if(E){let b=E;l.push(()=>new Promise($=>{try{b.close(()=>$())}catch{$()}}))}}}if(i)try{let m=G1({path:i,onMessage:o(f=>a(f),"onMessage"),onError:u});p=!0,l.push(()=>m.close())}catch(m){u(m)}let h=[];return d&&h.push("file"),c&&h.push("udp"),p&&h.push("uds"),{mode:h.join("+")||"none",count:o(()=>n,"count"),async stop(){for(let m of l)try{await m()}catch{}}}}s(K1,"nm"),o(K1,"startEventIngest");import{existsSync as GD,readFileSync as H1}from"node:fs";import{dirname as KD,join as HD}from"node:path";function X1(e=process.cwd()){let t=id("nx.json",e);if(!t)return Je();try{let r=JSON.parse(H1(t,"utf8"));return Je(r.lensmcp?.thresholds)}catch{return Je()}}s(X1,"om"),o(X1,"loadWorkspaceThresholds");function Y1(e=process.cwd()){let t=id("nx.json",e);if(!t)return dt;try{let r=JSON.parse(H1(t,"utf8"));return F1(r.lensmcp?.flows)}catch(r){return{...dt,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(Y1,"im"),o(Y1,"loadWorkspaceFlowsConfig");function id(e,t){let r=t;for(let i=0;i<8;i++){let u=HD(r,e);if(GD(u))return u;let n=KD(r);if(n===r)break;r=n}}s(id,"Gx"),o(id,"findUp");function S(e,t,r,i){var u=arguments.length,n=u<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(u<3?a(n):u>3?a(t,r,n):a(t,r))||n);return u>3&&n&&Object.defineProperty(t,r,n),n}s(S,"x"),o(S,"__decorate");import{App as XD}from"@frontmcp/sdk";import{Resource as YD,ResourceContext as QD}from"@frontmcp/sdk";var ew=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),Q1=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),ct=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),Oi=o(e=>typeof e=="string"?e:void 0,"asString");function ce(e,...t){for(let r of t){let i=Q1(e[r])??ct(e[r]);if(i!==void 0)return i}}s(ce,"pe"),o(ce,"countOf");var ge=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function Ri(e,t,r,i,u){if(t>0)return{state:"failed",count:t,detail:`${ge(t,`${i} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:ge(r,`${i} warning`)};let n=Oi(e.status);return n==="clean"||n==="passed"?{state:"passed",count:0,detail:`${i} clean`}:{state:"unknown",detail:`${i} has not reported a result yet (status=${n??"absent"})`}}s(Ri,"sm"),o(Ri,"fromStatusField");var Ti=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>Ri(e,ce(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>Ri(e,ce(e,"errorCount","errors")??0,ce(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>{let t=Array.isArray(e.failures)?e.failures.filter(u=>{let n=u?.domain;return n!=="typecheck"&&n!=="lint"}).length:ce(e,"failures","failureCount")??0,r=(Q1(e.failures)??t)-t,i=t===0&&r>0&&Oi(e.status)==="failing"?{...e,status:"clean"}:e;return Ri(i,t,ce(e,"warnings","warningCount")??0,"build","build://failures")},"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=ce(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${ge(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=ce(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${ge(t,"server-side error")} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((ce(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=ce(e,"crashLooping")??0,r=ce(e,"wedged")??0,i=ce(e,"buildFailed")??0,u=ce(e,"typeErrors")??0,n=u>0?`${ge(u,"service")} with type errors no typecheck producer reports`:void 0,a=ce(e,"down")??0,l=ct(e.restarts)??0,d=Array.isArray(e.services)?e.services.filter(f=>{let g=f??{};return g.buildFailed===!0&&g.state==="up"}).length:0,c=Math.max(0,i-d),p=d>0?`${ge(d,"service")} failing to build while still serving the last good bundle`:void 0,h=[p,n?`${n} (still serving)`:void 0].filter(Boolean);if(t>0||r>0||c>0){let f=[t>0?`${ge(t,"service")} crash-looping`:void 0,r>0?`${ge(r,"service")} wedged`:void 0,c>0?`${ge(c,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+i+u,detail:`${f.join(", ")} \u2014 read process://cluster (requests to them 502)${h.length?`; ${h.join("; ")}`:""}`}}if(p)return{state:"failed",count:i+u,detail:`${p} \u2014 read process://cluster for the error lines${n?`; ${n} (still serving)`:""}`};if(n)return{state:"failed",count:u,detail:`${n} \u2014 read process://cluster for the lines (the bundle built; the services still serve)`};if(a>0)return{state:"warning",count:a,detail:`${ge(a,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let m=ce(e,"up")??0;return{state:"passed",count:0,detail:`${ge(m,"service")} up${l>0?`, ${ge(l,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=ce(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${ge(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=ce(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${ge(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ce(e,"routes")??0,r=ct(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ge(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ce(e,"endpoints")??0,r=ct(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${ge(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=ce(e,"queries")??0,r=ct(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ge(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=ce(e,"failingHosts")??0,r=ce(e,"slowHosts")??0,i=ct(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ge(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${ge(r,"external host")} over${i?` ${i}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")}],mA=Ti.map(e=>e.resource);async function e3(e,t){let r={kind:t.kind,resource:t.resource},i;try{i=ew(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!i)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=Oi(i.producer),n=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||n?"connected":"none",l=Oi(i.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(i)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let c=i.stale===!0,p=c?`${d.detail} (as of ${ct(i.ageMs)!==void 0?t3(ct(i.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail;return{...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...c?{stale:!0}:{},detail:p,reads:t.reads(d.state)}}s(e3,"nE"),o(e3,"readSignal");function t3(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(t3,"oE"),o(t3,"describeAge");async function sd(e){return Promise.all(Ti.map(t=>e3(e,t)))}s(sd,"Ts"),o(sd,"readSignals");var zr=o(e=>Ti.find(t=>t.resource===e.resource)??Ti.find(t=>t.kind===e.kind),"specFor");function ad(e){return{source:zr(e).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(ad,"Jx"),o(ad,"toItem");function u3(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(n=>{let a=e.filter(l=>l.kind===n);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),i=o(n=>n==="failed"?"failed":n==="passed"||n==="warning"?"passed":"unknown","tri"),u=o(n=>n,"quad");return{typecheck:i(r("typecheck")),lint:i(r("lint")),build:i(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(u3,"iE"),o(u3,"toChecks");function r3(e){let t=e.filter(c=>c.state==="failed"),r=e.filter(c=>c.state==="warning"),i=e.filter(c=>c.state==="passed"),u=t.filter(c=>zr(c).blocking).map(ad),n=[...t.filter(c=>!zr(c).blocking),...r].map(ad),a=u.length>0?"failing":n.length>0?"warning":i.length>0?"clean":"starting",l=[...t.filter(c=>zr(c).blocking).flatMap(c=>c.reads),...t.filter(c=>!zr(c).blocking).flatMap(c=>c.reads),...r.flatMap(c=>c.reads)],d=[...new Set(l)];return d.length===0&&d.push("events://recent"),{status:a,blocking:u,warnings:n,suggestedReads:d,checks:u3(e)}}s(r3,"Wx"),o(r3,"deriveVerdict");function n3(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(n3,"sE"),o(n3,"readServerInfo");async function Mi(e){let t=await sd(e.resources),r=r3(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:n3(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(Mi,"Yt"),o(Mi,"aggregateStatus");var od="agent://current-status",ld=class extends QD{static{s(this,"cm")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(q);try{return await e.read(od)}catch{}let t=this.get(Ar);return Mi({resources:e,sessionId:t.id,revision:e.revision(od)??0})}};ld=S([YD({name:"agent-current-status",uri:od,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],ld);var tw=ld;import{Resource as uw,ResourceContext as rw}from"@frontmcp/sdk";var dd=class extends rw{static{s(this,"lm")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(q).read("process://cluster")}};dd=S([uw({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, which fail to build, restart counts, and the error lines services printed (ERROR in, EADDRINUSE, and error TS\u2026 for a project no typecheck producer reports for \u2014 otherwise type errors are in typecheck://errors). Read this when a request 502s or a dev server stopped responding."})],dd);var nw=dd;import{Tool as iw,ToolContext as sw}from"@frontmcp/sdk";var i3=["typecheck","lint","build","runtime","cluster"],aw=[...i3,"all"],ow={typecheck:[{signal:"typecheck://current",resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."}],lint:[{signal:"lint://current",resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."}],build:[{signal:"build://current",resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."}],runtime:[{signal:"runtime://browser/errors",resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},{signal:"runtime://errors",resource:"runtime://errors",keys:["entries"],hint:"Errors a dev service raised while handling a request (a 500 from a curl, an e2e runner or the page) \u2014 route, status, request id and stack. No browser is involved."}],cluster:[{signal:"process://cluster",resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / EADDRINUSE; error TS only for a project no typecheck producer reports for). A wedged or crash-looping service 502s every request routed to it."}]},lw=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function s3(e,t){let r;try{r=lw(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let i of t.keys){let u=r[i];if(Array.isArray(u))return u}return[]}s(s3,"fE"),o(s3,"readItems");async function a3(e){let t=e.kind==="all"?i3:[e.kind],r=await sd(e.resources),i=new Map(r.map(n=>[n.resource,n])),u=[];for(let n of t)for(let a of ow[n]){let l=i.get(a.signal),d=l?.producer??"none",c=l?.state??"unknown",p=d==="none"?[]:await s3(e.resources,a);u.push({kind:n,resource:a.resource,producer:d,state:c,count:p.length,returned:Math.min(p.length,e.limit),items:p.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((n,a)=>n+a.count,0),unmonitored:[...new Set(u.filter(n=>n.producer==="none").map(n=>n.kind))],groups:u}}s(a3,"mm"),o(a3,"collectErrors");var o3={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},Tt={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, server-side request errors (a dev service's 500: route, status, stack), and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:aw,defaultKind:"all",defaultLimit:25,maxLimit:200},Pi={name:"observe.dismiss_errors",description:"Hide runtime errors that are already UNDERSTOOD and are not a problem to fix \u2014 a 401 your own signed-out test browser caused, a failure from a fixture that exists to throw \u2014 so they stop counting in observe.current_status and the Stop hook. Give the entry `ids` from observe.errors (kind `runtime`), or `all: true`, and a `reason`: it is recorded with the dismissal and shown to the person in the dashboard. This HIDES, it does not fix: each error shows again the next time it happens. It cannot dismiss a failing typecheck, lint, build or a broken service \u2014 those are current verdicts and clear only when the code is fixed. Never dismiss an error you have not explained; undo with observe.restore_errors.",maxIds:250,minReasonChars:8},cd={name:"observe.restore_errors",description:"Undo a dismissal, so the errors it hid are listed and counted again. Give the dismissal `ids` from runtime://dismissed (or the id of an entry it hid), or `all: true` for every dismissal in effect \u2014 including ones a person made in the dashboard.",maxIds:250},l3="agent://current-status",pd=class extends sw{static{s(this,"gm")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(q);try{return await e.read(l3)}catch{}let t=this.get(Ar);return Mi({resources:e,sessionId:t.id,revision:e.revision(l3)??0})}};pd=S([iw({name:o3.name,description:o3.description,inputSchema:{}})],pd);var dw=pd;import{Tool as cw,ToolContext as pw,z as d3}from"@frontmcp/sdk";var md=class extends pw{static{s(this,"ym")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(q);return a3({resources:t,kind:e.kind,limit:e.limit})}};md=S([cw({name:Tt.name,description:Tt.description,inputSchema:{kind:d3.enum(Tt.kinds).default(Tt.defaultKind).describe("Which failures to return. 'runtime' = browser errors AND a service's own request errors (the 500 case); 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:d3.number().int().positive().max(Tt.maxLimit).default(Tt.defaultLimit).describe(`Max items per kind (default ${Tt.defaultLimit}). \`count\` still reports the true total.`)}})],md);var mw=md;import{Tool as fw,ToolContext as hw,z as Nr}from"@frontmcp/sdk";import{appendFileSync as gw,closeSync as vw,mkdirSync as yw,openSync as Ew,renameSync as bw,statSync as Dw,unlinkSync as ww}from"node:fs";import{dirname as $w,join as Bw}from"node:path";function c3(e,t){let{fs:r,maxBytes:i,maxFiles:u}=t,n=`${e}.rotate.lock`,a=t.staleLockMs??3e4,l;for(let d=0;d<2&&l===void 0;d++)try{l=r.openSync(n,"wx")}catch{try{if(Date.now()-r.statSync(n).mtimeMs<=a)return"busy";r.unlinkSync(n)}catch{}}if(l===void 0)return"busy";try{try{if(r.statSync(e).size<=i)return"not-needed"}catch{return"not-needed"}try{r.unlinkSync(`${e}.${u}`)}catch{}for(let d=u-1;d>=1;d--)try{r.renameSync(`${e}.${d}`,`${e}.${d+1}`)}catch{}try{r.renameSync(e,`${e}.1`)}catch{}return"rotated"}finally{try{r.closeSync(l)}catch{}try{r.unlinkSync(n)}catch{}}}s(c3,"Yx"),o(c3,"rotateBusFile");function p3(e=process.env,t=process.cwd()){return e.LENSMCP_EVENT_FILE??Bw(t,".lensmcp","events.jsonl")}s(p3,"e$"),o(p3,"lensEventFile");var m3=o((e,t,r,i,u)=>({id:tt(),sessionId:e,timestamp:t,source:Xv,category:"runtime",severity:"info",context:{sessionId:e},fingerprint:r,title:i,raw:u}),"lensEvent");function fd(e,t){return m3(t,e.until,`${mu}:${e.groupId}`,`error dismissed: ${e.title??e.groupId}`,{kind:mu,groupId:e.groupId,until:e.until,eventIds:e.eventIds,...e.by?{by:e.by}:{},...e.reason?{reason:e.reason}:{},...e.title?{title:e.title}:{}})}s(fd,"zs"),o(fd,"dismissalEvent");function hd(e,t,r){return m3(t,r,`${ki}:${e}`,"error restored",{kind:ki,groupId:e})}s(hd,"js"),o(hd,"restoralEvent");var f3=o((e,t,r)=>{let i=Number(process.env[e]);return Number.isFinite(i)&&r(i)?i:t},"envNumber");function Ui(e,t){t.length!==0&&(yw($w(e),{recursive:!0}),c3(e,{maxBytes:f3("LENSMCP_EVENT_MAX_BYTES",50*1024*1024,r=>r>0),maxFiles:f3("LENSMCP_EVENT_MAX_FILES",5,r=>r>=1&&r<=20),fs:{statSync:Dw,renameSync:bw,unlinkSync:ww,openSync:Ew,closeSync:vw}}),gw(e,t.map(r=>JSON.stringify(r)+`
|
|
69
|
-
`).join("")))}s(
|
|
70
|
-
`))!==-1;){let n=r.slice(0,u);r=r.slice(u+1),t(n)}}),e.on("end",()=>{r.length&&t(r)})}s(Dd,"u$"),o(Dd,"bufferLines");var B3=class{static{s(this,"Tm")}static{o(this,"AgentApp")}};B3=S([XD({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[tw,nw],tools:[dw,mw,Aw,Sw],jobs:[qw]})],B3);var Lw={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},Jw=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),x3=new Set(["build","types","process"]),C3=o(e=>x3.has(e)?e:"unknown","faultOf"),Vw=class{static{s(this,"io")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[],this.typechecked=new Set}ingest(e){if(e.category==="typecheck")return this.noteTypecheck(e);if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let i=typeof t.project=="string"?t.project:void 0;if(!i)return!1;if(r==="service-error"){let a=C3(t.fault),l=this.touch(i,e.timestamp);if(l.faults.add(a),l.lastTitle=e.title,a==="types"&&this.typechecked.has(i))return!0;let d=typeof t.line=="string"?t.line:e.message??e.title;return this.errors.push({project:i,timestamp:e.timestamp,line:d,fingerprint:e.fingerprint,fault:a}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50),!0}if(r==="service-fault-closed"){let a=this.services.get(i),l=Array.isArray(t.closed)?t.closed.filter(d=>x3.has(d)).map(C3):[];return!a||l.length===0?!1:(a.lastSeenAt=e.timestamp,a.lastTitle=e.title,this.resolve(a,l),!0)}if(r==="service-recovered"){let a=this.services.get(i);return a?(a.lastSeenAt=e.timestamp,this.resolve(a),a.lastTitle=e.title,!0):!1}if(r==="lens-handoff-start"){let a=this.touch(i,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(i,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=Lw[r];if(!u)return!1;let n=this.touch(i,e.timestamp);return n.state=u,n.lastTitle=e.title,Jw.has(r)&&(n.restarts+=1),u==="up"&&this.resolve(n),!0}resolve(e,t){if(t)for(let i of t)e.faults.delete(i);else e.faults.clear();let r=o(i=>i.project===e.project&&(!t||t.includes(i.fault)),"gone");this.errors.splice(0,this.errors.length,...this.errors.filter(i=>!r(i)))}noteTypecheck(e){let t=e.raw??{};if(t.kind!=="typecheck-run"||t.phase!=="end"||typeof t.project!="string")return!1;let r=t.project,i=t.status==="clean"||t.status==="failing";return i===this.typechecked.has(r)?!1:(i?(this.typechecked.size>=100&&this.typechecked.delete(this.typechecked.values().next().value),this.typechecked.add(r),this.errors.splice(0,this.errors.length,...this.errors.filter(u=>!(u.project===r&&u.fault==="types")))):this.typechecked.delete(r),this.services.get(r)?.faults.has("types")??!1)}snapshot(){let e=[...this.services.values()].sort((r,i)=>r.project.localeCompare(i.project)).map(({faults:r,...i})=>({...i,buildFailed:r.has("build")||r.has("process")||r.has("unknown"),typeErrors:r.has("types")&&!this.typechecked.has(i.project)})),t=o(r=>e.filter(i=>i.state===r).map(i=>i.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),typeErrors:e.filter(r=>r.typeErrors).map(r=>r.project),restarts:e.reduce((r,i)=>r+i.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let i;for(let u of this.services.values())(!i||u.lastSeenAt<i.lastSeenAt)&&(i=u);i&&this.services.delete(i.project)}r={project:e,state:"starting",restarts:0,faults:new Set,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},qi="agent://current-status",Li="process://cluster",Ww=250,Gw=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function k3(e){let t=new Vw,r=e.sessionId??"pending",i,u=o(()=>{i||(i=setTimeout(()=>{i=void 0,e.resources.markDirty(qi)},Ww),i.unref?.())},"scheduleStatusRefresh"),n=o(l=>{let d=t.ingest(l);d&&e.resources.markDirty(Li),(d||Gw.has(l.category))&&u()},"handler"),a=e.bus.subscribe(n);return e.resources.register(Li,()=>({schemaVersion:1,revision:e.resources.revision(Li)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(qi,()=>Mi({resources:e.resources,sessionId:r,revision:e.resources.revision(qi)??0})),{unsubscribe:o(()=>{a(),i&&(clearTimeout(i),i=void 0)},"unsubscribe"),uris:[qi,Li]}}s(k3,"Am"),o(k3,"installAgentReducer");import{App as Kw}from"@frontmcp/sdk";import{Resource as Hw,ResourceContext as Xw}from"@frontmcp/sdk";var wd=class extends Xw{static{s(this,"zm")}static{o(this,"FlowRecentResource")}async execute(){return this.get(q).read("flow://recent")}};wd=S([Hw({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],wd);var Yw=wd;import{Resource as Qw,ResourceContext as e$}from"@frontmcp/sdk";var $d=class extends e${static{s(this,"Om")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(q).read("flow://current")}};$d=S([Qw({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],$d);var t$=$d;import{Resource as u$,ResourceContext as r$}from"@frontmcp/sdk";var Bd=class extends r${static{s(this,"Dm")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(q).read("flow://origins/recent")}};Bd=S([u$({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],Bd);var n$=Bd;import{Tool as i$,ToolContext as s$,z as Ji}from"@frontmcp/sdk";var A3;function xd(e){A3=e}s(xd,"Ps"),o(xd,"setActiveFlowLookups");function Ve(){return A3}s(Ve,"xe"),o(Ve,"activeFlowLookups");var a$=120;function Cd(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{}}}s(Cd,"Mm"),o(Cd,"segmentView");function kd(e,t={}){let{segmentation:r,classification:i,segmentCategories:u}=e,n=Math.max(1,t.maxSegments??a$),a=r.segments.reduce((c,p)=>Math.min(c,p.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>n){let c=o(h=>h.counts.errors*1e6+h.counts.signal,"rank"),p=new Set([...d].sort((h,m)=>c(m)-c(h)||(h.id<m.id?-1:1)).slice(0,n).map(h=>h.id));d=d.filter(h=>p.has(h.id))}return{flowId:r.flowId,category:i.category,decidedBy:i.decidedBy,...i.subject?{subject:i.subject}:{},tags:i.tags,origin:i.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(c=>({index:c.index,startOffsetMs:Math.max(0,c.start-l),endOffsetMs:Math.max(0,c.end-l),segmentIds:c.segmentIds})),segments:d.map(c=>Cd(c,u[c.id]??"other",l)),segmentsTruncated:d.length<r.segments.length}}s(kd,"Cm"),o(kd,"overviewOf");function I3(e,t,r){let i=t.segmentation.segments.find(n=>n.id===r);if(!i)return;let u=new Set(i.eventIds);return e.filter(n=>u.has(n.id))}s(I3,"m$"),o(I3,"eventsOfSegment");function _3(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(_3,"h$"),o(_3,"filterClassified");function S3(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return k1(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(i=>({...i.subject!==void 0?{subject:i.subject}:{},count:i.count,flowIds:i.items.map(u=>u.id)}))}))}s(S3,"g$"),o(S3,"groupClassified");function F3(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(F3,"v$"),o(F3,"categoryCounts");function j3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),i=e.getFlowEvents(t.flowId);if(!r||!i)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?I3(i,u,t.segmentId):void 0,l=u?.segmentation.segments.find(p=>p.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(p=>p.id)??[]};let d=u.segmentation.segments.reduce((p,h)=>Math.min(p,h.start),1/0),{events:c}=Ii(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:Cd(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:c.length>t.limit,events:c.slice(0,t.limit)}}let{events:n}=Ii(i,{includeRaw:t.includeRaw});if(t.expand){let a=n.find(c=>c.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=i.filter(c=>l.has(c.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(c=>({id:c.id,timestamp:c.timestamp,source:c.source,category:c.category,severity:c.severity,title:c.title,message:c.message,...t.includeRaw?{raw:c.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:kd(u)}:{},truncated:n.length>t.limit,events:n.slice(0,t.limit)}}s(j3,"y$"),o(j3,"getFlowDetail");async function z3(e,t,r){if(e){let u=e.classifiedRecent(),n=_3(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=n.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:n.length,categories:F3(u),...t.groupBy==="category"?{groups:S3(a)}:{}}}let i=await r();return{flows:i.flows.slice(0,t.limit),totalKnown:i.flows.length}}s(z3,"b$"),o(z3,"listRecentFlows");function N3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...kd(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(N3,"w$"),o(N3,"getFlowSegments");var Ad=class extends s${static{s(this,"Um")}static{o(this,"FlowListRecentTool")}async execute(e){return z3(Ve(),e,async()=>await this.get(q).read("flow://recent"))}};Ad=S([i$({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:Ji.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:Ji.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:Ji.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:Ji.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],Ad);var o$=Ad;import{Tool as l$,ToolContext as d$,z as Or}from"@frontmcp/sdk";var Id=class extends d${static{s(this,"Fm")}static{o(this,"FlowGetTool")}async execute(e){return j3(Ve(),e)}};Id=S([l$({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` for the full `event.raw` payloads. The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree.',inputSchema:{flowId:Or.string().describe("Flow id from flow://recent."),includeRaw:Or.boolean().default(!1),limit:Or.number().int().positive().max(500).default(200),expand:Or.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:Or.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],Id);var c$=Id;import{Tool as p$,ToolContext as m$,z as f$}from"@frontmcp/sdk";var _d=class extends m${static{s(this,"Zm")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=Ve();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};_d=S([p$({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:f$.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],_d);var h$=_d;import{Tool as g$,ToolContext as v$,z as y$}from"@frontmcp/sdk";import*as E$ from"node:fs";import{dirname as b$,join as O3}from"node:path";var D$="ai",w$=/^ai_[0-9a-z]{8,40}$/,Vi=o(e=>typeof e=="string"&&w$.test(e),"isAiCallId");function R3(e){return O3(b$(e),D$)}s(R3,"hT"),o(R3,"aiContentDir");function T3(e,t){if(!Vi(t))throw new Error("invalid ai call id");return O3(R3(e),`${t}.json`)}s(T3,"gT"),o(T3,"aiContentFile");function Sd(e,t){if(Vi(t))try{let r=JSON.parse(E$.readFileSync(T3(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(Sd,"Cs"),o(Sd,"readAiContent");var Fd=class extends v${static{s(this,"Vm")}static{o(this,"AiGetCallTool")}async execute(e){if(!Vi(e.callId))return{found:!1,reason:"invalid call id"};let t=Sd(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};Fd=S([g$({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:y$.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],Fd);var $$=Fd;import{Tool as B$,ToolContext as x$,z as M3}from"@frontmcp/sdk";var jd=class extends x${static{s(this,"Gm")}static{o(this,"FlowSegmentsTool")}async execute(e){return N3(Ve(),e)}};jd=S([B$({name:"flow.segments",description:"Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow's category, subject and tags. Open one unit with flow.get { flowId, segmentId }.",inputSchema:{flowId:M3.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:M3.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],jd);var C$=jd,P3=class{static{s(this,"Jm")}static{o(this,"FlowApp")}};P3=S([Kw({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[Yw,t$,n$],tools:[o$,c$,C$,h$,$$]})],P3);var Wi="flow://recent",Gi="flow://current",Ki="flow://origins/recent",Rr=50,U3=50,zd=2e3,k$=4*1024*1024,Nd=32*1024*1024,A$=Rr+10;function Z3(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0},r=o((p,h,m,f=!0)=>{let g=Math.min(h,p.events.length);if(g<=0)return;if(f&&g>0&&(p.events[0]?.raw??{}).kind==="flow-origin"&&p.events.length>1){let b=p.eventBytes[1]??0;if(p.events.splice(1,1),p.eventBytes.splice(1,1),p.retainedBytes=Math.max(0,p.retainedBytes-b),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-b),t.evictedEvents+=1,m&&(t.evictedForBytes+=1),g-=1,g<=0)return}let E=0;for(let b=0;b<g;b+=1)E+=p.eventBytes[b]??0;p.events.splice(0,g),p.eventBytes.splice(0,g),p.retainedBytes=Math.max(0,p.retainedBytes-E),t.retainedEvents=Math.max(0,t.retainedEvents-g),t.retainedBytes=Math.max(0,t.retainedBytes-E),t.evictedEvents+=g,m&&(t.evictedForBytes+=g)},"evictPrefix"),i=o(p=>{let h=0,m=p.retainedBytes;for(;m>k$&&h<p.eventBytes.length;)m-=p.eventBytes[h]??0,h+=1;r(p,h,!0)},"enforceEntryByteCap"),u=o(()=>{for(let p=t.recentOrder.length-1;t.retainedBytes>Nd&&p>=0;p-=1){let h=t.flows.get(t.recentOrder[p]);if(!h)continue;let m=0,f=t.retainedBytes;for(;f>Nd&&m<h.eventBytes.length;)f-=h.eventBytes[m]??0,m+=1;r(h,m,!0)}},"enforceGlobalByteCap"),n=o(p=>{let h=p.context.flowId;if(!h)return;let m=(p.raw??{}).kind;if(m==="subscription-added"||m==="subscription-removed"||m==="hook-run"||m==="store-created"||m==="singleton-instance"||m==="visual-frame")return;let f=m==="flow-origin",g=t.flows.get(h);if(!g){g={summary:{flowId:h,originType:p.context.originType,originNodeId:p.context.originNodeId,startedAt:p.timestamp,lastSeenAt:p.timestamp,eventCount:0,headline:p.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(h,g);let $={flowId:h,originType:p.context.originType,originNodeId:p.context.originNodeId,at:p.timestamp,label:p.title,eventId:p.id};t.origins.push($),t.origins.length>U3&&t.origins.splice(0,t.origins.length-U3),e.resources.markDirty(Ki)}f&&!g.hasOrigin&&(g.hasOrigin=!0,g.summary.headline=p.title,p.context.originType&&(g.summary.originType=p.context.originType),p.context.originNodeId&&(g.summary.originNodeId=p.context.originNodeId)),p.timestamp<g.summary.startedAt&&(g.summary.startedAt=p.timestamp);let E=Ni(p);g.events.push(p),g.eventBytes.push(E),g.retainedBytes+=E,t.retainedEvents+=1,t.retainedBytes+=E,g.events.length>zd&&r(g,g.events.length-zd,!1),i(g),g.summary.eventCount+=1,g.summary.lastSeenAt=p.timestamp;let b=t.recentOrder.indexOf(h);if(b>=0&&t.recentOrder.splice(b,1),t.recentOrder.unshift(h),t.recentOrder.length>Rr){let $=t.recentOrder.splice(Rr);for(let A of $){let _=t.flows.get(A);_&&r(_,_.events.length,!1,!1),t.flows.delete(A)}}u(),t.currentFlowId!==h&&(t.currentFlowId=h,e.resources.markDirty(Gi)),e.resources.markDirty(Wi)},"handler"),a=e.bus.subscribe(n);e.resources.register(Wi,()=>({schemaVersion:1,revision:e.resources.revision(Wi)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(p=>t.flows.get(p)?.summary).filter(p=>!!p)})),e.resources.register(Gi,()=>{let p=t.currentFlowId,h=p?t.flows.get(p):void 0;return{schemaVersion:1,revision:e.resources.revision(Gi)??0,updatedAt:new Date().toISOString(),flow:h?.summary??null}}),e.resources.register(Ki,()=>({schemaVersion:1,revision:e.resources.revision(Ki)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let l=e.flows??dt,d=new Map,c={getFlowEvents(p){return t.flows.get(p)?.events.slice().sort((h,m)=>h.timestamp-m.timestamp)},getFlowSummary(p){return t.flows.get(p)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(p){return[...t.flows.values()].filter(h=>h.summary.originNodeId===p).map(h=>h.summary)},flowsConfig:l,analyzeFlow(p){let h=t.flows.get(p);if(!h)return;let m=`${h.summary.eventCount}:${h.events.length}:${h.summary.lastSeenAt}`,f=d.get(p);if(f&&f.key===m)return d.delete(p),d.set(p,f),f.analysis;let g=zi(c.getFlowEvents(p)??[],l);for(d.delete(p),d.set(p,{key:m,analysis:g});d.size>A$;)d.delete(d.keys().next().value);return g},classifiedRecent(p=Rr){let h=[];for(let m of t.recentOrder){if(h.length>=p)break;let f=t.flows.get(m)?.summary,g=c.analyzeFlow(m);!f||!g||h.push({summary:f,category:g.classification.category,decidedBy:g.classification.decidedBy,...g.classification.subject?{subject:g.classification.subject}:{},tags:g.classification.tags,segmentCount:g.segmentation.stats.segments,phaseCount:g.segmentation.stats.phases,signalCount:g.segmentation.stats.signal})}return h}};return xd(c),{unsubscribe:o(()=>{xd(void 0),a()},"unsubscribe"),uris:[Wi,Gi,Ki],lookups:c,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:Rr*zd,byteCap:Nd}),"retentionStats")}}s(Z3,"Xm"),o(Z3,"installFlowReducer");import{App as I$}from"@frontmcp/sdk";import{Resource as _$,ResourceContext as S$}from"@frontmcp/sdk";var Od=class extends S${static{s(this,"Hm")}static{o(this,"StoryRecentResource")}async execute(){return this.get(q).read("story://recent")}};Od=S([_$({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],Od);var F$=Od;import{Resource as j$,ResourceContext as z$}from"@frontmcp/sdk";var Rd=class extends z${static{s(this,"Qm")}static{o(this,"StoryLastResource")}async execute(){return this.get(q).read("story://last")}};Rd=S([j$({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],Rd);var N$=Rd;import{Tool as O$,ToolContext as R$,z as T$}from"@frontmcp/sdk";var Hi="story://recent",Xi="story://last",Oe={byFlowId:new Map,order:[]},q3=!1;function L3(e){return q3||(e.resources.register(Hi,()=>({schemaVersion:1,revision:e.resources.revision(Hi)??0,updatedAt:new Date().toISOString(),stories:Oe.order.map(t=>Oe.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(Xi,()=>{let t=Oe.order[0],r=t?Oe.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(Xi)??0,updatedAt:new Date().toISOString(),story:r??null}}),q3=!0),J3(e.resources),{uris:[Hi,Xi]}}s(L3,"rh"),o(L3,"installStoryReducer");var Td;function J3(e){Td=o(t=>{e.markDirty(t)},"markDirty")}s(J3,"TT"),o(J3,"setMarkDirty");function Md(e){Oe.byFlowId.set(e.flowId,e);let t=Oe.order.indexOf(e.flowId);if(t>=0&&Oe.order.splice(t,1),Oe.order.unshift(e.flowId),Oe.order.length>50){let r=Oe.order.splice(50);for(let i of r)Oe.byFlowId.delete(i)}Td?.(Hi),Td?.(Xi)}s(Md,"co"),o(Md,"recordCompiledStory");function V3(e){return Oe.byFlowId.get(e)}s(V3,"nh"),o(V3,"getCompiledStory");var Pd=class extends R${static{s(this,"oh")}static{o(this,"StoryCompileTool")}async execute(e){let t=Ve();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let i=qs(r,{flowId:e.flowId});return i?(Md(i),{compiled:!0,story:i}):{compiled:!1,flowId:e.flowId}}};Pd=S([O$({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:T$.string().describe("Flow id (from flow://recent).")}})],Pd);var M$=Pd;import{Tool as P$,ToolContext as U$,z as Z$}from"@frontmcp/sdk";var Ud=class extends U${static{s(this,"sh")}static{o(this,"StoryGetTool")}async execute(e){let t=V3(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};Ud=S([P$({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:Z$.string().describe("Flow id.")}})],Ud);var q$=Ud,W3=class{static{s(this,"ch")}static{o(this,"StoryApp")}};W3=S([I$({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[F$,N$],tools:[M$,q$]})],W3);import{App as L$}from"@frontmcp/sdk";import{Resource as J$,ResourceContext as V$}from"@frontmcp/sdk";var Zd=class extends V${static{s(this,"uh")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(q).read("build://current")}};Zd=S([J$({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],Zd);var W$=Zd;import{Resource as G$,ResourceContext as K$}from"@frontmcp/sdk";var qd=class extends K${static{s(this,"dh")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(q).read("build://failures")}};qd=S([G$({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],qd);var H$=qd;import{Resource as X$,ResourceContext as Y$}from"@frontmcp/sdk";var Ld=class extends Y${static{s(this,"fh")}static{o(this,"BuildRecentResource")}async execute(){return this.get(q).read("build://events/recent")}};Ld=S([X$({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],Ld);var Q$=Ld,G3=class{static{s(this,"hh")}static{o(this,"BuildApp")}};G3=S([L$({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[W$,H$,Q$]})],G3);var Yi="build://current",Qi="build://failures",es="build://events/recent",eB=new Set(["vite","rollup","typescript","eslint"]),K3=new Set(["build","typecheck","lint"]),H3=50,tB="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function X3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(X3,"GT"),o(X3,"readRaw");function Y3(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(Y3,"JT"),o(Y3,"defaultTool");function Q3(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((m,f)=>{let g=t.producers.get(m);t.producers.set(m,{id:m,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:g?.firstReportedAt??f.at,lastReportedAt:Math.max(g?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??g?.errorCount??0,...f.warningCount!==void 0?{warningCount:f.warningCount}:g?.warningCount!==void 0?{warningCount:g.warningCount}:{},...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...f.error?{error:f.error}:{}}),Ot(t.producers,_r)},"touchProducer"),i=o(m=>{for(let[f,g]of t.failures)m(g)&&t.failures.delete(f);for(let[f,g]of t.warnings)m(g)&&t.warnings.delete(f)},"drop"),u=o((m,f)=>{i(g=>g.domain===m&&(f===void 0||g.project===f))},"clearScope"),n=o((m,f)=>{if(f.length===0)return;let g=new Set(f);i(E=>E.domain===m&&E.file!==void 0&&g.has(E.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let m=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=m||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty(Yi),e.resources.markDirty(Qi),e.resources.markDirty(es)},"markDirty"),d=o(m=>{if([...t.failures.values()].some(f=>f.project===m)||[...t.warnings.values()].some(f=>f.project===m)||[...t.producers.values()].some(f=>f.project===m)){for(let f of K3)u(f,m);for(let[f,g]of t.producers)g.project===m&&t.producers.delete(f);t.sawVerdict=[...t.producers.values()].some(f=>f.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),c=o(m=>{if(m.source==="gateway"&&m.category==="cluster"){let j=m.raw??null,F=j?.kind;(F==="service-starting"||F==="service-respawn")&&j?.project&&d(j.project);return}if(!eB.has(m.source)||!K3.has(m.category))return;let f=m.category,g=X3(m),E=g.project,b=g.tool??Y3(f,m.source),$=`${b}:${E??"*"}`,A=typeof g.kind=="string"&&g.kind.endsWith("-run"),_={id:m.id,timestamp:m.timestamp,severity:m.severity,title:m.title,...m.message!==void 0?{message:m.message}:{},...m.location?.file?{file:m.location.file}:g.file?{file:g.file}:{},domain:f,...E?{project:E}:{},fingerprint:m.fingerprint};if(m.severity==="info"&&(A&&g.phase==="start"||m.title.startsWith("tsc clear")||m.title.startsWith("ESLint clear"))){u(f,E),t.lastRunAt=m.timestamp,Tr(t,_),r($,{tool:b,...E?{project:E}:{},at:m.timestamp,runStatus:"running"}),A||(t.sawVerdict=!0),a(),l();return}if(A&&g.phase==="end"){let j=g.status==="error"?"error":g.status==="failing"?"failing":"clean";j==="clean"&&u(f,E),j!=="error"&&(t.sawVerdict=!0),t.lastRunAt=m.timestamp,Tr(t,_),r($,{tool:b,...E?{project:E}:{},at:m.timestamp,runStatus:j,...g.durationMs!==void 0?{durationMs:g.durationMs}:{},...g.errorCount!==void 0?{errorCount:g.errorCount}:{},...g.warningCount!==void 0?{warningCount:g.warningCount}:{},...g.error?{error:g.error}:{}}),a(),l();return}if(g.kind==="hmr"||m.title.startsWith("HMR ")){t.hmrUpdates+=1;let j=[..._.file?[_.file]:[],...m.relatedFiles??[]];n("build",j),t.lastRunAt=m.timestamp,t.sawVerdict=!0,Tr(t,_),r($,{tool:b,...E?{project:E}:{},at:m.timestamp,runStatus:"clean"}),a(),l();return}Tr(t,_),m.severity==="error"||m.severity==="fatal"?(t.failures.set(_.fingerprint,_),t.warnings.delete(_.fingerprint)):m.severity==="warning"?t.failures.has(_.fingerprint)||t.warnings.set(_.fingerprint,_):(t.failures.delete(_.fingerprint),t.warnings.delete(_.fingerprint)),t.lastRunAt=m.timestamp,t.sawVerdict=!0,r($,{tool:b,...E?{project:E}:{},at:m.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),p=e.bus.subscribe(c),h=o(()=>xi({producers:[...t.producers.values()],domain:"build",noProducerHint:tB}),"health");return e.resources.register(Yi,()=>({schemaVersion:1,revision:e.resources.revision(Yi)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...h()})),e.resources.register(Qi,()=>({schemaVersion:1,revision:e.resources.revision(Qi)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...h()})),e.resources.register(es,()=>({schemaVersion:1,revision:e.resources.revision(es)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:p,uris:[Yi,Qi,es]}}s(Q3,"gh"),o(Q3,"installBuildReducer");function Tr(e,t){e.recent.push(t),e.recent.length>H3&&e.recent.splice(0,e.recent.length-H3)}s(Tr,"Js"),o(Tr,"pushRecent");import{App as uB}from"@frontmcp/sdk";import{Resource as rB,ResourceContext as nB}from"@frontmcp/sdk";var Jd=class extends nB{static{s(this,"vh")}static{o(this,"LintCurrentResource")}async execute(){return this.get(q).read("lint://current")}};Jd=S([rB({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],Jd);var iB=Jd;import{Resource as sB,ResourceContext as aB}from"@frontmcp/sdk";var Vd=class extends aB{static{s(this,"bh")}static{o(this,"LintErrorsResource")}async execute(){return this.get(q).read("lint://errors")}};Vd=S([sB({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],Vd);var oB=Vd;import{Resource as lB,ResourceContext as dB}from"@frontmcp/sdk";var Wd=class extends dB{static{s(this,"xh")}static{o(this,"LintWarningsResource")}async execute(){return this.get(q).read("lint://warnings")}};Wd=S([lB({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],Wd);var cB=Wd,e6=class{static{s(this,"_h")}static{o(this,"LintApp")}};e6=S([uB({id:"lint",name:"Lint",description:"ESLint state.",resources:[iB,oB,cB]})],e6);var ts="lint://current",us="lint://errors",rs="lint://warnings",pB="Nothing runs ESLint in the dev loop, so this is expected. Run `lensmcp lint [paths\u2026]` to publish a run; until then treat lint as UNCHECKED, not passing.";function t6(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(t6,"rA"),o(t6,"readRaw");function u6(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((p,h)=>{let m=t.producers.get(p);t.producers.set(p,{id:p,tool:h.tool,...h.project?{project:h.project}:{},firstReportedAt:m?.firstReportedAt??h.at,lastReportedAt:Math.max(m?.lastReportedAt??0,h.at),lastRunStatus:h.runStatus,errorCount:h.errorCount??m?.errorCount??0,...h.warningCount!==void 0?{warningCount:h.warningCount}:m?.warningCount!==void 0?{warningCount:m.warningCount}:{},...h.durationMs!==void 0?{lastRunDurationMs:h.durationMs}:m?.lastRunDurationMs!==void 0?{lastRunDurationMs:m.lastRunDurationMs}:{},...h.error?{error:h.error}:{}}),Ot(t.producers,_r)},"touchProducer"),i=o((p,h)=>{let m=o((f,g)=>{for(let[E,b]of f)g(b)&&f.delete(E)},"drop");if(p){m(t.errors,f=>f.project===p),m(t.warnings,f=>f.project===p);return}if(h){m(t.errors,f=>f.file===h),m(t.warnings,f=>f.file===h);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let p=[...t.producers.values()].some(h=>h.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(ts),e.resources.markDirty(us),e.resources.markDirty(rs)},"markDirty"),a=o(p=>{if([...t.errors.values()].some(h=>h.project===p)||[...t.warnings.values()].some(h=>h.project===p)||[...t.producers.values()].some(h=>h.project===p)){i(p,void 0);for(let[h,m]of t.producers)m.project===p&&t.producers.delete(h);t.sawVerdict=[...t.producers.values()].some(h=>h.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let A=p.raw??null,_=A?.kind;(_==="service-starting"||_==="service-respawn")&&A?.project&&a(A.project);return}if(p.source!=="eslint"||p.category!=="lint")return;let h=t6(p),m=h.project,f=h.tool??"eslint",g=`${f}:${m??"*"}`,E=h.kind==="lint-run";if(p.severity==="info"&&(E&&h.phase==="start"||p.title.startsWith("ESLint clear"))){i(m,p.location?.file),t.lastRunAt=p.timestamp,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&h.phase==="end"){let A=h.status==="error"?"error":h.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:A,...h.durationMs!==void 0?{durationMs:h.durationMs}:{},...h.errorCount!==void 0?{errorCount:h.errorCount}:{},...h.warningCount!==void 0?{warningCount:h.warningCount}:{},...h.error?{error:h.error}:{}}),u(),n();return}let b=p.title.match(/^\[([^\]]+)\]/),$={id:p.id,timestamp:p.timestamp,severity:p.severity,...h.rule?{rule:h.rule}:b?.[1]?{rule:b[1]}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...m?{project:m}:{},fingerprint:p.fingerprint};if(p.severity==="error"||p.severity==="fatal")t.errors.set($.fingerprint,$),t.warnings.delete($.fingerprint);else if(p.severity==="warning")t.errors.has($.fingerprint)||t.warnings.set($.fingerprint,$);else return;t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>xi({producers:[...t.producers.values()],domain:"lint",noProducerHint:pB}),"health");return e.resources.register(ts,()=>({schemaVersion:1,revision:e.resources.revision(ts)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(us,()=>({schemaVersion:1,revision:e.resources.revision(us)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),e.resources.register(rs,()=>({schemaVersion:1,revision:e.resources.revision(rs)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...c()})),{unsubscribe:d,uris:[ts,us,rs]}}s(u6,"kh"),o(u6,"installLintReducer");import{App as mB}from"@frontmcp/sdk";import{Resource as fB,ResourceContext as hB}from"@frontmcp/sdk";var Gd=class extends hB{static{s(this,"Sh")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(q).read("typecheck://current")}};Gd=S([fB({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],Gd);var gB=Gd;import{Resource as vB,ResourceContext as yB}from"@frontmcp/sdk";var Kd=class extends yB{static{s(this,"Rh")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(q).read("typecheck://errors")}};Kd=S([vB({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],Kd);var EB=Kd,r6=class{static{s(this,"Th")}static{o(this,"TypecheckApp")}};r6=S([mB({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[gB,EB]})],r6);var ns="typecheck://current",is="typecheck://errors",bB="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function n6(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(n6,"uA"),o(n6,"readRaw");function i6(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((p,h)=>{let m=t.producers.get(p),f={id:p,tool:h.tool,...h.project?{project:h.project}:{},firstReportedAt:m?.firstReportedAt??h.at,lastReportedAt:Math.max(m?.lastReportedAt??0,h.at),lastRunStatus:h.runStatus,errorCount:h.errorCount??m?.errorCount??0,...h.durationMs!==void 0?{lastRunDurationMs:h.durationMs}:m?.lastRunDurationMs!==void 0?{lastRunDurationMs:m.lastRunDurationMs}:{},...h.warningCount!==void 0?{warningCount:h.warningCount}:{},...h.error?{error:h.error}:{}};t.producers.set(p,f),Ot(t.producers,_r)},"touchProducer"),i=o(p=>{if(!p){t.errors.clear();return}for(let[h,m]of t.errors)m.project===p&&t.errors.delete(h)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let p=[...t.producers.values()].some(h=>h.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(ns),e.resources.markDirty(is)},"markDirty"),a=o(p=>{let h=[...t.errors.values()].some(f=>f.project===p),m=[...t.producers.values()].some(f=>f.project===p);if(!(!h&&!m)){i(p);for(let[f,g]of t.producers)g.project===p&&t.producers.delete(f);t.sawVerdict=[...t.producers.values()].some(f=>f.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let A=p.raw??null,_=A?.kind;(_==="service-starting"||_==="service-respawn")&&A?.project&&a(A.project);return}if(p.source!=="typescript"||p.category!=="typecheck")return;let h=n6(p),m=h.project,f=h.tool??"tsc",g=`${f}:${m??"*"}`,E=h.kind==="typecheck-run";if(p.severity==="info"&&(E&&h.phase==="start"||p.title.startsWith("tsc clear"))){i(m),t.lastRunAt=p.timestamp,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&h.phase==="end"){let A=h.status==="error"?"error":h.status==="failing"?"failing":"clean";A!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:A,...h.durationMs!==void 0?{durationMs:h.durationMs}:{},...h.errorCount!==void 0?{errorCount:h.errorCount}:{},...h.warningCount!==void 0?{warningCount:h.warningCount}:{},...h.error?{error:h.error}:{}}),u(),n();return}if(p.severity!=="error"&&p.severity!=="fatal")return;let b=p.title.match(/\bTS(\d+):/),$={id:p.id,timestamp:p.timestamp,...h.code?{code:h.code}:b?{code:`TS${b[1]}`}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...m?{project:m}:{},fingerprint:p.fingerprint};t.errors.set($.fingerprint,$),t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:f,...m?{project:m}:{},at:p.timestamp,runStatus:"failing"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>xi({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:bB}),"health");return e.resources.register(ns,()=>({schemaVersion:1,revision:e.resources.revision(ns)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(is,()=>({schemaVersion:1,revision:e.resources.revision(is)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),{unsubscribe:d,uris:[ns,is]}}s(i6,"Ah"),o(i6,"installTypecheckReducer");import{App as DB}from"@frontmcp/sdk";import{Resource as wB,ResourceContext as $B}from"@frontmcp/sdk";var Hd=class extends $B{static{s(this,"zh")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(q).read("bundle://current")}};Hd=S([wB({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],Hd);var BB=Hd;import{Resource as xB,ResourceContext as CB}from"@frontmcp/sdk";var Xd=class extends CB{static{s(this,"Oh")}static{o(this,"BundleChunksResource")}async execute(){return this.get(q).read("bundle://chunks")}};Xd=S([xB({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],Xd);var kB=Xd;import{Resource as AB,ResourceContext as IB}from"@frontmcp/sdk";var Yd=class extends IB{static{s(this,"Dh")}static{o(this,"BundleModulesResource")}async execute(){return this.get(q).read("bundle://modules")}};Yd=S([AB({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],Yd);var _B=Yd;import{Resource as SB,ResourceContext as FB}from"@frontmcp/sdk";var Qd=class extends FB{static{s(this,"Mh")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(q).read("bundle://regressions")}};Qd=S([SB({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],Qd);var jB=Qd;import{Resource as zB,ResourceContext as NB}from"@frontmcp/sdk";var ec=class extends NB{static{s(this,"Uh")}static{o(this,"BundleCompareResource")}async execute(){return this.get(q).read("bundle://compare/latest")}};ec=S([zB({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],ec);var OB=ec,s6=class{static{s(this,"Fh")}static{o(this,"BundleApp")}};s6=S([DB({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[BB,kB,_B,jB,OB]})],s6);function tc(e,t){let r=[],i=new Map(e.chunks.map(n=>[n.name,n])),u=new Map(t.chunks.map(n=>[n.name,n]));for(let[n,a]of u){let l=i.get(n);if(!l){r.push({kind:"chunk-added",name:n,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:n,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...a6(l,a))}for(let[n,a]of i)u.has(n)||r.push({kind:"chunk-removed",name:n,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((n,a)=>Math.abs(a.deltaBytes)-Math.abs(n.deltaBytes))}s(tc,"Qs"),o(tc,"compareReports");function a6(e,t){let r=[],i=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let n=i.get(u.id);if(n===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-n;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:n,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(a6,"xA"),o(a6,"compareModules");var ss="bundle://current",as="bundle://chunks",os="bundle://modules",Mr="bundle://regressions",Pr="bundle://compare/latest";function o6(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let n=u.raw;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="bundle-report")return;let a=n.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?tc(t.baseline,a):[],e.resources.markDirty(ss),e.resources.markDirty(as),e.resources.markDirty(os),e.resources.markDirty(Mr),e.resources.markDirty(Pr))},"handler"),i=e.bus.subscribe(r);return e.resources.register(ss,()=>({schemaVersion:1,revision:e.resources.revision(ss)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(as,()=>({schemaVersion:1,revision:e.resources.revision(as)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(os,()=>{let u=t.current?.chunks.flatMap(n=>n.modules.map(a=>({...a,chunk:n.name})))??[];return{schemaVersion:1,revision:e.resources.revision(os)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(Mr,()=>({schemaVersion:1,revision:e.resources.revision(Mr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(Pr,()=>({schemaVersion:1,revision:e.resources.revision(Pr)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:i,uris:[ss,as,os,Mr,Pr],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=tc(t.baseline,t.current)),e.resources.markDirty(Mr),e.resources.markDirty(Pr)},"setBaseline")}}s(o6,"Bh"),o(o6,"installBundleReducer");import{App as RB}from"@frontmcp/sdk";import{Resource as TB,ResourceContext as MB}from"@frontmcp/sdk";var uc=class extends MB{static{s(this,"Zh")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(q).read("runtime://browser/console")}};uc=S([TB({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],uc);var PB=uc;import{Resource as UB,ResourceContext as ZB}from"@frontmcp/sdk";var rc=class extends ZB{static{s(this,"Vh")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(q).read("runtime://browser/errors")}};rc=S([UB({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],rc);var qB=rc;import{Resource as LB,ResourceContext as JB}from"@frontmcp/sdk";var nc=class extends JB{static{s(this,"Jh")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(q).read("runtime://errors")}};nc=S([LB({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],nc);var VB=nc;import{Resource as WB,ResourceContext as GB}from"@frontmcp/sdk";var ic=class extends GB{static{s(this,"Wh")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(q).read("runtime://browser/network")}};ic=S([WB({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],ic);var KB=ic;import{Resource as HB,ResourceContext as XB}from"@frontmcp/sdk";var sc=class extends XB{static{s(this,"Hh")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(q).read("runtime://browser/failed-requests")}};sc=S([HB({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],sc);var YB=sc;import{Resource as QB,ResourceContext as e2}from"@frontmcp/sdk";var ac=class extends e2{static{s(this,"Qh")}static{o(this,"RuntimeDismissedResource")}async execute(){return this.get(q).read("runtime://dismissed")}};ac=S([QB({name:"runtime-dismissed",uri:"runtime://dismissed",mimeType:"application/json",description:"Errors someone DISMISSED by hand \u2014 in the dashboard, at the CLI, or an agent through observe.dismiss_errors \u2014 with who did it and the reason they gave. A dismissed error is hidden from runtime://errors and the browser error lists, not fixed: it shows again the next time it happens. Read this when an error list is shorter than you expected."})],ac);var t2=ac,l6=class{static{s(this,"tg")}static{o(this,"RuntimeApp")}};l6=S([RB({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[PB,qB,VB,KB,YB,t2]})],l6);var vu="runtime://browser/console",pt="runtime://browser/errors",yu="runtime://browser/network",mt="runtime://browser/failed-requests",ft="runtime://errors",Ur="runtime://dismissed",u2=200,d6=100,r2=200,n2=50,i2=500,s2="default",a2=1e3,oc=o(e=>e??s2,"tabOf");function c6(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(c6,"FA"),o(c6,"isDocumentBoundary");function p6(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(p6,"BA"),o(p6,"isTabGone");function m6(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,dismissed:new Map,changedAt:new Map},i=o((c,p)=>{r.changedAt.set(c,p),e.resources.markDirty(c)},"touch"),u=o((c,p,h)=>{let m=c.filter(f=>!(oc(f.tabId)===p&&f.timestamp<h));m.length!==c.length&&(c.length=0,c.push(...m))},"retract"),n=o(c=>{let p=Wl(c);if(p){let m=r.dismissed.get(p.groupId);r.dismissed.delete(p.groupId),p.kind===mu&&(r.dismissed.set(p.groupId,{eventIds:new Set(p.eventIds),at:c.timestamp,...p.by?{by:p.by}:{},...p.reason?{reason:p.reason}:{},...p.title?{title:p.title}:{}}),r.dismissed.size>i2&&r.dismissed.delete(r.dismissed.keys().next().value));let f=new Set([...m?.eventIds??[],...r.dismissed.get(p.groupId)?.eventIds??[]]);for(let[g,E]of[[ft,r.serverErrors],[pt,r.errors],[mt,r.failed]])E.some(b=>f.has(b.id))&&i(g,c.timestamp);i(Ur,c.timestamp);return}if(f6(c)){let m=c.raw?.project;if(m){let f=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(g=>g.project!==m),r.serverErrors.length!==f&&i(ft,c.timestamp)}return}if(h6(c)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,c.timestamp),Eu(r.serverErrors,g6(c),d6),i(ft,c.timestamp);return}if(!(c.source==="client-runtime"||c.source==="chrome")&&!(c.source==="react"&&c.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,c.timestamp),p6(c)){let m=oc(c.context.tabId);u(r.errors,m,Number.POSITIVE_INFINITY),u(r.failed,m,Number.POSITIVE_INFINITY),r.readyByTab.delete(m);for(let f of[pt,mt,vu,yu])i(f,c.timestamp);return}if(c6(c)){let m=oc(c.context.tabId);r.readyByTab.set(m,Math.max(r.readyByTab.get(m)??0,c.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,c.timestamp);let f=c.timestamp-a2;u(r.errors,m,f),u(r.failed,m,f);for(let g of[pt,mt,vu,yu])i(g,c.timestamp);return}let h={id:c.id,timestamp:c.timestamp,severity:c.severity,title:c.title,message:c.message,source:c.source,fingerprint:c.fingerprint,tabId:c.context.tabId,url:c.context.url,raw:c.raw};if(c.category==="network"){Eu(r.network,h,r2),i(yu,c.timestamp),c.severity==="error"&&(Eu(r.failed,h,n2),i(mt,c.timestamp));return}(c.severity==="error"||c.severity==="fatal")&&(Eu(r.errors,h,d6),i(pt,c.timestamp)),c.title?.startsWith("console.")&&(Eu(r.console,h,u2),i(vu,c.timestamp))},"handler"),a=e.bus.subscribe(n),l=new Set([ft,pt,mt]),d=o((c,p)=>{if(!l.has(c)||r.dismissed.size===0)return dc(e.resources,c,p,r,t,0);let h=new Set([...r.dismissed.values()].flatMap(f=>[...f.eventIds])),m=p.filter(f=>!h.has(f.id));return dc(e.resources,c,m,r,t,p.length-m.length)},"snap");return e.resources.register(ft,()=>d(ft,r.serverErrors)),e.resources.register(vu,()=>d(vu,r.console)),e.resources.register(pt,()=>d(pt,r.errors)),e.resources.register(yu,()=>d(yu,r.network)),e.resources.register(mt,()=>d(mt,r.failed)),e.resources.register(Ur,()=>{let c=new Set([...r.serverErrors,...r.errors,...r.failed].map(h=>h.id)),p=[...r.dismissed].map(([h,m])=>({id:h,at:m.at,...m.by?{by:m.by}:{},...m.reason?{reason:m.reason}:{},...m.title?{title:m.title}:{},eventIds:[...m.eventIds],hiding:[...m.eventIds].filter(f=>c.has(f)).length}));return{schemaVersion:1,revision:e.resources.revision(Ur)??0,updatedAt:new Date(r.changedAt.get(Ur)??t).toISOString(),count:p.length,dismissals:p,detail:p.length?`${p.length} dismissal${p.length===1?"":"s"} in effect \u2014 hidden, not fixed. Each error shows again the next time it happens; undo one with observe.restore_errors.`:"Nothing has been dismissed."}}),{unsubscribe:a,uris:[vu,pt,yu,mt,ft,Ur]}}s(m6,"og"),o(m6,"installRuntimeReducer");function lc(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(lc,"z$"),o(lc,"projectOf");function f6(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s(f6,"ZA"),o(f6,"isGenerationBoundary");function h6(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(h6,"qA"),o(h6,"isServerError");function g6(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...lc(e)?{project:lc(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(g6,"VA"),o(g6,"serverEntry");function dc(e,t,r,i,u,n){let a=t===ft,l=a?i.lastServerEventAt:i.lastEventAt,d=l!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(i.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),...n>0?{dismissedCount:n}:{},producer:d?"connected":"none",lastEventAt:l,lastReadyAt:i.lastReadyAt,detail:a?d?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since."+ls(n):`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(c=>c.project??"unknown")).size} project${new Set(r.map(c=>c.project??"unknown")).size===1?"":"s"}`+ls(n):"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":d?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${i.readyByTab.size} open tab${i.readyByTab.size===1?"":"s"}`+(i.lastReadyAt===void 0?" (no page load observed yet)":"")+ls(n):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(dc,"j$"),o(dc,"snapshot");function ls(e){return e>0?` \u2014 ${e} more dismissed by hand in the dashboard (hidden, not fixed)`:""}s(ls,"ng"),o(ls,"dismissedNote");function Eu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Eu,"fo"),o(Eu,"pushBounded");import{App as o2}from"@frontmcp/sdk";import{Resource as l2,ResourceContext as d2}from"@frontmcp/sdk";var cc=class extends d2{static{s(this,"ig")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(q).read("browser://tabs")}};cc=S([l2({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],cc);var c2=cc;import{Resource as p2,ResourceContext as m2}from"@frontmcp/sdk";var pc=class extends m2{static{s(this,"ag")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(q).read("browser://active-tab")}};pc=S([p2({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],pc);var f2=pc,v6=class{static{s(this,"ug")}static{o(this,"BrowserApp")}};v6=S([o2({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[c2,f2]})],v6);var ht="browser://tabs",gt="browser://active-tab";function y6(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(y6,"HA"),o(y6,"isDocumentBoundary");function E6(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(E6,"YA"),o(E6,"isTabGone");function b6(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},i=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(E6(a)){if(r.tabs.delete(l),r.activePageId===l){let c=[...r.tabs.keys()];r.activePageId=c[c.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(ht,a.timestamp),r.changedAt.set(gt,a.timestamp),e.resources.markDirty(ht),e.resources.markDirty(gt);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let c=r.tabs.keys().next().value;c!==void 0&&c!==l&&r.tabs.delete(c)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),y6(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(ht,a.timestamp),r.changedAt.set(gt,a.timestamp),e.resources.markDirty(ht),e.resources.markDirty(gt)},"handler"),u=e.bus.subscribe(i),n=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(ht,()=>({schemaVersion:1,revision:e.resources.revision(ht)??0,updatedAt:n(ht),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(gt,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(gt)??0,updatedAt:n(gt),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[ht,gt]}}s(b6,"lg"),o(b6,"installBrowserReducer");import{App as h2}from"@frontmcp/sdk";import{Resource as g2,ResourceContext as v2}from"@frontmcp/sdk";var mc=class extends v2{static{s(this,"dg")}static{o(this,"NestProvidersResource")}async execute(){return this.get(q).read("nest://providers")}};mc=S([g2({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],mc);var y2=mc;import{Resource as E2,ResourceContext as b2}from"@frontmcp/sdk";var fc=class extends b2{static{s(this,"fg")}static{o(this,"NestRequestsResource")}async execute(){return this.get(q).read("nest://requests/recent")}};fc=S([E2({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],fc);var D2=fc,D6=class{static{s(this,"hg")}static{o(this,"NestApp")}};D6=S([h2({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[y2,D2]})],D6);var ds="nest://providers",cs="nest://requests/recent";function w6(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let n=u.raw??null;if(n?.kind==="singleton-instance"&&n.provider){let a=n.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(ds);return}if(n?.kind==="server-request"&&n.request){let a={...n.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(cs);return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(ds,()=>({schemaVersion:1,revision:e.resources.revision(ds)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(cs,()=>({schemaVersion:1,revision:e.resources.revision(cs)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:i,uris:[ds,cs]}}s(w6,"gg"),o(w6,"installNestReducer");import{App as w2}from"@frontmcp/sdk";import{Resource as $2,ResourceContext as B2}from"@frontmcp/sdk";var hc=class extends B2{static{s(this,"vg")}static{o(this,"TraceRecentResource")}async execute(){return this.get(q).read("trace://recent")}};hc=S([$2({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],hc);var x2=hc;import{Resource as C2,ResourceContext as k2}from"@frontmcp/sdk";var gc=class extends k2{static{s(this,"bg")}static{o(this,"TraceFailedResource")}async execute(){return this.get(q).read("trace://failed")}};gc=S([C2({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],gc);var A2=gc,$6=class{static{s(this,"xg")}static{o(this,"TraceApp")}};$6=S([w2({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[x2,A2]})],$6);var ps="trace://recent",ms="trace://failed";function B6(e){let t={recent:[],failed:[]},r=o(u=>{let n=u.raw??null;if(!n||n.kind!=="span"||!n.span?.name)return;let a={id:u.id,traceId:n.span.traceId,parentSpanId:n.span.parentSpanId,flowId:n.span.flowId??u.context.flowId,requestId:n.span.requestId??u.context.requestId,name:n.span.name,source:u.source,startTime:n.span.startTime??u.timestamp,endTime:n.span.endTime,durationMs:n.span.durationMs,status:n.span.status??(u.severity==="error"?"error":"ok")};vc(t.recent,a,100),a.status==="error"&&vc(t.failed,a,50),e.resources.markDirty(ps),a.status==="error"&&e.resources.markDirty(ms)},"handler"),i=e.bus.subscribe(r);return e.resources.register(ps,()=>({schemaVersion:1,revision:e.resources.revision(ps)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register(ms,()=>({schemaVersion:1,revision:e.resources.revision(ms)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:i,uris:[ps,ms]}}s(B6,"$g"),o(B6,"installTraceReducer");function vc(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(vc,"O$"),o(vc,"pushBounded");import{App as I2}from"@frontmcp/sdk";import{Resource as _2,ResourceContext as S2}from"@frontmcp/sdk";var yc=class extends S2{static{s(this,"_g")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(q).read("perf://slow-routes")}};yc=S([_2({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],yc);var F2=yc;import{Resource as j2,ResourceContext as z2}from"@frontmcp/sdk";var Ec=class extends z2{static{s(this,"Sg")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(q).read("perf://duplicate-requests")}};Ec=S([j2({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],Ec);var N2=Ec,x6=class{static{s(this,"Rg")}static{o(this,"PerfApp")}};x6=S([I2({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[F2,N2]})],x6);var fs="perf://slow-routes",hs=20,C6=2,O2=200;function k6(e){let t=Je(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),i={routes:new Map},u=o(d=>{let c=d.raw??null;if(c?.kind!=="server-request"||!c.request)return;let{method:p,route:h}=c.request,m=c.request.durationMs??0,f=`${p} ${h}`,g=i.routes.get(f);if(g||(g={method:p,route:h,recent:[],samples:0,slowSamples:0,lastDurationMs:m,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),i.routes.delete(f),i.routes.set(f,g),g.recent.push(m),g.recent.length>hs&&g.recent.splice(0,g.recent.length-hs),g.samples+=1,m>=t&&(g.slowSamples+=1),g.lastDurationMs=m,g.lastSeenAt=d.timestamp,m>g.worstEverMs&&(g.worstEverMs=m,g.worstEverAt=d.timestamp),i.routes.size>O2){let E=i.routes.keys().next().value;E!==void 0&&i.routes.delete(E)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(fs)},"handler"),n=e.bus.subscribe(u),a=o(d=>d.recent.reduce((c,p)=>p>=t?c+1:c,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=C6,"currentlySlow");return e.resources.register(fs,()=>{let d=[...i.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(fs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(c=>({method:c.method,route:c.route,worstRecentMs:Math.max(...c.recent),lastDurationMs:c.lastDurationMs,lastSeenAt:c.lastSeenAt,samples:c.samples,slowSamples:c.slowSamples,recentSlowSamples:a(c),worstEverMs:c.worstEverMs,worstEverAt:c.worstEverAt})).sort((c,p)=>p.worstRecentMs-c.worstRecentMs),routesTracked:i.routes.size,recentSampleWindow:hs,minRecentSlowToKeep:C6,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${i.routes.size} route${i.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${hs} calls each (\u2265${t}ms).`}}),{unsubscribe:n,uris:[fs]}}s(k6,"Eg"),o(k6,"installPerfReducer");var gs="perf://duplicate-requests",bc=10,A6=2,R2=200,I6=300,T2=new Set(["t","_","cacheBust","ts"]);function _6(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])T2.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),i=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?i:`${t.origin}${i}`}catch{return e}}s(_6,"M$"),o(_6,"normalizeRequestUrl");function S6(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:n}of e)t.push({at:u,delta:1}),t.push({at:n+1,delta:-1});t.sort((u,n)=>u.at-n.at||u.delta-n.delta);let r=0,i=0;for(let{delta:u}of t)r+=u,r>i&&(i=r);return i}s(S6,"C$"),o(S6,"peakConcurrency");function F6(e){let t=Je(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),i={endpoints:new Map},u=o(d=>{if(d.category!=="network")return;let c=d.raw??null;if(c?.kind!=="fetch-done"&&c?.kind!=="fetch-error"||!c.url||!c.method)return;let p=_6(c.url),h=c.method.toUpperCase();if(typeof c.startedAt!="number")return;let m=c.startedAt,f=m+(typeof c.durationMs=="number"?c.durationMs:0),g=d.context?.originNodeId??null,E=d.context?.flowId??null,b=`${h} ${p} @ ${g??"-"}`,$=i.endpoints.get(b);if($||($={method:h,url:p,originNodeId:g,currentFlowId:E,currentIntervals:[],currentPeak:0,recentPeaks:[],totalRequests:0,lastSeenAt:d.timestamp,worstEverPeak:0,worstEverAt:d.timestamp}),i.endpoints.delete(b),i.endpoints.set(b,$),E!==$.currentFlowId&&($.currentIntervals.length>0&&($.recentPeaks.push($.currentPeak),$.recentPeaks.length>bc&&$.recentPeaks.splice(0,$.recentPeaks.length-bc)),$.currentFlowId=E,$.currentIntervals=[],$.currentPeak=0),$.currentIntervals.push({start:m,end:f}),$.currentIntervals.length>I6&&$.currentIntervals.splice(0,$.currentIntervals.length-I6),$.currentPeak=S6($.currentIntervals),$.totalRequests+=1,$.lastSeenAt=d.timestamp,$.currentPeak>$.worstEverPeak&&($.worstEverPeak=$.currentPeak,$.worstEverAt=d.timestamp),i.endpoints.size>R2){let A=i.endpoints.keys().next().value;A!==void 0&&i.endpoints.delete(A)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(gs)},"handler"),n=e.bus.subscribe(u),a=o(d=>{let c=[...d.recentPeaks,...d.currentIntervals.length>0?[d.currentPeak]:[]],p=0;for(let h=c.length-1;h>=0&&!((c[h]??0)>=t);h-=1)p+=1;return p},"consecutiveCleanFlows"),l=o(d=>d.worstEverPeak>=t&&a(d)<A6,"currentlyDuplicated");return e.resources.register(gs,()=>{let d=[...i.endpoints.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(gs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),peakThreshold:t,endpoints:d.map(c=>({method:c.method,url:c.url,originNodeId:c.originNodeId,peakConcurrent:c.currentPeak,cleanFlowsSince:a(c),flowsObserved:c.recentPeaks.length+(c.currentIntervals.length>0?1:0),totalRequests:c.totalRequests,worstEverPeak:c.worstEverPeak,worstEverAt:c.worstEverAt,lastSeenAt:c.lastSeenAt})).sort((c,p)=>p.peakConcurrent-c.peakConcurrent),endpointsTracked:i.endpoints.size,recentFlowWindow:bc,minCleanFlowsToRetract:A6,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":d.length===0?`${i.endpoints.size} endpoint${i.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${d.length} endpoint${d.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:n,uris:[gs]}}s(F6,"Ag"),o(F6,"installDuplicateRequestsReducer");import{App as M2}from"@frontmcp/sdk";import{Resource as P2,ResourceContext as U2}from"@frontmcp/sdk";var Dc=class extends U2{static{s(this,"zg")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(q).read("db://slow-queries")}};Dc=S([P2({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],Dc);var Z2=Dc;import{Resource as q2,ResourceContext as L2}from"@frontmcp/sdk";var wc=class extends L2{static{s(this,"Og")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(q).read("db://analysis")}};wc=S([q2({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],wc);var J2=wc,j6=class{static{s(this,"Dg")}static{o(this,"DbApp")}};j6=S([M2({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[Z2,J2]})],j6);var vs="db://slow-queries",ys="db://analysis",z6=50,V2=20,W2=200;function N6(e){let t=e[Jl];if(!t)return;let r=Array.isArray(t.paths)?t.paths:[];for(let i of r){let u=typeof i=="string"?/^findings\[\] \(\+(\d+) items dropped\)$/.exec(i):null;if(u)return Number(u[1])}return r.some(i=>typeof i=="string"&&i.startsWith("findings"))?0:void 0}s(N6,"kz"),o(N6,"findingsDroppedByClamp");function O6(e){let t=Je(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),i={shapes:new Map,analyzeRuns:new Map},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let c=d.project??"unknown",p=d.op??"query",h=d.table??"query",m=d.durationMs??0,f=`${c}|${p}|${h}`,g=i.shapes.get(f);if(g||(g={project:c,op:p,table:h,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),i.shapes.delete(f),i.shapes.set(f,g),g.count+=1,d.error!==void 0&&(g.errorCount+=1),g.totalMs+=m,m>g.maxMs&&(g.maxMs=m,g.maxAt=l.timestamp),g.recent.push(m),g.recent.length>z6&&g.recent.splice(0,g.recent.length-z6),g.rowsTotal+=d.rows??0,d.query&&(g.lastSql=d.query),g.lastDurationMs=m,g.lastSeenAt=l.timestamp,g.suppressed+=d.floodSuppressed??0,i.shapes.size>W2){let E=i.shapes.keys().next().value;E!==void 0&&i.shapes.delete(E)}i.lastQueryAt=Math.max(i.lastQueryAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(vs);return}if(d.kind==="db-analyze-run"){let c=d.project??"unknown",p=N6(d);i.analyzeRuns.set(c,{project:c,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[],...p!==void 0?{droppedFindings:p}:{}}),Ot(i.analyzeRuns,_r),i.lastAnalyzeAt=Math.max(i.lastAnalyzeAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(ys)}}},"handler"),n=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((c,p)=>c-p);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(vs,()=>{let l=[...i.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(vs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,c)=>c.maxMs-d.maxMs).slice(0,V2),shapesTracked:i.shapes.size,note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events.",lastSampleAt:i.lastQueryAt,producer:i.lastQueryAt===void 0?"none":"connected",detail:i.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${i.shapes.size} query shape${i.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(ys,()=>{let l=[...i.analyzeRuns.values()].sort((b,$)=>$.runAt-b.runAt),d=l.flatMap(b=>b.findings),c=d.length,p=d.filter(b=>b.severity==="error").length,h=d.filter(b=>b.severity==="warning").length,m=c-p-h,f=l.filter(b=>b.droppedFindings!==void 0),g=f.reduce((b,$)=>b+($.droppedFindings??0),0),E=f.length>0;return{schemaVersion:1,revision:e.resources.revision(ys)??0,updatedAt:new Date(i.changedAt??r).toISOString(),runs:l,findingCount:c,errorCount:p,warningCount:h,infoCount:m,...E?{incomplete:!0,droppedFindings:g}:{},lastSampleAt:i.lastAnalyzeAt,producer:i.lastAnalyzeAt===void 0?"none":"connected",detail:i.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${c} finding${c===1?"":"s"} (${p} error, ${h} warning, ${m} info).`+(E?` INCOMPLETE: ${g>0?`${g} more findings were`:"part of a run was"} cut by the bus payload bound before reaching the lens (an event over 32 KiB keeps only the first 64 items of a list), and the cut takes whatever came last. The analyzer must keep one run under that bound, most severe first.`:"")}}),{unsubscribe:n,uris:[vs,ys]}}s(O6,"Pg"),o(O6,"installDbReducer");import{App as G2}from"@frontmcp/sdk";import{Resource as K2,ResourceContext as H2}from"@frontmcp/sdk";var $c=class extends H2{static{s(this,"Mg")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(q).read("net://egress/hosts")}};$c=S([K2({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],$c);var X2=$c;import{Resource as Y2,ResourceContext as Q2}from"@frontmcp/sdk";var Bc=class extends Q2{static{s(this,"Ug")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(q).read("net://egress/recent")}};Bc=S([Y2({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],Bc);var ex=Bc;import{Resource as tx,ResourceContext as ux}from"@frontmcp/sdk";var xc=class extends ux{static{s(this,"Fg")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(q).read("net://egress/failures")}};xc=S([tx({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],xc);var rx=xc,R6=class{static{s(this,"Zg")}static{o(this,"NetApp")}};R6=S([G2({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[X2,ex,rx]})],R6);var Es="net://egress/hosts",bs="net://egress/recent",Ds="net://egress/failures",bu=20,nx=25,ix=200,sx=20,ax=5,T6=200,M6=50,P6=2;function U6(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(U6,"Pz"),o(U6,"isIdSegment");function Z6(e){let[t="/"]=e.split("?"),r=t.split("/"),i=[];for(let n of r){if(i.length>12){i.push("\u2026");break}i.push(U6(n)?":id":n)}let u=i.join("/");return u.length===0?"/":u}s(Z6,"Z$"),o(Z6,"templatisePath");function q6(e){let t=Je(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),i={hosts:new Map,recent:[],failures:[]},u=o(p=>{let h=p.raw??null;if(!h||h.kind!=="egress")return;let m=h.project??"unknown",f=h.host??"unknown",g=(h.method??"GET").toUpperCase(),E=h.durationMs??0,b=typeof h.status=="number"?h.status:void 0,$=h.error===void 0?void 0:String(h.error),A=$!==void 0||b!==void 0&&b>=400,_=h.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",j=`${m}|${f}`,F=i.hosts.get(j);F||(F={project:m,host:f,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:p.timestamp,recent:[],outcomes:[],firstSeenAt:p.timestamp,lastSeenAt:p.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),i.hosts.delete(j),i.hosts.set(j,F),F.count+=1,$!==void 0&&(F.errorCount+=1),b!==void 0&&b>=400&&b<500&&(F.status4xx+=1),b!==void 0&&b>=500&&(F.status5xx+=1),F.totalMs+=E,E>F.maxMs&&(F.maxMs=E,F.maxAt=p.timestamp),F.recent.push(E),F.recent.length>bu&&F.recent.splice(0,F.recent.length-bu),F.outcomes.push(A),F.outcomes.length>bu&&F.outcomes.splice(0,F.outcomes.length-bu),F.lastDurationMs=E,F.lastBad=A,F.lastSeenAt=p.timestamp,F.suppressed+=h.floodSuppressed??0;let D=Z6(_),B=`${g} ${D}`,x=F.endpoints.get(B);if(x||(x={method:g,path:D,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:p.timestamp}),F.endpoints.delete(B),F.endpoints.set(B,x),x.count+=1,$!==void 0&&(x.errorCount+=1,x.lastError=$),b!==void 0&&b>=400&&b<500&&(x.status4xx+=1),b!==void 0&&b>=500&&(x.status5xx+=1),x.totalMs+=E,E>x.maxMs&&(x.maxMs=E),x.recent.push(E),x.recent.length>bu&&x.recent.splice(0,x.recent.length-bu),x.lastStatus=b,x.lastDurationMs=E,x.lastSeenAt=p.timestamp,F.endpoints.size>sx){let K=F.endpoints.keys().next().value;K!==void 0&&F.endpoints.delete(K)}if(i.hosts.size>ix){let K=i.hosts.keys().next().value;K!==void 0&&i.hosts.delete(K)}let N=p.context??{},O={id:p.id,timestamp:p.timestamp,project:m,method:g,host:f,path:_,...b!==void 0?{status:b}:{},...$!==void 0?{error:$}:{},durationMs:E,...N.flowId?{flowId:N.flowId}:{},...N.requestId?{requestId:N.requestId}:{}};i.recent.push(O),i.recent.length>T6&&i.recent.splice(0,i.recent.length-T6),A&&(i.failures.push(O),i.failures.length>M6&&i.failures.splice(0,i.failures.length-M6),e.resources.markDirty(Ds)),i.lastSampleAt=Math.max(i.lastSampleAt??0,p.timestamp),i.changedAt=p.timestamp,e.resources.markDirty(Es),e.resources.markDirty(bs)},"handler"),n=e.bus.subscribe(u),a=o(p=>{if(p.length===0)return 0;let h=[...p].sort((m,f)=>m-f);return h[Math.min(h.length-1,Math.floor(h.length*.95))]??0},"p95"),l=o(p=>p.lastDurationMs>=t||p.recent.filter(h=>h>=t).length>=P6,"isSlow"),d=o(p=>p.lastBad||p.outcomes.filter(Boolean).length>=P6,"isFailing"),c=o(p=>{let h=p.outcomes.filter(Boolean).length;return d(p)?`${h} of the last ${p.outcomes.length} call${p.outcomes.length===1?"":"s"} failed`:l(p)?`${p.recent.filter(m=>m>=t).length} of the last ${p.recent.length} call${p.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(Es,()=>{let p=[...i.hosts.values()],h=p.filter(d),m=p.filter(f=>!d(f)&&l(f));return{schemaVersion:1,revision:e.resources.revision(Es)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,hosts:p.map(f=>({project:f.project,host:f.host,count:f.count,errorCount:f.errorCount,status4xx:f.status4xx,status5xx:f.status5xx,avgMs:Math.round(f.totalMs/Math.max(f.count,1)*10)/10,p95Ms:a(f.recent),maxMs:f.maxMs,maxAt:f.maxAt,lastDurationMs:f.lastDurationMs,firstSeenAt:f.firstSeenAt,lastSeenAt:f.lastSeenAt,slow:l(f),failing:d(f),detail:c(f),suppressedEvents:f.suppressed,endpoints:[...f.endpoints.values()].map(g=>({method:g.method,path:g.path,count:g.count,errorCount:g.errorCount,status4xx:g.status4xx,status5xx:g.status5xx,avgMs:Math.round(g.totalMs/Math.max(g.count,1)*10)/10,p95Ms:a(g.recent),maxMs:g.maxMs,...g.lastStatus!==void 0?{lastStatus:g.lastStatus}:{},...g.lastError!==void 0?{lastError:g.lastError}:{},lastSeenAt:g.lastSeenAt})).sort((g,E)=>E.maxMs-g.maxMs).slice(0,ax)})).sort((f,g)=>f.failing!==g.failing?f.failing?-1:1:g.maxMs-f.maxMs).slice(0,nx),hostsTracked:i.hosts.size,failingHosts:h.length,slowHosts:m.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${i.hosts.size} external host${i.hosts.size===1?"":"s"} observed; ${h.length} failing, ${m.length} slower than ${t}ms.`}}),e.resources.register(bs,()=>({schemaVersion:1,revision:e.resources.revision(bs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.recent],count:i.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${i.recent.length} recent outbound call${i.recent.length===1?"":"s"}.`})),e.resources.register(Ds,()=>({schemaVersion:1,revision:e.resources.revision(Ds)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.failures],count:i.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${i.failures.length} failed outbound call${i.failures.length===1?"":"s"} held.`})),{unsubscribe:n,uris:[Es,bs,Ds]}}s(q6,"qg"),o(q6,"installNetReducer");import{App as ox}from"@frontmcp/sdk";import{Resource as lx,ResourceContext as dx}from"@frontmcp/sdk";var Cc=class extends dx{static{s(this,"Vg")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(q).read("visual://current")}};Cc=S([lx({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],Cc);var cx=Cc;import{Resource as px,ResourceContext as mx}from"@frontmcp/sdk";var kc=class extends mx{static{s(this,"Jg")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(q).read("visual://violations/current")}};kc=S([px({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],kc);var fx=kc;import{Resource as hx,ResourceContext as gx}from"@frontmcp/sdk";var Ac=class extends gx{static{s(this,"Wg")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(q).read("visual://violations/stable")}};Ac=S([hx({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],Ac);var vx=Ac;import{Resource as yx,ResourceContext as Ex}from"@frontmcp/sdk";var Ic=class extends Ex{static{s(this,"Hg")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(q).read("visual://violations/during-animation")}};Ic=S([yx({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],Ic);var bx=Ic;import{Resource as Dx,ResourceContext as wx}from"@frontmcp/sdk";var _c=class extends wx{static{s(this,"Qg")}static{o(this,"VisualRulesResource")}async execute(){return this.get(q).read("visual://rules")}};_c=S([Dx({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],_c);var $x=_c;import{Resource as Bx,ResourceContext as xx}from"@frontmcp/sdk";var Sc=class extends xx{static{s(this,"tv")}static{o(this,"VisualTokensResource")}async execute(){return this.get(q).read("visual://tokens")}};Sc=S([Bx({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],Sc);var Cx=Sc;import{Tool as kx,ToolContext as Ax,z as L6}from"@frontmcp/sdk";import{existsSync as Ix,mkdirSync as _x,readFileSync as Sx,writeFileSync as Fx}from"node:fs";import{dirname as jx,join as Fc}from"node:path";function jc(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?jx(r):Fc(t,".lensmcp")}s(jc,"ha"),o(jc,"captureDir");function J6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(J6,"ej"),o(J6,"pidAlive");function zc(e,t=J6){let r=Fc(e,oD);try{if(!Ix(r))return;let i=JSON.parse(Sx(r,"utf8"));return typeof i?.pid!="number"||!Number.isFinite(i.pid)?void 0:t(i.pid)?i:void 0}catch{return}}s(zc,"ga"),o(zc,"liveRunner");function V6(e,t){try{return _x(e,{recursive:!0}),Fx(Fc(e,aD),JSON.stringify(t)),!0}catch{return!1}}s(V6,"q$"),o(V6,"publishCaptureRequest");var Nc;async function W6(e,t){let r=Nc;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let i=t().finally(()=>{Nc=void 0});return Nc={promise:i,requestId:e},{fresh:await i,coalesced:!1,requestId:e}}s(W6,"V$"),o(W6,"captureSingleFlight");async function G6(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),i=e.budgetMs??8e3,u=e.pollMs??100,n=t()+i;for(;t()<n;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(G6,"G$"),o(G6,"waitForFreshFrame");var Oc=class extends Ax{static{s(this,"iv")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(Ir),r=this.get(q),i=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await i(),n=tt(),a=Date.now();t.publish({id:tt(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:n}});let l=jc(),d=zc(l),c=!1,p=await W6(n,async()=>(c=V6(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:n}),c&&d?await G6({readFrameId:i,before:u}):!1));return{requested:p.coalesced?!0:c,cause:e.cause,stable:e.stable,fresh:p.fresh,coalesced:p.coalesced,requestId:p.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};Oc=S([kx({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:L6.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:L6.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],Oc);var zx=Oc;import{Tool as Nx,ToolContext as Ox,z as Rx}from"@frontmcp/sdk";var Rc=class extends Ox{static{s(this,"av")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(q).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(i=>i.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};Rc=S([Nx({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:Rx.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],Rc);var Tx=Rc;import{Tool as Mx,ToolContext as Px,z as Ux}from"@frontmcp/sdk";var Tc=class extends Px{static{s(this,"uv")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(q).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};Tc=S([Mx({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:Ux.string().optional().describe("Optional frame id; defaults to the latest.")}})],Tc);var Zx=Tc;import{Tool as qx,ToolContext as Lx,z as Jx}from"@frontmcp/sdk";var Mc=class extends Lx{static{s(this,"dv")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(q).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:K6(t)}:{found:!1,violationId:e.violationId}}};Mc=S([qx({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:Jx.string().describe("Id of the violation as seen in visual://violations/current.")}})],Mc);var Vx=Mc;function K6(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
|
|
71
|
-
`)}s(K6,"pj"),o(K6,"buildExplanation");import{Tool as Wx,ToolContext as Gx,z as je}from"@frontmcp/sdk";import{mkdirSync as Kx,readFileSync as Hx,renameSync as Xx,writeFileSync as Yx}from"node:fs";import{join as Qx}from"node:path";var eC=500;function H6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(H6,"bj"),o(H6,"pidAlive");function X6(e){try{let t=JSON.parse(Hx(e,"utf8"));return Array.isArray(t?.rules)?t.rules:[]}catch{return[]}}s(X6,"wj"),o(X6,"readEntries");function Y6(e,t,r={}){let i=r.pid??process.pid,u=r.isAlive??H6,n=Qx(e,lD),a=[...X6(n).filter(d=>typeof d?.registeredBy=="number"&&typeof d?.rule?.id=="string"&&d.rule.id!==t.id&&(d.registeredBy===i||u(d.registeredBy))),{rule:t,registeredBy:i,registeredAt:(r.now??Date.now)()}].slice(-eC);Kx(e,{recursive:!0});let l=`${n}.${i}.tmp`;return Yx(l,JSON.stringify({schemaVersion:1,rules:a})),Xx(l,n),a}s(Y6,"K$"),o(Y6,"registerSessionRule");var Pc=class extends Gx{static{s(this,"fv")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(Ir),r=this.get(q),i={id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints};t.publish({id:tt(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:i}});let u=jc(),n=!1,a;try{Y6(u,i),n=zc(u)!==void 0,a=n?"The capture runner evaluates this rule on the next captured frame (visual.capture_frame).":"No capture runner is listening, so nothing will evaluate this rule until one starts (the dev cluster gateway or agent-dev). It is listed, not enforced."}catch(l){a=`Could not hand the rule to the capture runner (${l.message}). It is listed, but will NOT be evaluated.`}return{registered:!0,evaluated:n,note:a,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};Pc=S([Wx({name:"visual.register_rule",description:"Register (or replace) a visual rule. It is handed to the capture runner, which evaluates it on every frame captured from now on, for as long as this lens server runs. The result says whether a runner is listening; if `evaluated` is false the rule is only listed, and no violation can come of it.",inputSchema:{id:je.string().describe("Stable rule id; replaces a prior rule with the same id."),type:je.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:je.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:je.enum(["info","warning","error"]).default("warning"),timing:je.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:je.record(je.string(),je.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:je.record(je.string(),je.record(je.string(),je.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],Pc);var tC=Pc,Q6=class{static{s(this,"hv")}static{o(this,"VisualApp")}};Q6=S([ox({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[cx,fx,vx,bx,$x,Cx],tools:[zx,Tx,Zx,Vx,tC]})],Q6);var Zr="visual://current",qr="visual://violations/current",Lr="visual://violations/stable",Jr="visual://violations/during-animation",Vr="visual://rules",Wr="visual://tokens";function ey(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},i=o((m,f)=>{r.changedAt.set(m,f),e.resources.markDirty(m)},"touch"),u=o(m=>{i(qr,m),i(Lr,m),i(Jr,m)},"touchViolationViews"),n=o(m=>{let f=m.raw??null;if(f?.kind)switch(f.kind){case"visual-frame":{let g=f.frame;if(!g)return;r.currentFrame=g,r.lastFrameAt=m.timestamp,r.framesSeen+=1,r.rulesEvaluated=typeof f.rulesEvaluated=="number"?f.rulesEvaluated:void 0,i(Zr,m.timestamp);let E=r.violations.length;r.violations=r.violations.filter(b=>b.frameId===g.id),E!==r.violations.length&&u(m.timestamp);return}case"visual-violation":if(!f.violation)return;r.violations.push(f.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(m.timestamp);return;case"visual-rule-registered":{let g=f.rule;if(!g)return;let E=r.rules.findIndex(b=>b.id===g.id);E>=0&&r.rules.splice(E,1),r.rules.push(g),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),i(Vr,m.timestamp);return}case"visual-tokens-loaded":if(!f.tokens)return;r.tokens=f.tokens,i(Wr,m.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(n),l=o(m=>new Date(r.changedAt.get(m)??t).toISOString(),"stamp"),d="No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.",c=o(()=>`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured`,"frameCount"),p=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,...r.rulesEvaluated!==void 0?{rulesEvaluated:r.rulesEvaluated}:{},producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?d:r.rulesEvaluated===void 0?`${c()}; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered.`:`${c()}; ${r.rulesEvaluated} rule${r.rulesEvaluated===1?"":"s"} evaluated on the current one.`}),"frameHealth"),h=o(()=>{let m=p();return r.framesSeen===0||r.rulesEvaluated===void 0?r.framesSeen===0?m:{...m,detail:`${m.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}:r.rulesEvaluated===0?{...m,producer:"none",detail:`${c()}, but NO rule was evaluated on the current one \u2014 an empty violation list is NOT evidence the UI is correct, nothing is being checked. Add rules to \`lensmcp.rules.json\` at the workspace root, or register one with visual.register_rule.`}:{...m,detail:`${m.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}},"violationHealth");return e.resources.register(Zr,()=>({schemaVersion:1,revision:e.resources.revision(Zr)??0,updatedAt:l(Zr),frame:r.currentFrame??null,...p()})),e.resources.register(qr,()=>({schemaVersion:1,revision:e.resources.revision(qr)??0,updatedAt:l(qr),violations:r.violations.slice(),...h()})),e.resources.register(Lr,()=>({schemaVersion:1,revision:e.resources.revision(Lr)??0,updatedAt:l(Lr),violations:r.violations.filter(m=>m.timing==="after-animation"||m.timing==="stable-only"||m.timing==="always"),...h()})),e.resources.register(Jr,()=>({schemaVersion:1,revision:e.resources.revision(Jr)??0,updatedAt:l(Jr),violations:r.violations.filter(m=>m.timing==="during-animation"),...h()})),e.resources.register(Vr,()=>({schemaVersion:1,revision:e.resources.revision(Vr)??0,updatedAt:l(Vr),rules:r.rules.slice()})),e.resources.register(Wr,()=>({schemaVersion:1,revision:e.resources.revision(Wr)??0,updatedAt:l(Wr),tokens:r.tokens??null})),{unsubscribe:a,uris:[Zr,qr,Lr,Jr,Vr,Wr]}}s(ey,"gv"),o(ey,"installVisualReducer");import{App as uC}from"@frontmcp/sdk";import{Resource as rC,ResourceContext as nC}from"@frontmcp/sdk";var Uc=class extends nC{static{s(this,"vv")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(q).read("react://pages/current")}};Uc=S([rC({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],Uc);var iC=Uc;import{Resource as sC,ResourceContext as aC}from"@frontmcp/sdk";var Zc=class extends aC{static{s(this,"bv")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(q).read("react://components/hot")}};Zc=S([sC({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],Zc);var oC=Zc;import{Resource as lC,ResourceContext as dC}from"@frontmcp/sdk";var qc=class extends dC{static{s(this,"xv")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(q).read("react://renders/slow")}};qc=S([lC({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],qc);var cC=qc;import{Resource as pC,ResourceContext as mC}from"@frontmcp/sdk";var Lc=class extends mC{static{s(this,"_v")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(q).read("react://renders/recent")}};Lc=S([pC({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],Lc);var fC=Lc;import{Resource as hC,ResourceContext as gC}from"@frontmcp/sdk";var Jc=class extends gC{static{s(this,"Sv")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(q).read("react://effects/recent")}};Jc=S([hC({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],Jc);var vC=Jc;import{Resource as yC,ResourceContext as EC}from"@frontmcp/sdk";var Vc=class extends EC{static{s(this,"Rv")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(q).read("react://memos/recomputed")}};Vc=S([yC({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],Vc);var bC=Vc;import{Resource as DC,ResourceContext as wC}from"@frontmcp/sdk";var Wc=class extends wC{static{s(this,"Tv")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(q).read("react://hooks/recent")}};Wc=S([DC({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],Wc);var $C=Wc;import{Tool as BC,ToolContext as xC,z as Gc}from"@frontmcp/sdk";var Kc=class extends xC{static{s(this,"jv")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(q).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentInstanceId===e.componentInstanceId){r=n;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentLogicalId===e.componentLogicalId){r=n;break}}if(!r)return{found:!1,searched:e};let i=(r.why??[]).map(u=>({...u,summary:ty(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:i,parentRenderId:r.parentRenderId}}};Kc=S([BC({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:Gc.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:Gc.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:Gc.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],Kc);var CC=Kc;function ty(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(ty,"Lj"),o(ty,"summariseWhy");var uy=class{static{s(this,"Nv")}static{o(this,"ReactApp")}};uy=S([uC({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[iC,oC,cC,fC,vC,bC,$C],tools:[CC]})],uy);var Gr="react://pages/current",ws="react://components/hot",$s="react://renders/slow",Bs="react://renders/recent",xs="react://effects/recent",Cs="react://memos/recomputed",ks="react://hooks/recent",As=100,Hc=50,ry=500;function ny(e){let t=Je(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},i=o(n=>{if(n.source!=="react")return;let a=n.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(Du(r.rendersRecent,l,As),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>ry){for(let c of r.rendersByInstance.keys())if(r.rendersByInstance.delete(c),r.rendersByInstance.size<=ry)break}l.actualDurationMs>=t&&(Du(r.rendersSlow,l,Hc),r.rendersSlow.sort((c,p)=>p.actualDurationMs-c.actualDurationMs),r.rendersSlow.length>Hc&&(r.rendersSlow.length=Hc));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Gr)),e.resources.markDirty(Bs),e.resources.markDirty(ws),l.actualDurationMs>=t&&e.resources.markDirty($s);return}case"effect-run":{let l=a.effect;if(!l)return;Du(r.effectsRecent,l,As),e.resources.markDirty(xs);return}case"hook-run":{let l=a.hook;if(!l)return;Du(r.hooksRecent,l,As),e.resources.markDirty(ks),l.recomputed&&l.hookType==="useMemo"&&(Du(r.memosRecomputed,l,As),e.resources.markDirty(Cs));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(Gr));return}default:return}},"handler"),u=e.bus.subscribe(i);return e.resources.register(Gr,()=>({schemaVersion:1,revision:e.resources.revision(Gr)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(ws,()=>({schemaVersion:1,revision:e.resources.revision(ws)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((n,a)=>a.renderCount-n.renderCount)})),e.resources.register($s,()=>({schemaVersion:1,revision:e.resources.revision($s)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(Bs,()=>({schemaVersion:1,revision:e.resources.revision(Bs)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(xs,()=>({schemaVersion:1,revision:e.resources.revision(xs)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(Cs,()=>({schemaVersion:1,revision:e.resources.revision(Cs)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(ks,()=>({schemaVersion:1,revision:e.resources.revision(ks)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[Gr,ws,$s,Bs,xs,Cs,ks],lookups:{latestRenderFor(n){return r.rendersByInstance.get(n)},latestRenderForLogical(n){if(r.hotByLogical.get(n))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===n)return l}}}}}s(ny,"Pv"),o(ny,"installReactReducer");function Du(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Du,"xo"),o(Du,"pushBounded");import{App as kC}from"@frontmcp/sdk";import{Resource as AC,ResourceContext as IC}from"@frontmcp/sdk";var Xc=class extends IC{static{s(this,"Mv")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(q).read("valtio://updates/recent")}};Xc=S([AC({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],Xc);var _C=Xc;import{Resource as SC,ResourceContext as FC}from"@frontmcp/sdk";var Yc=class extends FC{static{s(this,"Uv")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(q).read("valtio://stores")}};Yc=S([SC({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],Yc);var jC=Yc;import{Resource as zC,ResourceContext as NC}from"@frontmcp/sdk";var Qc=class extends NC{static{s(this,"Fv")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(q).read("valtio://subscribers")}};Qc=S([zC({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],Qc);var OC=Qc,iy=class{static{s(this,"Zv")}static{o(this,"ValtioApp")}};iy=S([kC({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[_C,jC,OC]})],iy);var Is="valtio://updates/recent",_s="valtio://stores",Kr="valtio://subscribers",sy=100,ay=1e3,RC=1e3,TC=256,MC=256;function oy(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let i=r.next();if(i.done)break;e.delete(i.value)}}s(oy,"Yj"),o(oy,"capSet");function ep(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,TC):typeof e.path=="string"?[e.path]:[]}s(ep,"Y$"),o(ep,"subscriptionPaths");function tp(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(tp,"Q$"),o(tp,"subscriberId");function ly(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let n=u.raw??null;if(n?.kind)switch(n.kind){case"state-update":{let a=n.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>sy&&t.updates.splice(0,t.updates.length-sy);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>ay){for(let c of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(c),t.latestUpdateByPath.size<=ay)break}e.resources.markDirty(Is);return}case"store-created":{let a=n.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(_s);return}case"subscription-added":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=tp(a);for(let d of ep(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);p||(p=new Map,t.subscribers.set(c,p));let h=p.get(l);h||(h=new Set,p.set(l,h)),h.add(a.componentInstanceId),Ot(p,_r),oy(h,MC)}Ot(t.subscribers,RC),e.resources.markDirty(Kr);return}case"subscription-removed":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=tp(a);for(let d of ep(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);if(!p)continue;let h=p.get(l);h&&(h.delete(a.componentInstanceId),h.size===0&&p.delete(l)),p.size===0&&t.subscribers.delete(c)}e.resources.markDirty(Kr);return}default:return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Is,()=>({schemaVersion:1,revision:e.resources.revision(Is)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(_s,()=>({schemaVersion:1,revision:e.resources.revision(_s)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(Kr,()=>({schemaVersion:1,revision:e.resources.revision(Kr)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,n])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...n.keys()]}})})),{unsubscribe:i,uris:[Is,_s,Kr],lookups:{latestUpdateForPath(u,n){return t.latestUpdateByPath.get(`${u}::${n}`)},subscribersFor(u,n){return[...t.subscribers.get(`${u}::${n}`)?.keys()??[]]}}}}s(ly,"qv"),o(ly,"installValtioReducer");import{App as PC}from"@frontmcp/sdk";import{Resource as UC,ResourceContext as ZC}from"@frontmcp/sdk";var up=class extends ZC{static{s(this,"Vv")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(q).read("graph://patterns")}};up=S([UC({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],up);var qC=up;import{Resource as LC,ResourceContext as JC}from"@frontmcp/sdk";var rp=class extends JC{static{s(this,"Jv")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(q).read("graph://performance/event-loop-lag")}};rp=S([LC({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],rp);var VC=rp;import{Tool as WC,ToolContext as GC,z as KC}from"@frontmcp/sdk";var dy;function np(e){dy=e}s(np,"Ia"),o(np,"setActiveGraphBuffer");function Hr(){return dy?.events??[]}s(Hr,"Nt"),o(Hr,"currentEvents");function Pt(){let e=new mm;return T1(e,Hr()),e}s(Pt,"Fe"),o(Pt,"buildGraph");var ip=class extends GC{static{s(this,"Wv")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=Pt().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};ip=S([WC({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:KC.string().describe("Node id (usually the originating event id).")}})],ip);var HC=ip;import{Tool as XC,ToolContext as YC,z as wu}from"@frontmcp/sdk";var QC=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],sp=class extends YC{static{s(this,"Hv")}static{o(this,"GraphTraverseTool")}async execute(e){let t=Pt().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};sp=S([XC({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:wu.string().describe("Start node id."),lens:wu.array(wu.enum(QC)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:wu.number().int().positive().max(12).default(4),direction:wu.enum(["out","in","both"]).default("both"),maxNodes:wu.number().int().positive().max(1e3).default(200)}})],sp);var ek=sp;import{Tool as tk,ToolContext as uk,z as rk}from"@frontmcp/sdk";var ap=class extends uk{static{s(this,"Qv")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=rd(Hr(),{threshold:e.threshold});return{count:t.length,matches:t}}};ap=S([tk({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:rk.number().int().positive().default(5)}})],ap);var nk=ap;import{Tool as ik,ToolContext as sk,z as ak}from"@frontmcp/sdk";var op=class extends sk{static{s(this,"ty")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=Pt(),r=new Map,i=Hr(),u=e.from?[e.from]:i.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of i){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(c=>c.from===l.id).map(c=>c.to))}let n=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=N1(u.length?u:i.map(l=>l.id),r,n);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};op=S([ik({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:ak.string().optional().describe("Start node id; defaults to all flow origins.")}})],op);var ok=op;import{Tool as lk,ToolContext as dk,z as cy}from"@frontmcp/sdk";var lp=class extends dk{static{s(this,"ny")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=Pt(),r=e.originNodeId;if(!t.getNode(r)){let n=Hr().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);n&&(r=n.id)}let i=t.getNode(r);if(!i)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:i.name,type:i.type},nodeCount:u.nodes.length,nodes:u.nodes.map(n=>({id:n.id,type:n.type,name:n.name,durationMs:n.durationMs}))}}};lp=S([lk({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:cy.string().describe("Origin node id, logicalId, or originating event id."),depth:cy.number().int().positive().max(12).default(6)}})],lp);var ck=lp;import{Tool as pk,ToolContext as mk,z as py}from"@frontmcp/sdk";var dp=class extends mk{static{s(this,"iy")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=Pt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(i=>({id:i.id,name:i.name,logicalId:i.logicalId}))}}};dp=S([pk({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:py.string().describe("Origin node id."),depth:py.number().int().positive().max(12).default(6)}})],dp);var fk=dp;import{Tool as hk,ToolContext as gk,z as my}from"@frontmcp/sdk";var cp=class extends gk{static{s(this,"ay")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=Pt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="server-request");return{found:!0,count:r.length,requests:r.map(i=>({id:i.id,name:i.name,durationMs:i.durationMs}))}}};cp=S([hk({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:my.string().describe("UI origin node id (e.g. the user-action event id)."),depth:my.number().int().positive().max(12).default(8)}})],cp);var vk=cp,fy=class{static{s(this,"uy")}static{o(this,"GraphApp")}};fy=S([PC({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[qC,VC],tools:[HC,ek,nk,ok,ck,fk,vk]})],fy);var $u="graph://patterns",Bu="graph://performance/event-loop-lag",pp=2e3,hy=8*1024*1024,yk=100,gy=100;function vy(e){let t=Je(e.thresholds),r=(e.now??(()=>Date.now()))(),i={events:[]},u=[],n=0,a=0,l=0,d=new Set,c=[],p=new Map,h,m=new Map,f=o(j=>{switch(j.kind){case"n+1-query":return`n+1:${String(j.details.signature??"")}`;case"render-storm":return`storm:${String(j.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${j.evidence[0]??""}`;default:return`${j.kind}:${j.evidence.join(",")}`}},"patternKey"),g=o(j=>{p.set($u,j),e.resources.markDirty($u)},"markPatterns"),E=o((j,F)=>{let D=f(j);if(m.delete(D),m.set(D,j),m.size>yk){let B=m.keys().next().value;B!==void 0&&m.delete(B)}g(F)},"pushPattern"),b=o(j=>{let F=!1;for(let[D,B]of m){if(B.evidence.length===0)continue;let x=B.evidence.filter(N=>d.has(N));if(x.length===0){m.delete(D),F=!0;continue}x.length!==B.evidence.length&&(B.evidence=x,F=!0)}F&&g(j)},"dropUnevidencedPatterns"),$=o(j=>{h=j.timestamp;let F=Ni(j);i.events.push(j),u.push(F),n+=F,d.add(j.id);let D=Math.max(0,i.events.length-pp),B=n;for(let O=0;O<D;O+=1)B-=u[O]??0;let x=0;for(;B>hy&&D<u.length;)B-=u[D]??0,D+=1,x+=1;if(D>0){let O=i.events.splice(0,D);u.splice(0,D),n=Math.max(0,B),a+=O.length,l+=x;for(let K of O)d.delete(K.id);b(j.timestamp)}let N=j.raw??null;if(N?.kind==="loop")for(let O of rd(i.events,{threshold:t.dbInLoop}))E(O,j.timestamp);if(N?.kind==="db-query")for(let O of j1(i.events,{threshold:t.nPlusOne}))E(O,j.timestamp);if(j.source==="react"&&N?.kind==="render")for(let O of z1(i.events,{threshold:t.renderStorm}))E(O,j.timestamp);j.source==="perf"&&N?.kind==="event-loop-lag"&&typeof N.lagMs=="number"&&(c.push({at:j.timestamp,lagMs:N.lagMs,source:j.source}),c.length>gy&&c.splice(0,c.length-gy),p.set(Bu,j.timestamp),e.resources.markDirty(Bu))},"handler"),A=e.bus.subscribe($);np(i);let _=o(j=>new Date(p.get(j)??r).toISOString(),"stamp");return e.resources.register($u,()=>({schemaVersion:1,revision:e.resources.revision($u)??0,updatedAt:_($u),patterns:[...m.values()],eventsBuffered:i.events.length,eventBufferCapacity:pp,lastEventAt:h,producer:h===void 0?"none":"connected"})),e.resources.register(Bu,()=>({schemaVersion:1,revision:e.resources.revision(Bu)??0,updatedAt:_(Bu),samples:c.slice(),maxLagMs:c.reduce((j,F)=>Math.max(j,F.lagMs),0),lastEventAt:h})),{unsubscribe:o(()=>{np(void 0),A()},"unsubscribe"),uris:[$u,Bu],retentionStats:o(()=>({residentEvents:i.events.length,residentBytes:n,evictedEvents:a,evictedForBytes:l,eventCap:pp,byteCap:hy}),"retentionStats")}}s(vy,"dy"),o(vy,"installGraphReducer");import{App as Ek}from"@frontmcp/sdk";import{Resource as bk,ResourceContext as Dk}from"@frontmcp/sdk";var mp=class extends Dk{static{s(this,"py")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(q).read("memory://current")}};mp=S([bk({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],mp);var wk=mp;import{Resource as $k,ResourceContext as Bk}from"@frontmcp/sdk";var fp=class extends Bk{static{s(this,"my")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(q).read("memory://owners")}};fp=S([$k({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],fp);var xk=fp;import{Resource as Ck,ResourceContext as kk}from"@frontmcp/sdk";var hp=class extends kk{static{s(this,"gy")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(q).read("memory://owners/growing")}};hp=S([Ck({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],hp);var Ak=hp;import{Resource as Ik,ResourceContext as _k}from"@frontmcp/sdk";var gp=class extends _k{static{s(this,"yy")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(q).read("memory://leaks/suspected")}};gp=S([Ik({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],gp);var Sk=gp;import{Tool as Fk,ToolContext as jk,z as zk}from"@frontmcp/sdk";var yy;function vp(e){yy=e}s(vp,"Ra"),o(vp,"setActiveMemoryLookups");function Ss(){return yy}s(Ss,"er"),o(Ss,"activeMemoryLookups");var yp=class extends jk{static{s(this,"wy")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=Ss();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};yp=S([Fk({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:zk.string().describe("Flow id.")}})],yp);var Nk=yp;import{Tool as Ok,ToolContext as Rk,z as Tk}from"@frontmcp/sdk";var Ep=class extends Rk{static{s(this,"$y")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=Ss();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};Ep=S([Ok({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:Tk.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],Ep);var Mk=Ep;import{Tool as Pk,ToolContext as Uk,z as Zk}from"@frontmcp/sdk";var bp=class extends Uk{static{s(this,"ky")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=Ss();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let i,u;if(r.kind==="retention"){let n=r.detail;i=`Owner ${n.ownerId} grew by ${n.growth} items during flow ${n.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let n=r.detail;i=`Disposed singleton ${n.logicalId} (generation ${n.generation}) still retains ${n.retainedBytes} bytes \u2014 a stale generation kept alive after HMR/reload.`,u="Ensure listeners/timers registered by the old instance are removed in the dispose hook (OnModuleDestroy / cleanup), so the previous generation can be garbage-collected."}return{found:!0,leak:r,narrative:i,recommendation:u}}};bp=S([Pk({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner, which flow, what grew, and a remediation hint.",inputSchema:{leakIndex:Zk.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],bp);var qk=bp,Ey=class{static{s(this,"Iy")}static{o(this,"MemoryApp")}};Ey=S([Ek({id:"memory",name:"Memory",description:"Container-owner growth tracking + suspect-leak / stale-generation detection. Hosts memory.explain_leak.",resources:[wk,xk,Ak,Sk],tools:[Nk,Mk,qk]})],Ey);var Xr="memory://current",Yr="memory://owners",Qr="memory://owners/growing",Ut="memory://leaks/suspected",Lk=200,by=50,Jk=500;function Dy(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},i=o((E,b)=>{r.changedAt.set(E,b),e.resources.markDirty(E)},"touch"),u=o((E,b)=>{if(r.leaks.delete(E),r.leaks.set(E,b),r.leaks.size>Lk){let $=r.leaks.keys().next().value;$!==void 0&&r.leaks.delete($)}},"pushLeak"),n=new Map,a=o((E,b)=>{E!==b&&(n.delete(E),n.set(E,b),n.size>5e3&&n.delete(n.keys().next().value))},"noteRequestFlow"),l=o((E,b)=>{if(E.flowIds.add(b),E.flowIds.size>by){for(let $ of E.flowIds)if(E.flowIds.delete($),E.flowIds.size<=by)break}},"noteFlow"),d=o((E,b,$)=>{let A=r.owners.get(E);if(A||(A={ownerId:E,itemCount:b,estimatedBytes:0,startCount:b,mutations:0,flowIds:new Set,lastMutatedAt:$}),r.owners.delete(E),r.owners.set(E,A),r.owners.size>Jk){let _=r.owners.keys().next().value;_!==void 0&&_!==E&&r.owners.delete(_)}return A},"ensure"),c=o((E,b)=>{let $=!1;for(let[A,_]of r.leaks){if(_.kind!=="retention"||_.ownerId!==E)continue;let j=_.detail.startCount;typeof j=="number"&&b<=j&&(r.leaks.delete(A),$=!0)}return $},"retractReleasedRetentions"),p=o(E=>{if(E.source!=="memory"&&E.source!=="perf")return;let b=E.raw??null;if(b?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,E.timestamp),b.kind){case"memory-mutation":{if(!b.mutation)return;let $=b.mutation,A=d($.ownerNodeId,$.beforeCount??$.afterCount,E.timestamp);A.itemCount=$.afterCount,A.estimatedBytes=$.afterCount*64,A.mutations+=1,A.lastMutatedAt=E.timestamp,E.context.flowId&&l(A,E.context.flowId),E.context.requestId&&E.context.flowId&&a(E.context.requestId,E.context.flowId),i(Yr,E.timestamp),i(Qr,E.timestamp),c($.ownerNodeId,$.afterCount)&&i(Ut,E.timestamp);return}case"memory-retention":{if(!b.retention)return;let $=b.retention,A=$.requestId?$.flowId:n.get($.flowId)??$.flowId;u(`retention:${$.ownerId}:${A}`,{kind:"retention",ownerId:$.ownerId,flowId:A,detail:{...$,flowId:A},at:E.timestamp}),i(Ut,E.timestamp);return}case"singleton-stale-generation":{if(!b.staleGeneration)return;let $=b.staleGeneration;u(`stale:${$.logicalId}:${$.generation}`,{kind:"stale-generation",logicalId:$.logicalId,detail:{...$},at:E.timestamp}),i(Ut,E.timestamp);return}case"process-memory":{if(!b.memory)return;r.current={...b.role?{role:b.role}:{},heapUsed:b.memory.heapUsed,heapTotal:b.memory.heapTotal,rss:b.memory.rss,external:b.memory.external,arrayBuffers:b.memory.arrayBuffers,at:E.timestamp},i(Xr,E.timestamp);return}default:return}},"handler"),h=e.bus.subscribe(p),m=o(E=>new Date(r.changedAt.get(E)??t).toISOString(),"stamp"),f=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(Xr,()=>({schemaVersion:1,revision:e.resources.revision(Xr)??0,updatedAt:m(Xr),current:r.current??null})),e.resources.register(Yr,()=>({schemaVersion:1,revision:e.resources.revision(Yr)??0,updatedAt:m(Yr),owners:[...r.owners.values()].map(Dp),...f()})),e.resources.register(Qr,()=>({schemaVersion:1,revision:e.resources.revision(Qr)??0,updatedAt:m(Qr),owners:[...r.owners.values()].map(Dp).filter(E=>E.growthSinceStart>0).sort((E,b)=>b.growthSinceStart-E.growthSinceStart).slice(0,20),...f()})),e.resources.register(Ut,()=>({schemaVersion:1,revision:e.resources.revision(Ut)??0,updatedAt:m(Ut),suspected:[...r.leaks.values()],...f()}));let g={ownersMutatedByFlow(E){return[...r.owners.values()].filter(b=>b.flowIds.has(E))},growthByFlow(E){return[...r.owners.values()].filter(b=>b.flowIds.has(E)).map(b=>({ownerId:b.ownerId,growth:b.itemCount-b.startCount}))},flowsThatMutatedOwner(E){let b=r.owners.get(E);return b?[...b.flowIds]:[]},getLeak(E){return[...r.leaks.values()][E]},allLeaks(){return[...r.leaks.values()]}};return vp(g),{unsubscribe:o(()=>{vp(void 0),h()},"unsubscribe"),uris:[Xr,Yr,Qr,Ut],lookups:g}}s(Dy,"Ry"),o(Dy,"installMemoryReducer");function Dp(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(Dp,"c_"),o(Dp,"toOwnerView");function wy(){let{session:e,providers:t}=q1(),r=X1(),i=Y1();for(let E of i.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${E}`);Q3({bus:e.bus,resources:e.resources}),u6({bus:e.bus,resources:e.resources}),i6({bus:e.bus,resources:e.resources}),o6({bus:e.bus,resources:e.resources}),m6({bus:e.bus,resources:e.resources}),b6({bus:e.bus,resources:e.resources}),w6({bus:e.bus,resources:e.resources}),B6({bus:e.bus,resources:e.resources}),k6({bus:e.bus,resources:e.resources,thresholds:r}),F6({bus:e.bus,resources:e.resources,thresholds:r}),O6({bus:e.bus,resources:e.resources,thresholds:r}),q6({bus:e.bus,resources:e.resources,thresholds:r}),ey({bus:e.bus,resources:e.resources}),ny({bus:e.bus,resources:e.resources,thresholds:r}),ly({bus:e.bus,resources:e.resources});let u=Z3({bus:e.bus,resources:e.resources,flows:i});e.registerReducerRetention("flow",u.retentionStats),L3({resources:e.resources});let n=vy({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",n.retentionStats),Dy({bus:e.bus,resources:e.resources}),k3({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,c=o(()=>{let E=process.memoryUsage(),b=Date.now(),$=E.rss>=l;$&&b-d>=5*6e4&&(d=b,console.warn(`[lensmcp] high process memory: rss=${Math.round(E.rss/1024/1024)}MB heap=${Math.round(E.heapUsed/1024/1024)}MB`)),e.bus.publish({id:tt(),sessionId:e.id,timestamp:b,source:"perf",category:"runtime",severity:$?"warning":"info",context:{sessionId:e.id},fingerprint:hm({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:E.rss,heapUsed:E.heapUsed,heapTotal:E.heapTotal,external:E.external,arrayBuffers:E.arrayBuffers}}})},"publishProcessMemory");c();let p=setInterval(c,a);p.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(p),"stop")});let h=1200,m=new Map,f=e.bus.subscribe(E=>{let b=E.context.flowId;if(!b)return;let $=m.get(b);$&&clearTimeout($);let A=setTimeout(()=>{m.delete(b);try{let _=Ve()?.getFlowEvents(b);if(!_||_.length===0)return;let j=qs(_,{flowId:b});j&&Md(j)}catch{}},h);A.unref?.(),m.set(b,A)});e.onShutdown({name:"story-autocompile",stop:o(()=>{f();for(let E of m.values())clearTimeout(E);m.clear()},"stop")});let g=K1({bus:e.bus,sessionId:e.id,onError:o(E=>console.error("[lensmcp] ingest error:",E),"onError")});return g.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${g.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>g.stop(),"stop")}),{session:e,providers:t,ingest:g,flows:i}}s(wy,"u_"),o(wy,"createLensSession");var Vk=new Set(["localhost","127.0.0.1","lensmcp.local"]);function $y(e){if(!e)return!1;let t=e.trim().toLowerCase();if(t.startsWith("[")){let r=t.indexOf("]");return r!==-1&&t.slice(1,r)==="::1"}return t.indexOf(":")===t.lastIndexOf(":")&&(t=t.split(":")[0]??""),Vk.has(t)}s($y,"qO"),o($y,"hostHeaderIsLocal");function By(e,t){if(!e||$y(t))return{ok:!0};let r=(t??"").replace(/[^\x20-\x7e]/g,"?").slice(0,80);return{ok:!1,status:403,error:"this dashboard answers only requests addressed to this machine (localhost, 127.0.0.1, [::1] or lensmcp.local)"+(r?`; this one was addressed to "${r}"`:"")}}s(By,"l_"),o(By,"dashboardHostVerdict");import{randomBytes as Wk,timingSafeEqual as Gk}from"node:crypto";import{chmodSync as Kk,mkdirSync as Hk,readFileSync as Xk,writeFileSync as Yk}from"node:fs";import{dirname as Qk,join as e7}from"node:path";var wp="__lensmcp_token";function $p(e){return e7(e,".lensmcp","dashboard-token")}s($p,"Ey"),o($p,"dashboardTokenPath");function xy(e,t,r,i={}){if(r)return{source:"loopback"};if(e.LENSMCP_ALLOW_INSECURE==="1")return{source:"disabled"};let u=e.LENSMCP_DASHBOARD_TOKEN?.trim();if(u)return{token:u,source:"env"};let n=i.read??(p=>Xk(p,"utf8")),a=i.write??((p,h)=>Yk(p,h,{mode:384})),l=i.ensureDir??(p=>{Hk(p,{recursive:!0,mode:448})}),d=i.chmod??((p,h)=>Kk(p,h)),c=$p(t);try{let p=n(c).trim();if(p){try{d(c,384)}catch{}return{token:p,source:"file"}}}catch{}try{l(Qk(c));let p=Wk(32).toString("hex");a(c,`${p}
|
|
72
|
-
`)
|
|
73
|
-
|
|
74
|
-
`).map(n=>n.trim()).filter(n=>n&&!n.startsWith("#")).map(n=>n.split(/\s+/)),i=o((n,a)=>r.some(l=>l[0]===n&&l.slice(1).includes(a)),"has"),u=[];for(let n of e)n.host&&!n.host.includes("*")&&(u.push(n.host),n.service&&n.internalHost!==!1&&u.push(typeof n.internalHost=="string"?n.internalHost:`internal.${n.host}`));return[...new Set(u)].map(n=>({host:n,v4:i("127.0.0.1",n),v6:i("::1",n)}))}serviceKeyView(){let e;try{e=JSON.parse(Fs(`${this.opts.root}/${l7}`,"utf8"))}catch{return{}}let t={};for(let[r,i]of Object.entries(e))typeof i!="string"||i===""||(t[r]={fingerprint:s7("sha256").update(i).digest("hex").slice(0,12)});return t}liveDecls(){let e=this.discoverDecls();for(let t of e)t.service&&(t.podNames=this.podNames(t.service));return e}legacyView(){let e=this.liveDecls();return{at:Date.now(),gateway:this.gateway,decls:e,hostsSetup:this.hostsSetup(e),trustCommand:this.trustCommand(),serviceKeys:this.serviceKeyView(),services:[...this.services.values()].sort((t,r)=>t.project.localeCompare(r.project)),edges:[...this.edges.values()].sort((t,r)=>r.lastSeenAt-t.lastSeenAt),dataNodes:[...this.dataNodes.values()].sort((t,r)=>r.count-t.count).slice(0,24),recent:this.recent.slice(-20).reverse()}}gatewayLiveness(e=Date.now()){let t=this.opts.env??process.env,r=(t.LENSMCP_GATEWAY_PORTS??"").split(",").map(d=>Number(d.trim())).filter(d=>Number.isInteger(d)&&d>0),i=this.gateway?.ports??[],u=r.length?r:i,n=Number(t.LENSMCP_PARENT_PID??0);if(n>0)return xp(n)?{state:"live",role:"gateway-child",ports:u,since:this.gateway?.at,evidence:`served by the gateway process (pid ${n})`}:{state:"down",role:"gateway-child",ports:u,evidence:`the gateway that started this dashboard (pid ${n}) is gone`};if(i.length>0)return{state:"live",role:"standalone",ports:u,since:this.gateway?.at,evidence:"gateway-up event on this workspace\u2019s bus"};let a=this.registeredGateway(e);if(a)return{state:"live",role:"standalone",ports:u,evidence:`registered with the gateway daemon (pid ${a})`};let l=this.gateway?.aliveAt??0;return l>e-3e4?{state:"live",role:"standalone",ports:u,since:l,evidence:`gateway traffic ${Math.round((e-l)/1e3)}s ago`}:this.gateway?{state:"down",role:"standalone",ports:u,evidence:"no gateway traffic in the last 30s"}:{state:"unknown",role:"standalone",ports:u,evidence:"no gateway events seen \u2014 is this dashboard running without the gateway?"}}registeredGateway(e){if(e-this.registryCache.at<15e3)return this.registryCache.pid;let t;try{let r=`${(this.opts.env??process.env).LENSMCP_HOME||a7()}/.lensmcp/workspaces.json`,i=JSON.parse(Fs(r,"utf8")),u=Array.isArray(i)?i.find(n=>n.root===this.opts.root):void 0;u&&typeof u.pid=="number"&&u.pid>0&&xp(u.pid)&&(!u.procStamp||jy(u.pid)===u.procStamp)&&(t=u.pid)}catch{}return this.registryCache={at:e,...t?{pid:t}:{}},t}view(e){let t=e.now??Date.now(),r=this.liveDecls(),i=this.hostsSetup(r),u=this.serviceKeyView(),n=new Map((e.processCluster?.services??[]).map(f=>[f.project,f])),a=new Map;for(let f of e.processCluster?.errors??[]){if(!f.project||!f.line)continue;let g=a.get(f.project)??[];g.push(f.line),a.set(f.project,g.slice(-6))}let l=[...this.edges.values()].filter(f=>!f.caller),d=r.map(f=>{let g=f.service?f.eager?"eager":"lazy":"web",E=this.services.get(f.project),b=n.get(f.project),$=(e.processCluster?.errors??[]).filter(K=>K.project===f.project&&K.fault!=="types"),A=b?.buildFailed===!0&&$.length>0&&$.every(K=>K.fault==="process"),{state:_,reason:j}=zy(g,E,b,f.podNames.length,A),F=l.filter(K=>K.project===f.project),D=F.reduce((K,Q)=>K+Q.count,0),B=F.reduce((K,Q)=>K+Q.errors,0),x=F.slice().sort((K,Q)=>Q.lastSeenAt-K.lastSeenAt)[0],N=e.kpis?.projectStats(f.project,t),O=f.service&&f.internalHost!==!1&&f.host?typeof f.internalHost=="string"?f.internalHost:`internal.${f.host}`:void 0;return{project:f.project,kind:g,state:_,...j?{stateReason:j}:{},...f.host?{host:f.host}:{},...f.path?{path:f.path}:{},...O?{internalHost:O}:{},...f.port!==void 0?{port:f.port}:{},...f.internalPort!==void 0?{internalPort:f.internalPort}:{},pods:{running:f.podNames.length,names:f.podNames,...f.minPods!==void 0?{min:f.minPods}:{},...f.maxPods!==void 0?{max:f.maxPods}:{}},workers:f.workers??[],...E?.lastColdStartMs!==void 0?{lastColdStartMs:E.lastColdStartMs}:{},restarts:b?.restarts??0,buildFailed:(b?.buildFailed??!1)&&!A,processError:A,typeErrors:b?.typeErrors??!1,errorLines:a.get(f.project)??[],...f.auth?{auth:{...f.auth.default?{default:f.auth.default}:{},overrides:f.auth.overrides?.length??0}}:{},traffic:{count:D,errors:B,avgMs:x?x.avgMs:null,...x?{lastSeenAt:x.lastSeenAt}:{}},...N?{window:N}:{},...u[f.project]?{keyFingerprint:u[f.project].fingerprint}:{},...E?{lastEvent:{at:E.lastEventAt,title:E.lastEvent}}:b?.lastTitle?{lastEvent:{at:b.lastSeenAt??0,title:b.lastTitle}}:{}}}).sort((f,g)=>Fy[f.kind]-Fy[g.kind]||f.project.localeCompare(g.project)),c=l.map(f=>({host:f.host,project:f.project,count:f.count,errors:f.errors,avgMs:f.avgMs,lastSeenAt:f.lastSeenAt})).sort((f,g)=>g.count-f.count);for(let f of r)f.host&&!c.some(g=>g.host===f.host&&g.project===f.project)&&c.push({host:f.host,project:f.project,count:0,errors:0,avgMs:null});let p=[...this.edges.values()].filter(f=>!!f.caller).map(f=>({caller:f.caller,callee:f.project,host:f.host,count:f.count,errors:f.errors,avgMs:f.avgMs,lastSeenAt:f.lastSeenAt})).sort((f,g)=>g.count-f.count),h=[...this.dataNodes.values()].filter(f=>f.kind!=="memory").map(f=>({id:f.id,kind:f.kind,name:f.name,usedBy:f.usedBy??(f.viaProject&&f.viaProject!=="unknown"?[f.viaProject]:[]),ops:f.count,lastSeenAt:f.lastSeenAt,...f.kind==="queue"&&(f.counts||f.recent)?{queue:{counts:f.counts??{},recent:(f.recent??[]).slice(0,8).map(g=>({id:String(g.id??""),...typeof g.name=="string"?{name:g.name}:{},...typeof g.state=="string"?{state:g.state}:typeof g.status=="string"?{state:g.status}:{},...typeof g.finishedOn=="number"?{at:g.finishedOn}:typeof g.timestamp=="number"?{at:g.timestamp}:{}}))}}:{}})).sort((f,g)=>g.ops-f.ops).slice(0,24),m=i.filter(f=>!f.v4||!f.v6);return{at:t,gateway:this.gatewayLiveness(t),services:d,routes:c,edges:p,backends:h,hosts:i,...m.length?{hostsFix:Ny(m)}:{},trustCommand:this.trustCommand(),recent:this.recent.slice(-20).reverse()}}},Fy={web:0,eager:1,lazy:2},l7="node_modules/.cache/davnx-webpack/service-keys.json";function jy(e){if(process.platform==="win32")return"";try{return i7("ps",["-p",String(e),"-o","lstart="],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}s(jy,"aN"),o(jy,"processStamp");function xp(e){if(process.ppid===e)return!0;try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(xp,"b_"),o(xp,"pidAlive");function zy(e,t,r,i,u=!1){let n=r?.state;if(n==="crash-looping")return{state:"crash-looping",reason:"keeps exiting right after start"};if(n==="wedged")return{state:"wedged",reason:"running but not answering"};let a=n==="up"||t?.state==="up";return r?.buildFailed&&!a?{state:"down",reason:`${u?"a process error":"build failed"} \u2014 see the error lines`}:a?r?.buildFailed?{state:"up",reason:u?"reported a process error \u2014 see the error lines":"serving its last good build \u2014 the current build failed"}:{state:"up"}:n==="starting"||t?.state==="starting"?{state:"starting",reason:e==="lazy"?"cold start in progress":"starting"}:!n&&!t&&i>0?{state:"up",reason:`${i} pod socket${i===1?"":"s"} live`}:n==="idle"||t?.idle||e==="lazy"&&(n==="down"||t?.state==="down"||!t)?{state:"idle",reason:"scaled to zero \u2014 starts on the next request"}:n==="down"||t?.state==="down"?{state:"down",reason:"not running"}:{state:"unknown",reason:"no lifecycle events seen yet"}}s(zy,"cN"),o(zy,"serviceState");function Ny(e){let t=e.filter(i=>!i.v4).map(i=>i.host),r=e.filter(i=>!i.v6).map(i=>i.host);return`printf '${[...t.length?[`127.0.0.1 ${t.join(" ")}`]:[],...r.length?[`::1 ${r.join(" ")}`]:[]].join("\\n")}\\n' | sudo tee -a /etc/hosts`}s(Ny,"uN"),o(Ny,"hostsFixCommand");var d7=class{static{s(this,"Aa")}static{o(this,"LogRing")}constructor(e=5e3){this.cap=e,this.lines=[],this.seqN=0,this.sourceSet=new Set}get seq(){return this.seqN}get size(){return this.lines.length}sources(){return[...this.sourceSet].sort()}append(e){let t=Oy(e,++this.seqN);return this.sourceSet.add(t.source),this.lines.push(t),this.lines.length>this.cap+Math.ceil(this.cap/10)&&this.lines.splice(0,this.lines.length-this.cap),t}since(e,t=this.cap){let r=this.indexAfter(e),i=this.lines.slice(r);return i.length>t?i.slice(i.length-t):i}recent(e){return this.lines.slice(Math.max(0,this.lines.length-e))}query(e){let t=e.limit??2e3,r=e.q?.toLowerCase(),i=e.since&&e.since>0?this.lines.slice(this.indexAfter(e.since)):this.lines,u=[];for(let n=i.length-1;n>=0&&u.length<t;n--){let a=i[n];e.flowId&&a.flowId!==e.flowId||e.from!==void 0&&a.at<e.from||e.to!==void 0&&a.at>e.to||r&&!`${a.title} ${a.message??""} ${a.source}`.toLowerCase().includes(r)||u.push(a)}return u.reverse()}indexAfter(e){let t=0,r=this.lines.length;for(;t<r;){let i=t+r>>>1;this.lines[i].seq<=e?t=i+1:r=i}return t}};function Oy(e,t){let r=e.raw??{},i=e.context??{},u=typeof r.project=="string"&&r.project?r.project:e.source,n=typeof i.flowId=="string"?i.flowId:typeof i.traceId=="string"?i.traceId:void 0;return{seq:t,at:e.timestamp,source:u,category:e.category,severity:e.severity,title:e.title,...e.message?{message:e.message}:{},...n?{flowId:n}:{}}}s(Oy,"lN"),o(Oy,"logLineOf");var Ry=class{static{s(this,"Ro")}static{o(this,"SeenIds")}constructor(e=5e4){this.cap=e,this.set=new Set,this.order=[]}firstTime(e){if(!e)return!0;if(this.set.has(e))return!1;if(this.set.add(e),this.order.push(e),this.order.length>this.cap)for(let t of this.order.splice(0,this.order.length-this.cap))this.set.delete(t);return!0}},Ty=class{static{s(this,"za")}static{o(this,"Series")}constructor(e){this.horizonSec=e,this.buckets=new Map}bucket(e){let t=this.buckets.get(e);return t||(t={sec:e,count:0,errors:0,lat:[],latReq:[]},this.buckets.set(e,t)),t}addTraffic(e,t,r){let i=this.bucket(e);i.count+=t,i.errors+=r}addLatency(e,t,r){let i=this.bucket(e),u=r?i.lat:i.latReq;u.length<256&&u.push(t)}prune(e){for(let t of this.buckets.keys())t<=e-this.horizonSec&&this.buckets.delete(t)}range(e,t){let r=[];for(let i of this.buckets.values())i.sec>e&&i.sec<=t&&r.push(i);return r}},c7=class{static{s(this,"ja")}static{o(this,"KpiWindow")}constructor(e={}){this.byProject=new Map,this.windowSec=e.windowSec??300,this.sparkBuckets=e.sparkBuckets??30,this.sparkBucketSec=e.sparkBucketSec??10,this.horizonSec=Math.max(this.windowSec,this.sparkBuckets*this.sparkBucketSec)+5,this.global=new Ty(this.horizonSec)}project(e){let t=this.byProject.get(e);return t||(t=new Ty(this.horizonSec),this.byProject.set(e,t)),t}observe(e){if(e.source!=="gateway")return;let t=e.raw??{},r=t.kind,i=Math.floor(e.timestamp/1e3),u=typeof t.project=="string"?t.project:"",n=typeof t.caller=="string"&&t.caller?t.caller:void 0;if(r==="gateway-traffic"){let a=Cp(t.count),l=Cp(t.errors);if(a===0&&l===0)return;n||this.global.addTraffic(i,a,l),u&&this.project(u).addTraffic(i,a,l);let d=Array.isArray(t.durationsMs)?t.durationsMs:[];for(let c of d){let p=Number(c);!Number.isFinite(p)||p<0||(n||this.global.addLatency(i,p,!0),u&&this.project(u).addLatency(i,p,!0))}}else if(r==="gateway-request"){let a=Number(t.durationMs);if(!Number.isFinite(a)||a<0)return;n||this.global.addLatency(i,a,!1),u&&this.project(u).addLatency(i,a,!1)}}snapshot(e=Date.now()){let t=Math.floor(e/1e3);this.global.prune(t);for(let u of this.byProject.values())u.prune(t);let r=this.global,i=Ip(r,t,this.sparkBuckets,this.sparkBucketSec);return{at:e,windowSec:this.windowSec,req60:Zt(r.range(t-60,t),"count"),last:Ap(r.range(t-this.windowSec,t)),sparkBucketSec:this.sparkBucketSec,spark:i}}projectStats(e,t=Date.now()){let r=this.byProject.get(e);if(!r)return;let i=Math.floor(t/1e3);return r.prune(i),{...Ap(r.range(i-this.windowSec,i)),req60:Zt(r.range(i-60,i),"count"),spark:Ip(r,i,this.sparkBuckets,this.sparkBucketSec).req}}};function Cp(e){let t=Number(e??0);return Number.isFinite(t)&&t>0?t:0}s(Cp,"w_"),o(Cp,"nonNeg");function Zt(e,t){let r=0;for(let i of e)r+=i[t];return r}s(Zt,"nn"),o(Zt,"sum");function kp(e){let t=[];for(let i of e)for(let u of i.lat)t.push(u);if(t.length)return{lat:t.sort((i,u)=>i-u),complete:!0};let r=[];for(let i of e)for(let u of i.latReq)r.push(u);return{lat:r.sort((i,u)=>i-u),complete:!1}}s(kp,"__"),o(kp,"latencies");function Ap(e){let t=Zt(e,"count"),r=Zt(e,"errors"),{lat:i,complete:u}=kp(e),n=i.length?i.reduce((a,l)=>a+l,0)/i.length:null;return{count:t,errors:r,errorRate:t>0?r/t:null,p50:js(i,.5),p95:js(i,.95),avgMs:n===null?null:Math.round(n),samples:i.length,sampled:!u||i.length<t}}s(Ap,"x_"),o(Ap,"statsOf");function js(e,t){if(e.length===0)return null;let r=Math.min(e.length-1,Math.max(0,Math.ceil(t*e.length)-1));return Math.round(e[r])}s(js,"Ay"),o(js,"percentile");function Ip(e,t,r,i){let u=[],n=[],a=[];for(let l=r-1;l>=0;l--){let d=t-l*i,c=e.range(d-i,d);u.push(Zt(c,"count")),n.push(Zt(c,"errors")),a.push(js(kp(c).lat,.95))}return{req:u,errors:n,p95:a}}s(Ip,"$_"),o(Ip,"sparkOf");var p7=class{static{s(this,"Oa")}static{o(this,"FlowIndex")}constructor(e={flows:2e3,events:5e4},t=dt){this.caps=e,this.config=t,this.revs=new Map,this.pending=new Set,this.eventFlow=new Map,this.cache=new Map,this.evidenceCache=new Map}observe(e){let t=_p(e);if(!t)return;let r=(this.revs.get(t)??0)+1;this.revs.delete(t),this.revs.set(t,r),this.revs.size>this.caps.flows&&this.revs.delete(this.revs.keys().next().value),this.pending.add(t),e.id&&(this.eventFlow.set(e.id,t),this.eventFlow.size>this.caps.events&&this.eventFlow.delete(this.eventFlow.keys().next().value))}rev(e){return this.revs.get(e)??0}drainRevs(){let e=[...this.pending].map(t=>({flowId:t,rev:this.rev(t)}));return this.pending.clear(),e}flowOfEvent(e){return this.eventFlow.get(e)}summaries(e,t=50){if(!e)return[];let r=[];for(let u of e.recentFlowIds().slice(0,t)){let n=this.rev(u),a=this.cache.get(u);if(a&&a.rev===n&&n>0){r.push(a.summary);continue}let l=e.getFlowSummary(u);if(!l)continue;let d=e.getFlowEvents(u)??[],c=e.analyzeFlow?.(u)??(d.length?zi(d,this.config):void 0),p=Jy(l,d,n,c);this.cache.set(u,{rev:n,summary:p}),r.push(p)}let i=new Set(r.map(u=>u.flowId));for(let u of this.cache.keys())i.has(u)||this.cache.delete(u);return r.sort((u,n)=>n.lastSeenAt-u.lastSeenAt)}evidence(e,t=50){let r=[];if(e){for(let i of e.recentFlowIds().slice(0,t)){let u=this.rev(i),n=this.evidenceCache.get(i);if(n&&n.rev===u&&u>0){r.push(...n.samples);continue}let a=My(i,e.getFlowEvents(i)??[]);this.evidenceCache.set(i,{rev:u,samples:a}),r.push(...a)}if(this.evidenceCache.size>t*2){let i=new Set(e.recentFlowIds().slice(0,t));for(let u of this.evidenceCache.keys())i.has(u)||this.evidenceCache.delete(u)}}return new m7(r)}findByRoute(e,t,r){let i=zs(r);return e.find(u=>u.request&&u.request.method===t&&i.test(u.request.path))?.flowId}};function My(e,t){let r=[],i=new Map;for(let n of t){let a=n.raw??{};if(a.kind==="server-request"&&n.id){let l=a.request??{},d=Uy(n)??(typeof l.requestId=="string"?l.requestId:void 0);if(!d)continue;let c=typeof l.endedAt=="number"?l.endedAt:Py(n),p=typeof l.startedAt=="number"?l.startedAt:c-(typeof l.durationMs=="number"?l.durationMs:0);i.set(d,[...i.get(d)??[],{id:n.id,start:p,end:c}])}}let u=o((n,a)=>{let l=n?i.get(n):void 0;if(l?.length)return l.length===1?l[0].id:l.filter(d=>d.start-5<=a&&a<=d.end+5).sort((d,c)=>c.start-d.start)[0]?.id},"handlerAt");for(let n of t){if(!n.id)continue;let a=n.raw??{},l=Py(n),d=o(p=>typeof p=="number"&&Number.isFinite(p)?p:0,"num"),c=a.kind;if(c==="server-request"){let p=a.request??{};if(typeof p.route!="string")continue;r.push({key:`route:${String(p.method??"GET")} ${p.route}`,flowId:e,eventId:n.id,ms:d(p.durationMs),at:l,failed:d(p.status)>=500})}else if(c==="db-query"&&typeof a.project=="string"){let p=`${String(a.op??"query")} ${String(a.table??"")}`.trim(),h=n.title.replace(/\s*\(.*$/,"").trim();for(let m of new Set([p,h]))r.push({key:`sql:${a.project}:${m}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:n.severity==="error"})}else if(c==="egress"&&typeof a.project=="string"&&typeof a.host=="string"){let p=typeof a.error=="string"||d(a.status)>=500||n.severity==="error";r.push({key:`egress:${a.project}:${a.host}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:p})}else if(c==="memory-mutation"){let p=(a.mutation??{}).ownerNodeId;if(typeof p!="string")continue;r.push({key:`mem:${p}`,flowId:e,eventId:u(Uy(n),l)??n.id,ms:0,at:l,failed:!1})}}return r}s(My,"dN"),o(My,"evidenceSamples");var Py=o(e=>typeof e.timestamp=="number"?e.timestamp:Date.parse(String(e.timestamp))||0,"tsOf"),Uy=o(e=>{let t=e.context??{};return typeof t.requestId=="string"&&t.requestId?t.requestId:void 0},"requestIdOf"),m7=class{static{s(this,"zy")}static{o(this,"EvidenceLookup")}constructor(e){this.samples=e}find(e,t,r={}){let i;for(let u of this.samples)!e(u.key)||r.inFlow!==void 0&&u.flowId!==r.inFlow||t==="failing"&&!u.failed||r.minMs!==void 0&&u.ms<r.minMs||(i?(t==="slowest"?u.ms>i.ms||u.ms===i.ms&&u.at>i.at:u.at>i.at)&&(i=u):i=u);return i?{flowId:i.flowId,nodeId:i.eventId}:void 0}};function _p(e){let t=e.context??{};return typeof t.flowId=="string"&&t.flowId?t.flowId:void 0}s(_p,"jy"),o(_p,"flowIdOf");function zs(e){let t=e.split("/").map(r=>r.startsWith(":")?"[^/?#]+":r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("/");return new RegExp(`^${t}(?:[?#].*)?$`)}s(zs,"Na"),o(zs,"routeRegex");var f7=new Set(["memory-mutation","memory-retention","singleton-instance","subscription-added","subscription-removed","store-created","hook-run"]),h7={"user-click":"click","user-input":"input","input-change":"input",keyboard:"key press","route-load":"navigate","page-load":"page load","form-submit":"submit",effect:"effect",timer:"timer","websocket-message":"socket message","backend-response":"response","hmr-update":"hot reload","ai-turn":"AI turn"};function Zy(e){return e?h7[e]??e.replace(/-/g," "):"request"}s(Zy,"mN"),o(Zy,"originLabelOf");function qy(e){if(!e)return;if(e.startsWith("page:"))return e.slice(5)||"/";let t=/([^/:]+\.[cm]?[jt]sx?):(\d+)/.exec(e);if(t)return`${t[1]}:${t[2]}`;let r=e.replace(/^[a-z]+:/,"");return r.length>40?"\u2026"+r.slice(-39):r}s(qy,"hN"),o(qy,"originWhereOf");function Ly(e){let t=_i.indexOf(e);return t===-1?_i.length:t}s(Ly,"gN"),o(Ly,"categoryRankOf");function Jy(e,t,r,i){let u={},n=new Set,a="ok",l,d=1/0,c,p=1/0,h=1/0,m=-1/0,f=new Set,g=0,E=0,b,$=o(N=>{(N==="error"||N==="warn"&&a==="ok")&&(a=N)},"bump");for(let N of t){let O=N.raw??{},K=N.context??{},Q=typeof O.kind=="string"?O.kind:void 0,Dt=Gl({source:N.source,category:N.category,title:N.title,kind:Q});u[Dt]=(u[Dt]??0)+1;let We=typeof O.project=="string"?O.project:typeof K.projectName=="string"?K.projectName:void 0;We&&N.source!=="gateway"&&n.add(We),N.severity==="error"||N.severity==="fatal"?($("error"),E++,(!b||N.timestamp<b.at)&&(b={at:N.timestamp,title:N.title})):N.severity==="warning"&&$("warn");let Me=Number(O.status??O.request?.status);if(Number.isFinite(Me)&&(Me>=500?$("error"):Me>=400&&$("warn")),(Q==="fetch-start"||Q==="fetch-done"||Q==="fetch-error")&&typeof O.url=="string"){let ze=Number(O.startedAt??N.timestamp);(ze<d||ze===d&&l&&l.status===void 0)&&(d=ze,l={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:l?.status!==void 0?{status:l.status}:{}})}if(f.size<80)if(Q==="gateway-request"&&typeof O.url=="string")f.add(`${String(O.method??"GET")} ${Sp(O.url)}`);else if(Q==="server-request"){let ze=O.request??{};typeof ze.route=="string"&&f.add(`${String(ze.method??"GET")} ${ze.route}`)}else Q==="db-query"&&We?f.add(`sql:${We}:${N.title.replace(/\s*\(.*$/,"")}`):Q==="egress"&&We&&typeof O.host=="string"&&f.add(`egress:${We}:${O.host}`);if(Q==="gateway-request"&&!O.caller&&N.source==="gateway"&&g++,Q==="gateway-request"&&!O.caller&&typeof O.url=="string"&&N.timestamp<p&&(p=N.timestamp,c={method:String(O.method??"GET"),path:O.url,...Number.isFinite(Me)?{status:Me}:{}}),Q&&f7.has(Q))continue;let wt=Number(O.durationMs??O.request?.durationMs??0),et=Number(O.startedAt),Iu=Number.isFinite(et)&&et>0?et:N.timestamp-(Number.isFinite(wt)?wt:0),$t=Number.isFinite(et)&&et>0&&Number.isFinite(wt)?et+wt:N.timestamp;Iu<h&&(h=Iu),$t>m&&(m=$t)}!l&&c&&(l=c);let A=Zy(e.originType),_=qy(e.originNodeId),j=l?`${l.method} ${Sp(l.path)}`:void 0,F=e.headline&&e.headline!==e.originType?e.headline:void 0,D=!e.originType&&g>1?` +${g-1} more request${g===2?"":"s"}`:"",B=e.originType?`${A}${_?` \xB7 ${_}`:""}`:j?`${j}${D}`:F??A,x=e.originType&&j?`${B} \u2192 ${j}`:B;return{flowId:e.flowId,...e.originType?{originType:e.originType}:{},...e.originNodeId?{originNodeId:e.originNodeId}:{},startedAt:e.startedAt,lastSeenAt:e.lastSeenAt,eventCount:e.eventCount,headline:x,originLabel:A,..._?{originWhere:_}:{},...l?{request:l}:{},worst:a,durationMs:Number.isFinite(h)&&m>=h?Math.round(m-h):0,lanes:u,projects:[...n].sort(),rev:r,...g?{requestCount:g}:{},...E?{errorCount:E,firstError:Wy(b.title)}:{},...f.size?{touches:[...f]}:{},...i?Vy(i):{}}}s(Jy,"vN"),o(Jy,"summarizeFlow");function Vy(e){let t=e.classification,r=e.segmentation.stats;return{category:t.category,categoryRank:Ly(t.category),decidedBy:t.decidedBy,...t.subject?{subject:t.subject}:{},tags:t.tags,segmentCount:r.segments,phaseCount:r.phases,signalCount:r.signal}}s(Vy,"yN"),o(Vy,"analysisFields");function Wy(e){return e.replace(/\s*✗\s*$/,"").replace(/\s*\((?:\d+ rows?, )?[\d.]+ ?ms\)$/,"")}s(Wy,"bN"),o(Wy,"cleanTitle");function Sp(e){let t=e.indexOf("?");return t>=0?e.slice(0,t):e}s(Sp,"I_"),o(Sp,"stripQuery");function Fp(e,t){return{id:e.id,kind:e.kind,label:e.label,phase:e.phase,start:e.start,end:e.end,durationMs:e.durationMs,counts:e.counts,projects:e.projects,...e.method?{method:e.method}:{},...e.route?{route:e.route}:{},...e.requestId?{requestId:e.requestId}:{},...e.after?{after:e.after}:{},...e.hot?{hot:e.hot}:{},...e.part?{part:e.part}:{},worstSeverity:e.worstSeverity,category:t}}s(Fp,"R_"),o(Fp,"toDashSegment");function Gy(e,t,r){if(!e)return{flowId:t,summary:null,events:[],rev:r.rev};let i=e.getFlowSummary(t)??null,u=e.getFlowEvents(t)??[],n=e.analyzeFlow?.(t)??(u.length?zi(u,r.config??dt):void 0),a,l=u;if(r.segmentId!==void 0){a=n?.segmentation.segments.find(g=>g.id===r.segmentId);let f=new Set(a?.eventIds??[]);l=u.filter(g=>f.has(g.id))}let d=Ii(l,{includeRaw:r.includeRaw===!0}),c={flowId:t,summary:i,...d,rev:r.rev};if(!n)return c;let p=n.segmentation.assignment;c.events=c.events.map(f=>{let g=p[f.id]??(f.memberIds?.[0]?p[f.memberIds[0]]:void 0);return g?{...f,segmentId:g}:f});let h=o(f=>n.segmentCategories[f.id]??"other","category");c.segments=n.segmentation.segments.map(f=>Fp(f,h(f))),c.phases=n.segmentation.phases,c.segmentCategories=n.segmentCategories,c.segmentStats=n.segmentation.stats;let m=n.classification;return c.classification={category:m.category,decidedBy:m.decidedBy,...m.ruleIndex!==void 0?{ruleIndex:m.ruleIndex}:{},...m.subject?{subject:m.subject}:{},tags:m.tags,origin:m.origin},a&&(c.focus=Fp(a,h(a))),c}s(Gy,"E_"),o(Gy,"flowDetailPayload");var g7=300,v7=1e3,Ky=20,Hy=30,y7=1500,be=o(e=>e&&typeof e=="object"?e:{},"obj"),M=o(e=>typeof e=="string"&&e?e:void 0,"str"),ve=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num"),E7=class{static{s(this,"Ma")}static{o(this,"ErrorLog")}constructor(e=Date.now){this.now=e,this.groups=new Map,this.pending=[],this.byRequest=new Map,this.projectOfRequest=new Map,this.seen=new Set,this.dismissals=new Map,this.changed=!1}observe(e){if(e.id){if(this.seen.has(e.id))return!1;this.seen.add(e.id),this.seen.size>2e4&&this.seen.delete(this.seen.values().next().value)}let t=Wl(e);if(t)return this.dismissals.delete(t.groupId),t.kind===mu&&(this.dismissals.set(t.groupId,{until:t.until,at:e.timestamp,eventIds:new Set(t.eventIds),...t.by?{by:t.by}:{},...t.reason?{reason:t.reason}:{}}),this.dismissals.size>v7&&this.dismissals.delete(this.dismissals.keys().next().value)),this.changed=!0,!0;let r=be(e.raw),i=be(e.context),u=M(r.kind),n=M(i.requestId);u==="gateway-request"&&n&&M(r.project)&&(this.projectOfRequest.set(n,M(r.project)),this.projectOfRequest.size>5e3&&this.projectOfRequest.delete(this.projectOfRequest.keys().next().value));let a=e.severity==="error"||e.severity==="fatal",l=be(r.request),d=ve(r.status)??ve(l.status);return u==="server-request"&&(a||(d??0)>=500)?this.defer(e,"server"):e.source==="client-runtime"&&a&&(u==="error"||u==="unhandledrejection"||u==="resource-error"||u==="console")?this.browser(e,r,i):u==="egress"&&(M(r.error)||(d??0)>=500)?this.external(e,r,i,d):u==="queue-failed"?this.queue(e,r,i):u==="span"&&a?this.defer(e,"span"):u==="gateway-request"&&((d??0)>=500||d===0)?this.defer(e,"gateway"):u==="fetch-done"&&(d??0)>=500||u==="fetch-error"?this.defer(e,"fetch"):u==="log"&&a&&(e.source==="nestjs"||e.source==="nest")?this.defer(e,"log"):!1}flush(e=!1){let t=this.now(),r=o(a=>e||t-a.arrivedAt>=y7,"ready"),i=o(a=>M(be(a.event.context).requestId),"requestOf");for(let a of this.pending.filter(l=>l.kind==="server"&&r(l))){this.pending.splice(this.pending.indexOf(a),1);let l=be(a.event.raw);this.server(a.event,l,be(l.request),be(a.event.context))}let u=new Set(this.pending.filter(a=>a.kind==="server").map(i).filter(Boolean));for(let a of this.pending.filter(l=>l.kind!=="server"&&r(l)&&!(i(l)&&u.has(i(l)))))this.pending.splice(this.pending.indexOf(a),1),this.settle(a);let n=this.changed;return this.changed=!1,n}snapshot(e=[],t=15*6e4){let r=this.now(),i=Math.floor(r/6e4),u=[...this.groups.values()].map(c=>{let p=[];for(let E=i-Hy+1;E<=i;E++)p.push(c.perMinute.get(E)??0);let{flows:h,perMinute:m,eventIds:f,...g}=c;return{...g,occurrences:[...g.occurrences],flowCount:h.size,spark:p}}),n=this.hiddenEvents(),a=[],l=[];for(let c of[...e,...u].sort((p,h)=>+!!h.ongoing-+!!p.ongoing||h.lastSeenAt-p.lastSeenAt)){let p=this.dismissalOf(c,n);p?l.push({...c,dismissedAt:p.at,...p.by?{dismissedBy:p.by}:{},...p.reason?{dismissedReason:p.reason}:{}}):a.push(c)}let d=a.filter(c=>c.ongoing||r-c.lastSeenAt<=t);return{at:r,recentMs:t,groups:a,recentGroups:d.length,recentOccurrences:d.reduce((c,p)=>c+(p.ongoing?1:p.occurrences.filter(h=>r-h.at<=t).length),0),dismissed:l}}hiddenEvents(){let e=new Map;for(let t of this.dismissals.values())for(let r of t.eventIds)(e.get(r)?.at??-1)<=t.at&&e.set(r,t);return e}dismissalOf(e,t){let r=this.dismissals.get(e.id);if(r&&e.lastSeenAt<=r.until)return r;let i=this.groups.get(e.id)?.eventIds,u=i?.[i.length-1];return u===void 0?void 0:t.get(u)}dismissalsFor(e,t=[],r=this.now()){let i=[];for(let u of new Set(e)){let n=this.groups.get(u),a=n??t.find(l=>l.id===u);a&&i.push({groupId:u,until:Math.max(r,a.lastSeenAt),eventIds:n?n.eventIds.slice():[],by:"dashboard",title:a.title})}return i}restorable(e){let t=new Set;for(let r of new Set(e)){this.dismissals.has(r)&&t.add(r);let i=this.groups.get(r)?.eventIds??[];for(let[u,n]of this.dismissals)i.some(a=>n.eventIds.has(a))&&t.add(u)}return[...t]}server(e,t,r,i){let u=M(i.requestId)??M(r.requestId),n=M(i.projectName)??M(t.project)??(u?this.projectOfRequest.get(u):void 0),a=M(r.method)??"GET",l=M(r.route)??"?",d=ve(r.status)??ve(t.status),c=be(r.error),p=M(c.message)??M(e.message),h=M(c.name),m=`${a} ${l}${d?` \u2192 ${d}`:""}`,f=`server:${n??"?"}:${a} ${l}:${d??""}:${h??""}:${qt(p)}`,g=this.record(f,"server",e,{title:m,...n?{where:n,project:n}:{},...p?{message:p}:{},...M(c.stack)?{stack:en(M(c.stack))}:{},...d!==void 0?{status:d}:{}},u,d);return u&&this.byRequest.set(u,{group:this.groups.get(f),occ:g}),this.trimRequests(),!0}browser(e,t,r){let i=M(t.message)??e.title,u=M(r.url)??M(r.route),n=`browser:${M(t.kind)}:${qt(i)}`;return this.record(n,"browser",e,{title:i.split(`
|
|
75
|
-
`)
|
|
76
|
-
`)
|
|
77
|
-
`)[0].slice(0,100)}`:""}`,...$?{where:$,project:$}:{},...A?{message:A}:{}},u);u&&this.byRequest.set(u,{group:[...this.groups.values()].find(j=>j.occurrences.includes(_)),occ:_});return}let a=ve(r.status),l=M(r.method)??"GET",d=M(r.url)??"?",c=M(r.project),p=M(r.host),h=e.kind==="fetch"&&!a?"network error":String(a??"failed"),m=e.kind==="gateway"?`${l} ${p??""}${xu(d)} \u2192 ${h}`:`${l} ${xu(d)} \u2192 ${h}`,f=`request:${e.kind}:${c??p??""}:${l} ${xu(d)}:${h}`,g=this.record(f,"request",t,{title:m,where:e.kind==="gateway"?`gateway \u2192 ${c??p??"?"}`:"browser",...c?{project:c}:{},...a!==void 0?{status:a}:{},...e.kind==="gateway"?{message:Yy(r,a)}:{}},u,a);u&&this.byRequest.set(u,{group:this.groups.get(f),occ:g})}record(e,t,r,i,u,n){let a=be(r.context),l=M(a.flowId),d=this.groups.get(e);d||(d={id:e,kind:t,...i,count:0,firstSeenAt:r.timestamp,lastSeenAt:r.timestamp,occurrences:[],flows:new Set,perMinute:new Map,eventIds:[]},this.groups.set(e,d),this.evict()),d.count+=1,d.eventIds.push(r.id),d.eventIds.length>200&&d.eventIds.shift(),d.firstSeenAt=Math.min(d.firstSeenAt,r.timestamp),r.timestamp>=d.lastSeenAt&&(d.lastSeenAt=r.timestamp,i.stack&&(d.stack=i.stack),i.message&&(d.message=i.message)),l&&d.flows.add(l);let c=Math.floor(r.timestamp/6e4);d.perMinute.set(c,(d.perMinute.get(c)??0)+1);for(let h of d.perMinute.keys())h<c-Hy&&d.perMinute.delete(h);let p={id:r.id,at:r.timestamp,...l?{flowId:l}:{},...u?{requestId:u}:{},...n!==void 0?{status:n}:{}};return d.occurrences.unshift(p),d.occurrences.sort((h,m)=>m.at-h.at),d.occurrences.length>Ky&&(d.occurrences.length=Ky),this.changed=!0,p}evict(){if(this.groups.size<=g7)return;let e=[...this.groups.values()].sort((t,r)=>t.lastSeenAt-r.lastSeenAt)[0];e&&this.groups.delete(e.id)}trimRequests(){this.byRequest.size>5e3&&this.byRequest.delete(this.byRequest.keys().next().value)}};function jp(e,t,r){if(t==="crash-looping")return{kind:"service",title:`${e} keeps crashing`,serving:!1};if(t==="wedged")return{kind:"service",title:`${e} is not answering`,serving:!1};let i=r.length>0&&r.every(n=>n.fault==="process"),u=t==="up";return{kind:u?i?"log":"build":"service",title:i?`${e} reported a process error`:`${e} failed to build`,serving:u}}s(jp,"Oy"),o(jp,"describeServiceFault");function zp(e,t=Date.now()){let r=[],i=o((c,p=!0)=>({...c,count:c.count??1,firstSeenAt:c.at??t,lastSeenAt:c.at??t,occurrences:[],flowCount:0,spark:[],...p?{ongoing:!0}:{}}),"base"),u=o(c=>{let p=new Map;for(let h of Ns(be(e[c]).errors))p.set(M(h.project)??"workspace",[...p.get(M(h.project)??"workspace")??[],h]);return p},"grouped"),n=u("typecheck://errors"),a=u("lint://errors");for(let c of Ns(be(e["build://failures"]).failures)){let p=c.domain==="typecheck"||c.domain==="lint"?c.domain:"build",h=M(c.project)??"workspace";p==="typecheck"&&n.has(h)||p==="lint"&&a.has(h)||r.push(i({id:`build:${M(c.fingerprint)??M(c.message)??"?"}`,kind:p,title:`${p==="typecheck"?"Type error":p==="lint"?"Lint error":"Build error"}${M(c.project)?` in ${M(c.project)}`:""}`,...M(c.file)?{where:M(c.file)}:{},...M(c.project)?{project:M(c.project)}:{},...M(c.message)?{message:M(c.message)}:{},resource:"build://failures",...ve(c.timestamp)!==void 0?{at:ve(c.timestamp)}:{}}))}for(let[c,p]of n){let h=p[0];r.push(i({id:`typecheck:${c}`,kind:"typecheck",title:`${p.length} type error${p.length===1?"":"s"} in ${c}`,where:[M(h.file),ve(h.line)].filter(m=>m!==void 0).join(":")||c,project:c,message:p.slice(0,5).map(m=>`${M(m.file)??""}${ve(m.line)!==void 0?`:${ve(m.line)}`:""} ${M(m.code)??""} ${M(m.message)??""}`.trim()).join(`
|
|
78
|
-
`)
|
|
79
|
-
`),
|
|
80
|
-
`)}:{},
|
|
81
|
-
`)
|
|
82
|
-
`)
|
|
65
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){n(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(l.cycle){n(a);continue}if(l.count>1&&e.reused==="ref"){n(a);continue}}}s(Rt,"Ot"),o(Rt,"extractDefs");function Tt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let c=d.def??d.schema,p={...c},m=d.ref;if(d.ref=null,m){i(m);let h=e.seen.get(m),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,p),l._zod.parent===m)for(let b in c)b==="$ref"||b==="allOf"||b in p||delete c[b];if(g.$ref&&h.def)for(let b in c)b==="$ref"||b==="allOf"||b in h.def&&JSON.stringify(c[b])===JSON.stringify(h.def[b])&&delete c[b]}let f=l._zod.parent;if(f&&f!==m){i(f);let h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(let g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:l,jsonSchema:c,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())i(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&u.id===n&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:wr(t,"input",e.processors),output:wr(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(Tt,"Mt"),o(Tt,"finalize");function xe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return xe(i.element,r);if(i.type==="set")return xe(i.valueType,r);if(i.type==="lazy")return xe(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return xe(i.innerType,r);if(i.type==="intersection")return xe(i.left,r)||xe(i.right,r);if(i.type==="record"||i.type==="map")return xe(i.keyType,r)||xe(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:xe(i.in,r)||xe(i.out,r);if(i.type==="object"){for(let u in i.shape)if(xe(i.shape[u],r))return!0;return!1}if(i.type==="union"){for(let u of i.options)if(xe(u,r))return!0;return!1}if(i.type==="tuple"){for(let u of i.items)if(xe(u,r))return!0;return!!(i.rest&&xe(i.rest,r))}return!1}s(xe,"ze"),o(xe,"isTransforming");var Iv=o((e,t={})=>r=>{let i=Ot({...r,processors:t});return ie(e,i),Rt(i,e),Tt(i,e)},"createToJSONSchemaMethod"),wr=o((e,t,r={})=>i=>{let{libraryOptions:u,target:n}=i??{},a=Ot({...u??{},target:n,io:t,processors:r});return ie(e,a),Rt(a,e),Tt(a,e)},"createStandardJSONSchemaMethod"),sD={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},_v=o((e,t,r,i)=>{let u=r;u.type="string";let{minimum:n,maximum:a,format:l,patterns:d,contentEncoding:c}=e._zod.bag;if(typeof n=="number"&&(u.minLength=n),typeof a=="number"&&(u.maxLength=a),l&&(u.format=sD[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),c&&(u.contentEncoding=c),d&&d.size>0){let p=[...d];p.length===1?u.pattern=p[0].source:p.length>1&&(u.allOf=[...p.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},"stringProcessor"),Sv=o((e,t,r,i)=>{let u=r,{minimum:n,maximum:a,format:l,multipleOf:d,exclusiveMaximum:c,exclusiveMinimum:p}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let m=typeof p=="number"&&p>=(n??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(u.minimum=p,u.exclusiveMinimum=!0):u.exclusiveMinimum=p:typeof n=="number"&&(u.minimum=n),f?h?(u.maximum=c,u.exclusiveMaximum=!0):u.exclusiveMaximum=c:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),Fv=o((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),jv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),zv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Nv=o((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),Mv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),Ov=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),Rv=o((e,t,r,i)=>{r.not={}},"neverProcessor"),Tv=o((e,t,r,i)=>{},"anyProcessor"),Pv=o((e,t,r,i)=>{},"unknownProcessor"),Uv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),qv=o((e,t,r,i)=>{let u=e._zod.def,n=ki(u.entries);n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),r.enum=n},"enumProcessor"),Zv=o((e,t,r,i)=>{let u=e._zod.def,n=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),n.every(a=>typeof a=="boolean")&&(r.type="boolean"),n.every(a=>a===null)&&(r.type="null"),r.enum=n},"literalProcessor"),Lv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),Vv=o((e,t,r,i)=>{let u=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=n.source},"templateLiteralProcessor"),Jv=o((e,t,r,i)=>{let u=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(n.minLength=a),l!==void 0&&(n.maxLength=l),d?d.length===1?(n.contentMediaType=d[0],Object.assign(u,n)):(Object.assign(u,n),u.anyOf=d.map(c=>({contentMediaType:c}))):Object.assign(u,n)},"fileProcessor"),Wv=o((e,t,r,i)=>{r.type="boolean"},"successProcessor"),Gv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Kv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),Hv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Xv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),Yv=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),Qv=o((e,t,r,i)=>{let u=r,n=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=ie(n.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),e1=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object",u.properties={};let a=n.shape;for(let c in a)u.properties[c]=ie(a[c],t,{...i,path:[...i.path,"properties",c]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(c=>{let p=n.shape[c]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(u.required=Array.from(d)),n.catchall?._zod.def.type==="never"?u.additionalProperties=!1:n.catchall?n.catchall&&(u.additionalProperties=ie(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),c0=o((e,t,r,i)=>{let u=e._zod.def,n=u.inclusive===!1,a=u.options.map((l,d)=>ie(l,t,{...i,path:[...i.path,n?"oneOf":"anyOf",d]}));n?r.oneOf=a:r.anyOf=a},"unionProcessor"),t1=o((e,t,r,i)=>{let u=e._zod.def,n=ie(u.left,t,{...i,path:[...i.path,"allOf",0]}),a=ie(u.right,t,{...i,path:[...i.path,"allOf",1]}),l=o(c=>"allOf"in c&&Object.keys(c).length===1,"isSimpleIntersection"),d=[...l(n)?n.allOf:[n],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),u1=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=n.items.map((f,h)=>ie(f,t,{...i,path:[...i.path,a,h]})),c=n.rest?ie(n.rest,t,{...i,path:[...i.path,l,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,c&&(u.items=c)):t.target==="openapi-3.0"?(u.items={anyOf:d},c&&u.items.anyOf.push(c),u.minItems=d.length,c||(u.maxItems=d.length)):(u.items=d,c&&(u.additionalItems=c));let{minimum:p,maximum:m}=e._zod.bag;typeof p=="number"&&(u.minItems=p),typeof m=="number"&&(u.maxItems=m)},"tupleProcessor"),r1=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object";let a=n.keyType,l=a._zod.bag?.patterns;if(n.mode==="loose"&&l&&l.size>0){let c=ie(n.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});u.patternProperties={};for(let p of l)u.patternProperties[p.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=ie(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),u.additionalProperties=ie(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=a._zod.values;if(d){let c=[...d].filter(p=>typeof p=="string"||typeof p=="number");c.length>0&&(u.required=c)}},"recordProcessor"),i1=o((e,t,r,i)=>{let u=e._zod.def,n=ie(u.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},"nullableProcessor"),n1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"nonoptionalProcessor"),s1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),a1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),o1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),l1=o((e,t,r,i)=>{let u=e._zod.def,n=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?u.out:u.in:u.out;ie(a,t,i);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),d1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),c1=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"promiseProcessor"),p0=o((e,t,r,i)=>{let u=e._zod.def;ie(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"optionalProcessor"),p1=o((e,t,r,i)=>{let u=e._zod.innerType;ie(u,t,i);let n=t.seen.get(e);n.ref=u},"lazyProcessor"),m0={string:_v,number:Sv,boolean:Fv,bigint:jv,symbol:zv,null:Nv,undefined:Mv,void:Ov,never:Rv,any:Tv,unknown:Pv,date:Uv,enum:qv,literal:Zv,nan:Lv,template_literal:Vv,file:Jv,success:Wv,custom:Gv,function:Kv,transform:Hv,map:Xv,set:Yv,array:Qv,object:e1,union:c0,intersection:t1,tuple:u1,record:r1,nullable:i1,nonoptional:n1,default:s1,prefault:a1,catch:o1,pipe:l1,readonly:d1,promise:c1,optional:p0,lazy:p1};function f0(e,t){if("_idmap"in e){let i=e,u=Ot({...t,processors:m0}),n={};for(let d of i._idmap.entries()){let[c,p]=d;ie(p,u)}let a={},l={registry:i,uri:t?.uri,defs:n};u.external=l;for(let d of i._idmap.entries()){let[c,p]=d;Rt(u,p),a[c]=Tt(u,p)}if(Object.keys(n).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:n}}return{schemas:a}}let r=Ot({...t,processors:m0});return ie(e,r),Rt(r,e),Tt(r,e)}s(f0,"cs"),o(f0,"toJSONSchema");var aD=class{static{s(this,"us")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=Ot({processors:m0,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return ie(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Rt(this.ctx,e);let r=Tt(this.ctx,e),{"~standard":i,...u}=r;return u}},oD={},m1={};ut(m1,{ZodAny:s(()=>cl,"ZodAny"),ZodArray:s(()=>yl,"ZodArray"),ZodBase64:s(()=>wn,"ZodBase64"),ZodBase64URL:s(()=>Dn,"ZodBase64URL"),ZodBigInt:s(()=>Ar,"ZodBigInt"),ZodBigIntFormat:s(()=>kn,"ZodBigIntFormat"),ZodBoolean:s(()=>kr,"ZodBoolean"),ZodCIDRv4:s(()=>En,"ZodCIDRv4"),ZodCIDRv6:s(()=>bn,"ZodCIDRv6"),ZodCUID:s(()=>pn,"ZodCUID"),ZodCUID2:s(()=>mn,"ZodCUID2"),ZodCatch:s(()=>Gl,"ZodCatch"),ZodCodec:s(()=>Or,"ZodCodec"),ZodCustom:s(()=>Tr,"ZodCustom"),ZodCustomStringFormat:s(()=>mu,"ZodCustomStringFormat"),ZodDate:s(()=>In,"ZodDate"),ZodDefault:s(()=>Ll,"ZodDefault"),ZodDiscriminatedUnion:s(()=>xl,"ZodDiscriminatedUnion"),ZodE164:s(()=>$n,"ZodE164"),ZodEmail:s(()=>ln,"ZodEmail"),ZodEmoji:s(()=>dn,"ZodEmoji"),ZodEnum:s(()=>gu,"ZodEnum"),ZodExactOptional:s(()=>Ul,"ZodExactOptional"),ZodFile:s(()=>Rl,"ZodFile"),ZodFunction:s(()=>sd,"ZodFunction"),ZodGUID:s(()=>$r,"ZodGUID"),ZodIPv4:s(()=>vn,"ZodIPv4"),ZodIPv6:s(()=>yn,"ZodIPv6"),ZodIntersection:s(()=>kl,"ZodIntersection"),ZodJWT:s(()=>Bn,"ZodJWT"),ZodKSUID:s(()=>gn,"ZodKSUID"),ZodLazy:s(()=>rd,"ZodLazy"),ZodLiteral:s(()=>Ml,"ZodLiteral"),ZodMAC:s(()=>P0,"ZodMAC"),ZodMap:s(()=>Sl,"ZodMap"),ZodNaN:s(()=>Kl,"ZodNaN"),ZodNanoID:s(()=>cn,"ZodNanoID"),ZodNever:s(()=>fl,"ZodNever"),ZodNonOptional:s(()=>On,"ZodNonOptional"),ZodNull:s(()=>dl,"ZodNull"),ZodNullable:s(()=>ql,"ZodNullable"),ZodNumber:s(()=>xr,"ZodNumber"),ZodNumberFormat:s(()=>Pt,"ZodNumberFormat"),ZodObject:s(()=>_r,"ZodObject"),ZodOptional:s(()=>jn,"ZodOptional"),ZodPipe:s(()=>Nr,"ZodPipe"),ZodPrefault:s(()=>Vl,"ZodPrefault"),ZodPreprocess:s(()=>Ql,"ZodPreprocess"),ZodPromise:s(()=>id,"ZodPromise"),ZodReadonly:s(()=>ed,"ZodReadonly"),ZodRecord:s(()=>hu,"ZodRecord"),ZodSet:s(()=>jl,"ZodSet"),ZodString:s(()=>Dr,"ZodString"),ZodStringFormat:s(()=>ae,"ZodStringFormat"),ZodSuccess:s(()=>Jl,"ZodSuccess"),ZodSymbol:s(()=>sl,"ZodSymbol"),ZodTemplateLiteral:s(()=>td,"ZodTemplateLiteral"),ZodTransform:s(()=>Pl,"ZodTransform"),ZodTuple:s(()=>Al,"ZodTuple"),ZodType:s(()=>Q,"ZodType"),ZodULID:s(()=>fn,"ZodULID"),ZodURL:s(()=>Br,"ZodURL"),ZodUUID:s(()=>He,"ZodUUID"),ZodUndefined:s(()=>ol,"ZodUndefined"),ZodUnion:s(()=>Sr,"ZodUnion"),ZodUnknown:s(()=>ml,"ZodUnknown"),ZodVoid:s(()=>hl,"ZodVoid"),ZodXID:s(()=>hn,"ZodXID"),ZodXor:s(()=>$l,"ZodXor"),_ZodString:s(()=>on,"_ZodString"),_default:s(()=>Nn,"_default"),_function:s(()=>Rr,"_function"),any:s(()=>pl,"any"),array:s(()=>fu,"array"),base64:s(()=>V0,"base64"),base64url:s(()=>J0,"base64url"),bigint:s(()=>rl,"bigint"),boolean:s(()=>Cn,"boolean"),catch:s(()=>Tn,"catch"),check:s(()=>ad,"check"),cidrv4:s(()=>Z0,"cidrv4"),cidrv6:s(()=>L0,"cidrv6"),codec:s(()=>Xl,"codec"),cuid:s(()=>z0,"cuid"),cuid2:s(()=>N0,"cuid2"),custom:s(()=>od,"custom"),date:s(()=>vl,"date"),describe:s(()=>I1,"describe"),discriminatedUnion:s(()=>Cl,"discriminatedUnion"),e164:s(()=>W0,"e164"),email:s(()=>B0,"email"),emoji:s(()=>F0,"emoji"),enum:s(()=>jr,"enum"),exactOptional:s(()=>zn,"exactOptional"),file:s(()=>Tl,"file"),float32:s(()=>Q0,"float32"),float64:s(()=>el,"float64"),function:s(()=>Rr,"function"),guid:s(()=>x0,"guid"),hash:s(()=>Y0,"hash"),hex:s(()=>X0,"hex"),hostname:s(()=>H0,"hostname"),httpUrl:s(()=>S0,"httpUrl"),instanceof:s(()=>ld,"instanceof"),int:s(()=>Cr,"int"),int32:s(()=>tl,"int32"),int64:s(()=>il,"int64"),intersection:s(()=>_n,"intersection"),invertCodec:s(()=>Yl,"invertCodec"),ipv4:s(()=>T0,"ipv4"),ipv6:s(()=>q0,"ipv6"),json:s(()=>dd,"json"),jwt:s(()=>G0,"jwt"),keyof:s(()=>El,"keyof"),ksuid:s(()=>R0,"ksuid"),lazy:s(()=>Un,"lazy"),literal:s(()=>Ol,"literal"),looseObject:s(()=>Dl,"looseObject"),looseRecord:s(()=>_l,"looseRecord"),mac:s(()=>U0,"mac"),map:s(()=>Fl,"map"),meta:s(()=>_1,"meta"),nan:s(()=>Hl,"nan"),nanoid:s(()=>j0,"nanoid"),nativeEnum:s(()=>Nl,"nativeEnum"),never:s(()=>Ir,"never"),nonoptional:s(()=>Rn,"nonoptional"),null:s(()=>An,"null"),nullable:s(()=>yu,"nullable"),nullish:s(()=>Zl,"nullish"),number:s(()=>xn,"number"),object:s(()=>bl,"object"),optional:s(()=>vu,"optional"),partialRecord:s(()=>Il,"partialRecord"),pipe:s(()=>Mr,"pipe"),prefault:s(()=>Mn,"prefault"),preprocess:s(()=>cd,"preprocess"),promise:s(()=>nd,"promise"),readonly:s(()=>Pn,"readonly"),record:s(()=>Fn,"record"),refine:s(()=>qn,"refine"),set:s(()=>zl,"set"),strictObject:s(()=>wl,"strictObject"),string:s(()=>pu,"string"),stringFormat:s(()=>K0,"stringFormat"),stringbool:s(()=>S1,"stringbool"),success:s(()=>Wl,"success"),superRefine:s(()=>Zn,"superRefine"),symbol:s(()=>al,"symbol"),templateLiteral:s(()=>ud,"templateLiteral"),transform:s(()=>zr,"transform"),tuple:s(()=>Sn,"tuple"),uint32:s(()=>ul,"uint32"),uint64:s(()=>nl,"uint64"),ulid:s(()=>M0,"ulid"),undefined:s(()=>ll,"undefined"),union:s(()=>Fr,"union"),unknown:s(()=>gt,"unknown"),url:s(()=>_0,"url"),uuid:s(()=>C0,"uuid"),uuidv4:s(()=>k0,"uuidv4"),uuidv6:s(()=>A0,"uuidv6"),uuidv7:s(()=>I0,"uuidv7"),void:s(()=>gl,"void"),xid:s(()=>O0,"xid"),xor:s(()=>Bl,"xor")});var f1={};ut(f1,{endsWith:s(()=>fr,"endsWith"),gt:s(()=>nt,"gt"),gte:s(()=>Ce,"gte"),includes:s(()=>pr,"includes"),length:s(()=>lu,"length"),lowercase:s(()=>dr,"lowercase"),lt:s(()=>it,"lt"),lte:s(()=>ze,"lte"),maxLength:s(()=>ou,"maxLength"),maxSize:s(()=>Mt,"maxSize"),mime:s(()=>hr,"mime"),minLength:s(()=>ht,"minLength"),minSize:s(()=>st,"minSize"),multipleOf:s(()=>Nt,"multipleOf"),negative:s(()=>rn,"negative"),nonnegative:s(()=>sn,"nonnegative"),nonpositive:s(()=>nn,"nonpositive"),normalize:s(()=>gr,"normalize"),overwrite:s(()=>Ke,"overwrite"),positive:s(()=>un,"positive"),property:s(()=>an,"property"),regex:s(()=>lr,"regex"),size:s(()=>au,"size"),slugify:s(()=>br,"slugify"),startsWith:s(()=>mr,"startsWith"),toLowerCase:s(()=>yr,"toLowerCase"),toUpperCase:s(()=>Er,"toUpperCase"),trim:s(()=>vr,"trim"),uppercase:s(()=>cr,"uppercase")});var h0={};ut(h0,{ZodISODate:s(()=>y0,"ZodISODate"),ZodISODateTime:s(()=>g0,"ZodISODateTime"),ZodISODuration:s(()=>D0,"ZodISODuration"),ZodISOTime:s(()=>b0,"ZodISOTime"),date:s(()=>E0,"date"),datetime:s(()=>v0,"datetime"),duration:s(()=>$0,"duration"),time:s(()=>w0,"time")});var g0=B("ZodISODateTime",(e,t)=>{oh.init(e,t),ae.init(e,t)});function v0(e){return Io(g0,e)}s(v0,"uf"),o(v0,"datetime");var y0=B("ZodISODate",(e,t)=>{lh.init(e,t),ae.init(e,t)});function E0(e){return _o(y0,e)}s(E0,"lf"),o(E0,"date");var b0=B("ZodISOTime",(e,t)=>{dh.init(e,t),ae.init(e,t)});function w0(e){return So(b0,e)}s(w0,"df"),o(w0,"time");var D0=B("ZodISODuration",(e,t)=>{ch.init(e,t),ae.init(e,t)});function $0(e){return Fo(D0,e)}s($0,"pf"),o($0,"duration");var h1=o((e,t)=>{$a.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>Si(e,r),"value")},flatten:{value:o(r=>_i(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Vu,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Vu,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),lD=B("ZodError",h1),Ne=B("ZodError",h1,{Parent:Error}),g1=Hu(Ne),v1=Xu(Ne),y1=Yu(Ne),E1=Qu(Ne),b1=Ia(Ne),w1=_a(Ne),D1=Sa(Ne),$1=Fa(Ne),B1=ja(Ne),x1=za(Ne),C1=Na(Ne),k1=Ma(Ne),A1=new WeakMap;function cu(e,t,r){let i=Object.getPrototypeOf(e),u=A1.get(i);if(u||(u=new Set,A1.set(i,u)),!u.has(t)){u.add(t);for(let n in r){let a=r[n];Object.defineProperty(i,n,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(cu,"Yn"),o(cu,"_installLazyMethods");var Q=B("ZodType",(e,t)=>(X.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wr(e,"input"),output:wr(e,"output")}}),e.toJSONSchema=Iv(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>g1(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>y1(e,r,i),e.parseAsync=async(r,i)=>v1(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>E1(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>b1(e,r,i),e.decode=(r,i)=>w1(e,r,i),e.encodeAsync=async(r,i)=>D1(e,r,i),e.decodeAsync=async(r,i)=>$1(e,r,i),e.safeEncode=(r,i)=>B1(e,r,i),e.safeDecode=(r,i)=>x1(e,r,i),e.safeEncodeAsync=async(r,i)=>C1(e,r,i),e.safeDecodeAsync=async(r,i)=>k1(e,r,i),cu(e,"ZodType",{check(...r){let i=this.def;return this.clone(te.mergeDefs(i,{checks:[...i.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return Se(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(qn(r,i))},superRefine(r,i){return this.check(Zn(r,i))},overwrite(r){return this.check(Ke(r))},optional(){return vu(this)},exactOptional(){return zn(this)},nullable(){return yu(this)},nullish(){return vu(yu(this))},nonoptional(r){return Rn(this,r)},array(){return fu(this)},or(r){return Fr([this,r])},and(r){return _n(this,r)},transform(r){return Mr(this,zr(r))},default(r){return Nn(this,r)},prefault(r){return Mn(this,r)},catch(r){return Tn(this,r)},pipe(r){return Mr(this,r)},readonly(){return Pn(this)},describe(r){let i=this.clone();return Re.add(i,{description:r}),i},meta(...r){if(r.length===0)return Re.get(this);let i=this.clone();return Re.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Re.get(e)?.description},configurable:!0}),e)),on=B("_ZodString",(e,t)=>{tr.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(i,u,n)=>_v(e,i,u,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,cu(e,"_ZodString",{regex(...i){return this.check(lr(...i))},includes(...i){return this.check(pr(...i))},startsWith(...i){return this.check(mr(...i))},endsWith(...i){return this.check(fr(...i))},min(...i){return this.check(ht(...i))},max(...i){return this.check(ou(...i))},length(...i){return this.check(lu(...i))},nonempty(...i){return this.check(ht(1,...i))},lowercase(i){return this.check(dr(i))},uppercase(i){return this.check(cr(i))},trim(){return this.check(vr())},normalize(...i){return this.check(gr(...i))},toLowerCase(){return this.check(yr())},toUpperCase(){return this.check(Er())},slugify(){return this.check(br())}})}),Dr=B("ZodString",(e,t)=>{tr.init(e,t),on.init(e,t),e.email=r=>e.check(Mi(ln,r)),e.url=r=>e.check(or(Br,r)),e.jwt=r=>e.check(tn(Bn,r)),e.emoji=r=>e.check(Ui(dn,r)),e.guid=r=>e.check(ar($r,r)),e.uuid=r=>e.check(Oi(He,r)),e.uuidv4=r=>e.check(Ri(He,r)),e.uuidv6=r=>e.check(Ti(He,r)),e.uuidv7=r=>e.check(Pi(He,r)),e.nanoid=r=>e.check(qi(cn,r)),e.guid=r=>e.check(ar($r,r)),e.cuid=r=>e.check(Zi(pn,r)),e.cuid2=r=>e.check(Li(mn,r)),e.ulid=r=>e.check(Vi(fn,r)),e.base64=r=>e.check(Yi(wn,r)),e.base64url=r=>e.check(Qi(Dn,r)),e.xid=r=>e.check(Ji(hn,r)),e.ksuid=r=>e.check(Wi(gn,r)),e.ipv4=r=>e.check(Gi(vn,r)),e.ipv6=r=>e.check(Ki(yn,r)),e.cidrv4=r=>e.check(Hi(En,r)),e.cidrv6=r=>e.check(Xi(bn,r)),e.e164=r=>e.check(en($n,r)),e.datetime=r=>e.check(v0(r)),e.date=r=>e.check(E0(r)),e.time=r=>e.check(w0(r)),e.duration=r=>e.check($0(r))});function pu(e){return Co(Dr,e)}s(pu,"Wn"),o(pu,"string");var ae=B("ZodStringFormat",(e,t)=>{se.init(e,t),on.init(e,t)}),ln=B("ZodEmail",(e,t)=>{Qf.init(e,t),ae.init(e,t)});function B0(e){return Mi(ln,e)}s(B0,"qw"),o(B0,"email");var $r=B("ZodGUID",(e,t)=>{Xf.init(e,t),ae.init(e,t)});function x0(e){return ar($r,e)}s(x0,"Vw"),o(x0,"guid");var He=B("ZodUUID",(e,t)=>{Yf.init(e,t),ae.init(e,t)});function C0(e){return Oi(He,e)}s(C0,"Gw"),o(C0,"uuid");function k0(e){return Ri(He,e)}s(k0,"Jw"),o(k0,"uuidv4");function A0(e){return Ti(He,e)}s(A0,"Ww"),o(A0,"uuidv6");function I0(e){return Pi(He,e)}s(I0,"Kw"),o(I0,"uuidv7");var Br=B("ZodURL",(e,t)=>{eh.init(e,t),ae.init(e,t)});function _0(e){return or(Br,e)}s(_0,"Xw"),o(_0,"url");function S0(e){return or(Br,{protocol:ft.httpProtocol,hostname:ft.domain,...te.normalizeParams(e)})}s(S0,"Hw"),o(S0,"httpUrl");var dn=B("ZodEmoji",(e,t)=>{th.init(e,t),ae.init(e,t)});function F0(e){return Ui(dn,e)}s(F0,"Yw"),o(F0,"emoji");var cn=B("ZodNanoID",(e,t)=>{uh.init(e,t),ae.init(e,t)});function j0(e){return qi(cn,e)}s(j0,"Qw"),o(j0,"nanoid");var pn=B("ZodCUID",(e,t)=>{rh.init(e,t),ae.init(e,t)});function z0(e){return Zi(pn,e)}s(z0,"ex"),o(z0,"cuid");var mn=B("ZodCUID2",(e,t)=>{ih.init(e,t),ae.init(e,t)});function N0(e){return Li(mn,e)}s(N0,"tx"),o(N0,"cuid2");var fn=B("ZodULID",(e,t)=>{nh.init(e,t),ae.init(e,t)});function M0(e){return Vi(fn,e)}s(M0,"rx"),o(M0,"ulid");var hn=B("ZodXID",(e,t)=>{sh.init(e,t),ae.init(e,t)});function O0(e){return Ji(hn,e)}s(O0,"nx"),o(O0,"xid");var gn=B("ZodKSUID",(e,t)=>{ah.init(e,t),ae.init(e,t)});function R0(e){return Wi(gn,e)}s(R0,"ox"),o(R0,"ksuid");var vn=B("ZodIPv4",(e,t)=>{ph.init(e,t),ae.init(e,t)});function T0(e){return Gi(vn,e)}s(T0,"ix"),o(T0,"ipv4");var P0=B("ZodMAC",(e,t)=>{fh.init(e,t),ae.init(e,t)});function U0(e){return Ao(P0,e)}s(U0,"sx"),o(U0,"mac");var yn=B("ZodIPv6",(e,t)=>{mh.init(e,t),ae.init(e,t)});function q0(e){return Ki(yn,e)}s(q0,"ax"),o(q0,"ipv6");var En=B("ZodCIDRv4",(e,t)=>{hh.init(e,t),ae.init(e,t)});function Z0(e){return Hi(En,e)}s(Z0,"cx"),o(Z0,"cidrv4");var bn=B("ZodCIDRv6",(e,t)=>{gh.init(e,t),ae.init(e,t)});function L0(e){return Xi(bn,e)}s(L0,"ux"),o(L0,"cidrv6");var wn=B("ZodBase64",(e,t)=>{vh.init(e,t),ae.init(e,t)});function V0(e){return Yi(wn,e)}s(V0,"lx"),o(V0,"base64");var Dn=B("ZodBase64URL",(e,t)=>{yh.init(e,t),ae.init(e,t)});function J0(e){return Qi(Dn,e)}s(J0,"dx"),o(J0,"base64url");var $n=B("ZodE164",(e,t)=>{Eh.init(e,t),ae.init(e,t)});function W0(e){return en($n,e)}s(W0,"px"),o(W0,"e164");var Bn=B("ZodJWT",(e,t)=>{bh.init(e,t),ae.init(e,t)});function G0(e){return tn(Bn,e)}s(G0,"fx"),o(G0,"jwt");var mu=B("ZodCustomStringFormat",(e,t)=>{wh.init(e,t),ae.init(e,t)});function K0(e,t,r={}){return du(mu,e,t,r)}s(K0,"mx"),o(K0,"stringFormat");function H0(e){return du(mu,"hostname",ft.hostname,e)}s(H0,"hx"),o(H0,"hostname");function X0(e){return du(mu,"hex",ft.hex,e)}s(X0,"gx"),o(X0,"hex");function Y0(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,u=ft[i];if(!u)throw new Error(`Unrecognized hash format: ${i}`);return du(mu,i,u,t)}s(Y0,"vx"),o(Y0,"hash");var xr=B("ZodNumber",(e,t)=>{Ga.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Sv(e,i,u,n),cu(e,"ZodNumber",{gt(i,u){return this.check(nt(i,u))},gte(i,u){return this.check(Ce(i,u))},min(i,u){return this.check(Ce(i,u))},lt(i,u){return this.check(it(i,u))},lte(i,u){return this.check(ze(i,u))},max(i,u){return this.check(ze(i,u))},int(i){return this.check(Cr(i))},safe(i){return this.check(Cr(i))},positive(i){return this.check(nt(0,i))},nonnegative(i){return this.check(Ce(0,i))},negative(i){return this.check(it(0,i))},nonpositive(i){return this.check(ze(0,i))},multipleOf(i,u){return this.check(Nt(i,u))},step(i,u){return this.check(Nt(i,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function xn(e){return jo(xr,e)}s(xn,"If"),o(xn,"number");var Pt=B("ZodNumberFormat",(e,t)=>{Dh.init(e,t),xr.init(e,t)});function Cr(e){return No(Pt,e)}s(Cr,"hs"),o(Cr,"int");function Q0(e){return Mo(Pt,e)}s(Q0,"yx"),o(Q0,"float32");function el(e){return Oo(Pt,e)}s(el,"bx"),o(el,"float64");function tl(e){return Ro(Pt,e)}s(tl,"wx"),o(tl,"int32");function ul(e){return To(Pt,e)}s(ul,"xx"),o(ul,"uint32");var kr=B("ZodBoolean",(e,t)=>{Ka.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Fv(e,r,i,u)});function Cn(e){return Po(kr,e)}s(Cn,"Rf"),o(Cn,"boolean");var Ar=B("ZodBigInt",(e,t)=>{Ha.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(i,u,n)=>jv(e,i,u,n),e.gte=(i,u)=>e.check(Ce(i,u)),e.min=(i,u)=>e.check(Ce(i,u)),e.gt=(i,u)=>e.check(nt(i,u)),e.gte=(i,u)=>e.check(Ce(i,u)),e.min=(i,u)=>e.check(Ce(i,u)),e.lt=(i,u)=>e.check(it(i,u)),e.lte=(i,u)=>e.check(ze(i,u)),e.max=(i,u)=>e.check(ze(i,u)),e.positive=i=>e.check(nt(BigInt(0),i)),e.negative=i=>e.check(it(BigInt(0),i)),e.nonpositive=i=>e.check(ze(BigInt(0),i)),e.nonnegative=i=>e.check(Ce(BigInt(0),i)),e.multipleOf=(i,u)=>e.check(Nt(i,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function rl(e){return qo(Ar,e)}s(rl,"$x"),o(rl,"bigint");var kn=B("ZodBigIntFormat",(e,t)=>{$h.init(e,t),Ar.init(e,t)});function il(e){return Lo(kn,e)}s(il,"_x"),o(il,"int64");function nl(e){return Vo(kn,e)}s(nl,"kx"),o(nl,"uint64");var sl=B("ZodSymbol",(e,t)=>{Bh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>zv(e,r,i,u)});function al(e){return Jo(sl,e)}s(al,"Sx"),o(al,"symbol");var ol=B("ZodUndefined",(e,t)=>{xh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Mv(e,r,i,u)});function ll(e){return Wo(ol,e)}s(ll,"Ix"),o(ll,"_undefined");var dl=B("ZodNull",(e,t)=>{Ch.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Nv(e,r,i,u)});function An(e){return Go(dl,e)}s(An,"jf"),o(An,"_null");var cl=B("ZodAny",(e,t)=>{kh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Tv(e,r,i,u)});function pl(){return Ko(cl)}s(pl,"Rx"),o(pl,"any");var ml=B("ZodUnknown",(e,t)=>{Ah.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Pv(e,r,i,u)});function gt(){return Ho(ml)}s(gt,"or"),o(gt,"unknown");var fl=B("ZodNever",(e,t)=>{Ih.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Rv(e,r,i,u)});function Ir(e){return Xo(fl,e)}s(Ir,"Ns"),o(Ir,"never");var hl=B("ZodVoid",(e,t)=>{_h.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ov(e,r,i,u)});function gl(e){return Yo(hl,e)}s(gl,"Ex"),o(gl,"_void");var In=B("ZodDate",(e,t)=>{Sh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Uv(e,i,u,n),e.min=(i,u)=>e.check(Ce(i,u)),e.max=(i,u)=>e.check(ze(i,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function vl(e){return Qo(In,e)}s(vl,"Tx"),o(vl,"date");var yl=B("ZodArray",(e,t)=>{Fh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Qv(e,r,i,u),e.element=t.element,cu(e,"ZodArray",{min(r,i){return this.check(ht(r,i))},nonempty(r){return this.check(ht(1,r))},max(r,i){return this.check(ou(r,i))},length(r,i){return this.check(lu(r,i))},unwrap(){return this.element}})});function fu(e,t){return u0(yl,e,t)}s(fu,"to"),o(fu,"array");function El(e){let t=e._zod.def.shape;return jr(Object.keys(t))}s(El,"Ax"),o(El,"keyof");var _r=B("ZodObject",(e,t)=>{zh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>e1(e,r,i,u),te.defineLazy(e,"shape",()=>t.shape),cu(e,"ZodObject",{keyof(){return jr(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:gt()})},loose(){return this.clone({...this._zod.def,catchall:gt()})},strict(){return this.clone({...this._zod.def,catchall:Ir()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return te.extend(this,r)},safeExtend(r){return te.safeExtend(this,r)},merge(r){return te.merge(this,r)},pick(r){return te.pick(this,r)},omit(r){return te.omit(this,r)},partial(...r){return te.partial(jn,this,r[0])},required(...r){return te.required(On,this,r[0])}})});function bl(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new _r(r)}s(bl,"jx"),o(bl,"object");function wl(e,t){return new _r({type:"object",shape:e,catchall:Ir(),...te.normalizeParams(t)})}s(wl,"zx"),o(wl,"strictObject");function Dl(e,t){return new _r({type:"object",shape:e,catchall:gt(),...te.normalizeParams(t)})}s(Dl,"Ox"),o(Dl,"looseObject");var Sr=B("ZodUnion",(e,t)=>{ji.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>c0(e,r,i,u),e.options=t.options});function Fr(e,t){return new Sr({type:"union",options:e,...te.normalizeParams(t)})}s(Fr,"Ps"),o(Fr,"union");var $l=B("ZodXor",(e,t)=>{Sr.init(e,t),Nh.init(e,t),e._zod.processJSONSchema=(r,i,u)=>c0(e,r,i,u),e.options=t.options});function Bl(e,t){return new $l({type:"union",options:e,inclusive:!1,...te.normalizeParams(t)})}s(Bl,"Mx"),o(Bl,"xor");var xl=B("ZodDiscriminatedUnion",(e,t)=>{Sr.init(e,t),Mh.init(e,t)});function Cl(e,t,r){return new xl({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}s(Cl,"Nx"),o(Cl,"discriminatedUnion");var kl=B("ZodIntersection",(e,t)=>{Oh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>t1(e,r,i,u)});function _n(e,t){return new kl({type:"intersection",left:e,right:t})}s(_n,"Lf"),o(_n,"intersection");var Al=B("ZodTuple",(e,t)=>{ro.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>u1(e,r,i,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Sn(e,t,r){let i=t instanceof X,u=i?r:t,n=i?t:null;return new Al({type:"tuple",items:e,rest:n,...te.normalizeParams(u)})}s(Sn,"Bf"),o(Sn,"tuple");var hu=B("ZodRecord",(e,t)=>{Rh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>r1(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType});function Fn(e,t,r){return!t||!t._zod?new hu({type:"record",keyType:pu(),valueType:e,...te.normalizeParams(t)}):new hu({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}s(Fn,"Zf"),o(Fn,"record");function Il(e,t,r){let i=Se(e);return i._zod.values=void 0,new hu({type:"record",keyType:i,valueType:t,...te.normalizeParams(r)})}s(Il,"Px"),o(Il,"partialRecord");function _l(e,t,r){return new hu({type:"record",keyType:e,valueType:t,mode:"loose",...te.normalizeParams(r)})}s(_l,"Dx"),o(_l,"looseRecord");var Sl=B("ZodMap",(e,t)=>{Th.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Xv(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(st(...r)),e.nonempty=r=>e.check(st(1,r)),e.max=(...r)=>e.check(Mt(...r)),e.size=(...r)=>e.check(au(...r))});function Fl(e,t,r){return new Sl({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}s(Fl,"Cx"),o(Fl,"map");var jl=B("ZodSet",(e,t)=>{Ph.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Yv(e,r,i,u),e.min=(...r)=>e.check(st(...r)),e.nonempty=r=>e.check(st(1,r)),e.max=(...r)=>e.check(Mt(...r)),e.size=(...r)=>e.check(au(...r))});function zl(e,t){return new jl({type:"set",valueType:e,...te.normalizeParams(t)})}s(zl,"Ux"),o(zl,"set");var gu=B("ZodEnum",(e,t)=>{Uh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(i,u,n)=>qv(e,i,u,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,u)=>{let n={};for(let a of i)if(r.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new gu({...t,checks:[],...te.normalizeParams(u),entries:n})},e.exclude=(i,u)=>{let n={...t.entries};for(let a of i)if(r.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new gu({...t,checks:[],...te.normalizeParams(u),entries:n})}});function jr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new gu({type:"enum",entries:r,...te.normalizeParams(t)})}s(jr,"Ds"),o(jr,"_enum");function Nl(e,t){return new gu({type:"enum",entries:e,...te.normalizeParams(t)})}s(Nl,"Lx"),o(Nl,"nativeEnum");var Ml=B("ZodLiteral",(e,t)=>{qh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Zv(e,r,i,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ol(e,t){return new Ml({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}s(Ol,"Fx"),o(Ol,"literal");var Rl=B("ZodFile",(e,t)=>{Zh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Jv(e,r,i,u),e.min=(r,i)=>e.check(st(r,i)),e.max=(r,i)=>e.check(Mt(r,i)),e.mime=(r,i)=>e.check(hr(Array.isArray(r)?r:[r],i))});function Tl(e){return r0(Rl,e)}s(Tl,"Bx"),o(Tl,"file");var Pl=B("ZodTransform",(e,t)=>{Lh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Hv(e,r,i,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Ci(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(te.issue(n,r.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(te.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(n=>(r.value=n,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function zr(e){return new Pl({type:"transform",transform:e})}s(zr,"Cs"),o(zr,"transform");var jn=B("ZodOptional",(e,t)=>{co.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>p0(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function vu(e){return new jn({type:"optional",innerType:e})}s(vu,"Xn"),o(vu,"optional");var Ul=B("ZodExactOptional",(e,t)=>{Vh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>p0(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function zn(e){return new Ul({type:"optional",innerType:e})}s(zn,"Xf"),o(zn,"exactOptional");var ql=B("ZodNullable",(e,t)=>{Jh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>i1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function yu(e){return new ql({type:"nullable",innerType:e})}s(yu,"Hn"),o(yu,"nullable");function Zl(e){return vu(yu(e))}s(Zl,"Zx"),o(Zl,"nullish");var Ll=B("ZodDefault",(e,t)=>{Wh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>s1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Nn(e,t){return new Ll({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}s(Nn,"Qf"),o(Nn,"_default");var Vl=B("ZodPrefault",(e,t)=>{Gh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>a1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Mn(e,t){return new Vl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}s(Mn,"tm"),o(Mn,"prefault");var On=B("ZodNonOptional",(e,t)=>{Kh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>n1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Rn(e,t){return new On({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}s(Rn,"rm"),o(Rn,"nonoptional");var Jl=B("ZodSuccess",(e,t)=>{Hh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Wv(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Wl(e){return new Jl({type:"success",innerType:e})}s(Wl,"qx"),o(Wl,"success");var Gl=B("ZodCatch",(e,t)=>{Xh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>o1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Tn(e,t){return new Gl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(Tn,"im"),o(Tn,"_catch");var Kl=B("ZodNaN",(e,t)=>{Yh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Lv(e,r,i,u)});function Hl(e){return t0(Kl,e)}s(Hl,"Vx"),o(Hl,"nan");var Nr=B("ZodPipe",(e,t)=>{fo.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>l1(e,r,i,u),e.in=t.in,e.out=t.out});function Mr(e,t){return new Nr({type:"pipe",in:e,out:t})}s(Mr,"gs"),o(Mr,"pipe");var Or=B("ZodCodec",(e,t)=>{Nr.init(e,t),ho.init(e,t)});function Xl(e,t,r){return new Or({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(Xl,"Gx"),o(Xl,"codec");function Yl(e){let t=e._zod.def;return new Or({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(Yl,"Jx"),o(Yl,"invertCodec");var Ql=B("ZodPreprocess",(e,t)=>{Nr.init(e,t),Qh.init(e,t)}),ed=B("ZodReadonly",(e,t)=>{eg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>d1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Pn(e){return new ed({type:"readonly",innerType:e})}s(Pn,"um"),o(Pn,"readonly");var td=B("ZodTemplateLiteral",(e,t)=>{tg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Vv(e,r,i,u)});function ud(e,t){return new td({type:"template_literal",parts:e,...te.normalizeParams(t)})}s(ud,"Wx"),o(ud,"templateLiteral");var rd=B("ZodLazy",(e,t)=>{ig.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>p1(e,r,i,u),e.unwrap=()=>e._zod.def.getter()});function Un(e){return new rd({type:"lazy",getter:e})}s(Un,"pm"),o(Un,"lazy");var id=B("ZodPromise",(e,t)=>{rg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>c1(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function nd(e){return new id({type:"promise",innerType:e})}s(nd,"Kx"),o(nd,"promise");var sd=B("ZodFunction",(e,t)=>{ug.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Kv(e,r,i,u)});function Rr(e){return new sd({type:"function",input:Array.isArray(e?.input)?Sn(e?.input):e?.input??fu(gt()),output:e?.output??gt()})}s(Rr,"Xx"),o(Rr,"_function");var Tr=B("ZodCustom",(e,t)=>{ng.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Gv(e,r,i,u)});function ad(e){let t=new de({check:"custom"});return t._zod.check=e,t}s(ad,"Hx"),o(ad,"check");function od(e,t){return i0(Tr,e??(()=>!0),t)}s(od,"Yx"),o(od,"custom");function qn(e,t={}){return n0(Tr,e,t)}s(qn,"hm"),o(qn,"refine");function Zn(e,t){return s0(e,t)}s(Zn,"gm"),o(Zn,"superRefine");var I1=o0,_1=l0;function ld(e,t={}){let r=new Tr({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0,...te.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}s(ld,"t$"),o(ld,"_instanceof");var S1=o((...e)=>d0({Codec:Or,Boolean:kr,String:Dr},...e),"stringbool");function dd(e){let t=Un(()=>Fr([pu(e),xn(),Cn(),An(),fu(t),Fn(pu(),t)]));return t}s(dd,"n$"),o(dd,"json");function cd(e,t){return new Ql({type:"pipe",in:zr(e),out:t})}s(cd,"o$"),o(cd,"preprocess");var dD={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function F1(e){be({customError:e})}s(F1,"PR"),o(F1,"setErrorMap");function j1(){return be().customError}s(j1,"DR"),o(j1,"getErrorMap");var pd;pd||(pd={});var q={...m1,...f1,iso:h0},cD=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function z1(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(z1,"UR"),o(z1,"detectVersion");function N1(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(N1,"LR"),o(N1,"resolveRef");function md(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return q.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return q.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let n=N1(u,t),a=$e(n,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return q.null();if(u.length===0)return q.never();if(u.length===1)return q.literal(u[0]);if(u.every(a=>typeof a=="string"))return q.enum(u);let n=u.map(a=>q.literal(a));return n.length<2?n[0]:q.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return q.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(n=>{let a={...e,type:n};return md(a,t)});return u.length===0?q.never():u.length===1?u[0]:q.union(u)}if(!r)return q.any();let i;switch(r){case"string":{let u=q.string();if(e.format){let n=e.format;n==="email"?u=u.check(q.email()):n==="uri"||n==="uri-reference"?u=u.check(q.url()):n==="uuid"||n==="guid"?u=u.check(q.uuid()):n==="date-time"?u=u.check(q.iso.datetime()):n==="date"?u=u.check(q.iso.date()):n==="time"?u=u.check(q.iso.time()):n==="duration"?u=u.check(q.iso.duration()):n==="ipv4"?u=u.check(q.ipv4()):n==="ipv6"?u=u.check(q.ipv6()):n==="mac"?u=u.check(q.mac()):n==="cidr"?u=u.check(q.cidrv4()):n==="cidr-v6"?u=u.check(q.cidrv6()):n==="base64"?u=u.check(q.base64()):n==="base64url"?u=u.check(q.base64url()):n==="e164"?u=u.check(q.e164()):n==="jwt"?u=u.check(q.jwt()):n==="emoji"?u=u.check(q.emoji()):n==="nanoid"?u=u.check(q.nanoid()):n==="cuid"?u=u.check(q.cuid()):n==="cuid2"?u=u.check(q.cuid2()):n==="ulid"?u=u.check(q.ulid()):n==="xid"?u=u.check(q.xid()):n==="ksuid"&&(u=u.check(q.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),i=u;break}case"number":case"integer":{let u=r==="integer"?q.number().int():q.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),i=u;break}case"boolean":{i=q.boolean();break}case"null":{i=q.null();break}case"object":{let u={},n=e.properties||{},a=new Set(e.required||[]);for(let[d,c]of Object.entries(n)){let p=$e(c,t);u[d]=a.has(d)?p:p.optional()}if(e.propertyNames){let d=$e(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?$e(e.additionalProperties,t):q.any();if(Object.keys(u).length===0){i=q.record(d,c);break}let p=q.object(u).passthrough(),m=q.looseRecord(d,c);i=q.intersection(p,m);break}if(e.patternProperties){let d=e.patternProperties,c=Object.keys(d),p=[];for(let f of c){let h=$e(d[f],t),g=q.string().regex(new RegExp(f));p.push(q.looseRecord(g,h))}let m=[];if(Object.keys(u).length>0&&m.push(q.object(u).passthrough()),m.push(...p),m.length===0)i=q.object({}).passthrough();else if(m.length===1)i=m[0];else{let f=q.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)f=q.intersection(f,m[h]);i=f}break}let l=q.object(u);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall($e(e.additionalProperties,t)):i=l.passthrough();break}case"array":{let u=e.prefixItems,n=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>$e(d,t)),l=n&&typeof n=="object"&&!Array.isArray(n)?$e(n,t):void 0;l?i=q.tuple(a).rest(l):i=q.tuple(a),typeof e.minItems=="number"&&(i=i.check(q.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(q.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(d=>$e(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?$e(e.additionalItems,t):void 0;l?i=q.tuple(a).rest(l):i=q.tuple(a),typeof e.minItems=="number"&&(i=i.check(q.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(q.maxLength(e.maxItems)))}else if(n!==void 0){let a=$e(n,t),l=q.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=q.array(q.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}s(md,"i$"),o(md,"convertBaseSchema");function $e(e,t){if(typeof e=="boolean")return e?q.any():q.never();let r=md(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(c=>$e(c,t)),d=q.union(l);r=i?q.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(c=>$e(c,t)),d=q.xor(l);r=i?q.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:q.any();else{let l=i?r:$e(e.allOf[0],t),d=i?0:1;for(let c=d;c<e.allOf.length;c++)l=q.intersection(l,$e(e.allOf[c],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=q.nullable(r)),e.readOnly===!0&&(r=q.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of n)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))cD.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s($e,"Re"),o($e,"convertSchema");function M1(e,t){if(typeof e=="boolean")return e?q.any():q.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=z1(r,t?.defaultTarget),u=r.$defs||r.definitions||{},n={version:i,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Re};return $e(r,n)}s(M1,"s$"),o(M1,"fromJSONSchema");var O1={};ut(O1,{bigint:s(()=>U1,"bigint"),boolean:s(()=>P1,"boolean"),date:s(()=>q1,"date"),number:s(()=>T1,"number"),string:s(()=>R1,"string")});function R1(e){return ko(Dr,e)}s(R1,"FR"),o(R1,"string");function T1(e){return zo(xr,e)}s(T1,"BR"),o(T1,"number");function P1(e){return Uo(kr,e)}s(P1,"ZR"),o(P1,"boolean");function U1(e){return Zo(Ar,e)}s(U1,"qR"),o(U1,"bigint");function q1(e){return e0(In,e)}s(q1,"VR"),o(q1,"date"),be(bo());var fd=v.object({file:v.string(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),symbol:v.string().optional(),componentName:v.string().optional(),hookName:v.string().optional()}),pD=v.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),Z1=v.object({sessionId:v.string(),browserContextId:v.string().optional(),tabId:v.string().optional(),frameId:v.string().optional(),route:v.string().optional(),url:v.string().optional(),flowId:v.string().optional(),originType:pD.optional(),originNodeId:v.string().optional(),causedByNodeId:v.string().optional(),requestId:v.string().optional(),parentRequestId:v.string().optional(),traceparent:v.string().optional(),projectName:v.string().optional(),userActionId:v.string().optional(),userIdHash:v.string().optional(),tenantIdHash:v.string().optional()}),mD=v.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai","lens"]),fD=v.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),hd=v.enum(["debug","info","warning","error","fatal"]),r_=v.object({id:v.string(),sessionId:v.string(),timestamp:v.number().int().nonnegative(),source:mD,category:fD,severity:hd,context:Z1,fingerprint:v.string(),title:v.string(),message:v.string().optional(),location:fd.optional(),relatedFiles:v.array(v.string()).optional(),relatedUrls:v.array(v.string()).optional(),raw:v.unknown().optional()}),hD=v.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),gD=v.enum(["created","active","completed","disposed","errored"]),i_=v.object({id:v.string(),parentTraceNodeId:v.string().optional(),type:hD,logicalId:v.string().optional(),instanceId:v.string().optional(),generation:v.number().int().nonnegative().optional(),lifecycle:gD,context:Z1,name:v.string(),startTime:v.number().int().nonnegative(),endTime:v.number().int().nonnegative().optional(),durationMs:v.number().nonnegative().optional(),location:fd.optional(),attributes:v.record(v.string(),v.unknown())}),vD=v.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),n_=v.object({id:v.string(),from:v.string(),to:v.string(),axis:vD,type:v.string(),timestamp:v.number().int().nonnegative(),attributes:v.record(v.string(),v.unknown()).optional()}),yD=v.enum(["mount","update"]),ED=v.discriminatedUnion("type",[v.object({type:v.literal("props"),changedKeys:v.array(v.string())}),v.object({type:v.literal("react-state"),hookIndex:v.number().int()}),v.object({type:v.literal("context"),contextName:v.string()}),v.object({type:v.literal("valtio-path"),path:v.string(),changedKeys:v.array(v.string())}),v.object({type:v.literal("parent-render"),parentRenderId:v.string()}),v.object({type:v.literal("hook-dep-changed"),hookInstanceId:v.string(),depsHashBefore:v.string(),depsHashAfter:v.string()}),v.object({type:v.literal("force"),reason:v.string()})]),s_=v.object({phase:yD,actualDurationMs:v.number().nonnegative(),baseDurationMs:v.number().nonnegative(),startTime:v.number().nonnegative(),commitTime:v.number().nonnegative(),why:v.array(ED)}),a_=v.object({hookInstanceId:v.string(),depsHash:v.string(),prevDepsHash:v.string().optional(),durationMs:v.number().nonnegative(),cleanupRan:v.boolean().optional()}),o_=v.object({storeId:v.string(),path:v.string(),changedKeys:v.array(v.string()),beforeHash:v.string(),afterHash:v.string(),preview:v.unknown().optional()}),l_=v.object({method:v.string(),route:v.string(),status:v.number().int().optional(),durationMs:v.number().nonnegative().optional(),traceparent:v.string().optional()}),bD=v.enum(["N+1","sequential-await","growing-allocation"]),d_=v.object({iterations:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),dbCallsInsideLoop:v.number().int().nonnegative(),redisCallsInsideLoop:v.number().int().nonnegative(),awaitedOperationsInsideLoop:v.number().int().nonnegative(),slowestIterations:v.array(v.object({index:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),childNodeIds:v.array(v.string())})).optional(),patterns:v.array(bD).optional()}),wD=v.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),c_=v.object({ownerInstanceId:v.string(),containerKind:wD,fieldName:v.string(),itemCount:v.number().int().nonnegative(),estimatedBytes:v.number().nonnegative(),retainedBytes:v.number().nonnegative().optional(),growthSinceStart:v.number()}),DD=v.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),p_=v.object({ownerNodeId:v.string(),operation:DD,beforeCount:v.number().int().nonnegative(),afterCount:v.number().int().nonnegative(),estimatedDeltaBytes:v.number(),keyPreview:v.string().optional(),valueType:v.string().optional()}),L1=v.object({x:v.number(),y:v.number(),width:v.number().nonnegative(),height:v.number().nonnegative()}),$D=v.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),BD=v.enum(["computed-style","layout","paint-order"]),m_=v.object({causedBy:$D,viewport:L1,layoutSnapshotId:v.string(),styleSnapshotId:v.string(),screenshotId:v.string().optional(),changedNodes:v.array(v.object({uid:v.string(),component:v.string().optional(),change:BD,property:v.string().optional(),before:v.unknown().optional(),after:v.unknown().optional()}))}),xD=v.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),CD=v.enum(["always","after-animation","stable-only","during-animation"]),kD=v.enum(["info","warning","error"]),f_=v.object({ruleId:v.string(),ruleType:xD,severity:kD,timing:CD,element:v.object({uid:v.string(),component:v.string().optional(),rect:L1}),expected:v.record(v.string(),v.unknown()),actual:v.record(v.string(),v.unknown()),evidence:v.object({computedStyle:v.string().optional(),screenshotCrop:v.string().optional(),trace:v.string().optional(),cssCause:v.object({selector:v.string(),file:v.string().optional(),line:v.number().int().optional(),declaration:v.string().optional()}).optional()})}),AD=v.enum(["none","connected"]),ID=v.enum(["running","clean","failing","error"]),_D=v.object({id:v.string(),tool:v.string(),project:v.string().optional(),firstReportedAt:v.number().int().nonnegative(),lastReportedAt:v.number().int().nonnegative(),lastRunStatus:ID,lastRunDurationMs:v.number().int().nonnegative().optional(),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative().optional(),error:v.string().optional()}),Ln=v.object({producer:AD,producers:v.array(_D),lastReportedAt:v.number().int().nonnegative().optional(),ageMs:v.number().int().nonnegative().optional(),stale:v.boolean(),detail:v.string()}),V1=10*6e4;function Vn(e){let t=e.now??Date.now(),r=[...e.producers].sort((c,p)=>p.lastReportedAt-c.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let i=r[0].lastReportedAt,u=Math.max(0,t-i),n=u>V1,a=r.filter(c=>c.lastRunStatus==="failing"),l=r.filter(c=>c.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(c=>c.id).join(", ")}); newest report ${J1(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(c=>`${c.id} \u2014 ${c.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),n&&d.push(`Older than ${Math.round(V1/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:i,ageMs:u,stale:n,detail:d.join(" ")}}s(Vn,"Yr"),o(Vn,"summariseProducers");function J1(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(J1,"dE"),o(J1,"describeAge");var Eu=v.object({$schema:v.string().optional(),schemaVersion:v.literal(1),revision:v.number().int().nonnegative(),updatedAt:v.string().datetime().optional()}),SD=v.enum(["starting","clean","warning","failing"]),W1=v.object({source:v.string(),severity:hd,title:v.string(),fingerprint:v.string(),resource:v.string(),pageId:v.string().optional(),flowId:v.string().optional(),location:fd.optional(),rule:v.string().optional(),fix:v.string().optional(),verify:v.string().optional(),docs:v.string().optional()}),FD=v.object({typecheck:v.enum(["passed","failed","unknown"]).optional(),lint:v.enum(["passed","failed","unknown"]).optional(),build:v.enum(["passed","failed","unknown"]).optional(),runtime:v.enum(["passed","failed","warning","unknown"]).optional(),visual:v.enum(["passed","failed","warning","unknown"]).optional(),memory:v.enum(["passed","failed","warning","unknown"]).optional()}),jD=v.enum(["embedded","shared"]),zD=v.object({mode:jD,pid:v.number(),startedAt:v.string(),url:v.string().optional()}),h_=Eu.extend({sessionId:v.string(),status:SD,activeTab:v.string().optional(),tabsWithIssues:v.array(v.string()).optional(),blocking:v.array(W1),warnings:v.array(W1).default([]),suggestedReads:v.array(v.string()),checks:FD.optional(),server:zD.optional()}),ND=v.object({eventsResident:v.number().int().nonnegative(),eventsResidentBytes:v.number().int().nonnegative(),eventsIngested:v.number().int().nonnegative(),eventsDropped:v.number().int().nonnegative(),eventsDroppedForBytes:v.number().int().nonnegative().optional(),eventCap:v.number().int().nonnegative().optional(),eventByteCap:v.number().int().nonnegative().optional(),artifactsResident:v.number().int().nonnegative().optional(),artifactsResidentBytes:v.number().int().nonnegative().optional(),artifactsDropped:v.number().int().nonnegative().optional(),artifactByteCap:v.number().int().nonnegative().optional(),truncatedEvents:v.number().int().nonnegative().optional(),truncatedBytesReclaimed:v.number().int().nonnegative().optional(),rawByteLimit:v.number().int().nonnegative().optional(),reducers:v.record(v.string(),v.object({residentEvents:v.number().int().nonnegative(),residentBytes:v.number().int().nonnegative(),evictedEvents:v.number().int().nonnegative(),evictedForBytes:v.number().int().nonnegative(),eventCap:v.number().int().nonnegative(),byteCap:v.number().int().nonnegative()})).optional()}),g_=Eu.extend({sessionId:v.string(),supportedResources:v.array(v.string()),supportedTools:v.array(v.string()),supportedJobs:v.array(v.string()),supportedChannels:v.array(v.string()),subscribedByDefault:v.array(v.string()),transports:v.array(v.enum(["stdio","http","socket"])),host:v.object({platform:v.string(),node:v.string()}),project:v.object({name:v.string(),nxVersion:v.string().optional()}),storage:ND.optional()}),MD=v.object({id:v.string(),timestamp:v.number().int().nonnegative(),message:v.string(),fingerprint:v.string(),code:v.string().optional(),rule:v.string().optional(),severity:hd.optional(),file:v.string().optional(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),project:v.string().optional()}),v_=Eu.merge(Ln).extend({status:v.enum(["unknown","clean","failing"]),errorCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),y_=Eu.merge(Ln).extend({errors:v.array(MD)}),E_=Eu.merge(Ln).extend({status:v.enum(["unknown","clean","warning","failing"]),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),b_=Eu.merge(Ln).extend({status:v.enum(["unknown","clean","warning","failing"]),hmrUpdates:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),Pr=Symbol.for("@lensmcp/session/Session"),Ur=Symbol.for("@lensmcp/core/EventBus"),OD=Symbol.for("@lensmcp/core/GraphStore"),Z=Symbol.for("@lensmcp/core/ResourceStore"),RD=Symbol.for("@lensmcp/storage/Storage"),TD="capture-request.json",PD="capture-runner.json",UD="capture-rules.json",gd="__lensmcpTruncation",qD="__lensmcpTruncated";function Xe(e,t=Number.POSITIVE_INFINITY,r=12){return Ut(e,t,r,32)}s(Xe,"We"),o(Xe,"estimateJsonBytes");function vd(e,t,r=12){return Ut(e,t,r,Number.POSITIVE_INFINITY)>t}s(vd,"Zs"),o(vd,"exceedsJsonByteBudget");function Ut(e,t,r,i){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return i;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=Ut(e[l],t-a,r-1,i)+1,a>t)return a;return a}let u=2,n=e;for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;let l=Ut(n[a],t-u,r-1,i);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(Ut,"en"),o(Ut,"walk");function Jn(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(Jn,"bm"),o(Jn,"record");function G1(e,t,r){return Jn(e,r),{[qD]:!0,originalBytes:Xe(t,Number.POSITIVE_INFINITY,64)}}s(G1,"yE"),o(G1,"stub");function K1(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s(K1,"bE"),o(K1,"isScalar");function bu(e,t,r,i){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let n=Math.max(0,u-64);return Jn(t,i),t.budget-=n,`${e.slice(0,n)}\u2026[lensmcp truncated: ${e.length-n} more chars]`}return e===null||typeof e!="object"?(t.budget-=Ut(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?G1(t,e,i):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?H1(e,t,r,i):X1(e,t,r,i)}s(bu,"tn"),o(bu,"clampValue");function H1(e,t,r,i){let u=[],n=Math.min(e.length,t.maxArrayItems);for(let a=0;a<n&&!(t.budget<=0);a++)u.push(bu(e[a],t,r-1,`${i}[${a}]`));return u.length<e.length&&Jn(t,`${i}[] (+${e.length-u.length} items dropped)`),u}s(H1,"wE"),o(H1,"clampArray");function X1(e,t,r,i){let u={},n,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],c=Ut(d,512,r-1,Number.POSITIVE_INFINITY);if(c<=512&&(!a||K1(d))){u[l]=d,t.budget-=l.length+4+c;continue}(n??=[]).push({key:l,bytes:c})}if(!n)return u;n.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of n){let d=i?`${i}.${l}`:l;u[l]=bu(e[l],t,r-1,d)}return u}s(X1,"xE"),o(X1,"clampObject");function Y1(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!vd(e,r,i)){let d=Xe(e,r,i),c={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:bu(e,c,i,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=Xe(e,Number.POSITIVE_INFINITY,64),n={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=bu(e,n,i,""),l=Xe(a,Number.POSITIVE_INFINITY,i);if(n.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:n.paths};a[gd]=d}return{value:a,truncated:n.truncatedAnything,originalBytes:u,keptBytes:l,paths:n.paths}}s(Y1,"wm"),o(Y1,"boundedClone");function qt(e,t){if(e.size<=t)return 0;let r=0,i=e.keys();for(;e.size>t;){let u=i.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(qt,"tt"),o(qt,"capMap");var qr=256,wu="error-dismissed",Wn="error-restored",Q1="lens",ZD=new Set(["dashboard","cli","agent"]);function yd(e){if(e.source!==Q1||!e.raw||typeof e.raw!="object")return;let t=e.raw,r=t.groupId;if(typeof r!="string"||r.length===0||r.length>2048)return;if(t.kind===Wn)return{kind:Wn,groupId:r};if(t.kind!==wu)return;let i=t.until;if(typeof i!="number"||!Number.isFinite(i))return;let u=Array.isArray(t.eventIds)?t.eventIds.filter(c=>typeof c=="string"&&c.length>0).slice(0,200):[],n=ZD.has(t.by)?t.by:void 0,a=o((c,p)=>typeof c=="string"&&c.trim()?c.trim().slice(0,p):void 0,"text"),l=a(t.reason,500),d=a(t.title,300);return{kind:wu,groupId:r,until:Math.min(i,e.timestamp),eventIds:u,...n?{by:n}:{},...l?{reason:l}:{},...d?{title:d}:{}}}s(yd,"qs"),o(yd,"readErrorDismissal");var LD=["pod-memory","pod-memory-retained","pod-memory-released","pod-memory-exited"];function Gn(e){if(!e||typeof e!="object")return;let t=e;if(LD.includes(t.kind)&&!(typeof t.project!="string"||!t.project)&&!(typeof t.pod!="number"||typeof t.pid!="number")&&!(t.kind==="pod-memory"&&(typeof t.live!="number"||!Number.isFinite(t.live)))&&!((t.kind==="pod-memory-retained"||t.kind==="pod-memory-released")&&typeof t.gen!="number"))return e}s(Gn,"nn"),o(Gn,"asPodMemoryRaw");var VD=["perf-rule-finding","perf-rule-retracted","perf-rule-scan"],Ed="https://github.com/kiwiapps-ltd/lensmcp/blob/main/docs/lensmcp/concepts/memory-and-build-cost.mdx",e3={"bundle/heavy-barrel-import":`${Ed}#bundleheavy-barrel-import`,"pod/heap-budget":`${Ed}#podheap-budget`,"pod/retained-generation":`${Ed}#podretained-generation`};function t3(e,t,r){return`perf-rule:${e}:${t}:${r}`}s(t3,"g$"),o(t3,"perfRuleFingerprint");var JD=/^[a-z][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/,WD=12,GD=4e3,vt=o((e,t=GD)=>typeof e=="string"&&e.length>0&&e.length<=t,"isText");function u3(e){if(!e||typeof e!="object")return;let t=e;if(!VD.includes(t.kind)||typeof t.rule!="string"||!JD.test(t.rule)||!vt(t.project,512))return;if(t.kind==="perf-rule-scan"){let i=t.open;return!Array.isArray(i)||i.length>256||!i.every(u=>vt(u,512))?void 0:e}if(!vt(t.subject,512))return;if(t.kind==="perf-rule-retracted")return e;if(t.severity!=="warning"&&t.severity!=="error"||!vt(t.title)||!vt(t.summary)||!vt(t.verify)||!vt(t.docs,1024))return;let r=t.fix;if(!(!Array.isArray(r)||r.length===0||r.length>WD||!r.every(i=>vt(i)))&&!(!t.evidence||typeof t.evidence!="object"||Array.isArray(t.evidence))&&!(!t.cost||typeof t.cost!="object"||Array.isArray(t.cost)))return e}s(u3,"v$"),o(u3,"asPerfRuleRaw");function bd(e){let{source:t,category:r,title:i,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(i)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(bd,"Sm"),o(bd,"areaOf");var r3=240,KD=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),HD=new Set(["tenantId","caller","userId","accountId","email","subject"]),XD=8;function i3(e){let t=Kn(e,0);return Y1(Zu({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s(i3,"jE"),o(i3,"aiProjection");function Kn(e,t){if(typeof e=="string")return n3(e);if(e===null||typeof e!="object")return e;if(t>=XD)return;if(Array.isArray(e))return e.slice(0,32).map(i=>Kn(i,t+1));let r={};for(let[i,u]of Object.entries(e))if(!HD.has(i)){if(KD.has(i)){typeof u=="string"?r[`${i}Chars`]=u.length:Array.isArray(u)?r[`${i}Count`]=u.length:u!=null&&(r[`${i}Present`]=!0);continue}r[i]=Kn(u,t+1)}return r}s(Kn,"km"),o(Kn,"projectAi");function n3(e){return e.length<=r3?dt(e):`${dt(e.slice(0,r3))}\u2026`}s(n3,"zE"),o(n3,"clipText");function s3(e,t={}){let r=e.raw??{},i=r.render??{},u=r.span??{},n=r.request??{},a=o(y=>typeof y=="number"?y:void 0,"num"),l=r.loop??{},d=r.effect??{},c=a(r.durationMs)??a(u.durationMs)??a(n.durationMs)??a(l.durationMs)??a(i.actualDurationMs)??a(d.durationMs),p=typeof r.kind=="string"?r.kind:void 0,m=p==="fetch-done"||p==="fetch-error",f=a(i.commitTime),h=p==="render"&&f!==void 0&&Math.abs(f-e.timestamp)<6e4,g=m?e.timestamp:h?f:a(r.startedAt)??a(u.startTime)??a(n.startedAt)??a(l.startedAt)??(c!==void 0?e.timestamp-c:e.timestamp),b;if(typeof r.query=="string"){let y=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",D=typeof r.result=="string"?` \u2192 ${r.result}`:"";b=r.query+y+D}else if(typeof r.command=="string"){let y=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";b=r.command+y}else if(p==="state-update"){let y=r.update??{},D="";try{D=JSON.stringify(y.preview)}catch{}b=`${y.storeId??""}.${y.path??""} = ${D}`}else p==="queue-completed"&&typeof r.returned=="string"?b=`returned ${r.returned}`:p==="queue-enqueued"&&(b=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let x;if(p==="gateway-request")x=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(p==="fetch-start"||p==="fetch-done"||p==="fetch-error")try{let y=new URL(String(r.href??r.url??""));x=`${y.hostname}${y.pathname}`}catch{}let $;if(p==="gateway-request"&&Array.isArray(r.steps))$=r.steps.map(y=>{let D=[String(y.step)];return y.project&&D.push(String(y.project)),y.prefix&&D.push(String(y.prefix)),y.mode&&D.push(String(y.mode)+(y.ok===!1?" \u2717":y.ok===!0?" \u2713":"")),y.caller&&D.push("by "+String(y.caller)),y.pod&&D.push(String(y.pod)),typeof y.atMs=="number"&&D.push(`@${y.atMs}ms`),D.join(" ")}),b=$.map(y=>y.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(p==="egress")b=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(p==="ai-call"){let y=r.usage??{},D=y.promptTokens!==void 0||y.completionTokens!==void 0?` \xB7 ${a(y.promptTokens)??"?"}\u2192${a(y.completionTokens)??"?"} tok`:"",A=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",j=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",N=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";b=`${r.provider??""}/${r.model??"?"}${D}${A}${j}${N}${r.stream===!0?" \xB7 stream":""}`}else if(p==="ai-round"){let y=r.model??{},D=r.usage??{},A=Array.isArray(r.toolCalls)?r.toolCalls:[],j=`${a(D.promptTokens)??"?"}\u2192${a(D.completionTokens)??"?"} tok`,N=A.length?` \xB7 ${A.length} tool call${A.length===1?"":"s"}`:"",K=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";b=`${y.provider??""}/${y.model??""} \xB7 ${j}${N}${K}`}else if(p==="ai-turn-start"){let y=Array.isArray(r.tools)?r.tools:[];b=`skill ${r.skill??""} \xB7 ${r.output??""}${y.length?" \xB7 tools: "+y.join(", "):""}`}else if(p==="ai-tool-call"){let y=r.call??{},D=r.result??{},A=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";b=`${y.name??"tool"} ${D.error!=null?"\u2717 "+String(D.error):"\u2713"}${A}`}else if(p==="ai-turn-end"){let y=r.usage??{},D=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",A=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";b=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(y.promptTokens)??"?"}+${a(y.completionTokens)??"?"} tok${D}${A}`}}let w;p==="db-query"&&typeof r.query=="string"?w=r.query:p==="redis-op"?w=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:p==="egress"?w=`${r.method??"GET"} ${r.host??""}`:p==="ai-call"?w=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:p==="queue-enqueued"?w=`enqueue ${r.queue??""}`:p==="span"&&typeof u.name=="string"?w=u.name:p==="memory-mutation"&&(w=e.title);let k=e.context??{},C=i.commitId??d.commitId??r.commitId,M=Array.isArray(i.why)?i.why.map(y=>typeof y?.type=="string"?y.type:void 0).filter(y=>!!y):[];return{id:e.id,t:e.timestamp,start:g,...w?{sig:w}:{},...x?{urlKey:x}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:p,area:bd({source:e.source,category:e.category,title:e.title,kind:p}),...typeof u.role=="string"?{role:u.role}:{},...typeof k.requestId=="string"?{requestId:k.requestId}:{},...typeof k.parentRequestId=="string"?{parentRequestId:k.parentRequestId}:{},...typeof C=="string"?{commitId:C}:{},...typeof i.componentName=="string"?{component:i.componentName}:{},...typeof i.phase=="string"?{phase:i.phase}:{},...M.length?{why:M}:{},...p==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...p==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...p==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof k.projectName=="string"?{project:k.projectName}:typeof r.project=="string"?{project:r.project}:{},...c!==void 0?{durationMs:c}:{},...m&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:i3(r)}:{},...b?{detail:b}:{},...$?{steps:$}:{}}}s(s3,"OE"),o(s3,"trimFlowEvent");var a3=1;function o3(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(o3,"ME"),o(o3,"kindRank");function Du(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:o3(e.kind)}s(Du,"uo"),o(Du,"causalRank");function Hn(e,t={}){let r=xi(e),i=e.slice().filter(E=>{let _=E.raw??{},I=typeof _.kind=="string"?_.kind:"";if(I==="subscription-added"||I==="subscription-removed"||I==="hook-run"||I==="store-created"||I==="singleton-instance"||I===da)return!1;let S=_.span;return!(typeof S?.name=="string"&&S.name.startsWith("nest.request "))}).map(E=>s3(E,t)),u=new Set;for(let E=i.length-1;E>=0;E--)u.has(i[E].id)?i.splice(E,1):u.add(i[E].id);let n=new Map;for(let E of i)(E.kind==="gateway-request"||E.kind==="queue-process")&&E.requestId&&!n.has(E.requestId)&&n.set(E.requestId,E.start);let a=o(E=>E.source!=="react"&&E.source!=="valtio"&&E.requestId&&n.has(E.requestId)?n.get(E.requestId):E.start,"anchorOf");i.sort((E,_)=>a(E)-a(_)||E.start-_.start||Du(E)-Du(_)||(_.durationMs??0)-(E.durationMs??0)||E.t-_.t);let l=o(E=>(E.kind==="span"||E.kind==="server-request"||E.kind==="gateway-request"||E.kind==="queue-process")&&(E.durationMs??0)>0,"spanLike"),d=i;for(let E of d)E.group=E.source==="react"||E.source==="valtio"||E.source==="client-runtime"||E.source==="visual"?"browser":"server";let c=new Map;for(let E of d)if((E.kind==="gateway-request"||E.kind==="queue-process")&&E.requestId&&E.project){let _=c.get(E.requestId)??[];_.push({project:E.project,start:E.start,end:E.start+(E.durationMs??0)}),c.set(E.requestId,_)}let p=o((E,_)=>{let I=c.get(E);if(I?.length)return I.every(S=>S.project===I[0].project)?I[0].project:I.filter(S=>S.start<=_+1&&S.end>=_-1).sort((S,U)=>U.start-S.start)[0]?.project},"projectOf");for(let E of d)if(!E.project&&E.source==="nestjs"&&E.requestId){let _=p(E.requestId,E.start);_&&(E.project=_)}for(let E of d){let _,I=E.requestId;for(let S of d){if(S===E||!l(S)||S.group!==E.group||S.requestId!==I)continue;let U=S.project,W=E.project;if(S.kind!=="gateway-request"&&E.kind!=="gateway-request"&&U!==void 0&&W!==void 0&&U!==W)continue;let ue=S.durationMs??0,re=E.durationMs??0,L=Math.abs(S.start-E.start)<=a3,V=Du(S),Y=Du(E),ne=S.start<=E.start;if(!(S.start+ue>E.start&&(ne||L&&V<Y)&&(!L||(V!==Y?V<Y:ne&&ue>re))))continue;let Ee=_?Du(_):-1,me=_?Math.abs(S.start-_.start)<=a3:!1;(!_||!me&&S.start>_.start||me&&V>Ee||me&&V===Ee&&(S.durationMs??0)<(_.durationMs??0))&&(_=S)}_&&(E.parent=_.id)}let m=new Map;for(let E of d){if(!E.requestId)continue;let _=m.get(E.requestId);_?_.push(E):m.set(E.requestId,[E])}let f=new Map(d.map(E=>[E.id,E])),h=o((E,_)=>{let I=(m.get(E)??[]).filter(S=>l(S)&&S.start<=_&&S.start+(S.durationMs??0)>=_);if(I.length!==0)return I.sort((S,U)=>U.start-S.start||(S.durationMs??0)-(U.durationMs??0)),I[0]},"callerNodeFor");for(let E of d){if(!E.parentRequestId||E.kind!=="server-request"&&E.kind!=="gateway-request")continue;let _=E.parent?f.get(E.parent):void 0;if(_&&_.requestId===E.requestId)continue;let I=h(E.parentRequestId,E.start);I&&I!==E&&I.start<=E.start&&(E.parent=I.id)}let g=d,b=new Map;for(let E of g)E.kind==="gateway-request"&&E.requestId&&!b.has(E.requestId)&&b.set(E.requestId,E);for(let E of g)if(E.group==="server"&&!E.parent&&E.requestId&&E.kind!=="gateway-request"){let _=b.get(E.requestId);_&&_!==E&&_.start<=E.start&&(E.parent=_.id)}let x=new Set,$=new Set,w=[];for(let E of g){if(E.kind!=="gateway-request")continue;if(!E.requestId){w.push(E);continue}let _=m.get(E.requestId)??[];if(_.filter(U=>U.kind==="gateway-request").sort((U,W)=>U.start-W.start)[0]!==E)continue;let I=_.find(U=>U.kind==="fetch-start"),S=_.find(U=>U.kind==="fetch-done"||U.kind==="fetch-error");if(!I&&!S){w.push(E);continue}I&&(E.fetchStartId=I.id,x.add(I.id)),S&&(E.fetchDoneId=S.id,$.add(S.id))}let k=new Map;for(let E of g){if(!E.urlKey)continue;let _=k.get(E.urlKey)??{gws:[],starts:[],dones:[]};E.kind==="gateway-request"?w.includes(E)&&_.gws.push(E):E.kind==="fetch-start"?x.has(E.id)||_.starts.push(E):(E.kind==="fetch-done"||E.kind==="fetch-error")&&($.has(E.id)||_.dones.push(E)),k.set(E.urlKey,_)}for(let{gws:E,starts:_,dones:I}of k.values()){E.sort((U,W)=>U.start-W.start),_.sort((U,W)=>U.start-W.start);let S=new Set;E.forEach((U,W)=>{let ue=_[W];ue&&(U.fetchStartId=ue.id);let re=ue?ue.t:U.start,L,V=1/0;for(let Y of I){if(S.has(Y.id))continue;let ne=Y.fetchStartedAt??Y.start-(Y.durationMs??0),Ee=Math.abs(ne-re);Ee<V&&(V=Ee,L=Y)}L&&(U.fetchDoneId=L.id,S.add(L.id))})}let C=new Map,M=new Map;for(let E of g)!E.queue||!E.jobId||(E.kind==="queue-enqueued"&&C.set(`${E.queue}#${E.jobId}`,E),E.kind==="queue-process"&&M.set(`${E.queue}#${E.jobId}`,E));for(let E of g){if(!E.queue||!E.jobId)continue;let _=`${E.queue}#${E.jobId}`;if(E.kind==="queue-process"&&!E.parent){let I=C.get(_);I&&I!==E&&I.start<=E.start&&(E.parent=I.id)}else if(E.kind==="queue-active"||E.kind==="queue-completed"||E.kind==="queue-failed"){let I=M.get(_);I&&I!==E&&I.start<=E.start&&(E.parent=I.id)}}let y=d;{let E=new Map;for(let I of y)I.kind==="fetch-start"&&E.set(I.id,I);let _=new Map;for(let I of y){if(I.kind!=="fetch-done"&&I.kind!=="fetch-error")continue;let S=[...E.values()].find(ue=>ue.requestId&&ue.requestId===I.requestId)?.id,U=S?E.get(S):void 0;if(!U)continue;let W=I.fetchStartedAt??U.start;U.title=I.title,U.severity=I.severity,U.durationMs=I.durationMs??Math.max(0,I.t-W),U.kind="fetch",I.detail&&!U.detail&&(U.detail=I.detail),_.set(I.id,U.id)}if(_.size>0){y=y.filter(I=>!_.has(I.id));for(let I of y)for(I.fetchDoneId&&_.has(I.fetchDoneId)&&(I.fetchDoneId=_.get(I.fetchDoneId));I.parent&&_.has(I.parent);)I.parent=_.get(I.parent)}}let D=o(E=>!!E.commitId&&(E.kind==="render"||E.kind==="effect-run"||E.kind==="render-commit-truncated"),"commitMember"),A=o(E=>[...new Set(E)],"uniq"),j=o(E=>A(E.map(_=>_.component).filter(_=>!!_)),"named"),N=o(E=>E.length<=2?E.join(" + "):`${E[0]} + ${E.length-1} more`,"nameList"),K=o(E=>{let _=new Map;for(let I of E)I.component&&_.set(I.component,(_.get(I.component)??0)+1);return[..._].map(([I,S])=>S>1?`${I} \xD7${S}`:I).join(", ")},"tally"),H=o(E=>{if(!E)return"effect";let _=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(E);return _?`${_[1]}:${_[2]}`:E},"shortHook"),ye=o(E=>`${H(E.hook)}${E.cleanup?" (cleanup)":""}`,"hookLabel"),Ze=o(E=>{let _=Math.min(...E.map(S=>S.start)),I=Math.max(...E.map(S=>S.start+(S.durationMs??0)));return{start:_,durationMs:I-_}},"extent"),Je=o(E=>(delete E.component,delete E.why,delete E.phase,delete E.hook,delete E.cleanup,delete E.renderTotal,delete E.renderPublished,E),"asGroup");function It(E){let _=E[0],I=E.filter(he=>he.kind==="render"),S=E.filter(he=>he.kind==="effect-run"),U=E.find(he=>he.kind==="render-commit-truncated"),W=[...I].sort((he,qu)=>(qu.durationMs??0)-(he.durationMs??0)),ue=W.filter(he=>(he.why??[]).some(qu=>qu!=="parent-render")),re=A(ue.flatMap(he=>(he.why??[]).filter(qu=>qu!=="parent-render"))),L=j(ue),V=I.filter(he=>he.phase==="mount"),Y=I.filter(he=>he.phase!=="mount"&&!ue.includes(he)),ne=W[0]?.component??"view",Ee=I.length>0&&V.length===I.length,me=re.length?re.join(" + "):void 0,_t=Ee?"mount":"update",St=L.length?`view update \xB7 ${N(L)} \u2190 ${me}`:Ee?`view mount \xB7 ${ne}`:`view update \xB7 ${ne}`,Pm=U?.renderTotal??I.length,n5=[V.length?`mounted ${K(V)}`:"",Y.length?`re-rendered ${K(Y)}`:"",!L.length&&!Ee&&I.length?"trigger not recorded \u2014 every captured render came from its parent":"",U?`${Pm} renders, ${U.renderPublished??I.length} recorded (per-commit cap)`:`${I.length} render${I.length===1?"":"s"}`,S.length?`${S.length} effect${S.length===1?"":"s"}: ${S.map(ye).join(", ")}`:""].filter(Boolean).join(" \xB7 "),Um=j(I);return Je({..._,...Ze(E),kind:"view-update",title:St,detail:n5,commitId:_.commitId,viewPhase:_t,...me?{cause:me}:{},causeComponents:L,components:Um,mounted:j(V),renderCount:Pm,recordedRenders:I.length,effects:S.length,effectHooks:S.map(ye),memberIds:E.map(he=>he.id),sig:`commit:${_t}:${me??"-"}:${L.join(",")}:${Um.slice().sort().join(",")}`,severity:E.some(he=>he.severity==="error")?"error":_.severity})}s(It,"pr"),o(It,"viewUpdateNode");function tt(E){let _=E[0],I=E.map(ye);return Je({..._,...Ze(E),kind:"commit-effects",title:E.length===1?`effect \xB7 ${I[0]}`:`effects \xB7 ${I[0]} + ${E.length-1} more`,detail:I.join(", "),commitId:_.commitId,effects:E.length,effectHooks:I,memberIds:E.map(S=>S.id),sig:`effects:${I.slice().sort().join(",")}`})}s(tt,"_t"),o(tt,"effectsNode");let $i=o(E=>A(E.map(_=>_==="state-update"?"state update":_==="fetch-start"?"request":_==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function Uu(E,_){let I=E[0],S=E[E.length-1],U=E.length,W=I.detail,ue=Math.min(...E.map(Y=>Y.start)),re=Math.max(...E.map(Y=>Y.start+(Y.durationMs??0))),L=Math.round(E.reduce((Y,ne)=>Y+(ne.durationMs??0),0)/U*10)/10,V=Math.round((re-ue)*10)/10;I.count=U,I.avgMs=L,I.wallMs=V,I.durationMs=re-ue,I.items=E.slice(0,12).map(Y=>({start:Y.start-ue,...Y.durationMs!=null?{durationMs:Y.durationMs}:{}})),I.memberIds=E.flatMap(Y=>Y.memberIds??[Y.id]),I.title=`\xD7${U} ${I.title}`,E.some(Y=>Y.severity==="error")&&(I.severity="error"),I.kind==="view-update"?I.detail=[`${U} commits, ${_.length?`one per ${$i(_)}`:"back to back"}`,`avg ${L}ms \xB7 wall ${V}ms`,W??""].filter(Boolean).join(" \xB7 "):I.kind==="state-update"&&W&&S.detail?I.detail=`${U} updates in a row \xB7 wall ${V}ms \xB7 first ${W} \xB7 last ${S.detail}`:I.detail=[`${U} in a row \xB7 wall ${V}ms`,W??""].filter(Boolean).join(" \xB7 ")}s(Uu,"ei"),o(Uu,"collapseRepeat");let Oe=[],Bi=new Map,Rm=new Set;for(let E=0;E<y.length;E++){if(Rm.has(E))continue;let _=y[E];if(!D(_)){Oe.push(_);continue}let I=[E];for(let W=E+1;W<y.length;W++){let ue=y[W];if(ue.group==="browser"){if(!D(ue)||ue.commitId!==_.commitId)break;I.push(W)}}for(let W of I)Rm.add(W);let S=I.map(W=>y[W]),U=S.some(W=>W.kind!=="effect-run")?It(S):tt(S);for(let W of S)W.id!==U.id&&Bi.set(W.id,U.id);Oe.push(U)}if(Bi.size>0||Oe.some(E=>E.kind==="view-update"||E.kind==="commit-effects")){y=Oe;for(let E of y)for(;E.parent&&Bi.has(E.parent);)E.parent=Bi.get(E.parent)}{let E=new Map;for(let _ of y)_.kind==="view-update"&&_.commitId&&!E.has(_.commitId)&&E.set(_.commitId,_);for(let _ of y){if(_.kind!=="commit-effects"||_.parent||!_.commitId)continue;let I=E.get(_.commitId);I&&I.start<=_.start&&(_.parent=I.id)}}{let E=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),_=y.map((L,V)=>L.group==="browser"?V:-1).filter(L=>L>=0),I=o(L=>`${L.kind}|${L.sig??L.title}`,"keyOf"),S=_.map(L=>I(y[L])),U=o((L,V,Y)=>{for(let ne=0;ne<Y;ne++)if(S[L+ne]!==S[V+ne])return!1;return!0},"sameBlock"),W=o(L=>S[L].split("|")[0],"kindAt"),ue=o(L=>{let V=0,Y=1;for(let ne=1;ne<=4&&L+ne<=S.length;ne++){let Ee=1;for(;L+(Ee+1)*ne<=S.length&&U(L,L+Ee*ne,ne);)Ee+=1;Ee>=3&&ne*Ee>V*Y&&(V=ne,Y=Ee)}return{k:V,r:Y}},"bestBlockAt"),re=new Map;for(let L=0;L<S.length;){let{k:V,r:Y}=ue(L);if(V===0){L+=1;continue}let ne=[...Array(V).keys()].find(me=>E.has(W(L+me)));if(ne!==void 0&&ne>0){let me=ue(L+ne);if(me.k===V&&me.r>=3&&me.r>=Y-1){L+=ne;continue}}let Ee=S.slice(L,L+V).map(me=>me.split("|")[0]).filter(me=>E.has(me));for(let me=0;me<V;me++){let _t=[];for(let St=0;St<Y;St++)_t.push(y[_[L+me+St*V]]);Uu(_t,Ee);for(let St of _t.slice(1))re.set(St.id,_t[0].id)}L+=V*Y}if(re.size>0){y=y.filter(L=>!re.has(L.id));for(let L of y)for(;L.parent&&re.has(L.parent);)L.parent=re.get(L.parent)}}{let E=new Map(y.map(_=>[_.id,_]));for(let _ of y){let I=new Set([_.id]),S=_;for(;S?.parent;){if(I.has(S.parent)){S.parent=void 0;break}I.add(S.parent),S=E.get(S.parent)}}}let Tm=o(E=>{let _=new Map;for(let S of y){if(!S.sig||l(S)!==E||S.kind==="server-request"||S.kind==="gateway-request"||S.group==="browser")continue;let U=`${S.parent??"root"}|${S.kind}|${S.sig}`,W=_.get(U);W?W.push(S):_.set(U,[S])}let I=new Map;for(let S of _.values()){if(S.length<3)continue;S.sort((V,Y)=>V.start-Y.start);let U=S[0],W=!1;for(let V=0;V+1<S.length;V++)if(S[V+1].start<S[V].start+(S[V].durationMs??0)){W=!0;break}let ue=U.start,re=Math.max(...S.map(V=>V.start+(V.durationMs??0))),L=S.reduce((V,Y)=>V+(Y.durationMs??0),0);U.count=S.length,U.parallel=W,U.avgMs=Math.round(L/S.length*10)/10,U.wallMs=re-ue,U.durationMs=re-ue,U.title=`\xD7${S.length} ${U.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,U.detail=`${U.sig} \xD7${S.length} ${W?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${U.avgMs}ms \xB7 wall ${U.wallMs}ms`,U.items=S.slice(0,12).map(V=>({start:V.start-ue,...V.durationMs!=null?{durationMs:V.durationMs}:{}})),U.memberIds=S.flatMap(V=>V.memberIds??[V.id]),S.some(V=>V.severity==="error")&&(U.severity="error");for(let V of S.slice(1))I.set(V.id,U.id)}if(I.size!==0){y=y.filter(S=>!I.has(S.id));for(let S of y)for(;S.parent&&I.has(S.parent);)S.parent=I.get(S.parent)}},"aggregatePass");Tm(!0),Tm(!1);for(let E of y){if(!l(E))continue;let _=E.durationMs??0;if(_<40)continue;let I=y.filter(re=>re.parent===E.id&&(re.durationMs??0)>0).map(re=>[re.start,re.start+(re.durationMs??0)]).sort((re,L)=>re[0]-L[0]),S=0,U=-1,W=-1;for(let[re,L]of I)re>W?(W>U&&(S+=W-U),U=re,W=L):L>W&&(W=L);W>U&&(S+=W-U);let ue=Math.max(0,_-S);(ue>=50||ue/_>=.7&&_>=40)&&(E.selfMs=ue,E.detail=`\u26A0 cpu-heavy: ${ue}ms self-time of ${_}ms${E.detail?" \xB7 "+E.detail:""}`)}return{events:y,...r?{sql:r}:{}}}s(Hn,"lo"),o(Hn,"buildFlowDetail");var Xn=["user-action","page-load","navigation","api","ai","background","test","system","other"],Yn=new Map;function $u(e,t){let r=Yn.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),Yn.size>500&&Yn.clear(),Yn.set(e,r)),r.test(t)}s($u,"po"),o($u,"globMatch");var YD=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function l3(e,t){return t.some(r=>r.route?YD(e)?$u(e,`${r.method??"GET"} ${r.route}`):$u(e,r.route):!1)}s(l3,"PE"),o(l3,"routeMatches");function wd(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!$u(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&$u(e.origin,t.origin.nodeId))||e.route!==void 0&&!l3(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(i=>$u(e.project,i))))}s(wd,"w$"),o(wd,"ruleMatches");var Dd=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),yt=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Qn=o(e=>Dd(e.raw)?yt(e.raw.kind)??"":"","kindOf");function d3(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>Qn(l)==="flow-origin"),i=r??t.find(l=>yt(l.context?.originType));if(!i)return{};let u=Dd(i.raw)?i.raw:{},n=yt(i.context?.originType)??(r?yt(i.title):void 0),a=yt(u.originNodeId)??yt(i.context?.originNodeId);return{...n?{type:n}:{},...a?{nodeId:a}:{}}}s(d3,"DE"),o(d3,"originOf");var QD=/^(verify|e2e|test|smoke|load)[-_:]/i,e$=o((e,t)=>QD.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),c3={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},t$=new Set(["page-load","user-action","navigation"]),u$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function es(e){return e.replace(/[?#].*$/,"").split("/").map(t=>u$.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(es,"Im"),o(es,"templatePath");function p3(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(p3,"BE"),o(p3,"componentOf");function m3(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(m3,"ZE"),o(m3,"scriptFamily");function f3(e,t,r,i){let u=t.nodeId,n=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(n)return`${n[1]}:${es(n[2])}`;if(t.type&&c3[t.type]==="user-action"&&u)return p3(u);if(e==="test")return m3(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${es(a.route)}`;let l=i.find(d=>Qn(d)==="ai-call");return l&&Dd(l.raw)?`ai \xB7 ${yt(l.raw.model)??yt(l.raw.provider)??"call"}`:u?es(u):void 0}s(f3,"qE"),o(f3,"subjectOf");var r$=10,i$=1e3,n$=3,s$=500,a$=1e3;function h3(e,t){let r=new Set,i=t.segments.filter(n=>n.kind==="request");t.segments.some(n=>n.counts.errors>0)&&r.add("has-error"),i.some(n=>n.durationMs>=i$)&&r.add("slow"),i.length>=r$&&r.add("fan-out"),new Set(t.segments.flatMap(n=>n.projects)).size>=3&&r.add("multi-service"),e.some(n=>Qn(n)==="queue-enqueued")&&r.add("queue"),e.some(n=>Qn(n)==="ai-call"||n.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=s$&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=a$&&r.add("large");let u=new Map;for(let n of i)(!n.part||n.part.index===1)&&u.set(n.label,(u.get(n.label)??0)+1);return[...u.values()].some(n=>n>=n$)&&r.add("repeated-requests"),[...r].sort()}s(h3,"XE"),o(h3,"tagsOf");function g3(e,t,r=[]){let i=d3(e),u={flowId:t.flowId,origin:i,segments:t.segments},n=h3(e,t),a=o((p,m,f)=>{let h=f3(p,i,t,e);return{category:p,decidedBy:m,...f!==void 0?{ruleIndex:f}:{},tags:n,origin:i,...h?{subject:h}:{}}},"done"),l=r.findIndex(p=>p.category&&wd(p,u));if(l!==-1)return a(r[l].category,"rule",l);if(e$(t.flowId,i.nodeId))return a("test","test");let d=i.type?c3[i.type]:void 0;if(d)return a(d,"origin");if(n.includes("ai"))return a("ai","shape");let c=t.segments.filter(p=>p.kind==="request");return c.length>0?a(c.every(p=>p.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(p=>p.kind==="ambient")?a("system","shape"):a("other","shape")}s(g3,"$$"),o(g3,"classifyFlow");function v3(e,t,r=[]){let i=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&wd(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return i?i.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&t$.has(t.category)?t.category:"ui"}s(v3,"_$"),o(v3,"categoryOfSegment");function y3(e){return E3(e).map(t=>{let r=new Map;for(let u of t.items){let n=r.get(u.subject);n?n.push(u):r.set(u.subject,[u])}let i=[...r.entries()].sort((u,n)=>(u[0]===void 0?1:0)-(n[0]===void 0?1:0)||n[1].length-u[1].length||String(u[0]).localeCompare(String(n[0]))).map(([u,n])=>({subject:u,count:n.length,items:n}));return{...t,subjects:i}})}s(y3,"k$"),o(y3,"groupFlows");function E3(e){let t=new Map;for(let i of e){let u=t.get(i.category);u?u.push(i):t.set(i.category,[i])}let r=o(i=>{let u=Xn.indexOf(i);return u===-1?Xn.length:u},"rank");return[...t.entries()].sort((i,u)=>r(i[0])-r(u[0])||(i[0]<u[0]?-1:i[0]>u[0]?1:0)).map(([i,u])=>({category:i,count:u.length,items:u}))}s(E3,"HE"),o(E3,"groupByCategory");var Et={categories:[],segments:{},problems:[]},$d=200,b3=200,w3=64,o$=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,l$=["category","flowId","originType","origin","route","project"],d$={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},Bd=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function D3(e,t){if(!Bd(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))l$.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let i=e.category;if(typeof i!="string"||i.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=i.trim();if(u.length>w3||!o$.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${w3}) \u2014 rule dropped`]};let n={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>b3)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${b3} characters \u2014 rule dropped`]};n[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:n,problems:r}}s(D3,"tT"),o(D3,"parseRule");function $3(e){if(e==null)return Et;if(!Bd(e))return{...Et,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],i=e.categories;i!==void 0&&(Array.isArray(i)?(i.length>$d&&t.push(`flows.categories has ${i.length} rules; only the first ${$d} are used`),i.slice(0,$d).forEach((a,l)=>{let d=D3(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},n=e.segments;if(n!==void 0)if(!Bd(n))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(n)){let d=d$[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${i4[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s($3,"R$"),o($3,"parseFlowsConfig");function ts(e,t=Et){let r=c4(e,t.segments),i=g3(e,r,t.categories),u={};for(let n of r.segments)u[n.id]=v3(n,i,t.categories);return{segmentation:r,classification:i,segmentCategories:u}}s(ts,"on"),o(ts,"analyzeFlow");function xd(e,t={}){let r=t.threshold??5,i=[];for(let u of e){let n=u.raw??null;if(n?.kind!=="loop"||!n.loop)continue;let a=n.loop.dbCallsInsideLoop??0;a>r&&i.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${n.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:n.loop.iterations,durationMs:n.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return i}s(xd,"Js"),o(xd,"detectDbInLoop");function B3(e,t={}){let r=t.threshold??3,i=new Map;for(let n of e){let a=n.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=i.get(l);d||(d=[],i.set(l,d)),d.push(n)}let u=[];for(let[n,a]of i)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:n,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(B3,"E$"),o(B3,"detectNPlusOne");function x3(e,t={}){let r=t.threshold??5,i=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,c=u.get(d);c||(c=[],u.set(d,c)),c.push(a)}let n=[];for(let[a,l]of u){l.sort((c,p)=>c.timestamp-p.timestamp);let d=0;for(let c=0;c<l.length;c++){for(;l[c].timestamp-l[d].timestamp>i;)d++;let p=c-d+1;if(p>r){let m=l.slice(d,c+1),f=m[0].raw.render?.componentName??a;n.push({kind:"render-storm",severity:"warning",title:`${f} rendered ${p}\xD7 in ${i}ms`,evidence:m.map(h=>h.id),details:{componentInstanceId:a,count:p,windowMs:i,threshold:r},detectedAt:m[m.length-1].timestamp});break}}}return n}s(x3,"T$"),o(x3,"detectRenderStorm");function C3(e,t,r){let i=new Map,u=new Set;function n(l){let d=i.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let c=r(l),p=t.get(l)??[],m;for(let h of p){let g=n(h);(!m||g.totalDurationMs>m.totalDurationMs)&&(m=g)}u.delete(l);let f=m?{path:[l,...m.path],totalDurationMs:c+m.totalDurationMs}:{path:[l],totalDurationMs:c};return i.set(l,f),f}s(n,"i"),o(n,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=n(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(C3,"A$"),o(C3,"findSlowPath");var k3={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function Ye(e){let t={...k3};if(e)for(let r of Object.keys(k3)){let i=e[r];typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=i)}return t}s(Ye,"Ee"),o(Ye,"resolveThresholds");function A3(e){let t=e.raw??null,r=t?.kind,i=e.context,u={id:e.id,parentTraceNodeId:i.causedByNodeId??i.originNodeId,lifecycle:"completed",context:i,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let n=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:n.render?.componentLogicalId,instanceId:n.render?.componentInstanceId,name:`render ${n.render?.componentName??"?"}`,durationMs:n.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let n=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:n.update?.storeId,name:`${n.update?.storeId??"?"}.${n.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let n=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${n.request?.method??"?"} ${n.request?.route??"?"}`,durationMs:n.request?.durationMs}}}if(r==="db-query"){let n=t,a=[n.op,n.table].filter(Boolean).join(" ")||(n.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:n.table?`db:${n.op??"query"}:${n.table}`:void 0,name:n.error?`${a} (failed)`:a,durationMs:n.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let n=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:n.origin?.nodeId,name:n.origin?.label??e.title}}}}s(A3,"rT"),o(A3,"eventToNode");function I3(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),i=[];for(let l of r){let d=A3(l);d&&(e.addNode(d.node),i.push(d))}let u=0,n=o((l,d,c,p)=>{let m={id:`${c}:${l}->${d}`,from:l,to:d,axis:c,type:p,timestamp:e.getNode(d)?.startTime??0};e.addEdge(m),u++},"addEdge");for(let l of i){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&n(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of i){let d=l.node.context.flowId;if(!d)continue;let c=a.get(d);c||(c=[],a.set(d,c)),c.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let c=l[d-1].node,p=l[d].node;p.context.causedByNodeId!==c.id&&n(c.id,p.id,"caused","flow-sequence")}return{nodeCount:i.length,edgeCount:u}}s(I3,"z$"),o(I3,"buildGraphFromEvents");var _3=new WeakMap;function us(e){let t=_3.get(e);if(t!==void 0)return t;let r=Xe(e);return _3.set(e,r),r}s(us,"sn"),o(us,"estimateEventBytes");function S3(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!vd(u,r,i)){let c=Xe(u,r,i);return{event:e,truncated:!1,originalBytes:c,keptBytes:c}}let n=Xe(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=bu(u,a,i,""),d=Xe(l,Number.POSITIVE_INFINITY,i);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let c={truncated:!0,originalBytes:n,keptBytes:d,paths:a.paths};l[gd]=c}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:n,keptBytes:d}}s(S3,"aT"),o(S3,"clampEventRaw");function Cd(e={}){let t=0,r=0,i=0,u=e.rawByteLimit??32768;return{clamp(n){t+=1;let a=S3(n,e);return a.truncated&&(r+=1,i+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:i,rawByteLimit:u}},reset(){t=0,r=0,i=0}}}s(Cd,"Ws"),o(Cd,"createEventClamp");var c$={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},p$=64*1024*1024,m$=32*1024*1024,f$=class{static{s(this,"Ks")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??p$,this.artifactCaps={...c$,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??m$}appendEvent(e){let t=us(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let i=Xe(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,i),this.artifactOrder.push(e.id),this.residentArtifactBytes+=i;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},h$=class{static{s(this,"Xs")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??lt(),this.storage=e.storage??new f$,this.clamp=e.clamp===!1?void 0:Cd(e.clamp??{}),this.redactor=e.redact===!1?void 0:oa(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new Km({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((i,u)=>u(i),r),"transform")}:{}}),this.graph=new e4,this.resources=new Qm,this.reducers=new $5,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as Zr,ProviderScope as Lr}from"@frontmcp/sdk";var kd;function F3(e){kd=e}s(F3,"M$"),o(F3,"setActiveSession");function Bu(){if(!kd)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return kd}s(Bu,"go"),o(Bu,"requireSession");var g$=Zr({provide:Pr,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:Lr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Bu(),"useFactory")}),v$=Zr({provide:Ur,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:Lr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Bu().bus,"useFactory")}),y$=Zr({provide:OD,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:Lr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Bu().graph,"useFactory")}),E$=Zr({provide:Z,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:Lr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Bu().resources,"useFactory")}),b$=Zr({provide:RD,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:Lr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Bu().storage,"useFactory")}),w$=[g$,v$,y$,E$,b$];function j3(e={}){let t=new h$(e);return t.start(),F3(t),{session:t,providers:w$}}s(j3,"P$"),o(j3,"bootstrapLensmcp");var D_=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),$_=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
|
|
66
|
+
`);import{createSocket as D$}from"node:dgram";import{closeSync as $$,existsSync as z3,openSync as B$,readSync as x$,statSync as N3}from"node:fs";import{createServer as C$}from"node:net";import{existsSync as M3,unlinkSync as O3}from"node:fs";var k$=1024*1024;function R3(e){let t=e.onError??(()=>{});try{M3(e.path)&&O3(e.path)}catch{}let r=new Set,i=e.maxFrameBytes??k$,u=C$(n=>{r.add(n);let a="";n.setEncoding("utf8"),n.on("data",l=>{a+=l;let d;for(;(d=a.indexOf(`
|
|
67
|
+
`))!==-1;){let c=a.slice(0,d);a=a.slice(d+1),c&&e.onMessage(c)}a.length>i&&(t(new Error(`uds: frame exceeded ${i} bytes without a newline \u2014 connection dropped`)),a="",n.destroy())}),n.on("error",l=>t(l)),n.on("close",()=>r.delete(n))});return u.on("error",n=>t(n)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(n=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{M3(e.path)&&O3(e.path)}catch{}n()})}catch{n()}}),"close")}}s(R3,"zm"),o(R3,"createUdsServer");function T3(e){let t=e.eventFile??process.env.LENSMCP_EVENT_FILE,r=e.socketPath??process.env.LENSMCP_IPC_SOCKET,i=e.udsPath??process.env.LENSMCP_UDS,u=e.onError??(()=>{}),n=0,a=o(f=>{let h=f.trim();if(!h)return;let g;try{g=JSON.parse(h)}catch{return}if(!(!g||typeof g!="object"||!("id"in g)||!("source"in g)))try{e.sessionId&&g.sessionId==="pending"&&(g.sessionId=e.sessionId,g.context&&g.context.sessionId==="pending"&&(g.context.sessionId=e.sessionId)),e.bus.publish(g),n+=1}catch(b){u(b)}},"publish"),l=[],d=!1,c=!1,p=!1;if(t){d=!0;let f=0,h="",g=!1,b=e.replayBytes??Number(process.env.LENSMCP_REPLAY_BYTES??4*1024*1024);if(z3(t))try{let w=N3(t).size;Number.isFinite(b)&&b>0&&w>0?(f=Math.max(0,w-b),g=f>0):f=w}catch{f=0}let x=Buffer.alloc(64*1024),$=setInterval(o(()=>{if(!z3(t))return;let w;try{w=N3(t).size}catch{return}for(w<f&&(f=0,h="");f<w;){let k;try{k=B$(t,"r")}catch(C){u(C);return}try{let C=Math.min(x.length,w-f),M=x$(k,x,0,C,f);if(M<=0)break;f+=M,h+=x.toString("utf8",0,M);let y;for(;(y=h.indexOf(`
|
|
68
|
+
`))!==-1;){let D=h.slice(0,y);if(h=h.slice(y+1),g){g=!1;continue}a(D)}}finally{$$(k)}}},"drain"),e.pollMs??50);$.unref?.(),l.push(()=>clearInterval($))}if(r){let[f,h]=r.split(":"),g=Number(h);if(f&&Number.isFinite(g)){c=!0;let b;try{b=D$("udp4"),b.on("message",x=>a(x.toString("utf8"))),b.on("error",x=>u(x)),b.bind(g,f),b.unref()}catch(x){u(x),c=!1}if(b){let x=b;l.push(()=>new Promise($=>{try{x.close(()=>$())}catch{$()}}))}}}if(i)try{let f=R3({path:i,onMessage:o(h=>a(h),"onMessage"),onError:u});p=!0,l.push(()=>f.close())}catch(f){u(f)}let m=[];return d&&m.push("file"),c&&m.push("udp"),p&&m.push("uds"),{mode:m.join("+")||"none",count:o(()=>n,"count"),async stop(){for(let f of l)try{await f()}catch{}}}}s(T3,"Om"),o(T3,"startEventIngest");import{existsSync as A$,readFileSync as P3}from"node:fs";import{dirname as I$,join as _$}from"node:path";function U3(e=process.cwd()){let t=Ad("nx.json",e);if(!t)return Ye();try{let r=JSON.parse(P3(t,"utf8"));return Ye(r.lensmcp?.thresholds)}catch{return Ye()}}s(U3,"Mm"),o(U3,"loadWorkspaceThresholds");function q3(e=process.cwd()){let t=Ad("nx.json",e);if(!t)return Et;try{let r=JSON.parse(P3(t,"utf8"));return $3(r.lensmcp?.flows)}catch(r){return{...Et,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(q3,"Nm"),o(q3,"loadWorkspaceFlowsConfig");function Ad(e,t){let r=t;for(let i=0;i<8;i++){let u=_$(r,e);if(A$(u))return u;let n=I$(r);if(n===r)break;r=n}}s(Ad,"B$"),o(Ad,"findUp");function F(e,t,r,i){var u=arguments.length,n=u<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(u<3?a(n):u>3?a(t,r,n):a(t,r))||n);return u>3&&n&&Object.defineProperty(t,r,n),n}s(F,"$"),o(F,"__decorate");import{App as S$}from"@frontmcp/sdk";import{Resource as F$,ResourceContext as j$}from"@frontmcp/sdk";import{existsSync as z$,readFileSync as N$}from"node:fs";import{dirname as M$,join as O$}from"node:path";var Le="perf://rules",Zt="pod/heap-budget",Lt="pod/retained-generation",Z3=512,L3=.9,R$=64,T$=16,P$=16,V3=256,J3=1024*1024,U$="LENSMCP_PERF_RULES",q$="LENSMCP_POD_HEAP_BUDGET_MB",Z$={heapBudgetEnabled:!0,retainedEnabled:!0,budgetMb:Z3,services:{}},L$=/^(0|off|false|no)$/i,Id=o(e=>{let t=typeof e=="string"&&e.trim()!==""?Number(e):e;return typeof t=="number"&&Number.isFinite(t)&&t>=16&&t<=1e6?t:void 0},"budget");function rs(e,t){let r=t&&typeof t=="object"&&!Array.isArray(t)?t:{},i=r[Zt]&&typeof r[Zt]=="object"?r[Zt]:{},u=r[Lt]&&typeof r[Lt]=="object"?r[Lt]:{},n=L$.test((e[U$]??"").trim())||r.enabled===!1,a={};if(i.services&&typeof i.services=="object"&&!Array.isArray(i.services))for(let[l,d]of Object.entries(i.services)){let c=Id(d);c!==void 0&&(a[l]=c)}return{heapBudgetEnabled:!n&&i.enabled!==!1,retainedEnabled:!n&&u.enabled!==!1,budgetMb:Id(e[q$])??Id(i.budgetMb)??Z3,services:a}}s(rs,"Hs"),o(rs,"resolvePodRuleThresholds");function W3(e=process.cwd(),t=process.env){let r=e;for(let i=0;i<8;i++){let u=O$(r,".lensmcp","config.json");if(z$(u))try{let a=JSON.parse(N$(u,"utf8"));return rs(t,a?.perfRules)}catch{return rs(t,void 0)}let n=M$(r);if(n===r)break;r=n}return rs(t,void 0)}s(W3,"Um"),o(W3,"loadPodRuleThresholds");var Vr=o((e,t,r)=>`${e}\0${t}\0${r}`,"key"),Ve=o(e=>Math.round(e/J3),"mb"),_d=0,V$=o(()=>(_d=(_d+1)%65535,`perf-${Date.now().toString(36)}${_d.toString(36)}${Math.random().toString(36).slice(2,7)}`),"eventId"),J$=class{static{s(this,"yo")}static{o(this,"PerfRuleBook")}constructor(e={}){this.options=e,this.findings=new Map,this.pods=new Map,this.heard=!1,this.thresholds=e.thresholds??Z$,this.now=e.now??Date.now}ingest(e){return e.source==="perf"?this.ingestRule(e):e.source==="memory"?this.ingestPod(e):!1}ingestRule(e){let t=u3(e.raw);if(!t||t.rule.startsWith("pod/"))return!1;let r=!this.heard;if(this.heard=!0,t.kind==="perf-rule-scan"){let n=!1,a=new Set(t.open);for(let[l,d]of this.findings)d.rule===t.rule&&d.project===t.project&&!a.has(d.subject)&&(this.findings.delete(l),n=!0);return n||r}let i=Vr(t.rule,t.project,t.subject);if(t.kind==="perf-rule-retracted")return this.findings.delete(i)||r;let u=this.findings.get(i);return this.findings.set(i,{rule:t.rule,project:t.project,subject:t.subject,severity:t.severity,title:t.title,summary:t.summary,evidence:t.evidence,cost:t.cost,fix:t.fix,verify:t.verify,docs:t.docs,firstSeenAt:u?.firstSeenAt??e.timestamp,lastSeenAt:Math.max(e.timestamp,u?.lastSeenAt??0)}),this.bound(),!0}projectPods(e,t,r){let i=this.pods.get(e);if(!i&&(i={service:t,lastSeenAt:r,readings:new Map,retained:new Map},this.pods.set(e,i),this.pods.size>R$)){let u=[...this.pods.entries()].sort((n,a)=>n[1].lastSeenAt-a[1].lastSeenAt)[0];u&&u[0]!==e&&(this.pods.delete(u[0]),this.close(Vr(Zt,u[0],u[1].service),"evicted",r),this.close(Vr(Lt,u[0],u[1].service),"evicted",r))}return i.service=t||i.service,i.lastSeenAt=Math.max(i.lastSeenAt,r),i}ingestPod(e){let t=Gn(e.raw);if(!t)return!1;let r=e.timestamp,i=this.projectPods(t.project,t.service||t.project,r),u=`${t.pod}:${t.pid}`;if(t.kind==="pod-memory"){if(t.previousAlive!==!0&&i.readings.set(u,this.reading(t,r)),t.trigger==="boot"){for(let d of[...i.readings.keys()])d.startsWith(`${t.pod}:`)&&d!==u&&i.readings.delete(d);for(let d of[...i.retained.keys()])d.startsWith(`${t.pod}:`)&&!d.startsWith(`${u}:`)&&i.retained.delete(d)}if(i.readings.size>T$){let d=[...i.readings.entries()].sort((c,p)=>c[1].at-p[1].at)[0];d&&i.readings.delete(d[0])}}else if(t.kind==="pod-memory-retained"){i.retained.set(`${u}:${t.gen}`,this.retainedOf(t,r));let d=[...i.retained.keys()].filter(c=>c.startsWith(`${u}:`));d.length>P$&&i.retained.delete(d[0])}else if(t.kind==="pod-memory-released")i.retained.delete(`${u}:${t.gen}`);else if(t.kind==="pod-memory-exited"){i.readings.delete(u);for(let d of[...i.retained.keys()])d.startsWith(`${u}:`)&&i.retained.delete(d)}let n=!this.heard;this.heard=!0;let a=this.evaluateHeap(t.project,i,r),l=this.evaluateRetained(t.project,i,r);return a||l||n}reading(e,t){return{pod:e.pod,pid:e.pid,service:e.service||e.project,at:e.at??t,trigger:e.trigger,gen:e.gen,swaps:e.swaps,live:e.live,reserved:e.reserved,rss:e.rss,...e.baseline!==void 0?{baseline:e.baseline}:{}}}retainedOf(e,t){return{pod:e.pod,pid:e.pid,gen:e.gen,at:t,ageMs:e.ageMs,swapsSinceClose:e.swapsSinceClose,gcs:e.gcs,alive:Array.isArray(e.alive)?e.alive.slice(0,8):[],...e.counts?{counts:e.counts}:{},live:e.live}}budgetFor(e,t){return this.thresholds.services[t]??this.thresholds.services[e]??this.thresholds.budgetMb}related(e){return[...this.findings.values()].filter(t=>t.project===e&&!t.rule.startsWith("pod/")).map(t=>`${t.rule}: ${t.title}`)}evaluateHeap(e,t,r){let i=t.service,u=Vr(Zt,e,i),n=this.findings.get(u);if(!this.thresholds.heapBudgetEnabled)return n?this.close(u,"disabled",r):!1;let a=this.budgetFor(e,t.service),l=a*J3,d=[...t.readings.values()].sort((g,b)=>b.live-g.live),c=d.filter(g=>g.live>l),p=d.some(g=>g.live>l*L3);if(c.length===0&&!(n&&p))return n?this.close(u,d.length?"cleared":"pod-exited",r):!1;if(c.length===0)return!1;let m=c[0],f=c.reduce((g,b)=>g+(b.live-l),0),h={rule:Zt,project:e,subject:i,severity:m.live>=2*l?"error":"warning",title:`${t.service}: ${Ve(m.live)} MB live heap after a full GC \u2014 over its ${a} MB budget${c.length>1?` (${c.length} pods)`:""}`,summary:`Pod #${m.pod} of ${t.service} holds ${Ve(m.live)} MB of live objects right after a full GC (${Ve(m.reserved)} MB reserved, rss ${Ve(m.rss)} MB${m.baseline!==void 0?`; ${Ve(m.baseline)} MB at boot`:""}, generation ${m.gen} after ${m.swaps} swap${m.swaps===1?"":"s"}). That is not garbage: it is what the app keeps, in every pod of the service.`,evidence:{budgetMb:a,pods:c.map(g=>({pod:g.pod,pid:g.pid,liveMb:Ve(g.live),reservedMb:Ve(g.reserved),rssMb:Ve(g.rss),...g.baseline!==void 0?{baselineMb:Ve(g.baseline)}:{},gen:g.gen,swaps:g.swaps,trigger:g.trigger,at:g.at})),related:this.related(e)},cost:{bytes:f,memoryMb:Ve(f),basis:`live heap after a full GC above the ${a} MB budget, summed over the pods over it`},fix:[`See what the heap is made of: \`memory.explain_pod({ service: '${t.service}' })\`, then \`lensmcp mem ${t.service} --snapshot --analyze\` \u2014 read "bytes by package/module" and the largest retainers.`,`If one shared library dominates (FoodGuard: ~300 MB of zod schemas per pod from a contracts barrel), import it by subpath \u2014 see any bundle/heavy-barrel-import finding for ${e} \u2014 and build large schema catalogs lazily (a function that builds on first use), not at module load.`,"If the bundle text dominates (eval strings, source maps), keep the default `eval` devtool and no `--enable-source-maps` (LENSMCP_DEV_DEVTOOL unset).",`If the heap grows with each swap or request, it is retention, not size: look for module-level caches, registries and listeners that outlive a request (\`memory.explain_leak\`). A service that genuinely needs more raises its budget: \`.lensmcp/config.json\` perfRules["pod/heap-budget"].services["${t.service}"].`],verify:`After the change rebuilds and the pod swaps, its next post-GC report (\`memory.pods\`) shows live heap under ${Math.round(a*L3)} MB and LensMCP retracts this finding (\`observe_current_status\` no longer lists pod/heap-budget for ${t.service}).`,docs:e3[Zt],firstSeenAt:n?.firstSeenAt??r,lastSeenAt:r};return this.open(u,h,n)}evaluateRetained(e,t,r){let i=t.service,u=Vr(Lt,e,i),n=this.findings.get(u),a=[...t.retained.values()].sort((p,m)=>m.ageMs-p.ageMs);if(!this.thresholds.retainedEnabled||a.length===0)return n?this.close(u,this.thresholds.retainedEnabled?"released":"disabled",r):!1;let l=a[0],d=Math.max(1,Math.round(l.ageMs/6e4)),c={rule:Lt,project:e,subject:i,severity:"warning",title:`${t.service}: ${a.length===1?`generation ${l.gen} is`:`${a.length} closed generations are`} still in memory ${d} min after the hot swap that closed ${a.length===1?"it":"them"}`,summary:`Pod #${l.pod} closed generation ${l.gen} ${d} min ago, ${l.swapsSinceClose} swap(s) and ${l.gcs} full GC(s) since, and ${l.alive.join(", ")||"its objects"} ${l.alive.length===1?"is":"are"} still alive: something still points into the old app \u2014 a whole copy of it stays resident with every swap that leaks.`,evidence:{generations:a.slice(0,8).map(p=>({pod:p.pod,pid:p.pid,gen:p.gen,ageMs:p.ageMs,swapsSinceClose:p.swapsSinceClose,gcs:p.gcs,alive:p.alive,...p.counts?{counts:p.counts}:{},liveMb:Ve(p.live)}))},cost:{basis:"one copy of the app per retained generation; its size is in the heap snapshot (`lensmcp mem --snapshot --analyze`)"},fix:[`Find what holds it: \`lensmcp mem ${t.service} --snapshot --analyze\` prints the shortest path from the GC roots to generation ${l.gen} \u2014 the first frame outside your app's own objects is the culprit.`,"Usual culprits: a timer or interval never cleared on shutdown; a BullMQ worker, queue event or Redis client never closed in onModuleDestroy / onApplicationShutdown; `process.on(\u2026)` / an EventEmitter listener added per app instance; a module-level registry, cache or singleton keyed by class or holding app instances.","Release it in the app's shutdown hooks (Nest calls them on every hot swap), or move the module-level state into a provider the container owns."],verify:'Save a file to swap again; within ~5 min the pod reports "generation N freed" (`memory.pods`), LensMCP retracts this finding, and `memory://leaks/suspected` no longer lists the generation.',docs:e3[Lt],firstSeenAt:n?.firstSeenAt??r,lastSeenAt:r};return this.open(u,c,n)}open(e,t,r){return this.findings.set(e,t),this.bound(),(!r||r.title!==t.title||r.severity!==t.severity)&&this.emit(t,"finding"),!0}close(e,t,r){let i=this.findings.get(e);return i?(this.findings.delete(e),this.emit({...i,lastSeenAt:r},"retracted",t),!0):!1}emit(e,t,r){let i=this.options.publish;if(!i)return;let u=this.options.sessionId??"pending",n=this.now(),a={id:V$(),sessionId:u,timestamp:n,source:"perf",category:"performance",severity:t==="finding"?e.severity:"info",context:{sessionId:u,projectName:e.project},fingerprint:t3(e.rule,e.project,e.subject),title:t==="finding"?`${e.rule}: ${e.title}`:`${e.rule}: cleared for ${e.project} (${e.subject})`,raw:t==="finding"?{kind:"perf-rule-finding",rule:e.rule,project:e.project,subject:e.subject,severity:e.severity,title:e.title,summary:e.summary,evidence:e.evidence,cost:e.cost,fix:e.fix,verify:e.verify,docs:e.docs,detectedAt:n}:{kind:"perf-rule-retracted",rule:e.rule,project:e.project,subject:e.subject,reason:r??"cleared",at:n}};queueMicrotask(()=>{try{i(a)}catch{}})}bound(){if(this.findings.size<=V3)return;let e=[...this.findings.entries()].sort((t,r)=>t[1].lastSeenAt-r[1].lastSeenAt).slice(0,this.findings.size-V3);for(let[t]of e)this.findings.delete(t)}openFindings(){return[...this.findings.values()].sort((e,t)=>e.severity===t.severity?t.lastSeenAt-e.lastSeenAt:e.severity==="error"?-1:1)}report(e){let t=this.openFindings(),r={};for(let i of t)r[i.rule]=(r[i.rule]??0)+1;return{schemaVersion:1,revision:e,updatedAt:new Date(this.now()).toISOString(),producer:this.heard?"connected":"none",detail:this.heard?t.length?`${t.length} open performance finding${t.length===1?"":"s"}: ${Object.entries(r).map(([i,u])=>`${u} ${i}`).join(", ")}`:"no open performance findings":"no performance rule has reported yet \u2014 rules run after a dev-cluster compilation (bundle/*) and on pod memory reports (pod/*); start the gateway",findings:t,counts:r}}};function G3(e,t=700){let r=e.fix.map((i,u)=>`${u+1}) ${i}`).join(" ");return r.length>t?`${r.slice(0,t-40).trimEnd()}\u2026 (all steps: ${Le})`:r}s(G3,"Lm"),o(G3,"compactFix");var K3=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),H3=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),bt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),Te=o(e=>typeof e=="string"?e:void 0,"asString");function pe(e,...t){for(let r of t){let i=H3(e[r])??bt(e[r]);if(i!==void 0)return i}}s(pe,"me"),o(pe,"countOf");var fe=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function is(e,t,r,i,u){if(t>0)return{state:"failed",count:t,detail:`${fe(t,`${i} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:fe(r,`${i} warning`)};let n=Te(e.status);return n==="clean"||n==="passed"?{state:"passed",count:0,detail:`${i} clean`}:{state:"unknown",detail:`${i} has not reported a result yet (status=${n??"absent"})`}}s(is,"Fm"),o(is,"fromStatusField");var ns=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>is(e,pe(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>is(e,pe(e,"errorCount","errors")??0,pe(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>{let t=Array.isArray(e.failures)?e.failures.filter(u=>{let n=u?.domain;return n!=="typecheck"&&n!=="lint"}).length:pe(e,"failures","failureCount")??0,r=(H3(e.failures)??t)-t,i=t===0&&r>0&&Te(e.status)==="failing"?{...e,status:"clean"}:e;return is(i,t,pe(e,"warnings","warningCount")??0,"build","build://failures")},"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=pe(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${fe(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=pe(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${fe(t,"server-side error")} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((pe(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=pe(e,"crashLooping")??0,r=pe(e,"wedged")??0,i=pe(e,"buildFailed")??0,u=pe(e,"typeErrors")??0,n=u>0?`${fe(u,"service")} with type errors no typecheck producer reports`:void 0,a=pe(e,"down")??0,l=bt(e.restarts)??0,d=Array.isArray(e.services)?e.services.filter(h=>{let g=h??{};return g.buildFailed===!0&&g.state==="up"}).length:0,c=Math.max(0,i-d),p=d>0?`${fe(d,"service")} failing to build while still serving the last good bundle`:void 0,m=[p,n?`${n} (still serving)`:void 0].filter(Boolean);if(t>0||r>0||c>0){let h=[t>0?`${fe(t,"service")} crash-looping`:void 0,r>0?`${fe(r,"service")} wedged`:void 0,c>0?`${fe(c,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+i+u,detail:`${h.join(", ")} \u2014 read process://cluster (requests to them 502)${m.length?`; ${m.join("; ")}`:""}`}}if(p)return{state:"failed",count:i+u,detail:`${p} \u2014 read process://cluster for the error lines${n?`; ${n} (still serving)`:""}`};if(n)return{state:"failed",count:u,detail:`${n} \u2014 read process://cluster for the lines (the bundle built; the services still serve)`};if(a>0)return{state:"warning",count:a,detail:`${fe(a,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let f=pe(e,"up")??0;return{state:"passed",count:0,detail:`${fe(f,"service")} up${l>0?`, ${fe(l,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=pe(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${fe(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=pe(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${fe(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=pe(e,"routes")??0,r=bt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${fe(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=pe(e,"endpoints")??0,r=bt(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${fe(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=pe(e,"queries")??0,r=bt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${fe(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=pe(e,"failingHosts")??0,r=pe(e,"slowHosts")??0,i=bt(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${fe(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${fe(r,"external host")} over${i?` ${i}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")},{kind:"perf-rules",resource:Le,reads:o(()=>[Le],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=pe(e,"findings")??0;return t>0?{state:"warning",count:t,detail:`${fe(t,"performance finding")} \u2014 read ${Le} (each has a fix and a verify step)`}:{state:"passed",count:0,detail:"no open performance findings"}},"read"),items:o(e=>{let t=(Array.isArray(e.findings)?e.findings:[]).map(K3).filter(i=>!!i),r=t.slice(0,Sd).map(i=>{let u=Te(i.rule)??"perf",n=Te(i.project)??"?",a=Te(i.subject)??"?",l=Array.isArray(i.fix)?i.fix.filter(d=>typeof d=="string"):[];return{source:"perf",severity:"warning",title:`${u} \xB7 ${Te(i.title)??n}`,fingerprint:`agent-status:perf-rule:${u}:${n}:${a}`,resource:Le,rule:u,...l.length?{fix:G3({fix:l})}:{},...Te(i.verify)?{verify:Te(i.verify)}:{},...Te(i.docs)?{docs:Te(i.docs)}:{}}});return t.length>Sd&&r.push({source:"perf",severity:"warning",title:`${fe(t.length-Sd,"more performance finding")} \u2014 read ${Le}`,fingerprint:"agent-status:perf-rules:more",resource:Le}),r},"items")}],Sd=5,X3=new WeakMap,N_=ns.map(e=>e.resource);async function Y3(e,t){let r={kind:t.kind,resource:t.resource},i;try{i=K3(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!i)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=Te(i.producer),n=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||n?"connected":"none",l=Te(i.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(i)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let c=i.stale===!0,p=c?`${d.detail} (as of ${bt(i.ageMs)!==void 0?Q3(bt(i.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail,m={...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...c?{stale:!0}:{},detail:p,reads:t.reads(d.state)};if(t.items&&(d.state==="warning"||d.state==="failed"))try{let f=t.items(i);f.length&&X3.set(m,f)}catch{}return m}s(Y3,"ZT"),o(Y3,"readSignal");function Q3(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(Q3,"qT"),o(Q3,"describeAge");async function Fd(e){return Promise.all(ns.map(t=>Y3(e,t)))}s(Fd,"Qs"),o(Fd,"readSignals");var Jr=o(e=>ns.find(t=>t.resource===e.resource)??ns.find(t=>t.kind===e.kind),"specFor");function e6(e){return{source:Jr(e).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(e6,"VT"),o(e6,"toItem");function t6(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(n=>{let a=e.filter(l=>l.kind===n);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),i=o(n=>n==="failed"?"failed":n==="passed"||n==="warning"?"passed":"unknown","tri"),u=o(n=>n,"quad");return{typecheck:i(r("typecheck")),lint:i(r("lint")),build:i(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(t6,"GT"),o(t6,"toChecks");function u6(e){let t=e.filter(p=>p.state==="failed"),r=e.filter(p=>p.state==="warning"),i=e.filter(p=>p.state==="passed"),u=o(p=>X3.get(p)??[e6(p)],"itemsOf"),n=t.filter(p=>Jr(p).blocking).flatMap(u),a=[...t.filter(p=>!Jr(p).blocking),...r].flatMap(u),l=n.length>0?"failing":a.length>0?"warning":i.length>0?"clean":"starting",d=[...t.filter(p=>Jr(p).blocking).flatMap(p=>p.reads),...t.filter(p=>!Jr(p).blocking).flatMap(p=>p.reads),...r.flatMap(p=>p.reads)],c=[...new Set(d)];return c.length===0&&c.push("events://recent"),{status:l,blocking:n,warnings:a,suggestedReads:c,checks:t6(e)}}s(u6,"X$"),o(u6,"deriveVerdict");function r6(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(r6,"JT"),o(r6,"readServerInfo");async function ss(e){let t=await Fd(e.resources),r=u6(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:r6(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(ss,"ar"),o(ss,"aggregateStatus");var jd="agent://current-status",zd=class extends j${static{s(this,"qm")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(Z);try{return await e.read(jd)}catch{}let t=this.get(Pr);return ss({resources:e,sessionId:t.id,revision:e.revision(jd)??0})}};zd=F([F$({name:"agent-current-status",uri:jd,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],zd);var W$=zd;import{Resource as G$,ResourceContext as K$}from"@frontmcp/sdk";var Nd=class extends K${static{s(this,"Gm")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(Z).read("process://cluster")}};Nd=F([G$({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, which fail to build, restart counts, and the error lines services printed (ERROR in, EADDRINUSE, and error TS\u2026 for a project no typecheck producer reports for \u2014 otherwise type errors are in typecheck://errors). Read this when a request 502s or a dev server stopped responding."})],Nd);var H$=Nd;import{Resource as X$,ResourceContext as Y$}from"@frontmcp/sdk";var Md=class extends Y${static{s(this,"Wm")}static{o(this,"PerfRulesResource")}async execute(){return this.get(Z).read("perf://rules")}};Md=F([X$({name:"perf-rules",uri:"perf://rules",mimeType:"application/json",description:"Performance problems the lens detected by rule, each with a stable rule id, the measured evidence, the estimated cost (modules / MB / compile ms), the FIX steps and a VERIFY step: bundle/heavy-barrel-import (a service compiles most of a shared library through its root barrel while using a few symbols), pod/heap-budget (a dev pod's live heap after GC is over its budget), pod/retained-generation (a hot-swapped app copy is still in memory). A finding is retracted when the next build or memory report no longer shows it \u2014 that is how to prove a fix."})],Md);var Q$=Md;import{Tool as eB,ToolContext as tB}from"@frontmcp/sdk";var i6=["typecheck","lint","build","runtime","cluster"],uB=[...i6,"all"],rB={typecheck:[{signal:"typecheck://current",resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."}],lint:[{signal:"lint://current",resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."}],build:[{signal:"build://current",resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."}],runtime:[{signal:"runtime://browser/errors",resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},{signal:"runtime://errors",resource:"runtime://errors",keys:["entries"],hint:"Errors a dev service raised while handling a request (a 500 from a curl, an e2e runner or the page) \u2014 route, status, request id and stack. No browser is involved."}],cluster:[{signal:"process://cluster",resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / EADDRINUSE; error TS only for a project no typecheck producer reports for). A wedged or crash-looping service 502s every request routed to it."}]},iB=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function n6(e,t){let r;try{r=iB(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let i of t.keys){let u=r[i];if(Array.isArray(u))return u}return[]}s(n6,"rA"),o(n6,"readItems");async function s6(e){let t=e.kind==="all"?i6:[e.kind],r=await Fd(e.resources),i=new Map(r.map(n=>[n.resource,n])),u=[];for(let n of t)for(let a of rB[n]){let l=i.get(a.signal),d=l?.producer??"none",c=l?.state??"unknown",p=d==="none"?[]:await n6(e.resources,a);u.push({kind:n,resource:a.resource,producer:d,state:c,count:p.length,returned:Math.min(p.length,e.limit),items:p.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((n,a)=>n+a.count,0),unmonitored:[...new Set(u.filter(n=>n.producer==="none").map(n=>n.kind))],groups:u}}s(s6,"Ym"),o(s6,"collectErrors");var a6={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Warnings include PERFORMANCE problems found by rule (a service compiling a whole shared library through its root barrel, a dev pod over its heap budget, a hot-swapped app copy still in memory), each with its rule id, a fix and how to verify it. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},Vt={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, server-side request errors (a dev service's 500: route, status, stack), and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:uB,defaultKind:"all",defaultLimit:25,maxLimit:200},as={name:"observe.dismiss_errors",description:"Hide runtime errors that are already UNDERSTOOD and are not a problem to fix \u2014 a 401 your own signed-out test browser caused, a failure from a fixture that exists to throw \u2014 so they stop counting in observe.current_status and the Stop hook. Give the entry `ids` from observe.errors (kind `runtime`), or `all: true`, and a `reason`: it is recorded with the dismissal and shown to the person in the dashboard. This HIDES, it does not fix: each error shows again the next time it happens. It cannot dismiss a failing typecheck, lint, build or a broken service \u2014 those are current verdicts and clear only when the code is fixed. Never dismiss an error you have not explained; undo with observe.restore_errors.",maxIds:250,minReasonChars:8},Od={name:"observe.restore_errors",description:"Undo a dismissal, so the errors it hid are listed and counted again. Give the dismissal `ids` from runtime://dismissed (or the id of an entry it hid), or `all: true` for every dismissal in effect \u2014 including ones a person made in the dashboard.",maxIds:250},o6="agent://current-status",Rd=class extends tB{static{s(this,"eh")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(Z);try{return await e.read(o6)}catch{}let t=this.get(Pr);return ss({resources:e,sessionId:t.id,revision:e.revision(o6)??0})}};Rd=F([eB({name:a6.name,description:a6.description,inputSchema:{}})],Rd);var nB=Rd;import{Tool as sB,ToolContext as aB,z as l6}from"@frontmcp/sdk";var Td=class extends aB{static{s(this,"rh")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(Z);return s6({resources:t,kind:e.kind,limit:e.limit})}};Td=F([sB({name:Vt.name,description:Vt.description,inputSchema:{kind:l6.enum(Vt.kinds).default(Vt.defaultKind).describe("Which failures to return. 'runtime' = browser errors AND a service's own request errors (the 500 case); 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:l6.number().int().positive().max(Vt.maxLimit).default(Vt.defaultLimit).describe(`Max items per kind (default ${Vt.defaultLimit}). \`count\` still reports the true total.`)}})],Td);var oB=Td;import{Tool as lB,ToolContext as dB,z as Wr}from"@frontmcp/sdk";import{appendFileSync as cB,closeSync as pB,mkdirSync as mB,openSync as fB,renameSync as hB,statSync as gB,unlinkSync as vB}from"node:fs";import{dirname as yB,join as EB}from"node:path";function d6(e,t){let{fs:r,maxBytes:i,maxFiles:u}=t,n=`${e}.rotate.lock`,a=t.staleLockMs??3e4,l;for(let d=0;d<2&&l===void 0;d++)try{l=r.openSync(n,"wx")}catch{try{if(Date.now()-r.statSync(n).mtimeMs<=a)return"busy";r.unlinkSync(n)}catch{}}if(l===void 0)return"busy";try{try{if(r.statSync(e).size<=i)return"not-needed"}catch{return"not-needed"}try{r.unlinkSync(`${e}.${u}`)}catch{}for(let d=u-1;d>=1;d--)try{r.renameSync(`${e}.${d}`,`${e}.${d+1}`)}catch{}try{r.renameSync(e,`${e}.1`)}catch{}return"rotated"}finally{try{r.closeSync(l)}catch{}try{r.unlinkSync(n)}catch{}}}s(d6,"Q$"),o(d6,"rotateBusFile");function c6(e=process.env,t=process.cwd()){return e.LENSMCP_EVENT_FILE??EB(t,".lensmcp","events.jsonl")}s(c6,"t_"),o(c6,"lensEventFile");var p6=o((e,t,r,i,u)=>({id:lt(),sessionId:e,timestamp:t,source:Q1,category:"runtime",severity:"info",context:{sessionId:e},fingerprint:r,title:i,raw:u}),"lensEvent");function Pd(e,t){return p6(t,e.until,`${wu}:${e.groupId}`,`error dismissed: ${e.title??e.groupId}`,{kind:wu,groupId:e.groupId,until:e.until,eventIds:e.eventIds,...e.by?{by:e.by}:{},...e.reason?{reason:e.reason}:{},...e.title?{title:e.title}:{}})}s(Pd,"ta"),o(Pd,"dismissalEvent");function Ud(e,t,r){return p6(t,r,`${Wn}:${e}`,"error restored",{kind:Wn,groupId:e})}s(Ud,"ra"),o(Ud,"restoralEvent");var m6=o((e,t,r)=>{let i=Number(process.env[e]);return Number.isFinite(i)&&r(i)?i:t},"envNumber");function os(e,t){t.length!==0&&(mB(yB(e),{recursive:!0}),d6(e,{maxBytes:m6("LENSMCP_EVENT_MAX_BYTES",50*1024*1024,r=>r>0),maxFiles:m6("LENSMCP_EVENT_MAX_FILES",5,r=>r>=1&&r<=20),fs:{statSync:gB,renameSync:hB,unlinkSync:vB,openSync:fB,closeSync:pB}}),cB(e,t.map(r=>JSON.stringify(r)+`
|
|
69
|
+
`).join("")))}s(os,"an"),o(os,"appendBusEvents");var bB=["runtime://errors","runtime://browser/errors","runtime://browser/failed-requests"],wB="runtime://dismissed";async function f6(e,t){let r;try{r=await e.read(t)}catch{return[]}let i=r?.entries;return Array.isArray(i)?i.flatMap(u=>{let n=u;if(!n||typeof n.id!="string"||!n.id)return[];let a=typeof n.title=="string"&&n.title?n.title:typeof n.message=="string"?n.message:n.id;return[{id:n.id,title:a,timestamp:typeof n.timestamp=="number"?n.timestamp:0}]}):[]}s(f6,"bA"),o(f6,"entriesOf");async function h6(e,t,r=Date.now()){let i=new Set(t.ids??[]),u=[],n=r;for(let c of bB)for(let p of await f6(e,c))!t.all&&!i.has(p.id)||u.some(m=>m.id===p.id)||(u.push({id:p.id,title:p.title,resource:c}),n=Math.max(n,p.timestamp));let a=new Set(u.map(c=>c.id)),l=t.reason.trim().slice(0,500),d=[];for(let c=0;c<u.length;c+=200){let p=u.slice(c,c+200),m=p[0]?.title??"";d.push({groupId:`events:${lt()}`,until:n,eventIds:p.map(f=>f.id),by:t.by??"agent",reason:l,title:p.length===1?m:`${p.length} errors \u2014 ${m}`})}return{drafts:d,items:u,notFound:[...i].filter(c=>!a.has(c))}}s(h6,"n_"),o(h6,"planDismissal");async function g6(e,t){let r;try{r=await e.read(wB)}catch{r=void 0}let i=r?.dismissals,u=(Array.isArray(i)?i:[]).flatMap(d=>{let c=d;return c&&typeof c.id=="string"?[{id:c.id,eventIds:Array.isArray(c.eventIds)?c.eventIds.filter(p=>typeof p=="string"):[]}]:[]});if(t.all)return{keys:u.map(d=>d.id),notFound:[]};let n=[...new Set(t.ids??[])],a=new Set,l=[];for(let d of n){let c=u.filter(p=>p.id===d||p.eventIds.includes(d));c.length===0&&l.push(d);for(let p of c)a.add(p.id)}return{keys:[...a],notFound:l}}s(g6,"o_"),o(g6,"planRestore");var DB="Hidden, not fixed. Each of these shows again the next time it happens, and runtime://dismissed lists what is hidden, by whom and why.",qd=class extends dB{static{s(this,"oh")}static{o(this,"ObserveDismissErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{dismissed:0,items:[],notFound:[],note:"Nothing named: pass `ids` (from observe.errors, kind runtime) or `all: true`."};let t=this.get(Z),r=this.get(Pr),i=await h6(t,e),u=i.drafts.map(a=>Pd(a,r.id)),n=process.env.LENSMCP_EVENT_FILE;if(n)os(n,u);else for(let a of u)this.get(Ur).publish(a);return{dismissed:i.items.length,items:i.items,notFound:i.notFound,note:i.items.length?DB:"Nothing was dismissed: none of those ids is in a runtime error list right now."}}};qd=F([lB({name:as.name,description:as.description,inputSchema:{ids:Wr.array(Wr.string().min(1)).max(as.maxIds).optional().describe("Entry ids to dismiss \u2014 the `id` of items observe.errors returns for kind `runtime`."),all:Wr.boolean().optional().describe("Dismiss every runtime error currently listed (server-side, browser, failed requests)."),reason:Wr.string().min(as.minReasonChars).describe("Why these are not a problem to fix. Recorded with the dismissal and shown to the person in the dashboard."),by:Wr.enum(["agent","cli"]).default("agent").describe("Who is dismissing. Leave as 'agent'; the lensmcp CLI passes 'cli'.")}})],qd);var $B=qd;import{Tool as BB,ToolContext as xB,z as Zd}from"@frontmcp/sdk";var Ld=class extends xB{static{s(this,"ah")}static{o(this,"ObserveRestoreErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{restored:0,notFound:[],note:"Nothing named: pass dismissal `ids` (from runtime://dismissed) or `all: true`."};let t=this.get(Z),r=this.get(Pr),i=await g6(t,e),u=Date.now(),n=i.keys.map(l=>Ud(l,r.id,u)),a=process.env.LENSMCP_EVENT_FILE;if(a)os(a,n);else for(let l of n)this.get(Ur).publish(l);return{restored:i.keys.length,notFound:i.notFound,note:i.keys.length?"Restored: what those dismissals hid is listed and counted again.":"Nothing was restored: no dismissal matches."}}};Ld=F([BB({name:Od.name,description:Od.description,inputSchema:{ids:Zd.array(Zd.string().min(1)).max(Od.maxIds).optional().describe("Dismissal ids from runtime://dismissed, or ids of entries a dismissal hid."),all:Zd.boolean().optional().describe("Undo every dismissal in effect.")}})],Ld);var CB=Ld;import{spawn as kB}from"node:child_process";import{existsSync as Vd,readFileSync as AB}from"node:fs";import{join as v6}from"node:path";import{Job as IB,JobContext as _B,z as Ie}from"@frontmcp/sdk";import{existsSync as SB}from"node:fs";import{dirname as FB,join as jB,relative as zB,resolve as Jt,isAbsolute as NB}from"node:path";var MB=6;function y6(e=process.env,t=process.cwd()){return Jt(e.LENSMCP_WORKSPACE_ROOT??t)}s(y6,"s_"),o(y6,"resolveAllowedRoot");function ls(e,t){let r=zB(Jt(e),Jt(t));return r===""||!r.startsWith("..")&&!NB(r)}s(ls,"uh"),o(ls,"isWithinRoot");function E6(e,t){let r=Jt(e);if(t===void 0)return{ok:!0,cwd:r};let i=Jt(r,t);return ls(r,i)?{ok:!0,cwd:i}:{ok:!1,reason:`cwd ${i} is outside this server's workspace (${r}). verify_fix runs a workspace-defined Nx target, so it only runs in the workspace this server was started for. Set LENSMCP_WORKSPACE_ROOT to serve a different one.`}}s(E6,"a_"),o(E6,"confineToWorkspace");function b6(e,t){let r=Jt(t),i=Jt(e);if(ls(r,i))for(let u=0;u<MB;u++){if(SB(jB(i,"nx.json")))return i;if(i===r)break;let n=FB(i);if(n===i||!ls(r,n))break;i=n}}s(b6,"c_"),o(b6,"findNxWorkspaceRootWithin");var OB=/^[@A-Za-z0-9][\w./-]*$/;function w6(e){return e.length<=214&&OB.test(e)}s(w6,"u_"),o(w6,"isValidProjectName");var Jd=class extends _B{static{s(this,"dh")}static{o(this,"VerifyFixJob")}async execute(e){let t=Date.now(),r=e.project??process.env.LENSMCP_VERIFY_PROJECT??"example-web",i=y6(),u=E6(i,e.cwd);if(!u.ok)return this.log(`[verify_fix] refused: ${u.reason}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let n=u.cwd;if(!w6(r))return this.log(`[verify_fix] refused: ${r} is not a valid Nx project name`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let a=b6(n,i);if(!a)return this.log(`No nx.json found between ${n} and ${i}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let l=D6("nx",[a]);if(!l)return this.log(`Could not find node_modules/.bin/nx under ${a}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};this.log(`[verify_fix] nx run ${r}:agent-verify (cwd=${a})`);let d=kB(l,["run",`${r}:agent-verify`],{cwd:a,env:{...process.env},stdio:["ignore","pipe","pipe"]}),c=[],p=o(x=>{let $=/\[agent-verify\] ([a-z]+): (passed|failed|skipped|errored)/.exec(x);$&&$[1]&&$[2]&&(c.push({name:$[1],result:$[2],durationMs:0}),this.log(` ${$[1]}: ${$[2]}`))},"captureLine");Wd(d.stdout,p),Wd(d.stderr,p);let m=!1,f=setTimeout(()=>{m=!0;try{d.kill("SIGTERM")}catch{}},e.timeoutMs),h=await new Promise(x=>{d.on("exit",$=>x($??1))});if(clearTimeout(f),m)return{status:"timeout",project:r,durationMs:Date.now()-t,stages:c,reportPath:null};let g=v6(a,".lensmcp","verifications","latest.json"),b;if(Vd(g))try{b=JSON.parse(AB(g,"utf-8"))}catch{b=void 0}return{status:b?.status??(h===0?"passed":"failed"),project:r,durationMs:b?.durationMs??Date.now()-t,stages:b?.stages??c,reportPath:Vd(g)?g:null}}};Jd=F([IB({name:"observe.verify_fix",description:"Run the deterministic verification loop (typecheck \u2192 lint \u2192 build) for a host project. Returns a per-stage report; suggested next read on failure is the relevant *://errors resource.",inputSchema:{project:Ie.string().describe('Nx project name in the host workspace to verify. Defaults to LENSMCP_VERIFY_PROJECT or "example-web".').optional(),cwd:Ie.string().describe("Directory to verify from. MUST be inside the workspace this server was started for (LENSMCP_WORKSPACE_ROOT, else the server's cwd); a path outside it is refused. Defaults to that workspace root.").optional(),timeoutMs:Ie.number().int().positive().default(5*6e4).describe("How long to wait for the verify pipeline before declaring it stuck.")},outputSchema:{status:Ie.enum(["passed","failed","errored","timeout"]),project:Ie.string().nullable(),durationMs:Ie.number(),stages:Ie.array(Ie.object({name:Ie.string(),result:Ie.enum(["passed","failed","skipped","errored"]),durationMs:Ie.number(),exitCode:Ie.number().optional(),summary:Ie.string().optional()})),reportPath:Ie.string().nullable()}})],Jd);var RB=Jd;function D6(e,t){for(let r of t){let i=v6(r,"node_modules",".bin",e);if(Vd(i))return i}}s(D6,"NA"),o(D6,"locateBin");function Wd(e,t){if(!e)return;let r="";e.setEncoding("utf-8"),e.on("data",i=>{r+=typeof i=="string"?i:i.toString("utf-8");let u;for(;(u=r.indexOf(`
|
|
70
|
+
`))!==-1;){let n=r.slice(0,u);r=r.slice(u+1),t(n)}}),e.on("end",()=>{r.length&&t(r)})}s(Wd,"l_"),o(Wd,"bufferLines");var $6=class{static{s(this,"fh")}static{o(this,"AgentApp")}};$6=F([S$({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[W$,H$,Q$],tools:[nB,oB,$B,CB],jobs:[RB]})],$6);var TB={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},PB=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),B6=new Set(["build","types","process"]),x6=o(e=>B6.has(e)?e:"unknown","faultOf"),UB=class{static{s(this,"$o")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[],this.typechecked=new Set}ingest(e){if(e.category==="typecheck")return this.noteTypecheck(e);if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let i=typeof t.project=="string"?t.project:void 0;if(!i)return!1;if(r==="service-error"){let a=x6(t.fault),l=this.touch(i,e.timestamp);if(l.faults.add(a),l.lastTitle=e.title,a==="types"&&this.typechecked.has(i))return!0;let d=typeof t.line=="string"?t.line:e.message??e.title;return this.errors.push({project:i,timestamp:e.timestamp,line:d,fingerprint:e.fingerprint,fault:a}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50),!0}if(r==="service-fault-closed"){let a=this.services.get(i),l=Array.isArray(t.closed)?t.closed.filter(d=>B6.has(d)).map(x6):[];return!a||l.length===0?!1:(a.lastSeenAt=e.timestamp,a.lastTitle=e.title,this.resolve(a,l),!0)}if(r==="service-recovered"){let a=this.services.get(i);return a?(a.lastSeenAt=e.timestamp,this.resolve(a),a.lastTitle=e.title,!0):!1}if(r==="lens-handoff-start"){let a=this.touch(i,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(i,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=TB[r];if(!u)return!1;let n=this.touch(i,e.timestamp);return n.state=u,n.lastTitle=e.title,PB.has(r)&&(n.restarts+=1),u==="up"&&this.resolve(n),!0}resolve(e,t){if(t)for(let i of t)e.faults.delete(i);else e.faults.clear();let r=o(i=>i.project===e.project&&(!t||t.includes(i.fault)),"gone");this.errors.splice(0,this.errors.length,...this.errors.filter(i=>!r(i)))}noteTypecheck(e){let t=e.raw??{};if(t.kind!=="typecheck-run"||t.phase!=="end"||typeof t.project!="string")return!1;let r=t.project,i=t.status==="clean"||t.status==="failing";return i===this.typechecked.has(r)?!1:(i?(this.typechecked.size>=100&&this.typechecked.delete(this.typechecked.values().next().value),this.typechecked.add(r),this.errors.splice(0,this.errors.length,...this.errors.filter(u=>!(u.project===r&&u.fault==="types")))):this.typechecked.delete(r),this.services.get(r)?.faults.has("types")??!1)}snapshot(){let e=[...this.services.values()].sort((r,i)=>r.project.localeCompare(i.project)).map(({faults:r,...i})=>({...i,buildFailed:r.has("build")||r.has("process")||r.has("unknown"),typeErrors:r.has("types")&&!this.typechecked.has(i.project)})),t=o(r=>e.filter(i=>i.state===r).map(i=>i.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),typeErrors:e.filter(r=>r.typeErrors).map(r=>r.project),restarts:e.reduce((r,i)=>r+i.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let i;for(let u of this.services.values())(!i||u.lastSeenAt<i.lastSeenAt)&&(i=u);i&&this.services.delete(i.project)}r={project:e,state:"starting",restarts:0,faults:new Set,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},ds="agent://current-status",cs="process://cluster",qB=250,ZB=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function C6(e){let t=new UB,r=e.sessionId??"pending",i=new J$({thresholds:e.podRules??W3(),sessionId:r,publish:o(d=>e.bus.publish(d),"publish")}),u,n=o(()=>{u||(u=setTimeout(()=>{u=void 0,e.resources.markDirty(ds)},qB),u.unref?.())},"scheduleStatusRefresh"),a=o(d=>{let c=t.ingest(d);c&&e.resources.markDirty(cs);let p=i.ingest(d);p&&e.resources.markDirty(Le),(c||p||ZB.has(d.category))&&n()},"handler"),l=e.bus.subscribe(a);return e.resources.register(cs,()=>({schemaVersion:1,revision:e.resources.revision(cs)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(Le,()=>i.report(e.resources.revision(Le)??0)),e.resources.register(ds,()=>ss({resources:e.resources,sessionId:r,revision:e.resources.revision(ds)??0})),{unsubscribe:o(()=>{l(),u&&(clearTimeout(u),u=void 0)},"unsubscribe"),uris:[ds,cs,Le]}}s(C6,"mh"),o(C6,"installAgentReducer");import{App as LB}from"@frontmcp/sdk";import{Resource as VB,ResourceContext as JB}from"@frontmcp/sdk";var Gd=class extends JB{static{s(this,"hh")}static{o(this,"FlowRecentResource")}async execute(){return this.get(Z).read("flow://recent")}};Gd=F([VB({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],Gd);var WB=Gd;import{Resource as GB,ResourceContext as KB}from"@frontmcp/sdk";var Kd=class extends KB{static{s(this,"vh")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(Z).read("flow://current")}};Kd=F([GB({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],Kd);var HB=Kd;import{Resource as XB,ResourceContext as YB}from"@frontmcp/sdk";var Hd=class extends YB{static{s(this,"bh")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(Z).read("flow://origins/recent")}};Hd=F([XB({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],Hd);var QB=Hd;import{Tool as e2,ToolContext as t2,z as ps}from"@frontmcp/sdk";var k6;function Xd(e){k6=e}s(Xd,"sa"),o(Xd,"setActiveFlowLookups");function Qe(){return k6}s(Qe,"ke"),o(Qe,"activeFlowLookups");var A6;function Yd(e){A6=e}s(Yd,"aa"),o(Yd,"setFlowRecoverySource");function Qd(){return A6}s(Qd,"_o"),o(Qd,"flowRecoverySource");import{existsSync as u2}from"node:fs";import{open as r2}from"node:fs/promises";import{basename as i2}from"node:path";var ms="flow://recent",fs="flow://current",hs="flow://origins/recent",xu=50,I6=50,ec=2e3,n2=4*1024*1024,tc=32*1024*1024,s2=xu+10;function uc(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0,evictedFlows:0},r=e.register??!0,i=o((m,f,h,g=!0)=>{let b=Math.min(f,m.events.length);if(b<=0)return;if(g&&b>0&&(m.events[0]?.raw??{}).kind==="flow-origin"&&m.events.length>1){let $=m.eventBytes[1]??0;if(m.events.splice(1,1),m.eventBytes.splice(1,1),m.retainedBytes=Math.max(0,m.retainedBytes-$),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-$),t.evictedEvents+=1,h&&(t.evictedForBytes+=1),b-=1,b<=0)return}let x=0;for(let $=0;$<b;$+=1)x+=m.eventBytes[$]??0;m.events.splice(0,b),m.eventBytes.splice(0,b),m.retainedBytes=Math.max(0,m.retainedBytes-x),t.retainedEvents=Math.max(0,t.retainedEvents-b),t.retainedBytes=Math.max(0,t.retainedBytes-x),t.evictedEvents+=b,h&&(t.evictedForBytes+=b)},"evictPrefix"),u=o(m=>{let f=0,h=m.retainedBytes;for(;h>n2&&f<m.eventBytes.length;)h-=m.eventBytes[f]??0,f+=1;i(m,f,!0)},"enforceEntryByteCap"),n=o(()=>{for(let m=t.recentOrder.length-1;t.retainedBytes>tc&&m>=0;m-=1){let f=t.flows.get(t.recentOrder[m]);if(!f)continue;let h=0,g=t.retainedBytes;for(;g>tc&&h<f.eventBytes.length;)g-=f.eventBytes[h]??0,h+=1;i(f,h,!0)}},"enforceGlobalByteCap"),a=o(m=>{let f=m.context.flowId;if(!f)return;let h=(m.raw??{}).kind;if(h==="subscription-added"||h==="subscription-removed"||h==="hook-run"||h==="store-created"||h==="singleton-instance"||h==="visual-frame")return;let g=h==="flow-origin";(t.seenSince===void 0||m.timestamp<t.seenSince)&&(t.seenSince=m.timestamp);let b=t.flows.get(f);if(!b){b={summary:{flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,startedAt:m.timestamp,lastSeenAt:m.timestamp,eventCount:0,headline:m.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(f,b);let w={flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,at:m.timestamp,label:m.title,eventId:m.id};t.origins.push(w),t.origins.length>I6&&t.origins.splice(0,t.origins.length-I6),e.resources.markDirty(hs)}g&&!b.hasOrigin&&(b.hasOrigin=!0,b.summary.headline=m.title,m.context.originType&&(b.summary.originType=m.context.originType),m.context.originNodeId&&(b.summary.originNodeId=m.context.originNodeId)),m.timestamp<b.summary.startedAt&&(b.summary.startedAt=m.timestamp);let x=us(m);b.events.push(m),b.eventBytes.push(x),b.retainedBytes+=x,t.retainedEvents+=1,t.retainedBytes+=x,b.events.length>ec&&i(b,b.events.length-ec,!1),u(b),b.summary.eventCount+=1,b.summary.lastSeenAt=m.timestamp;let $=t.recentOrder.indexOf(f);if($>=0&&t.recentOrder.splice($,1),t.recentOrder.unshift(f),t.recentOrder.length>xu){let w=t.recentOrder.splice(xu);for(let k of w){let C=t.flows.get(k);C&&(t.evictedFlows+=1,t.evictedThrough=Math.max(t.evictedThrough??0,C.summary.lastSeenAt),i(C,C.events.length,!1,!1)),t.flows.delete(k)}}n(),t.currentFlowId!==f&&(t.currentFlowId=f,e.resources.markDirty(fs)),e.resources.markDirty(ms)},"handler"),l=e.bus.subscribe(a);e.resources.register(ms,()=>({schemaVersion:1,revision:e.resources.revision(ms)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(m=>t.flows.get(m)?.summary).filter(m=>!!m)})),e.resources.register(fs,()=>{let m=t.currentFlowId,f=m?t.flows.get(m):void 0;return{schemaVersion:1,revision:e.resources.revision(fs)??0,updatedAt:new Date().toISOString(),flow:f?.summary??null}}),e.resources.register(hs,()=>({schemaVersion:1,revision:e.resources.revision(hs)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let d=e.flows??Et,c=new Map,p={getFlowEvents(m){return t.flows.get(m)?.events.slice().sort((f,h)=>f.timestamp-h.timestamp)},getFlowSummary(m){return t.flows.get(m)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(m){return[...t.flows.values()].filter(f=>f.summary.originNodeId===m).map(f=>f.summary)},flowsConfig:d,analyzeFlow(m){let f=t.flows.get(m);if(!f)return;let h=`${f.summary.eventCount}:${f.events.length}:${f.summary.lastSeenAt}`,g=c.get(m);if(g&&g.key===h)return c.delete(m),c.set(m,g),g.analysis;let b=ts(p.getFlowEvents(m)??[],d);for(c.delete(m),c.set(m,{key:h,analysis:b});c.size>s2;)c.delete(c.keys().next().value);return b},classifiedRecent(m=xu){let f=[];for(let h of t.recentOrder){if(f.length>=m)break;let g=t.flows.get(h)?.summary,b=p.analyzeFlow(h);!g||!b||f.push({summary:g,category:b.classification.category,decidedBy:b.classification.decidedBy,...b.classification.subject?{subject:b.classification.subject}:{},tags:b.classification.tags,segmentCount:b.segmentation.stats.segments,phaseCount:b.segmentation.stats.phases,signalCount:b.segmentation.stats.signal})}return f},window(){return{since:(t.evictedThrough!==void 0?Math.max(t.evictedThrough,t.seenSince??0):t.seenSince)??null,flows:t.flows.size,maxFlows:xu,evicted:t.evictedFlows}}};return r&&Xd(p),{unsubscribe:o(()=>{r&&Xd(void 0),l()},"unsubscribe"),uris:[ms,fs,hs],lookups:p,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:xu*ec,byteCap:tc}),"retentionStats")}}s(uc,"ko"),o(uc,"installFlowReducer");var rc={maxBytes:320*1024*1024,maxMs:2e3};function _6(e=process.env){let t=Number(e.LENSMCP_FLOW_RECOVER_BYTES??""),r=Number(e.LENSMCP_FLOW_RECOVER_MS??""),i=o(u=>(e[u]??"").trim()!=="","set");return{maxBytes:i("LENSMCP_FLOW_RECOVER_BYTES")&&Number.isFinite(t)&&t>=0?t:rc.maxBytes,maxMs:i("LENSMCP_FLOW_RECOVER_MS")&&Number.isFinite(r)&&r>0?r:rc.maxMs}}s(_6,"Ih"),o(_6,"recoveryBudgetFromEnv");var S6=1024*1024,ic=10;function F6(e,t){let r=[e];for(let i=1;i<=t;i++)r.push(`${e}.${i}`);return r.filter(i=>u2(i))}s(F6,"YA"),o(F6,"busFiles");function j6(e,t){try{let r=JSON.parse(e);return!r||typeof r!="object"||!("id"in r)||!("source"in r)?void 0:r.context?.flowId===t?r:void 0}catch{return}}s(j6,"QA"),o(j6,"eventOf");function z6(e,t,r,i){let u=e.indexOf(t);for(;u!==-1;){let n=e.lastIndexOf(ic,u)+1,a=e.indexOf(ic,u),l=j6(e.toString("utf8",n,a),r);l&&i.push(l),u=e.indexOf(t,a+1)}}s(z6,"ej"),o(z6,"collect");async function N6(e,t,r,i,u){let n=[],a={file:i2(e),size:0,read:0,matched:0},l;try{l=await r2(e,"r")}catch{return{searched:a,events:n}}let d=o(c=>(a.matched=n.length,{searched:a,events:n,...c?{stoppedBy:c}:{}}),"done");try{a.size=(await l.stat()).size;let c=Buffer.allocUnsafe(S6),p=Buffer.alloc(0);for(;a.read<a.size;){if(a.read>=i)return d("bytes");if(Date.now()>=u)return d("time");let m=Math.min(S6,a.size-a.read,i-a.read),{bytesRead:f}=await l.read(c,0,m,a.read);if(f<=0)break;a.read+=f;let h=p.length>0?Buffer.concat([p,c.subarray(0,f)]):c.subarray(0,f),g=h.lastIndexOf(ic);g>=0&&z6(h.subarray(0,g+1),t,r,n),p=Buffer.from(h.subarray(g+1))}}finally{await l.close().catch(()=>{})}return d()}s(N6,"tj"),o(N6,"searchFile");async function M6(e,t,r){let i=Date.now(),u=i+r.maxMs,n=Buffer.from(JSON.stringify(t)),a=[],l=[],d=0,c;for(let p of F6(e.eventFile,e.maxGenerations??20)){let m=await N6(p,n,t,r.maxBytes-d,u);if(a.push(m.searched),d+=m.searched.read,l.push(m.events),m.stoppedBy){c=m.stoppedBy;break}let f=l.some(g=>g.length>0),h=m.events.some(g=>g.raw?.kind==="flow-origin");if(f&&(h||m.events.length===0))break}return{events:l.reverse().flat(),files:a,bytesRead:d,elapsedMs:Date.now()-i,...c?{stoppedBy:c}:{}}}s(M6,"rj"),o(M6,"findFlowOnBus");var a2=4,Gr=new Map,nc=new Map;function O6(e,t){let r=new Km,i=uc({bus:r,resources:new Qm,...t.flows?{flows:t.flows}:{},register:!1});for(let u of e)r.publish(t.prepare(u));return i.unsubscribe(),i.lookups}s(O6,"oj"),o(O6,"replay");var R6="There is no bus file to search (LENSMCP_EVENT_FILE is not set for this server).",o2="Searching the bus files is turned off (LENSMCP_FLOW_RECOVER_BYTES=0).";function sc(e,t,r,i=R6){let u=`This server holds the ${t.maxFlows} most recently active flows${t.since!==null?` (every flow active since ${new Date(t.since).toISOString()})`:""}, and on start replays only the recent tail of the bus \u2014 this id is not among them.`,n=r?`Its search of the bus files ran out of budget (${r.stoppedBy==="time"?`${r.budgetMs} ms`:`${r.budgetBytes} bytes`}) before finding the flow.`:i;return{found:!1,flowId:e,reason:"outside-window",window:t,...r?{searched:r}:{},hint:`${u} ${n} The flow may still exist further back: re-run it to capture it fresh, raise LENSMCP_FLOW_RECOVER_BYTES / LENSMCP_FLOW_RECOVER_MS, or search .lensmcp/events.jsonl* for the id.`}}s(sc,"b_"),o(sc,"outsideWindow");async function T6(e,t,r,i,u){let n=await M6(r,t,i);if(n.events.length>0){let a=O6(n.events,r);if(!a.getFlowSummary(t))return{found:!1,flowId:t};let l={lookups:a,recovered:{from:"bus",files:n.files.filter(d=>d.matched>0).map(d=>d.file),events:n.events.length,complete:n.stoppedBy===void 0}};for(Gr.set(u,l);Gr.size>a2;)Gr.delete(Gr.keys().next().value);return l}if(n.stoppedBy){let a={files:n.files,bytes:n.bytesRead,budgetBytes:i.maxBytes,budgetMs:i.maxMs,stoppedBy:n.stoppedBy};return sc(t,e.window(),a)}return{found:!1,flowId:t}}s(T6,"sj"),o(T6,"search");async function ac(e,t,r){if(e.getFlowSummary(t))return{lookups:e};let i=r?.budget??rc;if(!r||i.maxBytes<=0){let l=e.window();return l.evicted>0?sc(t,l,void 0,r?o2:R6):{found:!1,flowId:t}}let u=`${r.eventFile}\0${t}`,n=Gr.get(u);if(n)return n;let a=nc.get(u);return a||(a=T6(e,t,r,i,u).finally(()=>nc.delete(u)),nc.set(u,a)),a}s(ac,"Rh"),o(ac,"locateFlow");var l2=120;function oc(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{},...e.sql?{sql:e.sql}:{}}}s(oc,"Eh"),o(oc,"segmentView");function lc(e,t={}){let{segmentation:r,classification:i,segmentCategories:u}=e,n=Math.max(1,t.maxSegments??l2),a=r.segments.reduce((c,p)=>Math.min(c,p.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>n){let c=o(m=>m.counts.errors*1e6+m.counts.signal,"rank"),p=new Set([...d].sort((m,f)=>c(f)-c(m)||(m.id<f.id?-1:1)).slice(0,n).map(m=>m.id));d=d.filter(m=>p.has(m.id))}return{flowId:r.flowId,category:i.category,decidedBy:i.decidedBy,...i.subject?{subject:i.subject}:{},tags:i.tags,origin:i.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(c=>({index:c.index,startOffsetMs:Math.max(0,c.start-l),endOffsetMs:Math.max(0,c.end-l),segmentIds:c.segmentIds})),segments:d.map(c=>oc(c,u[c.id]??"other",l)),segmentsTruncated:d.length<r.segments.length,...r.sql?{sql:r.sql}:{}}}s(lc,"Th"),o(lc,"overviewOf");function P6(e,t,r){let i=t.segmentation.segments.find(n=>n.id===r);if(!i)return;let u=new Set(i.eventIds);return e.filter(n=>u.has(n.id))}s(P6,"w_"),o(P6,"eventsOfSegment");function U6(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(U6,"x_"),o(U6,"filterClassified");function q6(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return y3(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(i=>({...i.subject!==void 0?{subject:i.subject}:{},count:i.count,flowIds:i.items.map(u=>u.id)}))}))}s(q6,"$_"),o(q6,"groupClassified");function Z6(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(Z6,"__"),o(Z6,"categoryCounts");async function L6(e,t,r){if(!e)return dc(e,t);let i=await ac(e,t.flowId,r);if(!("lookups"in i))return i;let u=dc(i.lookups,t);return i.recovered?{...u,recovered:i.recovered}:u}s(L6,"I_"),o(L6,"readFlowDetail");function dc(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),i=e.getFlowEvents(t.flowId);if(!r||!i)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?P6(i,u,t.segmentId):void 0,l=u?.segmentation.segments.find(p=>p.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(p=>p.id)??[]};let d=u.segmentation.segments.reduce((p,m)=>Math.min(p,m.start),1/0),{events:c}=Hn(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:oc(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:c.length>t.limit,events:c.slice(0,t.limit)}}let{events:n}=Hn(i,{includeRaw:t.includeRaw});if(t.expand){let a=n.find(c=>c.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=i.filter(c=>l.has(c.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(c=>({id:c.id,timestamp:c.timestamp,source:c.source,category:c.category,severity:c.severity,title:c.title,message:c.message,...t.includeRaw?{raw:c.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:lc(u)}:{},truncated:n.length>t.limit,events:n.slice(0,t.limit)}}s(dc,"k_"),o(dc,"getFlowDetail");async function V6(e,t,r){if(e){let u=e.classifiedRecent(),n=U6(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=n.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:n.length,categories:Z6(u),...t.groupBy==="category"?{groups:q6(a)}:{}}}let i=await r();return{flows:i.flows.slice(0,t.limit),totalKnown:i.flows.length}}s(V6,"R_"),o(V6,"listRecentFlows");async function J6(e,t,r){if(!e)return cc(e,t);let i=await ac(e,t.flowId,r);if(!("lookups"in i))return i;let u=cc(i.lookups,t);return i.recovered?{...u,recovered:i.recovered}:u}s(J6,"E_"),o(J6,"readFlowSegments");function cc(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...lc(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(cc,"S_"),o(cc,"getFlowSegments");var pc=class extends t2{static{s(this,"Ah")}static{o(this,"FlowListRecentTool")}async execute(e){return V6(Qe(),e,async()=>await this.get(Z).read("flow://recent"))}};pc=F([e2({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:ps.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:ps.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:ps.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:ps.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],pc);var d2=pc;import{Tool as c2,ToolContext as p2,z as Kr}from"@frontmcp/sdk";var mc=class extends p2{static{s(this,"zh")}static{o(this,"FlowGetTool")}async execute(e){return L6(Qe(),e,Qd())}};mc=F([c2({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` for the full `event.raw` payloads. The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree. Before summing SQL counts or time, read `overview.sql`: db-query events are flood-guarded per query shape, so only `status: "complete"` means they are every statement; `gaps` names the requests that fall short and by how much. Each request\'s verdict carries `basis`: `end` (accounted when the request ended) or `settled` (a quiet-period snapshot that later SQL in the same context could still change); `overview.sql.settled` counts the verdicts resting on one. A flow this server no longer holds in memory (it keeps the 50 most recently active, and replays only the recent tail of the bus on start) is read back from the bus files on demand: the same answer, plus `recovered` (`files`, `events`, and `complete: false` when older events may be missing). `found: false` alone means no event of this id is retained anywhere the server can read; `reason: "outside-window"` means it may exist further back than the server can see (`window`, `searched`, `hint`) \u2014 re-run the flow rather than concluding it never happened.',inputSchema:{flowId:Kr.string().describe("Flow id from flow://recent."),includeRaw:Kr.boolean().default(!1),limit:Kr.number().int().positive().max(500).default(200),expand:Kr.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:Kr.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],mc);var m2=mc;import{Tool as f2,ToolContext as h2,z as g2}from"@frontmcp/sdk";var fc=class extends h2{static{s(this,"Mh")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=Qe();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};fc=F([f2({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:g2.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],fc);var v2=fc;import{Tool as y2,ToolContext as E2,z as b2}from"@frontmcp/sdk";import*as w2 from"node:fs";import{dirname as D2,join as W6}from"node:path";var $2="ai",B2=/^ai_[0-9a-z]{8,40}$/,gs=o(e=>typeof e=="string"&&B2.test(e),"isAiCallId");function G6(e){return W6(D2(e),$2)}s(G6,"yj"),o(G6,"aiContentDir");function K6(e,t){if(!gs(t))throw new Error("invalid ai call id");return W6(G6(e),`${t}.json`)}s(K6,"bj"),o(K6,"aiContentFile");function hc(e,t){if(gs(t))try{let r=JSON.parse(w2.readFileSync(K6(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(hc,"pa"),o(hc,"readAiContent");var gc=class extends E2{static{s(this,"Ph")}static{o(this,"AiGetCallTool")}async execute(e){if(!gs(e.callId))return{found:!1,reason:"invalid call id"};let t=hc(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};gc=F([y2({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:b2.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],gc);var x2=gc;import{Tool as C2,ToolContext as k2,z as H6}from"@frontmcp/sdk";var vc=class extends k2{static{s(this,"Dh")}static{o(this,"FlowSegmentsTool")}async execute(e){return J6(Qe(),e,Qd())}};vc=F([C2({name:"flow.segments",description:'Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow\'s category, subject and tags. Open one unit with flow.get { flowId, segmentId }. A flow no longer in memory is read back from the bus as in flow.get (`recovered`); `reason: "outside-window"` means it may exist further back than the server can see.',inputSchema:{flowId:H6.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:H6.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],vc);var A2=vc,X6=class{static{s(this,"Ch")}static{o(this,"FlowApp")}};X6=F([LB({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[WB,HB,QB],tools:[d2,m2,A2,v2,x2]})],X6);import{App as I2}from"@frontmcp/sdk";import{Resource as _2,ResourceContext as S2}from"@frontmcp/sdk";var yc=class extends S2{static{s(this,"Uh")}static{o(this,"StoryRecentResource")}async execute(){return this.get(Z).read("story://recent")}};yc=F([_2({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],yc);var F2=yc;import{Resource as j2,ResourceContext as z2}from"@frontmcp/sdk";var Ec=class extends z2{static{s(this,"Fh")}static{o(this,"StoryLastResource")}async execute(){return this.get(Z).read("story://last")}};Ec=F([j2({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],Ec);var N2=Ec;import{Tool as M2,ToolContext as O2,z as R2}from"@frontmcp/sdk";var vs="story://recent",ys="story://last",Pe={byFlowId:new Map,order:[]},Y6=!1;function Q6(e){return Y6||(e.resources.register(vs,()=>({schemaVersion:1,revision:e.resources.revision(vs)??0,updatedAt:new Date().toISOString(),stories:Pe.order.map(t=>Pe.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(ys,()=>{let t=Pe.order[0],r=t?Pe.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(ys)??0,updatedAt:new Date().toISOString(),story:r??null}}),Y6=!0),ey(e.resources),{uris:[vs,ys]}}s(Q6,"qh"),o(Q6,"installStoryReducer");var bc;function ey(e){bc=o(t=>{e.markDirty(t)},"markDirty")}s(ey,"Aj"),o(ey,"setMarkDirty");function wc(e){Pe.byFlowId.set(e.flowId,e);let t=Pe.order.indexOf(e.flowId);if(t>=0&&Pe.order.splice(t,1),Pe.order.unshift(e.flowId),Pe.order.length>50){let r=Pe.order.splice(50);for(let i of r)Pe.byFlowId.delete(i)}bc?.(vs),bc?.(ys)}s(wc,"Ro"),o(wc,"recordCompiledStory");function ty(e){return Pe.byFlowId.get(e)}s(ty,"Vh"),o(ty,"getCompiledStory");var Dc=class extends O2{static{s(this,"Gh")}static{o(this,"StoryCompileTool")}async execute(e){let t=Qe();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let i=la(r,{flowId:e.flowId});return i?(wc(i),{compiled:!0,story:i}):{compiled:!1,flowId:e.flowId}}};Dc=F([M2({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:R2.string().describe("Flow id (from flow://recent).")}})],Dc);var T2=Dc;import{Tool as P2,ToolContext as U2,z as q2}from"@frontmcp/sdk";var $c=class extends U2{static{s(this,"Wh")}static{o(this,"StoryGetTool")}async execute(e){let t=ty(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};$c=F([P2({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:q2.string().describe("Flow id.")}})],$c);var Z2=$c,uy=class{static{s(this,"Xh")}static{o(this,"StoryApp")}};uy=F([I2({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[F2,N2],tools:[T2,Z2]})],uy);import{App as L2}from"@frontmcp/sdk";import{Resource as V2,ResourceContext as J2}from"@frontmcp/sdk";var Bc=class extends J2{static{s(this,"Hh")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(Z).read("build://current")}};Bc=F([V2({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],Bc);var W2=Bc;import{Resource as G2,ResourceContext as K2}from"@frontmcp/sdk";var xc=class extends K2{static{s(this,"Qh")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(Z).read("build://failures")}};xc=F([G2({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],xc);var H2=xc;import{Resource as X2,ResourceContext as Y2}from"@frontmcp/sdk";var Cc=class extends Y2{static{s(this,"tg")}static{o(this,"BuildRecentResource")}async execute(){return this.get(Z).read("build://events/recent")}};Cc=F([X2({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],Cc);var Q2=Cc,ry=class{static{s(this,"ng")}static{o(this,"BuildApp")}};ry=F([L2({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[W2,H2,Q2]})],ry);var Es="build://current",bs="build://failures",ws="build://events/recent",ex=new Set(["vite","rollup","typescript","eslint"]),iy=new Set(["build","typecheck","lint"]),ny=50,tx="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function sy(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(sy,"Jj"),o(sy,"readRaw");function ay(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(ay,"Wj"),o(ay,"defaultTool");function oy(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((f,h)=>{let g=t.producers.get(f);t.producers.set(f,{id:f,tool:h.tool,...h.project?{project:h.project}:{},firstReportedAt:g?.firstReportedAt??h.at,lastReportedAt:Math.max(g?.lastReportedAt??0,h.at),lastRunStatus:h.runStatus,errorCount:h.errorCount??g?.errorCount??0,...h.warningCount!==void 0?{warningCount:h.warningCount}:g?.warningCount!==void 0?{warningCount:g.warningCount}:{},...h.durationMs!==void 0?{lastRunDurationMs:h.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...h.error?{error:h.error}:{}}),qt(t.producers,qr)},"touchProducer"),i=o(f=>{for(let[h,g]of t.failures)f(g)&&t.failures.delete(h);for(let[h,g]of t.warnings)f(g)&&t.warnings.delete(h)},"drop"),u=o((f,h)=>{i(g=>g.domain===f&&(h===void 0||g.project===h))},"clearScope"),n=o((f,h)=>{if(h.length===0)return;let g=new Set(h);i(b=>b.domain===f&&b.file!==void 0&&g.has(b.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let f=[...t.producers.values()].some(h=>h.lastRunStatus==="error");t.status=f||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty(Es),e.resources.markDirty(bs),e.resources.markDirty(ws)},"markDirty"),d=o(f=>{if([...t.failures.values()].some(h=>h.project===f)||[...t.warnings.values()].some(h=>h.project===f)||[...t.producers.values()].some(h=>h.project===f)){for(let h of iy)u(h,f);for(let[h,g]of t.producers)g.project===f&&t.producers.delete(h);t.sawVerdict=[...t.producers.values()].some(h=>h.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),c=o(f=>{if(f.source==="gateway"&&f.category==="cluster"){let C=f.raw??null,M=C?.kind;(M==="service-starting"||M==="service-respawn")&&C?.project&&d(C.project);return}if(!ex.has(f.source)||!iy.has(f.category))return;let h=f.category,g=sy(f),b=g.project,x=g.tool??ay(h,f.source),$=`${x}:${b??"*"}`,w=typeof g.kind=="string"&&g.kind.endsWith("-run"),k={id:f.id,timestamp:f.timestamp,severity:f.severity,title:f.title,...f.message!==void 0?{message:f.message}:{},...f.location?.file?{file:f.location.file}:g.file?{file:g.file}:{},domain:h,...b?{project:b}:{},fingerprint:f.fingerprint};if(f.severity==="info"&&(w&&g.phase==="start"||f.title.startsWith("tsc clear")||f.title.startsWith("ESLint clear"))){u(h,b),t.lastRunAt=f.timestamp,Hr(t,k),r($,{tool:x,...b?{project:b}:{},at:f.timestamp,runStatus:"running"}),w||(t.sawVerdict=!0),a(),l();return}if(w&&g.phase==="end"){let C=g.status==="error"?"error":g.status==="failing"?"failing":"clean";C==="clean"&&u(h,b),C!=="error"&&(t.sawVerdict=!0),t.lastRunAt=f.timestamp,Hr(t,k),r($,{tool:x,...b?{project:b}:{},at:f.timestamp,runStatus:C,...g.durationMs!==void 0?{durationMs:g.durationMs}:{},...g.errorCount!==void 0?{errorCount:g.errorCount}:{},...g.warningCount!==void 0?{warningCount:g.warningCount}:{},...g.error?{error:g.error}:{}}),a(),l();return}if(g.kind==="hmr"||f.title.startsWith("HMR ")){t.hmrUpdates+=1;let C=[...k.file?[k.file]:[],...f.relatedFiles??[]];n("build",C),t.lastRunAt=f.timestamp,t.sawVerdict=!0,Hr(t,k),r($,{tool:x,...b?{project:b}:{},at:f.timestamp,runStatus:"clean"}),a(),l();return}Hr(t,k),f.severity==="error"||f.severity==="fatal"?(t.failures.set(k.fingerprint,k),t.warnings.delete(k.fingerprint)):f.severity==="warning"?t.failures.has(k.fingerprint)||t.warnings.set(k.fingerprint,k):(t.failures.delete(k.fingerprint),t.warnings.delete(k.fingerprint)),t.lastRunAt=f.timestamp,t.sawVerdict=!0,r($,{tool:x,...b?{project:b}:{},at:f.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),p=e.bus.subscribe(c),m=o(()=>Vn({producers:[...t.producers.values()],domain:"build",noProducerHint:tx}),"health");return e.resources.register(Es,()=>({schemaVersion:1,revision:e.resources.revision(Es)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...m()})),e.resources.register(bs,()=>({schemaVersion:1,revision:e.resources.revision(bs)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...m()})),e.resources.register(ws,()=>({schemaVersion:1,revision:e.resources.revision(ws)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:p,uris:[Es,bs,ws]}}s(oy,"og"),o(oy,"installBuildReducer");function Hr(e,t){e.recent.push(t),e.recent.length>ny&&e.recent.splice(0,e.recent.length-ny)}s(Hr,"ya"),o(Hr,"pushRecent");import{App as ux}from"@frontmcp/sdk";import{Resource as rx,ResourceContext as ix}from"@frontmcp/sdk";var kc=class extends ix{static{s(this,"ig")}static{o(this,"LintCurrentResource")}async execute(){return this.get(Z).read("lint://current")}};kc=F([rx({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],kc);var nx=kc;import{Resource as sx,ResourceContext as ax}from"@frontmcp/sdk";var Ac=class extends ax{static{s(this,"ag")}static{o(this,"LintErrorsResource")}async execute(){return this.get(Z).read("lint://errors")}};Ac=F([sx({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],Ac);var ox=Ac;import{Resource as lx,ResourceContext as dx}from"@frontmcp/sdk";var Ic=class extends dx{static{s(this,"ug")}static{o(this,"LintWarningsResource")}async execute(){return this.get(Z).read("lint://warnings")}};Ic=F([lx({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],Ic);var cx=Ic,ly=class{static{s(this,"dg")}static{o(this,"LintApp")}};ly=F([ux({id:"lint",name:"Lint",description:"ESLint state.",resources:[nx,ox,cx]})],ly);var Ds="lint://current",$s="lint://errors",Bs="lint://warnings",px="Nothing runs ESLint in the dev loop, so this is expected. Run `lensmcp lint [paths\u2026]` to publish a run; until then treat lint as UNCHECKED, not passing.";function dy(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(dy,"nz"),o(dy,"readRaw");function cy(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((p,m)=>{let f=t.producers.get(p);t.producers.set(p,{id:p,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:f?.firstReportedAt??m.at,lastReportedAt:Math.max(f?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??f?.errorCount??0,...m.warningCount!==void 0?{warningCount:m.warningCount}:f?.warningCount!==void 0?{warningCount:f.warningCount}:{},...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:f?.lastRunDurationMs!==void 0?{lastRunDurationMs:f.lastRunDurationMs}:{},...m.error?{error:m.error}:{}}),qt(t.producers,qr)},"touchProducer"),i=o((p,m)=>{let f=o((h,g)=>{for(let[b,x]of h)g(x)&&h.delete(b)},"drop");if(p){f(t.errors,h=>h.project===p),f(t.warnings,h=>h.project===p);return}if(m){f(t.errors,h=>h.file===m),f(t.warnings,h=>h.file===m);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let p=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(Ds),e.resources.markDirty($s),e.resources.markDirty(Bs)},"markDirty"),a=o(p=>{if([...t.errors.values()].some(m=>m.project===p)||[...t.warnings.values()].some(m=>m.project===p)||[...t.producers.values()].some(m=>m.project===p)){i(p,void 0);for(let[m,f]of t.producers)f.project===p&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let w=p.raw??null,k=w?.kind;(k==="service-starting"||k==="service-respawn")&&w?.project&&a(w.project);return}if(p.source!=="eslint"||p.category!=="lint")return;let m=dy(p),f=m.project,h=m.tool??"eslint",g=`${h}:${f??"*"}`,b=m.kind==="lint-run";if(p.severity==="info"&&(b&&m.phase==="start"||p.title.startsWith("ESLint clear"))){i(f,p.location?.file),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"running"}),b||(t.sawVerdict=!0),u(),n();return}if(b&&m.phase==="end"){let w=m.status==="error"?"error":m.status==="failing"?"failing":"clean";w!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:w,...m.durationMs!==void 0?{durationMs:m.durationMs}:{},...m.errorCount!==void 0?{errorCount:m.errorCount}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}}),u(),n();return}let x=p.title.match(/^\[([^\]]+)\]/),$={id:p.id,timestamp:p.timestamp,severity:p.severity,...m.rule?{rule:m.rule}:x?.[1]?{rule:x[1]}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...f?{project:f}:{},fingerprint:p.fingerprint};if(p.severity==="error"||p.severity==="fatal")t.errors.set($.fingerprint,$),t.warnings.delete($.fingerprint);else if(p.severity==="warning")t.errors.has($.fingerprint)||t.warnings.set($.fingerprint,$);else return;t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>Vn({producers:[...t.producers.values()],domain:"lint",noProducerHint:px}),"health");return e.resources.register(Ds,()=>({schemaVersion:1,revision:e.resources.revision(Ds)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register($s,()=>({schemaVersion:1,revision:e.resources.revision($s)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),e.resources.register(Bs,()=>({schemaVersion:1,revision:e.resources.revision(Bs)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...c()})),{unsubscribe:d,uris:[Ds,$s,Bs]}}s(cy,"pg"),o(cy,"installLintReducer");import{App as mx}from"@frontmcp/sdk";import{Resource as fx,ResourceContext as hx}from"@frontmcp/sdk";var _c=class extends hx{static{s(this,"fg")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(Z).read("typecheck://current")}};_c=F([fx({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],_c);var gx=_c;import{Resource as vx,ResourceContext as yx}from"@frontmcp/sdk";var Sc=class extends yx{static{s(this,"hg")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(Z).read("typecheck://errors")}};Sc=F([vx({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],Sc);var Ex=Sc,py=class{static{s(this,"vg")}static{o(this,"TypecheckApp")}};py=F([mx({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[gx,Ex]})],py);var xs="typecheck://current",Cs="typecheck://errors",bx="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function my(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(my,"lz"),o(my,"readRaw");function fy(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((p,m)=>{let f=t.producers.get(p),h={id:p,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:f?.firstReportedAt??m.at,lastReportedAt:Math.max(f?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??f?.errorCount??0,...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:f?.lastRunDurationMs!==void 0?{lastRunDurationMs:f.lastRunDurationMs}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}};t.producers.set(p,h),qt(t.producers,qr)},"touchProducer"),i=o(p=>{if(!p){t.errors.clear();return}for(let[m,f]of t.errors)f.project===p&&t.errors.delete(m)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let p=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(xs),e.resources.markDirty(Cs)},"markDirty"),a=o(p=>{let m=[...t.errors.values()].some(h=>h.project===p),f=[...t.producers.values()].some(h=>h.project===p);if(!(!m&&!f)){i(p);for(let[h,g]of t.producers)g.project===p&&t.producers.delete(h);t.sawVerdict=[...t.producers.values()].some(h=>h.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let w=p.raw??null,k=w?.kind;(k==="service-starting"||k==="service-respawn")&&w?.project&&a(w.project);return}if(p.source!=="typescript"||p.category!=="typecheck")return;let m=my(p),f=m.project,h=m.tool??"tsc",g=`${h}:${f??"*"}`,b=m.kind==="typecheck-run";if(p.severity==="info"&&(b&&m.phase==="start"||p.title.startsWith("tsc clear"))){i(f),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"running"}),b||(t.sawVerdict=!0),u(),n();return}if(b&&m.phase==="end"){let w=m.status==="error"?"error":m.status==="failing"?"failing":"clean";w!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:w,...m.durationMs!==void 0?{durationMs:m.durationMs}:{},...m.errorCount!==void 0?{errorCount:m.errorCount}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}}),u(),n();return}if(p.severity!=="error"&&p.severity!=="fatal")return;let x=p.title.match(/\bTS(\d+):/),$={id:p.id,timestamp:p.timestamp,...m.code?{code:m.code}:x?{code:`TS${x[1]}`}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...f?{project:f}:{},fingerprint:p.fingerprint};t.errors.set($.fingerprint,$),t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"failing"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>Vn({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:bx}),"health");return e.resources.register(xs,()=>({schemaVersion:1,revision:e.resources.revision(xs)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(Cs,()=>({schemaVersion:1,revision:e.resources.revision(Cs)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),{unsubscribe:d,uris:[xs,Cs]}}s(fy,"yg"),o(fy,"installTypecheckReducer");import{App as wx}from"@frontmcp/sdk";import{Resource as Dx,ResourceContext as $x}from"@frontmcp/sdk";var Fc=class extends $x{static{s(this,"bg")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(Z).read("bundle://current")}};Fc=F([Dx({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],Fc);var Bx=Fc;import{Resource as xx,ResourceContext as Cx}from"@frontmcp/sdk";var jc=class extends Cx{static{s(this,"xg")}static{o(this,"BundleChunksResource")}async execute(){return this.get(Z).read("bundle://chunks")}};jc=F([xx({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],jc);var kx=jc;import{Resource as Ax,ResourceContext as Ix}from"@frontmcp/sdk";var zc=class extends Ix{static{s(this,"_g")}static{o(this,"BundleModulesResource")}async execute(){return this.get(Z).read("bundle://modules")}};zc=F([Ax({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],zc);var _x=zc;import{Resource as Sx,ResourceContext as Fx}from"@frontmcp/sdk";var Nc=class extends Fx{static{s(this,"Sg")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(Z).read("bundle://regressions")}};Nc=F([Sx({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],Nc);var jx=Nc;import{Resource as zx,ResourceContext as Nx}from"@frontmcp/sdk";var Mc=class extends Nx{static{s(this,"Rg")}static{o(this,"BundleCompareResource")}async execute(){return this.get(Z).read("bundle://compare/latest")}};Mc=F([zx({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],Mc);var Mx=Mc,hy=class{static{s(this,"Tg")}static{o(this,"BundleApp")}};hy=F([wx({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[Bx,kx,_x,jx,Mx]})],hy);function Oc(e,t){let r=[],i=new Map(e.chunks.map(n=>[n.name,n])),u=new Map(t.chunks.map(n=>[n.name,n]));for(let[n,a]of u){let l=i.get(n);if(!l){r.push({kind:"chunk-added",name:n,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:n,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...gy(l,a))}for(let[n,a]of i)u.has(n)||r.push({kind:"chunk-removed",name:n,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((n,a)=>Math.abs(a.deltaBytes)-Math.abs(n.deltaBytes))}s(Oc,"ka"),o(Oc,"compareReports");function gy(e,t){let r=[],i=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let n=i.get(u.id);if(n===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-n;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:n,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(gy,"$z"),o(gy,"compareModules");var ks="bundle://current",As="bundle://chunks",Is="bundle://modules",Xr="bundle://regressions",Yr="bundle://compare/latest";function vy(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let n=u.raw;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="bundle-report")return;let a=n.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?Oc(t.baseline,a):[],e.resources.markDirty(ks),e.resources.markDirty(As),e.resources.markDirty(Is),e.resources.markDirty(Xr),e.resources.markDirty(Yr))},"handler"),i=e.bus.subscribe(r);return e.resources.register(ks,()=>({schemaVersion:1,revision:e.resources.revision(ks)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(As,()=>({schemaVersion:1,revision:e.resources.revision(As)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(Is,()=>{let u=t.current?.chunks.flatMap(n=>n.modules.map(a=>({...a,chunk:n.name})))??[];return{schemaVersion:1,revision:e.resources.revision(Is)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(Xr,()=>({schemaVersion:1,revision:e.resources.revision(Xr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(Yr,()=>({schemaVersion:1,revision:e.resources.revision(Yr)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:i,uris:[ks,As,Is,Xr,Yr],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=Oc(t.baseline,t.current)),e.resources.markDirty(Xr),e.resources.markDirty(Yr)},"setBaseline")}}s(vy,"Ag"),o(vy,"installBundleReducer");import{App as Ox}from"@frontmcp/sdk";import{Resource as Rx,ResourceContext as Tx}from"@frontmcp/sdk";var Rc=class extends Tx{static{s(this,"jg")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(Z).read("runtime://browser/console")}};Rc=F([Rx({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],Rc);var Px=Rc;import{Resource as Ux,ResourceContext as qx}from"@frontmcp/sdk";var Tc=class extends qx{static{s(this,"Og")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(Z).read("runtime://browser/errors")}};Tc=F([Ux({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],Tc);var Zx=Tc;import{Resource as Lx,ResourceContext as Vx}from"@frontmcp/sdk";var Pc=class extends Vx{static{s(this,"Ng")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(Z).read("runtime://errors")}};Pc=F([Lx({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],Pc);var Jx=Pc;import{Resource as Wx,ResourceContext as Gx}from"@frontmcp/sdk";var Uc=class extends Gx{static{s(this,"Dg")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(Z).read("runtime://browser/network")}};Uc=F([Wx({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],Uc);var Kx=Uc;import{Resource as Hx,ResourceContext as Xx}from"@frontmcp/sdk";var qc=class extends Xx{static{s(this,"Ug")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(Z).read("runtime://browser/failed-requests")}};qc=F([Hx({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],qc);var Yx=qc;import{Resource as Qx,ResourceContext as eC}from"@frontmcp/sdk";var Zc=class extends eC{static{s(this,"Fg")}static{o(this,"RuntimeDismissedResource")}async execute(){return this.get(Z).read("runtime://dismissed")}};Zc=F([Qx({name:"runtime-dismissed",uri:"runtime://dismissed",mimeType:"application/json",description:"Errors someone DISMISSED by hand \u2014 in the dashboard, at the CLI, or an agent through observe.dismiss_errors \u2014 with who did it and the reason they gave. A dismissed error is hidden from runtime://errors and the browser error lists, not fixed: it shows again the next time it happens. Read this when an error list is shorter than you expected."})],Zc);var tC=Zc,yy=class{static{s(this,"Zg")}static{o(this,"RuntimeApp")}};yy=F([Ox({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[Px,Zx,Jx,Kx,Yx,tC]})],yy);var Cu="runtime://browser/console",wt="runtime://browser/errors",ku="runtime://browser/network",Dt="runtime://browser/failed-requests",$t="runtime://errors",Qr="runtime://dismissed",uC=200,Ey=100,rC=200,iC=50,nC=500,sC="default",aC=1e3,Lc=o(e=>e??sC,"tabOf");function by(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(by,"Bz"),o(by,"isDocumentBoundary");function wy(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(wy,"Zz"),o(wy,"isTabGone");function Dy(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,dismissed:new Map,changedAt:new Map},i=o((c,p)=>{r.changedAt.set(c,p),e.resources.markDirty(c)},"touch"),u=o((c,p,m)=>{let f=c.filter(h=>!(Lc(h.tabId)===p&&h.timestamp<m));f.length!==c.length&&(c.length=0,c.push(...f))},"retract"),n=o(c=>{let p=yd(c);if(p){let f=r.dismissed.get(p.groupId);r.dismissed.delete(p.groupId),p.kind===wu&&(r.dismissed.set(p.groupId,{eventIds:new Set(p.eventIds),at:c.timestamp,...p.by?{by:p.by}:{},...p.reason?{reason:p.reason}:{},...p.title?{title:p.title}:{}}),r.dismissed.size>nC&&r.dismissed.delete(r.dismissed.keys().next().value));let h=new Set([...f?.eventIds??[],...r.dismissed.get(p.groupId)?.eventIds??[]]);for(let[g,b]of[[$t,r.serverErrors],[wt,r.errors],[Dt,r.failed]])b.some(x=>h.has(x.id))&&i(g,c.timestamp);i(Qr,c.timestamp);return}if($y(c)){let f=c.raw?.project;if(f){let h=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(g=>g.project!==f),r.serverErrors.length!==h&&i($t,c.timestamp)}return}if(By(c)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,c.timestamp),Au(r.serverErrors,xy(c),Ey),i($t,c.timestamp);return}if(!(c.source==="client-runtime"||c.source==="chrome")&&!(c.source==="react"&&c.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,c.timestamp),wy(c)){let f=Lc(c.context.tabId);u(r.errors,f,Number.POSITIVE_INFINITY),u(r.failed,f,Number.POSITIVE_INFINITY),r.readyByTab.delete(f);for(let h of[wt,Dt,Cu,ku])i(h,c.timestamp);return}if(by(c)){let f=Lc(c.context.tabId);r.readyByTab.set(f,Math.max(r.readyByTab.get(f)??0,c.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,c.timestamp);let h=c.timestamp-aC;u(r.errors,f,h),u(r.failed,f,h);for(let g of[wt,Dt,Cu,ku])i(g,c.timestamp);return}let m={id:c.id,timestamp:c.timestamp,severity:c.severity,title:c.title,message:c.message,source:c.source,fingerprint:c.fingerprint,tabId:c.context.tabId,url:c.context.url,raw:c.raw};if(c.category==="network"){Au(r.network,m,rC),i(ku,c.timestamp),c.severity==="error"&&(Au(r.failed,m,iC),i(Dt,c.timestamp));return}(c.severity==="error"||c.severity==="fatal")&&(Au(r.errors,m,Ey),i(wt,c.timestamp)),c.title?.startsWith("console.")&&(Au(r.console,m,uC),i(Cu,c.timestamp))},"handler"),a=e.bus.subscribe(n),l=new Set([$t,wt,Dt]),d=o((c,p)=>{if(!l.has(c)||r.dismissed.size===0)return Jc(e.resources,c,p,r,t,0);let m=new Set([...r.dismissed.values()].flatMap(h=>[...h.eventIds])),f=p.filter(h=>!m.has(h.id));return Jc(e.resources,c,f,r,t,p.length-f.length)},"snap");return e.resources.register($t,()=>d($t,r.serverErrors)),e.resources.register(Cu,()=>d(Cu,r.console)),e.resources.register(wt,()=>d(wt,r.errors)),e.resources.register(ku,()=>d(ku,r.network)),e.resources.register(Dt,()=>d(Dt,r.failed)),e.resources.register(Qr,()=>{let c=new Set([...r.serverErrors,...r.errors,...r.failed].map(m=>m.id)),p=[...r.dismissed].map(([m,f])=>({id:m,at:f.at,...f.by?{by:f.by}:{},...f.reason?{reason:f.reason}:{},...f.title?{title:f.title}:{},eventIds:[...f.eventIds],hiding:[...f.eventIds].filter(h=>c.has(h)).length}));return{schemaVersion:1,revision:e.resources.revision(Qr)??0,updatedAt:new Date(r.changedAt.get(Qr)??t).toISOString(),count:p.length,dismissals:p,detail:p.length?`${p.length} dismissal${p.length===1?"":"s"} in effect \u2014 hidden, not fixed. Each error shows again the next time it happens; undo one with observe.restore_errors.`:"Nothing has been dismissed."}}),{unsubscribe:a,uris:[Cu,wt,ku,Dt,$t,Qr]}}s(Dy,"Gg"),o(Dy,"installRuntimeReducer");function Vc(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(Vc,"C_"),o(Vc,"projectOf");function $y(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s($y,"qz"),o($y,"isGenerationBoundary");function By(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(By,"Vz"),o(By,"isServerError");function xy(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...Vc(e)?{project:Vc(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(xy,"Gz"),o(xy,"serverEntry");function Jc(e,t,r,i,u,n){let a=t===$t,l=a?i.lastServerEventAt:i.lastEventAt,d=l!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(i.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),...n>0?{dismissedCount:n}:{},producer:d?"connected":"none",lastEventAt:l,lastReadyAt:i.lastReadyAt,detail:a?d?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since."+_s(n):`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(c=>c.project??"unknown")).size} project${new Set(r.map(c=>c.project??"unknown")).size===1?"":"s"}`+_s(n):"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":d?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${i.readyByTab.size} open tab${i.readyByTab.size===1?"":"s"}`+(i.lastReadyAt===void 0?" (no page load observed yet)":"")+_s(n):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(Jc,"U_"),o(Jc,"snapshot");function _s(e){return e>0?` \u2014 ${e} more dismissed by hand in the dashboard (hidden, not fixed)`:""}s(_s,"Vg"),o(_s,"dismissedNote");function Au(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Au,"jo"),o(Au,"pushBounded");import{App as oC}from"@frontmcp/sdk";import{Resource as lC,ResourceContext as dC}from"@frontmcp/sdk";var Wc=class extends dC{static{s(this,"Jg")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(Z).read("browser://tabs")}};Wc=F([lC({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],Wc);var cC=Wc;import{Resource as pC,ResourceContext as mC}from"@frontmcp/sdk";var Gc=class extends mC{static{s(this,"Kg")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(Z).read("browser://active-tab")}};Gc=F([pC({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],Gc);var fC=Gc,Cy=class{static{s(this,"Hg")}static{o(this,"BrowserApp")}};Cy=F([oC({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[cC,fC]})],Cy);var Bt="browser://tabs",xt="browser://active-tab";function ky(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(ky,"Yz"),o(ky,"isDocumentBoundary");function Ay(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(Ay,"Qz"),o(Ay,"isTabGone");function Iy(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},i=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(Ay(a)){if(r.tabs.delete(l),r.activePageId===l){let c=[...r.tabs.keys()];r.activePageId=c[c.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(Bt,a.timestamp),r.changedAt.set(xt,a.timestamp),e.resources.markDirty(Bt),e.resources.markDirty(xt);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let c=r.tabs.keys().next().value;c!==void 0&&c!==l&&r.tabs.delete(c)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),ky(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(Bt,a.timestamp),r.changedAt.set(xt,a.timestamp),e.resources.markDirty(Bt),e.resources.markDirty(xt)},"handler"),u=e.bus.subscribe(i),n=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(Bt,()=>({schemaVersion:1,revision:e.resources.revision(Bt)??0,updatedAt:n(Bt),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(xt,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(xt)??0,updatedAt:n(xt),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[Bt,xt]}}s(Iy,"Yg"),o(Iy,"installBrowserReducer");import{App as hC}from"@frontmcp/sdk";import{Resource as gC,ResourceContext as vC}from"@frontmcp/sdk";var Kc=class extends vC{static{s(this,"Qg")}static{o(this,"NestProvidersResource")}async execute(){return this.get(Z).read("nest://providers")}};Kc=F([gC({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],Kc);var yC=Kc;import{Resource as EC,ResourceContext as bC}from"@frontmcp/sdk";var Hc=class extends bC{static{s(this,"tv")}static{o(this,"NestRequestsResource")}async execute(){return this.get(Z).read("nest://requests/recent")}};Hc=F([EC({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],Hc);var wC=Hc,_y=class{static{s(this,"nv")}static{o(this,"NestApp")}};_y=F([hC({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[yC,wC]})],_y);var Ss="nest://providers",Fs="nest://requests/recent";function Sy(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let n=u.raw??null;if(n?.kind==="singleton-instance"&&n.provider){let a=n.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(Ss);return}if(n?.kind==="server-request"&&n.request){let a={...n.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(Fs);return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Ss,()=>({schemaVersion:1,revision:e.resources.revision(Ss)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(Fs,()=>({schemaVersion:1,revision:e.resources.revision(Fs)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:i,uris:[Ss,Fs]}}s(Sy,"ov"),o(Sy,"installNestReducer");import{App as DC}from"@frontmcp/sdk";import{Resource as $C,ResourceContext as BC}from"@frontmcp/sdk";var Xc=class extends BC{static{s(this,"iv")}static{o(this,"TraceRecentResource")}async execute(){return this.get(Z).read("trace://recent")}};Xc=F([$C({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],Xc);var xC=Xc;import{Resource as CC,ResourceContext as kC}from"@frontmcp/sdk";var Yc=class extends kC{static{s(this,"av")}static{o(this,"TraceFailedResource")}async execute(){return this.get(Z).read("trace://failed")}};Yc=F([CC({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],Yc);var AC=Yc,Fy=class{static{s(this,"uv")}static{o(this,"TraceApp")}};Fy=F([DC({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[xC,AC]})],Fy);var js="trace://recent",zs="trace://failed";function jy(e){let t={recent:[],failed:[]},r=o(u=>{let n=u.raw??null;if(!n||n.kind!=="span"||!n.span?.name)return;let a={id:u.id,traceId:n.span.traceId,parentSpanId:n.span.parentSpanId,flowId:n.span.flowId??u.context.flowId,requestId:n.span.requestId??u.context.requestId,name:n.span.name,source:u.source,startTime:n.span.startTime??u.timestamp,endTime:n.span.endTime,durationMs:n.span.durationMs,status:n.span.status??(u.severity==="error"?"error":"ok")};Qc(t.recent,a,100),a.status==="error"&&Qc(t.failed,a,50),e.resources.markDirty(js),a.status==="error"&&e.resources.markDirty(zs)},"handler"),i=e.bus.subscribe(r);return e.resources.register(js,()=>({schemaVersion:1,revision:e.resources.revision(js)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register(zs,()=>({schemaVersion:1,revision:e.resources.revision(zs)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:i,uris:[js,zs]}}s(jy,"lv"),o(jy,"installTraceReducer");function Qc(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Qc,"L_"),o(Qc,"pushBounded");import{App as IC}from"@frontmcp/sdk";import{Resource as _C,ResourceContext as SC}from"@frontmcp/sdk";var ep=class extends SC{static{s(this,"dv")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(Z).read("perf://slow-routes")}};ep=F([_C({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],ep);var FC=ep;import{Resource as jC,ResourceContext as zC}from"@frontmcp/sdk";var tp=class extends zC{static{s(this,"fv")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(Z).read("perf://duplicate-requests")}};tp=F([jC({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],tp);var NC=tp,zy=class{static{s(this,"hv")}static{o(this,"PerfApp")}};zy=F([IC({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[FC,NC]})],zy);var Ns="perf://slow-routes",Ms=20,Ny=2,MC=200;function My(e){let t=Ye(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),i={routes:new Map},u=o(d=>{let c=d.raw??null;if(c?.kind!=="server-request"||!c.request)return;let{method:p,route:m}=c.request,f=c.request.durationMs??0,h=`${p} ${m}`,g=i.routes.get(h);if(g||(g={method:p,route:m,recent:[],samples:0,slowSamples:0,lastDurationMs:f,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),i.routes.delete(h),i.routes.set(h,g),g.recent.push(f),g.recent.length>Ms&&g.recent.splice(0,g.recent.length-Ms),g.samples+=1,f>=t&&(g.slowSamples+=1),g.lastDurationMs=f,g.lastSeenAt=d.timestamp,f>g.worstEverMs&&(g.worstEverMs=f,g.worstEverAt=d.timestamp),i.routes.size>MC){let b=i.routes.keys().next().value;b!==void 0&&i.routes.delete(b)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(Ns)},"handler"),n=e.bus.subscribe(u),a=o(d=>d.recent.reduce((c,p)=>p>=t?c+1:c,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=Ny,"currentlySlow");return e.resources.register(Ns,()=>{let d=[...i.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(Ns)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(c=>({method:c.method,route:c.route,worstRecentMs:Math.max(...c.recent),lastDurationMs:c.lastDurationMs,lastSeenAt:c.lastSeenAt,samples:c.samples,slowSamples:c.slowSamples,recentSlowSamples:a(c),worstEverMs:c.worstEverMs,worstEverAt:c.worstEverAt})).sort((c,p)=>p.worstRecentMs-c.worstRecentMs),routesTracked:i.routes.size,recentSampleWindow:Ms,minRecentSlowToKeep:Ny,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${i.routes.size} route${i.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${Ms} calls each (\u2265${t}ms).`}}),{unsubscribe:n,uris:[Ns]}}s(My,"gv"),o(My,"installPerfReducer");var Os="perf://duplicate-requests",up=10,Oy=2,OC=200,Ry=300,RC=new Set(["t","_","cacheBust","ts"]),TC=8,Ty=2,PC="react";function Py(e,t){return t.start<=e.end+Ty&&t.end>=e.start-Ty}s(Py,"wO"),o(Py,"sameRequest");function Uy(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])RC.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),i=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?i:`${t.origin}${i}`}catch{return e}}s(Uy,"V_"),o(Uy,"normalizeRequestUrl");function qy(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:n}of e)t.push({at:u,delta:1}),t.push({at:n+1,delta:-1});t.sort((u,n)=>u.at-n.at||u.delta-n.delta);let r=0,i=0;for(let{delta:u}of t)r+=u,r>i&&(i=r);return i}s(qy,"G_"),o(qy,"peakConcurrency");function Zy(e){let t=Ye(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),i={endpoints:new Map},u=o((p,m,f)=>{p.open.delete(m),f.windows.length!==0&&(p.recentPeaks.push(f.peak),p.recentPeaks.length>up&&p.recentPeaks.splice(0,p.recentPeaks.length-up))},"closeFlow"),n=o(p=>{if(p.source!==PC||p.category!=="network")return;let m=p.raw??null;if(m?.kind!=="fetch-done"&&m?.kind!=="fetch-error"||!m.url||!m.method)return;let f=Uy(m.url),h=m.method.toUpperCase();if(typeof m.startedAt!="number")return;let g=m.startedAt,b=g+(typeof m.durationMs=="number"?m.durationMs:0),x=p.context?.originNodeId??null,$=p.context?.flowId??null,w=p.context?.tabId??"-",k=m.requestId??p.context?.requestId,C=k?`${w}|${k}`:void 0,M=`${h} ${f} @ ${x??"-"}`,y=i.endpoints.get(M);y||(y={method:h,url:f,originNodeId:x,open:new Map,recentPeaks:[],totalRequests:0,repeatedReceipts:0,lastSeenAt:p.timestamp,worstEverPeak:0,worstEverAt:p.timestamp}),i.endpoints.delete(M),i.endpoints.set(M,y);let D=y.open.get(w);if(D&&D.flowId!==$&&(u(y,w,D),D=void 0),D||(D={flowId:$,windows:[],byIdentity:new Map,peak:0}),y.open.delete(w),y.open.set(w,D),y.open.size>TC){let[N,K]=y.open.entries().next().value;u(y,N,K)}let A={start:g,end:b},j=C?D.byIdentity.get(C):void 0;if(j&&Py(j,A))j.start=Math.min(j.start,g),j.end=Math.max(j.end,b),y.repeatedReceipts+=1;else{let N=C?{...A,identity:C}:A;if(D.windows.push(N),C&&D.byIdentity.set(C,N),D.windows.length>Ry)for(let K of D.windows.splice(0,D.windows.length-Ry))K.identity&&D.byIdentity.get(K.identity)===K&&D.byIdentity.delete(K.identity);y.totalRequests+=1}if(D.peak=qy(D.windows),y.lastSeenAt=p.timestamp,D.peak>y.worstEverPeak&&(y.worstEverPeak=D.peak,y.worstEverAt=p.timestamp),i.endpoints.size>OC){let N=i.endpoints.keys().next().value;N!==void 0&&i.endpoints.delete(N)}i.lastSampleAt=Math.max(i.lastSampleAt??0,p.timestamp),i.changedAt=p.timestamp,e.resources.markDirty(Os)},"handler"),a=e.bus.subscribe(n),l=o(p=>[...p.open.values()].filter(m=>m.windows.length>0).map(m=>m.peak),"openPeaks"),d=o(p=>{let m=[...p.recentPeaks,...l(p)],f=0;for(let h=m.length-1;h>=0&&!((m[h]??0)>=t);h-=1)f+=1;return f},"consecutiveCleanFlows"),c=o(p=>p.worstEverPeak>=t&&d(p)<Oy,"currentlyDuplicated");return e.resources.register(Os,()=>{let p=[...i.endpoints.values()].filter(c);return{schemaVersion:1,revision:e.resources.revision(Os)??0,updatedAt:new Date(i.changedAt??r).toISOString(),peakThreshold:t,endpoints:p.map(m=>({method:m.method,url:m.url,originNodeId:m.originNodeId,peakConcurrent:l(m).at(-1)??0,cleanFlowsSince:d(m),flowsObserved:m.recentPeaks.length+l(m).length,totalRequests:m.totalRequests,repeatedReceipts:m.repeatedReceipts,worstEverPeak:m.worstEverPeak,worstEverAt:m.worstEverAt,lastSeenAt:m.lastSeenAt})).sort((m,f)=>f.peakConcurrent-m.peakConcurrent),endpointsTracked:i.endpoints.size,recentFlowWindow:up,minCleanFlowsToRetract:Oy,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":p.length===0?`${i.endpoints.size} endpoint${i.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${p.length} endpoint${p.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:a,uris:[Os]}}s(Zy,"yv"),o(Zy,"installDuplicateRequestsReducer");import{App as UC}from"@frontmcp/sdk";import{Resource as qC,ResourceContext as ZC}from"@frontmcp/sdk";var rp=class extends ZC{static{s(this,"bv")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(Z).read("db://slow-queries")}};rp=F([qC({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],rp);var LC=rp;import{Resource as VC,ResourceContext as JC}from"@frontmcp/sdk";var ip=class extends JC{static{s(this,"xv")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(Z).read("db://analysis")}};ip=F([VC({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],ip);var WC=ip,Ly=class{static{s(this,"_v")}static{o(this,"DbApp")}};Ly=F([UC({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[LC,WC]})],Ly);var ei="db://slow-queries",Rs="db://analysis",Vy=50,GC=20,KC=200,HC=1e3,XC=["statements","failed","workMs","recorded","suppressed","unwritten"];function Jy(e){let t=e[gd];if(!t)return;let r=Array.isArray(t.paths)?t.paths:[];for(let i of r){let u=typeof i=="string"?/^findings\[\] \(\+(\d+) items dropped\)$/.exec(i):null;if(u)return Number(u[1])}return r.some(i=>typeof i=="string"&&i.startsWith("findings"))?0:void 0}s(Jy,"AO"),o(Jy,"findingsDroppedByClamp");function Wy(e){let t=Ye(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),i={shapes:new Map,analyzeRuns:new Map,accounts:new Map,accountsSeen:0,census:{statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0}},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let c=d.project??"unknown",p=d.op??"query",m=d.table??"query",f=d.durationMs??0,h=`${c}|${p}|${m}`,g=i.shapes.get(h);if(g||(g={project:c,op:p,table:m,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),i.shapes.delete(h),i.shapes.set(h,g),g.count+=1,d.error!==void 0&&(g.errorCount+=1),g.totalMs+=f,f>g.maxMs&&(g.maxMs=f,g.maxAt=l.timestamp),g.recent.push(f),g.recent.length>Vy&&g.recent.splice(0,g.recent.length-Vy),g.rowsTotal+=d.rows??0,d.query&&(g.lastSql=d.query),g.lastDurationMs=f,g.lastSeenAt=l.timestamp,g.suppressed+=d.floodSuppressed??0,i.shapes.size>KC){let b=i.shapes.keys().next().value;b!==void 0&&i.shapes.delete(b)}i.lastQueryAt=Math.max(i.lastQueryAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(ei);return}if(d.kind==="db-request-account"){let c=d,p=typeof c.accountId=="string"?c.accountId:l.id,m=typeof c.seq=="number"?c.seq:0,f=i.accounts.get(p);if(f&&f.seq>=m)return;let h={seq:m,statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0};for(let g of XC){let b=c[g];h[g]=typeof b=="number"&&Number.isFinite(b)?b:0,i.census[g]+=h[g]-(f?.[g]??0)}if(f||(i.accountsSeen+=1),i.accounts.delete(p),i.accounts.set(p,h),i.accounts.size>HC){let g=i.accounts.keys().next().value;g!==void 0&&i.accounts.delete(g)}i.changedAt=l.timestamp,e.resources.markDirty(ei);return}if(d.kind==="db-analyze-run"){let c=d.project??"unknown",p=Jy(d);i.analyzeRuns.set(c,{project:c,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[],...p!==void 0?{droppedFindings:p}:{}}),qt(i.analyzeRuns,qr),i.lastAnalyzeAt=Math.max(i.lastAnalyzeAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(Rs)}}},"handler"),n=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((c,p)=>c-p);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(ei,()=>{let l=[...i.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(ei)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,c)=>c.maxMs-d.maxMs).slice(0,GC),shapesTracked:i.shapes.size,...i.accountsSeen>0?{requestAccounting:{requests:i.accountsSeen,...i.census}}:{},note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events, reported by the next admitted event of the shape \u2014 drops with none after them are missing from it. requestAccounting, when present, is the requests' own census (statements run vs recorded on the bus), exact including those; per flow, read flow.get's overview.sql.",lastSampleAt:i.lastQueryAt,producer:i.lastQueryAt===void 0?"none":"connected",detail:i.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${i.shapes.size} query shape${i.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(Rs,()=>{let l=[...i.analyzeRuns.values()].sort((x,$)=>$.runAt-x.runAt),d=l.flatMap(x=>x.findings),c=d.length,p=d.filter(x=>x.severity==="error").length,m=d.filter(x=>x.severity==="warning").length,f=c-p-m,h=l.filter(x=>x.droppedFindings!==void 0),g=h.reduce((x,$)=>x+($.droppedFindings??0),0),b=h.length>0;return{schemaVersion:1,revision:e.resources.revision(Rs)??0,updatedAt:new Date(i.changedAt??r).toISOString(),runs:l,findingCount:c,errorCount:p,warningCount:m,infoCount:f,...b?{incomplete:!0,droppedFindings:g}:{},lastSampleAt:i.lastAnalyzeAt,producer:i.lastAnalyzeAt===void 0?"none":"connected",detail:i.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${c} finding${c===1?"":"s"} (${p} error, ${m} warning, ${f} info).`+(b?` INCOMPLETE: ${g>0?`${g} more findings were`:"part of a run was"} cut by the bus payload bound before reaching the lens (an event over 32 KiB keeps only the first 64 items of a list), and the cut takes whatever came last. The analyzer must keep one run under that bound, most severe first.`:"")}}),{unsubscribe:n,uris:[ei,Rs]}}s(Wy,"kv"),o(Wy,"installDbReducer");import{App as YC}from"@frontmcp/sdk";import{Resource as QC,ResourceContext as ek}from"@frontmcp/sdk";var np=class extends ek{static{s(this,"Sv")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(Z).read("net://egress/hosts")}};np=F([QC({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],np);var tk=np;import{Resource as uk,ResourceContext as rk}from"@frontmcp/sdk";var sp=class extends rk{static{s(this,"Rv")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(Z).read("net://egress/recent")}};sp=F([uk({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],sp);var ik=sp;import{Resource as nk,ResourceContext as sk}from"@frontmcp/sdk";var ap=class extends sk{static{s(this,"Tv")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(Z).read("net://egress/failures")}};ap=F([nk({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],ap);var ak=ap,Gy=class{static{s(this,"jv")}static{o(this,"NetApp")}};Gy=F([YC({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[tk,ik,ak]})],Gy);var Ts="net://egress/hosts",Ps="net://egress/recent",Us="net://egress/failures",Iu=20,ok=25,lk=200,dk=20,ck=5,Ky=200,Hy=50,Xy=2;function Yy(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(Yy,"BO"),o(Yy,"isIdSegment");function Qy(e){let[t="/"]=e.split("?"),r=t.split("/"),i=[];for(let n of r){if(i.length>12){i.push("\u2026");break}i.push(Yy(n)?":id":n)}let u=i.join("/");return u.length===0?"/":u}s(Qy,"H_"),o(Qy,"templatisePath");function eE(e){let t=Ye(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),i={hosts:new Map,recent:[],failures:[]},u=o(p=>{let m=p.raw??null;if(!m||m.kind!=="egress")return;let f=m.project??"unknown",h=m.host??"unknown",g=(m.method??"GET").toUpperCase(),b=m.durationMs??0,x=typeof m.status=="number"?m.status:void 0,$=m.error===void 0?void 0:String(m.error),w=$!==void 0||x!==void 0&&x>=400,k=m.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",C=`${f}|${h}`,M=i.hosts.get(C);M||(M={project:f,host:h,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:p.timestamp,recent:[],outcomes:[],firstSeenAt:p.timestamp,lastSeenAt:p.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),i.hosts.delete(C),i.hosts.set(C,M),M.count+=1,$!==void 0&&(M.errorCount+=1),x!==void 0&&x>=400&&x<500&&(M.status4xx+=1),x!==void 0&&x>=500&&(M.status5xx+=1),M.totalMs+=b,b>M.maxMs&&(M.maxMs=b,M.maxAt=p.timestamp),M.recent.push(b),M.recent.length>Iu&&M.recent.splice(0,M.recent.length-Iu),M.outcomes.push(w),M.outcomes.length>Iu&&M.outcomes.splice(0,M.outcomes.length-Iu),M.lastDurationMs=b,M.lastBad=w,M.lastSeenAt=p.timestamp,M.suppressed+=m.floodSuppressed??0;let y=Qy(k),D=`${g} ${y}`,A=M.endpoints.get(D);if(A||(A={method:g,path:y,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:p.timestamp}),M.endpoints.delete(D),M.endpoints.set(D,A),A.count+=1,$!==void 0&&(A.errorCount+=1,A.lastError=$),x!==void 0&&x>=400&&x<500&&(A.status4xx+=1),x!==void 0&&x>=500&&(A.status5xx+=1),A.totalMs+=b,b>A.maxMs&&(A.maxMs=b),A.recent.push(b),A.recent.length>Iu&&A.recent.splice(0,A.recent.length-Iu),A.lastStatus=x,A.lastDurationMs=b,A.lastSeenAt=p.timestamp,M.endpoints.size>dk){let K=M.endpoints.keys().next().value;K!==void 0&&M.endpoints.delete(K)}if(i.hosts.size>lk){let K=i.hosts.keys().next().value;K!==void 0&&i.hosts.delete(K)}let j=p.context??{},N={id:p.id,timestamp:p.timestamp,project:f,method:g,host:h,path:k,...x!==void 0?{status:x}:{},...$!==void 0?{error:$}:{},durationMs:b,...j.flowId?{flowId:j.flowId}:{},...j.requestId?{requestId:j.requestId}:{}};i.recent.push(N),i.recent.length>Ky&&i.recent.splice(0,i.recent.length-Ky),w&&(i.failures.push(N),i.failures.length>Hy&&i.failures.splice(0,i.failures.length-Hy),e.resources.markDirty(Us)),i.lastSampleAt=Math.max(i.lastSampleAt??0,p.timestamp),i.changedAt=p.timestamp,e.resources.markDirty(Ts),e.resources.markDirty(Ps)},"handler"),n=e.bus.subscribe(u),a=o(p=>{if(p.length===0)return 0;let m=[...p].sort((f,h)=>f-h);return m[Math.min(m.length-1,Math.floor(m.length*.95))]??0},"p95"),l=o(p=>p.lastDurationMs>=t||p.recent.filter(m=>m>=t).length>=Xy,"isSlow"),d=o(p=>p.lastBad||p.outcomes.filter(Boolean).length>=Xy,"isFailing"),c=o(p=>{let m=p.outcomes.filter(Boolean).length;return d(p)?`${m} of the last ${p.outcomes.length} call${p.outcomes.length===1?"":"s"} failed`:l(p)?`${p.recent.filter(f=>f>=t).length} of the last ${p.recent.length} call${p.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(Ts,()=>{let p=[...i.hosts.values()],m=p.filter(d),f=p.filter(h=>!d(h)&&l(h));return{schemaVersion:1,revision:e.resources.revision(Ts)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,hosts:p.map(h=>({project:h.project,host:h.host,count:h.count,errorCount:h.errorCount,status4xx:h.status4xx,status5xx:h.status5xx,avgMs:Math.round(h.totalMs/Math.max(h.count,1)*10)/10,p95Ms:a(h.recent),maxMs:h.maxMs,maxAt:h.maxAt,lastDurationMs:h.lastDurationMs,firstSeenAt:h.firstSeenAt,lastSeenAt:h.lastSeenAt,slow:l(h),failing:d(h),detail:c(h),suppressedEvents:h.suppressed,endpoints:[...h.endpoints.values()].map(g=>({method:g.method,path:g.path,count:g.count,errorCount:g.errorCount,status4xx:g.status4xx,status5xx:g.status5xx,avgMs:Math.round(g.totalMs/Math.max(g.count,1)*10)/10,p95Ms:a(g.recent),maxMs:g.maxMs,...g.lastStatus!==void 0?{lastStatus:g.lastStatus}:{},...g.lastError!==void 0?{lastError:g.lastError}:{},lastSeenAt:g.lastSeenAt})).sort((g,b)=>b.maxMs-g.maxMs).slice(0,ck)})).sort((h,g)=>h.failing!==g.failing?h.failing?-1:1:g.maxMs-h.maxMs).slice(0,ok),hostsTracked:i.hosts.size,failingHosts:m.length,slowHosts:f.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${i.hosts.size} external host${i.hosts.size===1?"":"s"} observed; ${m.length} failing, ${f.length} slower than ${t}ms.`}}),e.resources.register(Ps,()=>({schemaVersion:1,revision:e.resources.revision(Ps)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.recent],count:i.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${i.recent.length} recent outbound call${i.recent.length===1?"":"s"}.`})),e.resources.register(Us,()=>({schemaVersion:1,revision:e.resources.revision(Us)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.failures],count:i.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${i.failures.length} failed outbound call${i.failures.length===1?"":"s"} held.`})),{unsubscribe:n,uris:[Ts,Ps,Us]}}s(eE,"zv"),o(eE,"installNetReducer");import{App as pk}from"@frontmcp/sdk";import{Resource as mk,ResourceContext as fk}from"@frontmcp/sdk";var op=class extends fk{static{s(this,"Ov")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(Z).read("visual://current")}};op=F([mk({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],op);var hk=op;import{Resource as gk,ResourceContext as vk}from"@frontmcp/sdk";var lp=class extends vk{static{s(this,"Nv")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(Z).read("visual://violations/current")}};lp=F([gk({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],lp);var yk=lp;import{Resource as Ek,ResourceContext as bk}from"@frontmcp/sdk";var dp=class extends bk{static{s(this,"Dv")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(Z).read("visual://violations/stable")}};dp=F([Ek({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],dp);var wk=dp;import{Resource as Dk,ResourceContext as $k}from"@frontmcp/sdk";var cp=class extends $k{static{s(this,"Uv")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(Z).read("visual://violations/during-animation")}};cp=F([Dk({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],cp);var Bk=cp;import{Resource as xk,ResourceContext as Ck}from"@frontmcp/sdk";var pp=class extends Ck{static{s(this,"Fv")}static{o(this,"VisualRulesResource")}async execute(){return this.get(Z).read("visual://rules")}};pp=F([xk({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],pp);var kk=pp;import{Resource as Ak,ResourceContext as Ik}from"@frontmcp/sdk";var mp=class extends Ik{static{s(this,"Zv")}static{o(this,"VisualTokensResource")}async execute(){return this.get(Z).read("visual://tokens")}};mp=F([Ak({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],mp);var _k=mp;import{Tool as Sk,ToolContext as Fk,z as tE}from"@frontmcp/sdk";import{existsSync as jk,mkdirSync as zk,readFileSync as Nk,writeFileSync as Mk}from"node:fs";import{dirname as Ok,join as fp}from"node:path";function hp(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?Ok(r):fp(t,".lensmcp")}s(hp,"Ua"),o(hp,"captureDir");function uE(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(uE,"sM"),o(uE,"pidAlive");function gp(e,t=uE){let r=fp(e,PD);try{if(!jk(r))return;let i=JSON.parse(Nk(r,"utf8"));return typeof i?.pid!="number"||!Number.isFinite(i.pid)?void 0:t(i.pid)?i:void 0}catch{return}}s(gp,"La"),o(gp,"liveRunner");function rE(e,t){try{return zk(e,{recursive:!0}),Mk(fp(e,TD),JSON.stringify(t)),!0}catch{return!1}}s(rE,"Y_"),o(rE,"publishCaptureRequest");var vp;async function iE(e,t){let r=vp;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let i=t().finally(()=>{vp=void 0});return vp={promise:i,requestId:e},{fresh:await i,coalesced:!1,requestId:e}}s(iE,"Q_"),o(iE,"captureSingleFlight");async function nE(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),i=e.budgetMs??8e3,u=e.pollMs??100,n=t()+i;for(;t()<n;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(nE,"ek"),o(nE,"waitForFreshFrame");var yp=class extends Fk{static{s(this,"Jv")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(Ur),r=this.get(Z),i=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await i(),n=lt(),a=Date.now();t.publish({id:lt(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:n}});let l=hp(),d=gp(l),c=!1,p=await iE(n,async()=>(c=rE(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:n}),c&&d?await nE({readFrameId:i,before:u}):!1));return{requested:p.coalesced?!0:c,cause:e.cause,stable:e.stable,fresh:p.fresh,coalesced:p.coalesced,requestId:p.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};yp=F([Sk({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:tE.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:tE.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],yp);var Rk=yp;import{Tool as Tk,ToolContext as Pk,z as Uk}from"@frontmcp/sdk";var Ep=class extends Pk{static{s(this,"Kv")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(Z).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(i=>i.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};Ep=F([Tk({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:Uk.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],Ep);var qk=Ep;import{Tool as Zk,ToolContext as Lk,z as Vk}from"@frontmcp/sdk";var bp=class extends Lk{static{s(this,"Hv")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(Z).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};bp=F([Zk({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:Vk.string().optional().describe("Optional frame id; defaults to the latest.")}})],bp);var Jk=bp;import{Tool as Wk,ToolContext as Gk,z as Kk}from"@frontmcp/sdk";var wp=class extends Gk{static{s(this,"Qv")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(Z).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:sE(t)}:{found:!1,violationId:e.violationId}}};wp=F([Wk({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:Kk.string().describe("Id of the violation as seen in visual://violations/current.")}})],wp);var Hk=wp;function sE(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
|
|
71
|
+
`)}s(sE,"yM"),o(sE,"buildExplanation");import{Tool as Xk,ToolContext as Yk,z as Me}from"@frontmcp/sdk";import{mkdirSync as Qk,readFileSync as e7,renameSync as t7,writeFileSync as u7}from"node:fs";import{join as r7}from"node:path";var i7=500;function aE(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(aE,"SM"),o(aE,"pidAlive");function oE(e){try{let t=JSON.parse(e7(e,"utf8"));return Array.isArray(t?.rules)?t.rules:[]}catch{return[]}}s(oE,"IM"),o(oE,"readEntries");function lE(e,t,r={}){let i=r.pid??process.pid,u=r.isAlive??aE,n=r7(e,UD),a=[...oE(n).filter(d=>typeof d?.registeredBy=="number"&&typeof d?.rule?.id=="string"&&d.rule.id!==t.id&&(d.registeredBy===i||u(d.registeredBy))),{rule:t,registeredBy:i,registeredAt:(r.now??Date.now)()}].slice(-i7);Qk(e,{recursive:!0});let l=`${n}.${i}.tmp`;return u7(l,JSON.stringify({schemaVersion:1,rules:a})),t7(l,n),a}s(lE,"rk"),o(lE,"registerSessionRule");var Dp=class extends Yk{static{s(this,"ty")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(Ur),r=this.get(Z),i={id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints};t.publish({id:lt(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:i}});let u=hp(),n=!1,a;try{lE(u,i),n=gp(u)!==void 0,a=n?"The capture runner evaluates this rule on the next captured frame (visual.capture_frame).":"No capture runner is listening, so nothing will evaluate this rule until one starts (the dev cluster gateway or agent-dev). It is listed, not enforced."}catch(l){a=`Could not hand the rule to the capture runner (${l.message}). It is listed, but will NOT be evaluated.`}return{registered:!0,evaluated:n,note:a,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};Dp=F([Xk({name:"visual.register_rule",description:"Register (or replace) a visual rule. It is handed to the capture runner, which evaluates it on every frame captured from now on, for as long as this lens server runs. The result says whether a runner is listening; if `evaluated` is false the rule is only listed, and no violation can come of it.",inputSchema:{id:Me.string().describe("Stable rule id; replaces a prior rule with the same id."),type:Me.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:Me.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:Me.enum(["info","warning","error"]).default("warning"),timing:Me.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:Me.record(Me.string(),Me.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:Me.record(Me.string(),Me.record(Me.string(),Me.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],Dp);var n7=Dp,dE=class{static{s(this,"ny")}static{o(this,"VisualApp")}};dE=F([pk({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[hk,yk,wk,Bk,kk,_k],tools:[Rk,qk,Jk,Hk,n7]})],dE);var ti="visual://current",ui="visual://violations/current",ri="visual://violations/stable",ii="visual://violations/during-animation",ni="visual://rules",si="visual://tokens";function cE(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},i=o((f,h)=>{r.changedAt.set(f,h),e.resources.markDirty(f)},"touch"),u=o(f=>{i(ui,f),i(ri,f),i(ii,f)},"touchViolationViews"),n=o(f=>{let h=f.raw??null;if(h?.kind)switch(h.kind){case"visual-frame":{let g=h.frame;if(!g)return;r.currentFrame=g,r.lastFrameAt=f.timestamp,r.framesSeen+=1,r.rulesEvaluated=typeof h.rulesEvaluated=="number"?h.rulesEvaluated:void 0,i(ti,f.timestamp);let b=r.violations.length;r.violations=r.violations.filter(x=>x.frameId===g.id),b!==r.violations.length&&u(f.timestamp);return}case"visual-violation":if(!h.violation)return;r.violations.push(h.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(f.timestamp);return;case"visual-rule-registered":{let g=h.rule;if(!g)return;let b=r.rules.findIndex(x=>x.id===g.id);b>=0&&r.rules.splice(b,1),r.rules.push(g),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),i(ni,f.timestamp);return}case"visual-tokens-loaded":if(!h.tokens)return;r.tokens=h.tokens,i(si,f.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(n),l=o(f=>new Date(r.changedAt.get(f)??t).toISOString(),"stamp"),d="No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.",c=o(()=>`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured`,"frameCount"),p=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,...r.rulesEvaluated!==void 0?{rulesEvaluated:r.rulesEvaluated}:{},producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?d:r.rulesEvaluated===void 0?`${c()}; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered.`:`${c()}; ${r.rulesEvaluated} rule${r.rulesEvaluated===1?"":"s"} evaluated on the current one.`}),"frameHealth"),m=o(()=>{let f=p();return r.framesSeen===0||r.rulesEvaluated===void 0?r.framesSeen===0?f:{...f,detail:`${f.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}:r.rulesEvaluated===0?{...f,producer:"none",detail:`${c()}, but NO rule was evaluated on the current one \u2014 an empty violation list is NOT evidence the UI is correct, nothing is being checked. Add rules to \`lensmcp.rules.json\` at the workspace root, or register one with visual.register_rule.`}:{...f,detail:`${f.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}},"violationHealth");return e.resources.register(ti,()=>({schemaVersion:1,revision:e.resources.revision(ti)??0,updatedAt:l(ti),frame:r.currentFrame??null,...p()})),e.resources.register(ui,()=>({schemaVersion:1,revision:e.resources.revision(ui)??0,updatedAt:l(ui),violations:r.violations.slice(),...m()})),e.resources.register(ri,()=>({schemaVersion:1,revision:e.resources.revision(ri)??0,updatedAt:l(ri),violations:r.violations.filter(f=>f.timing==="after-animation"||f.timing==="stable-only"||f.timing==="always"),...m()})),e.resources.register(ii,()=>({schemaVersion:1,revision:e.resources.revision(ii)??0,updatedAt:l(ii),violations:r.violations.filter(f=>f.timing==="during-animation"),...m()})),e.resources.register(ni,()=>({schemaVersion:1,revision:e.resources.revision(ni)??0,updatedAt:l(ni),rules:r.rules.slice()})),e.resources.register(si,()=>({schemaVersion:1,revision:e.resources.revision(si)??0,updatedAt:l(si),tokens:r.tokens??null})),{unsubscribe:a,uris:[ti,ui,ri,ii,ni,si]}}s(cE,"oy"),o(cE,"installVisualReducer");import{App as s7}from"@frontmcp/sdk";import{Resource as a7,ResourceContext as o7}from"@frontmcp/sdk";var $p=class extends o7{static{s(this,"iy")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(Z).read("react://pages/current")}};$p=F([a7({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],$p);var l7=$p;import{Resource as d7,ResourceContext as c7}from"@frontmcp/sdk";var Bp=class extends c7{static{s(this,"ay")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(Z).read("react://components/hot")}};Bp=F([d7({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],Bp);var p7=Bp;import{Resource as m7,ResourceContext as f7}from"@frontmcp/sdk";var xp=class extends f7{static{s(this,"uy")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(Z).read("react://renders/slow")}};xp=F([m7({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],xp);var h7=xp;import{Resource as g7,ResourceContext as v7}from"@frontmcp/sdk";var Cp=class extends v7{static{s(this,"dy")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(Z).read("react://renders/recent")}};Cp=F([g7({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],Cp);var y7=Cp;import{Resource as E7,ResourceContext as b7}from"@frontmcp/sdk";var kp=class extends b7{static{s(this,"fy")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(Z).read("react://effects/recent")}};kp=F([E7({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],kp);var w7=kp;import{Resource as D7,ResourceContext as $7}from"@frontmcp/sdk";var Ap=class extends $7{static{s(this,"hy")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(Z).read("react://memos/recomputed")}};Ap=F([D7({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],Ap);var B7=Ap;import{Resource as x7,ResourceContext as C7}from"@frontmcp/sdk";var Ip=class extends C7{static{s(this,"vy")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(Z).read("react://hooks/recent")}};Ip=F([x7({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],Ip);var k7=Ip;import{Tool as A7,ToolContext as I7,z as _p}from"@frontmcp/sdk";var Sp=class extends I7{static{s(this,"wy")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(Z).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentInstanceId===e.componentInstanceId){r=n;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentLogicalId===e.componentLogicalId){r=n;break}}if(!r)return{found:!1,searched:e};let i=(r.why??[]).map(u=>({...u,summary:pE(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:i,parentRenderId:r.parentRenderId}}};Sp=F([A7({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:_p.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:_p.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:_p.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],Sp);var _7=Sp;function pE(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(pE,"GM"),o(pE,"summariseWhy");var mE=class{static{s(this,"$y")}static{o(this,"ReactApp")}};mE=F([s7({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[l7,p7,h7,y7,w7,B7,k7],tools:[_7]})],mE);var ai="react://pages/current",qs="react://components/hot",Zs="react://renders/slow",Ls="react://renders/recent",Vs="react://effects/recent",Js="react://memos/recomputed",Ws="react://hooks/recent",Gs=100,Fp=50,fE=500;function hE(e){let t=Ye(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},i=o(n=>{if(n.source!=="react")return;let a=n.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(_u(r.rendersRecent,l,Gs),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>fE){for(let c of r.rendersByInstance.keys())if(r.rendersByInstance.delete(c),r.rendersByInstance.size<=fE)break}l.actualDurationMs>=t&&(_u(r.rendersSlow,l,Fp),r.rendersSlow.sort((c,p)=>p.actualDurationMs-c.actualDurationMs),r.rendersSlow.length>Fp&&(r.rendersSlow.length=Fp));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(ai)),e.resources.markDirty(Ls),e.resources.markDirty(qs),l.actualDurationMs>=t&&e.resources.markDirty(Zs);return}case"effect-run":{let l=a.effect;if(!l)return;_u(r.effectsRecent,l,Gs),e.resources.markDirty(Vs);return}case"hook-run":{let l=a.hook;if(!l)return;_u(r.hooksRecent,l,Gs),e.resources.markDirty(Ws),l.recomputed&&l.hookType==="useMemo"&&(_u(r.memosRecomputed,l,Gs),e.resources.markDirty(Js));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(ai));return}default:return}},"handler"),u=e.bus.subscribe(i);return e.resources.register(ai,()=>({schemaVersion:1,revision:e.resources.revision(ai)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(qs,()=>({schemaVersion:1,revision:e.resources.revision(qs)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((n,a)=>a.renderCount-n.renderCount)})),e.resources.register(Zs,()=>({schemaVersion:1,revision:e.resources.revision(Zs)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(Ls,()=>({schemaVersion:1,revision:e.resources.revision(Ls)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(Vs,()=>({schemaVersion:1,revision:e.resources.revision(Vs)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(Js,()=>({schemaVersion:1,revision:e.resources.revision(Js)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(Ws,()=>({schemaVersion:1,revision:e.resources.revision(Ws)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[ai,qs,Zs,Ls,Vs,Js,Ws],lookups:{latestRenderFor(n){return r.rendersByInstance.get(n)},latestRenderForLogical(n){if(r.hotByLogical.get(n))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===n)return l}}}}}s(hE,"ky"),o(hE,"installReactReducer");function _u(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(_u,"Lo"),o(_u,"pushBounded");import{App as S7}from"@frontmcp/sdk";import{Resource as F7,ResourceContext as j7}from"@frontmcp/sdk";var jp=class extends j7{static{s(this,"Sy")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(Z).read("valtio://updates/recent")}};jp=F([F7({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],jp);var z7=jp;import{Resource as N7,ResourceContext as M7}from"@frontmcp/sdk";var zp=class extends M7{static{s(this,"Ry")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(Z).read("valtio://stores")}};zp=F([N7({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],zp);var O7=zp;import{Resource as R7,ResourceContext as T7}from"@frontmcp/sdk";var Np=class extends T7{static{s(this,"Ty")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(Z).read("valtio://subscribers")}};Np=F([R7({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],Np);var P7=Np,gE=class{static{s(this,"jy")}static{o(this,"ValtioApp")}};gE=F([S7({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[z7,O7,P7]})],gE);var Ks="valtio://updates/recent",Hs="valtio://stores",oi="valtio://subscribers",vE=100,yE=1e3,U7=1e3,q7=256,Z7=256;function EE(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let i=r.next();if(i.done)break;e.delete(i.value)}}s(EE,"oN"),o(EE,"capSet");function Mp(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,q7):typeof e.path=="string"?[e.path]:[]}s(Mp,"sk"),o(Mp,"subscriptionPaths");function Op(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(Op,"ak"),o(Op,"subscriberId");function bE(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let n=u.raw??null;if(n?.kind)switch(n.kind){case"state-update":{let a=n.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>vE&&t.updates.splice(0,t.updates.length-vE);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>yE){for(let c of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(c),t.latestUpdateByPath.size<=yE)break}e.resources.markDirty(Ks);return}case"store-created":{let a=n.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(Hs);return}case"subscription-added":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=Op(a);for(let d of Mp(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);p||(p=new Map,t.subscribers.set(c,p));let m=p.get(l);m||(m=new Set,p.set(l,m)),m.add(a.componentInstanceId),qt(p,qr),EE(m,Z7)}qt(t.subscribers,U7),e.resources.markDirty(oi);return}case"subscription-removed":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=Op(a);for(let d of Mp(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);if(!p)continue;let m=p.get(l);m&&(m.delete(a.componentInstanceId),m.size===0&&p.delete(l)),p.size===0&&t.subscribers.delete(c)}e.resources.markDirty(oi);return}default:return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Ks,()=>({schemaVersion:1,revision:e.resources.revision(Ks)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(Hs,()=>({schemaVersion:1,revision:e.resources.revision(Hs)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(oi,()=>({schemaVersion:1,revision:e.resources.revision(oi)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,n])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...n.keys()]}})})),{unsubscribe:i,uris:[Ks,Hs,oi],lookups:{latestUpdateForPath(u,n){return t.latestUpdateByPath.get(`${u}::${n}`)},subscribersFor(u,n){return[...t.subscribers.get(`${u}::${n}`)?.keys()??[]]}}}}s(bE,"zy"),o(bE,"installValtioReducer");import{App as L7}from"@frontmcp/sdk";import{Resource as V7,ResourceContext as J7}from"@frontmcp/sdk";var Rp=class extends J7{static{s(this,"Oy")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(Z).read("graph://patterns")}};Rp=F([V7({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],Rp);var W7=Rp;import{Resource as G7,ResourceContext as K7}from"@frontmcp/sdk";var Tp=class extends K7{static{s(this,"Ny")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(Z).read("graph://performance/event-loop-lag")}};Tp=F([G7({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],Tp);var H7=Tp;import{Tool as X7,ToolContext as Y7,z as Q7}from"@frontmcp/sdk";var wE;function Pp(e){wE=e}s(Pp,"Xa"),o(Pp,"setActiveGraphBuffer");function li(){return wE?.events??[]}s(li,"Gt"),o(li,"currentEvents");function Wt(){let e=new e4;return I3(e,li()),e}s(Wt,"Ve"),o(Wt,"buildGraph");var Up=class extends Y7{static{s(this,"Dy")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=Wt().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};Up=F([X7({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:Q7.string().describe("Node id (usually the originating event id).")}})],Up);var eA=Up;import{Tool as tA,ToolContext as uA,z as Su}from"@frontmcp/sdk";var rA=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],qp=class extends uA{static{s(this,"Uy")}static{o(this,"GraphTraverseTool")}async execute(e){let t=Wt().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};qp=F([tA({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:Su.string().describe("Start node id."),lens:Su.array(Su.enum(rA)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:Su.number().int().positive().max(12).default(4),direction:Su.enum(["out","in","both"]).default("both"),maxNodes:Su.number().int().positive().max(1e3).default(200)}})],qp);var iA=qp;import{Tool as nA,ToolContext as sA,z as aA}from"@frontmcp/sdk";var Zp=class extends sA{static{s(this,"Fy")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=xd(li(),{threshold:e.threshold});return{count:t.length,matches:t}}};Zp=F([nA({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:aA.number().int().positive().default(5)}})],Zp);var oA=Zp;import{Tool as lA,ToolContext as dA,z as cA}from"@frontmcp/sdk";var Lp=class extends dA{static{s(this,"Zy")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=Wt(),r=new Map,i=li(),u=e.from?[e.from]:i.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of i){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(c=>c.from===l.id).map(c=>c.to))}let n=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=C3(u.length?u:i.map(l=>l.id),r,n);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};Lp=F([lA({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:cA.string().optional().describe("Start node id; defaults to all flow origins.")}})],Lp);var pA=Lp;import{Tool as mA,ToolContext as fA,z as DE}from"@frontmcp/sdk";var Vp=class extends fA{static{s(this,"Vy")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=Wt(),r=e.originNodeId;if(!t.getNode(r)){let n=li().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);n&&(r=n.id)}let i=t.getNode(r);if(!i)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:i.name,type:i.type},nodeCount:u.nodes.length,nodes:u.nodes.map(n=>({id:n.id,type:n.type,name:n.name,durationMs:n.durationMs}))}}};Vp=F([mA({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:DE.string().describe("Origin node id, logicalId, or originating event id."),depth:DE.number().int().positive().max(12).default(6)}})],Vp);var hA=Vp;import{Tool as gA,ToolContext as vA,z as $E}from"@frontmcp/sdk";var Jp=class extends vA{static{s(this,"Jy")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=Wt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(i=>({id:i.id,name:i.name,logicalId:i.logicalId}))}}};Jp=F([gA({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:$E.string().describe("Origin node id."),depth:$E.number().int().positive().max(12).default(6)}})],Jp);var yA=Jp;import{Tool as EA,ToolContext as bA,z as BE}from"@frontmcp/sdk";var Wp=class extends bA{static{s(this,"Ky")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=Wt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="server-request");return{found:!0,count:r.length,requests:r.map(i=>({id:i.id,name:i.name,durationMs:i.durationMs}))}}};Wp=F([EA({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:BE.string().describe("UI origin node id (e.g. the user-action event id)."),depth:BE.number().int().positive().max(12).default(8)}})],Wp);var wA=Wp,xE=class{static{s(this,"Hy")}static{o(this,"GraphApp")}};xE=F([L7({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[W7,H7],tools:[eA,iA,oA,pA,hA,yA,wA]})],xE);var Fu="graph://patterns",ju="graph://performance/event-loop-lag",Gp=2e3,CE=8*1024*1024,DA=100,kE=100;function AE(e){let t=Ye(e.thresholds),r=(e.now??(()=>Date.now()))(),i={events:[]},u=[],n=0,a=0,l=0,d=new Set,c=[],p=new Map,m,f=new Map,h=o(C=>{switch(C.kind){case"n+1-query":return`n+1:${String(C.details.signature??"")}`;case"render-storm":return`storm:${String(C.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${C.evidence[0]??""}`;default:return`${C.kind}:${C.evidence.join(",")}`}},"patternKey"),g=o(C=>{p.set(Fu,C),e.resources.markDirty(Fu)},"markPatterns"),b=o((C,M)=>{let y=h(C);if(f.delete(y),f.set(y,C),f.size>DA){let D=f.keys().next().value;D!==void 0&&f.delete(D)}g(M)},"pushPattern"),x=o(C=>{let M=!1;for(let[y,D]of f){if(D.evidence.length===0)continue;let A=D.evidence.filter(j=>d.has(j));if(A.length===0){f.delete(y),M=!0;continue}A.length!==D.evidence.length&&(D.evidence=A,M=!0)}M&&g(C)},"dropUnevidencedPatterns"),$=o(C=>{m=C.timestamp;let M=us(C);i.events.push(C),u.push(M),n+=M,d.add(C.id);let y=Math.max(0,i.events.length-Gp),D=n;for(let N=0;N<y;N+=1)D-=u[N]??0;let A=0;for(;D>CE&&y<u.length;)D-=u[y]??0,y+=1,A+=1;if(y>0){let N=i.events.splice(0,y);u.splice(0,y),n=Math.max(0,D),a+=N.length,l+=A;for(let K of N)d.delete(K.id);x(C.timestamp)}let j=C.raw??null;if(j?.kind==="loop")for(let N of xd(i.events,{threshold:t.dbInLoop}))b(N,C.timestamp);if(j?.kind==="db-query")for(let N of B3(i.events,{threshold:t.nPlusOne}))b(N,C.timestamp);if(C.source==="react"&&j?.kind==="render")for(let N of x3(i.events,{threshold:t.renderStorm}))b(N,C.timestamp);C.source==="perf"&&j?.kind==="event-loop-lag"&&typeof j.lagMs=="number"&&(c.push({at:C.timestamp,lagMs:j.lagMs,source:C.source}),c.length>kE&&c.splice(0,c.length-kE),p.set(ju,C.timestamp),e.resources.markDirty(ju))},"handler"),w=e.bus.subscribe($);Pp(i);let k=o(C=>new Date(p.get(C)??r).toISOString(),"stamp");return e.resources.register(Fu,()=>({schemaVersion:1,revision:e.resources.revision(Fu)??0,updatedAt:k(Fu),patterns:[...f.values()],eventsBuffered:i.events.length,eventBufferCapacity:Gp,lastEventAt:m,producer:m===void 0?"none":"connected"})),e.resources.register(ju,()=>({schemaVersion:1,revision:e.resources.revision(ju)??0,updatedAt:k(ju),samples:c.slice(),maxLagMs:c.reduce((C,M)=>Math.max(C,M.lagMs),0),lastEventAt:m})),{unsubscribe:o(()=>{Pp(void 0),w()},"unsubscribe"),uris:[Fu,ju],retentionStats:o(()=>({residentEvents:i.events.length,residentBytes:n,evictedEvents:a,evictedForBytes:l,eventCap:Gp,byteCap:CE}),"retentionStats")}}s(AE,"Qy"),o(AE,"installGraphReducer");import{App as $A}from"@frontmcp/sdk";import{Resource as BA,ResourceContext as xA}from"@frontmcp/sdk";var Kp=class extends xA{static{s(this,"eb")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(Z).read("memory://current")}};Kp=F([BA({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],Kp);var CA=Kp;import{Resource as kA,ResourceContext as AA}from"@frontmcp/sdk";var Hp=class extends AA{static{s(this,"rb")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(Z).read("memory://owners")}};Hp=F([kA({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],Hp);var IA=Hp;import{Resource as _A,ResourceContext as SA}from"@frontmcp/sdk";var Xp=class extends SA{static{s(this,"ob")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(Z).read("memory://owners/growing")}};Xp=F([_A({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],Xp);var FA=Xp;import{Resource as jA,ResourceContext as zA}from"@frontmcp/sdk";var Yp=class extends zA{static{s(this,"sb")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(Z).read("memory://leaks/suspected")}};Yp=F([jA({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],Yp);var NA=Yp;import{Resource as MA,ResourceContext as OA}from"@frontmcp/sdk";var Qp=class extends OA{static{s(this,"cb")}static{o(this,"MemoryPodsResource")}async execute(){return this.get(Z).read("memory://pods")}};Qp=F([MA({name:"memory-pods",uri:"memory://pods",mimeType:"application/json",description:"Each dev-cluster pod's heap after a full GC (boot, after every hot swap, after bursts), a short per-service history, and closed generations proven still in memory."})],Qp);var RA=Qp;import{Tool as TA,ToolContext as PA,z as UA}from"@frontmcp/sdk";var IE;function em(e){IE=e}s(em,"Ha"),o(em,"setActiveMemoryLookups");function zu(){return IE}s(zu,"nt"),o(zu,"activeMemoryLookups");var tm=class extends PA{static{s(this,"lb")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=zu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};tm=F([TA({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:UA.string().describe("Flow id.")}})],tm);var qA=tm;import{Tool as ZA,ToolContext as LA,z as VA}from"@frontmcp/sdk";var um=class extends LA{static{s(this,"pb")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=zu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};um=F([ZA({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:VA.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],um);var JA=um;import{Tool as WA,ToolContext as GA,z as KA}from"@frontmcp/sdk";var rm=class extends GA{static{s(this,"mb")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=zu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let i,u;if(r.kind==="retention"){let n=r.detail;i=`Owner ${n.ownerId} grew by ${n.growth} items during flow ${n.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let n=r.detail;i=`${r.service??r.project} pod #${r.pod} (pid ${r.pid}): hot-swap generation ${n.gen} is still in memory ${Math.round(n.ageMs/1e3)}s after its app was closed, through ${n.gcs} full GCs and ${n.swapsSinceClose} swap(s) \u2014 still alive: ${(n.alive??[]).join(", ")}. Not garbage: something still points into it.`,u=`Run \`lensmcp mem ${r.service??r.project} --snapshot --analyze\` for the shortest path from the GC roots to it. Usual retainers: a listener on a process-global emitter, a module-level cache or registry, a timer the old app's onModuleDestroy does not clear. memory.explain_pod reads the pod's whole picture.`}return{found:!0,leak:r,narrative:i,recommendation:u}}};rm=F([WA({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner and flow grew, or which pod generation outlived its close \u2014 and a remediation hint.",inputSchema:{leakIndex:KA.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],rm);var HA=rm;import{Tool as XA,ToolContext as YA,z as _E}from"@frontmcp/sdk";var SE=6,im=class extends YA{static{s(this,"gb")}static{o(this,"MemoryPodsTool")}async execute(e){let t=zu();if(!t)return{found:!1,reason:"no active memory reducer"};if(e.service){let i=t.podsOf(e.service);return i?{found:!0,...i,history:i.history.slice(-(e.history??SE))}:{found:!1,service:e.service,known:t.pods().map(u=>u.service).slice(0,32),reason:"no pod of that service has reported \u2014 pods report at boot and after every hot swap"}}let r=t.pods().slice(0,32).map(i=>({project:i.project,service:i.service,lastSeenAt:i.lastSeenAt,pods:i.pods}));return{found:r.length>0,services:r}}};im=F([XA({name:"memory.pods",description:"What each dev-cluster pod weighs: heap after a full GC, reserved heap, rss, boot baseline, swaps, and any closed hot-swap generation proven still in memory. Give `service` for that service's recent per-swap history.",inputSchema:{service:_E.string().optional().describe("Nx project or cluster service name. Omit for every service (latest reading per pod, no history)."),history:_E.number().int().min(0).max(12).optional().describe(`Recent readings to include for one service (default ${SE}).`)}})],im);var QA=im;import{Tool as eI,ToolContext as tI,z as FE}from"@frontmcp/sdk";var Xs=o(e=>e>=1073741824?`${(e/1073741824).toFixed(1)} GB`:`${Math.round(e/1048576)} MB`,"mb"),jE=o(e=>e<9e4?`${Math.round(e/1e3)}s`:`${Math.round(e/6e4)} min`,"age");function zE(e,t,r=Date.now()){let i=t.latest,u=[];if(!i)return{service:e.service,pod:t.pod,pid:t.pid,narrative:`${e.service} pod #${t.pod} (pid ${t.pid}) has not reported a reading yet.`,findings:u,recommendation:"It reports at boot and after every swap \u2014 check `lensmcp mem` once it has booted."};let n=i.baseline??(i.trigger==="boot"?i.live:void 0),a=n?i.live/n:void 0,l=`${e.service} pod #${t.pod} (pid ${t.pid}): ${Xs(i.live)} live after a full GC (${i.trigger}, ${jE(r-i.at)} ago), generation ${i.gen} after ${i.swaps} swap${i.swaps===1?"":"s"}`;n&&a!==void 0&&(l+=` \u2014 ${a.toFixed(1)}\xD7 the ${Xs(n)} it booted with`),l+=".",a!==void 0&&a>=2.5?u.push(`At ${a.toFixed(1)}\xD7 its boot heap it is near the recycle bound (3\xD7 by default): the pod will be replaced by a fresh process if it grows further.`):a!==void 0&&a>=1.4&&u.push(`More than one generation's worth of live heap (${a.toFixed(1)}\xD7): a generation still draining or pinned, or state the app accumulated since boot.`),i.used-i.live>=64*1048576&&u.push(`That collection gave back ${Xs(i.used-i.live)} of garbage \u2014 what an idle pod kept before it collected on its own.`),i.reserved-i.live>=128*1048576&&u.push(`V8 holds ${Xs(i.reserved-i.live)} reserved beyond the live heap; that is the allocator's slack, which a later GC shrinks \u2014 not a leak.`),i.previousAlive===!0?u.push(`Generation ${i.previousGen} \u2014 the one the last swap replaced \u2014 was still in memory at this reading.`):i.previousAlive===!1&&u.push(`Generation ${i.previousGen} \u2014 the one the last swap replaced \u2014 has been collected.`),i.containers!==void 0&&i.containers>1&&u.push(`${i.containers} Nest DI containers are alive: more than one app's worth.`);for(let c of t.retained){let p=c.counts&&Object.keys(c.counts).length?` Live then: ${Object.entries(c.counts).map(([m,f])=>`${m} ${f}`).join(", ")}.`:"";u.push(`RETAINED: generation ${c.gen} is still in memory ${jE(r-c.closedAt)} after its app was closed, through ${c.gcs} full GCs and ${c.swapsSinceClose} swap${c.swapsSinceClose===1?"":"s"} (still alive: ${c.alive.join(", ")}).${p}`)}i.sourceMaps&&u.push("The pod runs with source maps enabled: with an eval devtool the bundle is held as text several times (`lensmcp doctor` checks it).");let d=t.retained.length?`Something still points into the retained generation. \`lensmcp mem ${e.service} --snapshot --analyze\` prints the shortest path from the GC roots to it \u2014 usually a listener on a process-global emitter, a module-level cache or registry, or a timer an onModuleDestroy does not clear. Until it is fixed the pod is replaced once the generation has been retained for LENSMCP_SWAP_RECYCLE_RETAINED_MS (10 min by default).`:a!==void 0&&a>=2?`No closed generation is retained, so this is growth inside the serving app. Compare readings across swaps with \`lensmcp mem ${e.service}\`; \`lensmcp mem ${e.service} --snapshot --analyze\` lists the largest retainers by class and by package.`:"Nothing to act on: one generation in memory, and the previous one collected.";return{service:e.service,pod:t.pod,pid:t.pid,narrative:l,findings:u,recommendation:d}}s(zE,"yb"),o(zE,"explainPod");var nm=class extends tI{static{s(this,"bb")}static{o(this,"MemoryExplainPodTool")}async execute(e){let t=zu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.podsOf(e.service);if(!r)return{found:!1,service:e.service,reason:"no pod of that service has reported"};let i=r.pods.filter(u=>e.pod===void 0||u.pod===e.pod).slice(0,8);return i.length===0?{found:!1,service:e.service,pods:r.pods.map(u=>u.pod),reason:`no pod #${e.pod}`}:{found:!0,explanations:i.map(u=>zE(r,u))}}};nm=F([eI({name:"memory.explain_pod",description:"Explains one dev-cluster pod's memory in a few sentences: how many app generations its live heap is, whether the last hot swap's copy was collected, reserved-heap slack, and any closed generation proven still in memory \u2014 with the next step (e.g. a heap snapshot).",inputSchema:{service:FE.string().describe("Nx project or cluster service name."),pod:FE.number().int().positive().optional().describe("Pod id (the N of Child#N). Omit for every pod of the service (at most 8).")}})],nm);var uI=nm,NE=class{static{s(this,"xb")}static{o(this,"MemoryApp")}};NE=F([$A({id:"memory",name:"Memory",description:"Container-owner growth tracking, suspect-leak detection, and dev-cluster pod heaps (post-GC readings, retained hot-swap generations). Hosts memory.explain_leak, memory.pods, memory.explain_pod.",resources:[CA,IA,FA,NA,RA],tools:[qA,JA,HA,QA,uI]})],NE);var rI=64,iI=16,ME=12,nI=16,OE=24*36e5;function Gt(e,t,r,i){return`pod-retained:${e}:${t}:${r}:${i}`}s(Gt,"gn"),o(Gt,"retainedLeakKey");var sI=o((e,t)=>`${e}:${t}`,"podKey");function sm(e,t){let r={};for(let[i,u]of Object.entries(e))t.includes(i)||(r[i]=u);return r}s(sm,"xk"),o(sm,"stripIdentity");var aI=class{static{s(this,"Qa")}static{o(this,"PodMemoryState")}constructor(){this.services=new Map}apply(e){if(e.source!=="memory")return;let t=Gn(e.raw);if(!t)return;let r=e.timestamp;this.lastEventAt=Math.max(this.lastEventAt??0,r);let i={pods:!0,retainedAdded:[],retainedRemoved:[]},u=this.service(t.project,t.service||t.project,r),n=sI(t.pod,t.pid);if(t.kind==="pod-memory-exited"){let l=u.pods.get(n);if(l)for(let d of l.retained.keys())i.retainedRemoved.push(Gt(t.project,t.pod,t.pid,d));return u.pods.delete(n),i}let a=u.pods.get(n);if(!a){if(t.kind==="pod-memory"&&t.trigger==="boot"){for(let[l,d]of u.pods)if(d.pod===t.pod){for(let c of d.retained.keys())i.retainedRemoved.push(Gt(t.project,d.pod,d.pid,c));u.pods.delete(l)}}if(a={pod:t.pod,pid:t.pid,podGeneration:t.podGeneration??1,lastSeenAt:r,retained:new Map},u.pods.set(n,a),u.pods.size>iI){let l=[...u.pods.entries()].sort((d,c)=>d[1].lastSeenAt-c[1].lastSeenAt)[0];if(l){for(let d of l[1].retained.keys())i.retainedRemoved.push(Gt(t.project,l[1].pod,l[1].pid,d));u.pods.delete(l[0])}}}if(a.lastSeenAt=r,t.kind==="pod-memory")a.latest=sm(t,["project","service","pod","pid","podGeneration","floodSuppressed"]),u.history.push({at:t.at??r,pod:t.pod,pid:t.pid,trigger:t.trigger,gen:t.gen,swaps:t.swaps,live:t.live,used:t.used,reserved:t.reserved,rss:t.rss,...t.previousGen!==void 0?{previousGen:t.previousGen}:{},previousAlive:t.previousAlive??null,retained:t.retained??0}),u.history.length>ME&&u.history.splice(0,u.history.length-ME);else if(t.kind==="pod-memory-retained"){let l={...sm(t,["project","service","floodSuppressed"]),at:r};a.retained.delete(t.gen),a.retained.set(t.gen,l),a.retained.size>nI&&a.retained.delete(a.retained.keys().next().value),i.retainedAdded.push({key:Gt(t.project,t.pod,t.pid,t.gen),project:t.project,service:u.service,pod:t.pod,pid:t.pid,generation:l})}else t.kind==="pod-memory-released"&&(a.retained.delete(t.gen),i.retainedRemoved.push(Gt(t.project,t.pod,t.pid,t.gen)));return this.sweep(r,i,t.project),i}views(){return[...this.services.values()].sort((e,t)=>e.project.localeCompare(t.project)).map(e=>this.view(e))}find(e){let t=this.services.get(e)??[...this.services.values()].find(r=>r.service===e);return t?this.view(t):void 0}view(e){return{project:e.project,service:e.service,lastSeenAt:e.lastSeenAt,pods:[...e.pods.values()].sort((t,r)=>t.pod-r.pod).map(t=>({pod:t.pod,pid:t.pid,podGeneration:t.podGeneration,lastSeenAt:t.lastSeenAt,...t.latest?{latest:t.latest}:{},retained:[...t.retained.values()]})),history:[...e.history]}}service(e,t,r){let i=this.services.get(e);if(!i&&(i={project:e,service:t,lastSeenAt:r,pods:new Map,history:[]},this.services.set(e,i),this.services.size>rI)){let u=[...this.services.values()].sort((n,a)=>n.lastSeenAt-a.lastSeenAt)[0];u&&u!==i&&this.services.delete(u.project)}return i.lastSeenAt=Math.max(i.lastSeenAt,r),i.service=t,i}sweep(e,t,r){for(let i of this.services.values()){for(let[u,n]of i.pods)if(!(e-n.lastSeenAt<=OE)){for(let a of n.retained.keys())t.retainedRemoved.push(Gt(i.project,n.pod,n.pid,a));i.pods.delete(u)}i.pods.size===0&&i.project!==r&&e-i.lastSeenAt>OE&&this.services.delete(i.project)}}},di="memory://current",ci="memory://owners",pi="memory://owners/growing",Kt="memory://leaks/suspected",mi="memory://pods",oI=200,RE=50,lI=500;function TE(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},i=new aI,u=o(($,w)=>{r.changedAt.set($,w),e.resources.markDirty($)},"touch"),n=o(($,w)=>{if(r.leaks.delete($),r.leaks.set($,w),r.leaks.size>oI){let k=r.leaks.keys().next().value;k!==void 0&&r.leaks.delete(k)}},"pushLeak"),a=new Map,l=o(($,w)=>{$!==w&&(a.delete($),a.set($,w),a.size>5e3&&a.delete(a.keys().next().value))},"noteRequestFlow"),d=o(($,w)=>{if($.flowIds.add(w),$.flowIds.size>RE){for(let k of $.flowIds)if($.flowIds.delete(k),$.flowIds.size<=RE)break}},"noteFlow"),c=o(($,w,k)=>{let C=r.owners.get($);if(C||(C={ownerId:$,itemCount:w,estimatedBytes:0,startCount:w,mutations:0,flowIds:new Set,lastMutatedAt:k}),r.owners.delete($),r.owners.set($,C),r.owners.size>lI){let M=r.owners.keys().next().value;M!==void 0&&M!==$&&r.owners.delete(M)}return C},"ensure"),p=o(($,w)=>{let k=!1;for(let[C,M]of r.leaks){if(M.kind!=="retention"||M.ownerId!==$)continue;let y=M.detail.startCount;typeof y=="number"&&w<=y&&(r.leaks.delete(C),k=!0)}return k},"retractReleasedRetentions"),m=o($=>{let w=i.apply($);if(!w)return!1;r.lastEventAt=Math.max(r.lastEventAt??0,$.timestamp),u(mi,$.timestamp);let k=!1;for(let C of w.retainedRemoved)k=r.leaks.delete(C)||k;for(let C of w.retainedAdded)n(C.key,{kind:"retained-generation",project:C.project,service:C.service,pod:C.pod,pid:C.pid,generation:C.generation.gen,detail:{...C.generation},at:$.timestamp}),k=!0;return k&&u(Kt,$.timestamp),!0},"applyPodMemory"),f=o($=>{if($.source!=="memory"&&$.source!=="perf"||m($))return;let w=$.raw??null;if(w?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,$.timestamp),w.kind){case"memory-mutation":{if(!w.mutation)return;let k=w.mutation,C=c(k.ownerNodeId,k.beforeCount??k.afterCount,$.timestamp);C.itemCount=k.afterCount,C.estimatedBytes=k.afterCount*64,C.mutations+=1,C.lastMutatedAt=$.timestamp,$.context.flowId&&d(C,$.context.flowId),$.context.requestId&&$.context.flowId&&l($.context.requestId,$.context.flowId),u(ci,$.timestamp),u(pi,$.timestamp),p(k.ownerNodeId,k.afterCount)&&u(Kt,$.timestamp);return}case"memory-retention":{if(!w.retention)return;let k=w.retention,C=k.requestId?k.flowId:a.get(k.flowId)??k.flowId;n(`retention:${k.ownerId}:${C}`,{kind:"retention",ownerId:k.ownerId,flowId:C,detail:{...k,flowId:C},at:$.timestamp}),u(Kt,$.timestamp);return}case"process-memory":{if(!w.memory)return;r.current={...w.role?{role:w.role}:{},heapUsed:w.memory.heapUsed,heapTotal:w.memory.heapTotal,rss:w.memory.rss,external:w.memory.external,arrayBuffers:w.memory.arrayBuffers,at:$.timestamp},u(di,$.timestamp);return}default:return}},"handler"),h=e.bus.subscribe(f),g=o($=>new Date(r.changedAt.get($)??t).toISOString(),"stamp"),b=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(di,()=>({schemaVersion:1,revision:e.resources.revision(di)??0,updatedAt:g(di),current:r.current??null})),e.resources.register(ci,()=>({schemaVersion:1,revision:e.resources.revision(ci)??0,updatedAt:g(ci),owners:[...r.owners.values()].map(am),...b()})),e.resources.register(pi,()=>({schemaVersion:1,revision:e.resources.revision(pi)??0,updatedAt:g(pi),owners:[...r.owners.values()].map(am).filter($=>$.growthSinceStart>0).sort(($,w)=>w.growthSinceStart-$.growthSinceStart).slice(0,20),...b()})),e.resources.register(Kt,()=>({schemaVersion:1,revision:e.resources.revision(Kt)??0,updatedAt:g(Kt),suspected:[...r.leaks.values()],...b()})),e.resources.register(mi,()=>({schemaVersion:1,revision:e.resources.revision(mi)??0,updatedAt:g(mi),services:i.views(),lastEventAt:i.lastEventAt,producer:i.lastEventAt===void 0?"none":"connected",detail:i.lastEventAt===void 0?"No pod has reported its heap \u2014 these readings come from the dev cluster (`@lensmcp/cluster` devserver pods, which report at boot and after every hot swap). An empty list is not evidence the pods are small.":"Bytes. `live` is the heap after a full GC; `used` the heap just before it; `reserved` what V8 keeps. A `retained` generation was closed and is PROVEN still in memory \u2014 see memory.explain_pod."}));let x={ownersMutatedByFlow($){return[...r.owners.values()].filter(w=>w.flowIds.has($))},growthByFlow($){return[...r.owners.values()].filter(w=>w.flowIds.has($)).map(w=>({ownerId:w.ownerId,growth:w.itemCount-w.startCount}))},flowsThatMutatedOwner($){let w=r.owners.get($);return w?[...w.flowIds]:[]},getLeak($){return[...r.leaks.values()][$]},allLeaks(){return[...r.leaks.values()]},pods(){return i.views()},podsOf($){return i.find($)}};return em(x),{unsubscribe:o(()=>{em(void 0),h()},"unsubscribe"),uris:[di,ci,pi,Kt,mi],lookups:x}}s(TE,"$b"),o(TE,"installMemoryReducer");function am(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(am,"_k"),o(am,"toOwnerView");function PE(){let{session:e,providers:t}=j3(),r=U3(),i=q3();for(let x of i.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${x}`);oy({bus:e.bus,resources:e.resources}),cy({bus:e.bus,resources:e.resources}),fy({bus:e.bus,resources:e.resources}),vy({bus:e.bus,resources:e.resources}),Dy({bus:e.bus,resources:e.resources}),Iy({bus:e.bus,resources:e.resources}),Sy({bus:e.bus,resources:e.resources}),jy({bus:e.bus,resources:e.resources}),My({bus:e.bus,resources:e.resources,thresholds:r}),Zy({bus:e.bus,resources:e.resources,thresholds:r}),Wy({bus:e.bus,resources:e.resources,thresholds:r}),eE({bus:e.bus,resources:e.resources,thresholds:r}),cE({bus:e.bus,resources:e.resources}),hE({bus:e.bus,resources:e.resources,thresholds:r}),bE({bus:e.bus,resources:e.resources});let u=uc({bus:e.bus,resources:e.resources,flows:i});e.registerReducerRetention("flow",u.retentionStats),Q6({resources:e.resources});let n=AE({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",n.retentionStats),TE({bus:e.bus,resources:e.resources}),C6({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,c=o(()=>{let x=process.memoryUsage(),$=Date.now(),w=x.rss>=l;w&&$-d>=5*6e4&&(d=$,console.warn(`[lensmcp] high process memory: rss=${Math.round(x.rss/1024/1024)}MB heap=${Math.round(x.heapUsed/1024/1024)}MB`)),e.bus.publish({id:lt(),sessionId:e.id,timestamp:$,source:"perf",category:"runtime",severity:w?"warning":"info",context:{sessionId:e.id},fingerprint:u4({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:x.rss,heapUsed:x.heapUsed,heapTotal:x.heapTotal,external:x.external,arrayBuffers:x.arrayBuffers}}})},"publishProcessMemory");c();let p=setInterval(c,a);p.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(p),"stop")});let m=1200,f=new Map,h=e.bus.subscribe(x=>{let $=x.context.flowId;if(!$)return;let w=f.get($);w&&clearTimeout(w);let k=setTimeout(()=>{f.delete($);try{let C=Qe()?.getFlowEvents($);if(!C||C.length===0)return;let M=la(C,{flowId:$});M&&wc(M)}catch{}},m);k.unref?.(),f.set($,k)});e.onShutdown({name:"story-autocompile",stop:o(()=>{h();for(let x of f.values())clearTimeout(x);f.clear()},"stop")});let g=T3({bus:e.bus,sessionId:e.id,onError:o(x=>console.error("[lensmcp] ingest error:",x),"onError")});g.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${g.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>g.stop(),"stop")});let b=process.env.LENSMCP_EVENT_FILE;return b&&(Yd({eventFile:b,flows:i,budget:_6(),prepare:UE(e.id)}),e.onShutdown({name:"flow-recovery",stop:o(()=>Yd(void 0),"stop")})),{session:e,providers:t,ingest:g,flows:i}}s(PE,"kk"),o(PE,"createLensSession");function UE(e){let t=Cd({}),r=oa({});return i=>(i.sessionId==="pending"&&(i.sessionId=e,i.context&&i.context.sessionId==="pending"&&(i.context.sessionId=e)),r.redact(t.clamp(i)))}s(UE,"iP"),o(UE,"ingestPreparation");var dI=new Set(["localhost","127.0.0.1","lensmcp.local"]);function qE(e){if(!e)return!1;let t=e.trim().toLowerCase();if(t.startsWith("[")){let r=t.indexOf("]");return r!==-1&&t.slice(1,r)==="::1"}return t.indexOf(":")===t.lastIndexOf(":")&&(t=t.split(":")[0]??""),dI.has(t)}s(qE,"aP"),o(qE,"hostHeaderIsLocal");function ZE(e,t){if(!e||qE(t))return{ok:!0};let r=(t??"").replace(/[^\x20-\x7e]/g,"?").slice(0,80);return{ok:!1,status:403,error:"this dashboard answers only requests addressed to this machine (localhost, 127.0.0.1, [::1] or lensmcp.local)"+(r?`; this one was addressed to "${r}"`:"")}}s(ZE,"Sk"),o(ZE,"dashboardHostVerdict");import{createHmac as LE,randomBytes as VE,timingSafeEqual as cI}from"node:crypto";import{chmodSync as pI,mkdirSync as mI,readFileSync as fI,writeFileSync as JE}from"node:fs";import{dirname as hI,join as gI}from"node:path";var Ys="__lensmcp_token",om="__lensmcp_login",WE=10*6e4,vI=720*60*60;function lm(e){return gI(e,".lensmcp","dashboard-token")}s(lm,"_b"),o(lm,"dashboardTokenPath");function GE(e,t,r={}){if(e.LENSMCP_ALLOW_INSECURE==="1")return{source:"disabled"};let i=e.LENSMCP_DASHBOARD_TOKEN?.trim();if(i)return{token:i,source:"env"};let u=r.read??(c=>fI(c,"utf8")),n=r.write??((c,p)=>JE(c,p,{mode:384,flag:"wx"})),a=r.ensureDir??(c=>{mI(c,{recursive:!0,mode:448})}),l=r.chmod??((c,p)=>pI(c,p)),d=lm(t);try{let c=u(d).trim();if(c){try{l(d,384)}catch{}return{token:c,source:"file"}}}catch{}try{a(hI(d));let c=VE(32).toString("hex");try{n(d,`${c}
|
|
72
|
+
`)}catch(p){if(p.code!=="EEXIST")throw p;let m=u(d).trim();if(m)return{token:m,source:"file"};JE(d,`${c}
|
|
73
|
+
`,{mode:384})}try{l(d,384)}catch{}return{token:c,source:"created"}}catch(c){return{source:"unavailable",reason:c instanceof Error?c.message:String(c)}}}s(GE,"Ak"),o(GE,"resolveDashboardToken");function fi(e,t){let r=Buffer.from(e,"utf8"),i=Buffer.from(t,"utf8");return r.length!==i.length?!1:cI(r,i)}s(fi,"ec"),o(fi,"sameSecret");function dm(e,t,r,i){if(!e)return!0;let u=Array.isArray(t)?t[0]:t,n=/^Bearer\s+(.+)$/i.exec((u??"").trim())?.[1]?.trim();if(n&&fi(n,e))return!0;let a=r?.trim();if(a&&fi(a,e))return!0;let l=i?HE(i.header,i.name):void 0;return!!l&&fi(l,cm(e))}s(dm,"kb"),o(dm,"dashboardAuthorized");function KE(e){return`lensmcp_dash_${e.replace(/[^A-Za-z0-9_-]/g,"_")}`}s(KE,"jk"),o(KE,"sessionCookieName");function cm(e){return LE("sha256",e).update("lensmcp-dashboard-session-v1").digest("hex")}s(cm,"Sb"),o(cm,"sessionCookieValue");function HE(e,t){for(let r of(e??"").split(";")){let i=r.indexOf("=");if(i>0&&r.slice(0,i).trim()===t)return r.slice(i+1).trim()}}s(HE,"hP"),o(HE,"readCookie");function XE(e,t,r,i){return`${e}=${t}; Path=${r}; HttpOnly; SameSite=Strict; Max-Age=${vI}${i?"; Secure":""}`}s(XE,"zk"),o(XE,"sessionCookieHeader");function pm(e,t,r){return LE("sha256",e).update(`lensmcp-dashboard-login
|
|
74
|
+
${t}
|
|
75
|
+
${r}`).digest("hex")}s(pm,"Ok"),o(pm,"loginSignature");function YE(e,t,r=VE(16).toString("hex")){let i=t+WE;return`${i}.${r}.${pm(e,i,r)}`}s(YE,"Mk"),o(YE,"mintLoginCode");var yI=/^(\d{1,16})\.([0-9a-f]{32})\.([0-9a-f]{64})$/,EI=class{static{s(this,"tc")}static{o(this,"LoginLedger")}constructor(){this.redeemed=new Map}redeem(e,t,r){for(let[a,l]of this.redeemed)l<=r&&this.redeemed.delete(a);let i=yI.exec(t.trim());if(!i)return"invalid";let u=Number(i[1]),n=i[2];return fi(i[3],pm(e,u,n))?u<=r||u>r+WE+6e4?"expired":this.redeemed.has(n)?"used":(this.redeemed.set(n,u),"ok"):"invalid"}};function QE(e){return e==="/api"||e.startsWith("/api/")}s(QE,"Nk"),o(QE,"isDataEndpoint");function eb(e){return e.startsWith("/assets/dashboard-ui/")}s(eb,"Pk"),o(eb,"isAssetPath");function tb(e){let t=Number(process.env.LENSMCP_PARENT_PID??0);!Number.isInteger(t)||t<=0||setInterval(()=>{process.ppid!==t&&(console.error(`[lensmcp] ${e}: parent gateway (pid ${t}) is gone \u2014 exiting to free the port.`),process.exit(0))},5e3).unref()}s(tb,"Dk"),o(tb,"watchParentGateway");import{closeSync as bI,openSync as wI,readSync as DI,statSync as $I}from"node:fs";function ub(e,t,r){let i=$I(e).size;if(i===0)return[];let u=Math.max(0,i-t),n=Buffer.alloc(i-u),a=wI(e,"r");try{DI(a,n,0,n.length,u)}finally{bI(a)}let l=n.toString("utf8").trim().split(`
|
|
76
|
+
`);return u>0&&l.shift(),l.slice(-r)}s(ub,"Ck"),o(ub,"readEventTailLines");import{execFileSync as BI}from"node:child_process";import{createHash as xI}from"node:crypto";import{readdirSync as rb,readFileSync as Qs}from"node:fs";import{homedir as CI}from"node:os";var ib=new Set(["db","redis","queue","memory","external","fs","exec"]),kI=16;function ke(e){let t=Number(e??0);return Number.isFinite(t)&&t>=0?t:0}s(ke,"Ce"),o(ke,"finite");var AI=class{static{s(this,"oc")}static{o(this,"ClusterState")}constructor(e){this.opts=e,this.gateway=null,this.services=new Map,this.edges=new Map,this.recent=[],this.dataNodes=new Map,this.podMemory=new Map,this.declCache={at:0,decls:[]},this.registryCache={at:0}}reduce(e){if(e.source==="memory"&&this.reducePodMemory(e))return;if(ib.has(e.source)){let u=e.raw??{},n=e.context??{},a=String(u.queue??u.store??u.name??e.source),l=n.projectName??u.project,d=typeof l=="string"&&l?l:void 0,c=e.source+":"+a,p=this.dataNodes.get(c),m=u.kind==="queue-state",f=u.kind==="fs-ops"?ke(u.reads)+ke(u.writes):m?0:1,h=new Set(p?.usedBy??[]);d&&h.add(d),this.dataNodes.set(c,{id:c,kind:e.source,name:a,viaProject:p?.viaProject??d??"unknown",usedBy:[...h].sort(),count:(p?.count??0)+f,lastSeenAt:e.timestamp,counts:m?u.counts:p?.counts,recent:m?u.recent:p?.recent}),this.opts.onChange?.();return}if(e.source!=="gateway")return;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:"",i=e.timestamp;if(r==="gateway-up")this.gateway={at:i,ports:t.ports??[],routes:t.routes??[]};else if(r==="gateway-down")this.gateway&&(this.gateway={...this.gateway,ports:[]});else if(r==="gateway-traffic"){this.gateway||(this.gateway={at:i,ports:[],routes:[]}),this.gateway.aliveAt=i;let u=String(t.host??""),n=String(t.project??""),a=typeof t.caller=="string"?t.caller:void 0,l=(a?a+"\u21D2":"")+u+"\u2192"+n,d=this.edges.get(l);this.edges.set(l,{host:u,project:n,caller:a,count:(d?.count??0)+ke(t.count),avgMs:ke(t.avgMs),errors:(d?.errors??0)+ke(t.errors),lastSeenAt:i})}else if(r.startsWith("service-")||r==="cold-start"||r==="autoscale"||r==="idle-kill"){let u=String(t.project??"");if(!u)return;let n=this.services.get(u),a={project:u,state:n?.state??"unknown",pods:n?.pods,lastColdStartMs:n?.lastColdStartMs,lastEventAt:i,lastEvent:e.title};r==="service-starting"&&(a.state="starting"),r==="service-up"&&(a.state="up",a.pods=ke(t.pods??a.pods)),r==="cold-start"&&(a.state="up",a.pods=ke(t.pods??a.pods),typeof t.durationMs=="number"&&(a.lastColdStartMs=t.durationMs)),r==="autoscale"&&(a.pods=ke(t.to??a.pods)),(r==="service-down"||r==="idle-kill")&&(a.state="down",a.pods=0,r==="idle-kill"&&(a.idle=!0)),this.services.set(u,a)}this.recent.push({at:i,title:e.title,severity:e.severity}),this.recent.length>40&&this.recent.splice(0,this.recent.length-40),this.opts.onChange?.()}reducePodMemory(e){let t=Gn(e.raw);if(!t)return!1;let r=this.podMemory.get(t.project);r||(r=new Map,this.podMemory.set(t.project,r));let i=`${t.pod}:${t.pid}`;if(t.kind==="pod-memory-exited")r.delete(i);else{let u=r.get(i);if(!u&&(u={pod:t.pod,pid:t.pid,podGeneration:t.podGeneration??1,retained:new Map,lastSeenAt:e.timestamp},r.set(i,u),r.size>kI)){let n=[...r.entries()].sort((a,l)=>a[1].lastSeenAt-l[1].lastSeenAt)[0];n&&r.delete(n[0])}u.lastSeenAt=e.timestamp,t.kind==="pod-memory"?u.latest=t:t.kind==="pod-memory-retained"?u.retained.set(t.gen,{gen:t.gen,closedAt:ke(t.closedAt)}):u.retained.delete(t.gen)}return this.opts.onChange?.(),!0}memoryOf(e,t,r){let i=this.podMemory.get(e);if(!i||i.size===0)return;let u=[...i.values()].filter(l=>l.latest?t.length===0?r-l.lastSeenAt<=30*6e4:t.includes(l.podGeneration>1?`child-${l.pod}-g${l.podGeneration}`:`child-${l.pod}`):!1);if(u.length===0)return;let n=u.reduce((l,d)=>(l.latest?.at??0)>=(d.latest?.at??0)?l:d),a=u.map(l=>l.latest?.baseline??(l.latest?.trigger==="boot"?l.latest.live:void 0)).filter(l=>typeof l=="number");return{live:u.reduce((l,d)=>l+ke(d.latest?.live),0),reserved:u.reduce((l,d)=>l+ke(d.latest?.reserved),0),rss:u.reduce((l,d)=>l+ke(d.latest?.rss),0),...a.length?{baseline:Math.max(...a)}:{},swaps:Math.max(...u.map(l=>ke(l.latest?.swaps))),pods:u.length,retained:u.flatMap(l=>[...l.retained.values()].map(d=>({pod:l.pod,gen:d.gen,ageMs:Math.max(0,r-d.closedAt)}))),at:ke(n.latest?.at),trigger:String(n.latest?.trigger??""),...n.latest?.service?{service:n.latest.service}:{}}}discoverDecls(){if(Date.now()-this.declCache.at<1e4)return this.declCache.decls;let e=[],t,r=o((i,u)=>{if(u>4)return;let n;try{n=rb(i,{withFileTypes:!0})}catch{return}for(let a of n){if(a.name==="node_modules"||a.name.startsWith("."))continue;let l=`${i}/${a.name}`;if(a.isDirectory())r(l,u+1);else if(a.name==="project.json")try{let d=JSON.parse(Qs(l,"utf8")),c=d.targets??{};!t&&/cluster:trust$/.test(c.trust?.executor??"")&&(t=String(d.name??""));let p=d.cluster??d.davnx;if(!p)continue;let m=c["serve-hmr"]?.options?.internalPort,f=(c["serve-hmr"]?.options?.workers??[]).map(g=>g.name),h=typeof p.service=="string"?p.service:void 0;e.push({project:String(d.name??l),host:p.host,path:p.path,internalHost:p.internalHost,service:h,port:p.port,upstream:p.upstream,prependPrefix:p.prependPrefix,default:p.default,internalPort:m,workers:f,podNames:h?this.podNames(h):[],eager:p.eager,minPods:p.minPods,maxPods:p.maxPods,auth:p.auth})}catch{}}},"walk");return r(this.opts.root,0),this.declCache={at:Date.now(),decls:e,...t?{trustProject:t}:{}},e}trustCommand(){return this.discoverDecls(),`yarn nx run ${this.declCache.trustProject||"gateway"}:trust`}podNames(e){try{return rb(this.opts.podSockDir(e)).filter(t=>t.endsWith(".sock")).map(t=>t.replace(".sock","")).sort()}catch{return[]}}hostsSetup(e){let t="";try{t=(this.opts.readHosts??(()=>Qs("/etc/hosts","utf8")))()}catch{}let r=t.split(`
|
|
77
|
+
`).map(n=>n.trim()).filter(n=>n&&!n.startsWith("#")).map(n=>n.split(/\s+/)),i=o((n,a)=>r.some(l=>l[0]===n&&l.slice(1).includes(a)),"has"),u=[];for(let n of e)n.host&&!n.host.includes("*")&&(u.push(n.host),n.service&&n.internalHost!==!1&&u.push(typeof n.internalHost=="string"?n.internalHost:`internal.${n.host}`));return[...new Set(u)].map(n=>({host:n,v4:i("127.0.0.1",n),v6:i("::1",n)}))}serviceKeyView(){let e;try{e=JSON.parse(Qs(`${this.opts.root}/${II}`,"utf8"))}catch{return{}}let t={};for(let[r,i]of Object.entries(e))typeof i!="string"||i===""||(t[r]={fingerprint:xI("sha256").update(i).digest("hex").slice(0,12)});return t}liveDecls(){let e=this.discoverDecls();for(let t of e)t.service&&(t.podNames=this.podNames(t.service));return e}legacyView(){let e=this.liveDecls();return{at:Date.now(),gateway:this.gateway,decls:e,hostsSetup:this.hostsSetup(e),trustCommand:this.trustCommand(),serviceKeys:this.serviceKeyView(),services:[...this.services.values()].sort((t,r)=>t.project.localeCompare(r.project)),edges:[...this.edges.values()].sort((t,r)=>r.lastSeenAt-t.lastSeenAt),dataNodes:[...this.dataNodes.values()].sort((t,r)=>r.count-t.count).slice(0,24),recent:this.recent.slice(-20).reverse()}}gatewayLiveness(e=Date.now()){let t=this.opts.env??process.env,r=(t.LENSMCP_GATEWAY_PORTS??"").split(",").map(d=>Number(d.trim())).filter(d=>Number.isInteger(d)&&d>0),i=this.gateway?.ports??[],u=r.length?r:i,n=Number(t.LENSMCP_PARENT_PID??0);if(n>0)return mm(n)?{state:"live",role:"gateway-child",ports:u,since:this.gateway?.at,evidence:`served by the gateway process (pid ${n})`}:{state:"down",role:"gateway-child",ports:u,evidence:`the gateway that started this dashboard (pid ${n}) is gone`};if(i.length>0)return{state:"live",role:"standalone",ports:u,since:this.gateway?.at,evidence:"gateway-up event on this workspace\u2019s bus"};let a=this.registeredGateway(e);if(a)return{state:"live",role:"standalone",ports:u,evidence:`registered with the gateway daemon (pid ${a})`};let l=this.gateway?.aliveAt??0;return l>e-3e4?{state:"live",role:"standalone",ports:u,since:l,evidence:`gateway traffic ${Math.round((e-l)/1e3)}s ago`}:this.gateway?{state:"down",role:"standalone",ports:u,evidence:"no gateway traffic in the last 30s"}:{state:"unknown",role:"standalone",ports:u,evidence:"no gateway events seen \u2014 is this dashboard running without the gateway?"}}registeredGateway(e){if(e-this.registryCache.at<15e3)return this.registryCache.pid;let t;try{let r=`${(this.opts.env??process.env).LENSMCP_HOME||CI()}/.lensmcp/workspaces.json`,i=JSON.parse(Qs(r,"utf8")),u=Array.isArray(i)?i.find(n=>n.root===this.opts.root):void 0;u&&typeof u.pid=="number"&&u.pid>0&&mm(u.pid)&&(!u.procStamp||sb(u.pid)===u.procStamp)&&(t=u.pid)}catch{}return this.registryCache={at:e,...t?{pid:t}:{}},t}view(e){let t=e.now??Date.now(),r=this.liveDecls(),i=this.hostsSetup(r),u=this.serviceKeyView(),n=new Map((e.processCluster?.services??[]).map(h=>[h.project,h])),a=new Map;for(let h of e.processCluster?.errors??[]){if(!h.project||!h.line)continue;let g=a.get(h.project)??[];g.push(h.line),a.set(h.project,g.slice(-6))}let l=[...this.edges.values()].filter(h=>!h.caller),d=r.map(h=>{let g=h.service?h.eager?"eager":"lazy":"web",b=this.services.get(h.project),x=n.get(h.project),$=(e.processCluster?.errors??[]).filter(H=>H.project===h.project&&H.fault!=="types"),w=x?.buildFailed===!0&&$.length>0&&$.every(H=>H.fault==="process"),{state:k,reason:C}=ab(g,b,x,h.podNames.length,w),M=l.filter(H=>H.project===h.project),y=M.reduce((H,ye)=>H+ye.count,0),D=M.reduce((H,ye)=>H+ye.errors,0),A=M.slice().sort((H,ye)=>ye.lastSeenAt-H.lastSeenAt)[0],j=e.kpis?.projectStats(h.project,t),N=h.service&&h.internalHost!==!1&&h.host?typeof h.internalHost=="string"?h.internalHost:`internal.${h.host}`:void 0,K=h.service?this.memoryOf(h.project,h.podNames,t):void 0;return{project:h.project,kind:g,state:k,...C?{stateReason:C}:{},...h.host?{host:h.host}:{},...h.path?{path:h.path}:{},...N?{internalHost:N}:{},...h.port!==void 0?{port:h.port}:{},...h.internalPort!==void 0?{internalPort:h.internalPort}:{},pods:{running:h.podNames.length,names:h.podNames,...h.minPods!==void 0?{min:h.minPods}:{},...h.maxPods!==void 0?{max:h.maxPods}:{}},workers:h.workers??[],...b?.lastColdStartMs!==void 0?{lastColdStartMs:b.lastColdStartMs}:{},restarts:x?.restarts??0,buildFailed:(x?.buildFailed??!1)&&!w,processError:w,typeErrors:x?.typeErrors??!1,errorLines:a.get(h.project)??[],...h.auth?{auth:{...h.auth.default?{default:h.auth.default}:{},overrides:h.auth.overrides?.length??0}}:{},traffic:{count:y,errors:D,avgMs:A?A.avgMs:null,...A?{lastSeenAt:A.lastSeenAt}:{}},...j?{window:j}:{},...u[h.project]?{keyFingerprint:u[h.project].fingerprint}:{},...K?{memory:K}:{},...b?{lastEvent:{at:b.lastEventAt,title:b.lastEvent}}:x?.lastTitle?{lastEvent:{at:x.lastSeenAt??0,title:x.lastTitle}}:{}}}).sort((h,g)=>nb[h.kind]-nb[g.kind]||h.project.localeCompare(g.project)),c=l.map(h=>({host:h.host,project:h.project,count:h.count,errors:h.errors,avgMs:h.avgMs,lastSeenAt:h.lastSeenAt})).sort((h,g)=>g.count-h.count);for(let h of r)h.host&&!c.some(g=>g.host===h.host&&g.project===h.project)&&c.push({host:h.host,project:h.project,count:0,errors:0,avgMs:null});let p=[...this.edges.values()].filter(h=>!!h.caller).map(h=>({caller:h.caller,callee:h.project,host:h.host,count:h.count,errors:h.errors,avgMs:h.avgMs,lastSeenAt:h.lastSeenAt})).sort((h,g)=>g.count-h.count),m=[...this.dataNodes.values()].filter(h=>h.kind!=="memory").map(h=>({id:h.id,kind:h.kind,name:h.name,usedBy:h.usedBy??(h.viaProject&&h.viaProject!=="unknown"?[h.viaProject]:[]),ops:h.count,lastSeenAt:h.lastSeenAt,...h.kind==="queue"&&(h.counts||h.recent)?{queue:{counts:h.counts??{},recent:(h.recent??[]).slice(0,8).map(g=>({id:String(g.id??""),...typeof g.name=="string"?{name:g.name}:{},...typeof g.state=="string"?{state:g.state}:typeof g.status=="string"?{state:g.status}:{},...typeof g.finishedOn=="number"?{at:g.finishedOn}:typeof g.timestamp=="number"?{at:g.timestamp}:{}}))}}:{}})).sort((h,g)=>g.ops-h.ops).slice(0,24),f=i.filter(h=>!h.v4||!h.v6);return{at:t,gateway:this.gatewayLiveness(t),services:d,routes:c,edges:p,backends:m,hosts:i,...f.length?{hostsFix:ob(f)}:{},trustCommand:this.trustCommand(),recent:this.recent.slice(-20).reverse()}}},nb={web:0,eager:1,lazy:2},II="node_modules/.cache/davnx-webpack/service-keys.json";function sb(e){if(process.platform==="win32")return"";try{return BI("ps",["-p",String(e),"-o","lstart="],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).trim()}catch{return""}}s(sb,"IP"),o(sb,"processStamp");function mm(e){if(process.ppid===e)return!0;try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(mm,"Fk"),o(mm,"pidAlive");function ab(e,t,r,i,u=!1){let n=r?.state;if(n==="crash-looping")return{state:"crash-looping",reason:"keeps exiting right after start"};if(n==="wedged")return{state:"wedged",reason:"running but not answering"};let a=n==="up"||t?.state==="up";return r?.buildFailed&&!a?{state:"down",reason:`${u?"a process error":"build failed"} \u2014 see the error lines`}:a?r?.buildFailed?{state:"up",reason:u?"reported a process error \u2014 see the error lines":"serving its last good build \u2014 the current build failed"}:{state:"up"}:n==="starting"||t?.state==="starting"?{state:"starting",reason:e==="lazy"?"cold start in progress":"starting"}:!n&&!t&&i>0?{state:"up",reason:`${i} pod socket${i===1?"":"s"} live`}:n==="idle"||t?.idle||e==="lazy"&&(n==="down"||t?.state==="down"||!t)?{state:"idle",reason:"scaled to zero \u2014 starts on the next request"}:n==="down"||t?.state==="down"?{state:"down",reason:"not running"}:{state:"unknown",reason:"no lifecycle events seen yet"}}s(ab,"RP"),o(ab,"serviceState");function ob(e){let t=e.filter(i=>!i.v4).map(i=>i.host),r=e.filter(i=>!i.v6).map(i=>i.host);return`printf '${[...t.length?[`127.0.0.1 ${t.join(" ")}`]:[],...r.length?[`::1 ${r.join(" ")}`]:[]].join("\\n")}\\n' | sudo tee -a /etc/hosts`}s(ob,"EP"),o(ob,"hostsFixCommand");var _I=class{static{s(this,"ic")}static{o(this,"LogRing")}constructor(e=5e3){this.cap=e,this.lines=[],this.seqN=0,this.sourceSet=new Set}get seq(){return this.seqN}get size(){return this.lines.length}sources(){return[...this.sourceSet].sort()}append(e){let t=lb(e,++this.seqN);return this.sourceSet.add(t.source),this.lines.push(t),this.lines.length>this.cap+Math.ceil(this.cap/10)&&this.lines.splice(0,this.lines.length-this.cap),t}since(e,t=this.cap){let r=this.indexAfter(e),i=this.lines.slice(r);return i.length>t?i.slice(i.length-t):i}recent(e){return this.lines.slice(Math.max(0,this.lines.length-e))}query(e){let t=e.limit??2e3,r=e.q?.toLowerCase(),i=e.since&&e.since>0?this.lines.slice(this.indexAfter(e.since)):this.lines,u=[];for(let n=i.length-1;n>=0&&u.length<t;n--){let a=i[n];e.flowId&&a.flowId!==e.flowId||e.from!==void 0&&a.at<e.from||e.to!==void 0&&a.at>e.to||r&&!`${a.title} ${a.message??""} ${a.source}`.toLowerCase().includes(r)||u.push(a)}return u.reverse()}indexAfter(e){let t=0,r=this.lines.length;for(;t<r;){let i=t+r>>>1;this.lines[i].seq<=e?t=i+1:r=i}return t}};function lb(e,t){let r=e.raw??{},i=e.context??{},u=typeof r.project=="string"&&r.project?r.project:e.source,n=typeof i.flowId=="string"?i.flowId:typeof i.traceId=="string"?i.traceId:void 0;return{seq:t,at:e.timestamp,source:u,category:e.category,severity:e.severity,title:e.title,...e.message?{message:e.message}:{},...n?{flowId:n}:{}}}s(lb,"TP"),o(lb,"logLineOf");var db=class{static{s(this,"Go")}static{o(this,"SeenIds")}constructor(e=5e4){this.cap=e,this.set=new Set,this.order=[]}firstTime(e){if(!e)return!0;if(this.set.has(e))return!1;if(this.set.add(e),this.order.push(e),this.order.length>this.cap)for(let t of this.order.splice(0,this.order.length-this.cap))this.set.delete(t);return!0}},cb=class{static{s(this,"sc")}static{o(this,"Series")}constructor(e){this.horizonSec=e,this.buckets=new Map}bucket(e){let t=this.buckets.get(e);return t||(t={sec:e,count:0,errors:0,lat:[],latReq:[]},this.buckets.set(e,t)),t}addTraffic(e,t,r){let i=this.bucket(e);i.count+=t,i.errors+=r}addLatency(e,t,r){let i=this.bucket(e),u=r?i.lat:i.latReq;u.length<256&&u.push(t)}prune(e){for(let t of this.buckets.keys())t<=e-this.horizonSec&&this.buckets.delete(t)}range(e,t){let r=[];for(let i of this.buckets.values())i.sec>e&&i.sec<=t&&r.push(i);return r}},SI=class{static{s(this,"ac")}static{o(this,"KpiWindow")}constructor(e={}){this.byProject=new Map,this.windowSec=e.windowSec??300,this.sparkBuckets=e.sparkBuckets??30,this.sparkBucketSec=e.sparkBucketSec??10,this.horizonSec=Math.max(this.windowSec,this.sparkBuckets*this.sparkBucketSec)+5,this.global=new cb(this.horizonSec)}project(e){let t=this.byProject.get(e);return t||(t=new cb(this.horizonSec),this.byProject.set(e,t)),t}observe(e){if(e.source!=="gateway")return;let t=e.raw??{},r=t.kind,i=Math.floor(e.timestamp/1e3),u=typeof t.project=="string"?t.project:"",n=typeof t.caller=="string"&&t.caller?t.caller:void 0;if(r==="gateway-traffic"){let a=fm(t.count),l=fm(t.errors);if(a===0&&l===0)return;n||this.global.addTraffic(i,a,l),u&&this.project(u).addTraffic(i,a,l);let d=Array.isArray(t.durationsMs)?t.durationsMs:[];for(let c of d){let p=Number(c);!Number.isFinite(p)||p<0||(n||this.global.addLatency(i,p,!0),u&&this.project(u).addLatency(i,p,!0))}}else if(r==="gateway-request"){let a=Number(t.durationMs);if(!Number.isFinite(a)||a<0)return;n||this.global.addLatency(i,a,!1),u&&this.project(u).addLatency(i,a,!1)}}snapshot(e=Date.now()){let t=Math.floor(e/1e3);this.global.prune(t);for(let u of this.byProject.values())u.prune(t);let r=this.global,i=vm(r,t,this.sparkBuckets,this.sparkBucketSec);return{at:e,windowSec:this.windowSec,req60:Ht(r.range(t-60,t),"count"),last:gm(r.range(t-this.windowSec,t)),sparkBucketSec:this.sparkBucketSec,spark:i}}projectStats(e,t=Date.now()){let r=this.byProject.get(e);if(!r)return;let i=Math.floor(t/1e3);return r.prune(i),{...gm(r.range(i-this.windowSec,i)),req60:Ht(r.range(i-60,i),"count"),spark:vm(r,i,this.sparkBuckets,this.sparkBucketSec).req}}};function fm(e){let t=Number(e??0);return Number.isFinite(t)&&t>0?t:0}s(fm,"Bk"),o(fm,"nonNeg");function Ht(e,t){let r=0;for(let i of e)r+=i[t];return r}s(Ht,"yn"),o(Ht,"sum");function hm(e){let t=[];for(let i of e)for(let u of i.lat)t.push(u);if(t.length)return{lat:t.sort((i,u)=>i-u),complete:!0};let r=[];for(let i of e)for(let u of i.latReq)r.push(u);return{lat:r.sort((i,u)=>i-u),complete:!1}}s(hm,"Vk"),o(hm,"latencies");function gm(e){let t=Ht(e,"count"),r=Ht(e,"errors"),{lat:i,complete:u}=hm(e),n=i.length?i.reduce((a,l)=>a+l,0)/i.length:null;return{count:t,errors:r,errorRate:t>0?r/t:null,p50:ea(i,.5),p95:ea(i,.95),avgMs:n===null?null:Math.round(n),samples:i.length,sampled:!u||i.length<t}}s(gm,"Zk"),o(gm,"statsOf");function ea(e,t){if(e.length===0)return null;let r=Math.min(e.length-1,Math.max(0,Math.ceil(t*e.length)-1));return Math.round(e[r])}s(ea,"Rb"),o(ea,"percentile");function vm(e,t,r,i){let u=[],n=[],a=[];for(let l=r-1;l>=0;l--){let d=t-l*i,c=e.range(d-i,d);u.push(Ht(c,"count")),n.push(Ht(c,"errors")),a.push(ea(hm(c).lat,.95))}return{req:u,errors:n,p95:a}}s(vm,"qk"),o(vm,"sparkOf");var FI=class{static{s(this,"cc")}static{o(this,"FlowIndex")}constructor(e={flows:2e3,events:5e4},t=Et){this.caps=e,this.config=t,this.revs=new Map,this.pending=new Set,this.eventFlow=new Map,this.cache=new Map,this.evidenceCache=new Map}observe(e){let t=ym(e);if(!t)return;let r=(this.revs.get(t)??0)+1;this.revs.delete(t),this.revs.set(t,r),this.revs.size>this.caps.flows&&this.revs.delete(this.revs.keys().next().value),this.pending.add(t),e.id&&(this.eventFlow.set(e.id,t),this.eventFlow.size>this.caps.events&&this.eventFlow.delete(this.eventFlow.keys().next().value))}rev(e){return this.revs.get(e)??0}drainRevs(){let e=[...this.pending].map(t=>({flowId:t,rev:this.rev(t)}));return this.pending.clear(),e}flowOfEvent(e){return this.eventFlow.get(e)}summaries(e,t=50){if(!e)return[];let r=[];for(let u of e.recentFlowIds().slice(0,t)){let n=this.rev(u),a=this.cache.get(u);if(a&&a.rev===n&&n>0){r.push(a.summary);continue}let l=e.getFlowSummary(u);if(!l)continue;let d=e.getFlowEvents(u)??[],c=e.analyzeFlow?.(u)??(d.length?ts(d,this.config):void 0),p=yb(l,d,n,c);this.cache.set(u,{rev:n,summary:p}),r.push(p)}let i=new Set(r.map(u=>u.flowId));for(let u of this.cache.keys())i.has(u)||this.cache.delete(u);return r.sort((u,n)=>n.lastSeenAt-u.lastSeenAt)}evidence(e,t=50){let r=[];if(e){for(let i of e.recentFlowIds().slice(0,t)){let u=this.rev(i),n=this.evidenceCache.get(i);if(n&&n.rev===u&&u>0){r.push(...n.samples);continue}let a=pb(i,e.getFlowEvents(i)??[]);this.evidenceCache.set(i,{rev:u,samples:a}),r.push(...a)}if(this.evidenceCache.size>t*2){let i=new Set(e.recentFlowIds().slice(0,t));for(let u of this.evidenceCache.keys())i.has(u)||this.evidenceCache.delete(u)}}return new jI(r)}findByRoute(e,t,r){let i=ta(r);return e.find(u=>u.request&&u.request.method===t&&i.test(u.request.path))?.flowId}};function pb(e,t){let r=[],i=new Map;for(let n of t){let a=n.raw??{};if(a.kind==="server-request"&&n.id){let l=a.request??{},d=fb(n)??(typeof l.requestId=="string"?l.requestId:void 0);if(!d)continue;let c=typeof l.endedAt=="number"?l.endedAt:mb(n),p=typeof l.startedAt=="number"?l.startedAt:c-(typeof l.durationMs=="number"?l.durationMs:0);i.set(d,[...i.get(d)??[],{id:n.id,start:p,end:c}])}}let u=o((n,a)=>{let l=n?i.get(n):void 0;if(l?.length)return l.length===1?l[0].id:l.filter(d=>d.start-5<=a&&a<=d.end+5).sort((d,c)=>c.start-d.start)[0]?.id},"handlerAt");for(let n of t){if(!n.id)continue;let a=n.raw??{},l=mb(n),d=o(p=>typeof p=="number"&&Number.isFinite(p)?p:0,"num"),c=a.kind;if(c==="server-request"){let p=a.request??{};if(typeof p.route!="string")continue;r.push({key:`route:${String(p.method??"GET")} ${p.route}`,flowId:e,eventId:n.id,ms:d(p.durationMs),at:l,failed:d(p.status)>=500})}else if(c==="db-query"&&typeof a.project=="string"){let p=`${String(a.op??"query")} ${String(a.table??"")}`.trim(),m=n.title.replace(/\s*\(.*$/,"").trim();for(let f of new Set([p,m]))r.push({key:`sql:${a.project}:${f}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:n.severity==="error"})}else if(c==="egress"&&typeof a.project=="string"&&typeof a.host=="string"){let p=typeof a.error=="string"||d(a.status)>=500||n.severity==="error";r.push({key:`egress:${a.project}:${a.host}`,flowId:e,eventId:n.id,ms:d(a.durationMs),at:l,failed:p})}else if(c==="memory-mutation"){let p=(a.mutation??{}).ownerNodeId;if(typeof p!="string")continue;r.push({key:`mem:${p}`,flowId:e,eventId:u(fb(n),l)??n.id,ms:0,at:l,failed:!1})}}return r}s(pb,"AP"),o(pb,"evidenceSamples");var mb=o(e=>typeof e.timestamp=="number"?e.timestamp:Date.parse(String(e.timestamp))||0,"tsOf"),fb=o(e=>{let t=e.context??{};return typeof t.requestId=="string"&&t.requestId?t.requestId:void 0},"requestIdOf"),jI=class{static{s(this,"Eb")}static{o(this,"EvidenceLookup")}constructor(e){this.samples=e}find(e,t,r={}){let i;for(let u of this.samples)!e(u.key)||r.inFlow!==void 0&&u.flowId!==r.inFlow||t==="failing"&&!u.failed||r.minMs!==void 0&&u.ms<r.minMs||(i?(t==="slowest"?u.ms>i.ms||u.ms===i.ms&&u.at>i.at:u.at>i.at)&&(i=u):i=u);return i?{flowId:i.flowId,nodeId:i.eventId}:void 0}};function ym(e){let t=e.context??{};return typeof t.flowId=="string"&&t.flowId?t.flowId:void 0}s(ym,"Tb"),o(ym,"flowIdOf");function ta(e){let t=e.split("/").map(r=>r.startsWith(":")?"[^/?#]+":r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("/");return new RegExp(`^${t}(?:[?#].*)?$`)}s(ta,"uc"),o(ta,"routeRegex");var zI=new Set(["memory-mutation","memory-retention","singleton-instance","subscription-added","subscription-removed","store-created","hook-run"]),NI={"user-click":"click","user-input":"input","input-change":"input",keyboard:"key press","route-load":"navigate","page-load":"page load","form-submit":"submit",effect:"effect",timer:"timer","websocket-message":"socket message","backend-response":"response","hmr-update":"hot reload","ai-turn":"AI turn"};function hb(e){return e?NI[e]??e.replace(/-/g," "):"request"}s(hb,"OP"),o(hb,"originLabelOf");function gb(e){if(!e)return;if(e.startsWith("page:"))return e.slice(5)||"/";let t=/([^/:]+\.[cm]?[jt]sx?):(\d+)/.exec(e);if(t)return`${t[1]}:${t[2]}`;let r=e.replace(/^[a-z]+:/,"");return r.length>40?"\u2026"+r.slice(-39):r}s(gb,"MP"),o(gb,"originWhereOf");function vb(e){let t=Xn.indexOf(e);return t===-1?Xn.length:t}s(vb,"NP"),o(vb,"categoryRankOf");function yb(e,t,r,i){let u={},n=new Set,a="ok",l,d=1/0,c,p=1/0,m=1/0,f=-1/0,h=new Set,g=0,b=0,x,$=o(j=>{(j==="error"||j==="warn"&&a==="ok")&&(a=j)},"bump");for(let j of t){let N=j.raw??{},K=j.context??{},H=typeof N.kind=="string"?N.kind:void 0,ye=bd({source:j.source,category:j.category,title:j.title,kind:H});u[ye]=(u[ye]??0)+1;let Ze=typeof N.project=="string"?N.project:typeof K.projectName=="string"?K.projectName:void 0;Ze&&j.source!=="gateway"&&n.add(Ze),j.severity==="error"||j.severity==="fatal"?($("error"),b++,(!x||j.timestamp<x.at)&&(x={at:j.timestamp,title:j.title})):j.severity==="warning"&&$("warn");let Je=Number(N.status??N.request?.status);if(Number.isFinite(Je)&&(Je>=500?$("error"):Je>=400&&$("warn")),(H==="fetch-start"||H==="fetch-done"||H==="fetch-error")&&typeof N.url=="string"){let Oe=Number(N.startedAt??j.timestamp);(Oe<d||Oe===d&&l&&l.status===void 0)&&(d=Oe,l={method:String(N.method??"GET"),path:N.url,...Number.isFinite(Je)?{status:Je}:l?.status!==void 0?{status:l.status}:{}})}if(h.size<80)if(H==="gateway-request"&&typeof N.url=="string")h.add(`${String(N.method??"GET")} ${Em(N.url)}`);else if(H==="server-request"){let Oe=N.request??{};typeof Oe.route=="string"&&h.add(`${String(Oe.method??"GET")} ${Oe.route}`)}else H==="db-query"&&Ze?h.add(`sql:${Ze}:${j.title.replace(/\s*\(.*$/,"")}`):H==="egress"&&Ze&&typeof N.host=="string"&&h.add(`egress:${Ze}:${N.host}`);if(H==="gateway-request"&&!N.caller&&j.source==="gateway"&&g++,H==="gateway-request"&&!N.caller&&typeof N.url=="string"&&j.timestamp<p&&(p=j.timestamp,c={method:String(N.method??"GET"),path:N.url,...Number.isFinite(Je)?{status:Je}:{}}),H&&zI.has(H))continue;let It=Number(N.durationMs??N.request?.durationMs??0),tt=Number(N.startedAt),$i=Number.isFinite(tt)&&tt>0?tt:j.timestamp-(Number.isFinite(It)?It:0),Uu=Number.isFinite(tt)&&tt>0&&Number.isFinite(It)?tt+It:j.timestamp;$i<m&&(m=$i),Uu>f&&(f=Uu)}!l&&c&&(l=c);let w=hb(e.originType),k=gb(e.originNodeId),C=l?`${l.method} ${Em(l.path)}`:void 0,M=e.headline&&e.headline!==e.originType?e.headline:void 0,y=!e.originType&&g>1?` +${g-1} more request${g===2?"":"s"}`:"",D=e.originType?`${w}${k?` \xB7 ${k}`:""}`:C?`${C}${y}`:M??w,A=e.originType&&C?`${D} \u2192 ${C}`:D;return{flowId:e.flowId,...e.originType?{originType:e.originType}:{},...e.originNodeId?{originNodeId:e.originNodeId}:{},startedAt:e.startedAt,lastSeenAt:e.lastSeenAt,eventCount:e.eventCount,headline:A,originLabel:w,...k?{originWhere:k}:{},...l?{request:l}:{},worst:a,durationMs:Number.isFinite(m)&&f>=m?Math.round(f-m):0,lanes:u,projects:[...n].sort(),rev:r,...g?{requestCount:g}:{},...b?{errorCount:b,firstError:bb(x.title)}:{},...h.size?{touches:[...h]}:{},...i?Eb(i):{}}}s(yb,"PP"),o(yb,"summarizeFlow");function Eb(e){let t=e.classification,r=e.segmentation.stats;return{category:t.category,categoryRank:vb(t.category),decidedBy:t.decidedBy,...t.subject?{subject:t.subject}:{},tags:t.tags,segmentCount:r.segments,phaseCount:r.phases,signalCount:r.signal}}s(Eb,"DP"),o(Eb,"analysisFields");function bb(e){return e.replace(/\s*✗\s*$/,"").replace(/\s*\((?:\d+ rows?, )?[\d.]+ ?ms\)$/,"")}s(bb,"CP"),o(bb,"cleanTitle");function Em(e){let t=e.indexOf("?");return t>=0?e.slice(0,t):e}s(Em,"Wk"),o(Em,"stripQuery");function bm(e,t){return{id:e.id,kind:e.kind,label:e.label,phase:e.phase,start:e.start,end:e.end,durationMs:e.durationMs,counts:e.counts,projects:e.projects,...e.method?{method:e.method}:{},...e.route?{route:e.route}:{},...e.requestId?{requestId:e.requestId}:{},...e.after?{after:e.after}:{},...e.hot?{hot:e.hot}:{},...e.part?{part:e.part}:{},worstSeverity:e.worstSeverity,category:t}}s(bm,"Kk"),o(bm,"toDashSegment");function wb(e,t,r){if(!e)return{flowId:t,summary:null,events:[],rev:r.rev};let i=e.getFlowSummary(t)??null,u=e.getFlowEvents(t)??[],n=e.analyzeFlow?.(t)??(u.length?ts(u,r.config??Et):void 0),a,l=u;if(r.segmentId!==void 0){a=n?.segmentation.segments.find(g=>g.id===r.segmentId);let h=new Set(a?.eventIds??[]);l=u.filter(g=>h.has(g.id))}let d=Hn(l,{includeRaw:r.includeRaw===!0}),c={flowId:t,summary:i,...d,rev:r.rev};if(!n)return c;let p=n.segmentation.assignment;c.events=c.events.map(h=>{let g=p[h.id]??(h.memberIds?.[0]?p[h.memberIds[0]]:void 0);return g?{...h,segmentId:g}:h});let m=o(h=>n.segmentCategories[h.id]??"other","category");c.segments=n.segmentation.segments.map(h=>bm(h,m(h))),c.phases=n.segmentation.phases,c.segmentCategories=n.segmentCategories,c.segmentStats=n.segmentation.stats;let f=n.classification;return c.classification={category:f.category,decidedBy:f.decidedBy,...f.ruleIndex!==void 0?{ruleIndex:f.ruleIndex}:{},...f.subject?{subject:f.subject}:{},tags:f.tags,origin:f.origin},a&&(c.focus=bm(a,m(a))),c}s(wb,"Xk"),o(wb,"flowDetailPayload");var MI=300,OI=1e3,Db=20,$b=30,RI=1500,we=o(e=>e&&typeof e=="object"?e:{},"obj"),P=o(e=>typeof e=="string"&&e?e:void 0,"str"),ve=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num"),TI=class{static{s(this,"pc")}static{o(this,"ErrorLog")}constructor(e=Date.now){this.now=e,this.groups=new Map,this.pending=[],this.byRequest=new Map,this.projectOfRequest=new Map,this.seen=new Set,this.dismissals=new Map,this.changed=!1}observe(e){if(e.id){if(this.seen.has(e.id))return!1;this.seen.add(e.id),this.seen.size>2e4&&this.seen.delete(this.seen.values().next().value)}let t=yd(e);if(t)return this.dismissals.delete(t.groupId),t.kind===wu&&(this.dismissals.set(t.groupId,{until:t.until,at:e.timestamp,eventIds:new Set(t.eventIds),...t.by?{by:t.by}:{},...t.reason?{reason:t.reason}:{}}),this.dismissals.size>OI&&this.dismissals.delete(this.dismissals.keys().next().value)),this.changed=!0,!0;let r=we(e.raw),i=we(e.context),u=P(r.kind),n=P(i.requestId);u==="gateway-request"&&n&&P(r.project)&&(this.projectOfRequest.set(n,P(r.project)),this.projectOfRequest.size>5e3&&this.projectOfRequest.delete(this.projectOfRequest.keys().next().value));let a=e.severity==="error"||e.severity==="fatal",l=we(r.request),d=ve(r.status)??ve(l.status);return u==="server-request"&&(a||(d??0)>=500)?this.defer(e,"server"):e.source==="client-runtime"&&a&&(u==="error"||u==="unhandledrejection"||u==="resource-error"||u==="console")?this.browser(e,r,i):u==="egress"&&(P(r.error)||(d??0)>=500)?this.external(e,r,i,d):u==="queue-failed"?this.queue(e,r,i):u==="span"&&a?this.defer(e,"span"):u==="gateway-request"&&((d??0)>=500||d===0)?this.defer(e,"gateway"):u==="fetch-done"&&(d??0)>=500||u==="fetch-error"?this.defer(e,"fetch"):u==="log"&&a&&(e.source==="nestjs"||e.source==="nest")?this.defer(e,"log"):!1}flush(e=!1){let t=this.now(),r=o(a=>e||t-a.arrivedAt>=RI,"ready"),i=o(a=>P(we(a.event.context).requestId),"requestOf");for(let a of this.pending.filter(l=>l.kind==="server"&&r(l))){this.pending.splice(this.pending.indexOf(a),1);let l=we(a.event.raw);this.server(a.event,l,we(l.request),we(a.event.context))}let u=new Set(this.pending.filter(a=>a.kind==="server").map(i).filter(Boolean));for(let a of this.pending.filter(l=>l.kind!=="server"&&r(l)&&!(i(l)&&u.has(i(l)))))this.pending.splice(this.pending.indexOf(a),1),this.settle(a);let n=this.changed;return this.changed=!1,n}snapshot(e=[],t=15*6e4){let r=this.now(),i=Math.floor(r/6e4),u=[...this.groups.values()].map(c=>{let p=[];for(let b=i-$b+1;b<=i;b++)p.push(c.perMinute.get(b)??0);let{flows:m,perMinute:f,eventIds:h,...g}=c;return{...g,occurrences:[...g.occurrences],flowCount:m.size,spark:p}}),n=this.hiddenEvents(),a=[],l=[];for(let c of[...e,...u].sort((p,m)=>+!!m.ongoing-+!!p.ongoing||m.lastSeenAt-p.lastSeenAt)){let p=this.dismissalOf(c,n);p?l.push({...c,dismissedAt:p.at,...p.by?{dismissedBy:p.by}:{},...p.reason?{dismissedReason:p.reason}:{}}):a.push(c)}let d=a.filter(c=>c.ongoing||r-c.lastSeenAt<=t);return{at:r,recentMs:t,groups:a,recentGroups:d.length,recentOccurrences:d.reduce((c,p)=>c+(p.ongoing?1:p.occurrences.filter(m=>r-m.at<=t).length),0),dismissed:l}}hiddenEvents(){let e=new Map;for(let t of this.dismissals.values())for(let r of t.eventIds)(e.get(r)?.at??-1)<=t.at&&e.set(r,t);return e}dismissalOf(e,t){let r=this.dismissals.get(e.id);if(r&&e.lastSeenAt<=r.until)return r;let i=this.groups.get(e.id)?.eventIds,u=i?.[i.length-1];return u===void 0?void 0:t.get(u)}dismissalsFor(e,t=[],r=this.now()){let i=[];for(let u of new Set(e)){let n=this.groups.get(u),a=n??t.find(l=>l.id===u);a&&i.push({groupId:u,until:Math.max(r,a.lastSeenAt),eventIds:n?n.eventIds.slice():[],by:"dashboard",title:a.title})}return i}restorable(e){let t=new Set;for(let r of new Set(e)){this.dismissals.has(r)&&t.add(r);let i=this.groups.get(r)?.eventIds??[];for(let[u,n]of this.dismissals)i.some(a=>n.eventIds.has(a))&&t.add(u)}return[...t]}server(e,t,r,i){let u=P(i.requestId)??P(r.requestId),n=P(i.projectName)??P(t.project)??(u?this.projectOfRequest.get(u):void 0),a=P(r.method)??"GET",l=P(r.route)??"?",d=ve(r.status)??ve(t.status),c=we(r.error),p=P(c.message)??P(e.message),m=P(c.name),f=`${a} ${l}${d?` \u2192 ${d}`:""}`,h=`server:${n??"?"}:${a} ${l}:${d??""}:${m??""}:${Xt(p)}`,g=this.record(h,"server",e,{title:f,...n?{where:n,project:n}:{},...p?{message:p}:{},...P(c.stack)?{stack:hi(P(c.stack))}:{},...d!==void 0?{status:d}:{}},u,d);return u&&this.byRequest.set(u,{group:this.groups.get(h),occ:g}),this.trimRequests(),!0}browser(e,t,r){let i=P(t.message)??e.title,u=P(r.url)??P(r.route),n=`browser:${P(t.kind)}:${Xt(i)}`;return this.record(n,"browser",e,{title:i.split(`
|
|
78
|
+
`)[0].slice(0,160),...u?{where:Bb(u)}:{},message:i,...P(t.stack)?{stack:hi(P(t.stack))}:{}},P(r.requestId)),!0}external(e,t,r,i){let u=P(t.project)??P(r.projectName),n=P(t.host)??"?",a=P(t.method)??"GET",l=P(t.path)??"",d=P(t.error),c=i?String(i):d??"failed",p=`external:${u??"?"}:${n}:${a} ${Nu(l)}:${i??Xt(d)}`;return this.record(p,"external",e,{title:`${a} ${n}${Nu(l)} \u2192 ${c}`,where:`${u??"?"} \u2192 ${n}`,...u?{project:u}:{},...d?{message:d}:{},...i?{status:i}:{}},P(r.requestId),i),!0}queue(e,t,r){let i=P(t.queue)??"?",u=P(t.failedReason)??P(t.error)??e.message,n=P(t.project)??P(r.projectName),a=`queue:${i}:${P(t.name)??""}:${Xt(u)}`;return this.record(a,"queue",e,{title:`Job ${P(t.name)??""} failed on ${i}`.replace(/\s+/g," "),where:n?`${n} \xB7 ${i}`:i,...n?{project:n}:{},...u?{message:u}:{},...P(t.stack)?{stack:hi(P(t.stack))}:{}},P(r.requestId)),!0}defer(e,t){return this.pending.push({event:e,kind:t,arrivedAt:this.now()}),this.pending.length>2e3&&this.pending.splice(0,this.pending.length-2e3),!1}settle(e){let t=e.event,r=we(t.raw),i=we(t.context),u=P(i.requestId),n=u?this.byRequest.get(u):void 0;if(n){e.kind==="span"&&!n.occ.stepId&&(n.occ.stepId=t.id),!n.occ.flowId&&P(i.flowId)&&(n.occ.flowId=P(i.flowId)),this.changed=!0;return}if(e.kind==="log"){let b=P(r.project)??P(i.projectName);if([...this.groups.values()].some(w=>w.kind==="server"&&(w.project===b||!w.project)&&Math.abs(w.lastSeenAt-t.timestamp)<3e3))return;let x=we(we(r.request).error),$=$m(P(x.message)??t.title);this.record(`log:${b??"?"}:${Xt($)}`,"log",t,{title:$.split(`
|
|
79
|
+
`)[0].slice(0,160),...b?{where:b,project:b}:{},message:$,...P(x.stack)?{stack:hi($m(P(x.stack)))}:{}},u);return}if(e.kind==="span"){let b=we(r.span),x=P(b.name)??t.title.replace(/\s*\(\d+ms\)\s*✗?$/,""),$=P(i.projectName)??(u?this.projectOfRequest.get(u):void 0),w=P(t.message)??P(we(b.error).message),k=this.record(`exception:${$??"?"}:${x}:${Xt(w)}`,"exception",t,{title:`${x} threw${w?`: ${w.split(`
|
|
80
|
+
`)[0].slice(0,100)}`:""}`,...$?{where:$,project:$}:{},...w?{message:w}:{}},u);u&&this.byRequest.set(u,{group:[...this.groups.values()].find(C=>C.occurrences.includes(k)),occ:k});return}let a=ve(r.status),l=P(r.method)??"GET",d=P(r.url)??"?",c=P(r.project),p=P(r.host),m=e.kind==="fetch"&&!a?"network error":String(a??"failed"),f=e.kind==="gateway"?`${l} ${p??""}${Nu(d)} \u2192 ${m}`:`${l} ${Nu(d)} \u2192 ${m}`,h=`request:${e.kind}:${c??p??""}:${l} ${Nu(d)}:${m}`,g=this.record(h,"request",t,{title:f,where:e.kind==="gateway"?`gateway \u2192 ${c??p??"?"}`:"browser",...c?{project:c}:{},...a!==void 0?{status:a}:{},...e.kind==="gateway"?{message:xb(r,a)}:{}},u,a);u&&this.byRequest.set(u,{group:this.groups.get(h),occ:g})}record(e,t,r,i,u,n){let a=we(r.context),l=P(a.flowId),d=this.groups.get(e);d||(d={id:e,kind:t,...i,count:0,firstSeenAt:r.timestamp,lastSeenAt:r.timestamp,occurrences:[],flows:new Set,perMinute:new Map,eventIds:[]},this.groups.set(e,d),this.evict()),d.count+=1,d.eventIds.push(r.id),d.eventIds.length>200&&d.eventIds.shift(),d.firstSeenAt=Math.min(d.firstSeenAt,r.timestamp),r.timestamp>=d.lastSeenAt&&(d.lastSeenAt=r.timestamp,i.stack&&(d.stack=i.stack),i.message&&(d.message=i.message)),l&&d.flows.add(l);let c=Math.floor(r.timestamp/6e4);d.perMinute.set(c,(d.perMinute.get(c)??0)+1);for(let m of d.perMinute.keys())m<c-$b&&d.perMinute.delete(m);let p={id:r.id,at:r.timestamp,...l?{flowId:l}:{},...u?{requestId:u}:{},...n!==void 0?{status:n}:{}};return d.occurrences.unshift(p),d.occurrences.sort((m,f)=>f.at-m.at),d.occurrences.length>Db&&(d.occurrences.length=Db),this.changed=!0,p}evict(){if(this.groups.size<=MI)return;let e=[...this.groups.values()].sort((t,r)=>t.lastSeenAt-r.lastSeenAt)[0];e&&this.groups.delete(e.id)}trimRequests(){this.byRequest.size>5e3&&this.byRequest.delete(this.byRequest.keys().next().value)}};function wm(e,t,r){if(t==="crash-looping")return{kind:"service",title:`${e} keeps crashing`,serving:!1};if(t==="wedged")return{kind:"service",title:`${e} is not answering`,serving:!1};let i=r.length>0&&r.every(n=>n.fault==="process"),u=t==="up";return{kind:u?i?"log":"build":"service",title:i?`${e} reported a process error`:`${e} failed to build`,serving:u}}s(wm,"Ab"),o(wm,"describeServiceFault");function Dm(e,t=Date.now()){let r=[],i=o((c,p=!0)=>({...c,count:c.count??1,firstSeenAt:c.at??t,lastSeenAt:c.at??t,occurrences:[],flowCount:0,spark:[],...p?{ongoing:!0}:{}}),"base"),u=o(c=>{let p=new Map;for(let m of ua(we(e[c]).errors))p.set(P(m.project)??"workspace",[...p.get(P(m.project)??"workspace")??[],m]);return p},"grouped"),n=u("typecheck://errors"),a=u("lint://errors");for(let c of ua(we(e["build://failures"]).failures)){let p=c.domain==="typecheck"||c.domain==="lint"?c.domain:"build",m=P(c.project)??"workspace";p==="typecheck"&&n.has(m)||p==="lint"&&a.has(m)||r.push(i({id:`build:${P(c.fingerprint)??P(c.message)??"?"}`,kind:p,title:`${p==="typecheck"?"Type error":p==="lint"?"Lint error":"Build error"}${P(c.project)?` in ${P(c.project)}`:""}`,...P(c.file)?{where:P(c.file)}:{},...P(c.project)?{project:P(c.project)}:{},...P(c.message)?{message:P(c.message)}:{},resource:"build://failures",...ve(c.timestamp)!==void 0?{at:ve(c.timestamp)}:{}}))}for(let[c,p]of n){let m=p[0];r.push(i({id:`typecheck:${c}`,kind:"typecheck",title:`${p.length} type error${p.length===1?"":"s"} in ${c}`,where:[P(m.file),ve(m.line)].filter(f=>f!==void 0).join(":")||c,project:c,message:p.slice(0,5).map(f=>`${P(f.file)??""}${ve(f.line)!==void 0?`:${ve(f.line)}`:""} ${P(f.code)??""} ${P(f.message)??""}`.trim()).join(`
|
|
81
|
+
`),count:p.length,resource:"typecheck://errors",at:Math.max(...p.map(f=>ve(f.timestamp)??0))||t}))}for(let[c,p]of a){let m=p[0]??{};r.push(i({id:`lint:${c}`,kind:"lint",title:`${p.length} lint error${p.length===1?"":"s"} in ${c}`,where:[P(m.file),ve(m.line)].filter(f=>f!==void 0).join(":")||c,project:c,message:p.slice(0,5).map(f=>`${P(f.file)??""}${ve(f.line)!==void 0?`:${ve(f.line)}`:""} ${P(f.rule)??""} ${P(f.message)??""}`.trim()).join(`
|
|
82
|
+
`),count:p.length,resource:"lint://errors",at:Math.max(...p.map(f=>ve(f.timestamp)??0))||t},!1))}let l=we(e["process://cluster"]),d=ua(l.errors);for(let c of ua(l.services)){let p=P(c.state),m=P(c.project)??"?",f=d.filter($=>$.project===m),h=o($=>$.map(w=>P(w.line)).filter(Boolean),"text");if(c.typeErrors===!0&&!n.has(m)){let $=h(f.filter(w=>w.fault==="types"));r.push(i({id:`typecheck:${m}`,kind:"typecheck",title:`Type errors in ${m}`,where:m,project:m,...$.length?{message:$.slice(-6).join(`
|
|
83
|
+
`)}:{},resource:"process://cluster",...ve(c.lastSeenAt)!==void 0?{at:ve(c.lastSeenAt)}:{}}))}if(p!=="crash-looping"&&p!=="wedged"&&c.buildFailed!==!0)continue;let g=f.filter($=>$.fault!=="types"),b=h(g),x=wm(m,p,g);r.push(i({id:`service:${m}:${p}`,kind:x.kind,title:x.title,where:x.serving?`${m} \u2014 still serving its last good build`:m,project:m,...b.length?{message:b.slice(-6).join(`
|
|
84
|
+
`)}:P(c.lastTitle)?{message:P(c.lastTitle)}:{},resource:"process://cluster",...ve(c.lastSeenAt)!==void 0?{at:ve(c.lastSeenAt)}:{}}))}return r}s(Dm,"jb"),o(Dm,"standingErrors");var ua=o(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"):[],"arr");function Xt(e){return e?e.split(`
|
|
85
|
+
`)[0].replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,"<id>").replace(/\b[0-9A-HJKMNP-TV-Z]{26}\b/g,"<id>").replace(/0x[0-9a-f]+/gi,"<hex>").replace(/\d+/g,"#").slice(0,140):""}s(Xt,"bn"),o(Xt,"norm");function Nu(e){let t=(e.split("?")[0]??e).split("/");return t.map((r,i)=>{let u=t[i-1]??"";return/^\d+$/.test(r)&&!(/^(?:api|v)$/i.test(u)&&r.length<=2)||/^[0-9a-f]{16,}$/i.test(r)||/^[0-9a-f]{8}-[0-9a-f-]{27}$/i.test(r)?":id":r}).join("/")}s(Nu,"Jo"),o(Nu,"routeShape");function Bb(e){try{return new URL(e).pathname}catch{return e}}s(Bb,"BP"),o(Bb,"pagePath");function hi(e){let t=e.split(`
|
|
83
86
|
`),r=t[0]??"",i=t.slice(1).filter(a=>/^\s*at /.test(a)),u=i.filter(a=>!/node_modules|node:internal|node:async_hooks|\(native\)|<anonymous>/.test(a)),n=(u.length?u:i).slice(0,8);return[r,...n].join(`
|
|
84
|
-
`)}s(
|
|
85
|
-
${
|
|
86
|
-
`)}:{},count:
|
|
87
|
+
`)}s(hi,"dc"),o(hi,"appFrames");function $m(e){return e.replace(/^\[Nest\]\s+\d+\s+-\s+[^A-Z]*?\s+(?:ERROR|WARN)\s+(?:\[[^\]]+\]\s+)?/,"")}s($m,"Qk"),o($m,"stripNestPrefix");function xb(e,t){let r=Array.isArray(e.steps)?e.steps:[],i=r[r.length-1],u=i?P(i.step):void 0;return t===503?`the gateway answered 503${u?` after "${u}"`:""} \u2014 the service did not become ready (cold start or crash)`:t===502?"the gateway could not reach the service (502)":t===504?"the service did not answer in time (504)":`the gateway answered ${t??"with a failure"}${u?` after "${u}"`:""}`}s(xb,"ZP"),o(xb,"gatewayReason");var Cb=["graph://patterns","perf://slow-routes","perf://duplicate-requests","db://slow-queries","db://analysis","memory://leaks/suspected","memory://owners/growing","memory://current","react://components/hot","runtime://errors","runtime://browser/errors","trace://failed","net://egress/hosts","typecheck://current","typecheck://errors","build://current","build://failures","lint://current","process://cluster","visual://violations/current","perf://rules"],oe=o(e=>e&&typeof e=="object"?e:{},"obj"),ce=o(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"):[],"arr"),z=o(e=>typeof e=="string"&&e?e:void 0,"str"),R=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function kb(e){let t=e.resources,r=[],i=o(y=>{for(let D of y){let A=e.flowOfEvent(D);if(A)return{flowId:A,nodeId:D,eventIds:y.slice(0,50)}}return y.length?{eventIds:y.slice(0,50)}:void 0},"evidenceOf"),u=o((y,D)=>{let A=ta(D),j=o(N=>N.startsWith(`${y} `)&&A.test(N.slice(y.length+1)),"hit");return e.flows.find(N=>N.request&&N.request.method===y&&A.test(N.request.path)||N.touches?.some(j))?.flowId},"flowForRoute"),n=o(y=>e.flows.find(D=>D.touches?.includes(y))?.flowId,"flowTouching"),a=o((y,D)=>y?{flowId:y.flowId,nodeId:y.nodeId}:D?{flowId:D}:void 0,"at"),l=o((y,D)=>{let A=ta(D),j=`route:${y} `;return N=>N.startsWith(j)&&(N.slice(j.length)===D||A.test(N.slice(j.length)))},"routeKey");for(let y of ce(oe(t["graph://patterns"]).patterns)){let D=z(y.kind),A=oe(y.details),j=(Array.isArray(y.evidence)?y.evidence:[]).filter(ye=>typeof ye=="string"),N=z(y.title)??D??"pattern",K=D==="n+1-query"?"n-plus-one":D==="db-in-loop"?"db-in-loop":D==="render-storm"?"render-storm":D==="slow-path"?"slow-path":D==="leak"?"leak":"other",H=z(A.signature)??z(A.componentInstanceId)??N;r.push({id:`graph:${D}:${H}`,kind:K,severity:y.severity==="error"?"high":"medium",title:N,...z(A.signature)?{code:z(A.signature)}:{},...K==="render-storm"&&z(A.componentInstanceId)?{where:Bm(z(A.componentInstanceId))}:{},detail:Mb(K,A),...R(A.count)!==void 0?{count:R(A.count)}:R(A.dbCallsInsideLoop)!==void 0?{count:R(A.dbCallsInsideLoop)}:{},evidence:i(j),resource:"graph://patterns",at:R(y.detectedAt)})}let d=oe(t["perf://slow-routes"]),c=R(d.thresholdMs)??500;for(let y of ce(d.routes)){let D=z(y.method)??"GET",A=z(y.route)??"?",j=R(y.worstRecentMs)??0,N=a(e.evidence?.find(l(D,A),"latest",{minMs:c})??e.evidence?.find(l(D,A),"slowest"),u(D,A));r.push({id:`perf:slow-route:${D} ${A}`,kind:"slow-route",severity:j>=c*3?"high":"medium",title:`${D} ${A} is slow`,where:`${D} ${A}`,detail:`worst ${Ue(j)} recently \u2014 ${R(y.recentSlowSamples)??0} of the last ${Math.min(R(y.samples)??0,R(d.recentSampleWindow)??20)} calls over the ${Ue(c)} budget (last call ${Ue(R(y.lastDurationMs)??0)})`,count:R(y.slowSamples),...N?{evidence:N}:{},resource:"perf://slow-routes",at:R(y.lastSeenAt)})}for(let y of ce(oe(t["perf://duplicate-requests"]).endpoints)){let D=z(y.method)??"GET",A=z(y.url)??"?";r.push({id:`perf:dup:${D} ${A}`,kind:"duplicate-requests",severity:"medium",title:`${D} ${A} fired ${R(y.peakConcurrent)??"?"}\xD7 at once`,where:`${D} ${A}`,detail:`${R(y.peakConcurrent)??"?"} identical requests in flight together \u2014 the browser asked for the same thing repeatedly`,count:R(y.totalRequests),resource:"perf://duplicate-requests",at:R(y.lastSeenAt)})}let p=oe(t["db://slow-queries"]),m=R(p.thresholdMs)??100;for(let y of ce(p.queries)){let D=R(y.p95Ms)??0,A=R(y.maxMs)??0,j=`${z(y.op)??"query"} ${z(y.table)??""}`.trim();r.push({id:`db:slow:${z(y.project)??"?"}:${j}`,kind:"slow-query",severity:D>=m*5?"high":D>=m?"medium":"low",title:D>=m?`Slow query: ${j}`:`Occasionally slow query: ${j}`,where:`${z(y.project)??"?"} \xB7 ${j}`,detail:`p95 ${Ue(D)} \xB7 max ${Ue(A)} \xB7 avg ${Ue(R(y.avgMs)??0)} over ${R(y.count)??0} runs (budget ${Ue(m)})`,...z(y.lastSql)?{code:z(y.lastSql)}:{},count:R(y.count),...(()=>{let N=`sql:${z(y.project)??"?"}:${j}`,K=a(e.evidence?.find(H=>H===N,"latest",{minMs:m})??e.evidence?.find(H=>H===N,"slowest"),n(N));return K?{evidence:K}:{}})(),resource:"db://slow-queries",at:R(y.lastSeenAt)})}for(let y of ce(oe(t["db://analysis"]).runs))for(let D of ce(y.findings)){let A=z(D.kind)??"finding";r.push({id:`db:analysis:${z(y.project)??"?"}:${A}:${z(D.table)??""}`,kind:A==="missing-index"?"missing-index":"slow-query",severity:D.severity==="error"?"high":D.severity==="info"?"low":"medium",title:`${A.replace(/-/g," ")} on ${z(D.table)??"a table"}`,where:`${z(y.project)??"?"} \xB7 ${z(D.table)??""}`,...z(D.detail)?{detail:z(D.detail)}:{},resource:"db://analysis",at:R(y.runAt)})}let f=new Map;for(let y of ce(oe(t["memory://leaks/suspected"]).suspected)){let D=z(y.ownerId)??"?",A=f.get(D);(!A||(R(y.at)??0)>=(R(A.at)??0))&&f.set(D,y)}for(let y of f.values()){let D=z(y.ownerId)??"?",A=oe(y.detail),j=z(y.flowId),N=a(j?e.evidence?.find(K=>K===`mem:${D}`,"latest",{inFlow:j}):void 0,j);r.push({id:`memory:leak:${xm(D)}`,kind:"leak",severity:"high",title:`Suspected leak: ${xm(D)}`,where:D,detail:`grew by ${R(A.growth)??"?"} (${R(A.startCount)??"?"} \u2192 ${R(A.endCount)??"?"}) during one flow and did not shrink`,...N?{evidence:N}:{},resource:"memory://leaks/suspected",at:R(y.at)})}let h=new Map;for(let y of ce(oe(t["runtime://errors"]).entries)){let D=z(y.fingerprint)??z(y.title)??"?",A=h.get(D),j=!A||(R(y.timestamp)??0)>(R(A.e.timestamp)??0),N=j?z(y.stack)??A?.stack:A?.stack??z(y.stack);h.set(D,{e:j?y:A.e,n:(A?.n??0)+1,...N?{stack:N}:{}})}let g=new Set;for(let[y,{e:D,n:A,stack:j}]of h){let N=z(D.id),K=z(D.requestId);K&&g.add(K),r.push({id:`runtime:server:${y}`,kind:"server-error",severity:"high",title:z(D.title)??"Server error",where:[z(D.source),z(D.route)].filter(Boolean).join(" \xB7 ")||void 0,...z(D.message)?{detail:z(D.message)}:{},...j?{code:Cm(j)}:{},count:A,evidence:i(N?[N]:[]),resource:"runtime://errors",at:R(D.timestamp)})}let b=new Map;for(let y of ce(oe(t["runtime://browser/errors"]).entries)){let D=z(y.fingerprint)??z(y.title)??z(y.message)??"?",A=b.get(D);b.set(D,{e:A&&(R(A.e.timestamp)??0)>(R(y.timestamp)??0)?A.e:y,n:(A?.n??0)+1})}for(let[y,{e:D,n:A}]of b){let j=z(D.id);r.push({id:`runtime:browser:${y}`,kind:"browser-error",severity:"high",title:z(D.title)??z(D.message)??"Browser error",...z(D.url)?{where:z(D.url)}:{},...z(D.message)&&z(D.message)!==z(D.title)?{detail:z(D.message)}:{},...z(D.stack)?{code:Cm(z(D.stack))}:{},count:A,evidence:i(j?[j]:[]),resource:"runtime://browser/errors",at:R(D.timestamp)})}let x=new Map;for(let y of ce(oe(t["trace://failed"]).spans)){let D=z(y.name)??"?";if(D.startsWith("nest.request ")||z(y.requestId)&&g.has(z(y.requestId)))continue;let A=x.get(D);x.set(D,{s:A&&(R(A.s.startTime)??0)>(R(y.startTime)??0)?A.s:y,n:(A?.n??0)+1})}for(let[y,{s:D,n:A}]of x){let j=z(D.id);r.push({id:`trace:failed:${y}`,kind:"failed-span",severity:"medium",title:`${y} failed`,where:y,count:A,evidence:i(j?[j]:[])??(z(D.flowId)?{flowId:z(D.flowId)}:void 0),resource:"trace://failed",at:R(D.startTime)})}for(let y of ce(oe(t["net://egress/hosts"]).hosts)){let D=z(y.host)??"?",A=z(y.project)??"?",j=ce(y.endpoints).find(N=>(R(N.errorCount)??0)+(R(N.status5xx)??0)>0);y.failing===!0?r.push({id:`net:failing:${A}:${D}`,kind:"egress-failing",severity:"high",title:`Calls to ${D} are failing`,where:`${A} \u2192 ${D}`,detail:z(y.detail)??`${R(y.errorCount)??0} errors, ${R(y.status5xx)??0}\xD7 5xx`,...j?{code:`${z(j.method)??"GET"} ${D}${z(j.path)??""}${z(j.lastError)?`
|
|
88
|
+
${z(j.lastError)}`:R(j.lastStatus)?` \u2192 ${R(j.lastStatus)}`:""}`}:{},count:R(y.count),...(()=>{let N=`egress:${A}:${D}`,K=a(e.evidence?.find(H=>H===N,"failing")??e.evidence?.find(H=>H===N,"latest"),n(N));return K?{evidence:K}:{}})(),resource:"net://egress/hosts",at:R(y.lastSeenAt)}):y.slow===!0&&r.push({id:`net:slow:${A}:${D}`,kind:"egress-slow",severity:"medium",title:`${D} is slow`,where:`${A} \u2192 ${D}`,detail:`p95 ${Ue(R(y.p95Ms)??0)} \xB7 max ${Ue(R(y.maxMs)??0)} over ${R(y.count)??0} calls`,count:R(y.count),...(()=>{let N=`egress:${A}:${D}`,K=a(e.evidence?.find(H=>H===N,"slowest"),n(N));return K?{evidence:K}:{}})(),resource:"net://egress/hosts",at:R(y.lastSeenAt)})}for(let y of ce(oe(t["build://failures"]).failures)){let D=z(y.file);r.push({id:`build:${z(y.fingerprint)??z(y.message)??D??"?"}`,kind:"build",severity:"high",title:`Build error${z(y.project)?` in ${z(y.project)}`:""}`,...D?{where:D}:{},...z(y.message)?{detail:z(y.message)}:{},resource:"build://failures",at:R(y.timestamp)})}let $=ce(oe(t["typecheck://errors"]).errors),w=new Map;for(let y of $){let D=z(y.project)??"workspace";w.set(D,[...w.get(D)??[],y])}for(let[y,D]of w){let A=D[0];r.push({id:`typecheck:${y}`,kind:"typecheck",severity:"high",title:`${D.length} type error${D.length===1?"":"s"} in ${y}`,where:[z(A.file),R(A.line)].filter(j=>j!==void 0).join(":")||void 0,detail:`${z(A.code)?z(A.code)+": ":""}${z(A.message)??""}`,count:D.length,resource:"typecheck://errors",at:Math.max(...D.map(j=>R(j.timestamp)??0))})}let k=oe(t["process://cluster"]),C=ce(k.errors);for(let y of ce(k.services)){let D=z(y.state),A=z(y.project)??"?";if(D!=="crash-looping"&&D!=="wedged"&&y.buildFailed!==!0)continue;let j=C.filter(H=>H.project===A&&H.fault!=="types"),N=j.map(H=>z(H.line)).filter(Boolean),K=wm(A,D,j);r.push({id:`service:${A}:${D}`,kind:"service",severity:"high",title:K.title,where:K.serving?`${A} \u2014 still serving its last good build`:A,...z(y.lastTitle)?{detail:z(y.lastTitle)}:{},...N.length?{code:N.slice(-6).join(`
|
|
89
|
+
`)}:{},count:R(y.restarts),resource:"process://cluster",at:R(y.lastSeenAt)})}for(let y of ce(oe(t["perf://rules"]).findings)){let D=z(y.rule)??"perf",A=z(y.project)??"?",j=z(y.subject)??"?",N=(Array.isArray(y.fix)?y.fix:[]).filter(ye=>typeof ye=="string"),K=oe(y.cost),H=oe(y.evidence);r.push({id:`perf-rule:${D}:${A}:${j}`,kind:"perf-rule",severity:y.severity==="error"?"high":"medium",title:z(y.title)??D,where:`${D} \xB7 ${A}${j!==A?` \xB7 ${j}`:""}`,...z(y.summary)?{detail:z(y.summary)}:{},...N.length?{fix:N.map((ye,Ze)=>`${Ze+1}. ${ye}`).join(`
|
|
90
|
+
`)}:{},...z(y.verify)?{verify:z(y.verify)}:{},...z(y.docs)?{docs:z(y.docs)}:{},code:Nb(K,H),...R(K.modules)!==void 0?{count:R(K.modules)}:{},resource:"perf://rules",at:R(y.lastSeenAt)})}let M=new Map;for(let y of r){let D=M.get(y.id);(!D||(y.at??0)>=(D.at??0))&&M.set(y.id,y)}return[...M.values()]}s(kb,"qP"),o(kb,"collectProblems");function Ab(e){let t=oe(e["process://cluster"]),r=ce(t.errors);return ce(t.services).filter(i=>i.buildFailed===!0).map(i=>z(i.project)??"?").filter(i=>{let u=r.filter(n=>n.project===i&&n.fault!=="types");return!(u.length>0&&u.every(n=>n.fault==="process"))})}s(Ab,"VP"),o(Ab,"podBuildFailures");function Ib(e,t=Date.now()){let r=[],i=o((n,a,l,d,c)=>{let p=oe(e[n]);if(!e[n])return;let m,f=z(p.detail)??"",h=d(p),g=h?void 0:c?.(p);p.producer==="none"?(m="unchecked",f=f||"nothing is reporting this yet \u2014 not a pass"):h?(m="fail",f=h):g?(m="warn",f=g):p.stale===!0?m="stale":m="pass",r.push({id:a,label:l,status:m,detail:km(f),resource:n})},"health");i("build://current","build","Build",n=>{let a=ce(n.failures),l=a.filter(d=>d.domain!=="typecheck"&&d.domain!=="lint").length;return l>0||a.length===0&&n.status==="failing"?`${l||"some"} build failure${l===1?"":"s"}`:void 0});let u=Ab(e);if(u.length){let n=r.find(d=>d.id==="build"),a=n?.status==="fail"?`${n.detail}; `:"",l=km(`${a}${u.length} service build${u.length===1?"":"s"} failing (${u.join(", ")})`);n?Object.assign(n,{status:"fail",detail:l,resource:n.status==="fail"?n.resource:"process://cluster"}):r.unshift({id:"build",label:"Build",status:"fail",detail:l,resource:"process://cluster"})}return i("typecheck://current","typecheck","Typecheck",n=>{let a=R(n.errorCount)??0;return a>0?`${a} type error${a===1?"":"s"}`:void 0}),i("lint://current","lint","Lint",n=>{let a=R(n.errorCount)??0;return a>0?`${a} lint error${a===1?"":"s"}`:void 0}),i("runtime://browser/errors","browser","Browser capture",n=>{let a=R(n.count)??0;return a>0?`${a} browser error${a===1?"":"s"}`:void 0}),i("visual://violations/current","visual","Visual rules",n=>{let a=ce(n.violations).length;return a>0?`${a} visual violation${a===1?"":"s"}`:void 0}),i("db://analysis","db-analysis","DB analysis",n=>{let a=R(n.errorCount),l=a??R(n.findingCount)??0;if(l!==0)return a===void 0?`${l} finding${l===1?"":"s"}`:`${l} error-level finding${l===1?"":"s"}`},n=>{let a=R(n.warningCount)??0,l=[];if(a>0&&l.push(`${a} warning${a===1?"":"s"}`),n.incomplete===!0){let d=R(n.droppedFindings)??0;l.push(d>0?`incomplete \u2014 ${d} findings never reached the lens`:"incomplete \u2014 part of the run never reached the lens")}return l.length>0?l.join("; "):void 0}),r}s(Ib,"GP"),o(Ib,"collectChecks");function _b(e){let t=oe(oe(e["memory://current"]).current),r=new Set(ce(oe(e["memory://leaks/suspected"]).suspected).map(u=>z(u.ownerId))),i=ce(oe(e["memory://owners/growing"]).owners).map(u=>({ownerId:z(u.ownerId)??"?",itemCount:R(u.itemCount)??0,growth:R(u.growthSinceStart)??0,mutations:R(u.mutations)??0,...R(u.lastMutatedAt)!==void 0?{lastMutatedAt:R(u.lastMutatedAt)}:{},suspected:r.has(z(u.ownerId)),flowIds:(Array.isArray(u.flowIds)?u.flowIds:[]).filter(n=>typeof n=="string").slice(-5)})).filter(u=>!/^Lensmcp/i.test(u.ownerId)).sort((u,n)=>Number(n.suspected)-Number(u.suspected)||n.growth-u.growth).slice(0,8);return{...R(t.heapUsed)!==void 0?{heapUsed:R(t.heapUsed)}:{},...R(t.rss)!==void 0?{rss:R(t.rss)}:{},owners:i}}s(_b,"JP"),o(_b,"collectMemory");function Sb(e){return{hot:ce(oe(e["react://components/hot"]).components).map(t=>({component:z(t.componentName)??Bm(z(t.componentLogicalId)??"?"),renders:R(t.renderCount)??0,totalMs:Math.round((R(t.totalActualMs)??0)*10)/10})).sort((t,r)=>r.renders-t.renders).slice(0,8)}}s(Sb,"WP"),o(Sb,"collectReact");var PI=class{static{s(this,"fc")}static{o(this,"ProblemLedger")}constructor(e=10*6e4){this.keepResolvedMs=e,this.known=new Map}update(e,t=Date.now()){let r=new Set;for(let i of e){if(r.has(i.id))continue;r.add(i.id);let{at:u,...n}=i,a=this.known.get(i.id),l=u??a?.lastSeenAt??t,d={...n,firstSeenAt:a?.firstSeenAt??Math.min(l,t),lastSeenAt:l};this.known.set(i.id,{firstSeenAt:d.firstSeenAt,lastSeenAt:l,problem:d})}for(let[i,u]of this.known)r.has(i)||(u.resolvedAt===void 0?u.resolvedAt=t:t-u.resolvedAt>this.keepResolvedMs&&this.known.delete(i));return[...this.known.values()].map(i=>i.resolvedAt!==void 0?{...i.problem,resolvedAt:i.resolvedAt}:i.problem).sort(jb)}},Fb={high:0,medium:1,low:2};function jb(e,t){let r=e.resolvedAt!==void 0?1:0,i=t.resolvedAt!==void 0?1:0;return r-i||Fb[e.severity]-Fb[t.severity]||t.lastSeenAt-e.lastSeenAt}s(jb,"KP"),o(jb,"problemOrder");function zb(e,t){let r=e.now??Date.now();return{at:r,problems:t.update(kb(e),r),checks:Ib(e.resources,r),memory:_b(e.resources),react:Sb(e.resources)}}s(zb,"oS"),o(zb,"buildDiagnostics");function Nb(e,t){let r=[],i=[R(e.modules)!==void 0?`${R(e.modules)} modules`:void 0,R(e.bytes)!==void 0?`${(R(e.bytes)/1048576).toFixed(1)} MB`:void 0,R(e.compileMs)!==void 0?`~${Ue(R(e.compileMs))} compile`:void 0,R(e.memoryMb)!==void 0?`~${R(e.memoryMb)} MB memory`:void 0].filter(Boolean);i.length&&r.push(`cost: ${i.join(" \xB7 ")}${z(e.basis)?` (${z(e.basis)})`:""}`);for(let[u,n]of Object.entries(t)){if(n==null||Array.isArray(n)&&n.length===0)continue;let a=typeof n=="object"?JSON.stringify(n):String(n);if(r.push(`${u}: ${a.length>400?`${a.slice(0,399)}\u2026`:a}`),r.length>=24)break}return r.join(`
|
|
91
|
+
`)}s(Nb,"XP"),o(Nb,"perfRuleEvidence");function Mb(e,t){return e==="n-plus-one"?`the same query ran ${R(t.count)??"?"}\xD7 in one request (threshold ${R(t.threshold)??"?"}) \u2014 one round-trip per row`:e==="db-in-loop"?`${R(t.dbCallsInsideLoop)??"?"} database calls inside one loop of ${R(t.iterations)??"?"} iterations${R(t.durationMs)!==void 0?` (${Ue(R(t.durationMs))})`:""}`:e==="render-storm"?`rendered ${R(t.count)??"?"}\xD7 within ${R(t.windowMs)??"?"}ms (threshold ${R(t.threshold)??"?"})`:e==="slow-path"?z(t.summary)??"the longest causal chain in the flow":z(t.summary)??""}s(Mb,"HP"),o(Mb,"patternDetail");function Bm(e){let t=e.split(":").pop()??e;return t.split("#")[0]||t}s(Bm,"iS"),o(Bm,"componentName");function xm(e){let[t,r]=e.split("::"),i=(t??e).split("#")[0];return r?`${i}.${r}`:i??e}s(xm,"tS"),o(xm,"ownerName");function Cm(e){return e.split(`
|
|
87
92
|
`).filter(t=>!/node_modules|node:internal|node:async_hooks/.test(t)).slice(0,5).join(`
|
|
88
|
-
`)}s(
|
|
93
|
+
`)}s(Cm,"rS"),o(Cm,"firstFrames");function Ue(e){return e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}s`:`${Math.round(e)}ms`}s(Ue,"ot"),o(Ue,"fmtMs");function km(e,t=160){return e.length>t?e.slice(0,t-1)+"\u2026":e}s(km,"nS"),o(km,"shorten");function ra(e,t){return`event: ${e.type}
|
|
89
94
|
${t!==void 0?`id: ${t}
|
|
90
95
|
`:""}data: ${JSON.stringify(e.data)}
|
|
91
96
|
|
|
92
|
-
`}s(
|
|
97
|
+
`}s(ra,"Ob"),o(ra,"sseFrame");var UI=class{static{s(this,"mc")}static{o(this,"StreamHub")}constructor(e=15e3){this.clients=new Set,this.latest=new Map,this.latestJson=new Map,this.frameId=0,this.currentLogSeq=0,this.pinger=setInterval(()=>this.writeAll(`:ping
|
|
93
98
|
|
|
94
99
|
`),e),this.pinger.unref()}get size(){return this.clients.size}attach(e,t){e.writeHead(200,{"content-type":"text/event-stream; charset=utf-8","cache-control":"no-store",connection:"keep-alive","x-accel-buffering":"no"}),e.write(`retry: 3000
|
|
95
100
|
|
|
96
|
-
`);let r={res:e,logsDropped:!1};for(let i of t)e.write(
|
|
101
|
+
`);let r={res:e,logsDropped:!1};for(let i of t)e.write(ra(i,++this.frameId));for(let[i,u]of this.latest)i!=="logs"&&i!=="logs-resync"&&e.write(u);this.clients.add(r),e.on("drain",()=>{r.logsDropped&&(r.logsDropped=!1,this.safeWrite(r,ra({type:"logs-resync",data:{seq:this.currentLogSeq}},++this.frameId)))}),e.on("close",()=>this.clients.delete(r))}publish(e){let t=JSON.stringify(e.data);if(this.latestJson.get(e.type)===t)return!1;this.latestJson.set(e.type,t);let r=`event: ${e.type}
|
|
97
102
|
id: ${++this.frameId}
|
|
98
103
|
data: ${t}
|
|
99
104
|
|
|
100
|
-
`;return this.latest.set(e.type,r),this.writeAll(r),!0}publishLogs(e){if(this.currentLogSeq=e.data.seq,this.clients.size===0)return;let t=
|
|
105
|
+
`;return this.latest.set(e.type,r),this.writeAll(r),!0}publishLogs(e){if(this.currentLogSeq=e.data.seq,this.clients.size===0)return;let t=ra(e,++this.frameId);for(let r of this.clients)if(!r.logsDropped){if(r.res.writableNeedDrain){r.logsDropped=!0;continue}this.safeWrite(r,t)}}latestData(e){let t=this.latestJson.get(e);return t===void 0?void 0:JSON.parse(t)}close(){clearInterval(this.pinger);for(let e of this.clients)try{e.res.end()}catch{}this.clients.clear()}writeAll(e){for(let t of this.clients)this.safeWrite(t,e)}safeWrite(e,t){try{e.res.write(t)}catch{this.clients.delete(e)}}};function Ct(e,t){let r,i=0,u=!1,n=!1,a=o(async()=>{if(r=void 0,u){n=!0;return}u=!0,i=Date.now();try{await e()}catch(d){console.error("[lensmcp] dashboard: stream producer failed (contained):",d)}finally{u=!1,n&&(n=!1,l())}},"fire"),l=o(()=>{if(r)return;let d=Math.max(0,t-(Date.now()-i));r=setTimeout(()=>{a()},d),r.unref()},"kick");return{kick:l}}s(Ct,"Jt"),o(Ct,"coalesce");function Ob(e,t){if(e!=="POST")return{ok:!1,status:405,error:"this endpoint changes state \u2014 POST only"};if((String(t["content-type"]??"").split(";")[0]??"").trim().toLowerCase()!=="application/json")return{ok:!1,status:415,error:"send the body as application/json"};let r=t["sec-fetch-site"];return r!==void 0&&r!=="same-origin"?{ok:!1,status:403,error:"cross-site requests may not change dashboard state"}:{ok:!0}}s(Ob,"aS"),o(Ob,"mutationVerdict");var Mu=class extends Error{static{s(this,"wt")}static{o(this,"RequestRefused")}constructor(e,t){super(t),this.status=e}},qI=256*1024,Rb=500,ZI=2048;function Tb(e,t=qI){return new Promise((r,i)=>{let u=[],n=0;e.on("data",a=>{if(n+=a.length,n>t){i(new Mu(413,`body over ${t} bytes`)),e.destroy();return}u.push(a)}),e.on("end",()=>r(Buffer.concat(u).toString("utf8"))),e.on("error",i)})}s(Tb,"cS"),o(Tb,"readBody");function Pb(e){let t;try{t=JSON.parse(e)}catch{throw new Mu(400,"the body is not JSON")}let r=t?.ids;if(!Array.isArray(r)||r.length===0)throw new Mu(400,'expected { "ids": [<error id>, \u2026] }');if(r.length>Rb)throw new Mu(400,`at most ${Rb} ids in one request`);if(!r.every(i=>typeof i=="string"&&i.length>0&&i.length<=ZI))throw new Mu(400,"every id is a non-empty string");return r}s(Pb,"uS"),o(Pb,"parseErrorIds");function Ub(e){let t=JSON.stringify(e.base),r=encodeURIComponent(e.assetVersion),i=`${Lb(e.base)}/assets/dashboard-ui`,u=e.assetsReady?"":'<div class="lm-missing"><strong>The dashboard UI is not built.</strong><br>Run <code>yarn nx run @lensmcp/lensmcp-mcp:bundle</code> and reload. The data endpoints under <code>/api</code> are live.</div>';return`<!doctype html>
|
|
101
106
|
<html lang="en">
|
|
102
107
|
<head>
|
|
103
108
|
<meta charset="utf-8">
|
|
104
109
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
105
110
|
<meta name="color-scheme" content="dark light">
|
|
106
|
-
<title>${
|
|
107
|
-
<link rel="icon" href="data:image/svg+xml,${encodeURIComponent(
|
|
111
|
+
<title>${gi(e.title)}</title>
|
|
112
|
+
<link rel="icon" href="data:image/svg+xml,${encodeURIComponent(Zb)}">
|
|
108
113
|
<script>
|
|
109
114
|
window.__LENS_BASE__=${t};
|
|
110
|
-
window.__LENS_TOKEN_PARAM__=${JSON.stringify(
|
|
115
|
+
window.__LENS_TOKEN_PARAM__=${JSON.stringify(Ys)};
|
|
111
116
|
(function(){try{var t=localStorage.getItem('lensmcp.theme');if(t==='whiteprint'||t==='blueprint')document.documentElement.dataset.theme=t;}catch(e){}})();
|
|
112
117
|
</script>
|
|
113
118
|
<style>
|
|
@@ -124,10 +129,39 @@ ${e.assetsReady?`<link rel="stylesheet" href="${i}/app.css?v=${r}">
|
|
|
124
129
|
<div id="root">${u}</div>
|
|
125
130
|
<noscript><div class="lm-missing">The LensMCP dashboard needs JavaScript.</div></noscript>
|
|
126
131
|
</body>
|
|
127
|
-
</html>`}s(
|
|
128
|
-
|
|
132
|
+
</html>`}s(Ub,"lS"),o(Ub,"renderShell");function qb(e){let t=gi(e.wsKey),r=e.reason==="expired"?"That sign-in link has expired or was already used. Links work once, for ten minutes.":"This dashboard shows your workspace\u2019s telemetry, so it asks for proof you are its owner.";return`<!doctype html>
|
|
133
|
+
<html lang="en">
|
|
134
|
+
<head>
|
|
135
|
+
<meta charset="utf-8">
|
|
136
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
137
|
+
<meta name="color-scheme" content="dark light">
|
|
138
|
+
<meta name="referrer" content="no-referrer">
|
|
139
|
+
<title>${gi(e.title)} \xB7 sign in</title>
|
|
140
|
+
<link rel="icon" href="data:image/svg+xml,${encodeURIComponent(Zb)}">
|
|
141
|
+
<style>
|
|
142
|
+
html,body{margin:0;background:#0a1826;color:#dce9f6}
|
|
143
|
+
@media (prefers-color-scheme: light){html,body{background:#e6ecf2;color:#0f2a40}}
|
|
144
|
+
.lm-missing{font:14px/1.6 ui-monospace,Menlo,monospace;max-width:600px;margin:15vh auto;padding:24px;border:1px solid rgba(146,183,220,.3)}
|
|
145
|
+
.lm-missing code{color:#79dcff}
|
|
146
|
+
@media (prefers-color-scheme: light){.lm-missing code{color:#0b5f86}}
|
|
147
|
+
.lm-missing li{margin:.3em 0}
|
|
148
|
+
</style>
|
|
149
|
+
</head>
|
|
150
|
+
<body>
|
|
151
|
+
<div class="lm-missing" data-lensmcp-locked="${e.reason}">
|
|
152
|
+
<strong>Sign in to the ${t} dashboard.</strong><br>${r}
|
|
153
|
+
<ul>
|
|
154
|
+
<li>Run <code>lensmcp gateway status</code> in the ${t} workspace and open its <em>sign in</em> link,</li>
|
|
155
|
+
<li>or use <em>Open the Lens Dashboard</em> in the IDE,</li>
|
|
156
|
+
<li>or, for a standalone dashboard, the link <code>lensmcp dashboard</code> prints when it starts.</li>
|
|
157
|
+
</ul>
|
|
158
|
+
After that this browser stays signed in for 30 days.
|
|
159
|
+
</div>
|
|
160
|
+
</body>
|
|
161
|
+
</html>`}s(qb,"dS"),o(qb,"renderLockedPage");var Zb='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect x="3" y="3" width="26" height="26" fill="#0a1826" stroke="#79dcff" stroke-width="2"/><path d="M16 3v26M3 16h26" stroke="#79dcff" stroke-opacity=".5"/><circle cx="16" cy="16" r="4" fill="#79dcff"/></svg>';function gi(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}s(gi,"hc"),o(gi,"escapeHtml");function Lb(e){return gi(e)}s(Lb,"eD"),o(Lb,"escapeAttr"),process.env.LENSMCP_EVENT_FILE??=`${process.cwd()}/.lensmcp/events.jsonl`,tb("dashboard");var{session:Be,flows:Vb}=PE(),LI=Date.now(),kt=process.cwd(),vi=Number(process.env.LENSMCP_DASHBOARD_PORT??4321),et=(process.env.LENSMCP_DASHBOARD_BASE??"").replace(/\/+$/,""),Ou=process.env.LENSMCP_WS_KEY||et.replace(/^\//,"")||l5(kt),Jb=process.env.LENSMCP_WS_KEY??"",Am=(()=>{try{let e=JSON.parse(Lm(`${kt}/.lensmcp/config.json`,"utf8")).key;return typeof e=="string"&&/^[\w.-]+$/.test(e)?e:""}catch{return""}})();function Wb(e){let t=process.env.TMPDIR??"/tmp";if(Jb)return`${t}/${Jb}/${e}-devserver`;let r=`${t}/${e}-devserver`;return Am&&!Zm(r)&&Zm(`${t}/${Am}/${e}-devserver`)?`${t}/${Am}/${e}-devserver`:r}s(Wb,"sD"),o(Wb,"podSockDir");var At=process.env.LENSMCP_DASHBOARD_BIND??"127.0.0.1",at=At==="127.0.0.1"||At==="::1"||At==="localhost",Ru=GE(process.env,kt),ot=Ru.token,Gb=KE(Ou),VI=new EI,qe=new UI,_e=new _I(5e3),ia=new SI,Tu=new FI(void 0,Vb),JI=new PI,yi=new TI,Yt=new AI({root:kt,podSockDir:Wb,onChange:o(()=>{_m.kick(),e5.kick()},"onChange")});async function Ei(e){try{return await Be.resources.read(e)}catch{return}}s(Ei,"vc"),o(Ei,"readResource");async function na(e){let t={};return await Promise.all(e.map(async r=>{let i=await Ei(r);i!==void 0&&(t[r]=i)})),t}s(na,"Pb"),o(na,"readResources");var WI=new db,Kb=new db,Qt=[];function Hb(e){WI.firstTime(e.id)&&(Qt.push(_e.append(e)),Qt.length>2e3&&Qt.splice(0,Qt.length-2e3),ia.observe(e),Tu.observe(e),ym(e)&&GI.kick(),yi.observe(e)&&wi.kick(),Kb.firstTime(e.id)&&Yt.reduce(e))}s(Hb,"lD"),o(Hb,"onBusEvent");function Xb(){try{let e=process.env.LENSMCP_EVENT_FILE??`${kt}/.lensmcp/events.jsonl`;for(let t of ub(e,8*1024*1024,25e3))try{let r=JSON.parse(t);if(!r||r.source!=="gateway"&&!ib.has(r.source))continue;Kb.firstTime(r.id)&&Yt.reduce(r)}catch{}}catch{}}s(Xb,"dD"),o(Xb,"replayClusterTail");var Im,bi=[],_m=Ct(async()=>{let e=await Ei("process://cluster");Im=Yt.view({processCluster:e,kpis:ia}),qe.publish({type:"cluster",data:Im}),Di.kick()},250),Sm=Ct(()=>{bi=Tu.summaries(Qe()),qe.publish({type:"flows",data:{flows:bi}})&&Di.kick()},300),GI=Ct(()=>{let e=Tu.drainRevs();e.length&&qe.publish({type:"flow-rev",data:e}),Sm.kick()},300),Fm=Ct(async()=>{let e=await na(Cb),t=zb({resources:e,flows:bi,flowOfEvent:o(r=>Tu.flowOfEvent(r),"flowOfEvent"),evidence:Tu.evidence(Qe())},JI);qe.publish({type:"diagnostics",data:t})},1e3),jm=["build://failures","typecheck://errors","lint://errors","process://cluster"],wi=Ct(async()=>{let e=Dm(await na(jm));qe.publish({type:"errors",data:yi.snapshot(e)})},500),Di=Ct(async()=>{qe.publish({type:"session",data:await Qb()})},500),Yb=o(()=>{qe.publish({type:"kpis",data:ia.snapshot()})},"kpiPush");setInterval(()=>{if(Qt.length===0)return;let e=Qt.splice(0,Qt.length);qe.publishLogs({type:"logs",data:{seq:_e.seq,sources:_e.sources(),lines:e.slice(-500)}})},250).unref(),setInterval(Yb,2e3).unref(),setInterval(()=>_m.kick(),3e3).unref(),setInterval(()=>Fm.kick(),1e4).unref(),setInterval(()=>{yi.flush()&&wi.kick()},500).unref(),setInterval(()=>wi.kick(),15e3).unref(),setInterval(()=>Di.kick(),5e3).unref(),Be.bus.subscribe(Hb),Xb(),Be.resources.subscribe("flow://recent",()=>Sm.kick());for(let e of Cb)Be.resources.subscribe(e,()=>Fm.kick());Be.resources.subscribe("agent://current-status",()=>Di.kick());for(let e of jm)Be.resources.subscribe(e,()=>wi.kick());async function Qb(){let e=await Ei("agent://current-status")??{},t=Im??Yt.view({kpis:ia}),r=[],i=t.hosts.filter(l=>!l.v4||!l.v6);i.length&&r.push({id:"hosts",title:`${i.length} host${i.length===1?" does":"s do"} not resolve to this machine`,detail:`${i.map(l=>l.host).join(", ")} \u2014 requests to ${i.length===1?"it":"them"} fail until /etc/hosts maps ${i.length===1?"it":"them"} to 127.0.0.1 and ::1.`,...t.hostsFix?{fix:t.hostsFix}:{}}),t.gateway.state==="down"&&r.push({id:"gateway",title:"The dev gateway is not running",detail:t.gateway.evidence,fix:"lensmcp gateway start"});let u=[...e.blocking??[],...e.warnings??[]].map(l=>(l.title??"").split(" \u2014 ")[0].trim()).filter(Boolean),n=e.status??"starting",a=u.length?u.slice(0,3).join(" \xB7 ")+(u.length>3?` \xB7 +${u.length-3} more`:""):n==="clean"?"Nothing is failing":"Waiting for the first signals";return{phase:r.length?"setup-incomplete":bi.length===0?"empty":"live",gateway:t.gateway,status:n,headline:a,flowCount:bi.length,eventCount:_e.seq,setupIssues:r}}s(Qb,"fD"),o(Qb,"sessionView");var Pu=new Set,e5=Ct(()=>{if(Pu.size===0)return;let e=`event: update
|
|
162
|
+
data: `+JSON.stringify(Yt.legacyView())+`
|
|
129
163
|
|
|
130
|
-
`;for(let t of
|
|
131
|
-
data: `+JSON.stringify(
|
|
164
|
+
`;for(let t of Pu)try{t.write(e)}catch{Pu.delete(t)}},80);setInterval(()=>{Pu.size>0&&e5.kick()},3e3).unref();function t5(e,t=!1,r){return wb(Qe(),e,{includeRaw:t,rev:Tu.rev(e),config:Vb,...r!==void 0?{segmentId:r}:{}})}s(t5,"mD"),o(t5,"flowDetail");async function u5(){let e=Be.resources.list().sort(),t={};return await Promise.all(e.map(async r=>{try{t[r]=await Be.resources.read(r)}catch(i){t[r]={__error:i instanceof Error?i.message:String(i)}}})),{at:Date.now(),count:e.length,resources:t}}s(u5,"hD"),o(u5,"snapshot");var r5=["./dashboard-ui/","../../../libs/cli/bundled/dashboard-ui/"].map(e=>new URL(e,import.meta.url)),KI=/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)*$/,HI={js:"application/javascript; charset=utf-8",css:"text/css; charset=utf-8",woff2:"font/woff2",woff:"font/woff",svg:"image/svg+xml",png:"image/png",json:"application/json",map:"application/json"};function i5(e){if(!(!KI.test(e)||e.split("/").some(t=>t===".."||t===".")))for(let t of r5)try{let r=new URL(e,t),i=Vm(r);if(!i.isFile())continue;return{body:Lm(r),mtimeMs:i.mtimeMs}}catch{}}s(i5,"yD"),o(i5,"findAsset");function zm(){for(let e of r5)try{return String(Math.round(Vm(new URL("app.js",e)).mtimeMs))}catch{}}s(zm,"kS"),o(zm,"uiAssetVersion"),zm()||console.warn("[lensmcp] dashboard: the UI bundle (dashboard-ui/app.js) was not found beside the dashboard or in libs/cli/bundled/ \u2014 the page will ask for a rebuild. Build it: yarn nx run @lensmcp/lensmcp-mcp:bundle");function ge(e,t,r){e.writeHead(t,{"content-type":"application/json","cache-control":"no-store"}),e.end(JSON.stringify(r))}s(ge,"ye"),o(ge,"json");function Nm(e,t){e.writeHead(401,{"content-type":"text/html; charset=utf-8","cache-control":"no-store","referrer-policy":"no-referrer"}),e.end(qb({title:`LensMCP \xB7 ${Ou}`,wsKey:Ou,reason:t}))}s(Nm,"gS"),o(Nm,"locked");var Mm=o5((e,t)=>{let r;try{r=new URL(e.url??"/","http://localhost")}catch{t.writeHead(400,{"content-type":"text/plain"}),t.end("bad request target");return}let i=ZE(at,e.headers.host);if(!i.ok){ge(t,i.status,{error:i.error});return}let u=r.pathname;if(et){if(u===et){t.writeHead(302,{location:et+"/"+r.search}),t.end();return}u.startsWith(et+"/")&&(u=u.slice(et.length))}if(ot){let a=r.searchParams.get(Ys),l=dm(ot,e.headers.authorization,a,{header:e.headers.cookie,name:Gb});if(QE(u)){if(!l){t.writeHead(401,{"content-type":"application/json","www-authenticate":'Bearer realm="lensmcp-dashboard"',"cache-control":"no-store"}),t.end(JSON.stringify({error:`unauthorized \u2014 ${at?"":`this dashboard is bound to ${At}; `}sign in with the link \`lensmcp gateway status\` prints, or send the workspace token as a Bearer`}));return}}else if(!eb(u)){let d=r.searchParams.get(om);if(d!==null||a!==null){let c=d!==null?VI.redeem(ot,d,Date.now())==="ok":dm(ot,void 0,a);if(!c&&!l){Nm(t,"expired");return}r.searchParams.delete(om),r.searchParams.delete(Ys);let p=e.headers["x-forwarded-proto"]==="https";t.writeHead(303,{location:r.pathname+r.search,"cache-control":"no-store","referrer-policy":"no-referrer",...c?{"set-cookie":XE(Gb,cm(ot),et||"/",p)}:{}}),t.end();return}if(!l){Nm(t,"signin");return}}}if(u==="/api/stream"){let a=Number(r.searchParams.get("logsSince")??"0"),l=a>0?_e.since(a,2e3):_e.recent(1500),d=[{type:"hello",data:{protocol:1,sessionId:Be.id,startedAt:LI,rawAllowed:at,workspace:{key:Ou,name:Ou,base:et},logSeq:_e.seq}},{type:"logs",data:{seq:_e.seq,sources:_e.sources(),lines:l}}];qe.attach(t,d);for(let[c,p]of[["cluster",_m],["flows",Sm],["diagnostics",Fm],["session",Di],["errors",wi]])qe.latestData(c)===void 0&&p.kick();qe.latestData("kpis")===void 0&&Yb();return}if(u==="/api/cluster/stream"){t.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-store",connection:"keep-alive"}),t.write(`event: snapshot
|
|
165
|
+
data: `+JSON.stringify(Yt.legacyView())+`
|
|
132
166
|
|
|
133
|
-
`),
|
|
167
|
+
`),Pu.add(t),e.on("close",()=>Pu.delete(t));return}if(u==="/api/cluster"){ge(t,200,Yt.legacyView());return}if(u==="/api/snapshot"){u5().then(a=>ge(t,200,a)).catch(a=>ge(t,500,{error:a instanceof Error?a.message:String(a)}));return}if(u==="/api/resources"){let a=Be.resources.list().sort().map(l=>({uri:l,scheme:l.split("://")[0]??l,revision:Be.resources.revision(l)}));ge(t,200,{resources:a});return}if(u==="/api/resource"){let a=r.searchParams.get("uri")??"";if(!Be.resources.list().includes(a)){ge(t,404,{error:`unknown resource: ${a}`});return}Ei(a).then(l=>ge(t,200,{uri:a,revision:Be.resources.revision(a),value:l}));return}if(u==="/api/flow"){let a=r.searchParams.get("id")??"",l=r.searchParams.get("raw")==="1";if(l&&!at){ge(t,403,{error:"raw AI payloads are served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let d=r.searchParams.get("segment");ge(t,200,t5(a,l,d!==null&&d.length>0&&d.length<=512?d:void 0));return}if(u==="/api/ai-call"){if(!at){ge(t,403,{error:"AI call content is served only on a loopback-bound dashboard; unset LENSMCP_DASHBOARD_BIND"});return}let a=r.searchParams.get("id")??"";if(!gs(a)){ge(t,400,{error:"invalid ai call id"});return}let l=hc(process.env.LENSMCP_EVENT_FILE??`${kt}/.lensmcp/events.jsonl`,a);if(!l){ge(t,404,{error:"no captured content for this call \u2014 not captured (LENSMCP_AI_CAPTURE=content), or rotated away"});return}ge(t,200,l);return}if(u==="/api/logs"){let a=Number(r.searchParams.get("since")??"0"),l=r.searchParams.get("flow")??void 0,d=r.searchParams.get("q")??void 0,c=Number(r.searchParams.get("around")??""),p=Math.min(6e4,Math.max(100,Number(r.searchParams.get("window")??"5000")||5e3)),m=Math.min(5e3,Math.max(1,Number(r.searchParams.get("limit")??"2000")||2e3)),f=l||d||Number.isFinite(c)&&c>0?_e.query({since:a,...l?{flowId:l}:{},...d?{q:d}:{},...Number.isFinite(c)&&c>0?{from:c-p,to:c+p}:{},limit:m}):a>0?_e.since(a,m):_e.recent(m);ge(t,200,{seq:_e.seq,sources:_e.sources(),events:f});return}if(u==="/api/errors/dismiss"||u==="/api/errors/restore"){let a=Ob(e.method,e.headers);if(!a.ok){ge(t,a.status,{error:a.error});return}let l=u==="/api/errors/dismiss";Tb(e).then(async d=>{let c=Pb(d),p=l?yi.dismissalsFor(c,Dm(await na(jm))).map(m=>Pd(m,Be.id)):yi.restorable(c).map(m=>Ud(m,Be.id,Date.now()));os(c6(process.env,kt),p),ge(t,200,{count:p.length})}).catch(d=>{t.headersSent||(d instanceof Mu?ge(t,d.status,{error:d.message}):ge(t,500,{error:`could not write to the event bus: ${d instanceof Error?d.message:String(d)}`}))});return}if(u.startsWith("/api/")){ge(t,404,{error:`no such endpoint: ${u}`});return}if(u.startsWith("/assets/dashboard-ui/")){let a=u.slice(21),l=i5(a);if(!l){t.writeHead(404,{"content-type":"text/plain"}),t.end("asset not bundled");return}let d=a.split(".").pop()??"",c=/^(?:chunks|media)\//.test(a),p=`"${a5("sha1").update(l.body).digest("hex").slice(0,16)}"`;if(!c&&e.headers["if-none-match"]===p){t.writeHead(304,{etag:p}),t.end();return}t.writeHead(200,{"content-type":HI[d]??"application/octet-stream","cache-control":c?"public, max-age=31536000, immutable":"no-cache",...c?{}:{etag:p}}),t.end(l.body);return}let n=zm();t.writeHead(200,{"content-type":"text/html; charset=utf-8","cache-control":"no-store"}),t.end(Ub({base:et,title:`LensMCP \xB7 ${Ou}`,assetsReady:!!n,assetVersion:n??"0"}))});Mm.on("error",e=>{throw e.code==="EADDRINUSE"&&(console.error(`[lensmcp] dashboard: port ${vi} is already in use (an orphaned dashboard from a crashed gateway?) \u2014 exiting.`),process.exit(1)),e}),Mm.listen(vi,At,()=>{let e=Be.resources.list().length;console.error(`[lensmcp] dashboard \u2192 http://${at?"localhost":At}:${vi} (${e} resources registered)`),ot&&at?process.stderr.isTTY?console.error(`[lensmcp] sign in \u2192 http://localhost:${vi}${et}/?${om}=${YE(ot,Date.now())} (one use, 10 min)`):console.error("[lensmcp] dashboard sign-in: `lensmcp gateway status` (or `lensmcp dashboard`) prints a one-time link."):!ot&&at&&console.error(`[lensmcp] WARNING: the dashboard serves workspace telemetry to ANY account on this machine${Ru.source==="unavailable"?` (could not establish a token: ${Ru.reason})`:" (LENSMCP_ALLOW_INSECURE=1)"}.`),at||(console.error(`[lensmcp] WARNING: dashboard bound to ${At} \u2014 reachable beyond this machine.`),console.error(ot?`[lensmcp] its data endpoints require a token (${Ru.source==="env"?"LENSMCP_DASHBOARD_TOKEN":lm(kt)}). Open the page as http://${At}:${vi}/?${Ys}=YOUR_TOKEN`:`[lensmcp] WARNING: it serves workspace telemetry with NO authentication${Ru.source==="unavailable"?` (could not establish a token: ${Ru.reason})`:" (LENSMCP_ALLOW_INSECURE=1)"}. Unset LENSMCP_DASHBOARD_BIND to restore loopback.`))}),process.on("uncaughtException",e=>{console.error("[lensmcp] dashboard: uncaught exception (contained):",e)});function Om(e){qe.close(),Mm.close(),Be.stop().catch(()=>{}).finally(()=>process.exit(e==="SIGINT"?130:0))}s(Om,"SS"),o(Om,"shutdown"),process.on("SIGINT",Om),process.on("SIGTERM",Om);
|