@open-livex-wiki/graph-ui 0.2.8 → 0.2.9

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.
@@ -380,7 +380,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
380
380
 
381
381
  `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=O_,c=!T1.jitless,l=c&&k_.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ty([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function iy(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=>!J_(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=>e1(e,r,E1())))}),t)}var ay=Z(`$ZodUnion`,(e,t)=>{$0.init(e,t),h1(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),h1(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),h1(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),h1(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>h_(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>iy(t,r,e,i)):iy(o,r,e,i)}}),oy=Z(`$ZodIntersection`,(e,t)=>{$0.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])=>cy(e,t,n)):cy(e,i,a)}});function sy(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(A_(e)&&A_(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=sy(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=sy(e[r],t[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function cy(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=sy(t.value,n.value);if(!c.valid){if(J_(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var ly=Z(`$ZodTuple`,(e,t)=>{$0.init(e,t);let n=t.items,r=T1.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=uy(n,`optin`),l=uy(n,`optout`);if(!t.rest){if(o.length<c)return i.issues.push({code:`too_small`,minimum:c,inclusive:!0,input:o,inst:e,origin:`array`}),i;o.length>n.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length),d=t.rest?a?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:o[e],issues:[]},a);t instanceof Promise?s.push(t.then(t=>{u[e]=t})):(u[e]=t,d&&!f&&t.issues.length&&(f=J_(t)))}if(t.rest&&!f){let e=n.length-1,r=o.slice(n.length),c=i.issues.length;for(let n of r){if(d&&i.issues.length!==c){if(J_(i,c))break;c=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>dy(t,i,e))):dy(r,i,e)}}return s.length?Promise.all(s).then(()=>fy(u,i,n,o,l)):fy(u,i,n,o,l)}});function uy(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function dy(e,t,n){e.issues.length&&t.issues.push(...X_(n,e.issues)),t.value[n]=e.value}function fy(e,t,n,r,i){for(let a=0;a<n.length;a++){let o=e[a],s=a<r.length;if(!s&&a>=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...X_(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var py=Z(`$ZodEnum`,(e,t)=>{$0.init(e,t);let n=l_(t.entries),r=new Set(n);e._zod.values=r,h1(e,`pattern`,e=>{let t=l_(e.def.entries).filter(e=>M_.has(typeof e));return RegExp(t.length?`^(${t.map(e=>N_(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),my=Z(`$ZodLiteral`,(e,t)=>{$0.init(e,t);let n=new Set(t.values);e._zod.values=n,h1(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?N_(e):e?N_(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hy=Z(`$ZodTransform`,(e,t)=>{$0.init(e,t),e._zod.optin=`optional`,T1.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w1(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 C1;return n.value=i,n}});function gy(e,t){return e.value=t.issues.length?void 0:t.value,e}var _y=Z(`$ZodOptional`,(e,t)=>{$0.init(e,t),h1(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,h1(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),h1(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h_(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>gy(e,t)):gy(e,r)}return t.innerType._zod.run(e,n)}}),vy=Z(`$ZodExactOptional`,(e,t)=>{_y.init(e,t),h1(e,`values`,e=>e.def.innerType._zod.values),h1(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yy=Z(`$ZodNullable`,(e,t)=>{$0.init(e,t),h1(e,`optin`,e=>e.def.innerType._zod.optin),h1(e,`optout`,e=>e.def.innerType._zod.optout),h1(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h_(t.source)}|null)$`):void 0}),h1(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),by=Z(`$ZodDefault`,(e,t)=>{$0.init(e,t),e._zod.optin=`defaulted`,h1(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xy(e,t)):xy(r,t)}});function xy(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Sy=Z(`$ZodPrefault`,(e,t)=>{$0.init(e,t),e._zod.optin=`defaulted`,h1(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Cy=Z(`$ZodNonOptional`,(e,t)=>{$0.init(e,t),h1(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wy(t,e)):wy(i,e)}});function wy(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ty(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e1(e,r,E1()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ey=Z(`$ZodCatch`,(e,t)=>{$0.init(e,t),h1(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),h1(e,`optout`,e=>e.def.innerType._zod.optout),h1(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ty(e,r,t,n)):Ty(e,r,t,n)}}),Dy=Z(`$ZodPipe`,(e,t)=>{$0.init(e,t),h1(e,`values`,e=>e.def.in._zod.values),h1(e,`optin`,e=>e.def.in._zod.optin),h1(e,`optout`,e=>e.def.out._zod.optout),h1(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Oy(e,t.in,n)):Oy(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oy(e,t.out,n)):Oy(r,t.out,n)}});function Oy(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ky=Z(`$ZodReadonly`,(e,t)=>{$0.init(e,t),h1(e,`propValues`,e=>e.def.innerType._zod.propValues),h1(e,`values`,e=>e.def.innerType._zod.values),h1(e,`optin`,e=>e.def.innerType?._zod?.optin),h1(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ay):Ay(r)}});function Ay(e){return e.memo||(e.value=Object.freeze(e.value)),e}var jy=Z(`$ZodCustom`,(e,t)=>{N0.init(e,t),$0.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=>My(t,n,r,e));My(i,n,r,e)}});function My(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(a1(e))}}var Ny=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Py=`~memo`,Fy=[];function Iy(e){return typeof e==`object`&&!!e}function Ly(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Ry=new WeakMap,zy=0,By=1,Vy=2;function Hy(e,t,n){let r=Ry.get(e);if(r!==void 0)return r?Vy:zy;if(t.has(e))return Vy;t.add(e);let i=zy,a=e=>{if(i!==Vy&&e?._zod){let r=Hy(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=zy;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?By:o.value?._zod?Hy(o.value,t,n):zy;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=v_(c);s(e?o(e,!0):By),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Hy(r,t,!1):By);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Uy(e,i)}function Uy(e,t){return t!==By&&Ry.set(e,t===Vy),t}function Wy(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Gy,Ky=[],qy={alloc(e,t,n){let r=Gy;if(!r)return n;Gy=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ky.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Yy(n,e.value))throw new Ny;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Hy(e,new Set,!1);if(i===zy)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Vy||r?n=!0:r=!0}let l=s.value;if(!Iy(l))return t(s,c);let u=c[Py];u||(u={buckets:new WeakMap,backEdges:void 0},c[Py]=u);let d;i===c?d=a:(d=Wy(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Ly(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Gy=d;let p=Ky.length,m=t(s,c);Gy=void 0;let h=Ky.length>p?Ky.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ly(e.issues):Fy),e)):(h&&(h.issues=m.issues.length?Ly(m.issues):Fy),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Jy(){return qy}function Yy(e,t){let n=e[Py]?.backEdges;return n!==void 0&&Iy(t)&&n.has(t)}var Xy=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(i1(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${F_(e.values[0])}`:`Invalid option: expected one of ${u_(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${u_(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Zy(){return{localeError:Xy()}}var Qy,$y=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 e2(){return new $y}(Qy=globalThis).__zod_globalRegistry??(Qy.__zod_globalRegistry=e2());var t2=globalThis.__zod_globalRegistry;function n2(e){return e.checks&&=[...e.checks],e}function r2(e,t){return new e(n2({type:`string`,...X(t)}))}function i2(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...X(t)})}function a2(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...X(t)})}function o2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...X(t)})}function s2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...X(t)})}function c2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...X(t)})}function l2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...X(t)})}function u2(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...X(t)})}function d2(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...X(t)})}function f2(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...X(t)})}function p2(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...X(t)})}function m2(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...X(t)})}function h2(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...X(t)})}function g2(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...X(t)})}function _2(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...X(t)})}function v2(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...X(t)})}function y2(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...X(t)})}function b2(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...X(t)})}function x2(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...X(t)})}function S2(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...X(t)})}function C2(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...X(t)})}function w2(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...X(t)})}function T2(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...X(t)})}function E2(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...X(t)})}function D2(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...X(t)})}function O2(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...X(t)})}function k2(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...X(t)})}function A2(e,t){return new e(n2({type:`number`,checks:[],...X(t)}))}function j2(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...X(t)})}function M2(e,t){return new e({type:`boolean`,...X(t)})}function N2(e){return new e({type:`unknown`})}function P2(e,t){return new e({type:`never`,...X(t)})}function F2(e,t){return new I0({check:`less_than`,...X(t),value:e,inclusive:!1})}function I2(e,t){return new I0({check:`less_than`,...X(t),value:e,inclusive:!0})}function L2(e,t){return new L0({check:`greater_than`,...X(t),value:e,inclusive:!1})}function R2(e,t){return new L0({check:`greater_than`,...X(t),value:e,inclusive:!0})}function z2(e,t){return new R0({check:`multiple_of`,...X(t),value:e})}function B2(e,t){return new B0({check:`max_length`,...X(t),maximum:e})}function V2(e,t){return new V0({check:`min_length`,...X(t),minimum:e})}function H2(e,t){return new H0({check:`length_equals`,...X(t),length:e})}function U2(e,t){return new W0({check:`string_format`,format:`regex`,...X(t),pattern:e})}function W2(e){return new G0({check:`string_format`,format:`lowercase`,...X(e)})}function G2(e){return new K0({check:`string_format`,format:`uppercase`,...X(e)})}function K2(e,t){return new q0({check:`string_format`,format:`includes`,...X(t),includes:e})}function q2(e,t){return new J0({check:`string_format`,format:`starts_with`,...X(t),prefix:e})}function J2(e,t){return new Y0({check:`string_format`,format:`ends_with`,...X(t),suffix:e})}function Y2(e){return new X0({check:`overwrite`,tx:e})}function X2(e){return Y2(t=>t.normalize(e))}function Z2(){return Y2(e=>e.trim())}function Q2(){return Y2(e=>e.toLowerCase())}function $2(){return Y2(e=>e.toUpperCase())}function e4(){return Y2(e=>E_(e))}function t4(e,t,n){return new e({type:`array`,element:t,...X(n)})}function n4(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...X(n)})}function r4(e,t){let n=i4(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(a1(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(a1(r))}},e(t.value,t)),t);return n}function i4(e,t){let n=new N0({check:`custom`,...X(t)});return n._zod.check=e,n}function a4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&__(e,t,n[t]);return e}function o4(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??t2,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function s4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function c4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,c4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&a4(o.schema,c),t.io===`input`&&v4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function l4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function u4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${l4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+l4(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>
382
382
 
383
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function d4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;d4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var f4=new Set([`type`,`properties`,`required`,`additionalProperties`]),p4=[`oneOf`,`anyOf`];function m4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function h4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!f4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??m4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}__(n,r,e.length===1?e[0]:h4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=m4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function g4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of f4)if(t in e)return;let n=t.filter(e=>p4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=h4(t);else{let e=n[0],i=p4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>h4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,a4(e,r))}function _4(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)):a4(i,s),a4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())d4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])g4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}a4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,__(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:b4(t,`input`,e.processors),output:b4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function v4(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 v4(r.element,n);if(r.type===`set`)return v4(r.valueType,n);if(r.type===`lazy`)return v4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return v4(r.innerType,n);if(r.type===`intersection`)return v4(r.left,n)||v4(r.right,n);if(r.type===`record`||r.type===`map`)return v4(r.keyType,n)||v4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:v4(r.in,n)||v4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(v4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(v4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(v4(e,n))return!0;return!!(r.rest&&v4(r.rest,n))}return!1}var y4=(e,t={})=>n=>{let r=o4({...n,processors:t});return c4(e,r),u4(r,e),_4(r,e)},b4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=o4({...i??{},target:a,io:t,processors:n});return c4(e,o),u4(o,e),_4(o,e)},x4=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},S4=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},C4=(e,t)=>{x4(e,`minimum`,t),S4(e,`maximum`,t)},w4=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},T4=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},E4=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},D4=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},O4=(e,t)=>x4(e,`minimum`,t.minimum),k4=(e,t)=>S4(e,`maximum`,t.maximum),A4=e=>(t,n)=>{D4(t,n.format);let[r,i]=e[n.format];x4(t,`minimum`,r),S4(t,`maximum`,i)},j4={greater_than:(e,t)=>x4(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>S4(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>w4(e,t.value),number_format:A4(L_),bigint_format:A4(R_),min_length:O4,max_length:k4,length_equals:(e,t)=>C4(e,t.length),min_size:O4,max_size:k4,size_equals:(e,t)=>C4(e,t.size),string_format:(e,t)=>{D4(e,t.format),t.pattern&&T4(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>E4(e,t.mime)};function M4(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)j4[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&x4(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&x4(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&S4(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&S4(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&w4(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&E4(t,i.mime);for(let e of i.patterns??[])T4(t,e);return t}var N4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},P4=new Map([[Fv,v0],[Lv,y0]]),F4=e=>P4.get(e)??e,I4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=M4(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=N4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(F4);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}))])}},L4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=M4(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):s4(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},R4=(e,t,n,r)=>{n.type=`boolean`},z4=(e,t,n,r)=>{n.not={}},B4=(e,t,n,r)=>{let i=l_(e._zod.def.entries);i.length===0?n.not={}:(i.every(e=>typeof e==`number`)&&(n.type=`number`),i.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=i)},V4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(s4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(s4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},H4=(e,t,n,r)=>{s4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{s4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},W4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=M4(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=c4(a.element,t,{...r,path:[...r.path,`items`]})};function G4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?G4(t.out):t.type===`catch`?G4(t.innerType):e._zod.optin}var K4=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&s4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)__(i.properties,e,c4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?G4(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=c4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},q4=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>c4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},J4=(e,t,n,r)=>{let i=e._zod.def,a=c4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=c4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Y4=(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)=>c4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?c4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?G4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=M4(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},X4=(e,t,n,r)=>{let i=e._zod.def,a=c4(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`}]},Z4=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Q4=Symbol();function $4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(s4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Q4):JSON.parse(o)}var e3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=$4(i.defaultValue,e,t,n,r);o!==Q4&&(n.default=o)},t3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=$4(i.defaultValue,e,t,n,r);o!==Q4&&(n._prefault=o)},n3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{s4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},r3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;c4(o,t,r);let s=t.seen.get(e);s.ref=o},i3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},a3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},o3=new WeakSet([Object.prototype,Error.prototype]);function s3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var c3=Z(`ZodError`,(e,t)=>{M1.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);o3.has(n)||(o3.add(n),s3(n,`format`,e=>t=>F1(e,t)),s3(n,`flatten`,e=>t=>P1(e,t)),s3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d_,2)}),s3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),l3=L1(c3),u3=R1(c3),d3=z1(c3),f3=V1(c3),p3=q1(c3),m3=J1(c3),h3=Y1(c3),g3=X1(c3),_3=Z1(c3),v3=Q1(c3),y3=$1(c3),b3=e0(c3);function x3(){T1.localeError||E1(Zy())}function S3(){T1.memoizer||E1({memoizer:Jy()})}var C3=Z(`ZodType`,(e,t)=>(x3(),$0.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return P_(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(V6(e,t))},superRefine(e,t){return this.check(H6(e,t))},overwrite(e){return this.check(Y2(e))},optional(){return C6(this)},exactOptional(){return T6(this)},nullable(){return D6(this)},nullish(){return C6(D6(this))},nonoptional(e){return N6(this,e)},array(){return s6(this)},or(e){return d6([this,e])},and(e){return p6(this,e)},transform(e){return L6(this,x6(e))},default(e){return k6(this,e)},prefault(e){return j6(this,e)},catch(e){return F6(this,e)},pipe(e){return L6(this,e)},readonly(){return z6(this)},describe(e){let t=this.clone();return t2.add(t,{description:e}),t},meta(...e){if(e.length===0)return t2.get(this);let t=this.clone();return t2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return c1(this,`~standard`,{...nv(this),jsonSchema:{input:b4(this,`input`),output:b4(this,`output`)}})},set"~standard"(e){s1(this,`~standard`,e)},parse:function e(t,n){return l3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await u3(this,t,n,{callee:e})},safeParse(e,t){return d3(this,e,t)},async safeParseAsync(e,t){return f3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){s1(this,`spa`,e)},validate(e,t){return W1(this,e,t)},validateAsync(e,t){return K1(this,e,t)},encode:function e(t,n){return p3(this,t,n,{callee:e})},decode:function e(t,n){return m3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await h3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await g3(this,t,n,{callee:e})},safeEncode(e,t){return _3(this,e,t)},safeDecode(e,t){return v3(this,e,t)},async safeEncodeAsync(e,t){return y3(this,e,t)},async safeDecodeAsync(e,t){return b3(this,e,t)},toJSONSchema(e){return y4(this,{})(e)},get description(){return t2.get(this)?.description},get _def(){return this._zod.def}}),w3=Z(`_ZodString`,(e,t)=>{rv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)},l1({format:e=>M4(e).format??null,minLength:e=>M4(e).minimum??null,maxLength:e=>M4(e).maximum??null},{regex(...e){return this.check(U2(...e))},includes(...e){return this.check(K2(...e))},startsWith(...e){return this.check(q2(...e))},endsWith(...e){return this.check(J2(...e))},min(...e){return this.check(V2(...e))},max(...e){return this.check(B2(...e))},length(...e){return this.check(H2(...e))},nonempty(...e){return this.check(V2(1,...e))},lowercase(e){return this.check(W2(e))},uppercase(e){return this.check(G2(e))},trim(){return this.check(Z2())},normalize(...e){return this.check(X2(...e))},toLowerCase(){return this.check(Q2())},toUpperCase(){return this.check($2())},slugify(){return this.check(e4())}})),T3=Z(`ZodString`,(e,t)=>{rv.init(e,t),w3.init(e,t)},{email(e){return this.check(i2(j3,e))},url(e){return this.check(u2(P3,e))},jwt(e){return this.check(T2(Y3,e))},emoji(e){return this.check(d2(F3,e))},guid(e){return this.check(a2(M3,e))},uuid(e){return this.check(o2(N3,e))},uuidv4(e){return this.check(s2(N3,e))},uuidv6(e){return this.check(c2(N3,e))},uuidv7(e){return this.check(l2(N3,e))},nanoid(e){return this.check(f2(I3,e))},cuid(e){return this.check(p2(L3,e))},cuid2(e){return this.check(m2(R3,e))},ulid(e){return this.check(h2(z3,e))},base64(e){return this.check(S2(K3,e))},base64url(e){return this.check(C2(q3,e))},xid(e){return this.check(g2(B3,e))},ksuid(e){return this.check(_2(V3,e))},ipv4(e){return this.check(v2(H3,e))},ipv6(e){return this.check(y2(U3,e))},cidrv4(e){return this.check(b2(W3,e))},cidrv6(e){return this.check(x2(G3,e))},e164(e){return this.check(w2(J3,e))},datetime(e){return this.check(E2(D3,e))},date(e){return this.check(D2(O3,e))},time(e){return this.check(O2(k3,e))},duration(e){return this.check(k2(A3,e))}});function Q(e){return r2(T3,e)}var E3=Z(`ZodStringFormat`,(e,t)=>{iv.init(e,t),w3.init(e,t)}),D3=Z(`ZodISODateTime`,(e,t)=>{Cv.init(e,t),E3.init(e,t)}),O3=Z(`ZodISODate`,(e,t)=>{wv.init(e,t),E3.init(e,t)}),k3=Z(`ZodISOTime`,(e,t)=>{Tv.init(e,t),E3.init(e,t)}),A3=Z(`ZodISODuration`,(e,t)=>{Ev.init(e,t),E3.init(e,t)}),j3=Z(`ZodEmail`,(e,t)=>{sv.init(e,t),E3.init(e,t)}),M3=Z(`ZodGUID`,(e,t)=>{av.init(e,t),E3.init(e,t)}),N3=Z(`ZodUUID`,(e,t)=>{ov.init(e,t),E3.init(e,t)}),P3=Z(`ZodURL`,(e,t)=>{hv.init(e,t),E3.init(e,t)}),F3=Z(`ZodEmoji`,(e,t)=>{gv.init(e,t),E3.init(e,t)}),I3=Z(`ZodNanoID`,(e,t)=>{_v.init(e,t),E3.init(e,t)}),L3=Z(`ZodCUID`,(e,t)=>{vv.init(e,t),E3.init(e,t)}),R3=Z(`ZodCUID2`,(e,t)=>{yv.init(e,t),E3.init(e,t)}),z3=Z(`ZodULID`,(e,t)=>{bv.init(e,t),E3.init(e,t)}),B3=Z(`ZodXID`,(e,t)=>{xv.init(e,t),E3.init(e,t)}),V3=Z(`ZodKSUID`,(e,t)=>{Sv.init(e,t),E3.init(e,t)}),H3=Z(`ZodIPv4`,(e,t)=>{Dv.init(e,t),E3.init(e,t)}),U3=Z(`ZodIPv6`,(e,t)=>{Av.init(e,t),E3.init(e,t)}),W3=Z(`ZodCIDRv4`,(e,t)=>{jv.init(e,t),E3.init(e,t)}),G3=Z(`ZodCIDRv6`,(e,t)=>{Nv.init(e,t),E3.init(e,t)}),K3=Z(`ZodBase64`,(e,t)=>{Iv.init(e,t),E3.init(e,t)}),q3=Z(`ZodBase64URL`,(e,t)=>{zv.init(e,t),E3.init(e,t)}),J3=Z(`ZodE164`,(e,t)=>{Bv.init(e,t),E3.init(e,t)}),Y3=Z(`ZodJWT`,(e,t)=>{Hv.init(e,t),E3.init(e,t)}),X3=Z(`ZodNumber`,(e,t)=>{Uv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r),e.isFinite=!0},l1({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=M4(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=M4(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=M4(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>M4(e).format??null},{gt(e,t){return this.check(L2(e,t))},gte(e,t){return this.check(R2(e,t))},min(e,t){return this.check(R2(e,t))},lt(e,t){return this.check(F2(e,t))},lte(e,t){return this.check(I2(e,t))},max(e,t){return this.check(I2(e,t))},int(e){return this.check($3(e))},safe(e){return this.check($3(e))},positive(e){return this.check(L2(0,e))},nonnegative(e){return this.check(R2(0,e))},negative(e){return this.check(F2(0,e))},nonpositive(e){return this.check(I2(0,e))},multipleOf(e,t){return this.check(z2(e,t))},step(e,t){return this.check(z2(e,t))},finite(){return this}}));function Z3(e){return A2(X3,e)}var Q3=Z(`ZodNumberFormat`,(e,t)=>{Wv.init(e,t),X3.init(e,t)});function $3(e){return j2(Q3,e)}var e6=Z(`ZodBoolean`,(e,t)=>{Gv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)});function t6(e){return M2(e6,e)}var n6=Z(`ZodUnknown`,(e,t)=>{Kv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function r6(){return N2(n6)}var i6=Z(`ZodNever`,(e,t)=>{qv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)});function a6(e){return P2(i6,e)}var o6=Z(`ZodArray`,(e,t)=>{S3(),Zv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(V2(e,t))},nonempty(e){return this.check(V2(1,e))},max(e,t){return this.check(B2(e,t))},length(e,t){return this.check(H2(e,t))},unwrap(){return this.element}});function s6(e,t){return t4(o6,e,t)}var c6=Z(`ZodObject`,(e,t)=>{S3(),ry.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),g1(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _6(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w_(this._zod.def,{catchall:r6()}))},loose(){return this.clone(w_(this._zod.def,{catchall:r6()}))},strict(){return this.clone(w_(this._zod.def,{catchall:a6()}))},strip(){return this.clone(w_(this._zod.def,{catchall:void 0}))},extend(e){return H_(this,e)},safeExtend(e){return W_(this,e)},merge(e){return G_(this,e)},pick(e){return z_(this,e)},omit(e){return V_(this,e)},partial(...e){return K_(S6,this,e[0])},exactPartial(...e){return K_(w6,this,e[0],`exactPartial`)},required(...e){return q_(M6,this,e[0])}});function l6(e,t){return new c6({type:`object`,shape:e??{},...X(t)})}var u6=Z(`ZodUnion`,(e,t)=>{ay.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.options=t.options});function d6(e,t){return new u6({type:`union`,options:e,...X(t)})}var f6=Z(`ZodIntersection`,(e,t)=>{oy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)});function p6(e,t){return new f6({type:`intersection`,left:e,right:t})}var m6=Z(`ZodTuple`,(e,t)=>{S3(),ly.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new S6({type:`optional`,innerType:e}))})}});function h6(e,t,n){let r=t instanceof $0;return new m6({type:`tuple`,items:e,rest:r?t:null,...X(r?n:t)})}var g6=Z(`ZodEnum`,(e,t)=>{py.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new g6({...t,checks:[],...X(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 g6({...t,checks:[],...X(r),entries:i})}});function _6(e,t){return new g6({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...X(t)})}var v6=Z(`ZodLiteral`,(e,t)=>{my.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(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 y6(e,t){return new v6({type:`literal`,values:Array.isArray(e)?e:[e],...X(t)})}var b6=Z(`ZodTransform`,(e,t)=>{S3(),hy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w1(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(a1(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(a1(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function x6(e){return new b6({type:`transform`,transform:e})}var S6=Z(`ZodOptional`,(e,t)=>{_y.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function C6(e){return new S6({type:`optional`,innerType:e})}var w6=Z(`ZodExactOptional`,(e,t)=>{vy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function T6(e){return new w6({type:`optional`,innerType:e})}var E6=Z(`ZodNullable`,(e,t)=>{yy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function D6(e){return new E6({type:`nullable`,innerType:e})}var O6=Z(`ZodDefault`,(e,t)=>{by.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function k6(e,t){return new O6({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var A6=Z(`ZodPrefault`,(e,t)=>{Sy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function j6(e,t){return new A6({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var M6=Z(`ZodNonOptional`,(e,t)=>{Cy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function N6(e,t){return new M6({type:`nonoptional`,innerType:e,...X(t)})}var P6=Z(`ZodCatch`,(e,t)=>{Ey.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function F6(e,t){return new P6({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:v1(t)})}var I6=Z(`ZodPipe`,(e,t)=>{Dy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r),e.in=t.in,e.out=t.out});function L6(e,t){return new I6({type:`pipe`,in:e,out:t})}var R6=Z(`ZodReadonly`,(e,t)=>{ky.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z6(e){return new R6({type:`readonly`,innerType:e})}var B6=Z(`ZodCustom`,(e,t)=>{jy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r)});function V6(e,t={}){return n4(B6,e,t)}function H6(e,t){return r4(e,t)}var U6=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,W6=/^[a-z0-9]+(?:-[a-z0-9]+)*\/[a-z0-9]+(?:-[a-z0-9]+)*$/,G6=/^[0-9a-f]{7,40}$/i,K6=/^[0-9a-f]{64}$/i;function q6(e){return e.replace(/\\/g,`/`)}function J6(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function Y6(e){if(typeof e!=`string`)return!1;let t=e.trim();if(t.length===0||J6(t))return!1;let n=q6(t);if(n.startsWith(`/`)||/^[a-zA-Z]:/.test(n))return!1;let r=n.split(`/`),i=0;for(let e of r){if(e===`..`)return!1;e.length>0&&e!==`.`&&(i+=1)}return i>0}var X6=l6({repo:Q().min(1),gitUrl:Q().min(1).optional(),branch:Q().min(1).optional(),localPath:Q().min(1).optional()}),Z6=l6({source:Q().min(1),localPath:Q().min(1).optional(),description:Q().optional()}),Q6=l6({autoMergeMinConfidence:Z3().min(0).max(1).default(.9),requireZeroPendingForAutoMerge:t6().default(!0),protectedSchemas:s6(_6([`domain-index/v1`,`infrastructure-index/v1`,`scene-index/v1`])).default([`domain-index/v1`,`infrastructure-index/v1`])});l6({version:d6([Z3().int().positive(),Q().min(1)]).default(1),name:Q().min(1),description:Q().optional(),domainsDir:Q().min(1).refine(Y6,`domainsDir must be a relative subdirectory inside the wiki root (no absolute paths or '..' segments)`).default(`domains`),infrastructureDomains:s6(Q().regex(U6,`Domain ID must be kebab-case`)).default([`business-infrastructure`]),repositories:s6(X6).optional(),sources:s6(Z6).optional(),governance:Q6.optional()});var $6=l6({repo:Q().min(1),gitUrl:Q().min(1),branch:Q().min(1).optional(),commitId:Q().regex(G6,`commitId must be a 7-40 character hexadecimal Git SHA`),paths:s6(Q().min(1)).optional()}),eb=l6({source:Q().min(1),path:Q().min(1).optional(),sha256:Q().regex(K6,`sha256 must be a 64-character hexadecimal SHA-256 digest`).optional(),pageCount:Z3().int().positive().optional()}),tb=_6([`interface`,`class`,`function`,`config`,`table`,`document`,`section`,`figure`,`dataset`]),nb=l6({repo:Q().min(1).optional(),source:Q().min(1).optional(),file:Q().min(1),symbol:Q().min(1).optional(),kind:tb.optional(),pageRange:h6([Z3().int().positive(),Z3().int().positive()]).refine(([e,t])=>e<=t,`pageRange start must be <= end`).optional(),caption:Q().min(1).optional(),sectionTitle:Q().min(1).optional(),assetId:Q().min(1).optional(),handle:Q().regex(/^[A-Za-z0-9_-]{1,24}$/,`handle must match /^[A-Za-z0-9_-]{1,24}$/`).optional(),scopeNote:Q().min(1).optional()}).refine(e=>!!(e.repo||e.source),{message:`Anchor must specify either repo or source`,path:[`repo`]}),rb=l6({architecture:Z3().min(0).max(1),chain:Z3().min(0).max(1),config:Z3().min(0).max(1),experiment:Z3().min(0).max(1)});l6({schema:y6(`domain-index/v1`),domainId:Q().regex(U6,`domainId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`)});var ib=s6(Q().regex(W6,`autoDependsOn entry must match <domainId>/<sceneId> in kebab-case`)).optional();l6({schema:y6(`scene-index/v1`),sceneId:Q().regex(U6,`sceneId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`),confidence:Z3().min(0).max(1),confidenceBreakdown:rb.optional(),autoDependsOn:ib,dependsOn:s6(Q().regex(W6,`dependsOn entry must match <domainId>/<sceneId> in kebab-case`)),repositories:s6($6),sources:s6(eb).optional(),anchors:s6(nb).optional()}).superRefine((e,t)=>{if(e.confidenceBreakdown){let n=Math.min(...Object.values(e.confidenceBreakdown));Math.abs(e.confidence-n)>=1e-6&&t.addIssue({code:`custom`,path:[`confidence`],message:`confidence (${e.confidence}) must equal min(confidenceBreakdown) (${n})`})}}),l6({schema:y6(`infrastructure-index/v1`),sceneId:Q().regex(U6,`sceneId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`),autoDependsOn:ib,dependsOn:s6(Q().regex(W6,`dependsOn entry must match <domainId>/<sceneId> in kebab-case`)).optional().default([]),repositories:s6($6).optional().default([]),sources:s6(eb).optional(),confidence:Z3().min(0).max(1).optional(),confidenceBreakdown:rb.optional(),anchors:s6(nb).optional()}).superRefine((e,t)=>{if(e.confidence!==void 0&&e.confidenceBreakdown){let n=Math.min(...Object.values(e.confidenceBreakdown));Math.abs(e.confidence-n)>=1e-6&&t.addIssue({code:`custom`,path:[`confidence`],message:`confidence (${e.confidence}) must equal min(confidenceBreakdown) (${n})`})}});var ab=_6([`domain`,`scene`,`infrastructure`]),ob=_6([`belongs_to`,`depends_on`]),sb=_6([`fresh`,`stale`,`unverified`]),cb=l6({id:Q().min(1),type:ab,domainId:Q().regex(U6),sceneId:Q().regex(U6).optional(),title:Q().min(1),aliases:s6(Q()),summary:Q(),maintainers:s6(Q()),path:Q().min(1),confidence:Z3().min(0).max(1).optional(),confidenceBreakdown:rb.optional(),dependsOn:s6(Q()).default([]),dependents:s6(Q()).optional(),repositories:s6($6).default([]),sources:s6(eb).optional(),hasPendingConfirmations:t6().optional(),stale:t6().optional(),staleReason:Q().optional(),freshnessStatus:sb.optional(),markdown:Q().optional(),detailPaths:s6(Q()).optional()}),lb=l6({id:Q().min(1),source:Q().min(1),target:Q().min(1),type:ob,crossDomain:t6().optional()}),ub=l6({domainCount:Z3().int().nonnegative(),sceneCount:Z3().int().nonnegative(),infrastructureCount:Z3().int().nonnegative(),dependencyEdgeCount:Z3().int().nonnegative(),totalNodes:Z3().int().nonnegative(),totalEdges:Z3().int().nonnegative()}),db=l6({schema:y6(`livex-graph/v1`),generatedAt:Q().min(1),snapshot:Q().optional(),wikiName:Q().min(1),stats:ub,nodes:s6(cb),edges:s6(lb)});new Set(`pre post mid early late circa non anti sub pro per via from since until through after before between during under over into onto upon within without around about near year years page pages line lines item items part parts step steps note notes rule rules code codes port ports rfc iso iec ieee ansi utf sha md http https ftp doi isbn issn pp fig figs sec secs tab tabs vol vols no nos ch chap eq eqs ver rel rev art par para ed eds ca cf vs est approx jan feb mar apr may jun jul aug sep sept oct nov dec`.split(` `)),new Set(`the and for with from into onto upon within without through across after before between during about what which when where whose whom how many much were was are been being have has had does did can could would should shall there their theirs these those this that than then also both each in on at to of by or as is be an if do it we so`.split(` `));var fb=/\b(?:figures?|fig|tables?|tab|tbl|section|sec|chapter|chap|appendix|part|exhibit|chart)[ \t]+(?:\d{1,4}[a-z]?|[ivxlcdm]{1,5}|[a-d])\b/i;RegExp(`(\\b\\d{4}-\\d{2}-\\d{2}[T \\t]+\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+\\-\\u2212]\\d{2}:?\\d{2})?\\b|\\b(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d)?\\b|${fb.source})`,`gi`),RegExp(`^${fb.source}$`,`i`);var pb=[`关于`,`请问`,`帮我`,`如何`,`怎么`,`什么`,`查询`,`查看`,`排查`],mb=[`相关`,`模块`,`逻辑`,`功能`,`问题`,`异常`,`吗`,`呢`,`了`],hb=[`的`,`与`,`和`,`及`,`在`];[...pb,...mb,...hb],new Set(`annual monthly weekly daily quarterly yearly table tables report reports return returns brief briefs bulletin bulletins circular circulars summary summaries dataset datasets codebook codebooks guide guides manual manuals handbook version versions edition release statistics statistical operations approved decisions document documents corpus data overview index notes non one two three four five pdf md txt json csv xml html yaml yml`.split(` `));var gb={mwh:`mwh|megawatt[- ]hours?|兆瓦时`,kwh:`kwh|kilowatt[- ]hours?|千瓦时`,gwh:`gwh|gigawatt[- ]hours?|吉瓦时`,twh:`twh|terawatt[- ]hours?|太瓦时`,wh:`wh|watt[- ]hours?|瓦时`,mw:`mw|megawatts?|兆瓦`,kw:`kw|kilowatts?|千瓦`,gw:`gw|gigawatts?|吉瓦`,tw:`tw|terawatts?|太瓦`,percentage_points:`percentage[- ]points?|pct\\.?\\s*pts?\\.?|pp|百分点`,percent:`%|percent(?:age)?(?!\\s*[- ]?points?)|pct\\.?(?!\\s*pts?)|百分比`,usd:`usd|us\\$|美元`,eur:`eur|€|欧元`,cny:`cny|rmb|人民币`,tonne:`tonnes?|metric tons?|吨`,km:`km|kilometers?|kilometres?|公里|千米`,kg:`kg|kilograms?|千克|公斤`,hz:`hz`,khz:`khz`,mhz:`mhz`,ghz:`ghz`,gbp:`gbp|£|英镑`,jpy:`jpy|¥|日元`,m3:`m3|cubic[- ](?:metre|meter)s?|cu\\.?\\s*m|立方米`,m2:`m2|square[- ](?:metre|meter)s?|sq\\.?\\s*m|平方米`,liter:`lit(?:re|er)s?|公升`,second:`seconds?|secs?|秒`,minute:`minutes?|mins?|分钟`,hour:`hours?|hrs?|小时`,day:`days?`,trip:`trips?|人次|趟次|乘次`},_b={net_generation:`net generation|净发电量|净发电`,nameplate_rating:`nameplate rating|nameplate capacity|installed capacity|rated capacity|装机容量|装机额定值|额定容量`,annual_output:`annual output|annual generation|全年发电量|年发电量|年产量`,revenue:`revenue|营收|营业收入`,cost:`cost|成本|费用`,emissions:`emissions|排放量|排放`,throughput:`throughput|吞吐量`,ridership:`ridership|客流量|客运量`,budget:`budget|预算`};function vb(e){return Object.entries(e).map(([e,t])=>{let[n,...r]=t.split(/\|(?=\p{Script=Han})/u);return r.unshift(`(?<![a-z0-9])(?:${n})(?![a-z0-9])`),`(?<${e}>${r.join(`|`)})`}).join(`|`)}var yb=String.raw`(?:\b(?:not|excluding|except|without|rather\s+than|instead\s+of)\s+(?:in\s+)?|(?:而不是|而非|不是|不含|非)\s*)`,bb=vb(gb),xb=vb(_b);RegExp(`(?<negated>${yb})?(?:${bb})`,`gi`),new RegExp(xb,`gi`),RegExp(`${yb}(?:${xb})`,`gi`),new Map(Object.entries({h:`h hr hrs hour hours 小时`,s:`s sec secs second seconds 秒`,min:`min mins minute minutes 分钟`,d:`d day days 天`,yr:`yr yrs year years 年`,capita:`person persons people capita 人`,visit:`visit visits 人次`,resident:`resident residents 居民`,trip:`trip trips 趟次 乘次`,unit:`unit units`,km:`km`,m2:`m2`,m3:`m3`,kg:`kg`,tonne:`tonne tonnes`}).flatMap(([e,t])=>t.split(` `).map(t=>[t,e]))),new Set(`in on at for of by to from with into over across within under between per as the a an and or not only all each both this that these those it its their show showing shown find give provide display list use using uses verify check me measured reported expressed recorded stated denominated figure figures fig chart charts graph graphs table tables plot plots original official published report reports edition section page pages unit units value values data number numbers bar line pie scatter`.split(` `)),new Set(`the and for with from into through under trace return cite page pages step steps exact quote quotes each both every show find give`.split(` `));var Sb=new Set([`fresh`,`stale`,`unverified`]);function Cb(e){let t=db.safeParse(e);if(!t.success)return{success:!1,message:t.error.issues[0]?.message??`schema mismatch`};let n=typeof e==`object`&&e&&Array.isArray(e.nodes)?e.nodes??[]:[],r=[];for(let e=0;e<t.data.nodes.length;e+=1){let i=t.data.nodes[e],a=n[e];if(typeof a==`object`&&a&&`freshnessStatus`in a&&a.freshnessStatus!==void 0){let e=a.freshnessStatus;if(typeof e!=`string`||!Sb.has(e))return{success:!1,message:`Invalid freshnessStatus "${String(e)}" on node "${i.id}"`};r.push({...i,freshnessStatus:e})}else r.push(i)}return{success:!0,data:{...t.data,nodes:r}}}function wb(e){return e.stale===!0||e.freshnessStatus===`stale`}function Tb(e){return wb(e)?{status:`stale`,label:`待更新 · Stale`,description:e.staleReason??`关联代码仓 HEAD 已领先当前锚定 Commit,建议执行增量更新。`}:e.freshnessStatus===`fresh`?{status:`fresh`,label:`已回源核验 · Fresh`,description:`已与本地代码仓当前 HEAD 比对,锚定路径与符号未发生滞后变更。`}:{status:`unverified`,label:`静态快照 · 未连仓核验`,description:`当前图谱未提供 --repos-dir 实时比对源码仓,仅展示知识库静态锚定快照。`}}function Eb(e){return`./api/nodes/${encodeURIComponent(e)}/markdown`}async function Db(e,t={}){let n=t.cache?.get(e);if(n!==void 0)return{status:`loaded`,markdown:n};let r=t.fetchImpl??(typeof fetch<`u`?fetch:void 0);if(!r)return{status:`unavailable`};try{let n=await r(Eb(e),{cache:`no-store`,...t.signal?{signal:t.signal}:{}});if(t.signal?.aborted)return{status:`aborted`};if(!n.ok)return{status:`unavailable`};let i=await n.json();if(typeof i==`object`&&i&&typeof i.markdown==`string`){let n=i.markdown;return t.cache?.set(e,n),{status:`loaded`,markdown:n}}return{status:`unavailable`}}catch{return t.signal?.aborted?{status:`aborted`}:{status:`unavailable`}}}function Ob(e,t){return e<t?`显示 ${e} / ${t} 节点`:`${t} 节点`}function kb(e,t){let n=t.trim().toLowerCase();return!!(!n||e.id.toLowerCase().includes(n)||e.title.toLowerCase().includes(n)||e.domainId.toLowerCase().includes(n)||e.sceneId?.toLowerCase().includes(n)||e.aliases.some(e=>e.toLowerCase().includes(n))||e.summary.toLowerCase().includes(n))}function Ab(e,t,n=12){let r=t.trim().toLowerCase();if(!r)return[];let i=[];for(let t of e.nodes){let e=0,n=t.id.toLowerCase(),a=t.title.toLowerCase(),o=t.sceneId?.toLowerCase()??``,s=t.aliases.map(e=>e.toLowerCase());if(n===r||a===r||o===r||s.includes(r)?e=100:a.startsWith(r)||n.startsWith(r)||o.startsWith(r)||s.some(e=>e.startsWith(r))?e=80:a.includes(r)||s.some(e=>e.includes(r))?e=65:n.includes(r)||t.domainId.toLowerCase().includes(r)?e=50:t.summary.toLowerCase().includes(r)&&(e=30),e>0){let n=t.type===`domain`?3:t.type===`scene`?2:1;i.push({node:t,score:e+n})}}return i.sort((e,t)=>t.score-e.score||e.node.id.localeCompare(t.node.id)),i.slice(0,n).map(e=>e.node)}function jb(e,t){let n=e;switch(t){case`all`:return!0;case`stale`:return wb(n);case`fresh`:return!wb(n)&&n.freshnessStatus===`fresh`;case`unverified`:return wb(n)?!1:n.freshnessStatus===`unverified`||n.freshnessStatus!==`fresh`&&e.type!==`domain`;case`pending`:return!!e.hasPendingConfirmations;case`low_confidence`:return e.confidence!==void 0&&e.confidence<.9}}function Mb(e,t={}){let n=t.domainId?.trim()??`all`,r=t.nodeType??`all`,i=t.health??`all`,a=t.query?.trim()??``,o=t.showBelongsTo??!0,s=new Set,c=new Set,l=[];for(let t of e.nodes){let e=a.length>0&&kb(t,a);e&&s.add(t.id),n&&n!==`all`&&t.domainId!==n||r!==`all`&&t.type!==r||!jb(t,i)||a.length>0&&!e||(c.add(t.id),l.push(t))}return{nodes:l,edges:e.edges.filter(e=>!o&&e.type===`belongs_to`?!1:c.has(e.source)&&c.has(e.target)),matchedNodeIds:s,visibleNodeIds:c}}var Nb=[{bg:`#fff7ed`,border:`#fdba74`,text:`#7c2d12`},{bg:`#f5f3ff`,border:`#c4b5fd`,text:`#3b0764`},{bg:`#ecfeff`,border:`#67e8f9`,text:`#164e63`},{bg:`#fefce8`,border:`#fde047`,text:`#713f12`},{bg:`#f0fdf4`,border:`#86efac`,text:`#14532d`},{bg:`#eff6ff`,border:`#93c5fd`,text:`#1e3a8a`},{bg:`#fdf2f8`,border:`#f9a8d4`,text:`#831843`},{bg:`#f8fafc`,border:`#cbd5e1`,text:`#1e293b`}];function Pb(e){return e<=0?0:e===1?1:e<=4?2:e<=18?3:4}function Fb(e){return e<=0?0:e===1?1:e<=4?2:e<=12?3:e<=24?4:5}function Ib(e,t,n,r,i,a,o,s){if(e===0||t===0)return[];let c=[],l=Math.ceil(e/t);for(let u=0;u<l;u+=1){let l=u*t,d=Math.min(t,e-l),f=n-(d*i+(d-1)*o)/2,p=r+a/2+u*(a+s);for(let e=0;e<d;e+=1){let t=f+i/2+e*(i+o);c.push({x:t,y:p})}}return c}function Lb(e,t={}){let n=t.domainCardWidth??128,r=t.domainCardHeight??36,i=t.sceneCardWidth??124,a=t.sceneCardHeight??32,o=t.infraCardWidth??120,s=t.infraCardHeight??30,c=t.cellGapX??12,l=t.cellGapY??12,u=t.columnPaddingX??22,d=t.columnGap??26,f=t.routingChannelHeight??76,p=new Set(t.infrastructureDomains??[`business-infrastructure`]);if(e.length===0)return{positions:{},nodeBoxes:{},columns:[],tiers:[],bounds:{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}};let m=new Map,h=e=>{let t=m.get(e);return t||(t={domainId:e,scenes:[],infras:[]},m.set(e,t)),t};for(let t of e){let e=h(t.domainId);t.type===`domain`?e.domainNode=t:t.type===`scene`?e.scenes.push(t):e.infras.push(t)}for(let e of m.values())e.scenes.sort((e,t)=>e.id.localeCompare(t.id)),e.infras.sort((e,t)=>e.id.localeCompare(t.id));let g=e=>p.has(e.domainId)||e.infras.length>0&&e.scenes.length===0?!0:e.infras.length>e.scenes.length,_=Array.from(m.values()).sort((e,t)=>{let n=g(e);if(n!==g(t))return n?-1:1;if(n){let n=t.infras.length-e.infras.length;return n===0?e.domainId.localeCompare(t.domainId):n}let r=e.scenes.length+e.infras.length,i=t.scenes.length+t.infras.length;return i===r?e.domainId.localeCompare(t.domainId):i-r}).map(e=>{let t=Pb(e.scenes.length),r=Fb(e.infras.length),a=t>0?Math.ceil(e.scenes.length/t):0,s=r>0?Math.ceil(e.infras.length/r):0,l=t>0?t*i+(t-1)*c:0,d=r>0?r*o+(r-1)*c:0,f=Math.max(n,l,d)+u*2;return{bucket:e,isInfra:g(e),sceneCols:t,infraCols:r,sceneRows:a,infraRows:s,columnWidth:f}}),v=Math.max(0,..._.map(e=>e.sceneRows)),y=Math.max(0,..._.map(e=>e.infraRows)),b=Math.max(2,v),x=24+r/2,S=24+r+26,C=S+b*a+(b-1)*l,w=C+f,T=y>0?w+y*s+(y-1)*l:w+s,E=(y>0?T:C)+28,D=+E,O={},k={},A=[],j=116;_.forEach((e,t)=>{let{bucket:u,isInfra:f,sceneCols:p,infraCols:m,columnWidth:h}=e,g=f?0:(t-1+Nb.length)%(Nb.length-1)+1,_=j+h/2;if(A.push({domainId:u.domainId,title:u.domainNode?.title??u.domainId,isInfrastructureDomain:f,columnIndex:t,x:_,y:0+D/2,left:j,top:0,width:h,height:D,paletteIndex:g,sceneCount:u.scenes.length,infrastructureCount:u.infras.length}),u.domainNode){let e=u.domainNode;O[e.id]={x:_,y:x},k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:_,y:x,width:n,height:r,left:_-n/2,top:x-r/2,right:_+n/2,bottom:x+r/2,columnIndex:t,tier:`domain`,paletteIndex:g}}let v=Ib(u.scenes.length,p,_,S,i,a,c,l);u.scenes.forEach((e,n)=>{let r=v[n];O[e.id]=r,k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:r.x,y:r.y,width:i,height:a,left:r.x-i/2,top:r.y-a/2,right:r.x+i/2,bottom:r.y+a/2,columnIndex:t,tier:`scene`,paletteIndex:g}});let y=Ib(u.infras.length,m,_,w,o,s,c,l);u.infras.forEach((e,n)=>{let r=y[n];O[e.id]=r,k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:r.x,y:r.y,width:o,height:s,left:r.x-o/2,top:r.y-s/2,right:r.x+o/2,bottom:r.y+s/2,columnIndex:t,tier:`infrastructure`,paletteIndex:g}}),j+=h+d});let M=S+Math.min(C-S,180)/2,N=w+Math.min(T-w,180)/2,P=[{id:`01`,label:`01 领域`,x:46,y:x,width:76,height:28},{id:`02`,label:`02 场景`,x:46,y:M,width:76,height:28},...y>0?[{id:`03`,label:`03 知识`,x:46,y:N,width:76,height:28}]:[]],F=Math.max(116,j-d),I=E;return{positions:O,nodeBoxes:k,columns:A,tiers:P,bounds:{minX:0,minY:0,maxX:F,maxY:I,width:+F,height:+I}}}function Rb(e){let t={};if(e.length===0)return t;let n=e.filter(e=>e.type===`infrastructure`).slice().sort((e,t)=>e.id.localeCompare(t.id)),r=Array.from(new Set(e.map(e=>e.domainId))).sort((e,t)=>e.localeCompare(t));n.forEach((e,n)=>{let r=n*2.399963,i=55+Math.sqrt(n+1)*48;t[e.id]={x:Math.cos(r)*i,y:Math.sin(r)*i}});let i=Math.max(260,140+Math.sqrt(e.length)*45);return r.forEach((n,a)=>{let o=2*Math.PI*a/Math.max(1,r.length)-Math.PI/2,s=Math.cos(o)*i,c=Math.sin(o)*i,l=e.find(e=>e.type===`domain`&&e.domainId===n);l&&(t[l.id]={x:s,y:c});let u=e.filter(e=>e.type===`scene`&&e.domainId===n).slice().sort((e,t)=>e.id.localeCompare(t.id));u.forEach((e,n)=>{let r=o+(n-(u.length-1)/2)*.42+(n%2==0?-.08:.08),i=110+Math.floor(n/4)*72;t[e.id]={x:s+Math.cos(r)*i,y:c+Math.sin(r)*i}})}),t}function zb(e,t=15){let n=0,r=``;for(let i of e){if(n+=i.charCodeAt(0)>255?2:1,n>t)return`${r}…`;r+=i}return r}function Bb(e){return e===`organic`?[{selector:`node.data-node`,style:{shape:`ellipse`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`data(bgColor)`,"border-width":`data(borderWidth)`,"border-color":`data(borderColor)`,label:`data(label)`,"font-size":`data(fontSize)`,"font-weight":`data(fontWeight)`,color:`data(textColor)`,"text-valign":`bottom`,"text-halign":`center`,"text-margin-y":6,"text-background-color":`#fbfcfe`,"text-background-opacity":.82,"text-background-padding":`2px`,"text-background-shape":`roundrectangle`,"overlay-opacity":0,"z-index":10}},{selector:`edge.edge-belongs-to`,style:{"curve-style":`bezier`,"line-style":`dashed`,"line-dash-pattern":[5,4],"line-color":`#cbd5e1`,width:1,opacity:.72,"target-arrow-shape":`none`,"overlay-opacity":0}},{selector:`edge.edge-depends-on`,style:{"curve-style":`bezier`,"line-style":`solid`,"line-color":`#94a3b8`,width:1.25,opacity:.78,"target-arrow-shape":`vee`,"target-arrow-color":`#94a3b8`,"arrow-scale":.72,"overlay-opacity":0}},{selector:`node.is-focus`,style:{"border-width":3.5,"border-color":`#4f46e5`,"z-index":30}},{selector:`node.is-neighbor`,style:{"border-width":2.5,"border-color":`#6366f1`,"z-index":25}},{selector:`node.search-match`,style:{"border-width":3.5,"border-color":`#4f46e5`,"z-index":28}},{selector:`edge.is-active-edge.edge-depends-on`,style:{"line-color":`#3b82f6`,"target-arrow-color":`#3b82f6`,width:2.1,opacity:.98,"z-index":25}},{selector:`edge.is-active-edge.edge-belongs-to`,style:{"line-color":`#64748b`,width:1.6,opacity:.9,"z-index":24}},{selector:`.is-dimmed, .search-dimmed`,style:{opacity:.18}}]:[{selector:`node.decor-column`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`#f8fafc`,"background-opacity":.55,"border-width":1,"border-color":`#e2e8f0`,label:``,events:`no`,"overlay-opacity":0,"z-index":1}},{selector:`node.decor-tier`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`#ffffff`,"border-width":1,"border-color":`#e2e8f0`,label:`data(label)`,"font-size":11,"font-weight":700,color:`#334155`,"text-valign":`center`,"text-halign":`center`,events:`no`,"overlay-opacity":0,"z-index":2}},{selector:`node.data-node`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`data(bgColor)`,"border-width":`data(borderWidth)`,"border-color":`data(borderColor)`,label:`data(cardLabel)`,"font-size":11,"font-weight":`data(fontWeight)`,color:`data(textColor)`,"text-valign":`center`,"text-halign":`center`,"text-wrap":`none`,"overlay-opacity":0,"z-index":12}},{selector:`edge.edge-belongs-to`,style:{"curve-style":`taxi`,"taxi-direction":`downward`,"taxi-turn":`22px`,"line-style":`dashed`,"line-dash-pattern":[4,4],"line-color":`#cbd5e1`,width:1,opacity:.65,"target-arrow-shape":`none`,"overlay-opacity":0,"z-index":5}},{selector:`edge.edge-depends-on`,style:{"curve-style":`taxi`,"taxi-direction":`downward`,"taxi-turn":`54%`,"line-style":`solid`,"line-color":`#94a3b8`,width:1.15,opacity:.72,"target-arrow-shape":`vee`,"target-arrow-color":`#94a3b8`,"arrow-scale":.65,"overlay-opacity":0,"z-index":6}},{selector:`node.is-focus`,style:{"border-width":2.5,"border-color":`#4f46e5`,"z-index":30}},{selector:`node.is-neighbor`,style:{"border-width":2,"border-color":`#4f46e5`,"z-index":25}},{selector:`node.search-match`,style:{"border-width":2.5,"border-color":`#4f46e5`,"z-index":28}},{selector:`edge.is-active-edge.edge-depends-on`,style:{"line-color":`#2563eb`,"target-arrow-color":`#2563eb`,width:2,opacity:.98,"z-index":26}},{selector:`edge.is-active-edge.edge-belongs-to`,style:{"line-color":`#64748b`,width:1.5,opacity:.9,"z-index":24}},{selector:`node.data-node.is-dimmed, edge.is-dimmed, node.data-node.search-dimmed, edge.search-dimmed`,style:{opacity:.2}}]}function Vb(e,t,n){let r=[],i={};if(n===`organic`){let t=Rb(e);for(let n of e){let e=n.type===`domain`,a=n.type===`scene`,o=wb(n),s=!!n.hasPendingConfirmations||n.confidence!==void 0&&n.confidence<.9,c=e?`#f59e0b`:a?`#689df6`:`#cbd5e1`,l=o?`#ef4444`:s?`#f59e0b`:`#ffffff`,u=o||s?3:2.5,d=e?`#b45309`:a?`#334155`:`#475569`,f=t[n.id]??{x:0,y:0};i[n.id]=f,r.push({group:`nodes`,position:f,classes:`data-node type-${n.type}`,data:{id:n.id,domainId:n.domainId,label:n.title,cardLabel:zb(n.title),nodeType:n.type,nodeWidth:e?44:a?34:24,nodeHeight:e?44:a?34:24,bgColor:c,borderColor:l,borderWidth:u,textColor:d,fontSize:e?12:11,fontWeight:e?600:500}})}}else{let t=Lb(e);for(let e of t.columns){let t=`__col__:${e.domainId}`,n={x:e.x,y:e.y};i[t]=n,r.push({group:`nodes`,position:n,selectable:!1,grabbable:!1,classes:`decor-column`,data:{id:t,domainId:e.domainId,nodeWidth:e.width,nodeHeight:e.height}})}for(let e of t.tiers){let t=`__tier__:${e.id}`,n={x:e.x,y:e.y};i[t]=n,r.push({group:`nodes`,position:n,selectable:!1,grabbable:!1,classes:`decor-tier`,data:{id:t,label:e.label,nodeWidth:e.width,nodeHeight:e.height}})}for(let n of e){let e=t.nodeBoxes[n.id];if(!e)continue;let a=Nb[e.paletteIndex%Nb.length],o=wb(n),s=!!n.hasPendingConfirmations||n.confidence!==void 0&&n.confidence<.9,c=`#93bbfb`,l=`#6096f6`,u=`#1e293b`,d=1.2;n.type===`domain`?(c=a.bg,l=a.border,u=a.text,d=1.35):n.type===`infrastructure`&&(c=`#e2e8f0`,l=`#cbd5e1`,u=`#334155`),o?(l=`#ef4444`,d=2):s&&(l=`#d97706`,d=1.85);let f={x:e.x,y:e.y};i[n.id]=f,r.push({group:`nodes`,position:f,grabbable:!1,classes:`data-node type-${n.type}`,data:{id:n.id,domainId:n.domainId,label:n.title,cardLabel:zb(n.title,15),nodeType:n.type,nodeWidth:e.width,nodeHeight:e.height,bgColor:c,borderColor:l,borderWidth:d,textColor:u,fontSize:11,fontWeight:n.type===`domain`?600:500}})}}for(let e of t)r.push({group:`edges`,classes:e.type===`belongs_to`?`edge-belongs-to`:`edge-depends-on`,data:{id:e.id,source:e.source,target:e.target,edgeType:e.type}});return{elements:r,presetPositions:i}}function Hb(e,t={}){let n=t.fit??!0,r=t.includeLabels??!0,i=t.numIter??320;e.layout({name:`cose`,animate:!1,randomize:!1,fit:n,padding:64,nodeDimensionsIncludeLabels:r,idealEdgeLength:()=>115,nodeRepulsion:()=>22e3,nodeOverlap:28,gravity:.32,numIter:i,initialTemp:140,coolingFactor:.91,minTemp:1.5,componentSpacing:90}).run()}function Ub({container:e,nodes:t,edges:n,layoutMode:r,numIter:i}){let{elements:a,presetPositions:o}=Vb(t,n,r),s=!!e,c=c_({...e?{container:e}:{},styleEnabled:!0,elements:a,layout:r===`organic`?{name:`null`}:{name:`preset`,positions:o,fit:s&&t.length>0,padding:48},style:Bb(r),minZoom:.22,maxZoom:2.8,...s?{wheelSensitivity:.22}:{}});return r===`organic`&&t.length>0&&(c.nodes().positions(e=>o[e.id()]??{x:0,y:0}),Hb(c,{fit:s,includeLabels:s,...i===void 0?{}:{numIter:i}})),c}function Wb(e,{visibleNodeIds:t,showBelongsTo:n,domainFilter:r=`all`}){let i=t.size>0,a=r.trim();e.batch(()=>{e.nodes(`.data-node`).forEach(e=>{e.style(`display`,t.has(e.id())?`element`:`none`)}),e.nodes(`.decor-column`).forEach(e=>{let t=e.data(`domainId`),n=i&&(a===``||a===`all`||t===a);e.style(`display`,n?`element`:`none`)}),e.nodes(`.decor-tier`).forEach(e=>{e.style(`display`,i?`element`:`none`)}),e.edges().forEach(e=>{let r=e.data(`edgeType`),i=e.data(`source`),a=e.data(`target`),o=(n||r!==`belongs_to`)&&t.has(i)&&t.has(a);e.style(`display`,o?`element`:`none`)})})}function Gb(e,{activeFocusId:t,matchedNodeIds:n,searchActive:r,visibleNodeIds:i,showBelongsTo:a}){e.batch(()=>{if(e.elements().removeClass(`is-focus is-neighbor is-active-edge is-dimmed search-match search-dimmed`),t&&i.has(t)){let o=e.getElementById(t),s=new Set([t]),c=new Set;o.connectedEdges().forEach(e=>{let t=e.data(`edgeType`);if(!a&&t===`belongs_to`)return;let n=e.data(`source`),r=e.data(`target`);i.has(n)&&i.has(r)&&(c.add(e.id()),s.add(n),s.add(r))}),e.nodes(`.data-node`).forEach(e=>{let a=e.id();i.has(a)&&(a===t?(e.addClass(`is-focus`),r&&n.has(a)&&e.addClass(`search-match`)):s.has(a)?e.addClass(`is-neighbor`):e.addClass(`is-dimmed`))}),e.edges().forEach(e=>{c.has(e.id())?e.addClass(`is-active-edge`):e.addClass(`is-dimmed`)})}else r&&(e.nodes(`.data-node`).forEach(e=>{let t=e.id();i.has(t)&&(n.has(t)?e.addClass(`search-match`):e.addClass(`search-dimmed`))}),e.edges().forEach(e=>{let t=e.data(`source`),r=e.data(`target`);i.has(t)&&i.has(r)&&(n.has(t)&&n.has(r)||e.addClass(`search-dimmed`))}))})}var Kb=e((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),$=e(((e,t)=>{t.exports=Kb()}))(),qb=(0,h.forwardRef)(function({nodes:e,edges:t,visibleNodeIds:n,showBelongsTo:r,domainFilter:i,layoutMode:a,selectedNodeId:o,matchedNodeIds:s,searchActive:c,onSelectNode:l},u){let d=(0,h.useRef)(null),f=(0,h.useRef)(null),p=(0,h.useRef)(l);p.current=l;let[m,g]=(0,h.useState)(null),_=(0,h.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),v=m&&n.has(m)?_.get(m)??null:null,y=(0,h.useRef)({visibleNodeIds:n,showBelongsTo:r,domainFilter:i});y.current={visibleNodeIds:n,showBelongsTo:r,domainFilter:i};let b=(0,h.useRef)({hoveredNodeId:m,selectedNodeId:o,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r});return b.current={hoveredNodeId:m,selectedNodeId:o,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r},(0,h.useEffect)(()=>{let n=d.current;if(!n)return;let r=Ub({container:n,nodes:e,edges:t,layoutMode:a});f.current=r;let i=y.current;Wb(r,{visibleNodeIds:i.visibleNodeIds,showBelongsTo:i.showBelongsTo,domainFilter:i.domainFilter});let o=b.current;Gb(r,{activeFocusId:o.hoveredNodeId&&o.visibleNodeIds.has(o.hoveredNodeId)?o.hoveredNodeId:o.selectedNodeId&&o.visibleNodeIds.has(o.selectedNodeId)?o.selectedNodeId:null,matchedNodeIds:o.matchedNodeIds,searchActive:o.searchActive,visibleNodeIds:o.visibleNodeIds,showBelongsTo:o.showBelongsTo}),r.on(`tap`,`node.data-node`,e=>{let t=e.target.id();p.current(t)}),r.on(`tap`,e=>{e.target===r&&p.current(null)}),r.on(`mouseover`,`node.data-node`,e=>{n.style.cursor=`pointer`,g(e.target.id())}),r.on(`mouseout`,`node.data-node`,()=>{n.style.cursor=`default`,g(null)});let s=new ResizeObserver(()=>{f.current&&!f.current.destroyed()&&f.current.resize()});return s.observe(n),()=>{s.disconnect(),g(null),r.destroy(),f.current=null}},[e,t,a]),(0,h.useEffect)(()=>{let e=f.current;e&&!e.destroyed()&&Wb(e,{visibleNodeIds:n,showBelongsTo:r,domainFilter:i})},[n,r,i]),(0,h.useEffect)(()=>{let e=f.current;e&&!e.destroyed()&&Gb(e,{activeFocusId:m&&n.has(m)?m:o&&n.has(o)?o:null,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r})},[m,o,s,c,n,r]),(0,h.useImperativeHandle)(u,()=>({zoomIn:()=>{let e=f.current;if(!e)return;let t={x:e.width()/2,y:e.height()/2};e.zoom({level:Math.min(e.maxZoom(),e.zoom()*1.24),renderedPosition:t})},zoomOut:()=>{let e=f.current;if(!e)return;let t={x:e.width()/2,y:e.height()/2};e.zoom({level:Math.max(e.minZoom(),e.zoom()/1.24),renderedPosition:t})},fit:()=>{let e=f.current;if(!e)return;let t=e.elements(`:visible`);t.length!==0&&e.fit(t,a===`organic`?60:48)},resetLayout:()=>{let t=f.current;if(t&&t.nodes().length!==0){if(a===`organic`){let n=Rb(e);t.batch(()=>{t.nodes(`.data-node`).forEach(e=>{let t=n[e.id()];t&&e.position(t)})}),Hb(t,{fit:!0,includeLabels:!0,numIter:320})}else{let e=t.elements(`:visible`);e.length>0&&t.fit(e,48)}}},focusNode:e=>{let t=f.current;if(!t)return;let n=t.getElementById(e);n&&n.length>0&&t.animate({center:{eles:n},zoom:Math.max(t.zoom(),1.05)},{duration:220})}}),[a,e]),(0,$.jsxs)(`div`,{className:`relative h-full w-full flex-1 overflow-hidden livex-canvas-bg`,children:[(0,$.jsx)(`div`,{ref:d,className:`h-full w-full`,"data-testid":`graph-canvas`,"data-layout-mode":a}),n.size===0&&(0,$.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-white/95 px-5 py-4 text-center shadow-sm`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-slate-700`,children:`当前筛选条件下无匹配节点`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-slate-400`,children:`可调整左上角领域、类型或健康状态筛选条件`})]})}),v&&(0,$.jsxs)(`div`,{className:`pointer-events-none absolute bottom-4 left-1/2 z-20 -translate-x-1/2 rounded-xl border border-slate-200/90 bg-white/95 px-3.5 py-2 shadow-md backdrop-blur-xs max-w-md`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full`,style:{backgroundColor:v.type===`domain`?`#f59e0b`:v.type===`scene`?`#6096f6`:`#94a3b8`}}),(0,$.jsx)(`span`,{className:`font-semibold text-slate-900`,children:v.title}),(0,$.jsx)(`span`,{className:`font-mono text-[10.5px] text-slate-400`,children:v.id})]}),v.summary&&(0,$.jsx)(`p`,{className:`mt-0.5 line-clamp-1 text-[11px] text-slate-500`,children:v.summary})]})]})});function Jb({open:e,onClose:t}){return(0,h.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,$.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,"data-testid":`guide-modal`,children:[(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`关闭说明遮罩`,onClick:t,className:`fixed inset-0 cursor-default bg-slate-900/35 backdrop-blur-[2px]`}),(0,$.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`livex-guide-title`,className:`relative z-10 max-h-[88vh] w-full max-w-2xl overflow-y-auto rounded-2xl border border-slate-200 bg-white p-6 shadow-2xl select-text`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-slate-100 pb-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 text-white shadow-xs`,children:(0,$.jsx)(b,{className:`h-4.5 w-4.5`})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{id:`livex-guide-title`,className:`text-base font-bold text-slate-900`,children:`LiveX Wiki · 业务知识图谱建模与消费说明`}),(0,$.jsx)(`p`,{className:`text-xs text-slate-500`,children:`基于 OKF 开放知识框架、分层索引与 Git 治理的 Agent 知识底座`})]})]}),(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700`,"aria-label":`关闭说明`,children:(0,$.jsx)(te,{className:`h-4 w-4`})})]}),(0,$.jsxs)(`div`,{className:`mt-5 space-y-5 text-xs leading-relaxed text-slate-600`,children:[(0,$.jsxs)(`section`,{className:`space-y-2.5`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(j,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`一、三层 OKF 知识建模(01 领域 → 02 场景 → 03 共享知识)`})]}),(0,$.jsxs)(`div`,{className:`grid gap-2.5 sm:grid-cols-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-amber-200/80 bg-amber-50/45 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-amber-900`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#f59e0b]`}),(0,$.jsx)(`span`,{children:`01 领域 Domain`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应 `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`domain-index/v1`}),`,定义业务域职责边界、业务黑话别名与一级渐进式路由入口。`]})]}),(0,$.jsxs)(`div`,{className:`rounded-xl border border-blue-200/80 bg-blue-50/45 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-blue-900`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#6096f6]`}),(0,$.jsx)(`span`,{children:`02 场景 Scene`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应 `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`scene-index/v1`}),`,承载四段式闭环(业务背景、变更历史、L1→L4 链路详解、待确认项)与代码仓 Commit 锚点。`]})]}),(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-slate-50/80 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-slate-800`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#94a3b8]`}),(0,$.jsx)(`span`,{children:`03 共享知识 Infra`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应`,` `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`infrastructure-index/v1`}),`,抽离多场景共用的公共 SDK 与平台约束,变更强制触发 Owner 审批。`]})]})]})]}),(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(A,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`二、双视图与关系边语义`})]}),(0,$.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-slate-200 bg-slate-50/60 p-3.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 inline-flex shrink-0 items-center rounded border border-slate-200 bg-white px-2 py-0.5 font-mono text-[11px] text-slate-600`,children:`--- 领域归属`}),(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`strong`,{className:`text-slate-800`,children:`目录归属与检索路由(belongs_to)`}),`:表达场景或共享知识归属哪个领域维护,用于渐进式发现与 CODEOWNERS 责任划分。`]})]}),(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 inline-flex shrink-0 items-center rounded border border-slate-200 bg-white px-2 py-0.5 font-mono text-[11px] text-slate-700`,children:`— 直接依赖`}),(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`strong`,{className:`text-slate-800`,children:`运行时调用与变更波及(depends_on)`}),`:表达上游场景对其他场景或共享知识的直接依赖,驱动一跳增量扩展与 Git Commit 变更影响面分析(Diff Impact)。`]})]})]})]}),(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(B,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`三、五步渐进式消费与停机护栏(Progressive Consumption)`})]}),(0,$.jsx)(`ol`,{className:`grid gap-2 sm:grid-cols-5`,children:[[`01 发现领域`,`按摘要与别名定位候选业务域`],[`02 筛选场景`,`读取域边界与目标场景全文`],[`03 锁定链路`,`从「3. 链路详解」挑选相关接口链路`],[`04 展开依赖`,`按 dependsOn 有界展开直接依赖并去重`],[`05 实时核验`,`回源核对当前代码仓与配置并输出结论`]].map(([e,t])=>(0,$.jsxs)(`li`,{className:`rounded-lg border border-slate-200 bg-white p-2.5 shadow-2xs`,children:[(0,$.jsx)(`div`,{className:`font-semibold text-indigo-700`,children:e}),(0,$.jsx)(`div`,{className:`mt-1 text-[11px] text-slate-500`,children:t})]},e))}),(0,$.jsxs)(`div`,{className:`rounded-lg border border-amber-200 bg-amber-50/60 px-3 py-2 text-[11.5px] text-amber-900`,children:[(0,$.jsx)(`strong`,{children:`硬停机规则(Hard Stop):`}),`消费会话对知识库严格只读;严禁将「4. 待确认项」当作已核实事实;遇到循环依赖或锚点失效立即停止扩展并显式报告知识缺口。`]})]})]}),(0,$.jsx)(`div`,{className:`mt-6 flex justify-end border-t border-slate-100 pt-3`,children:(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg bg-slate-900 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-slate-800`,children:`知道了`})})]})]}):null}function Yb(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function Xb(e){let t=e.trim();if(!t.includes(`|`)&&!t.includes(`-`))return!1;let n=Yb(t);return n.length>0&&n.every(e=>/^:?-{3,}:?$/.test(e))}function Zb(e,t){return t.map((t,n)=>({id:`${e}-${n}`,text:t}))}function Qb(e){let t=e.replace(/\r\n/g,`
383
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function d4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;d4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var f4=new Set([`type`,`properties`,`required`,`additionalProperties`]),p4=[`oneOf`,`anyOf`];function m4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function h4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!f4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??m4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}__(n,r,e.length===1?e[0]:h4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=m4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function g4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of f4)if(t in e)return;let n=t.filter(e=>p4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=h4(t);else{let e=n[0],i=p4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>h4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,a4(e,r))}function _4(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)):a4(i,s),a4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())d4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])g4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}a4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,__(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:b4(t,`input`,e.processors),output:b4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function v4(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 v4(r.element,n);if(r.type===`set`)return v4(r.valueType,n);if(r.type===`lazy`)return v4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return v4(r.innerType,n);if(r.type===`intersection`)return v4(r.left,n)||v4(r.right,n);if(r.type===`record`||r.type===`map`)return v4(r.keyType,n)||v4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:v4(r.in,n)||v4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(v4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(v4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(v4(e,n))return!0;return!!(r.rest&&v4(r.rest,n))}return!1}var y4=(e,t={})=>n=>{let r=o4({...n,processors:t});return c4(e,r),u4(r,e),_4(r,e)},b4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=o4({...i??{},target:a,io:t,processors:n});return c4(e,o),u4(o,e),_4(o,e)},x4=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},S4=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},C4=(e,t)=>{x4(e,`minimum`,t),S4(e,`maximum`,t)},w4=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},T4=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},E4=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},D4=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},O4=(e,t)=>x4(e,`minimum`,t.minimum),k4=(e,t)=>S4(e,`maximum`,t.maximum),A4=e=>(t,n)=>{D4(t,n.format);let[r,i]=e[n.format];x4(t,`minimum`,r),S4(t,`maximum`,i)},j4={greater_than:(e,t)=>x4(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>S4(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>w4(e,t.value),number_format:A4(L_),bigint_format:A4(R_),min_length:O4,max_length:k4,length_equals:(e,t)=>C4(e,t.length),min_size:O4,max_size:k4,size_equals:(e,t)=>C4(e,t.size),string_format:(e,t)=>{D4(e,t.format),t.pattern&&T4(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>E4(e,t.mime)};function M4(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)j4[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&x4(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&x4(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&S4(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&S4(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&w4(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&E4(t,i.mime);for(let e of i.patterns??[])T4(t,e);return t}var N4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},P4=new Map([[Fv,v0],[Lv,y0]]),F4=e=>P4.get(e)??e,I4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=M4(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=N4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(F4);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}))])}},L4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=M4(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):s4(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},R4=(e,t,n,r)=>{n.type=`boolean`},z4=(e,t,n,r)=>{n.not={}},B4=(e,t,n,r)=>{let i=l_(e._zod.def.entries);i.length===0?n.not={}:(i.every(e=>typeof e==`number`)&&(n.type=`number`),i.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=i)},V4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(s4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(s4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},H4=(e,t,n,r)=>{s4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{s4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},W4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=M4(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=c4(a.element,t,{...r,path:[...r.path,`items`]})};function G4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?G4(t.out):t.type===`catch`?G4(t.innerType):e._zod.optin}var K4=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&s4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)__(i.properties,e,c4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?G4(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=c4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},q4=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>c4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},J4=(e,t,n,r)=>{let i=e._zod.def,a=c4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=c4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Y4=(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)=>c4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?c4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?G4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=M4(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},X4=(e,t,n,r)=>{let i=e._zod.def,a=c4(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`}]},Z4=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Q4=Symbol();function $4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(s4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Q4):JSON.parse(o)}var e3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=$4(i.defaultValue,e,t,n,r);o!==Q4&&(n.default=o)},t3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=$4(i.defaultValue,e,t,n,r);o!==Q4&&(n._prefault=o)},n3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{s4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},r3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;c4(o,t,r);let s=t.seen.get(e);s.ref=o},i3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},a3=(e,t,n,r)=>{let i=e._zod.def;c4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},o3=new WeakSet([Object.prototype,Error.prototype]);function s3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var c3=Z(`ZodError`,(e,t)=>{M1.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);o3.has(n)||(o3.add(n),s3(n,`format`,e=>t=>F1(e,t)),s3(n,`flatten`,e=>t=>P1(e,t)),s3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d_,2)}),s3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),l3=L1(c3),u3=R1(c3),d3=z1(c3),f3=V1(c3),p3=q1(c3),m3=J1(c3),h3=Y1(c3),g3=X1(c3),_3=Z1(c3),v3=Q1(c3),y3=$1(c3),b3=e0(c3);function x3(){T1.localeError||E1(Zy())}function S3(){T1.memoizer||E1({memoizer:Jy()})}var C3=Z(`ZodType`,(e,t)=>(x3(),$0.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w_(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return P_(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(V6(e,t))},superRefine(e,t){return this.check(H6(e,t))},overwrite(e){return this.check(Y2(e))},optional(){return C6(this)},exactOptional(){return T6(this)},nullable(){return D6(this)},nullish(){return C6(D6(this))},nonoptional(e){return N6(this,e)},array(){return s6(this)},or(e){return d6([this,e])},and(e){return p6(this,e)},transform(e){return L6(this,x6(e))},default(e){return k6(this,e)},prefault(e){return j6(this,e)},catch(e){return F6(this,e)},pipe(e){return L6(this,e)},readonly(){return z6(this)},describe(e){let t=this.clone();return t2.add(t,{description:e}),t},meta(...e){if(e.length===0)return t2.get(this);let t=this.clone();return t2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return c1(this,`~standard`,{...nv(this),jsonSchema:{input:b4(this,`input`),output:b4(this,`output`)}})},set"~standard"(e){s1(this,`~standard`,e)},parse:function e(t,n){return l3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await u3(this,t,n,{callee:e})},safeParse(e,t){return d3(this,e,t)},async safeParseAsync(e,t){return f3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){s1(this,`spa`,e)},validate(e,t){return W1(this,e,t)},validateAsync(e,t){return K1(this,e,t)},encode:function e(t,n){return p3(this,t,n,{callee:e})},decode:function e(t,n){return m3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await h3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await g3(this,t,n,{callee:e})},safeEncode(e,t){return _3(this,e,t)},safeDecode(e,t){return v3(this,e,t)},async safeEncodeAsync(e,t){return y3(this,e,t)},async safeDecodeAsync(e,t){return b3(this,e,t)},toJSONSchema(e){return y4(this,{})(e)},get description(){return t2.get(this)?.description},get _def(){return this._zod.def}}),w3=Z(`_ZodString`,(e,t)=>{rv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)},l1({format:e=>M4(e).format??null,minLength:e=>M4(e).minimum??null,maxLength:e=>M4(e).maximum??null},{regex(...e){return this.check(U2(...e))},includes(...e){return this.check(K2(...e))},startsWith(...e){return this.check(q2(...e))},endsWith(...e){return this.check(J2(...e))},min(...e){return this.check(V2(...e))},max(...e){return this.check(B2(...e))},length(...e){return this.check(H2(...e))},nonempty(...e){return this.check(V2(1,...e))},lowercase(e){return this.check(W2(e))},uppercase(e){return this.check(G2(e))},trim(){return this.check(Z2())},normalize(...e){return this.check(X2(...e))},toLowerCase(){return this.check(Q2())},toUpperCase(){return this.check($2())},slugify(){return this.check(e4())}})),T3=Z(`ZodString`,(e,t)=>{rv.init(e,t),w3.init(e,t)},{email(e){return this.check(i2(j3,e))},url(e){return this.check(u2(P3,e))},jwt(e){return this.check(T2(Y3,e))},emoji(e){return this.check(d2(F3,e))},guid(e){return this.check(a2(M3,e))},uuid(e){return this.check(o2(N3,e))},uuidv4(e){return this.check(s2(N3,e))},uuidv6(e){return this.check(c2(N3,e))},uuidv7(e){return this.check(l2(N3,e))},nanoid(e){return this.check(f2(I3,e))},cuid(e){return this.check(p2(L3,e))},cuid2(e){return this.check(m2(R3,e))},ulid(e){return this.check(h2(z3,e))},base64(e){return this.check(S2(K3,e))},base64url(e){return this.check(C2(q3,e))},xid(e){return this.check(g2(B3,e))},ksuid(e){return this.check(_2(V3,e))},ipv4(e){return this.check(v2(H3,e))},ipv6(e){return this.check(y2(U3,e))},cidrv4(e){return this.check(b2(W3,e))},cidrv6(e){return this.check(x2(G3,e))},e164(e){return this.check(w2(J3,e))},datetime(e){return this.check(E2(D3,e))},date(e){return this.check(D2(O3,e))},time(e){return this.check(O2(k3,e))},duration(e){return this.check(k2(A3,e))}});function Q(e){return r2(T3,e)}var E3=Z(`ZodStringFormat`,(e,t)=>{iv.init(e,t),w3.init(e,t)}),D3=Z(`ZodISODateTime`,(e,t)=>{Cv.init(e,t),E3.init(e,t)}),O3=Z(`ZodISODate`,(e,t)=>{wv.init(e,t),E3.init(e,t)}),k3=Z(`ZodISOTime`,(e,t)=>{Tv.init(e,t),E3.init(e,t)}),A3=Z(`ZodISODuration`,(e,t)=>{Ev.init(e,t),E3.init(e,t)}),j3=Z(`ZodEmail`,(e,t)=>{sv.init(e,t),E3.init(e,t)}),M3=Z(`ZodGUID`,(e,t)=>{av.init(e,t),E3.init(e,t)}),N3=Z(`ZodUUID`,(e,t)=>{ov.init(e,t),E3.init(e,t)}),P3=Z(`ZodURL`,(e,t)=>{hv.init(e,t),E3.init(e,t)}),F3=Z(`ZodEmoji`,(e,t)=>{gv.init(e,t),E3.init(e,t)}),I3=Z(`ZodNanoID`,(e,t)=>{_v.init(e,t),E3.init(e,t)}),L3=Z(`ZodCUID`,(e,t)=>{vv.init(e,t),E3.init(e,t)}),R3=Z(`ZodCUID2`,(e,t)=>{yv.init(e,t),E3.init(e,t)}),z3=Z(`ZodULID`,(e,t)=>{bv.init(e,t),E3.init(e,t)}),B3=Z(`ZodXID`,(e,t)=>{xv.init(e,t),E3.init(e,t)}),V3=Z(`ZodKSUID`,(e,t)=>{Sv.init(e,t),E3.init(e,t)}),H3=Z(`ZodIPv4`,(e,t)=>{Dv.init(e,t),E3.init(e,t)}),U3=Z(`ZodIPv6`,(e,t)=>{Av.init(e,t),E3.init(e,t)}),W3=Z(`ZodCIDRv4`,(e,t)=>{jv.init(e,t),E3.init(e,t)}),G3=Z(`ZodCIDRv6`,(e,t)=>{Nv.init(e,t),E3.init(e,t)}),K3=Z(`ZodBase64`,(e,t)=>{Iv.init(e,t),E3.init(e,t)}),q3=Z(`ZodBase64URL`,(e,t)=>{zv.init(e,t),E3.init(e,t)}),J3=Z(`ZodE164`,(e,t)=>{Bv.init(e,t),E3.init(e,t)}),Y3=Z(`ZodJWT`,(e,t)=>{Hv.init(e,t),E3.init(e,t)}),X3=Z(`ZodNumber`,(e,t)=>{Uv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r),e.isFinite=!0},l1({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=M4(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=M4(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=M4(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>M4(e).format??null},{gt(e,t){return this.check(L2(e,t))},gte(e,t){return this.check(R2(e,t))},min(e,t){return this.check(R2(e,t))},lt(e,t){return this.check(F2(e,t))},lte(e,t){return this.check(I2(e,t))},max(e,t){return this.check(I2(e,t))},int(e){return this.check($3(e))},safe(e){return this.check($3(e))},positive(e){return this.check(L2(0,e))},nonnegative(e){return this.check(R2(0,e))},negative(e){return this.check(F2(0,e))},nonpositive(e){return this.check(I2(0,e))},multipleOf(e,t){return this.check(z2(e,t))},step(e,t){return this.check(z2(e,t))},finite(){return this}}));function Z3(e){return A2(X3,e)}var Q3=Z(`ZodNumberFormat`,(e,t)=>{Wv.init(e,t),X3.init(e,t)});function $3(e){return j2(Q3,e)}var e6=Z(`ZodBoolean`,(e,t)=>{Gv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)});function t6(e){return M2(e6,e)}var n6=Z(`ZodUnknown`,(e,t)=>{Kv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function r6(){return N2(n6)}var i6=Z(`ZodNever`,(e,t)=>{qv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)});function a6(e){return P2(i6,e)}var o6=Z(`ZodArray`,(e,t)=>{S3(),Zv.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(V2(e,t))},nonempty(e){return this.check(V2(1,e))},max(e,t){return this.check(B2(e,t))},length(e,t){return this.check(H2(e,t))},unwrap(){return this.element}});function s6(e,t){return t4(o6,e,t)}var c6=Z(`ZodObject`,(e,t)=>{S3(),ry.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),g1(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _6(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w_(this._zod.def,{catchall:r6()}))},loose(){return this.clone(w_(this._zod.def,{catchall:r6()}))},strict(){return this.clone(w_(this._zod.def,{catchall:a6()}))},strip(){return this.clone(w_(this._zod.def,{catchall:void 0}))},extend(e){return H_(this,e)},safeExtend(e){return W_(this,e)},merge(e){return G_(this,e)},pick(e){return z_(this,e)},omit(e){return V_(this,e)},partial(...e){return K_(S6,this,e[0])},exactPartial(...e){return K_(w6,this,e[0],`exactPartial`)},required(...e){return q_(M6,this,e[0])}});function l6(e,t){return new c6({type:`object`,shape:e??{},...X(t)})}var u6=Z(`ZodUnion`,(e,t)=>{ay.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.options=t.options});function d6(e,t){return new u6({type:`union`,options:e,...X(t)})}var f6=Z(`ZodIntersection`,(e,t)=>{oy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)});function p6(e,t){return new f6({type:`intersection`,left:e,right:t})}var m6=Z(`ZodTuple`,(e,t)=>{S3(),ly.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new S6({type:`optional`,innerType:e}))})}});function h6(e,t,n){let r=t instanceof $0;return new m6({type:`tuple`,items:e,rest:r?t:null,...X(r?n:t)})}var g6=Z(`ZodEnum`,(e,t)=>{py.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new g6({...t,checks:[],...X(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 g6({...t,checks:[],...X(r),entries:i})}});function _6(e,t){return new g6({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...X(t)})}var v6=Z(`ZodLiteral`,(e,t)=>{my.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(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 y6(e,t){return new v6({type:`literal`,values:Array.isArray(e)?e:[e],...X(t)})}var b6=Z(`ZodTransform`,(e,t)=>{S3(),hy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new w1(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(a1(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(a1(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function x6(e){return new b6({type:`transform`,transform:e})}var S6=Z(`ZodOptional`,(e,t)=>{_y.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function C6(e){return new S6({type:`optional`,innerType:e})}var w6=Z(`ZodExactOptional`,(e,t)=>{vy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function T6(e){return new w6({type:`optional`,innerType:e})}var E6=Z(`ZodNullable`,(e,t)=>{yy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function D6(e){return new E6({type:`nullable`,innerType:e})}var O6=Z(`ZodDefault`,(e,t)=>{by.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function k6(e,t){return new O6({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var A6=Z(`ZodPrefault`,(e,t)=>{Sy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function j6(e,t){return new A6({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():j_(t)}})}var M6=Z(`ZodNonOptional`,(e,t)=>{Cy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function N6(e,t){return new M6({type:`nonoptional`,innerType:e,...X(t)})}var P6=Z(`ZodCatch`,(e,t)=>{Ey.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function F6(e,t){return new P6({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:v1(t)})}var I6=Z(`ZodPipe`,(e,t)=>{Dy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r),e.in=t.in,e.out=t.out});function L6(e,t){return new I6({type:`pipe`,in:e,out:t})}var R6=Z(`ZodReadonly`,(e,t)=>{ky.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z6(e){return new R6({type:`readonly`,innerType:e})}var B6=Z(`ZodCustom`,(e,t)=>{jy.init(e,t),C3.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r)});function V6(e,t={}){return n4(B6,e,t)}function H6(e,t){return r4(e,t)}var U6=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,W6=/^[a-z0-9]+(?:-[a-z0-9]+)*\/[a-z0-9]+(?:-[a-z0-9]+)*$/,G6=/^[0-9a-f]{7,40}$/i,K6=/^[0-9a-f]{64}$/i;function q6(e){return e.replace(/\\/g,`/`)}function J6(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function Y6(e){if(typeof e!=`string`)return!1;let t=e.trim();if(t.length===0||J6(t))return!1;let n=q6(t);if(n.startsWith(`/`)||/^[a-zA-Z]:/.test(n))return!1;let r=n.split(`/`),i=0;for(let e of r){if(e===`..`)return!1;e.length>0&&e!==`.`&&(i+=1)}return i>0}var X6=l6({repo:Q().min(1),gitUrl:Q().min(1).optional(),branch:Q().min(1).optional(),localPath:Q().min(1).optional()}),Z6=l6({source:Q().min(1),localPath:Q().min(1).optional(),description:Q().optional()}),Q6=l6({autoMergeMinConfidence:Z3().min(0).max(1).default(.9),requireZeroPendingForAutoMerge:t6().default(!0),protectedSchemas:s6(_6([`domain-index/v1`,`infrastructure-index/v1`,`scene-index/v1`])).default([`domain-index/v1`,`infrastructure-index/v1`])});l6({version:d6([Z3().int().positive(),Q().min(1)]).default(1),name:Q().min(1),description:Q().optional(),domainsDir:Q().min(1).refine(Y6,`domainsDir must be a relative subdirectory inside the wiki root (no absolute paths or '..' segments)`).default(`domains`),infrastructureDomains:s6(Q().regex(U6,`Domain ID must be kebab-case`)).default([`business-infrastructure`]),repositories:s6(X6).optional(),sources:s6(Z6).optional(),governance:Q6.optional()});var $6=l6({repo:Q().min(1),gitUrl:Q().min(1),branch:Q().min(1).optional(),commitId:Q().regex(G6,`commitId must be a 7-40 character hexadecimal Git SHA`),paths:s6(Q().min(1)).optional()}),eb=l6({ingestDigest:Q().regex(K6,`ingestDigest must be a 64-character hexadecimal SHA-256 digest`).optional(),source:Q().min(1),path:Q().min(1).optional(),sha256:Q().regex(K6,`sha256 must be a 64-character hexadecimal SHA-256 digest`).optional(),pageCount:Z3().int().positive().optional()}),tb=_6([`interface`,`class`,`function`,`config`,`table`,`document`,`section`,`figure`,`dataset`]),nb=l6({repo:Q().min(1).optional(),source:Q().min(1).optional(),file:Q().min(1),symbol:Q().min(1).optional(),kind:tb.optional(),pageRange:h6([Z3().int().positive(),Z3().int().positive()]).refine(([e,t])=>e<=t,`pageRange start must be <= end`).optional(),caption:Q().min(1).optional(),mediaPath:Q().min(1).refine(Y6,`mediaPath must be a safe contained relative POSIX path`).refine(e=>!e.includes(`\\`),`mediaPath must use POSIX separators`).optional(),mediaSha256:Q().regex(K6,`mediaSha256 must be a 64-character hexadecimal SHA-256 digest`).optional(),sectionTitle:Q().min(1).optional(),assetId:Q().min(1).optional(),handle:Q().regex(/^[A-Za-z0-9_-]{1,24}$/,`handle must match /^[A-Za-z0-9_-]{1,24}$/`).optional(),scopeNote:Q().min(1).optional()}).refine(e=>!!(e.repo||e.source),{message:`Anchor must specify either repo or source`,path:[`repo`]}),rb=l6({architecture:Z3().min(0).max(1),chain:Z3().min(0).max(1),config:Z3().min(0).max(1),experiment:Z3().min(0).max(1)});l6({schema:y6(`domain-index/v1`),domainId:Q().regex(U6,`domainId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`)});var ib=s6(Q().regex(W6,`autoDependsOn entry must match <domainId>/<sceneId> in kebab-case`)).optional();l6({schema:y6(`scene-index/v1`),sceneId:Q().regex(U6,`sceneId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`),confidence:Z3().min(0).max(1),confidenceBreakdown:rb.optional(),autoDependsOn:ib,dependsOn:s6(Q().regex(W6,`dependsOn entry must match <domainId>/<sceneId> in kebab-case`)),repositories:s6($6),sources:s6(eb).optional(),anchors:s6(nb).optional()}).superRefine((e,t)=>{if(e.confidenceBreakdown){let n=Math.min(...Object.values(e.confidenceBreakdown));Math.abs(e.confidence-n)>=1e-6&&t.addIssue({code:`custom`,path:[`confidence`],message:`confidence (${e.confidence}) must equal min(confidenceBreakdown) (${n})`})}}),l6({schema:y6(`infrastructure-index/v1`),sceneId:Q().regex(U6,`sceneId must be kebab-case`),title:Q().min(1),aliases:s6(Q().min(1)),summary:Q().min(1),maintainers:s6(Q().min(1)).min(1,`maintainers must contain at least one entry`),autoDependsOn:ib,dependsOn:s6(Q().regex(W6,`dependsOn entry must match <domainId>/<sceneId> in kebab-case`)).optional().default([]),repositories:s6($6).optional().default([]),sources:s6(eb).optional(),confidence:Z3().min(0).max(1).optional(),confidenceBreakdown:rb.optional(),anchors:s6(nb).optional()}).superRefine((e,t)=>{if(e.confidence!==void 0&&e.confidenceBreakdown){let n=Math.min(...Object.values(e.confidenceBreakdown));Math.abs(e.confidence-n)>=1e-6&&t.addIssue({code:`custom`,path:[`confidence`],message:`confidence (${e.confidence}) must equal min(confidenceBreakdown) (${n})`})}});var ab=_6([`domain`,`scene`,`infrastructure`]),ob=_6([`belongs_to`,`depends_on`]),sb=_6([`fresh`,`stale`,`unverified`]),cb=l6({id:Q().min(1),type:ab,domainId:Q().regex(U6),sceneId:Q().regex(U6).optional(),title:Q().min(1),aliases:s6(Q()),summary:Q(),maintainers:s6(Q()),path:Q().min(1),confidence:Z3().min(0).max(1).optional(),confidenceBreakdown:rb.optional(),dependsOn:s6(Q()).default([]),dependents:s6(Q()).optional(),repositories:s6($6).default([]),sources:s6(eb).optional(),hasPendingConfirmations:t6().optional(),stale:t6().optional(),staleReason:Q().optional(),freshnessStatus:sb.optional(),markdown:Q().optional(),detailPaths:s6(Q()).optional()}),lb=l6({id:Q().min(1),source:Q().min(1),target:Q().min(1),type:ob,crossDomain:t6().optional()}),ub=l6({domainCount:Z3().int().nonnegative(),sceneCount:Z3().int().nonnegative(),infrastructureCount:Z3().int().nonnegative(),dependencyEdgeCount:Z3().int().nonnegative(),totalNodes:Z3().int().nonnegative(),totalEdges:Z3().int().nonnegative()}),db=l6({schema:y6(`livex-graph/v1`),generatedAt:Q().min(1),snapshot:Q().optional(),wikiName:Q().min(1),stats:ub,nodes:s6(cb),edges:s6(lb)});new Set(`pre post mid early late circa non anti sub pro per via from since until through after before between during under over into onto upon within without around about near year years page pages line lines item items part parts step steps note notes rule rules code codes port ports rfc iso iec ieee ansi utf sha md http https ftp doi isbn issn pp fig figs sec secs tab tabs vol vols no nos ch chap eq eqs ver rel rev art par para ed eds ca cf vs est approx jan feb mar apr may jun jul aug sep sept oct nov dec`.split(` `)),new Set(`the and for with from into onto upon within without through across after before between during about what which when where whose whom how many much were was are been being have has had does did can could would should shall there their theirs these those this that than then also both each in on at to of by or as is be an if do it we so`.split(` `));var fb=/\b(?:figures?|fig|tables?|tab|tbl|section|sec|chapter|chap|appendix|part|exhibit|chart)[ \t]+(?:\d{1,4}[a-z]?|[ivxlcdm]{1,5}|[a-d])\b/i;RegExp(`(\\b\\d{4}-\\d{2}-\\d{2}[T \\t]+\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+\\-\\u2212]\\d{2}:?\\d{2})?\\b|\\b(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d)?\\b|${fb.source})`,`gi`),RegExp(`^${fb.source}$`,`i`);var pb=[`关于`,`请问`,`帮我`,`如何`,`怎么`,`什么`,`查询`,`查看`,`排查`],mb=[`相关`,`模块`,`逻辑`,`功能`,`问题`,`异常`,`吗`,`呢`,`了`],hb=[`的`,`与`,`和`,`及`,`在`];[...pb,...mb,...hb],new Set(`annual monthly weekly daily quarterly yearly table tables report reports return returns brief briefs bulletin bulletins circular circulars summary summaries dataset datasets codebook codebooks guide guides manual manuals handbook version versions edition release statistics statistical operations approved decisions document documents corpus data overview index notes non one two three four five pdf md txt json csv xml html yaml yml`.split(` `));var gb={mwh:`mwh|megawatt[- ]hours?|兆瓦时`,kwh:`kwh|kilowatt[- ]hours?|千瓦时`,gwh:`gwh|gigawatt[- ]hours?|吉瓦时`,twh:`twh|terawatt[- ]hours?|太瓦时`,wh:`wh|watt[- ]hours?|瓦时`,mw:`mw|megawatts?|兆瓦`,kw:`kw|kilowatts?|千瓦`,gw:`gw|gigawatts?|吉瓦`,tw:`tw|terawatts?|太瓦`,percentage_points:`percentage[- ]points?|pct\\.?\\s*pts?\\.?|pp|百分点`,percent:`%|percent(?:age)?(?!\\s*[- ]?points?)|pct\\.?(?!\\s*pts?)|百分比`,usd:`usd|us\\$|美元`,eur:`eur|€|欧元`,cny:`cny|rmb|人民币`,tonne:`tonnes?|metric tons?|吨`,km:`km|kilometers?|kilometres?|公里|千米`,kg:`kg|kilograms?|千克|公斤`,hz:`hz`,khz:`khz`,mhz:`mhz`,ghz:`ghz`,gbp:`gbp|£|英镑`,jpy:`jpy|¥|日元`,m3:`m3|cubic[- ](?:metre|meter)s?|cu\\.?\\s*m|立方米`,m2:`m2|square[- ](?:metre|meter)s?|sq\\.?\\s*m|平方米`,liter:`lit(?:re|er)s?|公升`,second:`seconds?|secs?|秒`,minute:`minutes?|mins?|分钟`,hour:`hours?|hrs?|小时`,day:`days?`,trip:`trips?|人次|趟次|乘次`},_b={net_generation:`net generation|净发电量|净发电`,nameplate_rating:`nameplate rating|nameplate capacity|installed capacity|rated capacity|装机容量|装机额定值|额定容量`,annual_output:`annual output|annual generation|全年发电量|年发电量|年产量`,revenue:`revenue|营收|营业收入`,cost:`cost|成本|费用`,emissions:`emissions|排放量|排放`,throughput:`throughput|吞吐量`,ridership:`ridership|客流量|客运量`,budget:`budget|预算`};function vb(e){return Object.entries(e).map(([e,t])=>{let[n,...r]=t.split(/\|(?=\p{Script=Han})/u);return r.unshift(`(?<![a-z0-9])(?:${n})(?![a-z0-9])`),`(?<${e}>${r.join(`|`)})`}).join(`|`)}var yb=String.raw`(?:\b(?:not|excluding|except|without|rather\s+than|instead\s+of)\s+(?:in\s+)?|(?:而不是|而非|不是|不含|非)\s*)`,bb=vb(gb),xb=vb(_b);RegExp(`(?<negated>${yb})?(?:${bb})`,`gi`),new RegExp(xb,`gi`),RegExp(`${yb}(?:${xb})`,`gi`),new Map(Object.entries({h:`h hr hrs hour hours 小时`,s:`s sec secs second seconds 秒`,min:`min mins minute minutes 分钟`,d:`d day days 天`,yr:`yr yrs year years 年`,capita:`person persons people capita 人`,visit:`visit visits 人次`,resident:`resident residents 居民`,trip:`trip trips 趟次 乘次`,unit:`unit units`,km:`km`,m2:`m2`,m3:`m3`,kg:`kg`,tonne:`tonne tonnes`}).flatMap(([e,t])=>t.split(` `).map(t=>[t,e]))),new Set(`in on at for of by to from with into over across within under between per as the a an and or not only all each both this that these those it its their show showing shown find give provide display list use using uses verify check me measured reported expressed recorded stated denominated figure figures fig chart charts graph graphs table tables plot plots original official published report reports edition section page pages unit units value values data number numbers bar line pie scatter`.split(` `)),new Set(`the and for with from into through under trace return cite page pages step steps exact quote quotes each both every show find give`.split(` `));var Sb=new Set([`fresh`,`stale`,`unverified`]);function Cb(e){let t=db.safeParse(e);if(!t.success)return{success:!1,message:t.error.issues[0]?.message??`schema mismatch`};let n=typeof e==`object`&&e&&Array.isArray(e.nodes)?e.nodes??[]:[],r=[];for(let e=0;e<t.data.nodes.length;e+=1){let i=t.data.nodes[e],a=n[e];if(typeof a==`object`&&a&&`freshnessStatus`in a&&a.freshnessStatus!==void 0){let e=a.freshnessStatus;if(typeof e!=`string`||!Sb.has(e))return{success:!1,message:`Invalid freshnessStatus "${String(e)}" on node "${i.id}"`};r.push({...i,freshnessStatus:e})}else r.push(i)}return{success:!0,data:{...t.data,nodes:r}}}function wb(e){return e.stale===!0||e.freshnessStatus===`stale`}function Tb(e){return wb(e)?{status:`stale`,label:`待更新 · Stale`,description:e.staleReason??`关联代码仓 HEAD 已领先当前锚定 Commit,建议执行增量更新。`}:e.freshnessStatus===`fresh`?{status:`fresh`,label:`已回源核验 · Fresh`,description:`已与本地代码仓当前 HEAD 比对,锚定路径与符号未发生滞后变更。`}:{status:`unverified`,label:`静态快照 · 未连仓核验`,description:`当前图谱未提供 --repos-dir 实时比对源码仓,仅展示知识库静态锚定快照。`}}function Eb(e){return`./api/nodes/${encodeURIComponent(e)}/markdown`}async function Db(e,t={}){let n=t.cache?.get(e);if(n!==void 0)return{status:`loaded`,markdown:n};let r=t.fetchImpl??(typeof fetch<`u`?fetch:void 0);if(!r)return{status:`unavailable`};try{let n=await r(Eb(e),{cache:`no-store`,...t.signal?{signal:t.signal}:{}});if(t.signal?.aborted)return{status:`aborted`};if(!n.ok)return{status:`unavailable`};let i=await n.json();if(typeof i==`object`&&i&&typeof i.markdown==`string`){let n=i.markdown;return t.cache?.set(e,n),{status:`loaded`,markdown:n}}return{status:`unavailable`}}catch{return t.signal?.aborted?{status:`aborted`}:{status:`unavailable`}}}function Ob(e,t){return e<t?`显示 ${e} / ${t} 节点`:`${t} 节点`}function kb(e,t){let n=t.trim().toLowerCase();return!!(!n||e.id.toLowerCase().includes(n)||e.title.toLowerCase().includes(n)||e.domainId.toLowerCase().includes(n)||e.sceneId?.toLowerCase().includes(n)||e.aliases.some(e=>e.toLowerCase().includes(n))||e.summary.toLowerCase().includes(n))}function Ab(e,t,n=12){let r=t.trim().toLowerCase();if(!r)return[];let i=[];for(let t of e.nodes){let e=0,n=t.id.toLowerCase(),a=t.title.toLowerCase(),o=t.sceneId?.toLowerCase()??``,s=t.aliases.map(e=>e.toLowerCase());if(n===r||a===r||o===r||s.includes(r)?e=100:a.startsWith(r)||n.startsWith(r)||o.startsWith(r)||s.some(e=>e.startsWith(r))?e=80:a.includes(r)||s.some(e=>e.includes(r))?e=65:n.includes(r)||t.domainId.toLowerCase().includes(r)?e=50:t.summary.toLowerCase().includes(r)&&(e=30),e>0){let n=t.type===`domain`?3:t.type===`scene`?2:1;i.push({node:t,score:e+n})}}return i.sort((e,t)=>t.score-e.score||e.node.id.localeCompare(t.node.id)),i.slice(0,n).map(e=>e.node)}function jb(e,t){let n=e;switch(t){case`all`:return!0;case`stale`:return wb(n);case`fresh`:return!wb(n)&&n.freshnessStatus===`fresh`;case`unverified`:return wb(n)?!1:n.freshnessStatus===`unverified`||n.freshnessStatus!==`fresh`&&e.type!==`domain`;case`pending`:return!!e.hasPendingConfirmations;case`low_confidence`:return e.confidence!==void 0&&e.confidence<.9}}function Mb(e,t={}){let n=t.domainId?.trim()??`all`,r=t.nodeType??`all`,i=t.health??`all`,a=t.query?.trim()??``,o=t.showBelongsTo??!0,s=new Set,c=new Set,l=[];for(let t of e.nodes){let e=a.length>0&&kb(t,a);e&&s.add(t.id),n&&n!==`all`&&t.domainId!==n||r!==`all`&&t.type!==r||!jb(t,i)||a.length>0&&!e||(c.add(t.id),l.push(t))}return{nodes:l,edges:e.edges.filter(e=>!o&&e.type===`belongs_to`?!1:c.has(e.source)&&c.has(e.target)),matchedNodeIds:s,visibleNodeIds:c}}var Nb=[{bg:`#fff7ed`,border:`#fdba74`,text:`#7c2d12`},{bg:`#f5f3ff`,border:`#c4b5fd`,text:`#3b0764`},{bg:`#ecfeff`,border:`#67e8f9`,text:`#164e63`},{bg:`#fefce8`,border:`#fde047`,text:`#713f12`},{bg:`#f0fdf4`,border:`#86efac`,text:`#14532d`},{bg:`#eff6ff`,border:`#93c5fd`,text:`#1e3a8a`},{bg:`#fdf2f8`,border:`#f9a8d4`,text:`#831843`},{bg:`#f8fafc`,border:`#cbd5e1`,text:`#1e293b`}];function Pb(e){return e<=0?0:e===1?1:e<=4?2:e<=18?3:4}function Fb(e){return e<=0?0:e===1?1:e<=4?2:e<=12?3:e<=24?4:5}function Ib(e,t,n,r,i,a,o,s){if(e===0||t===0)return[];let c=[],l=Math.ceil(e/t);for(let u=0;u<l;u+=1){let l=u*t,d=Math.min(t,e-l),f=n-(d*i+(d-1)*o)/2,p=r+a/2+u*(a+s);for(let e=0;e<d;e+=1){let t=f+i/2+e*(i+o);c.push({x:t,y:p})}}return c}function Lb(e,t={}){let n=t.domainCardWidth??128,r=t.domainCardHeight??36,i=t.sceneCardWidth??124,a=t.sceneCardHeight??32,o=t.infraCardWidth??120,s=t.infraCardHeight??30,c=t.cellGapX??12,l=t.cellGapY??12,u=t.columnPaddingX??22,d=t.columnGap??26,f=t.routingChannelHeight??76,p=new Set(t.infrastructureDomains??[`business-infrastructure`]);if(e.length===0)return{positions:{},nodeBoxes:{},columns:[],tiers:[],bounds:{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0}};let m=new Map,h=e=>{let t=m.get(e);return t||(t={domainId:e,scenes:[],infras:[]},m.set(e,t)),t};for(let t of e){let e=h(t.domainId);t.type===`domain`?e.domainNode=t:t.type===`scene`?e.scenes.push(t):e.infras.push(t)}for(let e of m.values())e.scenes.sort((e,t)=>e.id.localeCompare(t.id)),e.infras.sort((e,t)=>e.id.localeCompare(t.id));let g=e=>p.has(e.domainId)||e.infras.length>0&&e.scenes.length===0?!0:e.infras.length>e.scenes.length,_=Array.from(m.values()).sort((e,t)=>{let n=g(e);if(n!==g(t))return n?-1:1;if(n){let n=t.infras.length-e.infras.length;return n===0?e.domainId.localeCompare(t.domainId):n}let r=e.scenes.length+e.infras.length,i=t.scenes.length+t.infras.length;return i===r?e.domainId.localeCompare(t.domainId):i-r}).map(e=>{let t=Pb(e.scenes.length),r=Fb(e.infras.length),a=t>0?Math.ceil(e.scenes.length/t):0,s=r>0?Math.ceil(e.infras.length/r):0,l=t>0?t*i+(t-1)*c:0,d=r>0?r*o+(r-1)*c:0,f=Math.max(n,l,d)+u*2;return{bucket:e,isInfra:g(e),sceneCols:t,infraCols:r,sceneRows:a,infraRows:s,columnWidth:f}}),v=Math.max(0,..._.map(e=>e.sceneRows)),y=Math.max(0,..._.map(e=>e.infraRows)),b=Math.max(2,v),x=24+r/2,S=24+r+26,C=S+b*a+(b-1)*l,w=C+f,T=y>0?w+y*s+(y-1)*l:w+s,E=(y>0?T:C)+28,D=+E,O={},k={},A=[],j=116;_.forEach((e,t)=>{let{bucket:u,isInfra:f,sceneCols:p,infraCols:m,columnWidth:h}=e,g=f?0:(t-1+Nb.length)%(Nb.length-1)+1,_=j+h/2;if(A.push({domainId:u.domainId,title:u.domainNode?.title??u.domainId,isInfrastructureDomain:f,columnIndex:t,x:_,y:0+D/2,left:j,top:0,width:h,height:D,paletteIndex:g,sceneCount:u.scenes.length,infrastructureCount:u.infras.length}),u.domainNode){let e=u.domainNode;O[e.id]={x:_,y:x},k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:_,y:x,width:n,height:r,left:_-n/2,top:x-r/2,right:_+n/2,bottom:x+r/2,columnIndex:t,tier:`domain`,paletteIndex:g}}let v=Ib(u.scenes.length,p,_,S,i,a,c,l);u.scenes.forEach((e,n)=>{let r=v[n];O[e.id]=r,k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:r.x,y:r.y,width:i,height:a,left:r.x-i/2,top:r.y-a/2,right:r.x+i/2,bottom:r.y+a/2,columnIndex:t,tier:`scene`,paletteIndex:g}});let y=Ib(u.infras.length,m,_,w,o,s,c,l);u.infras.forEach((e,n)=>{let r=y[n];O[e.id]=r,k[e.id]={id:e.id,type:e.type,domainId:e.domainId,x:r.x,y:r.y,width:o,height:s,left:r.x-o/2,top:r.y-s/2,right:r.x+o/2,bottom:r.y+s/2,columnIndex:t,tier:`infrastructure`,paletteIndex:g}}),j+=h+d});let M=S+Math.min(C-S,180)/2,N=w+Math.min(T-w,180)/2,P=[{id:`01`,label:`01 领域`,x:46,y:x,width:76,height:28},{id:`02`,label:`02 场景`,x:46,y:M,width:76,height:28},...y>0?[{id:`03`,label:`03 知识`,x:46,y:N,width:76,height:28}]:[]],F=Math.max(116,j-d),I=E;return{positions:O,nodeBoxes:k,columns:A,tiers:P,bounds:{minX:0,minY:0,maxX:F,maxY:I,width:+F,height:+I}}}function Rb(e){let t={};if(e.length===0)return t;let n=e.filter(e=>e.type===`infrastructure`).slice().sort((e,t)=>e.id.localeCompare(t.id)),r=Array.from(new Set(e.map(e=>e.domainId))).sort((e,t)=>e.localeCompare(t));n.forEach((e,n)=>{let r=n*2.399963,i=55+Math.sqrt(n+1)*48;t[e.id]={x:Math.cos(r)*i,y:Math.sin(r)*i}});let i=Math.max(260,140+Math.sqrt(e.length)*45);return r.forEach((n,a)=>{let o=2*Math.PI*a/Math.max(1,r.length)-Math.PI/2,s=Math.cos(o)*i,c=Math.sin(o)*i,l=e.find(e=>e.type===`domain`&&e.domainId===n);l&&(t[l.id]={x:s,y:c});let u=e.filter(e=>e.type===`scene`&&e.domainId===n).slice().sort((e,t)=>e.id.localeCompare(t.id));u.forEach((e,n)=>{let r=o+(n-(u.length-1)/2)*.42+(n%2==0?-.08:.08),i=110+Math.floor(n/4)*72;t[e.id]={x:s+Math.cos(r)*i,y:c+Math.sin(r)*i}})}),t}function zb(e,t=15){let n=0,r=``;for(let i of e){if(n+=i.charCodeAt(0)>255?2:1,n>t)return`${r}…`;r+=i}return r}function Bb(e){return e===`organic`?[{selector:`node.data-node`,style:{shape:`ellipse`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`data(bgColor)`,"border-width":`data(borderWidth)`,"border-color":`data(borderColor)`,label:`data(label)`,"font-size":`data(fontSize)`,"font-weight":`data(fontWeight)`,color:`data(textColor)`,"text-valign":`bottom`,"text-halign":`center`,"text-margin-y":6,"text-background-color":`#fbfcfe`,"text-background-opacity":.82,"text-background-padding":`2px`,"text-background-shape":`roundrectangle`,"overlay-opacity":0,"z-index":10}},{selector:`edge.edge-belongs-to`,style:{"curve-style":`bezier`,"line-style":`dashed`,"line-dash-pattern":[5,4],"line-color":`#cbd5e1`,width:1,opacity:.72,"target-arrow-shape":`none`,"overlay-opacity":0}},{selector:`edge.edge-depends-on`,style:{"curve-style":`bezier`,"line-style":`solid`,"line-color":`#94a3b8`,width:1.25,opacity:.78,"target-arrow-shape":`vee`,"target-arrow-color":`#94a3b8`,"arrow-scale":.72,"overlay-opacity":0}},{selector:`node.is-focus`,style:{"border-width":3.5,"border-color":`#4f46e5`,"z-index":30}},{selector:`node.is-neighbor`,style:{"border-width":2.5,"border-color":`#6366f1`,"z-index":25}},{selector:`node.search-match`,style:{"border-width":3.5,"border-color":`#4f46e5`,"z-index":28}},{selector:`edge.is-active-edge.edge-depends-on`,style:{"line-color":`#3b82f6`,"target-arrow-color":`#3b82f6`,width:2.1,opacity:.98,"z-index":25}},{selector:`edge.is-active-edge.edge-belongs-to`,style:{"line-color":`#64748b`,width:1.6,opacity:.9,"z-index":24}},{selector:`.is-dimmed, .search-dimmed`,style:{opacity:.18}}]:[{selector:`node.decor-column`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`#f8fafc`,"background-opacity":.55,"border-width":1,"border-color":`#e2e8f0`,label:``,events:`no`,"overlay-opacity":0,"z-index":1}},{selector:`node.decor-tier`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`#ffffff`,"border-width":1,"border-color":`#e2e8f0`,label:`data(label)`,"font-size":11,"font-weight":700,color:`#334155`,"text-valign":`center`,"text-halign":`center`,events:`no`,"overlay-opacity":0,"z-index":2}},{selector:`node.data-node`,style:{shape:`round-rectangle`,width:`data(nodeWidth)`,height:`data(nodeHeight)`,"background-color":`data(bgColor)`,"border-width":`data(borderWidth)`,"border-color":`data(borderColor)`,label:`data(cardLabel)`,"font-size":11,"font-weight":`data(fontWeight)`,color:`data(textColor)`,"text-valign":`center`,"text-halign":`center`,"text-wrap":`none`,"overlay-opacity":0,"z-index":12}},{selector:`edge.edge-belongs-to`,style:{"curve-style":`taxi`,"taxi-direction":`downward`,"taxi-turn":`22px`,"line-style":`dashed`,"line-dash-pattern":[4,4],"line-color":`#cbd5e1`,width:1,opacity:.65,"target-arrow-shape":`none`,"overlay-opacity":0,"z-index":5}},{selector:`edge.edge-depends-on`,style:{"curve-style":`taxi`,"taxi-direction":`downward`,"taxi-turn":`54%`,"line-style":`solid`,"line-color":`#94a3b8`,width:1.15,opacity:.72,"target-arrow-shape":`vee`,"target-arrow-color":`#94a3b8`,"arrow-scale":.65,"overlay-opacity":0,"z-index":6}},{selector:`node.is-focus`,style:{"border-width":2.5,"border-color":`#4f46e5`,"z-index":30}},{selector:`node.is-neighbor`,style:{"border-width":2,"border-color":`#4f46e5`,"z-index":25}},{selector:`node.search-match`,style:{"border-width":2.5,"border-color":`#4f46e5`,"z-index":28}},{selector:`edge.is-active-edge.edge-depends-on`,style:{"line-color":`#2563eb`,"target-arrow-color":`#2563eb`,width:2,opacity:.98,"z-index":26}},{selector:`edge.is-active-edge.edge-belongs-to`,style:{"line-color":`#64748b`,width:1.5,opacity:.9,"z-index":24}},{selector:`node.data-node.is-dimmed, edge.is-dimmed, node.data-node.search-dimmed, edge.search-dimmed`,style:{opacity:.2}}]}function Vb(e,t,n){let r=[],i={};if(n===`organic`){let t=Rb(e);for(let n of e){let e=n.type===`domain`,a=n.type===`scene`,o=wb(n),s=!!n.hasPendingConfirmations||n.confidence!==void 0&&n.confidence<.9,c=e?`#f59e0b`:a?`#689df6`:`#cbd5e1`,l=o?`#ef4444`:s?`#f59e0b`:`#ffffff`,u=o||s?3:2.5,d=e?`#b45309`:a?`#334155`:`#475569`,f=t[n.id]??{x:0,y:0};i[n.id]=f,r.push({group:`nodes`,position:f,classes:`data-node type-${n.type}`,data:{id:n.id,domainId:n.domainId,label:n.title,cardLabel:zb(n.title),nodeType:n.type,nodeWidth:e?44:a?34:24,nodeHeight:e?44:a?34:24,bgColor:c,borderColor:l,borderWidth:u,textColor:d,fontSize:e?12:11,fontWeight:e?600:500}})}}else{let t=Lb(e);for(let e of t.columns){let t=`__col__:${e.domainId}`,n={x:e.x,y:e.y};i[t]=n,r.push({group:`nodes`,position:n,selectable:!1,grabbable:!1,classes:`decor-column`,data:{id:t,domainId:e.domainId,nodeWidth:e.width,nodeHeight:e.height}})}for(let e of t.tiers){let t=`__tier__:${e.id}`,n={x:e.x,y:e.y};i[t]=n,r.push({group:`nodes`,position:n,selectable:!1,grabbable:!1,classes:`decor-tier`,data:{id:t,label:e.label,nodeWidth:e.width,nodeHeight:e.height}})}for(let n of e){let e=t.nodeBoxes[n.id];if(!e)continue;let a=Nb[e.paletteIndex%Nb.length],o=wb(n),s=!!n.hasPendingConfirmations||n.confidence!==void 0&&n.confidence<.9,c=`#93bbfb`,l=`#6096f6`,u=`#1e293b`,d=1.2;n.type===`domain`?(c=a.bg,l=a.border,u=a.text,d=1.35):n.type===`infrastructure`&&(c=`#e2e8f0`,l=`#cbd5e1`,u=`#334155`),o?(l=`#ef4444`,d=2):s&&(l=`#d97706`,d=1.85);let f={x:e.x,y:e.y};i[n.id]=f,r.push({group:`nodes`,position:f,grabbable:!1,classes:`data-node type-${n.type}`,data:{id:n.id,domainId:n.domainId,label:n.title,cardLabel:zb(n.title,15),nodeType:n.type,nodeWidth:e.width,nodeHeight:e.height,bgColor:c,borderColor:l,borderWidth:d,textColor:u,fontSize:11,fontWeight:n.type===`domain`?600:500}})}}for(let e of t)r.push({group:`edges`,classes:e.type===`belongs_to`?`edge-belongs-to`:`edge-depends-on`,data:{id:e.id,source:e.source,target:e.target,edgeType:e.type}});return{elements:r,presetPositions:i}}function Hb(e,t={}){let n=t.fit??!0,r=t.includeLabels??!0,i=t.numIter??320;e.layout({name:`cose`,animate:!1,randomize:!1,fit:n,padding:64,nodeDimensionsIncludeLabels:r,idealEdgeLength:()=>115,nodeRepulsion:()=>22e3,nodeOverlap:28,gravity:.32,numIter:i,initialTemp:140,coolingFactor:.91,minTemp:1.5,componentSpacing:90}).run()}function Ub({container:e,nodes:t,edges:n,layoutMode:r,numIter:i}){let{elements:a,presetPositions:o}=Vb(t,n,r),s=!!e,c=c_({...e?{container:e}:{},styleEnabled:!0,elements:a,layout:r===`organic`?{name:`null`}:{name:`preset`,positions:o,fit:s&&t.length>0,padding:48},style:Bb(r),minZoom:.22,maxZoom:2.8,...s?{wheelSensitivity:.22}:{}});return r===`organic`&&t.length>0&&(c.nodes().positions(e=>o[e.id()]??{x:0,y:0}),Hb(c,{fit:s,includeLabels:s,...i===void 0?{}:{numIter:i}})),c}function Wb(e,{visibleNodeIds:t,showBelongsTo:n,domainFilter:r=`all`}){let i=t.size>0,a=r.trim();e.batch(()=>{e.nodes(`.data-node`).forEach(e=>{e.style(`display`,t.has(e.id())?`element`:`none`)}),e.nodes(`.decor-column`).forEach(e=>{let t=e.data(`domainId`),n=i&&(a===``||a===`all`||t===a);e.style(`display`,n?`element`:`none`)}),e.nodes(`.decor-tier`).forEach(e=>{e.style(`display`,i?`element`:`none`)}),e.edges().forEach(e=>{let r=e.data(`edgeType`),i=e.data(`source`),a=e.data(`target`),o=(n||r!==`belongs_to`)&&t.has(i)&&t.has(a);e.style(`display`,o?`element`:`none`)})})}function Gb(e,{activeFocusId:t,matchedNodeIds:n,searchActive:r,visibleNodeIds:i,showBelongsTo:a}){e.batch(()=>{if(e.elements().removeClass(`is-focus is-neighbor is-active-edge is-dimmed search-match search-dimmed`),t&&i.has(t)){let o=e.getElementById(t),s=new Set([t]),c=new Set;o.connectedEdges().forEach(e=>{let t=e.data(`edgeType`);if(!a&&t===`belongs_to`)return;let n=e.data(`source`),r=e.data(`target`);i.has(n)&&i.has(r)&&(c.add(e.id()),s.add(n),s.add(r))}),e.nodes(`.data-node`).forEach(e=>{let a=e.id();i.has(a)&&(a===t?(e.addClass(`is-focus`),r&&n.has(a)&&e.addClass(`search-match`)):s.has(a)?e.addClass(`is-neighbor`):e.addClass(`is-dimmed`))}),e.edges().forEach(e=>{c.has(e.id())?e.addClass(`is-active-edge`):e.addClass(`is-dimmed`)})}else r&&(e.nodes(`.data-node`).forEach(e=>{let t=e.id();i.has(t)&&(n.has(t)?e.addClass(`search-match`):e.addClass(`search-dimmed`))}),e.edges().forEach(e=>{let t=e.data(`source`),r=e.data(`target`);i.has(t)&&i.has(r)&&(n.has(t)&&n.has(r)||e.addClass(`search-dimmed`))}))})}var Kb=e((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),$=e(((e,t)=>{t.exports=Kb()}))(),qb=(0,h.forwardRef)(function({nodes:e,edges:t,visibleNodeIds:n,showBelongsTo:r,domainFilter:i,layoutMode:a,selectedNodeId:o,matchedNodeIds:s,searchActive:c,onSelectNode:l},u){let d=(0,h.useRef)(null),f=(0,h.useRef)(null),p=(0,h.useRef)(l);p.current=l;let[m,g]=(0,h.useState)(null),_=(0,h.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),v=m&&n.has(m)?_.get(m)??null:null,y=(0,h.useRef)({visibleNodeIds:n,showBelongsTo:r,domainFilter:i});y.current={visibleNodeIds:n,showBelongsTo:r,domainFilter:i};let b=(0,h.useRef)({hoveredNodeId:m,selectedNodeId:o,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r});return b.current={hoveredNodeId:m,selectedNodeId:o,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r},(0,h.useEffect)(()=>{let n=d.current;if(!n)return;let r=Ub({container:n,nodes:e,edges:t,layoutMode:a});f.current=r;let i=y.current;Wb(r,{visibleNodeIds:i.visibleNodeIds,showBelongsTo:i.showBelongsTo,domainFilter:i.domainFilter});let o=b.current;Gb(r,{activeFocusId:o.hoveredNodeId&&o.visibleNodeIds.has(o.hoveredNodeId)?o.hoveredNodeId:o.selectedNodeId&&o.visibleNodeIds.has(o.selectedNodeId)?o.selectedNodeId:null,matchedNodeIds:o.matchedNodeIds,searchActive:o.searchActive,visibleNodeIds:o.visibleNodeIds,showBelongsTo:o.showBelongsTo}),r.on(`tap`,`node.data-node`,e=>{let t=e.target.id();p.current(t)}),r.on(`tap`,e=>{e.target===r&&p.current(null)}),r.on(`mouseover`,`node.data-node`,e=>{n.style.cursor=`pointer`,g(e.target.id())}),r.on(`mouseout`,`node.data-node`,()=>{n.style.cursor=`default`,g(null)});let s=new ResizeObserver(()=>{f.current&&!f.current.destroyed()&&f.current.resize()});return s.observe(n),()=>{s.disconnect(),g(null),r.destroy(),f.current=null}},[e,t,a]),(0,h.useEffect)(()=>{let e=f.current;e&&!e.destroyed()&&Wb(e,{visibleNodeIds:n,showBelongsTo:r,domainFilter:i})},[n,r,i]),(0,h.useEffect)(()=>{let e=f.current;e&&!e.destroyed()&&Gb(e,{activeFocusId:m&&n.has(m)?m:o&&n.has(o)?o:null,matchedNodeIds:s,searchActive:c,visibleNodeIds:n,showBelongsTo:r})},[m,o,s,c,n,r]),(0,h.useImperativeHandle)(u,()=>({zoomIn:()=>{let e=f.current;if(!e)return;let t={x:e.width()/2,y:e.height()/2};e.zoom({level:Math.min(e.maxZoom(),e.zoom()*1.24),renderedPosition:t})},zoomOut:()=>{let e=f.current;if(!e)return;let t={x:e.width()/2,y:e.height()/2};e.zoom({level:Math.max(e.minZoom(),e.zoom()/1.24),renderedPosition:t})},fit:()=>{let e=f.current;if(!e)return;let t=e.elements(`:visible`);t.length!==0&&e.fit(t,a===`organic`?60:48)},resetLayout:()=>{let t=f.current;if(t&&t.nodes().length!==0){if(a===`organic`){let n=Rb(e);t.batch(()=>{t.nodes(`.data-node`).forEach(e=>{let t=n[e.id()];t&&e.position(t)})}),Hb(t,{fit:!0,includeLabels:!0,numIter:320})}else{let e=t.elements(`:visible`);e.length>0&&t.fit(e,48)}}},focusNode:e=>{let t=f.current;if(!t)return;let n=t.getElementById(e);n&&n.length>0&&t.animate({center:{eles:n},zoom:Math.max(t.zoom(),1.05)},{duration:220})}}),[a,e]),(0,$.jsxs)(`div`,{className:`relative h-full w-full flex-1 overflow-hidden livex-canvas-bg`,children:[(0,$.jsx)(`div`,{ref:d,className:`h-full w-full`,"data-testid":`graph-canvas`,"data-layout-mode":a}),n.size===0&&(0,$.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-white/95 px-5 py-4 text-center shadow-sm`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-slate-700`,children:`当前筛选条件下无匹配节点`}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-slate-400`,children:`可调整左上角领域、类型或健康状态筛选条件`})]})}),v&&(0,$.jsxs)(`div`,{className:`pointer-events-none absolute bottom-4 left-1/2 z-20 -translate-x-1/2 rounded-xl border border-slate-200/90 bg-white/95 px-3.5 py-2 shadow-md backdrop-blur-xs max-w-md`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full`,style:{backgroundColor:v.type===`domain`?`#f59e0b`:v.type===`scene`?`#6096f6`:`#94a3b8`}}),(0,$.jsx)(`span`,{className:`font-semibold text-slate-900`,children:v.title}),(0,$.jsx)(`span`,{className:`font-mono text-[10.5px] text-slate-400`,children:v.id})]}),v.summary&&(0,$.jsx)(`p`,{className:`mt-0.5 line-clamp-1 text-[11px] text-slate-500`,children:v.summary})]})]})});function Jb({open:e,onClose:t}){return(0,h.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),e?(0,$.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,"data-testid":`guide-modal`,children:[(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`关闭说明遮罩`,onClick:t,className:`fixed inset-0 cursor-default bg-slate-900/35 backdrop-blur-[2px]`}),(0,$.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`livex-guide-title`,className:`relative z-10 max-h-[88vh] w-full max-w-2xl overflow-y-auto rounded-2xl border border-slate-200 bg-white p-6 shadow-2xl select-text`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-slate-100 pb-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,$.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-indigo-500 to-violet-600 text-white shadow-xs`,children:(0,$.jsx)(b,{className:`h-4.5 w-4.5`})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{id:`livex-guide-title`,className:`text-base font-bold text-slate-900`,children:`LiveX Wiki · 业务知识图谱建模与消费说明`}),(0,$.jsx)(`p`,{className:`text-xs text-slate-500`,children:`基于 OKF 开放知识框架、分层索引与 Git 治理的 Agent 知识底座`})]})]}),(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700`,"aria-label":`关闭说明`,children:(0,$.jsx)(te,{className:`h-4 w-4`})})]}),(0,$.jsxs)(`div`,{className:`mt-5 space-y-5 text-xs leading-relaxed text-slate-600`,children:[(0,$.jsxs)(`section`,{className:`space-y-2.5`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(j,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`一、三层 OKF 知识建模(01 领域 → 02 场景 → 03 共享知识)`})]}),(0,$.jsxs)(`div`,{className:`grid gap-2.5 sm:grid-cols-3`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-amber-200/80 bg-amber-50/45 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-amber-900`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#f59e0b]`}),(0,$.jsx)(`span`,{children:`01 领域 Domain`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应 `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`domain-index/v1`}),`,定义业务域职责边界、业务黑话别名与一级渐进式路由入口。`]})]}),(0,$.jsxs)(`div`,{className:`rounded-xl border border-blue-200/80 bg-blue-50/45 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-blue-900`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#6096f6]`}),(0,$.jsx)(`span`,{children:`02 场景 Scene`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应 `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`scene-index/v1`}),`,承载四段式闭环(业务背景、变更历史、L1→L4 链路详解、待确认项)与代码仓 Commit 锚点。`]})]}),(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-slate-50/80 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 font-semibold text-slate-800`,children:[(0,$.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#94a3b8]`}),(0,$.jsx)(`span`,{children:`03 共享知识 Infra`})]}),(0,$.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-slate-600`,children:[`对应`,` `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 font-mono`,children:`infrastructure-index/v1`}),`,抽离多场景共用的公共 SDK 与平台约束,变更强制触发 Owner 审批。`]})]})]})]}),(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(A,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`二、双视图与关系边语义`})]}),(0,$.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-slate-200 bg-slate-50/60 p-3.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 inline-flex shrink-0 items-center rounded border border-slate-200 bg-white px-2 py-0.5 font-mono text-[11px] text-slate-600`,children:`--- 领域归属`}),(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`strong`,{className:`text-slate-800`,children:`目录归属与检索路由(belongs_to)`}),`:表达场景或共享知识归属哪个领域维护,用于渐进式发现与 CODEOWNERS 责任划分。`]})]}),(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,$.jsx)(`span`,{className:`mt-0.5 inline-flex shrink-0 items-center rounded border border-slate-200 bg-white px-2 py-0.5 font-mono text-[11px] text-slate-700`,children:`— 直接依赖`}),(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`strong`,{className:`text-slate-800`,children:`运行时调用与变更波及(depends_on)`}),`:表达上游场景对其他场景或共享知识的直接依赖,驱动一跳增量扩展与 Git Commit 变更影响面分析(Diff Impact)。`]})]})]})]}),(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsxs)(`h3`,{className:`flex items-center gap-2 text-[13px] font-bold text-slate-900`,children:[(0,$.jsx)(B,{className:`h-4 w-4 text-indigo-600`}),(0,$.jsx)(`span`,{children:`三、五步渐进式消费与停机护栏(Progressive Consumption)`})]}),(0,$.jsx)(`ol`,{className:`grid gap-2 sm:grid-cols-5`,children:[[`01 发现领域`,`按摘要与别名定位候选业务域`],[`02 筛选场景`,`读取域边界与目标场景全文`],[`03 锁定链路`,`从「3. 链路详解」挑选相关接口链路`],[`04 展开依赖`,`按 dependsOn 有界展开直接依赖并去重`],[`05 实时核验`,`回源核对当前代码仓与配置并输出结论`]].map(([e,t])=>(0,$.jsxs)(`li`,{className:`rounded-lg border border-slate-200 bg-white p-2.5 shadow-2xs`,children:[(0,$.jsx)(`div`,{className:`font-semibold text-indigo-700`,children:e}),(0,$.jsx)(`div`,{className:`mt-1 text-[11px] text-slate-500`,children:t})]},e))}),(0,$.jsxs)(`div`,{className:`rounded-lg border border-amber-200 bg-amber-50/60 px-3 py-2 text-[11.5px] text-amber-900`,children:[(0,$.jsx)(`strong`,{children:`硬停机规则(Hard Stop):`}),`消费会话对知识库严格只读;严禁将「4. 待确认项」当作已核实事实;遇到循环依赖或锚点失效立即停止扩展并显式报告知识缺口。`]})]})]}),(0,$.jsx)(`div`,{className:`mt-6 flex justify-end border-t border-slate-100 pt-3`,children:(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg bg-slate-900 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-slate-800`,children:`知道了`})})]})]}):null}function Yb(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function Xb(e){let t=e.trim();if(!t.includes(`|`)&&!t.includes(`-`))return!1;let n=Yb(t);return n.length>0&&n.every(e=>/^:?-{3,}:?$/.test(e))}function Zb(e,t){return t.map((t,n)=>({id:`${e}-${n}`,text:t}))}function Qb(e){let t=e.replace(/\r\n/g,`
384
384
  `).split(`
385
385
  `),n=[],r=0,i=0;for(;r<t.length;){let e=(t[r]??``).trim();if(!e){r+=1;continue}i+=1;let a=`blk-${i}`;if(e.startsWith("```")){let i=e.slice(3).trim(),o=[];for(r+=1;r<t.length&&!(t[r]??``).trim().startsWith("```");)o.push(t[r]??``),r+=1;r<t.length&&(r+=1),n.push({id:a,kind:`code`,lang:i,content:o.join(`
386
386
  `)});continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(e)){n.push({id:a,kind:`hr`}),r+=1;continue}let o=/^(#{1,4})\s+(.+)$/.exec(e);if(o){let e=Math.min(4,o[1].length);n.push({id:a,kind:`heading`,level:e,text:o[2].trim()}),r+=1;continue}if(e.includes(`|`)&&r+1<t.length&&Xb(t[r+1]??``)){let i=Zb(`${a}-th`,Yb(e)),o=[];r+=2;let s=0;for(;r<t.length;){let e=(t[r]??``).trim();if(!e.includes(`|`))break;let n=`${a}-tr-${s}`;o.push({id:n,cells:Zb(`${n}-td`,Yb(e))}),s+=1,r+=1}n.push({id:a,kind:`table`,headers:i,rows:o});continue}if(e.startsWith(`>`)){let e=[];for(;r<t.length&&(t[r]??``).trim().startsWith(`>`);)e.push((t[r]??``).trim().replace(/^>\s?/,``)),r+=1;n.push({id:a,kind:`blockquote`,lines:Zb(`${a}-bq`,e)});continue}if(/^[-*+]\s+/.test(e)){let e=[];for(;r<t.length&&/^[-*+]\s+/.test((t[r]??``).trim());)e.push((t[r]??``).trim().replace(/^[-*+]\s+/,``)),r+=1;n.push({id:a,kind:`ul`,items:Zb(`${a}-ul`,e)});continue}if(/^\d+\.\s+/.test(e)){let e=[];for(;r<t.length&&/^\d+\.\s+/.test((t[r]??``).trim());)e.push((t[r]??``).trim().replace(/^\d+\.\s+/,``)),r+=1;n.push({id:a,kind:`ol`,items:Zb(`${a}-ol`,e)});continue}let s=[e];for(r+=1;r<t.length;){let e=(t[r]??``).trim();if(!e||e.startsWith("```")||e.startsWith(`#`)||e.startsWith(`>`)||/^[-*+]\s+/.test(e)||/^\d+\.\s+/.test(e)||/^(-{3,}|\*{3,}|_{3,})$/.test(e))break;s.push(e),r+=1}n.push({id:a,kind:`paragraph`,text:s.join(` `)})}return n}function $b(e){let t=[],n=/(`[^`]+`|\*\*[^*]+\*\*|\[[^\]]+\]\([^)]+\))/g,r=0,i=n.exec(e),a=0;for(;i!==null;){i.index>r&&t.push(e.slice(r,i.index));let o=i[0];if(a+=1,o.startsWith("`")&&o.endsWith("`"))t.push((0,$.jsx)(`code`,{className:`rounded bg-slate-100 px-1.5 py-0.5 font-mono text-[11.5px] text-indigo-700`,children:o.slice(1,-1)},`c-${a}`));else if(o.startsWith(`**`)&&o.endsWith(`**`))t.push((0,$.jsx)(`strong`,{className:`font-semibold text-slate-900`,children:o.slice(2,-2)},`b-${a}`));else if(o.startsWith(`[`)){let e=/^\[([^\]]+)\]\(([^)]+)\)$/.exec(o);if(e){let n=e[1],r=e[2].trim();/^https?:\/\//i.test(r)?t.push((0,$.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,className:`font-medium text-indigo-600 underline decoration-indigo-300 underline-offset-2 hover:text-indigo-700`,children:n},`a-${a}`)):t.push((0,$.jsx)(`span`,{title:r,className:`rounded bg-indigo-50 px-1.5 py-0.5 font-mono text-[11.5px] text-indigo-700`,children:n},`a-${a}`))}else t.push(o)}r=i.index+o.length,i=n.exec(e)}return r<e.length&&t.push(e.slice(r)),t}function e8(e){switch(e.kind){case`heading`:{let t=e.text.includes(`待确认项`)||e.text.toLowerCase().includes(`pending confirmations`);return e.level===1?(0,$.jsx)(`h1`,{className:`pt-1 text-base font-bold text-slate-900`,children:$b(e.text)},e.id):e.level===2?(0,$.jsxs)(`h2`,{className:`flex items-center gap-2 border-b pb-1 pt-2 text-[13.5px] font-bold ${t?`border-amber-200 text-amber-900`:`border-slate-100 text-slate-900`}`,children:[(0,$.jsx)(`span`,{children:$b(e.text)}),t&&(0,$.jsx)(`span`,{className:`rounded bg-amber-100 px-1.5 py-0.5 text-[10px] font-medium text-amber-800`,children:`未核实隔离区`})]},e.id):(0,$.jsx)(`h3`,{className:`pt-1 text-xs font-semibold text-slate-800`,children:$b(e.text)},e.id)}case`code`:return(0,$.jsxs)(`div`,{className:`overflow-hidden rounded-lg border border-slate-200 bg-slate-900 text-slate-100`,children:[e.lang&&(0,$.jsx)(`div`,{className:`flex items-center justify-between border-b border-slate-800 bg-slate-950/70 px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-slate-400`,children:(0,$.jsx)(`span`,{children:e.lang===`mermaid`?`mermaid · 链路拓扑定义`:e.lang})}),(0,$.jsx)(`pre`,{className:`overflow-x-auto p-3 font-mono text-[11.5px] leading-relaxed`,children:(0,$.jsx)(`code`,{children:e.content})})]},e.id);case`table`:return(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-slate-200`,children:(0,$.jsxs)(`table`,{className:`w-full border-collapse text-left text-xs`,children:[(0,$.jsx)(`thead`,{className:`bg-slate-50 text-slate-700`,children:(0,$.jsx)(`tr`,{children:e.headers.map(e=>(0,$.jsx)(`th`,{className:`border-b border-slate-200 px-2.5 py-1.5 font-semibold`,children:$b(e.text)},e.id))})}),(0,$.jsx)(`tbody`,{className:`divide-y divide-slate-100 bg-white`,children:e.rows.map(e=>(0,$.jsx)(`tr`,{className:`hover:bg-slate-50/70`,children:e.cells.map(e=>(0,$.jsx)(`td`,{className:`px-2.5 py-1.5 text-slate-600`,children:$b(e.text)},e.id))},e.id))})]})},e.id);case`blockquote`:return(0,$.jsx)(`blockquote`,{className:`rounded-r-md border-l-2 border-indigo-400 bg-indigo-50/50 px-3 py-2 text-xs text-slate-700`,children:e.lines.map(e=>(0,$.jsx)(`p`,{children:$b(e.text)},e.id))},e.id);case`ul`:return(0,$.jsx)(`ul`,{className:`list-disc space-y-1 pl-5 text-[12.5px] text-slate-700`,children:e.items.map(e=>(0,$.jsx)(`li`,{children:$b(e.text)},e.id))},e.id);case`ol`:return(0,$.jsx)(`ol`,{className:`list-decimal space-y-1 pl-5 text-[12.5px] text-slate-700`,children:e.items.map(e=>(0,$.jsx)(`li`,{children:$b(e.text)},e.id))},e.id);case`hr`:return(0,$.jsx)(`hr`,{className:`border-slate-200`},e.id);case`paragraph`:return(0,$.jsx)(`p`,{children:$b(e.text)},e.id)}}function t8({markdown:e}){let t=Qb(e);return t.length===0?(0,$.jsx)(`p`,{className:`text-xs italic text-slate-400`,children:`暂无正文内容`}):(0,$.jsx)(`div`,{className:`space-y-3 text-[13px] leading-relaxed text-slate-700 select-text`,children:t.map(e=>e8(e))})}function n8(e){switch(e){case`domain`:return{label:`领域 · Domain`,dotColor:`#f59e0b`,pillClass:`border-amber-200 bg-amber-50 text-amber-900`};case`scene`:return{label:`场景 · Scene`,dotColor:`#6096f6`,pillClass:`border-blue-200 bg-blue-50 text-blue-900`};case`infrastructure`:return{label:`共享知识 · Infra`,dotColor:`#94a3b8`,pillClass:`border-slate-200 bg-slate-100 text-slate-800`}}}function r8(e){switch(e){case`stale`:return`border-rose-200 bg-rose-50 text-rose-700`;case`fresh`:return`border-emerald-200 bg-emerald-50 text-emerald-700`;case`unverified`:return`border-slate-200 bg-slate-100 text-slate-600`}}function i8(e){return`${Math.round(e*100)}%`}function a8({node:e,graphData:t,onClose:n,onSelectNode:r}){let[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(new Map),d=e?.markdown!==void 0&&e.markdown.trim().length>0?e.markdown:null;(0,h.useEffect)(()=>{if(!e||d!==null){l(null);return}let t=u.current.get(e.id);if(t!==void 0){l({nodeId:e.id,status:`loaded`,markdown:t});return}let n=new AbortController;return l({nodeId:e.id,status:`loading`}),Db(e.id,{cache:u.current,signal:n.signal}).then(t=>{t.status!==`aborted`&&(t.status===`loaded`?l({nodeId:e.id,status:`loaded`,markdown:t.markdown}):l({nodeId:e.id,status:`unavailable`}))}),()=>{n.abort()}},[e,d]);let f=(0,h.useMemo)(()=>new Map(t.nodes.map(e=>[e.id,e])),[t.nodes]),p=(0,h.useMemo)(()=>{if(!e)return{domainNode:void 0,ownedChildren:[],upstreamNodes:[],downstreamNodes:[]};let n=e.type===`domain`?void 0:f.get(e.domainId),r=e.type===`domain`?t.nodes.filter(t=>t.type!==`domain`&&t.domainId===e.domainId):[],i=(e.dependsOn??[]).map(e=>({id:e,target:f.get(e)})),a=e.dependents,o=a&&a.length>0?a:t.edges.filter(t=>t.type===`depends_on`&&t.target===e.id).map(e=>e.source);return{domainNode:n,ownedChildren:r,upstreamNodes:i,downstreamNodes:Array.from(new Set(o)).sort().map(e=>({id:e,target:f.get(e)}))}},[e,t.nodes,t.edges,f]);if(!e)return null;let m=n8(e.type),g=e,_=e.type!==`domain`||e.stale===!0||g.freshnessStatus!==void 0,b=Tb(g),S=d??(c?.nodeId===e.id&&c.status===`loaded`?c.markdown:null),A=d===null&&c?.nodeId===e.id&&c.status===`loading`,j=d===null&&c?.nodeId===e.id&&c.status===`unavailable`,N=async()=>{try{await navigator.clipboard.writeText(e.id),a(!0),setTimeout(()=>a(!1),1500)}catch{}},P=e.confidenceBreakdown?[{key:`architecture`,label:`架构完整性 Architecture`,value:e.confidenceBreakdown.architecture},{key:`chain`,label:`链路覆盖度 Chain`,value:e.confidenceBreakdown.chain},{key:`config`,label:`动态配置 Config`,value:e.confidenceBreakdown.config},{key:`experiment`,label:`实验与灰度 Experiment`,value:e.confidenceBreakdown.experiment}]:[];return(0,$.jsxs)(`aside`,{className:`flex h-full w-full max-w-[450px] shrink-0 flex-col border-l border-slate-200 bg-white shadow-xl z-30 select-text`,"data-testid":`node-detail-drawer`,"aria-label":`节点详情面板`,children:[(0,$.jsxs)(`div`,{className:`border-b border-slate-200/90 bg-slate-50/60 px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold ${m.pillClass}`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:m.dotColor}}),m.label]}),_&&(0,$.jsxs)(`span`,{"data-testid":`node-freshness-badge`,"data-freshness-status":b.status,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium ${r8(b.status)}`,children:[b.status===`stale`?(0,$.jsx)(T,{className:`h-3 w-3`}):b.status===`fresh`?(0,$.jsx)(C,{className:`h-3 w-3`}):(0,$.jsx)(w,{className:`h-3 w-3`}),b.label]}),e.hasPendingConfirmations&&(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-[11px] font-medium text-amber-800`,children:[(0,$.jsx)(U,{className:`h-3 w-3`}),`含待确认项`]})]}),(0,$.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg p-1 text-slate-400 transition-colors hover:bg-slate-200/60 hover:text-slate-700`,"aria-label":`关闭节点详情`,"data-testid":`close-drawer-button`,children:(0,$.jsx)(te,{className:`h-4 w-4`})})]}),(0,$.jsx)(`h2`,{className:`mt-2.5 text-lg font-bold tracking-tight text-slate-900`,children:e.title}),(0,$.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap items-center gap-2 text-xs text-slate-500`,children:[(0,$.jsxs)(`div`,{className:`inline-flex items-center gap-1 rounded-md border border-slate-200 bg-white px-2 py-0.5 font-mono text-[11px] text-slate-700`,children:[(0,$.jsx)(`span`,{children:e.id}),(0,$.jsx)(`button`,{type:`button`,onClick:N,className:`ml-0.5 text-slate-400 hover:text-indigo-600`,title:`复制节点 ID`,children:i?(0,$.jsx)(x,{className:`h-3 w-3 text-emerald-600`}):(0,$.jsx)(E,{className:`h-3 w-3`})})]}),(0,$.jsx)(`span`,{className:`truncate font-mono text-[11px] text-slate-400`,title:e.path,children:e.path})]})]}),(0,$.jsxs)(`div`,{className:`flex-1 space-y-5 overflow-y-auto px-5 py-4`,children:[(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`p`,{className:`text-[13px] leading-relaxed text-slate-700`,children:e.summary}),e.aliases.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:`业务别名 · Aliases`}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.aliases.map(e=>(0,$.jsx)(`span`,{className:`rounded-md border border-slate-200 bg-slate-50 px-2 py-0.5 text-[11.5px] text-slate-600`,children:e},e))})]}),e.maintainers.length>0&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-slate-600`,children:[(0,$.jsx)(ee,{className:`h-3.5 w-3.5 shrink-0 text-slate-400`}),(0,$.jsx)(`span`,{className:`text-slate-400`,children:`维护人:`}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.maintainers.map(e=>(0,$.jsx)(`span`,{className:`rounded bg-indigo-50/70 px-1.5 py-0.5 font-mono text-[11px] text-indigo-700`,children:e},e))})]})]}),(e.confidence!==void 0||_||e.hasPendingConfirmations)&&(0,$.jsxs)(`section`,{className:`space-y-2.5 rounded-xl border border-slate-200 bg-slate-50/50 p-3.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs font-semibold text-slate-800`,children:[(0,$.jsx)(V,{className:`h-3.5 w-3.5 text-indigo-600`}),`质量门禁与置信度`]}),e.confidence!==void 0&&(0,$.jsx)(`span`,{className:`rounded-md px-2 py-0.5 font-mono text-xs font-bold ${e.confidence>=.9?`bg-emerald-100 text-emerald-800`:e.confidence>=.8?`bg-amber-100 text-amber-800`:`bg-rose-100 text-rose-800`}`,children:i8(e.confidence)})]}),e.confidence!==void 0&&(0,$.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-slate-200/80`,children:(0,$.jsx)(`div`,{className:`h-full rounded-full transition-all ${e.confidence>=.9?`bg-emerald-500`:e.confidence>=.8?`bg-amber-500`:`bg-rose-500`}`,style:{width:`${Math.max(4,Math.min(100,e.confidence*100))}%`}})}),P.length>0&&(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-2 pt-1`,children:P.map(e=>(0,$.jsxs)(`div`,{className:`rounded-lg border border-slate-200/80 bg-white px-2.5 py-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,$.jsx)(`span`,{className:`text-slate-500`,children:e.label.split(` `)[0]}),(0,$.jsx)(`span`,{className:`font-mono font-semibold text-slate-800`,children:i8(e.value)})]}),(0,$.jsx)(`div`,{className:`mt-1 h-1 w-full overflow-hidden rounded-full bg-slate-100`,children:(0,$.jsx)(`div`,{className:`h-full rounded-full ${e.value>=.9?`bg-indigo-500`:`bg-amber-500`}`,style:{width:`${Math.max(4,Math.min(100,e.value*100))}%`}})})]},e.key))}),_&&b.status===`stale`&&(0,$.jsxs)(`div`,{className:`rounded-lg border border-rose-200 bg-rose-50/80 px-3 py-2 text-[11.5px] text-rose-800`,children:[(0,$.jsxs)(`strong`,{className:`font-semibold`,children:[b.label,`:`]}),b.description]}),_&&b.status===`fresh`&&(0,$.jsxs)(`div`,{className:`rounded-lg border border-emerald-200 bg-emerald-50/75 px-3 py-2 text-[11.5px] text-emerald-800`,children:[(0,$.jsxs)(`strong`,{className:`font-semibold`,children:[b.label,`:`]}),b.description]}),_&&b.status===`unverified`&&(0,$.jsxs)(`div`,{className:`rounded-lg border border-slate-200 bg-white/90 px-3 py-2 text-[11.5px] text-slate-600`,children:[(0,$.jsxs)(`strong`,{className:`font-semibold text-slate-700`,children:[b.label,`:`]}),b.description]}),e.hasPendingConfirmations&&(0,$.jsxs)(`div`,{className:`rounded-lg border border-amber-200 bg-amber-50/80 px-3 py-2 text-[11.5px] text-amber-900`,children:[(0,$.jsx)(`strong`,{className:`font-semibold`,children:`包含待确认项:`}),`第 4 节存在未核实条目,自动合并已拦截(需 Maintainer 审批),Agent 消费时请勿视为已验证事实。`]})]}),(0,$.jsxs)(`section`,{className:`space-y-3`,children:[p.domainNode&&(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:`所属业务域 · Belongs To`}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>r(p.domainNode.id),className:`inline-flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50/60 px-2.5 py-1.5 text-left text-xs font-medium text-amber-950 transition-colors hover:bg-amber-100/70`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-[#f59e0b]`}),(0,$.jsx)(`span`,{children:p.domainNode.title}),(0,$.jsx)(`span`,{className:`font-mono text-[10.5px] text-amber-700/80`,children:p.domainNode.id})]})]}),e.type===`domain`&&p.ownedChildren.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:[`域内条目(`,p.ownedChildren.length,`)`]}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:p.ownedChildren.map(e=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:`inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1 text-xs text-slate-700 transition-colors hover:border-indigo-300 hover:bg-indigo-50/50`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:e.type===`scene`?`#6096f6`:`#94a3b8`}}),(0,$.jsx)(`span`,{className:`font-medium`,children:e.title})]},e.id))})]}),e.type!==`domain`&&(0,$.jsxs)(`div`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1 text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:[(0,$.jsx)(y,{className:`h-3.5 w-3.5 text-slate-400`}),(0,$.jsxs)(`span`,{children:[`直接依赖 · Depends On(`,p.upstreamNodes.length,`)`]})]}),p.upstreamNodes.length===0?(0,$.jsx)(`div`,{className:`text-xs text-slate-400`,children:`无上游直接依赖`}):(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:p.upstreamNodes.map(({id:e,target:t})=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1 text-xs text-slate-700 transition-colors hover:border-indigo-300 hover:bg-indigo-50/60`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:t?.type===`infrastructure`?`#94a3b8`:`#6096f6`}}),(0,$.jsx)(`span`,{className:`font-medium`,children:t?.title??e}),(0,$.jsx)(`span`,{className:`font-mono text-[10px] text-slate-400`,children:e})]},e))})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1 text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:[(0,$.jsx)(v,{className:`h-3.5 w-3.5 text-slate-400`}),(0,$.jsxs)(`span`,{children:[`被依赖方 · Dependents(`,p.downstreamNodes.length,`)`]})]}),p.downstreamNodes.length===0?(0,$.jsx)(`div`,{className:`text-xs text-slate-400`,children:`当前无下游场景直接依赖`}):(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:p.downstreamNodes.map(({id:e,target:t})=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-2.5 py-1 text-xs text-slate-700 transition-colors hover:border-indigo-300 hover:bg-indigo-50/60`,children:[(0,$.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:t?.type===`infrastructure`?`#94a3b8`:`#6096f6`}}),(0,$.jsx)(`span`,{className:`font-medium`,children:t?.title??e}),(0,$.jsx)(`span`,{className:`font-mono text-[10px] text-slate-400`,children:e})]},e))})]})]})]}),(e.repositories.length>0||e.detailPaths&&e.detailPaths.length>0)&&(0,$.jsxs)(`section`,{className:`space-y-2.5`,children:[e.repositories.length>0&&(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:[(0,$.jsx)(k,{className:`h-3.5 w-3.5`}),(0,$.jsxs)(`span`,{children:[`锚定代码仓库 · Repositories(`,e.repositories.length,`)`]})]}),(0,$.jsx)(`div`,{className:`space-y-2`,children:e.repositories.map(e=>(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-slate-50/60 p-3 text-xs`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{className:`font-semibold text-slate-800`,children:e.repo}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[e.branch&&(0,$.jsx)(`span`,{className:`rounded border border-slate-200 bg-white px-1.5 py-0.5 font-mono text-[10.5px] text-slate-500`,children:e.branch}),(0,$.jsxs)(`span`,{className:`rounded bg-indigo-100/80 px-1.5 py-0.5 font-mono text-[10.5px] font-semibold text-indigo-800`,title:e.commitId,children:[`@`,e.commitId.slice(0,8)]})]})]}),(0,$.jsx)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-slate-400`,children:e.gitUrl}),e.paths&&e.paths.length>0&&(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:e.paths.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded border border-slate-200 bg-white px-1.5 py-0.5 font-mono text-[10.5px] text-slate-600`,children:[(0,$.jsx)(D,{className:`h-3 w-3 text-slate-400`}),e]},e))})]},`${e.repo}-${e.commitId}`))})]}),e.detailPaths&&e.detailPaths.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:[(0,$.jsx)(O,{className:`h-3.5 w-3.5`}),(0,$.jsx)(`span`,{children:`附属详情子文档 · Detail Docs`})]}),(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.detailPaths.map(e=>(0,$.jsx)(`span`,{className:`rounded-md border border-slate-200 bg-slate-50 px-2 py-0.5 font-mono text-[11px] text-slate-600`,children:e},e))})]})]}),(S!==null||A||j)&&(0,$.jsxs)(`section`,{className:`space-y-2.5 border-t border-slate-100 pt-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-wider text-slate-400`,children:`知识文档正文 · Markdown`}),S!==null&&S.trim().length>0&&(0,$.jsx)(`button`,{type:`button`,onClick:()=>s(e=>!e),className:`rounded border border-slate-200 bg-slate-50 px-2 py-0.5 text-[11px] font-medium text-slate-600 hover:bg-slate-100`,children:o?`富文本视图`:`原始 Markdown`})]}),A&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border border-slate-200 bg-slate-50/70 px-3.5 py-3 text-xs text-slate-500`,"data-testid":`markdown-lazy-loading`,children:[(0,$.jsx)(M,{className:`h-3.5 w-3.5 animate-spin text-indigo-500`}),(0,$.jsx)(`span`,{children:`正在按需加载节点 Markdown 正文…`})]}),j&&(0,$.jsxs)(`div`,{className:`rounded-xl border border-slate-200 bg-slate-50/80 px-3.5 py-3 text-xs leading-relaxed text-slate-600`,"data-testid":`markdown-unavailable-notice`,children:[`当前静态图谱使用`,` `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 py-0.5 font-mono text-[11px] text-slate-700`,children:`--no-markdown`}),` `,`精简构建,未内嵌文档正文。如需按需加载完整 Markdown,请在本地运行`,` `,(0,$.jsx)(`code`,{className:`rounded bg-white px-1 py-0.5 font-mono text-[11px] text-indigo-700`,children:`olw graph serve`}),`。`]}),S!==null&&S.trim().length>0&&(o?(0,$.jsx)(`pre`,{className:`max-h-96 overflow-auto rounded-xl border border-slate-200 bg-slate-50 p-3 font-mono text-[11.5px] leading-relaxed whitespace-pre-wrap text-slate-700`,children:S}):(0,$.jsx)(`div`,{className:`rounded-xl border border-slate-200/80 bg-white p-3.5 shadow-2xs`,children:(0,$.jsx)(t8,{markdown:S})}))]})]})]})}function o8(){let e=[{id:`business-infrastructure`,type:`domain`,domainId:`business-infrastructure`,title:`基建域`,aliases:[`业务基础设施`,`公共底座`,`business-infrastructure`],summary:`沉淀跨业务域复用的动态配置、AB 实验分流、限流防刷与账本幂等客户端等共享知识。`,maintainers:[`@infra-arch`,`@livex-core`],path:`domains/business-infrastructure/index.md`,dependsOn:[],repositories:[],markdown:`## 域身份与边界
package/dist/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%232563eb'/%3E%3Ccircle cx='10' cy='16' r='3.5' fill='%23fbbf24'/%3E%3Ccircle cx='22' cy='10' r='3' fill='%23ffffff'/%3E%3Ccircle cx='22' cy='22' r='3' fill='%2393c5fd'/%3E%3Cpath d='M13 14.5L19.5 11.2M13 17.5L19.5 20.8' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"
10
10
  />
11
11
  <title>业务知识图谱 · Open LiveX Wiki</title>
12
- <script type="module" crossorigin src="./assets/index-nNv1IPXT.js"></script>
12
+ <script type="module" crossorigin src="./assets/index-CY2UkWN_.js"></script>
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-_2gQunHq.css">
14
14
  </head>
15
15
  <body class="bg-slate-50 text-slate-900 antialiased">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-livex-wiki/graph-ui",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Static SPA for Organic and Hierarchical Domain-Dependency Graph visualization of LiveX Wiki repositories.",
5
5
  "author": "AndersonBY",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "dist-lib"
31
31
  ],
32
32
  "dependencies": {
33
- "@open-livex-wiki/core": "0.2.8",
33
+ "@open-livex-wiki/core": "0.2.9",
34
34
  "cytoscape": "^3.31.0",
35
35
  "lucide-react": "^0.511.0",
36
36
  "react": "^19.1.0",