@inkeep/open-knowledge 0.0.0-dev-20260501150416 → 0.0.0-dev-20260501181216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/config-schema.json +25 -0
- package/dist/config.project.schema.json +25 -0
- package/dist/config.user.schema.json +25 -0
- package/dist/constants-BnNhFY0P.mjs +2 -0
- package/dist/{dist-oDoSs1Bl.mjs → dist-BmX1Ns7C.mjs} +2 -2
- package/dist/{dist-B969m3rv.mjs → dist-C5mH5cvM.mjs} +1 -1
- package/dist/{dist-BR3nldpO.mjs → dist-CQ3cd3s_.mjs} +7 -8
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-B3ijkT7_.mjs → init-CAeQdWL6.mjs} +3 -3
- package/dist/init-CCYsXS_y.mjs +1 -0
- package/dist/init-CIM4I1tW.mjs +1 -0
- package/dist/{init-Czgpyj7J.mjs → init-DHwfj3AW.mjs} +2 -2
- package/dist/{loader-Dk5RaTzD.mjs → loader-CC_RQ-w2.mjs} +2 -2
- package/dist/loader-DqreB0_J.mjs +1 -0
- package/dist/paths-1NW3UxwQ.mjs +1 -0
- package/dist/paths-BwrGhrga.mjs +2 -0
- package/dist/{preview-BkLJiEZ1.mjs → preview-B-rYWHOQ.mjs} +2 -2
- package/dist/preview-Sf_RYYpl.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-BASIn1jX.js → ActivityModeContent-Cdl0frU2.js} +1 -1
- package/dist/public/assets/{DocumentContext-CSOslMNT.js → DocumentContext-BRyrYElZ.js} +9 -9
- package/dist/public/assets/{GraphPanel-D2ZevzyI.js → GraphPanel-BH5vs7kB.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-Dx67JoKA.js → McpConsentDialogBody-CI9rAMX9.js} +1 -1
- package/dist/public/assets/{OutlinePanel-D_xYEkm6.js → OutlinePanel-BcdH74Qw.js} +1 -1
- package/dist/public/assets/SettingsPane-rdUN7cCp.js +6 -0
- package/dist/public/assets/{SourceEditor-Bw3inYl7.js → SourceEditor-Df4RyC-2.js} +2 -2
- package/dist/public/assets/{config-validation-events-mqmIrycG.js → config-validation-events-CWaXc07D.js} +1 -1
- package/dist/public/assets/index-DN_1M53F.js +1850 -0
- package/dist/public/assets/{target-navigation-intent-1238Z_HW.js → target-navigation-intent-CIITpiPs.js} +1 -1
- package/dist/public/assets/{toggle-group-C5MXNna8.js → toggle-group-1sl8rMnA.js} +1 -1
- package/dist/public/assets/{tooltip-CzI9zWJi.js → tooltip-CFeKxs4p.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/schemas/v0/config.project.schema.json +25 -0
- package/dist/schemas/v0/config.user.schema.json +25 -0
- package/dist/{server-Cb1yd7Zc.mjs → server-CJdOKLcU.mjs} +2 -2
- package/dist/src-8G0QyHkY.mjs +1 -0
- package/dist/start-BlAW3ifD.mjs +1 -0
- package/dist/{start-_eaR3T65.mjs → start-CrKpyaZC.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-CGiUuTdz.mjs +0 -2
- package/dist/init-0WpsEJer.mjs +0 -1
- package/dist/init-BRl7X3F9.mjs +0 -1
- package/dist/loader-Jnb82Nxh.mjs +0 -1
- package/dist/paths-NLm46qS1.mjs +0 -2
- package/dist/paths-s1VdY11r.mjs +0 -1
- package/dist/preview-DFbaN55s.mjs +0 -1
- package/dist/public/assets/SettingsPane-o4hmcrlw.js +0 -6
- package/dist/public/assets/index-CRwvkGXF.js +0 -1848
- package/dist/src-BtSrIQfg.mjs +0 -1
- package/dist/start-RBQezJG7.mjs +0 -1
- /package/dist/public/assets/{mcp-consent-store-BBTXqzE6.js → mcp-consent-store-B9QLSyUV.js} +0 -0
package/dist/config-schema.json
CHANGED
|
@@ -212,6 +212,31 @@
|
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
214
|
"additionalProperties": {}
|
|
215
|
+
},
|
|
216
|
+
"autoSync": {
|
|
217
|
+
"default": {
|
|
218
|
+
"onboardingResolvedAt": null
|
|
219
|
+
},
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"onboardingResolvedAt": {
|
|
223
|
+
"default": null,
|
|
224
|
+
"anyOf": [
|
|
225
|
+
{
|
|
226
|
+
"type": "string",
|
|
227
|
+
"format": "date-time",
|
|
228
|
+
"pattern": "^(?:(?:\\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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
229
|
+
"scope": "project",
|
|
230
|
+
"agentSettable": false,
|
|
231
|
+
"defaultScope": "project"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "null"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"additionalProperties": {}
|
|
215
240
|
}
|
|
216
241
|
},
|
|
217
242
|
"additionalProperties": {}
|
|
@@ -184,6 +184,31 @@
|
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"additionalProperties": {}
|
|
187
|
+
},
|
|
188
|
+
"autoSync": {
|
|
189
|
+
"default": {
|
|
190
|
+
"onboardingResolvedAt": null
|
|
191
|
+
},
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"onboardingResolvedAt": {
|
|
195
|
+
"default": null,
|
|
196
|
+
"anyOf": [
|
|
197
|
+
{
|
|
198
|
+
"type": "string",
|
|
199
|
+
"format": "date-time",
|
|
200
|
+
"pattern": "^(?:(?:\\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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
201
|
+
"scope": "project",
|
|
202
|
+
"agentSettable": false,
|
|
203
|
+
"defaultScope": "project"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "null"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"additionalProperties": {}
|
|
187
212
|
}
|
|
188
213
|
},
|
|
189
214
|
"additionalProperties": {}
|
|
@@ -183,6 +183,31 @@
|
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
"additionalProperties": {}
|
|
186
|
+
},
|
|
187
|
+
"autoSync": {
|
|
188
|
+
"default": {
|
|
189
|
+
"onboardingResolvedAt": null
|
|
190
|
+
},
|
|
191
|
+
"type": "object",
|
|
192
|
+
"properties": {
|
|
193
|
+
"onboardingResolvedAt": {
|
|
194
|
+
"default": null,
|
|
195
|
+
"anyOf": [
|
|
196
|
+
{
|
|
197
|
+
"type": "string",
|
|
198
|
+
"format": "date-time",
|
|
199
|
+
"pattern": "^(?:(?:\\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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
200
|
+
"scope": "project",
|
|
201
|
+
"agentSettable": false,
|
|
202
|
+
"defaultScope": "project"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"type": "null"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": {}
|
|
186
211
|
}
|
|
187
212
|
},
|
|
188
213
|
"additionalProperties": {}
|
|
@@ -150,7 +150,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
150
150
|
|
|
151
151
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=ht,s=!tt.jitless,c=s&>.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?zr([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Hr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!jt(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Pt(e,r,nt())))}),t)}const Ur=k(`$ZodUnion`,(e,t)=>{er.init(e,t),A(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),A(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),A(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),A(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>st(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Hr(t,i,e,a)):Hr(s,i,e,a)}}),Wr=k(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ur.init(e,t);let n=e._zod.parse;A(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=at(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!ht(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Gr=k(`$ZodIntersection`,(e,t)=>{er.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>qr(e,t,n)):qr(e,i,a)}});function Kr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_t(e)&&_t(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Kr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Kr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),jt(e))return e;let o=Kr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Jr=k(`$ZodRecord`,(e,t)=>{er.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!_t(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...Mt(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...Mt(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&An.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Pt(e,r,nt())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Mt(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Mt(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Yr=k(`$ZodEnum`,(e,t)=>{er.init(e,t);let n=rt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>yt.has(typeof e)).map(e=>typeof e==`string`?bt(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Xr=k(`$ZodLiteral`,(e,t)=>{if(er.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?bt(e):e?bt(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Zr=k(`$ZodTransform`,(e,t)=>{er.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new et(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new $e;return n.value=i,n}});function Qr(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $r=k(`$ZodOptional`,(e,t)=>{er.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${st(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Qr(t,e.value)):Qr(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ei=k(`$ZodExactOptional`,(e,t)=>{$r.init(e,t),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ti=k(`$ZodNullable`,(e,t)=>{er.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${st(e.source)}|null)$`):void 0}),A(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ni=k(`$ZodDefault`,(e,t)=>{er.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ri(e,t)):ri(r,t)}});function ri(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ii=k(`$ZodPrefault`,(e,t)=>{er.init(e,t),e._zod.optin=`optional`,A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ai=k(`$ZodNonOptional`,(e,t)=>{er.init(e,t),A(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>oi(t,e)):oi(i,e)}});function oi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const si=k(`$ZodCatch`,(e,t)=>{er.init(e,t),A(e._zod,`optin`,()=>t.innerType._zod.optin),A(e._zod,`optout`,()=>t.innerType._zod.optout),A(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Pt(e,n,nt()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Pt(e,n,nt()))},input:e.value}),e.issues=[]),e)}}),ci=k(`$ZodPipe`,(e,t)=>{er.init(e,t),A(e._zod,`values`,()=>t.in._zod.values),A(e._zod,`optin`,()=>t.in._zod.optin),A(e._zod,`optout`,()=>t.out._zod.optout),A(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>li(e,t.in,n)):li(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>li(e,t.out,n)):li(r,t.out,n)}});function li(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ui=k(`$ZodReadonly`,(e,t)=>{er.init(e,t),A(e._zod,`propValues`,()=>t.innerType._zod.propValues),A(e._zod,`values`,()=>t.innerType._zod.values),A(e._zod,`optin`,()=>t.innerType?._zod?.optin),A(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(di):di(r)}});function di(e){return e.value=Object.freeze(e.value),e}const fi=k(`$ZodCustom`,(e,t)=>{Fn.init(e,t),er.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>pi(t,n,r,e));pi(i,n,r,e)}});function pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(It(e))}}var mi,hi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function gi(){return new hi}(mi=globalThis).__zod_globalRegistry??(mi.__zod_globalRegistry=gi());const _i=globalThis.__zod_globalRegistry;function vi(e,t){return new e({type:`string`,...j(t)})}function yi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...j(t)})}function bi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...j(t)})}function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...j(t)})}function Si(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...j(t)})}function Ci(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...j(t)})}function wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...j(t)})}function Ti(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...j(t)})}function Ei(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...j(t)})}function Di(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...j(t)})}function Oi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...j(t)})}function ki(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...j(t)})}function Ai(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...j(t)})}function ji(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...j(t)})}function Mi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...j(t)})}function Ni(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...j(t)})}function Pi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...j(t)})}function Fi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...j(t)})}function Ii(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...j(t)})}function Li(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...j(t)})}function Ri(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...j(t)})}function zi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...j(t)})}function Bi(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...j(t)})}function Vi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...j(t)})}function Hi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...j(t)})}function Ui(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...j(t)})}function Wi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...j(t)})}function Gi(e,t){return new e({type:`number`,checks:[],...j(t)})}function Ki(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...j(t)})}function qi(e,t){return new e({type:`boolean`,...j(t)})}function Ji(e,t){return new e({type:`null`,...j(t)})}function Yi(e){return new e({type:`unknown`})}function Xi(e,t){return new e({type:`never`,...j(t)})}function Zi(e,t){return new Ln({check:`less_than`,...j(t),value:e,inclusive:!1})}function Qi(e,t){return new Ln({check:`less_than`,...j(t),value:e,inclusive:!0})}function $i(e,t){return new Rn({check:`greater_than`,...j(t),value:e,inclusive:!1})}function ea(e,t){return new Rn({check:`greater_than`,...j(t),value:e,inclusive:!0})}function ta(e,t){return new zn({check:`multiple_of`,...j(t),value:e})}function na(e,t){return new Vn({check:`max_length`,...j(t),maximum:e})}function ra(e,t){return new Hn({check:`min_length`,...j(t),minimum:e})}function ia(e,t){return new Un({check:`length_equals`,...j(t),length:e})}function aa(e,t){return new Gn({check:`string_format`,format:`regex`,...j(t),pattern:e})}function oa(e){return new Kn({check:`string_format`,format:`lowercase`,...j(e)})}function sa(e){return new qn({check:`string_format`,format:`uppercase`,...j(e)})}function ca(e,t){return new Jn({check:`string_format`,format:`includes`,...j(t),includes:e})}function la(e,t){return new Yn({check:`string_format`,format:`starts_with`,...j(t),prefix:e})}function ua(e,t){return new Xn({check:`string_format`,format:`ends_with`,...j(t),suffix:e})}function da(e){return new Zn({check:`overwrite`,tx:e})}function fa(e){return da(t=>t.normalize(e))}function pa(){return da(e=>e.trim())}function ma(){return da(e=>e.toLowerCase())}function ha(){return da(e=>e.toUpperCase())}function ga(){return da(e=>pt(e))}function _a(e,t,n){return new e({type:`array`,element:t,...j(n)})}function va(e,t,n){let r=j(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ya(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...j(n)})}function ba(e){let t=xa(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(It(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(It(r))}},e(n.value,n)));return t}function xa(e,t){let n=new Fn({check:`custom`,...j(t)});return n._zod.check=e,n}function Sa(e){let t=new Fn({check:`describe`});return t._zod.onattach=[t=>{let n=_i.get(t)??{};_i.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Ca(e){let t=new Fn({check:`meta`});return t._zod.onattach=[t=>{let n=_i.get(t)??{};_i.add(t,{...n,...e})}],t._zod.check=()=>{},t}function wa(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??_i,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}}function Ta(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Ta(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&Oa(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ea(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
152
152
|
|
|
153
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Da(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Aa(t,`input`,e.processors),output:Aa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Oa(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Oa(r.element,n);if(r.type===`set`)return Oa(r.valueType,n);if(r.type===`lazy`)return Oa(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Oa(r.innerType,n);if(r.type===`intersection`)return Oa(r.left,n)||Oa(r.right,n);if(r.type===`record`||r.type===`map`)return Oa(r.keyType,n)||Oa(r.valueType,n);if(r.type===`pipe`)return Oa(r.in,n)||Oa(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Oa(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Oa(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Oa(e,n))return!0;return!!(r.rest&&Oa(r.rest,n))}return!1}const ka=(e,t={})=>n=>{let r=wa({...n,processors:t});return Ta(e,r),Ea(r,e),Da(r,e)},Aa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=wa({...i??{},target:a,io:t,processors:n});return Ta(e,o),Ea(o,e),Da(o,e)},ja={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ma=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ja[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Na=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Pa=(e,t,n,r)=>{n.type=`boolean`},Fa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Ia=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},La=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ra=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},za=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Ba=(e,t,n,r)=>{n.not={}},Va=(e,t,n,r)=>{},Ha=(e,t,n,r)=>{},Ua=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Wa=(e,t,n,r)=>{let i=e._zod.def,a=rt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ga=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ka=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},qa=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Ja=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Ya=(e,t,n,r)=>{n.type=`boolean`},Xa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Za=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Qa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},$a=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},eo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},to=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Ta(a.element,t,{...r,path:[...r.path,`items`]})},no=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Ta(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Ta(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ro=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Ta(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},io=(e,t,n,r)=>{let i=e._zod.def,a=Ta(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Ta(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ao=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Ta(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Ta(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},oo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Ta(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Ta(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Ta(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},so=(e,t,n,r)=>{let i=e._zod.def,a=Ta(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},co=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},lo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},uo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},fo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},po=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Ta(a,t,r);let o=t.seen.get(e);o.ref=a},mo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ho=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},go=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_o={string:Ma,number:Na,boolean:Pa,bigint:Fa,symbol:Ia,null:La,undefined:Ra,void:za,never:Ba,any:Va,unknown:Ha,date:Ua,enum:Wa,literal:Ga,nan:Ka,template_literal:qa,file:Ja,success:Ya,custom:Xa,function:Za,transform:Qa,map:$a,set:eo,array:to,object:no,union:ro,intersection:io,tuple:ao,record:oo,nullable:so,nonoptional:co,default:lo,prefault:uo,catch:fo,pipe:po,readonly:mo,promise:ho,optional:go,lazy:(e,t,n,r)=>{let i=e._zod.innerType;Ta(i,t,r);let a=t.seen.get(e);a.ref=i}};function vo(e,t){if(`_idmap`in e){let n=e,r=wa({...t,processors:_o}),i={};for(let e of n._idmap.entries()){let[t,n]=e;Ta(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Ea(r,n),a[t]=Da(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=wa({...t,processors:_o});return Ta(e,n),Ea(n,e),Da(n,e)}const yo=k(`ZodISODateTime`,(e,t)=>{mr.init(e,t),Wo.init(e,t)});function bo(e){return Vi(yo,e)}const xo=k(`ZodISODate`,(e,t)=>{hr.init(e,t),Wo.init(e,t)});function So(e){return Hi(xo,e)}const Co=k(`ZodISOTime`,(e,t)=>{gr.init(e,t),Wo.init(e,t)});function wo(e){return Ui(Co,e)}const To=k(`ZodISODuration`,(e,t)=>{_r.init(e,t),Wo.init(e,t)});function Eo(e){return Wi(To,e)}const Do=(e,t)=>{Rt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Vt(e,t)},flatten:{value:t=>Bt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,it,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,it,2)}},isEmpty:{get(){return e.issues.length===0}}})};k(`ZodError`,Do);const Oo=k(`ZodError`,Do,{Parent:Error}),ko=Ht(Oo),Ao=Wt(Oo),jo=Kt(Oo),Mo=Jt(Oo),No=Xt(Oo),Po=Zt(Oo),Fo=Qt(Oo),Io=$t(Oo),Lo=en(Oo),Ro=tn(Oo),zo=nn(Oo),Bo=rn(Oo),Vo=k(`ZodType`,(e,t)=>(er.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Aa(e,`input`),output:Aa(e,`output`)}}),e.toJSONSchema=ka(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(dt(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>xt(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ko(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>jo(e,t,n),e.parseAsync=async(t,n)=>Ao(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Mo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>No(e,t,n),e.decode=(t,n)=>Po(e,t,n),e.encodeAsync=async(t,n)=>Fo(e,t,n),e.decodeAsync=async(t,n)=>Io(e,t,n),e.safeEncode=(t,n)=>Lo(e,t,n),e.safeDecode=(t,n)=>Ro(e,t,n),e.safeEncodeAsync=async(t,n)=>zo(e,t,n),e.safeDecodeAsync=async(t,n)=>Bo(e,t,n),e.refine=(t,n)=>e.check(lc(t,n)),e.superRefine=t=>e.check(uc(t)),e.overwrite=t=>e.check(da(t)),e.optional=()=>Ws(e),e.exactOptional=()=>Ks(e),e.nullable=()=>Js(e),e.nullish=()=>Ws(Js(e)),e.nonoptional=t=>ec(e,t),e.array=()=>Ts(e),e.or=t=>As([e,t]),e.and=t=>Ps(e,t),e.transform=t=>ic(e,Hs(t)),e.default=t=>Xs(e,t),e.prefault=t=>Qs(e,t),e.catch=t=>nc(e,t),e.pipe=t=>ic(e,t),e.readonly=()=>oc(e),e.describe=t=>{let n=e.clone();return _i.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return _i.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return _i.get(e);let n=e.clone();return _i.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ho=k(`_ZodString`,(e,t)=>{tr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(aa(...t)),e.includes=(...t)=>e.check(ca(...t)),e.startsWith=(...t)=>e.check(la(...t)),e.endsWith=(...t)=>e.check(ua(...t)),e.min=(...t)=>e.check(ra(...t)),e.max=(...t)=>e.check(na(...t)),e.length=(...t)=>e.check(ia(...t)),e.nonempty=(...t)=>e.check(ra(1,...t)),e.lowercase=t=>e.check(oa(t)),e.uppercase=t=>e.check(sa(t)),e.trim=()=>e.check(pa()),e.normalize=(...t)=>e.check(fa(...t)),e.toLowerCase=()=>e.check(ma()),e.toUpperCase=()=>e.check(ha()),e.slugify=()=>e.check(ga())}),Uo=k(`ZodString`,(e,t)=>{tr.init(e,t),Ho.init(e,t),e.email=t=>e.check(yi(Go,t)),e.url=t=>e.check(Ti(Jo,t)),e.jwt=t=>e.check(Bi(ds,t)),e.emoji=t=>e.check(Ei(Xo,t)),e.guid=t=>e.check(bi(Ko,t)),e.uuid=t=>e.check(xi(qo,t)),e.uuidv4=t=>e.check(Si(qo,t)),e.uuidv6=t=>e.check(Ci(qo,t)),e.uuidv7=t=>e.check(wi(qo,t)),e.nanoid=t=>e.check(Di(Zo,t)),e.guid=t=>e.check(bi(Ko,t)),e.cuid=t=>e.check(Oi(Qo,t)),e.cuid2=t=>e.check(ki($o,t)),e.ulid=t=>e.check(Ai(es,t)),e.base64=t=>e.check(Li(cs,t)),e.base64url=t=>e.check(Ri(ls,t)),e.xid=t=>e.check(ji(ts,t)),e.ksuid=t=>e.check(Mi(ns,t)),e.ipv4=t=>e.check(Ni(rs,t)),e.ipv6=t=>e.check(Pi(is,t)),e.cidrv4=t=>e.check(Fi(as,t)),e.cidrv6=t=>e.check(Ii(ss,t)),e.e164=t=>e.check(zi(us,t)),e.datetime=t=>e.check(bo(t)),e.date=t=>e.check(So(t)),e.time=t=>e.check(wo(t)),e.duration=t=>e.check(Eo(t))});function M(e){return vi(Uo,e)}const Wo=k(`ZodStringFormat`,(e,t)=>{nr.init(e,t),Ho.init(e,t)}),Go=k(`ZodEmail`,(e,t)=>{ar.init(e,t),Wo.init(e,t)}),Ko=k(`ZodGUID`,(e,t)=>{rr.init(e,t),Wo.init(e,t)}),qo=k(`ZodUUID`,(e,t)=>{ir.init(e,t),Wo.init(e,t)}),Jo=k(`ZodURL`,(e,t)=>{or.init(e,t),Wo.init(e,t)});function Yo(e){return Ti(Jo,e)}const Xo=k(`ZodEmoji`,(e,t)=>{sr.init(e,t),Wo.init(e,t)}),Zo=k(`ZodNanoID`,(e,t)=>{cr.init(e,t),Wo.init(e,t)}),Qo=k(`ZodCUID`,(e,t)=>{lr.init(e,t),Wo.init(e,t)}),$o=k(`ZodCUID2`,(e,t)=>{ur.init(e,t),Wo.init(e,t)}),es=k(`ZodULID`,(e,t)=>{dr.init(e,t),Wo.init(e,t)}),ts=k(`ZodXID`,(e,t)=>{fr.init(e,t),Wo.init(e,t)}),ns=k(`ZodKSUID`,(e,t)=>{pr.init(e,t),Wo.init(e,t)}),rs=k(`ZodIPv4`,(e,t)=>{vr.init(e,t),Wo.init(e,t)}),is=k(`ZodIPv6`,(e,t)=>{yr.init(e,t),Wo.init(e,t)}),as=k(`ZodCIDRv4`,(e,t)=>{br.init(e,t),Wo.init(e,t)}),ss=k(`ZodCIDRv6`,(e,t)=>{xr.init(e,t),Wo.init(e,t)}),cs=k(`ZodBase64`,(e,t)=>{Cr.init(e,t),Wo.init(e,t)}),ls=k(`ZodBase64URL`,(e,t)=>{Tr.init(e,t),Wo.init(e,t)}),us=k(`ZodE164`,(e,t)=>{Er.init(e,t),Wo.init(e,t)}),ds=k(`ZodJWT`,(e,t)=>{Or.init(e,t),Wo.init(e,t)}),fs=k(`ZodNumber`,(e,t)=>{kr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),e.gt=(t,n)=>e.check($i(t,n)),e.gte=(t,n)=>e.check(ea(t,n)),e.min=(t,n)=>e.check(ea(t,n)),e.lt=(t,n)=>e.check(Zi(t,n)),e.lte=(t,n)=>e.check(Qi(t,n)),e.max=(t,n)=>e.check(Qi(t,n)),e.int=t=>e.check(hs(t)),e.safe=t=>e.check(hs(t)),e.positive=t=>e.check($i(0,t)),e.nonnegative=t=>e.check(ea(0,t)),e.negative=t=>e.check(Zi(0,t)),e.nonpositive=t=>e.check(Qi(0,t)),e.multipleOf=(t,n)=>e.check(ta(t,n)),e.step=(t,n)=>e.check(ta(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ps(e){return Gi(fs,e)}const ms=k(`ZodNumberFormat`,(e,t)=>{Ar.init(e,t),fs.init(e,t)});function hs(e){return Ki(ms,e)}const gs=k(`ZodBoolean`,(e,t)=>{jr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r)});function _s(e){return qi(gs,e)}const vs=k(`ZodNull`,(e,t)=>{Mr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r)});function ys(e){return Ji(vs,e)}const bs=k(`ZodUnknown`,(e,t)=>{Nr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function xs(){return Yi(bs)}const Ss=k(`ZodNever`,(e,t)=>{Pr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r)});function Cs(e){return Xi(Ss,e)}const ws=k(`ZodArray`,(e,t)=>{Ir.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(ra(t,n)),e.nonempty=t=>e.check(ra(1,t)),e.max=(t,n)=>e.check(na(t,n)),e.length=(t,n)=>e.check(ia(t,n)),e.unwrap=()=>e.element});function Ts(e,t){return _a(ws,e,t)}const Es=k(`ZodObject`,(e,t)=>{Vr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),A(e,`shape`,()=>t.shape),e.keyof=()=>Rs(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xs()}),e.loose=()=>e.clone({...e._zod.def,catchall:xs()}),e.strict=()=>e.clone({...e._zod.def,catchall:Cs()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Et(e,t),e.safeExtend=t=>Dt(e,t),e.merge=t=>Ot(e,t),e.pick=t=>wt(e,t),e.omit=t=>Tt(e,t),e.partial=(...t)=>kt(Us,e,t[0]),e.required=(...t)=>At($s,e,t[0])});function Ds(e,t){return new Es({type:`object`,shape:e??{},...j(t)})}function Os(e,t){return new Es({type:`object`,shape:e,catchall:xs(),...j(t)})}const ks=k(`ZodUnion`,(e,t)=>{Ur.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.options=t.options});function As(e,t){return new ks({type:`union`,options:e,...j(t)})}const js=k(`ZodDiscriminatedUnion`,(e,t)=>{ks.init(e,t),Wr.init(e,t)});function Ms(e,t,n){return new js({type:`union`,options:t,discriminator:e,...j(n)})}const Ns=k(`ZodIntersection`,(e,t)=>{Gr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r)});function Ps(e,t){return new Ns({type:`intersection`,left:e,right:t})}const Fs=k(`ZodRecord`,(e,t)=>{Jr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Is(e,t,n){return new Fs({type:`record`,keyType:e,valueType:t,...j(n)})}const Ls=k(`ZodEnum`,(e,t)=>{Yr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ls({...t,checks:[],...j(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ls({...t,checks:[],...j(r),entries:i})}});function Rs(e,t){return new Ls({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...j(t)})}const zs=k(`ZodLiteral`,(e,t)=>{Xr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ga(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Bs(e,t){return new zs({type:`literal`,values:Array.isArray(e)?e:[e],...j(t)})}const Vs=k(`ZodTransform`,(e,t)=>{Zr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new et(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(It(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(It(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Hs(e){return new Vs({type:`transform`,transform:e})}const Us=k(`ZodOptional`,(e,t)=>{$r.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ws(e){return new Us({type:`optional`,innerType:e})}const Gs=k(`ZodExactOptional`,(e,t)=>{ei.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ks(e){return new Gs({type:`optional`,innerType:e})}const qs=k(`ZodNullable`,(e,t)=>{ti.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Js(e){return new qs({type:`nullable`,innerType:e})}const Ys=k(`ZodDefault`,(e,t)=>{ni.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xs(e,t){return new Ys({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}const Zs=k(`ZodPrefault`,(e,t)=>{ii.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qs(e,t){return new Zs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}const $s=k(`ZodNonOptional`,(e,t)=>{ai.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ec(e,t){return new $s({type:`nonoptional`,innerType:e,...j(t)})}const tc=k(`ZodCatch`,(e,t)=>{si.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nc(e,t){return new tc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const rc=k(`ZodPipe`,(e,t)=>{ci.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.in=t.in,e.out=t.out});function ic(e,t){return new rc({type:`pipe`,in:e,out:t})}const ac=k(`ZodReadonly`,(e,t)=>{ui.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oc(e){return new ac({type:`readonly`,innerType:e})}const sc=k(`ZodCustom`,(e,t)=>{fi.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r)});function cc(e,t){return va(sc,e??(()=>!0),t)}function lc(e,t={}){return ya(sc,e,t)}function uc(e){return ba(e)}function dc(e,t){return ic(Hs(e),t)}var fc=Qe();a();const pc=Symbol.for(`@inkeep/open-knowledge/field-registry`),mc=globalThis;mc[pc]===void 0&&(mc[pc]=gi());const hc=mc[pc];function gc(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=_c(t)?hc.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function _c(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}const vc=Os({title:M().optional(),description:M().optional(),tags:Ts(M()).optional()}),yc=Os({match:M().min(1,"`match` must be a non-empty glob pattern (e.g. 'specs/**' or 'reports/*/**')"),frontmatter:vc}),bc=Os({content:Os({dir:M().register(hc,{scope:`project`,agentSettable:!1,defaultScope:`project`}).default(`.`)}).default({dir:`.`}),github:Os({oauthAppClientId:M().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(`Ov23liqlSd0V1MwR6rhI`)}).default({oauthAppClientId:`Ov23liqlSd0V1MwR6rhI`}),server:Os({host:M().regex(/^[\w.\-:]+$/,`Invalid hostname`).register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(`localhost`),openOnAgentEdit:_s().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(!1)}).default({host:`localhost`,openOnAgentEdit:!1}),preview:Os({baseUrl:Yo().register(hc,{scope:`project`,agentSettable:!1}).optional()}).default({}),folders:Ts(yc).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`project`}).default([]),mcp:Os({autoStart:_s().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(!0),tools:Os({read_document:Os({historyDepth:ps().int().min(0).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`user`}).default(5)}).default({historyDepth:5}),search:Os({maxResults:ps().int().min(1).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`user`}).default(50)}).default({maxResults:50})}).default({read_document:{historyDepth:5},search:{maxResults:50}})}).default({autoStart:!0,tools:{read_document:{historyDepth:5},search:{maxResults:50}}}),appearance:Os({theme:Rs([`light`,`dark`,`system`]).register(hc,{scope:`user`,agentSettable:!1,defaultScope:`user`}).optional(),editorModeDefault:Rs([`wysiwyg`,`source`]).register(hc,{scope:`user`,agentSettable:!1,defaultScope:`user`}).optional()}).default({})}),xc=`open-knowledge-config`;async function Sc(e,t,n){let r=o.getTracer(xc),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,async e=>{try{return await n(e)}catch(t){throw e.recordException(t),e.setStatus({code:i.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Cc(e,t,n){let r=o.getTracer(xc),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:i.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function wc(e,t){let n=o.getActiveSpan();n&&n.addEvent(e,t)}function Tc(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&((0,fc.isCollection)(e.getIn(r,!0))||e.deleteIn(r))}}function Ec(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){Tc(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}Tc(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Dc(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}const Oc=`v0`;function kc(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,fc.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,fc.isNode)(r))return r}return e.contents??null}function Ac(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function jc(e,t,n,r,i){let a=e.split(`
|
|
153
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Da(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:Aa(t,`input`,e.processors),output:Aa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Oa(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Oa(r.element,n);if(r.type===`set`)return Oa(r.valueType,n);if(r.type===`lazy`)return Oa(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Oa(r.innerType,n);if(r.type===`intersection`)return Oa(r.left,n)||Oa(r.right,n);if(r.type===`record`||r.type===`map`)return Oa(r.keyType,n)||Oa(r.valueType,n);if(r.type===`pipe`)return Oa(r.in,n)||Oa(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Oa(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Oa(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Oa(e,n))return!0;return!!(r.rest&&Oa(r.rest,n))}return!1}const ka=(e,t={})=>n=>{let r=wa({...n,processors:t});return Ta(e,r),Ea(r,e),Da(r,e)},Aa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=wa({...i??{},target:a,io:t,processors:n});return Ta(e,o),Ea(o,e),Da(o,e)},ja={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ma=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ja[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Na=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},Pa=(e,t,n,r)=>{n.type=`boolean`},Fa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Ia=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},La=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ra=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},za=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Ba=(e,t,n,r)=>{n.not={}},Va=(e,t,n,r)=>{},Ha=(e,t,n,r)=>{},Ua=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Wa=(e,t,n,r)=>{let i=e._zod.def,a=rt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ga=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ka=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},qa=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Ja=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Ya=(e,t,n,r)=>{n.type=`boolean`},Xa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Za=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Qa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},$a=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},eo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},to=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Ta(a.element,t,{...r,path:[...r.path,`items`]})},no=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Ta(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Ta(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ro=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Ta(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},io=(e,t,n,r)=>{let i=e._zod.def,a=Ta(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Ta(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ao=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>Ta(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?Ta(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},oo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Ta(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Ta(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Ta(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},so=(e,t,n,r)=>{let i=e._zod.def,a=Ta(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},co=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},lo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},uo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},fo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},po=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;Ta(a,t,r);let o=t.seen.get(e);o.ref=a},mo=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ho=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},go=(e,t,n,r)=>{let i=e._zod.def;Ta(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_o={string:Ma,number:Na,boolean:Pa,bigint:Fa,symbol:Ia,null:La,undefined:Ra,void:za,never:Ba,any:Va,unknown:Ha,date:Ua,enum:Wa,literal:Ga,nan:Ka,template_literal:qa,file:Ja,success:Ya,custom:Xa,function:Za,transform:Qa,map:$a,set:eo,array:to,object:no,union:ro,intersection:io,tuple:ao,record:oo,nullable:so,nonoptional:co,default:lo,prefault:uo,catch:fo,pipe:po,readonly:mo,promise:ho,optional:go,lazy:(e,t,n,r)=>{let i=e._zod.innerType;Ta(i,t,r);let a=t.seen.get(e);a.ref=i}};function vo(e,t){if(`_idmap`in e){let n=e,r=wa({...t,processors:_o}),i={};for(let e of n._idmap.entries()){let[t,n]=e;Ta(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Ea(r,n),a[t]=Da(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=wa({...t,processors:_o});return Ta(e,n),Ea(n,e),Da(n,e)}const yo=k(`ZodISODateTime`,(e,t)=>{mr.init(e,t),Wo.init(e,t)});function bo(e){return Vi(yo,e)}const xo=k(`ZodISODate`,(e,t)=>{hr.init(e,t),Wo.init(e,t)});function So(e){return Hi(xo,e)}const Co=k(`ZodISOTime`,(e,t)=>{gr.init(e,t),Wo.init(e,t)});function wo(e){return Ui(Co,e)}const To=k(`ZodISODuration`,(e,t)=>{_r.init(e,t),Wo.init(e,t)});function Eo(e){return Wi(To,e)}const Do=(e,t)=>{Rt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Vt(e,t)},flatten:{value:t=>Bt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,it,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,it,2)}},isEmpty:{get(){return e.issues.length===0}}})};k(`ZodError`,Do);const Oo=k(`ZodError`,Do,{Parent:Error}),ko=Ht(Oo),Ao=Wt(Oo),jo=Kt(Oo),Mo=Jt(Oo),No=Xt(Oo),Po=Zt(Oo),Fo=Qt(Oo),Io=$t(Oo),Lo=en(Oo),Ro=tn(Oo),zo=nn(Oo),Bo=rn(Oo),Vo=k(`ZodType`,(e,t)=>(er.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Aa(e,`input`),output:Aa(e,`output`)}}),e.toJSONSchema=ka(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(dt(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>xt(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ko(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>jo(e,t,n),e.parseAsync=async(t,n)=>Ao(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Mo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>No(e,t,n),e.decode=(t,n)=>Po(e,t,n),e.encodeAsync=async(t,n)=>Fo(e,t,n),e.decodeAsync=async(t,n)=>Io(e,t,n),e.safeEncode=(t,n)=>Lo(e,t,n),e.safeDecode=(t,n)=>Ro(e,t,n),e.safeEncodeAsync=async(t,n)=>zo(e,t,n),e.safeDecodeAsync=async(t,n)=>Bo(e,t,n),e.refine=(t,n)=>e.check(lc(t,n)),e.superRefine=t=>e.check(uc(t)),e.overwrite=t=>e.check(da(t)),e.optional=()=>Ws(e),e.exactOptional=()=>Ks(e),e.nullable=()=>Js(e),e.nullish=()=>Ws(Js(e)),e.nonoptional=t=>ec(e,t),e.array=()=>Ts(e),e.or=t=>As([e,t]),e.and=t=>Ps(e,t),e.transform=t=>ic(e,Hs(t)),e.default=t=>Xs(e,t),e.prefault=t=>Qs(e,t),e.catch=t=>nc(e,t),e.pipe=t=>ic(e,t),e.readonly=()=>oc(e),e.describe=t=>{let n=e.clone();return _i.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return _i.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return _i.get(e);let n=e.clone();return _i.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ho=k(`_ZodString`,(e,t)=>{tr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(aa(...t)),e.includes=(...t)=>e.check(ca(...t)),e.startsWith=(...t)=>e.check(la(...t)),e.endsWith=(...t)=>e.check(ua(...t)),e.min=(...t)=>e.check(ra(...t)),e.max=(...t)=>e.check(na(...t)),e.length=(...t)=>e.check(ia(...t)),e.nonempty=(...t)=>e.check(ra(1,...t)),e.lowercase=t=>e.check(oa(t)),e.uppercase=t=>e.check(sa(t)),e.trim=()=>e.check(pa()),e.normalize=(...t)=>e.check(fa(...t)),e.toLowerCase=()=>e.check(ma()),e.toUpperCase=()=>e.check(ha()),e.slugify=()=>e.check(ga())}),Uo=k(`ZodString`,(e,t)=>{tr.init(e,t),Ho.init(e,t),e.email=t=>e.check(yi(Go,t)),e.url=t=>e.check(Ti(Jo,t)),e.jwt=t=>e.check(Bi(ds,t)),e.emoji=t=>e.check(Ei(Xo,t)),e.guid=t=>e.check(bi(Ko,t)),e.uuid=t=>e.check(xi(qo,t)),e.uuidv4=t=>e.check(Si(qo,t)),e.uuidv6=t=>e.check(Ci(qo,t)),e.uuidv7=t=>e.check(wi(qo,t)),e.nanoid=t=>e.check(Di(Zo,t)),e.guid=t=>e.check(bi(Ko,t)),e.cuid=t=>e.check(Oi(Qo,t)),e.cuid2=t=>e.check(ki($o,t)),e.ulid=t=>e.check(Ai(es,t)),e.base64=t=>e.check(Li(cs,t)),e.base64url=t=>e.check(Ri(ls,t)),e.xid=t=>e.check(ji(ts,t)),e.ksuid=t=>e.check(Mi(ns,t)),e.ipv4=t=>e.check(Ni(rs,t)),e.ipv6=t=>e.check(Pi(is,t)),e.cidrv4=t=>e.check(Fi(as,t)),e.cidrv6=t=>e.check(Ii(ss,t)),e.e164=t=>e.check(zi(us,t)),e.datetime=t=>e.check(bo(t)),e.date=t=>e.check(So(t)),e.time=t=>e.check(wo(t)),e.duration=t=>e.check(Eo(t))});function M(e){return vi(Uo,e)}const Wo=k(`ZodStringFormat`,(e,t)=>{nr.init(e,t),Ho.init(e,t)}),Go=k(`ZodEmail`,(e,t)=>{ar.init(e,t),Wo.init(e,t)}),Ko=k(`ZodGUID`,(e,t)=>{rr.init(e,t),Wo.init(e,t)}),qo=k(`ZodUUID`,(e,t)=>{ir.init(e,t),Wo.init(e,t)}),Jo=k(`ZodURL`,(e,t)=>{or.init(e,t),Wo.init(e,t)});function Yo(e){return Ti(Jo,e)}const Xo=k(`ZodEmoji`,(e,t)=>{sr.init(e,t),Wo.init(e,t)}),Zo=k(`ZodNanoID`,(e,t)=>{cr.init(e,t),Wo.init(e,t)}),Qo=k(`ZodCUID`,(e,t)=>{lr.init(e,t),Wo.init(e,t)}),$o=k(`ZodCUID2`,(e,t)=>{ur.init(e,t),Wo.init(e,t)}),es=k(`ZodULID`,(e,t)=>{dr.init(e,t),Wo.init(e,t)}),ts=k(`ZodXID`,(e,t)=>{fr.init(e,t),Wo.init(e,t)}),ns=k(`ZodKSUID`,(e,t)=>{pr.init(e,t),Wo.init(e,t)}),rs=k(`ZodIPv4`,(e,t)=>{vr.init(e,t),Wo.init(e,t)}),is=k(`ZodIPv6`,(e,t)=>{yr.init(e,t),Wo.init(e,t)}),as=k(`ZodCIDRv4`,(e,t)=>{br.init(e,t),Wo.init(e,t)}),ss=k(`ZodCIDRv6`,(e,t)=>{xr.init(e,t),Wo.init(e,t)}),cs=k(`ZodBase64`,(e,t)=>{Cr.init(e,t),Wo.init(e,t)}),ls=k(`ZodBase64URL`,(e,t)=>{Tr.init(e,t),Wo.init(e,t)}),us=k(`ZodE164`,(e,t)=>{Er.init(e,t),Wo.init(e,t)}),ds=k(`ZodJWT`,(e,t)=>{Or.init(e,t),Wo.init(e,t)}),fs=k(`ZodNumber`,(e,t)=>{kr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),e.gt=(t,n)=>e.check($i(t,n)),e.gte=(t,n)=>e.check(ea(t,n)),e.min=(t,n)=>e.check(ea(t,n)),e.lt=(t,n)=>e.check(Zi(t,n)),e.lte=(t,n)=>e.check(Qi(t,n)),e.max=(t,n)=>e.check(Qi(t,n)),e.int=t=>e.check(hs(t)),e.safe=t=>e.check(hs(t)),e.positive=t=>e.check($i(0,t)),e.nonnegative=t=>e.check(ea(0,t)),e.negative=t=>e.check(Zi(0,t)),e.nonpositive=t=>e.check(Qi(0,t)),e.multipleOf=(t,n)=>e.check(ta(t,n)),e.step=(t,n)=>e.check(ta(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ps(e){return Gi(fs,e)}const ms=k(`ZodNumberFormat`,(e,t)=>{Ar.init(e,t),fs.init(e,t)});function hs(e){return Ki(ms,e)}const gs=k(`ZodBoolean`,(e,t)=>{jr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r)});function _s(e){return qi(gs,e)}const vs=k(`ZodNull`,(e,t)=>{Mr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r)});function ys(e){return Ji(vs,e)}const bs=k(`ZodUnknown`,(e,t)=>{Nr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function xs(){return Yi(bs)}const Ss=k(`ZodNever`,(e,t)=>{Pr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r)});function Cs(e){return Xi(Ss,e)}const ws=k(`ZodArray`,(e,t)=>{Ir.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(ra(t,n)),e.nonempty=t=>e.check(ra(1,t)),e.max=(t,n)=>e.check(na(t,n)),e.length=(t,n)=>e.check(ia(t,n)),e.unwrap=()=>e.element});function Ts(e,t){return _a(ws,e,t)}const Es=k(`ZodObject`,(e,t)=>{Vr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),A(e,`shape`,()=>t.shape),e.keyof=()=>Rs(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:xs()}),e.loose=()=>e.clone({...e._zod.def,catchall:xs()}),e.strict=()=>e.clone({...e._zod.def,catchall:Cs()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Et(e,t),e.safeExtend=t=>Dt(e,t),e.merge=t=>Ot(e,t),e.pick=t=>wt(e,t),e.omit=t=>Tt(e,t),e.partial=(...t)=>kt(Us,e,t[0]),e.required=(...t)=>At($s,e,t[0])});function Ds(e,t){return new Es({type:`object`,shape:e??{},...j(t)})}function Os(e,t){return new Es({type:`object`,shape:e,catchall:xs(),...j(t)})}const ks=k(`ZodUnion`,(e,t)=>{Ur.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.options=t.options});function As(e,t){return new ks({type:`union`,options:e,...j(t)})}const js=k(`ZodDiscriminatedUnion`,(e,t)=>{ks.init(e,t),Wr.init(e,t)});function Ms(e,t,n){return new js({type:`union`,options:t,discriminator:e,...j(n)})}const Ns=k(`ZodIntersection`,(e,t)=>{Gr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r)});function Ps(e,t){return new Ns({type:`intersection`,left:e,right:t})}const Fs=k(`ZodRecord`,(e,t)=>{Jr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Is(e,t,n){return new Fs({type:`record`,keyType:e,valueType:t,...j(n)})}const Ls=k(`ZodEnum`,(e,t)=>{Yr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ls({...t,checks:[],...j(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ls({...t,checks:[],...j(r),entries:i})}});function Rs(e,t){return new Ls({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...j(t)})}const zs=k(`ZodLiteral`,(e,t)=>{Xr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ga(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Bs(e,t){return new zs({type:`literal`,values:Array.isArray(e)?e:[e],...j(t)})}const Vs=k(`ZodTransform`,(e,t)=>{Zr.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new et(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(It(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(It(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Hs(e){return new Vs({type:`transform`,transform:e})}const Us=k(`ZodOptional`,(e,t)=>{$r.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ws(e){return new Us({type:`optional`,innerType:e})}const Gs=k(`ZodExactOptional`,(e,t)=>{ei.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ks(e){return new Gs({type:`optional`,innerType:e})}const qs=k(`ZodNullable`,(e,t)=>{ti.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Js(e){return new qs({type:`nullable`,innerType:e})}const Ys=k(`ZodDefault`,(e,t)=>{ni.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xs(e,t){return new Ys({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}const Zs=k(`ZodPrefault`,(e,t)=>{ii.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qs(e,t){return new Zs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():vt(t)}})}const $s=k(`ZodNonOptional`,(e,t)=>{ai.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ec(e,t){return new $s({type:`nonoptional`,innerType:e,...j(t)})}const tc=k(`ZodCatch`,(e,t)=>{si.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nc(e,t){return new tc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const rc=k(`ZodPipe`,(e,t)=>{ci.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.in=t.in,e.out=t.out});function ic(e,t){return new rc({type:`pipe`,in:e,out:t})}const ac=k(`ZodReadonly`,(e,t)=>{ui.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oc(e){return new ac({type:`readonly`,innerType:e})}const sc=k(`ZodCustom`,(e,t)=>{fi.init(e,t),Vo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r)});function cc(e,t){return va(sc,e??(()=>!0),t)}function lc(e,t={}){return ya(sc,e,t)}function uc(e){return ba(e)}function dc(e,t){return ic(Hs(e),t)}var fc=Qe();a();const pc=Symbol.for(`@inkeep/open-knowledge/field-registry`),mc=globalThis;mc[pc]===void 0&&(mc[pc]=gi());const hc=mc[pc];function gc(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=_c(t)?hc.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function _c(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}const vc=Os({title:M().optional(),description:M().optional(),tags:Ts(M()).optional()}),yc=Os({match:M().min(1,"`match` must be a non-empty glob pattern (e.g. 'specs/**' or 'reports/*/**')"),frontmatter:vc}),bc=Os({content:Os({dir:M().register(hc,{scope:`project`,agentSettable:!1,defaultScope:`project`}).default(`.`)}).default({dir:`.`}),github:Os({oauthAppClientId:M().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(`Ov23liqlSd0V1MwR6rhI`)}).default({oauthAppClientId:`Ov23liqlSd0V1MwR6rhI`}),server:Os({host:M().regex(/^[\w.\-:]+$/,`Invalid hostname`).register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(`localhost`),openOnAgentEdit:_s().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(!1)}).default({host:`localhost`,openOnAgentEdit:!1}),preview:Os({baseUrl:Yo().register(hc,{scope:`project`,agentSettable:!1}).optional()}).default({}),folders:Ts(yc).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`project`}).default([]),mcp:Os({autoStart:_s().register(hc,{scope:`either`,agentSettable:!1,defaultScope:`user`}).default(!0),tools:Os({read_document:Os({historyDepth:ps().int().min(0).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`user`}).default(5)}).default({historyDepth:5}),search:Os({maxResults:ps().int().min(1).register(hc,{scope:`either`,agentSettable:!0,defaultScope:`user`}).default(50)}).default({maxResults:50})}).default({read_document:{historyDepth:5},search:{maxResults:50}})}).default({autoStart:!0,tools:{read_document:{historyDepth:5},search:{maxResults:50}}}),appearance:Os({theme:Rs([`light`,`dark`,`system`]).register(hc,{scope:`user`,agentSettable:!1,defaultScope:`user`}).optional(),editorModeDefault:Rs([`wysiwyg`,`source`]).register(hc,{scope:`user`,agentSettable:!1,defaultScope:`user`}).optional()}).default({}),autoSync:Os({onboardingResolvedAt:bo().register(hc,{scope:`project`,agentSettable:!1,defaultScope:`project`}).nullable().default(null)}).default({onboardingResolvedAt:null})}),xc=`open-knowledge-config`;async function Sc(e,t,n){let r=o.getTracer(xc),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,async e=>{try{return await n(e)}catch(t){throw e.recordException(t),e.setStatus({code:i.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Cc(e,t,n){let r=o.getTracer(xc),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:i.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function wc(e,t){let n=o.getActiveSpan();n&&n.addEvent(e,t)}function Tc(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&((0,fc.isCollection)(e.getIn(r,!0))||e.deleteIn(r))}}function Ec(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){Tc(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}Tc(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Dc(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}const Oc=`v0`;function kc(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,fc.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,fc.isNode)(r))return r}return e.contents??null}function Ac(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function jc(e,t,n,r,i){let a=e.split(`
|
|
154
154
|
`),o=r-1;if(o<0||o>=a.length)return``;let s=a[o]??``,c=t-(i-1)+s.length,l=Math.max(1,Math.min(n,c)-t),u=[],d=String(o+2).length;for(let e=Math.max(0,o-1);e<=Math.min(a.length-1,o+1);e++){let t=e===o,n=t?`>`:` `,r=String(e+1).padStart(d,` `);if(u.push(`${n} ${r} | ${a[e]??``}`),t){let e=` `.repeat(2+d+3+i-1);u.push(`${e}${`^`.repeat(l)}`)}}return u.join(`
|
|
155
155
|
`)}function Mc(e){let t=kc(e.doc,e.path);if(!t)return;let n=t.range;if(!n)return;let[r,,i=r]=n,{line:a,column:o}=Ac(e.source,r),s=(0,fc.isCollection)(t)?jc(e.source,r,r+1,a,o):jc(e.source,r,i,a,o);return{file:e.file,line:a,column:o,snippet:s.length>0?s:void 0}}function Nc(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Fc(e.position):`start`in e||`end`in e?Fc(e):`line`in e||`column`in e?Pc(e):``}function Pc(e){return Ic(e&&e.line)+`:`+Ic(e&&e.column)}function Fc(e){return Pc(e&&e.start)+`-`+Pc(e&&e.end)}function Ic(e){return e&&typeof e==`number`?e:1}var Lc=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Nc(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Lc.prototype.file=``,Lc.prototype.name=``,Lc.prototype.reason=``,Lc.prototype.message=``,Lc.prototype.stack=``,Lc.prototype.column=void 0,Lc.prototype.line=void 0,Lc.prototype.ancestors=void 0,Lc.prototype.cause=void 0,Lc.prototype.fatal=void 0,Lc.prototype.place=void 0,Lc.prototype.ruleId=void 0,Lc.prototype.source=void 0;function Rc(e){this.content=e}Rc.prototype={constructor:Rc,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Rc(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Rc(n)},addToStart:function(e,t){return new Rc([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Rc(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Rc(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Rc.from(e),e.size?new Rc(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Rc.from(e),e.size?new Rc(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Rc.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Rc.from=function(e){if(e instanceof Rc)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Rc(t)};function zc(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=zc(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Bc(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=Bc(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var N=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return zc(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Bc(this,e,t,n)}findIndex(e){if(e==0)return Hc(0,e);if(e==this.size)return Hc(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?Hc(t+1,i):Hc(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};N.empty=new N([],0);const Vc={index:0,offset:0};function Hc(e,t){return Vc.index=e,Vc.offset=t,Vc}function Uc(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Uc(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Uc(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var Wc=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Uc(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};Wc.none=[];var Gc=class extends Error{},P=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=qc(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Kc(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(N.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};P.empty=new P(N.empty,0,0);function Kc(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(Kc(a.content,t-i-1,n-i-1)))}function qc(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),o=e.maybeChild(i);if(a==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=qc(o.content,t-a-1,n,o);return s&&e.replaceChild(i,o.copy(s))}function Jc(e,t,n){if(n.openStart>e.depth)throw new Gc(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Gc(`Inconsistent open depths`);return Yc(e,t,n,0)}function Yc(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Yc(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return el(a,nl(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return el(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=rl(n,e);return el(a,tl(e,i,o,t,r))}}function Xc(e,t){if(!t.type.compatibleContent(e.type))throw new Gc(`Cannot join `+t.type.name+` onto `+e.type.name)}function Zc(e,t,n){let r=e.node(n);return Xc(r,t.node(n)),r}function Qc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function $c(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Qc(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Qc(i.child(e),r);t&&t.depth==n&&t.textOffset&&Qc(t.nodeBefore,r)}function el(e,t){return e.type.checkContent(t),e.copy(t)}function tl(e,t,n,r,i){let a=e.depth>i&&Zc(e,t,i+1),o=r.depth>i&&Zc(n,r,i+1),s=[];return $c(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Xc(a,o),Qc(el(a,tl(e,t,n,r,i+1)),s)):(a&&Qc(el(a,nl(e,t,i+1)),s),$c(t,n,i,s),o&&Qc(el(o,nl(n,r,i+1)),s)),$c(r,null,i,s),new N(s)}function nl(e,t,n){let r=[];return $c(null,e,n,r),e.depth>n&&Qc(el(Zc(e,t,n+1),nl(e,t,n+1)),r),$c(t,null,n,r),new N(r)}function rl(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(N.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var il=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Wc.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new cl(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=sl.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else sl.set(t,r=new al);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%ol,i}},al=class{constructor(){this.elts=[],this.i=0}};const ol=12,sl=new WeakMap;var cl=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};const ll=Object.create(null);var ul=class e{constructor(e,t,n,r=Wc.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||N.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Uc(this.attrs,t||e.defaultAttrs||ll)&&Wc.sameSet(this.marks,n||Wc.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return P.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new P(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return Jc(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return il.resolveCached(this,e)}resolveNoCache(e){return il.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),fl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=N.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Wc.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Wc.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=N.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};ul.prototype.text=void 0;var dl=class e extends ul{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function fl(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var pl=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new ml(t,n);if(r.next==null)return e.empty;let i=hl(r);r.next&&r.err(`Unexpected trailing text`);let a=Tl(Sl(i));return El(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return N.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
156
156
|
`)}};pl.empty=new pl(!0);var ml=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function hl(e){let t=[];do t.push(gl(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function gl(e){let t=[];do t.push(_l(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function _l(e){let t=xl(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=yl(e,t);else break;return t}function vl(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function yl(e,t){let n=vl(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:vl(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function bl(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function xl(e){if(e.eat(`(`)){let t=hl(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=bl(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function Sl(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Cl(e,t){return t-e}function wl(e,t){let n=[];return r(t),n.sort(Cl);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Tl(e){let t=Object.create(null);return n(wl(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);wl(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new pl(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Cl);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function El(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function Dl(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Ol(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function kl(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function Al(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Nl(e,r,t[r]);return n}var jl=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=Al(e,n.attrs),this.defaultAttrs=Dl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pl.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ol(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new ul(this,this.computeAttrs(e),N.from(t),Wc.setFrom(n))}createChecked(e=null,t,n){return t=N.from(t),this.checkContent(t),new ul(this,this.computeAttrs(e),t,Wc.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=N.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(N.empty,!0);return i?new ul(this,e,t.append(i),Wc.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){kl(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:Wc.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function Ml(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var Nl=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?Ml(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Pl=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Al(e,r.attrs),this.excluded=null;let i=Dl(this.attrs);this.instance=i?new Wc(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Wc(this,Ol(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){kl(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},Fl=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Rc.from(e.nodes),t.marks=Rc.from(e.marks||{}),this.nodes=jl.compile(this.spec.nodes,this),this.marks=Pl.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=pl.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?Il(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:Il(this,n.split(` `))}this.nodeFromJSON=e=>ul.fromJSON(this,e),this.markFromJSON=e=>Wc.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof jl))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new dl(n,n.defaultAttrs,e,Wc.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function Il(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function Ll(e){return e.tag!=null}function Rl(e){return e.style!=null}var zl=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(Ll(e))this.tags.push(e);else if(Rl(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new Gl(this,t,!1);return n.addAll(e,Wc.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Gl(this,t,!0);return n.addAll(e,Wc.none,t.from,t.to),P.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(ql(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Jl(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Jl(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}};const Bl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Vl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hl={ol:!0,ul:!0};function Ul(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?1:0)|(t===`full`?2:0)}var Wl=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=Wc.none,this.match=i||(a&4?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(N.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&1)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=N.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Gl=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Ul(null,t.preserveWhitespace,0)|(n?4:0);i=r?new Wl(r.type,r.attrs,Wc.none,!0,t.topMatch||r.type.contentMatch,a):n?new Wl(null,null,Wc.none,!0,null,a):new Wl(e.schema.topNodeType,null,Wc.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&2?`full`:this.localPreserveWS||(r.options&1)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
@@ -321,4 +321,4 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
321
321
|
`).replace(/\n{3,}/g,`
|
|
322
322
|
|
|
323
323
|
`).replace(/\n+$/,``)}const nW={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),now:()=>Date.now()};function rW(){let e=!1,t=``,n=0;return r=>{let i=iW(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function iW(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}const aW=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],oW={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function sW(e,t=aW){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const cW={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,copilot:`github`,cline:`cline`};function lW(e){return e?cW[e]??`bot`:`bot`}function uW(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`/`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of l.split(`/`))if(e===`..`){if(u.length===0)return null;u.pop()}else e!==`.`&&e!==``&&u.push(e);return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}const dW=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function fW(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function pW(e){let t=e.trim();return dW.test(t)||t.startsWith(`//`)}function mW(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}let r=uW(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};if(pW(n)||n.startsWith(`/`))return{kind:`external`,url:n};let i=fW(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function hW(e,t){let n=e.trim();return n?pW(n)?{kind:`external`,url:t?`${n}#${t}`:n}:{kind:`doc`,docName:n,anchor:t?.trim()||null}:null}function gW(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function _W(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function vW(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function yW(e){return e.split(`/`).filter(e=>e!==``)}function bW(e,t){let n=vW(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function xW(e,t){let n=vW(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:yW(r).length}function SW(e,t){let n=yW(e),r=yW(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function CW(){let e=new Map;function t(t){let n=gW(t);if(n===``)return;let r=_W(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=gW(t),r=_W(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=vW(gW(n)),o=[],s=[];for(let e of i)bW(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=xW(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=xW(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=SW(a,vW(t));for(let r=1;r<e.length;r++){let i=e[r],o=SW(a,vW(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}export{wc as $,nW as A,Gt as At,tW as B,LU as C,bo as Ct,sW as D,Br as Dt,hW as E,Ca as Et,Gz as F,j as Ft,_B as G,WU as H,lW as I,k as It,Od as J,yU as K,Wz as L,Qe as Lt,Jz as M,Yt as Mt,hV as N,xt as Nt,CW as O,er as Ot,BB as P,A as Pt,vc as Q,eB as R,Yz as S,xs as St,mW as T,Sa as Tt,uW as U,vB as V,WB as W,Oc as X,N as Y,bc as Z,uB as _,Ws as _t,MU as a,Us as at,aU as b,M as bt,OU as c,Ts as ct,TU as d,Ms as dt,Ec as et,CU as f,Ps as ft,Uz as g,Ds as gt,Zz as h,ps as ht,kU as i,Cc as it,xU as j,qt as jt,rW as k,Ut as kt,wU as l,_s as lt,Xz as m,Os as mt,cB as n,Dc as nt,AU as o,Rs as ot,Qz as p,Bs as pt,zv as q,XU as r,Sc as rt,jU as s,ys as st,oW as t,Mc as tt,EU as u,cc as ut,sB as v,dc as vt,IU as w,vo as wt,$z as x,As as xt,lB as y,Is as yt,KU as z};
|
|
324
|
-
//# sourceMappingURL=dist-
|
|
324
|
+
//# sourceMappingURL=dist-BmX1Ns7C.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./dist-
|
|
1
|
+
import"./dist-BmX1Ns7C.mjs";import{l as e,o as t}from"./server-lock-BAi_a4NX-CRPhQdIH.mjs";import{D as n,Dt as r,E as i,K as a,P as o,Qt as s,_ as c,et as l,jt as u,q as d,rt as f}from"./dist-CQ3cd3s_.mjs";export{c as ProjectGitInitError,i as UiLockCollisionError,n as acquireUiLock,o as bootServer,a as createAssetServeMiddleware,d as createContentFilter,l as ensureProjectGit,f as getLogger,t as isProcessAlive,e as readServerLock,r as readUiLock,u as releaseUiLock,s as updateUiLockPort};
|